* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }

:root {
  --brand: #2f6feb;
  --brand-d: #1d4ed8;
  --brand-l: #eaf1ff;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --line: #e8edf5;
  --bg: #f4f6fb;
  --card: #ffffff;
  --ok: #12a150;
  --warn: #e8871e;
  --danger: #e5484d;
  --r: 14px;
  --sd: 0 1px 2px rgba(16,24,40,.05), 0 6px 18px rgba(16,24,40,.07);
  --sd-h: 0 4px 10px rgba(16,24,40,.08), 0 14px 34px rgba(16,24,40,.13);
  --sd-in: inset 0 1px 0 rgba(255,255,255,.9), 0 3px 8px rgba(16,24,40,.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  display: flex; justify-content: center;
}

#app {
  width: 100%; max-width: 480px; height: 100vh; background: var(--bg);
  position: relative; overflow: hidden; display: flex; flex-direction: column;
}
#sidebar { display: none; }
#main { display: flex; flex-direction: column; flex: 1; min-width: 0; height: 100vh; }

/* ---------- 顶部 ---------- */
.hd {
  background: linear-gradient(135deg, #1b3a7a 0%, #2f6feb 55%, #4b8bf5 100%);
  color: #fff; padding: 14px 16px; flex: 0 0 auto;
  padding-top: max(14px, env(safe-area-inset-top));
  position: relative; z-index: 5;
}
.hd .ti { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; letter-spacing: .2px; }
.hd .ti .back {
  cursor: pointer; width: 30px; height: 30px; margin-left: -6px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.14);
  transition: background .16s;
}
.hd .ti .back:active { background: rgba(255,255,255,.3); }
.hd .sub { font-size: 12px; opacity: .8; margin-top: 5px; font-weight: 400; }
.hd .role {
  margin-left: auto; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px; padding: 5px 12px; font-size: 12px; cursor: pointer; font-weight: 500;
  backdrop-filter: blur(6px); transition: background .16s; white-space: nowrap;
}
.hd .role:active { background: rgba(255,255,255,.3); }
.hd-actions { display: flex; gap: 8px; margin-left: auto; align-items: center; }

