/* ============================================================
 * 筑本 · 施工项目成本管控平台  样式表
 * ============================================================ */
:root {
  --bg: #f3f6fb;
  --panel: #ffffff;
  --ink: #16202f;
  --ink-2: #56657d;
  --ink-3: #8f9db2;
  --line: #e6ecf5;
  --line-2: #eff3f9;
  --brand: #1f5fd0;
  --brand-2: #3f82f0;
  --brand-soft: #eaf1fd;
  --navy: #0e1a2b;
  --navy-2: #132640;
  --red: #e04a4f;
  --red-soft: #fdecec;
  --orange: #ef8a12;
  --orange-soft: #fff4e3;
  --amber: #c99a06;
  --amber-soft: #fdf7dd;
  --green: #11945a;
  --green-soft: #e8f7ef;
  --purple: #7a5af0;
  --cyan: #0d9bb0;
  --shadow-s: 0 1px 2px rgba(15, 32, 62, .05);
  --shadow-m: 0 2px 4px rgba(15, 32, 62, .04), 0 12px 28px -18px rgba(15, 32, 62, .3);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  font-size: 13.5px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cfd9e8; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ================= 布局 ================= */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 224px; flex: 0 0 224px;
  background: linear-gradient(180deg, #0e1a2b 0%, #122540 62%, #0f2038 100%);
  color: #c7d3e5;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  padding: 18px 12px 14px;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 2px 8px 16px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 34px;
  background: linear-gradient(135deg, #2f6fe0, #58a0ff);
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 16px -6px rgba(63, 130, 240, .9);
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.25; }
.brand-txt b { color: #fff; font-size: 17px; letter-spacing: 2px; }
.brand-txt span { font-size: 10.5px; color: #7e91ad; letter-spacing: .3px; }

.nav { flex: 1; overflow-y: auto; padding-right: 2px; }
.nav::-webkit-scrollbar-thumb { background: #26374f; }
.nav-group {
  font-size: 10.5px; color: #5d708c; letter-spacing: 1px;
  padding: 14px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; margin: 1px 0;
  border-radius: 9px; color: #b9c7da; font-size: 13px;
  position: relative; transition: .16s;
}
.nav-item .ico { width: 17px; height: 17px; flex: 0 0 17px; display: grid; place-items: center; opacity: .85; }
.nav-item:hover { background: rgba(255, 255, 255, .055); color: #e8f0fb; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(63, 130, 240, .26), rgba(63, 130, 240, .1));
  color: #fff;
}
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: #4f8ef7;
}
.dot-count {
  margin-left: auto; font-style: normal; font-size: 10.5px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: rgba(224, 74, 79, .9); color: #fff;
  display: none; place-items: center; font-weight: 600;
}
.dot-count.on { display: grid; }

.side-foot { padding: 12px 10px 4px; border-top: 1px solid rgba(255, 255, 255, .07); }
.side-metric { display: flex; justify-content: space-between; font-size: 11.5px; color: #8296b1; }
.side-metric b { color: #6ee7a8; font-size: 13px; }
.side-bar { height: 4px; background: #1c2f49; border-radius: 3px; margin: 7px 0 8px; overflow: hidden; }
.side-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #2f9e6a, #5fd39b); transition: width .8s; }
.side-note { font-size: 10.5px; color: #63768f; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ================= 顶栏 ================= */
.topbar {
  height: 62px; flex: 0 0 62px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; position: sticky; top: 0; z-index: 40;
}
.tb-left { display: flex; align-items: center; gap: 12px; }
.proj-select {
  display: flex; align-items: center; gap: 7px;
  background: #f5f8fd; border: 1px solid var(--line);
  padding: 6px 10px; border-radius: 9px; color: var(--brand);
}
.proj-select select {
  border: 0; background: transparent; font-size: 13px; font-weight: 600;
  color: var(--ink); outline: none; max-width: 340px; cursor: pointer;
}
.tb-tag {
  font-size: 11.5px; color: var(--green); background: var(--green-soft);
  padding: 4px 9px; border-radius: 20px; font-weight: 600;
}
.tb-right { display: flex; align-items: center; gap: 14px; }
.today { font-size: 11.5px; color: var(--ink-3); }
.role-box { display: flex; align-items: center; gap: 6px; background: #f5f8fd; border: 1px solid var(--line); border-radius: 9px; padding: 5px 9px; }
.role-label { font-size: 10.5px; color: var(--ink-3); }
.role-box select { border: 0; background: transparent; font-size: 12px; color: var(--ink); outline: none; cursor: pointer; }
.icon-btn {
  position: relative; width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  display: grid; place-items: center;
}
.icon-btn:hover { background: #f5f8fd; }
.icon-btn em {
  position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px;
  border-radius: 8px; background: var(--red); color: #fff; font-size: 10px;
  font-style: normal; display: grid; place-items: center; padding: 0 4px;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #2f6fe0, #6aa6ff);
  color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600;
}

/* ================= 内容区 ================= */
.view { padding: 20px 22px 40px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 19px; margin: 0 0 5px; letter-spacing: .3px; }
.page-head p { margin: 0; font-size: 12px; color: var(--ink-3); max-width: 860px; line-height: 1.6; }
.page-head .ph-actions { display: flex; gap: 8px; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-s);
}
.card-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px 0; gap: 10px;
}
.card-h h3 { margin: 0; font-size: 14px; letter-spacing: .2px; }
.card-h .sub { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.card-b { padding: 14px 18px 18px; }
.card-h + .card-b { padding-top: 12px; }

.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g23 { grid-template-columns: 1.55fr 1fr; }
.g32 { grid-template-columns: 1fr 1.55fr; }

/* KPI */
.kpi {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px 13px; position: relative; overflow: hidden;
  box-shadow: var(--shadow-s);
}
.kpi::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 95, 208, .07), transparent 70%);
}
.kpi .k-label { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }
.kpi .k-val { font-size: 25px; font-weight: 700; letter-spacing: -.4px; margin: 6px 0 3px; line-height: 1.1; }
.kpi .k-val small { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.kpi .k-foot { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.kpi .up { color: var(--red); }
.kpi .down { color: var(--green); }
.kpi .k-spark { position: absolute; right: 12px; bottom: 10px; width: 84px; opacity: .9; }
.kpi-accent { border-top: 3px solid var(--brand); }
.kpi-red { border-top: 3px solid var(--red); }
.kpi-green { border-top: 3px solid var(--green); }
.kpi-orange { border-top: 3px solid var(--orange); }

/* 徽标 */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 2.5px 8px; border-radius: 20px;
  white-space: nowrap;
}
.b-red { background: var(--red-soft); color: var(--red); }
.b-orange { background: var(--orange-soft); color: #b56b00; }
.b-amber { background: var(--amber-soft); color: #8e6c00; }
.b-green { background: var(--green-soft); color: var(--green); }
.b-blue { background: var(--brand-soft); color: var(--brand); }
.b-gray { background: #f0f3f9; color: var(--ink-2); }
.b-purple { background: #f1edfe; color: var(--purple); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 13px; border-radius: 8px; font-size: 12.5px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  transition: .15s; font-weight: 500;
}
.btn:hover { border-color: #cfdcf0; background: #f7faff; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: #1a52b8; border-color: #1a52b8; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #c93c41; }
.btn-ghost { background: transparent; }
.btn-sm { height: 26px; padding: 0 9px; font-size: 11.5px; border-radius: 7px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* 表格 */
.tbl-wrap { overflow: auto; border-radius: 10px; border: 1px solid var(--line-2); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.tbl thead th {
  background: #f7f9fd; color: var(--ink-3); font-weight: 600; font-size: 11.5px;
  text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap; position: sticky; top: 0; z-index: 2;
}
table.tbl tbody td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: #fafcff; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .strong { font-weight: 600; }
table.tbl tr.total-row td { background: #f8fafd; font-weight: 700; border-top: 1px solid var(--line); }
.t-name { font-weight: 500; }
.t-sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.neg { color: var(--red); }
.pos { color: var(--green); }
.mono { font-variant-numeric: tabular-nums; }

/* 进度条 */
.bar { height: 6px; border-radius: 4px; background: #edf1f8; overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--brand); transition: width .7s ease; }
.bar i.warn { background: var(--orange); }
.bar i.bad { background: var(--red); }
.bar i.ok { background: var(--green); }
.bar-row { display: flex; align-items: center; gap: 8px; }
.bar-row span { font-size: 11.5px; color: var(--ink-2); min-width: 44px; text-align: right; }

/* 标签页 */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tab {
  padding: 8px 13px; font-size: 12.5px; color: var(--ink-2); border: 0; background: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500;
}
.tab:hover { color: var(--brand); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* 列表 */
.list { display: flex; flex-direction: column; }
.list-row {
  display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line);
  align-items: flex-start;
}
.list-row:last-child { border-bottom: 0; }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-title { font-size: 12.8px; line-height: 1.5; }
.list-row .lr-meta { font-size: 11.3px; color: var(--ink-3); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }

.feed-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.feed-row:last-child { border: 0; }
.feed-time { font-size: 11px; color: var(--ink-3); width: 62px; flex: 0 0 62px; padding-top: 1px; }
.feed-txt { font-size: 12.5px; line-height: 1.55; }
.feed-tag { font-size: 10.5px; color: var(--brand); background: var(--brand-soft); padding: 1px 6px; border-radius: 4px; margin-right: 6px; }

/* 图表容器 */
.chart { width: 100%; height: auto; display: block; }
.chart .draw { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.2s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.legend-inline { display: flex; gap: 14px; font-size: 11.5px; color: var(--ink-2); flex-wrap: wrap; }
.legend-inline i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 5px; }

.donut { width: 132px; height: 132px; }
.radar { width: 100%; max-width: 260px; margin: 0 auto; }

/* 统计小块 */
.mini-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mini-stat { background: #f8fafd; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
.mini-stat .ms-l { font-size: 11px; color: var(--ink-3); }
.mini-stat .ms-v { font-size: 16px; font-weight: 700; margin-top: 3px; }

/* 预警卡 */
.warn-card {
  border: 1px solid var(--line); border-left: 3px solid var(--orange);
  border-radius: 10px; padding: 11px 13px; margin-bottom: 9px; background: #fff;
  transition: .15s;
}
.warn-card:hover { box-shadow: var(--shadow-m); transform: translateY(-1px); }
.warn-card.red { border-left-color: var(--red); }
.warn-card.yellow { border-left-color: #ddb020; }
.warn-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.warn-head b { font-size: 12.5px; font-weight: 600; }
.warn-desc { font-size: 11.8px; color: var(--ink-2); line-height: 1.5; }
.warn-foot { display: flex; align-items: center; gap: 12px; margin-top: 7px; font-size: 11px; color: var(--ink-3); flex-wrap: wrap; }
.warn-foot .spacer { flex: 1; }

/* 抽屉 */
.drawer-wrap { position: fixed; inset: 0; z-index: 90; display: none; }
.drawer-wrap.open { display: block; }
.drawer-mask { position: absolute; inset: 0; background: rgba(13, 24, 40, .38); backdrop-filter: blur(1.5px); }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: 520px; max-width: 94vw;
  background: #fff; box-shadow: -20px 0 50px -30px rgba(9, 20, 40, .5);
  display: flex; flex-direction: column; animation: slideIn .24s ease;
}
@keyframes slideIn { from { transform: translateX(30px); opacity: .5; } to { transform: none; opacity: 1; } }
.drawer-h { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 10px; }
.drawer-h h3 { margin: 0 0 4px; font-size: 15px; }
.drawer-h .sub { font-size: 11.5px; color: var(--ink-3); }
.drawer-b { padding: 16px 20px 24px; overflow-y: auto; flex: 1; }
.drawer-f { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; background: #fbfcfe; }
.x-btn { width: 28px; height: 28px; border-radius: 7px; border: 0; background: #f2f5fa; color: var(--ink-2); font-size: 16px; line-height: 1; }
.x-btn:hover { background: #e8eef7; }

.sec-title { font-size: 11.5px; color: var(--ink-3); letter-spacing: .5px; margin: 16px 0 8px; font-weight: 600; }
.sec-title:first-child { margin-top: 0; }
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 8px 10px; font-size: 12.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }

.callout { border-radius: 10px; padding: 11px 13px; font-size: 12.3px; line-height: 1.6; display: flex; gap: 9px; }
.callout i { font-style: normal; font-weight: 700; }
.callout.bad { background: var(--red-soft); color: #a52c31; }
.callout.ok { background: var(--green-soft); color: #0c6d42; }
.callout.warn { background: var(--orange-soft); color: #8d5400; }
.callout.info { background: var(--brand-soft); color: #17457e; }

/* 审批流 */
.flow { display: flex; flex-direction: column; gap: 0; }
.flow-node { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.flow-node:last-child { padding-bottom: 0; }
.flow-node::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.flow-node:last-child::before { display: none; }
.flow-dot {
  width: 24px; height: 24px; border-radius: 50%; flex: 0 0 24px;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: #eef2f8; color: var(--ink-3); z-index: 1;
}
.flow-node.done .flow-dot { background: var(--green-soft); color: var(--green); }
.flow-node.now .flow-dot { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px rgba(31, 95, 208, .14); }
.flow-body { flex: 1; padding-top: 2px; }
.flow-body b { font-size: 12.5px; }
.flow-body span { font-size: 11.5px; color: var(--ink-3); margin-left: 6px; }

/* 模态框 */
.modal-wrap { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; }
.modal-mask { position: absolute; inset: 0; background: rgba(13, 24, 40, .4); }
.modal {
  position: relative; width: 460px; max-width: 92vw; background: #fff; border-radius: 16px;
  box-shadow: 0 30px 80px -30px rgba(9, 20, 40, .6); animation: pop .18s ease;
  overflow: hidden;
}
@keyframes pop { from { transform: scale(.97); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-h { padding: 16px 20px 0; font-size: 15px; font-weight: 600; }
.modal-b { padding: 14px 20px 6px; font-size: 12.8px; color: var(--ink-2); line-height: 1.6; }
.modal-f { padding: 12px 20px 16px; display: flex; justify-content: flex-end; gap: 8px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 11.5px; color: var(--ink-3); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 10px; font-size: 12.8px; color: var(--ink); outline: none; font-family: inherit;
}
.field textarea { height: 66px; padding: 8px 10px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(63, 130, 240, .12); }
.field .hint { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 提示 */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px);
  background: #16202f; color: #fff; padding: 10px 16px; border-radius: 10px;
  font-size: 12.5px; opacity: 0; pointer-events: none; transition: .24s; z-index: 120;
  box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .6); max-width: 80vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: #9c2b30; }
.toast.ok { background: #0d6b45; }

/* ================= 移动端页面 ================= */
.phone-stage {
  display: flex; gap: 34px; align-items: flex-start; justify-content: center;
  padding: 6px 0 10px; flex-wrap: wrap;
}
.phone {
  width: 342px; height: 700px; border-radius: 40px; background: #0b1420;
  padding: 10px; box-shadow: 0 30px 60px -30px rgba(9, 20, 40, .65), 0 0 0 1px #223146;
  position: relative; flex: 0 0 342px;
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 32px; overflow: hidden;
  background: #f4f7fc; display: flex; flex-direction: column; position: relative;
}
.phone-notch {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 20px; border-radius: 12px; background: #0b1420; z-index: 5;
}
.phone-status {
  height: 42px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; font-size: 10.5px; color: #fff; background: #11447f;
  background: linear-gradient(135deg, #12386a, #1f5fd0);
}
.phone-head { background: linear-gradient(135deg, #12386a, #1f5fd0); color: #fff; padding: 6px 16px 16px; }
.phone-head .ph-t { font-size: 15px; font-weight: 600; }
.phone-head .ph-s { font-size: 10.5px; opacity: .78; margin-top: 3px; }
.phone-body { flex: 1; overflow-y: auto; padding: 12px; }
.m-card {
  background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 9px;
  box-shadow: 0 1px 3px rgba(16, 32, 64, .05); border: 1px solid #edf1f8;
}
.m-card .m-top { display: flex; align-items: center; gap: 8px; }
.m-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #eaf1fd; color: #1f5fd0; flex: 0 0 30px; }
.m-title { font-size: 12.5px; font-weight: 600; }
.m-desc { font-size: 11px; color: #8f9db2; margin-top: 3px; line-height: 1.5; }
.m-tag { font-size: 10px; padding: 2px 6px; border-radius: 5px; background: #fdecec; color: #d43b41; margin-left: auto; }
.m-tag.gray { background: #f0f3f9; color: #7b8aa3; }
.m-tag.green { background: #e8f7ef; color: #11945a; }
.phone-tabbar {
  height: 56px; background: #fff; border-top: 1px solid #e8eef7;
  display: flex; align-items: center; justify-content: space-around; padding-bottom: 4px;
}
.ptab { font-size: 9.5px; color: #96a4ba; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ptab.active { color: #1f5fd0; }
.ptab svg { width: 19px; height: 19px; }
.scan-box {
  height: 180px; border-radius: 14px; background: #0b1420; position: relative;
  display: grid; place-items: center; overflow: hidden; margin-bottom: 10px;
}
.scan-frame { width: 120px; height: 120px; border-radius: 10px; position: relative; }
.scan-frame::before, .scan-frame::after,
.scan-frame i::before, .scan-frame i::after {
  content: ""; position: absolute; width: 24px; height: 24px; border: 2.5px solid #4ade80;
}
.scan-frame::before { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.scan-frame::after { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.scan-frame i::before { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.scan-frame i::after { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.scan-line {
  position: absolute; left: 6px; right: 6px; height: 2px; background: linear-gradient(90deg, transparent, #4ade80, transparent);
  animation: scanMove 2s ease-in-out infinite;
}
@keyframes scanMove { 0%, 100% { top: 10px; } 50% { top: 108px; } }
.phone-foot-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; border-radius: 10px; background: #1f5fd0; color: #fff;
  font-size: 13px; font-weight: 600; border: 0; width: 100%;
}
.phone-side { flex: 1; min-width: 300px; max-width: 460px; }

/* 时间轴/步骤 */
.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: flex; gap: 12px; padding-bottom: 14px; position: relative; }
.step::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.step:last-child { padding-bottom: 0; }
.step:last-child::before { display: none; }
.step-n {
  width: 27px; height: 27px; border-radius: 50%; flex: 0 0 27px;
  background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700;
  display: grid; place-items: center; z-index: 1;
}
.step.done .step-n { background: var(--green-soft); color: var(--green); }
.step-b { flex: 1; }
.step-b b { font-size: 12.8px; }
.step-b .step-m { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.55; }

/* 说明页 */
.doc h3 { font-size: 15px; margin: 26px 0 10px; }
.doc h3:first-child { margin-top: 0; }
.doc p { font-size: 13px; line-height: 1.85; color: var(--ink-2); margin: 0 0 10px; }
.doc ul { margin: 0 0 12px; padding-left: 18px; }
.doc li { font-size: 13px; line-height: 1.85; color: var(--ink-2); }
.doc code { background: #f2f6fd; padding: 1px 5px; border-radius: 4px; font-size: 12px; color: #17457e; }
.doc .note { background: #f8fafd; border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }
.searchbox { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.searchbox input { border: 0; outline: none; font-size: 12.5px; width: 180px; font-family: inherit; background: transparent; }
.seg { display: inline-flex; background: #f4f7fc; border-radius: 8px; padding: 2px; border: 1px solid var(--line); }
.seg button { border: 0; background: none; font-size: 11.8px; color: var(--ink-2); padding: 5px 11px; border-radius: 6px; }
.seg button.on { background: #fff; color: var(--brand); font-weight: 600; box-shadow: var(--shadow-s); }

.empty { text-align: center; padding: 32px 0; color: var(--ink-3); font-size: 12.5px; }
.hint-line { font-size: 11.5px; color: var(--ink-3); margin-top: 8px; display: flex; gap: 6px; align-items: center; }

/* 更多面板 */
.more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.more-tile {
  display: flex; flex-direction: column; gap: 4px; padding: 12px;
  border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe;
  transition: .15s;
}
.more-tile:hover { border-color: #cfdcf0; background: #f5f9ff; }
.more-tile .m-ico { width: 32px; height: 32px; }
.more-tile b { font-size: 13px; margin-top: 2px; }
.more-tile span { font-size: 10.5px; color: var(--ink-3); }

@media (max-width: 1400px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .g23, .g32, .g3, .g2 { grid-template-columns: 1fr; }
  .sidebar { width: 200px; flex: 0 0 200px; }
}

/* ================= 移动端适配 ================= */
.tabbar { display: none; }

@media (max-width: 768px) {
  body { font-size: 14px; }
  .app { display: block; }
  .sidebar { display: none; }

  /* 顶栏精简 */
  .topbar { height: 54px; flex: 0 0 54px; padding: 0 12px; }
  .today, .role-box { display: none; }
  .tb-left { gap: 8px; }
  .tb-right { gap: 8px; }
  .proj-select { padding: 5px 8px; }
  .proj-select select { max-width: 44vw; font-size: 12.5px; }
  .tb-tag { display: none; }

  /* 内容区 */
  .view { padding: 14px 12px calc(74px + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom: 12px; gap: 10px; }
  .page-head h1 { font-size: 17px; }
  .page-head p { font-size: 11.5px; }
  .page-head .ph-actions { width: 100%; }
  .page-head .ph-actions .btn { flex: 1; }
  .grid { gap: 10px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3, .g2, .g23, .g32 { grid-template-columns: 1fr; }
  .kpi { padding: 13px 14px 12px; }
  .kpi .k-val { font-size: 21px; }
  .card-h { padding: 13px 14px 0; flex-wrap: wrap; }
  .card-b { padding: 12px 14px 14px; }
  .card-h + .card-b { padding-top: 10px; }

  /* 触控友好 */
  .btn { height: 38px; padding: 0 14px; font-size: 13px; border-radius: 9px; }
  .btn-sm { height: 32px; padding: 0 11px; }
  .tab { padding: 9px 11px; font-size: 13px; }
  .nav-item, .searchbox, .seg button { min-height: 36px; }
  .field input, .field select, .field textarea { height: 40px; font-size: 14px; }
  table.tbl { font-size: 13px; }
  table.tbl thead th, table.tbl tbody td { padding: 10px; }

  /* 底部导航 */
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    height: calc(58px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: #fff; border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px -14px rgba(9, 20, 40, .4);
  }
  .titem {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; font-size: 10.5px; color: var(--ink-3); position: relative;
  }
  .titem .ico { width: 21px; height: 21px; display: grid; place-items: center; }
  .titem .ico svg { width: 21px; height: 21px; }
  .titem.active { color: var(--brand); font-weight: 600; }
  .titem .dot-count { position: absolute; top: 5px; right: calc(50% - 20px); display: none; }
  .titem .dot-count.on { display: grid; }

  /* 抽屉改为底部弹层 */
  .drawer {
    width: 100%; max-width: 100%; top: auto; height: 88vh;
    border-radius: 18px 18px 0 0; animation: sheetUp .26s ease;
  }
  @keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
  .drawer-h, .drawer-b, .drawer-f { padding-left: 16px; padding-right: 16px; }
  .drawer::before {
    content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    width: 42px; height: 4px; border-radius: 2px; background: #dfe6f0;
  }
  .modal { width: 94vw; }

  /* 真机上不再展示手机模型，仅保留功能说明 */
  .phone { display: none; }
  .phone-side { min-width: 0; max-width: 100%; }
  .phone-stage { padding: 0; }

  .toolbar { gap: 6px; }
  .searchbox input { width: 128px; }
  .toast { bottom: calc(70px + env(safe-area-inset-bottom)); }
}