/* ---------- 主体 ---------- */
.bd {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px 14px 88px; scroll-behavior: smooth;
}
.bd::-webkit-scrollbar { width: 6px; }
.bd::-webkit-scrollbar-thumb { background: #cfd8e6; border-radius: 3px; }

/* ---------- 底部 tab（手机） ---------- */
.tabs {
  position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: rgba(255,255,255,.94); backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line); display: flex; z-index: 20;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs div {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10.5px; color: var(--ink-3); cursor: pointer; position: relative;
  transition: color .16s; padding-top: 4px;
}
.tabs div .ic { display: flex; transition: transform .18s; }
.tabs div.on { color: var(--brand); font-weight: 600; }
.tabs div.on .ic { transform: translateY(-1px) scale(1.06); }
.tabs div.on::after {
  content: ''; position: absolute; top: 0; width: 22px; height: 3px; border-radius: 0 0 3px 3px;
  background: var(--brand);
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border-radius: var(--r); padding: 14px; margin-bottom: 12px;
  box-shadow: var(--sd); border: 1px solid rgba(232,237,245,.9);
  animation: fadeUp .26s ease both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.card .ct {
  font-size: 14px; font-weight: 650; margin-bottom: 10px; display: flex; align-items: center;
  gap: 8px; letter-spacing: .1px;
}
.card .ct::before {
  content: ''; width: 3px; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, var(--brand), #6ea2ff);
}
.card .ct .more {
  margin-left: auto; font-size: 12.5px; color: var(--brand); font-weight: 500; cursor: pointer;
  padding: 3px 9px; border-radius: 999px; background: var(--brand-l); transition: background .16s;
}
.card .ct .more:active { background: #dbe6ff; }
.card .card { box-shadow: none; border: 1px solid var(--line); margin-bottom: 8px; }

.muted { color: var(--ink-2); font-size: 12.5px; }
.dim { color: var(--ink-3); font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }

/* ---------- 功能宫格 ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.grid .g {
  background: #fbfcff; border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 4px 11px; text-align: center; cursor: pointer;
  font-size: 11.5px; color: var(--ink-2); transition: all .16s; position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.grid .g .ico {
  width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  background: var(--brand-l); color: var(--brand); transition: all .18s;
}
.grid .g:active { transform: scale(.97); background: var(--brand-l); border-color: #c7d9ff; }
.grid .g:active .ico { background: var(--brand); color: #fff; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi {
  background: var(--card); border-radius: var(--r); padding: 13px 14px;
  box-shadow: var(--sd); border: 1px solid rgba(232,237,245,.9); position: relative; overflow: hidden;
}
.kpi::after {
  content: ''; position: absolute; right: -18px; top: -18px; width: 56px; height: 56px;
  border-radius: 50%; background: var(--brand-l); opacity: .7;
}
.kpi .v {
  font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -.4px;
  font-variant-numeric: tabular-nums; position: relative;
}
.kpi .v small { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.kpi .k { font-size: 12px; color: var(--ink-2); margin-top: 3px; position: relative; }
.kpi.acc .v { color: var(--brand); }
.kpi.dg .v { color: var(--danger); }
.kpi.ok .v { color: var(--ok); }

/* ---------- 列表项 ---------- */
.item {
  background: var(--card); border-radius: 12px; padding: 13px 14px; margin-bottom: 9px; cursor: pointer;
  box-shadow: var(--sd); border: 1px solid rgba(232,237,245,.9); transition: all .16s;
}
.item:active { background: #f7f9ff; transform: scale(.995); border-color: #cddcff; }
.item .n { font-weight: 600; font-size: 14px; color: var(--ink); }
.item .d { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.card .item { box-shadow: none; border: 1px solid var(--line); margin-bottom: 8px; padding: 11px 12px; }
.card .item:last-child { margin-bottom: 0; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; line-height: 17px; font-weight: 500; white-space: nowrap;
}
.t-blue { background: #e8f0ff; color: #1d4ed8; }
.t-green { background: #e6f8ee; color: #0d7a3e; }
.t-red { background: #fdecec; color: #c02a2f; }
.t-orange { background: #fff3e4; color: #b8620a; }
.t-gray { background: #f1f4f9; color: #55637a; }
.t-purple { background: #f1ecff; color: #6435c9; }

/* ---------- 按钮 ---------- */
.btn {
  background: var(--brand); color: #fff; border: none; border-radius: 10px; padding: 10px 18px;
  font-size: 14px; font-weight: 500; cursor: pointer; transition: all .16s; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:active { transform: scale(.97); background: var(--brand-d); }
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid #c3d6ff; }
.btn.ghost:active { background: var(--brand-l); }
.btn.gray { background: #f1f4f9; color: var(--ink-2); }
.btn.gray:active { background: #e6ebf4; }
.btn.block { width: 100%; display: flex; }
.btn.sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn.danger { background: var(--danger); }
.btn.green { background: var(--ok); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- 表单 ---------- */
input, select, textarea {
  width: 100%; border: 1px solid #dfe6f1; border-radius: 10px; padding: 10px 12px;
  font-size: 14px; background: #fbfcfe; outline: none; font-family: inherit; color: var(--ink);
  transition: all .16s;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(47,111,235,.12);
}
textarea { resize: vertical; min-height: 60px; }
.fl { margin-bottom: 12px; }
.fl label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- 分段 / 搜索 ---------- */
.seg {
  display: flex; background: #eef2f9; border-radius: 11px; padding: 3px; margin-bottom: 12px; gap: 2px;
}
.seg div {
  flex: 1; text-align: center; padding: 8px 4px; font-size: 12.5px; cursor: pointer;
  color: var(--ink-2); border-radius: 9px; transition: all .18s; font-weight: 500; white-space: nowrap;
}
.seg div.on { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 1px 3px rgba(16,24,40,.1); }

.search { display: flex; gap: 8px; margin-bottom: 12px; }
.search input { flex: 1; border-radius: 11px; background: #fff; }
.search .btn { border-radius: 11px; padding: 0 16px; }

/* ---------- 时间轴 ---------- */
.timeline { border-left: 2px solid var(--line); margin-left: 5px; padding-left: 16px; }
.timeline .tl { position: relative; padding: 7px 0; font-size: 13px; }
.timeline .tl::before {
  content: ''; position: absolute; left: -22px; top: 13px; width: 9px; height: 9px;
  border-radius: 50%; background: #fff; border: 2px solid var(--brand);
}

/* ---------- 提示条 ---------- */
.alert { border-radius: 11px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 8px; display: flex; gap: 8px; align-items: flex-start; }
.alert.warn { background: #fff8eb; color: #8a5a00; }
.alert.danger { background: #fef1f1; color: #a1262a; }
.alert.ok { background: #eafaf1; color: #0b6b37; }
.alert.info { background: #eef4ff; color: #1a4ba8; }

/* ---------- 进度条 ---------- */
.bar { height: 6px; background: #edf1f7; border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #4b8bf5, var(--brand)); border-radius: 3px; transition: width .4s; }
.bar i.g { background: linear-gradient(90deg, #34c77b, var(--ok)); }
.bar i.r { background: linear-gradient(90deg, #f27176, var(--danger)); }

/* ---------- 看板 ---------- */
.kanban { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 4px; }
.kanban::-webkit-scrollbar { height: 5px; }
.kanban::-webkit-scrollbar-thumb { background: #cfd8e6; border-radius: 3px; }
.kanban .col {
  min-width: 176px; background: #f7f9fd; border-radius: 12px; padding: 10px;
  border: 1px solid var(--line);
}
.kanban .col h4 {
  margin: 0 0 8px; font-size: 12px; color: var(--ink-2); font-weight: 600;
  display: flex; justify-content: space-between;
}
.kanban .c {
  background: #fff; border-radius: 10px; padding: 9px 10px; margin-bottom: 7px; font-size: 12.5px;
  cursor: pointer; box-shadow: 0 1px 3px rgba(16,24,40,.06); transition: all .16s;
}
.kanban .c:active { transform: scale(.98); box-shadow: var(--sd-h); }

/* ---------- 其它 ---------- */
.empty { text-align: center; color: var(--ink-3); padding: 36px 0; font-size: 13px; }
.photo { width: 100%; border-radius: 11px; display: block; margin-top: 8px; }
.center { text-align: center; }
.mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.42); z-index: 100;
  display: flex; align-items: flex-end; animation: fadeIn .18s ease; backdrop-filter: blur(2px);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  background: #fff; width: 100%; border-radius: 20px 20px 0 0; padding: 20px 16px 28px;
  max-height: 86%; overflow-y: auto; animation: slideUp .24s cubic-bezier(.2,.8,.2,1);
}
@keyframes slideUp { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet h3 { margin: 0 0 16px; font-size: 16.5px; font-weight: 650; }
.fab {
  position: absolute; right: 18px; bottom: 74px; width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #4b8bf5, var(--brand)); color: #fff; font-size: 26px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 15;
  box-shadow: 0 6px 18px rgba(47,111,235,.4); transition: all .18s;
}
.fab:active { transform: scale(.92); }
.sticky-note { font-size: 11px; color: var(--ink-3); text-align: center; padding: 8px 0 4px; }
.chip { display: inline-block; background: #f1f4f9; border-radius: 7px; padding: 3px 9px; font-size: 12px; margin: 0 4px 4px 0; }

/* ---------- 桌面版（≥ 900px） ---------- */
@media (min-width: 900px) {
  body { display: block; background: #f0f3f9; }
  #app {
    max-width: none; flex-direction: row; height: 100vh; background: transparent;
  }
  /* 左侧导航 */
  #sidebar {
    display: flex; flex-direction: column; width: 208px; flex: 0 0 208px;
    background: #fff; border-right: 1px solid var(--line); padding: 18px 12px; z-index: 30;
  }
  #sidebar .brand {
    display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
  }
  #sidebar .brand .logo {
    width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
    background: linear-gradient(135deg, #1b3a7a, #2f6feb); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700;
  }
  #sidebar .brand b { font-size: 14.5px; display: block; line-height: 1.2; }
  #sidebar .brand span { font-size: 11px; color: var(--ink-3); }
  #sidebar .nav { flex: 1; overflow-y: auto; padding-top: 8px; }
  #sidebar .nav .sec {
    font-size: 11px; color: var(--ink-3); padding: 12px 10px 6px; font-weight: 500; letter-spacing: .5px;
  }
  #sidebar .nav .nv {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px;
    font-size: 13.5px; color: var(--ink-2); cursor: pointer; margin-bottom: 2px; transition: all .16s;
  }
  #sidebar .nav .nv .ic { display: flex; color: var(--ink-3); }
  #sidebar .nav .nv:hover { background: #f5f8ff; color: var(--ink); }
  #sidebar .nav .nv.on { background: var(--brand-l); color: var(--brand); font-weight: 600; }
  #sidebar .nav .nv.on .ic { color: var(--brand); }
  #sidebar .foot {
    border-top: 1px solid var(--line); padding-top: 12px; display: flex; align-items: center; gap: 9px;
    cursor: pointer; border-radius: 10px; padding: 10px;
  }
  #sidebar .foot:hover { background: #f5f8ff; }
  #sidebar .foot .av {
    width: 32px; height: 32px; border-radius: 50%; color: #fff; display: flex; align-items: center;
    justify-content: center; font-size: 13px; font-weight: 600; flex: 0 0 auto;
  }
  #sidebar .foot b { font-size: 13px; display: block; line-height: 1.3; }
  #sidebar .foot span { font-size: 11px; color: var(--ink-3); }

  #main { flex: 1; min-width: 0; height: 100vh; }
  .hd { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); padding: 16px 26px; box-shadow: none; }
  .hd .ti { font-size: 19px; font-weight: 650; }
  .hd .ti .back { background: #f1f4f9; color: var(--ink-2); }
  .hd .sub { color: var(--ink-3); opacity: 1; font-size: 12.5px; }
  .hd .role { background: #f1f4f9; border-color: var(--line); color: var(--ink-2); }
  .hd .role:active, .hd .role:hover { background: #e6ebf4; }
  .bd { padding: 22px 26px 40px; }
  .tabs { display: none; }
  .fab { bottom: 36px; right: 36px; }

  /* 桌面栅格：内容区两栏 */
  .bd .cols { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,1fr); gap: 16px; align-items: start; }
  .bd .cols > .col-l, .bd .cols > .col-r { min-width: 0; }
  .bd > * { max-width: 1240px; margin-left: auto; margin-right: auto; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .grid { grid-template-columns: repeat(6, 1fr); }
  .card { padding: 16px; margin-bottom: 14px; }
  .item { padding: 14px 16px; }
  .item:hover { border-color: #cddcff; box-shadow: var(--sd-h); }
  .kanban .col { min-width: 210px; }
  .mask { align-items: center; justify-content: center; }
  .sheet {
    width: 460px; max-width: 92vw; border-radius: 18px; max-height: 84vh;
    animation: popIn .2s cubic-bezier(.2,.8,.2,1);
  }
  @keyframes popIn { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
  .two { gap: 14px; }
}

/* ============================================================
   立体视觉增强层（v2 · 参考赛小匠的层次手法，不依赖商城业务）
   ============================================================ */

/* ---- 顶部：光晕 + 装饰圆，让蓝色头更有纵深 ---- */
.hd::before {
  content: ''; position: absolute; right: -34px; top: -56px; width: 180px; height: 180px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 34% 34%, rgba(255,255,255,.30), rgba(255,255,255,.03) 68%);
}
.hd::after {
  content: ''; position: absolute; right: 78px; bottom: -66px; width: 122px; height: 122px;
  border-radius: 50%; border: 14px solid rgba(255,255,255,.09); pointer-events: none;
}

/* ---- 用户欢迎卡：柔和渐变 + 头像立体环 ---- */
.hero-user {
  background: linear-gradient(120deg, #ffffff 0%, #f6faff 60%, #eef4ff 100%);
  border-color: #dfe9ff; position: relative; overflow: hidden;
}
.hero-user::before {
  content: ''; position: absolute; right: -26px; top: -34px; width: 130px; height: 130px;
  border-radius: 50%; background: radial-gradient(circle, rgba(47,111,235,.16), transparent 70%);
  pointer-events: none;
}
.hero-user .avatar {
  width: 46px; height: 46px; border-radius: 15px; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700;
  flex: 0 0 auto; position: relative;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.45), 0 5px 14px rgba(16,24,40,.20);
}
.hero-user .avatar::after {
  content: ''; position: absolute; inset: -3px; border-radius: 18px;
  border: 2px solid rgba(255,255,255,.85); pointer-events: none;
}
.hero-user .hello { font-size: 11.5px; color: var(--ink-3); letter-spacing: .2px; }
.hero-user .nm { font-size: 16px; font-weight: 750; }

/* ---- KPI 卡：彩色渐变图标 + 悬浮 ---- */
.kpi { transition: transform .18s ease, box-shadow .18s ease; cursor: default; }
.kpi::after { display: none; }
.kpi::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, #6ea2ff, var(--brand)); opacity: .9;
}
.kpi .kpi-ic {
  position: absolute; right: 11px; top: 11px; width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 5px 12px rgba(16,24,40,.16);
}
.kpi .v { font-size: 25px; letter-spacing: -.6px; font-weight: 780; padding-right: 40px; }
.kpi .k { margin-top: 5px; font-weight: 500; }
.kpi .sub { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
/* 强调色数字 */
.kpi.c-blue   .kpi-ic { background: linear-gradient(140deg,#5b9bff,#2563eb); }
.kpi.c-blue   .v { color: #1d4ed8; }
.kpi.c-orange .kpi-ic { background: linear-gradient(140deg,#ffab52,#ef7415); }
.kpi.c-orange .v { color: #c2570a; }
.kpi.c-green  .kpi-ic { background: linear-gradient(140deg,#43d18a,#119c58); }
.kpi.c-green  .v { color: #0d8a49; }
.kpi.c-red    .kpi-ic { background: linear-gradient(140deg,#ff7a7f,#e03137); }
.kpi.c-red    .v { color: #cf2f35; }
.kpi.c-cyan   .kpi-ic { background: linear-gradient(140deg,#4dd4e6,#0e97b3); }
.kpi.c-cyan   .v { color: #0a7d96; }
.kpi.c-purple .kpi-ic { background: linear-gradient(140deg,#a98bfa,#7242d6); }
.kpi.c-purple .v { color: #6633c4; }
.kpi.c-indigo .kpi-ic { background: linear-gradient(140deg,#8390ff,#4f46e5); }
.kpi.c-indigo .v { color: #4338ca; }

/* ---- 功能宫格：彩色渐变图标块，像赛小匠一样一眼区分 ---- */
.grid { gap: 9px; }
.grid .g .ico {
  width: 42px; height: 42px; border-radius: 13px; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 5px 12px rgba(16,24,40,.14);
}
.grid .g.c-blue   .ico { background: linear-gradient(140deg,#5b9bff,#2563eb); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 5px 12px rgba(37,99,235,.30); }
.grid .g.c-orange .ico { background: linear-gradient(140deg,#ffab52,#ef7415); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 5px 12px rgba(239,116,21,.30); }
.grid .g.c-green  .ico { background: linear-gradient(140deg,#43d18a,#119c58); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 5px 12px rgba(17,156,88,.30); }
.grid .g.c-red    .ico { background: linear-gradient(140deg,#ff7a7f,#e03137); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 5px 12px rgba(224,49,55,.30); }
.grid .g.c-cyan   .ico { background: linear-gradient(140deg,#4dd4e6,#0e97b3); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 5px 12px rgba(14,151,179,.30); }
.grid .g.c-purple .ico { background: linear-gradient(140deg,#a98bfa,#7242d6); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 5px 12px rgba(114,66,214,.30); }
.grid .g.c-indigo .ico { background: linear-gradient(140deg,#8390ff,#4f46e5); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 5px 12px rgba(79,70,229,.30); }
.grid .g.c-amber  .ico { background: linear-gradient(140deg,#ffcf5c,#f0a009); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 5px 12px rgba(240,160,9,.30); }
.grid .g:active .ico { background: inherit; }
.grid .g { box-shadow: var(--sd-in); }
.grid .g:active { box-shadow: 0 1px 3px rgba(16,24,40,.10); }

/* ---- 服务承诺标签行：信任背书，卡片式立体小标 ---- */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.trust .t {
  background: linear-gradient(160deg, #fff, #f7faff);
  border: 1px solid #e6edfb; border-radius: 12px; padding: 9px 4px 8px; text-align: center;
  box-shadow: var(--sd-in); display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.trust .t .ti {
  width: 26px; height: 26px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 700;
  background: linear-gradient(140deg,#5b9bff,#2563eb); box-shadow: 0 3px 8px rgba(37,99,235,.28);
}
.trust .t:nth-child(2) .ti { background: linear-gradient(140deg,#a98bfa,#7242d6); box-shadow: 0 3px 8px rgba(114,66,214,.28); }
.trust .t:nth-child(3) .ti { background: linear-gradient(140deg,#43d18a,#119c58); box-shadow: 0 3px 8px rgba(17,156,88,.28); }
.trust .t:nth-child(4) .ti { background: linear-gradient(140deg,#ffab52,#ef7415); box-shadow: 0 3px 8px rgba(239,116,21,.28); }
.trust .t b { font-size: 11.5px; font-weight: 650; color: var(--ink); }
.trust .t small { font-size: 9.5px; color: var(--ink-3); white-space: nowrap; }

/* ---- 底部 Tab：激活项图标凸起 + 高亮胶囊 ---- */
.tabs div .ic { width: 30px; height: 22px; border-radius: 11px; transition: all .2s ease; }
.tabs div.on .ic {
  background: linear-gradient(140deg,#eaf1ff,#d9e6ff);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 2px 6px rgba(47,111,235,.18);
  color: var(--brand);
}
.tabs div.on::after { width: 20px; box-shadow: 0 2px 6px rgba(47,111,235,.4); }

/* ---- 通用卡片：轻微悬浮（仅指针设备） ---- */
@media (hover: hover) {
  .card:hover { box-shadow: var(--sd-h); }
  .kpi:hover { transform: translateY(-3px); box-shadow: var(--sd-h); }
  .grid .g:hover { transform: translateY(-2px); box-shadow: var(--sd-h); }
  .grid .g:hover .ico { transform: translateY(-1px) scale(1.04); }
}

/* ---- 桌面端：头部恢复白底，去掉移动端光晕装饰 ---- */
@media (min-width: 900px) {
  .hd::before, .hd::after { display: none; }
  .trust { grid-template-columns: repeat(4, minmax(0,160px)); }
  .trust .t { flex-direction: row; gap: 8px; text-align: left; justify-content: flex-start; padding: 9px 12px; }
  .trust .t .ti { flex: 0 0 auto; }
  .trust .t small { white-space: normal; }
  .kpi .sub { display: none; }
}

/* ---- 首页全局搜索（胶囊圆润版） ---- */
.gsearch { margin: 8px 0 10px; }
.gs-in {
  display: flex; align-items: center; gap: 6px; box-sizing: border-box; height: 38px;
  background: linear-gradient(180deg,#fbfdff,#f4f8ff);
  border: 1px solid #d7e4fb; border-radius: 22px;
  padding: 3px 4px 3px 14px;
  box-shadow: 0 3px 12px rgba(47,111,235,.12), inset 0 1px #fff;
  color: var(--brand);
}
.gs-in input {
  flex: 1 1 auto; min-width: 0; width: 0; border: 0; outline: 0; background: transparent;
  font-size: 12.5px; color: var(--ink); height: 100%;
}
.gs-in input::placeholder { color: #a9b6c9; }
.gs-in button.gs-btn {
  flex: 0 0 auto; white-space: nowrap; -webkit-appearance: none; appearance: none;
  border: 0; background: linear-gradient(135deg,#ff9a45,#f4701c); color: #fff;
  border-radius: 19px; padding: 0 16px; height: 30px; line-height: 30px;
  font-size: 12px; font-weight: 600; letter-spacing: 1px;
  box-shadow: 0 2px 7px rgba(244,112,28,.3); cursor: pointer;
}
.gs-in button.gs-btn:active { transform: translateY(1px); }
#gs_result { margin-top: 6px; }
.gs-sec { background: #fff; border: 1px solid #e8edf5; border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
.gs-t { font-size: 11.5px; font-weight: 700; color: var(--brand); padding: 8px 12px 4px; }
.gs-item { padding: 9px 12px; font-size: 13.5px; border-top: 1px solid #f4f6fa; cursor: pointer; transition: background .15s; }
.gs-sec .gs-item:first-of-type { border-top: 0; }
.gs-item:hover { background: #f5f9ff; }
.gs-item .muted { font-size: 11.5px; margin-top: 2px; }
.gs-item svg { vertical-align: -2px; }

/* ---- 员工权限勾选网格 ---- */
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; margin-top: 8px; }
.perm-item {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px;
  border: 1px solid #e8edf5; border-radius: 9px; font-size: 12.5px;
  background: #fafcff; cursor: pointer; color: var(--ink);
}
.perm-item input { width: 16px; height: 16px; flex: 0 0 auto; }
.perm-item svg { color: var(--brand); }
@media (min-width: 900px) { .perm-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }

/* ---- KPI 卡片可点击 + 快捷筛选提示 ---- */
.kpi.kpi-link { cursor: pointer; }
.kpi.kpi-link:active { transform: translateY(1px); box-shadow: 0 2px 6px rgba(47,111,235,.18); }
.filter-tip {
  background: linear-gradient(135deg,#eef4ff,#f7faff); border: 1px solid #d7e4fb;
  border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; font-size: 12.5px; color: #2f6feb;
}
.filter-tip span { float: right; color: var(--ink-3); cursor: pointer; }
.filter-tip span:hover { color: #f4701c; }

/* ---- 收款码：醒目添加入口 + 三方式选择 ---- */
.add-pay-card {
  cursor: pointer; border: 1.5px dashed #9fc0f7; background: linear-gradient(135deg,#f4f8ff,#fbfdff);
  transition: all .16s; margin-bottom: 12px;
}
.add-pay-card:active { transform: translateY(1px); background: #eef4ff; }
.add-pay-plus {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(140deg,#5b9bff,#2f6feb); color: #fff;
  font-size: 26px; font-weight: 300; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(47,111,235,.28);
}
.add-pay-arrow { color: var(--brand); font-size: 26px; line-height: 1; }
.pay-kind-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.pay-kind-pick .pk {
  border: 1.5px solid #e3eaf5; border-radius: 12px; padding: 12px 4px 10px; text-align: center;
  cursor: pointer; background: #fafcff; transition: all .16s; color: var(--ink-2);
}
.pay-kind-pick .pk.on { border-color: var(--brand); background: #eef4ff; color: var(--brand); box-shadow: 0 2px 10px rgba(47,111,235,.14); }
.pay-kind-pick .pk b { display: block; font-size: 13px; margin-top: 6px; font-weight: 600; }
.pk-ic {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 11px; color: #fff; font-size: 17px; font-weight: 700;
}
.pk-ic.pk-wx { background: linear-gradient(140deg,#4fd27a,#16a34a); }
.pk-ic.pk-ali { background: linear-gradient(140deg,#5aa9ff,#1677ff); }
.pk-ic.pk-bank { background: linear-gradient(140deg,#8b9dff,#5b4be0); }

/* ---- KPI 长金额：自动缩小字号并允许换行，不再与右上角图标相连/重叠 ---- */
.kpi .v { line-height: 1.16; overflow-wrap: break-word; word-break: break-word; white-space: normal; }
.kpi .v.v-sm { font-size: 20px; letter-spacing: -.4px; }
.kpi .v.v-xs { font-size: 17px; letter-spacing: -.3px; }
/* 单位紧跟数字，换行时不被单独挤到下一行 */
.kpi .v small { display: inline-block; white-space: nowrap; }

/* ---- 底部 Tab：所有项等宽、图标容器同尺寸、文字同基线，整体对齐 ---- */
.tabs div { flex: 1 1 0; min-width: 0; height: 100%; padding-top: 0; gap: 3px; }
.tabs div .ic {
  flex: 0 0 auto; width: 46px; height: 26px; border-radius: 13px;
  align-items: center; justify-content: center;
}
.tabs div.on .ic { transform: none; }
.tabs div > span:last-child { line-height: 1.1; font-size: 10.5px; white-space: nowrap; }

/* ---- 员工权限：员工选择胶囊自动换行 + 全选/清空 ---- */
.perm-staff { display: flex; flex-wrap: wrap; gap: 8px; }
.perm-staff .ps {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px;
  border: 1.5px solid #e3eaf5; border-radius: 11px; background: #fafcff;
  font-size: 13px; color: var(--ink-2); cursor: pointer; transition: all .16s;
  max-width: 100%; line-height: 1.2;
}
.perm-staff .ps:active { transform: translateY(1px); }
.perm-staff .ps b { font-weight: 600; white-space: nowrap; }
.perm-staff .ps .r {
  font-size: 11px; padding: 1px 7px; border-radius: 20px; background: #eef2f9;
  color: var(--ink-3); white-space: nowrap;
}
.perm-staff .ps.on {
  border-color: var(--brand); background: #eef4ff; color: var(--brand);
  box-shadow: 0 2px 10px rgba(47,111,235,.14);
}
.perm-staff .ps.on .r { background: var(--brand); color: #fff; }
.perm-quick { display: inline-flex; gap: 12px; flex: 0 0 auto; }
.perm-quick span { color: var(--brand); font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.perm-quick span:active { opacity: .6; }

/* ============ 进销存业务导览 ============ */
.hub-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 12px; }
.hub-stats .hs {
  background: #fff; border-radius: 12px; padding: 10px 6px; text-align: center;
  box-shadow: 0 2px 10px rgba(16,24,40,.05);
}
.hub-stats .hs .n { display: block; font-size: 15px; font-weight: 700; color: var(--brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-stats .hs .l { display: block; font-size: 10.5px; color: var(--ink-3); margin-top: 3px; white-space: nowrap; }
.hub-card { background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 12px; box-shadow: 0 2px 12px rgba(16,24,40,.05); }
.hub-card .ct { font-weight: 700; font-size: 14px; margin-bottom: 12px; color: var(--ink); }
.flow-line { display: flex; flex-wrap: wrap; align-items: stretch; gap: 4px; }
.flow-node {
  flex: 1 1 60px; min-width: 60px; text-align: center; cursor: pointer;
  border-radius: 11px; padding: 9px 3px; background: #f7f9fe; border: 1.5px solid transparent; transition: all .15s;
}
.flow-node:active { transform: translateY(1px); }
.flow-line.buy .flow-node { background: #fef6f0; }
.flow-line.buy .flow-node:hover { border-color: #f59e0b; }
.flow-line.sell .flow-node { background: #f0f7ff; }
.flow-line.sell .flow-node:hover { border-color: var(--brand); }
.flow-node .fn-ic { display: inline-flex; color: var(--brand); }
.flow-line.buy .fn-ic { color: #ea580c; }
.flow-node b { display: block; font-size: 11.5px; margin-top: 3px; color: var(--ink); }
.flow-node .fn-d { display: block; font-size: 9.5px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-arrow { align-self: center; color: #c3ccdb; font-size: 18px; }
.hub-row { display: flex; align-items: center; gap: 10px; padding: 11px 4px; border-top: 1px solid #f2f5fa; cursor: pointer; }
.hub-row:first-of-type { border-top: none; }
.hub-row .hr-ic { color: var(--brand); flex: 0 0 auto; }
.hub-row .hr-n { font-size: 13.5px; font-weight: 600; flex: 0 0 auto; }
.hub-row .hr-d { font-size: 11.5px; color: var(--ink-3); flex: 1; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-row .hr-a { color: #c3ccdb; font-size: 18px; }
.cat-filter { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.cat-filter select { flex: 1; border-radius: 10px; }
.cat-filter .btn { flex: 0 0 auto; white-space: nowrap; }

/* 采购开单明细行 */
#po_items .po-row { display: grid; grid-template-columns: 1.6fr .7fr .8fr 26px; gap: 5px; margin-bottom: 6px; align-items: center; }
#po_items select, #po_items input { width: 100%; min-width: 0; border: 1px solid #e3eaf5; border-radius: 8px; padding: 7px 6px; font-size: 12.5px; background: #fff; }
#po_items .po-del { border: none; background: #fee2e2; color: #dc2626; border-radius: 8px; font-size: 16px; cursor: pointer; height: 32px; }

/* ---------- 现场线路勘察 ---------- */
.t-cyan { background: #e0f7f5; color: #0f766e; }
.kv-line { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed #eef2f7; font-size: 13px; }
.kv-line:last-child { border-bottom: none; }
.kv-line > span { color: #64748b; width: 100px; flex: none; }
.kv-line > b { color: #1e293b; font-weight: 600; flex: 1; text-align: right; word-break: break-all; }
.ok-note { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.6; }
.hint-note { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.6; }

/* 勘察单电话一键拨打 */
.tel-link { color: #0f766e; text-decoration: none; font-weight: 600; border-bottom: 1px dashed #5eead4; padding-bottom: 1px; }
.tel-link:active { color: #0d9488; }
