/* =========================================================
   薪说 · 管理端设计系统
   ========================================================= */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  --font-num: "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", "DIN Alternate", "PingFang SC", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono", monospace;

  --bg: #e9edf4;
  --shell: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef3fa;
  --canvas: #f4f6fa;
  --text: #0f1728;
  --text-2: #5a6475;
  --text-3: #98a2b3;
  --line: #e8ecf2;
  --line-2: #f1f4f8;
  --line-strong: #dfe5ee;
  --hover: #f3f6fb;
  --hover-row: #fafbfe;

  --brand: #2563eb;
  --brand-2: #4f8cff;
  --brand-ink: #1d4ed8;
  --brand-soft: #eef4ff;
  --brand-soft-2: #e1ebff;
  --brand-ring: rgba(37, 99, 235, 0.16);
  --brand-grad: linear-gradient(135deg, #4f8cff 0%, #2563eb 70%);

  --green: #0e9f6e;
  --green-soft: #e7f8f1;
  --amber: #d9860b;
  --amber-soft: #fff5e3;
  --red: #e0484c;
  --red-soft: #feecec;
  --violet: #7c5cff;
  --violet-soft: #f1edff;
  --gray-soft: #eef1f5;

  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 2px 6px rgba(16, 24, 40, 0.035), 0 18px 40px -28px rgba(16, 24, 40, 0.22);
  --shadow-lg: 0 30px 80px -30px rgba(15, 23, 42, 0.4);
  --shell-shadow: 0 30px 70px -40px rgba(15, 23, 42, 0.45);
  --overlay: rgba(15, 23, 42, 0.44);
}

[data-skin="dusk"] {
  --bg: #efe8de;
  --canvas: #faf6f0;
  --surface-2: #fdf9f4;
  --surface-3: #f6efe5;
  --line: #ece2d5;
  --line-2: #f5ede3;
  --line-strong: #e4d7c6;
  --hover: #fbf4ea;
  --hover-row: #fffaf4;
  --brand: #d9662a;
  --brand-2: #f08a4c;
  --brand-ink: #b54e18;
  --brand-soft: #fff1e7;
  --brand-soft-2: #ffe4d2;
  --brand-ring: rgba(217, 102, 42, 0.16);
  --brand-grad: linear-gradient(135deg, #f0945a 0%, #d9662a 72%);
}

[data-skin="midnight"] {
  --bg: #070b13;
  --shell: #0d1420;
  --surface: #0f1725;
  --surface-2: #121b2a;
  --surface-3: #172235;
  --canvas: #0a111c;
  --text: #e9eff9;
  --text-2: #9dabc0;
  --text-3: #6a7890;
  --line: #1a2537;
  --line-2: #151f2f;
  --line-strong: #26344b;
  --hover: #162033;
  --hover-row: #131c2c;
  --brand: #6f9dff;
  --brand-2: #8fb6ff;
  --brand-ink: #a9c6ff;
  --brand-soft: #16243f;
  --brand-soft-2: #1b2c4d;
  --brand-ring: rgba(111, 157, 255, 0.2);
  --brand-grad: linear-gradient(135deg, #6f9dff 0%, #3d6fe0 70%);
  --green: #3ddc97;
  --green-soft: #102c22;
  --amber: #f3b344;
  --amber-soft: #2b2212;
  --red: #ff7373;
  --red-soft: #2d1719;
  --violet: #a78bfa;
  --violet-soft: #221c3d;
  --gray-soft: #182233;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 24px 50px -32px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 40px 90px -30px rgba(0, 0, 0, 0.7);
  --shell-shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.9);
  --overlay: rgba(2, 6, 14, 0.7);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
svg { display: block; }
.ic { width: 16px; height: 16px; flex: none; }
::selection { background: var(--brand-ring); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-3) 35%, transparent); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- boot ---------- */
.app-shell { height: 100vh; padding: 14px; }
.shell {
  display: flex;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--shell);
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-radius: var(--radius-xl);
  box-shadow: var(--shell-shadow);
}
.boot {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--shell);
  border-radius: var(--radius-xl);
}
.boot-mark { width: 52px; height: 52px; margin-bottom: 10px; animation: floaty 2.6s ease-in-out infinite; }
.boot-mark svg { width: 100%; height: 100%; border-radius: 15px; box-shadow: 0 14px 30px -12px rgba(37, 99, 235, 0.6); }
.boot-title { font-size: 17px; font-weight: 700; letter-spacing: 0.12em; }
.boot-text { font-size: 12px; color: var(--text-3); }
.boot-bar { width: 132px; height: 3px; border-radius: 9px; background: var(--line); overflow: hidden; margin-top: 16px; }
.boot-bar i { display: block; width: 40%; height: 100%; border-radius: 9px; background: var(--brand-grad); animation: loadbar 1.15s ease-in-out infinite; }
.boot-error { max-width: 440px; text-align: center; padding: 32px; }
.boot-error h2 { font-size: 17px; margin-bottom: 8px; }
.boot-error p { color: var(--text-2); font-size: 12.5px; }
.boot-error code { display: inline-block; margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-family: var(--mono); font-size: 12px; }
@keyframes loadbar { 0% { transform: translateX(-110%); } 100% { transform: translateX(340%); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* ---------- sidebar ---------- */
.sidebar {
  flex: 0 0 214px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 16px 12px 12px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 14px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--brand-grad);
  display: grid; place-items: center; color: #fff; font-size: 16px; font-weight: 700;
  box-shadow: 0 8px 18px -8px rgba(37, 99, 235, 0.7);
  letter-spacing: -0.04em;
}
.brand-name { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name b { font-size: 14.5px; letter-spacing: 0.02em; }
.brand-name span { font-size: 10.5px; color: var(--text-3); letter-spacing: 0.04em; }
.company-chip {
  display: flex; align-items: center; gap: 7px; margin: 0 2px 8px; padding: 8px 10px;
  border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line-2);
  font-size: 11.5px; color: var(--text-2); font-weight: 550;
}
.company-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); flex: none; }
.company-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-chip i { margin-left: auto; color: var(--text-3); font-style: normal; font-size: 10px; }

.nav-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 2px; }
.nav-group + .nav-group { margin-top: 2px; }
.nav-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.09em; color: var(--text-3); margin: 17px 10px 6px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 9px;
  height: 36px; padding: 0 10px; border-radius: 9px;
  color: var(--text-2); font-size: 12.8px; font-weight: 500;
  transition: background 0.14s, color 0.14s;
}
.nav-item .ic { width: 16px; height: 16px; opacity: 0.82; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-item.active .ic { opacity: 1; }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 4px 4px 0; background: var(--brand);
}
.nav-item .nav-badge {
  margin-left: auto; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 6px;
  display: grid; place-items: center; font-size: 10px; font-weight: 700;
  background: var(--red-soft); color: var(--red);
}
.nav-item .nav-dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }

.side-promo {
  position: relative; margin: 10px 2px 2px; padding: 12px; border-radius: 13px;
  background: linear-gradient(150deg, var(--brand-soft) 0%, var(--brand-soft-2) 60%, var(--surface-2) 100%);
  border: 1px solid color-mix(in srgb, var(--brand) 12%, var(--line));
  overflow: hidden;
}
.side-promo::after {
  content: ""; position: absolute; right: -26px; top: -34px; width: 100px; height: 100px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}
.side-promo h4 { font-size: 12.3px; font-weight: 700; letter-spacing: 0.01em; position: relative; z-index: 2; }
.side-promo p { margin-top: 2px; font-size: 10.5px; line-height: 1.5; color: var(--text-3); max-width: 108px; position: relative; z-index: 2; }
.side-promo .btn { height: 27px; margin-top: 9px; padding: 0 10px; font-size: 11px; border-radius: 7px; position: relative; z-index: 3; }
.promo-art { position: absolute; right: 10px; bottom: 12px; width: 28px; height: 28px; z-index: 2; }
.promo-logo {
  position: static; width: 28px; height: 28px; border-radius: 8px;
  background: var(--brand-grad); color: #fff; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; box-shadow: 0 6px 14px -6px rgba(37, 99, 235, 0.8);
  transform: rotate(-8deg); border: 1px solid rgba(255, 255, 255, 0.4);
}
.side-foot { padding: 10px 8px 2px; display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; color: var(--text-3); }
.side-foot a { color: var(--text-3); }
.side-foot a:hover { color: var(--brand); }
.side-link { font-size: 10.5px; color: var(--text-3); padding: 2px; border-radius: 4px; }
.side-link:hover { color: var(--brand); }
.guide-step { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.guide-step:last-child { border-bottom: 0; }
.guide-step .n { width: 22px; height: 22px; border-radius: 7px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; margin-top: 1px; }
.guide-step b { font-size: 12px; display: block; }
.guide-step p { font-size: 10.8px; color: var(--text-3); line-height: 1.65; margin-top: 1px; }

/* ---------- main / topbar ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--canvas); }
.topbar {
  flex: 0 0 auto; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 22px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-left h1 { font-size: 14.5px; font-weight: 650; letter-spacing: 0.01em; white-space: nowrap; }
.plan-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 9px;
  border-radius: 8px; border: 1px solid color-mix(in srgb, #d9a441 26%, var(--line));
  background: linear-gradient(135deg, #fff8ea, #fff1d8);
  color: #8a5a10; font-size: 10.8px; font-weight: 650; white-space: nowrap;
}
[data-skin="midnight"] .plan-pill { background: linear-gradient(135deg, #2a2113, #33280f); border-color: #4a3a1c; color: #f0c274; }
.plan-pill .trial { font-weight: 500; color: #a97a2a; }
[data-skin="midnight"] .plan-pill .trial { color: #c49a56; }
.plan-pill a { color: var(--brand); font-weight: 650; display: inline-flex; align-items: center; gap: 2px; margin-left: 1px; }
.plan-pill a:hover { text-decoration: underline; }
.topbar-right { display: flex; align-items: center; gap: 6px; flex: none; }
.security-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-size: 10.8px; font-weight: 550;
  white-space: nowrap;
}
.security-pill .ic { width: 13px; height: 13px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  color: var(--text-2); transition: 0.15s; position: relative;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn .ic { width: 17px; height: 17px; }
.icon-btn .dot {
  position: absolute; top: 7px; right: 8px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--red); border: 1.5px solid var(--surface);
}
.topbar-divider { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.who { display: flex; align-items: center; gap: 8px; padding: 3px 4px 3px 3px; border-radius: 9px; flex: none; white-space: nowrap; }
.who:hover { background: var(--hover); }
.who .avatar { width: 28px; height: 28px; font-size: 11px; }
.who-name { font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.who-role { font-size: 10px; color: var(--text-3); line-height: 1.3; white-space: nowrap; }
.who-text { display: flex; flex-direction: column; }
.who > .ic { color: var(--text-3); width: 12px; height: 12px; }
.menu-toggle { display: none; }

.bell-wrap { position: relative; }
.popover {
  position: absolute; top: calc(100% + 8px); right: 0; width: 330px; z-index: 50;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); overflow: hidden; animation: pop 0.18s ease;
}
.popover-head { padding: 12px 14px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; }
.popover-head b { font-size: 12.5px; }
.popover-head span { font-size: 10.5px; color: var(--text-3); }
.notice-list { max-height: 330px; overflow: auto; }
.notice { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); }
.notice:last-child { border-bottom: 0; }
.notice:hover { background: var(--hover-row); }
.notice-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.notice-ic .ic { width: 14px; height: 14px; }
.notice b { display: block; font-size: 11.8px; font-weight: 600; line-height: 1.5; }
.notice p { font-size: 10.8px; color: var(--text-3); line-height: 1.5; margin-top: 1px; }
.notice time { font-size: 10px; color: var(--text-3); white-space: nowrap; margin-left: auto; align-self: flex-start; }

.content { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 22px 36px; }
.page { max-width: 1280px; margin: 0 auto; animation: pageIn 0.26s ease; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.page-head h1 { font-size: 19px; font-weight: 680; letter-spacing: -0.01em; }
.page-head .desc { margin-top: 3px; font-size: 11.8px; color: var(--text-3); }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-back {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-3);
  margin-bottom: 8px; padding: 4px 8px 4px 4px; border-radius: 7px;
}
.page-back:hover { background: var(--hover); color: var(--text-2); }
.page-back .ic { width: 14px; height: 14px; }

/* ---------- buttons / links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 13px; border-radius: 9px;
  border: 1px solid transparent; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  transition: transform 0.14s, background 0.14s, box-shadow 0.14s, border-color 0.14s;
}
.btn .ic { width: 15px; height: 15px; }
.btn:active { transform: translateY(1px) scale(0.995); }
.btn-primary {
  background: var(--brand-grad); color: #fff;
  box-shadow: 0 8px 18px -12px color-mix(in srgb, var(--brand) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover { filter: brightness(1.045); box-shadow: 0 12px 22px -12px color-mix(in srgb, var(--brand) 85%, transparent); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { background: var(--brand-soft-2); }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--text-2); }
.btn-ghost:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line-strong)); color: var(--text); background: var(--hover); }
.btn-danger { background: var(--red); color: #fff; box-shadow: 0 8px 18px -12px color-mix(in srgb, var(--red) 80%, transparent); }
.btn-danger:hover { filter: brightness(1.05); }
.btn-danger-ghost { background: var(--red-soft); color: var(--red); }
.btn-lg { height: 41px; padding: 0 17px; font-size: 13px; border-radius: 10px; }
.btn-sm { height: 29px; padding: 0 10px; font-size: 11.5px; border-radius: 7px; }
.btn-xs { height: 25px; padding: 0 8px; font-size: 10.8px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn:disabled, .btn.disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none; }
.link-btn { font-size: 11.5px; font-weight: 600; color: var(--brand); padding: 4px 2px; border-radius: 5px; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--red); }
.link-btn.muted { color: var(--text-3); font-weight: 500; }
.link-btn.muted:hover { color: var(--text-2); }

/* ---------- cards / layout ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 18px;
}
.card.flush { padding: 0; overflow: hidden; }
.card-pad-lg { padding: 22px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.section-title { display: flex; align-items: center; gap: 8px; }
.section-title h3 { font-size: 13px; font-weight: 650; }
.section-title .count { font-size: 10.5px; color: var(--text-3); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; }
.section-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.9fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.muted { color: var(--text-3); }
.mono { font-family: var(--mono); }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* ---------- month bar ---------- */
.month-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.month-switch {
  display: inline-flex; align-items: center; height: 35px; padding: 0 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm);
  position: relative;
}
.ms-arrow { width: 28px; height: 27px; border-radius: 7px; display: grid; place-items: center; color: var(--text-3); }
.ms-arrow:hover { background: var(--hover); color: var(--text); }
.month-label {
  display: flex; align-items: center; gap: 7px; height: 27px; padding: 0 10px; border-radius: 7px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em;
}
.month-label:hover { background: var(--hover); }
.month-label .ic { width: 14px; height: 14px; color: var(--text-3); }
.month-label .chev { width: 12px; height: 12px; color: var(--text-3); margin-left: 1px; }
.month-hint { font-size: 11px; color: var(--text-3); }
.month-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; width: 268px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px;
  box-shadow: var(--shadow-lg); animation: pop 0.16s ease;
}
.month-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3px; max-height: 240px; overflow: auto; }
.month-cell {
  height: 31px; border-radius: 7px; font-size: 11.5px; color: var(--text-2);
  display: flex; align-items: center; justify-content: center; gap: 4px; position: relative;
}
.month-cell:hover { background: var(--hover); color: var(--text); }
.month-cell.has::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--brand); position: absolute; bottom: 4px; }
.month-cell.sel { background: var(--brand); color: #fff; font-weight: 600; }
.month-cell.sel::after { background: #fff; }
.month-cell.empty { color: var(--text-3); }

/* ---------- summary card ---------- */
.summary-card { display: flex; align-items: center; gap: 20px; padding: 22px 22px 20px; flex-wrap: wrap; }
.summary-main { min-width: 220px; flex: 1 1 240px; }
.summary-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.summary-title h2 { font-size: 15.5px; font-weight: 650; letter-spacing: 0.005em; }
.summary-sub { margin-top: 5px; font-size: 11.2px; color: var(--text-3); }
.summary-sub b { color: var(--text-2); font-weight: 600; }
.summary-stats { display: flex; align-items: stretch; flex: 0 0 auto; }
.stat { padding: 0 26px; border-left: 1px solid var(--line); min-width: 102px; }
.stat > span { display: block; font-size: 11px; color: var(--text-3); margin-bottom: 1px; white-space: nowrap; }
.stat b { font-size: 22px; font-weight: 600; font-family: var(--font-num); letter-spacing: -0.02em; line-height: 1.3; white-space: nowrap; }
.stat b .of { font-size: 12.5px; color: var(--text-3); font-weight: 500; margin-left: 1px; }
.stat .sub { font-size: 10px; color: var(--text-3); }
.summary-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; padding-left: 18px; border-left: 1px solid var(--line); flex-wrap: wrap; }
.summary-actions .btn { height: 34px; }
.summary-actions .link-btn { padding: 6px 2px; }
.flowbar { height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; display: flex; gap: 2px; margin-top: 12px; width: 100%; flex-basis: 100%; }
.flowbar i { height: 100%; display: block; border-radius: 99px; }
.flow-legend { flex-basis: 100%; display: flex; gap: 14px; font-size: 10px; color: var(--text-3); margin-top: -4px; flex-wrap: wrap; }
.flow-legend span { display: inline-flex; align-items: center; gap: 5px; }
.flow-legend em { width: 6px; height: 6px; border-radius: 2px; font-style: normal; }

/* ---------- status pills ---------- */
.status {
  display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 7px;
  border-radius: 6px; font-size: 10.8px; font-weight: 600; white-space: nowrap;
}
.status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
.status-draft { background: var(--gray-soft); color: var(--text-3); }
.status-sent { background: var(--brand-soft); color: var(--brand); }
.status-viewed { background: var(--amber-soft); color: var(--amber); }
.status-confirmed { background: var(--green-soft); color: var(--green); }
.status-disputed { background: var(--red-soft); color: var(--red); }
.status-info { background: var(--violet-soft); color: var(--violet); }
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px;
  border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line-2);
  font-size: 10.5px; color: var(--text-2); font-weight: 500; white-space: nowrap;
}
.tag.brand { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.tag.green { background: var(--green-soft); border-color: transparent; color: var(--green); }
.tag.amber { background: var(--amber-soft); border-color: transparent; color: var(--amber); }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.2px; }
.table th {
  text-align: left; padding: 10px 14px; font-size: 10.8px; font-weight: 600; color: var(--text-3);
  border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2);
}
.table th:first-child { border-top-left-radius: 0; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.12s; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr:hover { background: var(--hover-row); }
.table .num { text-align: right; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.table th.num { text-align: right; }
.table .strong { font-weight: 600; }
.table .actions { white-space: nowrap; text-align: right; }
.cell-person { display: flex; align-items: center; gap: 9px; min-width: 132px; }
.cell-person b { font-weight: 600; font-size: 12.2px; display: block; line-height: 1.4; }
.cell-person small { font-size: 10px; color: var(--text-3); font-family: var(--mono); letter-spacing: 0.01em; }
.avatar {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  color: #fff; font-size: 11.5px; font-weight: 600; flex: none; letter-spacing: 0.02em;
  background: var(--brand);
}
.avatar.round { border-radius: 50%; }
.avatar.lg { width: 42px; height: 42px; border-radius: 12px; font-size: 15px; }
.avatar.sm { width: 24px; height: 24px; border-radius: 7px; font-size: 10px; }
.money { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.money .cny { font-size: 10px; color: var(--text-3); margin-right: 1px; }
.money.muted { color: var(--text-3); }
.money.positive { color: var(--green); }
.money.negative { color: var(--red); }

/* ---------- toolbar / chips / search ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chips { display: inline-flex; align-items: center; gap: 2px; padding: 2px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; }
.chip { height: 25px; padding: 0 9px; border-radius: 6px; font-size: 10.8px; color: var(--text-3); font-weight: 500; white-space: nowrap; }
.chip:hover { color: var(--text-2); }
.chip.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
.chip .n { margin-left: 3px; font-size: 9.5px; color: var(--text-3); }
.search { position: relative; display: flex; align-items: center; }
.search .ic { position: absolute; left: 9px; width: 13px; height: 13px; color: var(--text-3); pointer-events: none; }
.search input {
  width: 172px; height: 30px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--surface); padding: 0 9px 0 28px; font-size: 11.5px; outline: none;
}
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.search input::placeholder { color: var(--text-3); }

/* ---------- empty ---------- */
.empty { padding: 52px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-ic { width: 52px; height: 52px; border-radius: 15px; background: var(--surface-2); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--text-3); margin-bottom: 6px; }
.empty-ic .ic { width: 22px; height: 22px; }
.empty h3 { font-size: 13.5px; font-weight: 650; }
.empty p { font-size: 11.5px; color: var(--text-3); max-width: 320px; line-height: 1.6; }
.empty .btn { margin-top: 8px; }
.empty-inline { padding: 28px 14px; text-align: center; font-size: 11.5px; color: var(--text-3); }

/* ---------- form ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.label { font-size: 11.5px; font-weight: 550; color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.label .opt { font-size: 9.5px; color: var(--text-3); font-weight: 400; }
.input, .select, .textarea {
  width: 100%; height: 35px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: var(--surface); padding: 0 10px; font-size: 12.3px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s; color: var(--text);
}
.textarea { height: auto; min-height: 74px; padding: 8px 10px; resize: vertical; line-height: 1.6; }
.select { appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.input:disabled { background: var(--surface-2); color: var(--text-3); }
.input.sm, .select.sm { height: 30px; font-size: 11.5px; border-radius: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .span-2 { grid-column: span 2; }
.hint { font-size: 10.5px; color: var(--text-3); line-height: 1.55; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.form-row:last-child { border-bottom: 0; }
.form-row .fr-main b { font-size: 12.2px; font-weight: 600; display: block; }
.form-row .fr-main p { font-size: 10.8px; color: var(--text-3); margin-top: 1px; line-height: 1.5; }
.switch { width: 38px; height: 22px; border-radius: 99px; background: var(--line-strong); position: relative; transition: background 0.18s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22); transition: transform 0.18s; }
.switch.on { background: var(--brand); }
.switch.on::after { transform: translateX(16px); }
.switch:disabled { opacity: 0.5; cursor: not-allowed; }
.check { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; flex: none; transition: 0.13s; }
.check.on { background: var(--brand); border-color: var(--brand); }
.check.on::after { content: ""; width: 7px; height: 4px; border-left: 1.8px solid #fff; border-bottom: 1.8px solid #fff; transform: rotate(-45deg) translateY(-1px); }
.check svg { width: 10px; height: 10px; color: #fff; opacity: 0; }
.segmented { display: inline-flex; padding: 2px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; gap: 2px; }
.segmented button { height: 26px; padding: 0 10px; border-radius: 6px; font-size: 11px; color: var(--text-3); font-weight: 500; }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 600; }

/* ---------- modal / toast ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 90; background: var(--overlay);
  backdrop-filter: blur(3px); display: grid; place-items: center; padding: 22px;
  animation: fade 0.18s ease;
}
.modal {
  width: min(560px, 100%); max-height: calc(100vh - 44px);
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 17px; box-shadow: var(--shadow-lg); overflow: hidden;
  animation: pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.08);
}
.modal.wide { width: min(780px, 100%); }
.modal.xwide { width: min(920px, 100%); }
.modal-head { padding: 18px 20px 13px; display: flex; align-items: flex-start; gap: 14px; }
.modal-head h3 { font-size: 15px; font-weight: 650; letter-spacing: -0.005em; }
.modal-head p { font-size: 11.2px; color: var(--text-3); margin-top: 3px; line-height: 1.5; }
.modal-head .icon-btn { margin-left: auto; margin-top: -2px; flex: none; }
.modal-body { padding: 2px 20px 20px; overflow-y: auto; min-height: 0; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--line); background: var(--surface-2); display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: none; }
.modal-foot .left { margin-right: auto; font-size: 10.8px; color: var(--text-3); }
.modal .danger-note { display: flex; gap: 9px; padding: 11px 12px; border-radius: 9px; background: var(--red-soft); color: var(--red); font-size: 11.5px; line-height: 1.55; align-items: flex-start; }
.modal .danger-note .ic { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.modal .info-note { display: flex; gap: 9px; padding: 11px 12px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-size: 11.5px; line-height: 1.55; align-items: flex-start; }
.modal .info-note .ic { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.info-note, .danger-note { display: flex; gap: 9px; padding: 11px 12px; border-radius: 9px; font-size: 11.5px; line-height: 1.55; align-items: flex-start; }
.info-note { background: var(--brand-soft); color: var(--brand); }
.danger-note { background: var(--red-soft); color: var(--red); }
.info-note .ic, .danger-note .ic { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.info-note b, .danger-note b { font-weight: 650; }
.toast-root { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 9px;
  background: color-mix(in srgb, var(--text) 92%, transparent); color: var(--surface);
  font-size: 12px; font-weight: 500; box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.55);
  animation: toastIn 0.22s ease;
}
.toast .ic { width: 14px; height: 14px; }
.toast.ok .ic { color: #5ee6ad; }
.toast.err .ic { color: #ff8f8f; }
.toast.out { animation: toastOut 0.2s ease forwards; }

/* ---------- wizard / dropzone ---------- */
.steps { display: flex; align-items: center; gap: 0; margin: 2px 0 16px; }
.step { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--text-3); white-space: nowrap; }
.step .n { width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text-3); }
.step.on { color: var(--text); font-weight: 600; }
.step.on .n { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 3px var(--brand-ring); }
.step.done { color: var(--text-2); }
.step.done .n { background: var(--green-soft); border-color: transparent; color: var(--green); }
.step-line { flex: 1; height: 1px; background: var(--line); margin: 0 10px; min-width: 18px; }
.dropzone {
  border: 1.5px dashed var(--line-strong); border-radius: 14px; background: var(--surface-2);
  padding: 30px 18px 26px; text-align: center; cursor: pointer; transition: 0.16s;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.dz-icon { width: 46px; height: 46px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--brand); margin-bottom: 7px; box-shadow: var(--shadow-sm); }
.dz-icon .ic { width: 21px; height: 21px; }
.dropzone h4 { font-size: 13px; font-weight: 650; }
.dropzone p { font-size: 10.8px; color: var(--text-3); line-height: 1.6; max-width: 380px; }
.dropzone .btn { margin-top: 10px; pointer-events: none; }
.dz-foot { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 12px; font-size: 10.8px; color: var(--text-3); flex-wrap: wrap; }
.dz-foot button { font-size: 10.8px; color: var(--brand); font-weight: 600; }
.dz-foot button:hover { text-decoration: underline; }
.parse-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 44px 0; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--brand-soft-2); border-top-color: var(--brand); animation: spin 0.75s linear infinite; }
.file-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-size: 11px; color: var(--text-2); }
.file-chip .ic { width: 13px; height: 13px; color: var(--brand); }
.file-chip b { font-weight: 600; }
.map-scroll { border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: 224px; background: var(--surface); }
.map-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 11px; min-width: 620px; }
.map-table th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; text-align: left; padding: 8px 10px; color: var(--text-3); font-weight: 600; font-size: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.map-table td { padding: 6px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.map-table tr:last-child td { border-bottom: 0; }
.map-table .sample { color: var(--text-3); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 10px; }
.map-table .select { height: 27px; font-size: 10.8px; border-radius: 6px; min-width: 104px; padding-left: 7px; }
.preview-table { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: 210px; }
.preview-summary { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: 11px; color: var(--text-3); }
.preview-summary b { color: var(--text); font-weight: 600; }
.wizard-foot { display: flex; align-items: center; gap: 10px; width: 100%; }
.wizard-foot .left { margin-right: auto; display: flex; align-items: center; gap: 10px; }

/* ---------- phone preview ---------- */
.preview-layout { display: flex; gap: 22px; align-items: flex-start; }
.preview-side { flex: 1; min-width: 0; }
.preview-phone-wrap { flex: 0 0 292px; display: flex; justify-content: center; }
.phone {
  width: 292px; border-radius: 32px; padding: 8px; background: #0b1220;
  box-shadow: 0 34px 70px -36px rgba(15, 23, 42, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  flex: none;
}
.phone-screen { border-radius: 25px; overflow: hidden; background: #f4f6fa; max-height: 620px; overflow-y: auto; }
.phone-notch { position: absolute; }
.mini-slip { font-family: var(--font); }
.mini-slip-head { background: linear-gradient(150deg, #3f7cf6 0%, #2563eb 60%, #1e50c8 100%); color: #fff; padding: 20px 16px 18px; position: relative; overflow: hidden; }
.mini-slip-head::after { content: ""; position: absolute; right: -30px; top: -40px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255, 255, 255, 0.09); }
.mini-slip-head::before { content: ""; position: absolute; right: 30px; bottom: -56px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255, 255, 255, 0.06); }
.mini-company { font-size: 9.5px; opacity: 0.85; letter-spacing: 0.02em; position: relative; z-index: 1; }
.mini-month { font-size: 12px; font-weight: 600; margin-top: 1px; position: relative; z-index: 1; }
.mini-label { font-size: 9px; opacity: 0.78; margin-top: 16px; position: relative; z-index: 1; }
.mini-net { font-size: 27px; font-weight: 650; letter-spacing: -0.02em; margin-top: 1px; position: relative; z-index: 1; font-family: var(--font-num); }
.mini-net small { font-size: 13px; font-weight: 500; margin-right: 2px; }
.mini-badge { display: inline-flex; align-items: center; gap: 4px; margin-top: 9px; height: 19px; padding: 0 7px; border-radius: 5px; background: rgba(255, 255, 255, 0.18); font-size: 9px; position: relative; z-index: 1; }
.mini-sec { background: #fff; margin: 8px; border-radius: 11px; padding: 11px 12px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03); }
.mini-sec-title { display: flex; justify-content: space-between; align-items: center; font-size: 9.5px; color: #8a94a6; margin-bottom: 7px; }
.mini-sec-title b { font-size: 10px; color: #172033; }
.mini-line { display: flex; justify-content: space-between; font-size: 10px; color: #4b5565; padding: 3px 0; }
.mini-line span:last-child { font-family: var(--font-num); font-variant-numeric: tabular-nums; color: #172033; }
.mini-line.ded span:last-child { color: #d9484c; }
.mini-total { display: flex; justify-content: space-between; align-items: center; padding-top: 7px; margin-top: 4px; border-top: 1px dashed #e9edf3; font-size: 10.5px; font-weight: 600; }
.mini-total em { font-style: normal; font-size: 15px; color: #2563eb; font-family: var(--font-num); }
.mini-note { font-size: 8.5px; color: #98a2b3; line-height: 1.6; margin: 0 12px 12px; }
.mini-foot { text-align: center; font-size: 8px; color: #b0b8c5; padding: 0 0 10px; }

.preview-employee { display: flex; align-items: center; gap: 10px; padding-bottom: 13px; border-bottom: 1px solid var(--line-2); }
.preview-employee b { font-size: 13.5px; }
.preview-employee p { font-size: 10.5px; color: var(--text-3); margin-top: 1px; }
.preview-meta { display: flex; gap: 18px; margin: 14px 0 4px; flex-wrap: wrap; }
.preview-meta div span { display: block; font-size: 10px; color: var(--text-3); margin-bottom: 1px; }
.preview-meta div b { font-size: 15px; font-weight: 600; }
.timeline { margin: 18px 0 4px; }
.timeline-item { display: flex; gap: 10px; position: relative; padding-bottom: 15px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 0; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.tl-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); flex: none; margin-top: 2px; z-index: 1; }
.tl-dot.on { background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.tl-dot.warn { background: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.tl-dot.err { background: var(--red); box-shadow: 0 0 0 1px var(--red); }
.timeline-item b { font-size: 11.5px; font-weight: 600; display: block; }
.timeline-item p { font-size: 10.5px; color: var(--text-3); margin-top: 1px; }
.dispute-box { margin-top: 14px; padding: 11px 12px; border-radius: 9px; background: var(--red-soft); border: 1px solid color-mix(in srgb, var(--red) 15%, transparent); }
.dispute-box b { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--red); margin-bottom: 3px; }
.dispute-box p { font-size: 11px; color: color-mix(in srgb, var(--red) 82%, var(--text)); line-height: 1.6; }
.dispute-box .link-btn { margin-top: 6px; }

/* ---------- send page ---------- */
.send-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(290px, 0.85fr); gap: 14px; align-items: start; }
.recipient-list { max-height: 540px; overflow-y: auto; }
.recipient {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px;
  border-bottom: 1px solid var(--line-2); transition: background 0.12s;
}
.recipient:last-child { border-bottom: 0; }
.recipient:hover { background: var(--hover-row); }
.recipient.selected { background: color-mix(in srgb, var(--brand-soft) 38%, var(--surface)); }
.recipient .check { cursor: pointer; }
.recipient.disabled { opacity: 0.55; }
.recipient .person { flex: 1; min-width: 0; }
.recipient .person b { font-size: 12px; font-weight: 600; display: block; }
.recipient .person small { font-size: 10px; color: var(--text-3); }
.recipient .net { font-family: var(--font-num); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.send-side { position: sticky; top: 20px; }
.send-channels { display: flex; flex-direction: column; gap: 8px; }
.channel {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 9px;
  border: 1px solid var(--line-2); background: var(--surface-2);
}
.channel .ch-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.channel b { display: block; font-size: 11.2px; font-weight: 600; }
.channel small { font-size: 9.8px; color: var(--text-3); }
.channel .switch { margin-left: auto; }
.send-summary { display: flex; flex-direction: column; gap: 8px; padding: 14px 0 4px; margin-top: 4px; border-top: 1px solid var(--line-2); }
.send-summary .row { justify-content: space-between; font-size: 11.5px; color: var(--text-3); }
.send-summary .row b { color: var(--text); font-weight: 600; font-family: var(--font-num); font-size: 12.5px; }
.send-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.send-total span { font-size: 11.5px; color: var(--text-3); }
.send-total b { font-size: 22px; font-weight: 650; font-family: var(--font-num); letter-spacing: -0.02em; }
.send-total b small { font-size: 12px; font-weight: 500; color: var(--text-3); margin-right: 2px; }
.progress-line { height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress-line i { display: block; height: 100%; background: var(--brand-grad); border-radius: 99px; transition: width 0.3s ease; }
.success-hero { text-align: center; padding: 8px 10px 4px; }
.success-ring { width: 58px; height: 58px; border-radius: 50%; margin: 0 auto 10px; background: var(--green-soft); display: grid; place-items: center; color: var(--green); animation: pop 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.success-ring .ic { width: 27px; height: 27px; }
.success-hero h3 { font-size: 16px; font-weight: 680; }
.success-hero p { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.success-stats { display: flex; justify-content: center; gap: 30px; margin: 17px 0 6px; }
.success-stats div { text-align: center; }
.success-stats span { display: block; font-size: 10px; color: var(--text-3); }
.success-stats b { font-size: 17px; font-weight: 650; font-family: var(--font-num); }
.success-hash { margin-top: 12px; padding: 10px 12px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line-2); font-family: var(--mono); font-size: 9.8px; color: var(--text-3); word-break: break-all; line-height: 1.6; text-align: left; }

/* ---------- evidence ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { font-size: 10.8px; color: var(--text-3); font-weight: 500; }
.kpi-ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.kpi-ic .ic { width: 14px; height: 14px; }
.kpi-val { font-size: 23px; font-weight: 650; font-family: var(--font-num); letter-spacing: -0.02em; margin-top: 7px; line-height: 1.2; }
.kpi-val small { font-size: 11px; color: var(--text-3); font-weight: 500; margin-left: 2px; }
.kpi-foot { font-size: 9.8px; color: var(--text-3); margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.kpi-foot .up { color: var(--green); font-weight: 600; }
.kpi-foot .down { color: var(--red); font-weight: 600; }
.chain-visual { display: flex; align-items: stretch; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; }
.chain-block {
  flex: 0 0 172px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px;
  background: var(--surface-2); position: relative;
}
.chain-block::after {
  content: ""; position: absolute; right: -8px; top: 50%; width: 7px; height: 1.5px; background: var(--line-strong);
}
.chain-block:last-child::after { display: none; }
.chain-block b { font-size: 11px; font-weight: 650; display: flex; align-items: center; gap: 5px; }
.chain-block b .ic { width: 12px; height: 12px; color: var(--green); }
.chain-block p { font-size: 9.5px; color: var(--text-3); margin-top: 3px; }
.chain-block code { display: block; margin-top: 6px; font-family: var(--mono); font-size: 9px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2); padding: 3px 5px; border-radius: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chain-block:first-child { border-left: 2.5px solid var(--brand); }
.integrity { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: 11px; background: var(--green-soft); border: 1px solid color-mix(in srgb, var(--green) 13%, transparent); margin-bottom: 14px; }
.integrity-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--surface); display: grid; place-items: center; color: var(--green); flex: none; }
.integrity b { font-size: 12px; display: block; }
.integrity p { font-size: 10.5px; color: color-mix(in srgb, var(--green) 65%, var(--text-2)); margin-top: 1px; }
.integrity .btn { margin-left: auto; }
.integrity.err { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 15%, transparent); }
.integrity.err .integrity-ic, .integrity.err b { color: var(--red); }

/* ---------- charts ---------- */
.chart-card { padding: 18px; }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.chart-head h3 { font-size: 13px; font-weight: 650; }
.chart-head p { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.chart-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 10px; color: var(--text-3); }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 7px; height: 7px; border-radius: 2px; }
.chart { width: 100%; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--line-2); stroke-width: 1; }
.chart .axis-text { fill: var(--text-3); font-size: 9.5px; font-family: var(--font); }
.chart .bar { transition: opacity 0.15s; }
.chart .bar:hover { opacity: 0.82; }
.chart .bar-label { fill: var(--text-3); font-size: 9px; font-family: var(--font-num); }
.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.donut-legend .row { gap: 7px; font-size: 10.5px; }
.donut-legend .row i { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.donut-legend .row span { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend .row b { margin-left: auto; font-weight: 600; font-size: 10.5px; font-family: var(--font-num); white-space: nowrap; }
.donut-center { fill: var(--text); font-family: var(--font-num); font-size: 15px; font-weight: 650; }
.donut-center-sub { fill: var(--text-3); font-size: 8px; font-family: var(--font); }
.legend-dot { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }

/* ---------- annual / reports ---------- */
.year-switch { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.year-switch button { width: 26px; height: 26px; border-radius: 6px; color: var(--text-3); display: grid; place-items: center; }
.year-switch button:hover { background: var(--hover); color: var(--text); }
.year-switch b { font-size: 12px; padding: 0 7px; font-variant-numeric: tabular-nums; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.report-card { display: flex; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); transition: 0.15s; }
.report-card:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); box-shadow: var(--shadow); transform: translateY(-1px); }
.report-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.report-ic .ic { width: 18px; height: 18px; }
.report-card h4 { font-size: 12.5px; font-weight: 650; }
.report-card p { font-size: 10.5px; color: var(--text-3); line-height: 1.55; margin-top: 2px; min-height: 32px; }
.report-card .row { margin-top: 8px; }
.report-card .row .btn { margin-left: auto; }
.file-list .file-row { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line-2); }
.file-list .file-row:last-child { border-bottom: 0; }
.file-ic { width: 28px; height: 28px; border-radius: 7px; background: var(--surface-2); display: grid; place-items: center; color: var(--text-3); flex: none; }
.file-ic .ic { width: 14px; height: 14px; }
.file-row b { font-size: 11.5px; font-weight: 550; display: block; }
.file-row small { font-size: 9.8px; color: var(--text-3); }
.file-row .btn { margin-left: auto; }

/* ---------- settings / plans / security ---------- */
.settings-layout { display: grid; grid-template-columns: 164px minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-nav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { padding: 7px 10px; border-radius: 7px; font-size: 11.8px; color: var(--text-3); font-weight: 500; }
.settings-nav a:hover { background: var(--hover); color: var(--text-2); }
.settings-nav a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.settings-section { padding: 18px; border-bottom: 1px solid var(--line-2); }
.settings-section:last-child { border-bottom: 0; }
.settings-section h3 { font-size: 12.5px; font-weight: 650; }
.settings-section > p { font-size: 10.8px; color: var(--text-3); margin-top: 2px; margin-bottom: 14px; }
.skin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.skin-card { border: 1.5px solid var(--line); border-radius: 11px; padding: 9px; text-align: left; transition: 0.15s; background: var(--surface); }
.skin-card:hover { border-color: var(--line-strong); }
.skin-card.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.skin-preview { height: 52px; border-radius: 7px; overflow: hidden; display: flex; margin-bottom: 7px; border: 1px solid var(--line-2); }
.skin-preview .sp-side { width: 30%; height: 100%; }
.skin-preview .sp-main { flex: 1; padding: 5px; display: flex; flex-direction: column; gap: 3px; }
.skin-preview .sp-line { height: 4px; border-radius: 2px; width: 70%; background: rgba(0, 0, 0, 0.08); }
.skin-preview .sp-line.wide { width: 92%; height: 7px; }
.skin-preview .sp-line.short { width: 44%; }
.skin-card b { display: block; font-size: 10.8px; }
.skin-card small { font-size: 9.5px; color: var(--text-3); }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: stretch; }
.plan-card { position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 17px; background: var(--surface); display: flex; flex-direction: column; }
.plan-card.hot { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: 0 0 0 3px var(--brand-ring); }
.plan-badge { position: absolute; top: -9px; right: 12px; height: 18px; padding: 0 8px; border-radius: 5px; background: var(--brand-grad); color: #fff; font-size: 9px; font-weight: 650; display: flex; align-items: center; letter-spacing: 0.03em; }
.plan-card h4 { font-size: 13px; font-weight: 700; }
.plan-card .pdesc { font-size: 10px; color: var(--text-3); margin-top: 1px; min-height: 28px; }
.plan-price { display: flex; align-items: baseline; gap: 2px; margin: 7px 0 12px; }
.plan-price b { font-size: 26px; font-weight: 680; letter-spacing: -0.02em; font-family: var(--font-num); }
.plan-price small { font-size: 10px; color: var(--text-3); }
.plan-card ul { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plan-card li { display: flex; gap: 6px; font-size: 10.8px; color: var(--text-2); align-items: flex-start; }
.plan-card li .ic { width: 12px; height: 12px; color: var(--green); flex: none; margin-top: 2px; }
.plan-card .btn { margin-top: auto; }
.billing-hero { display: flex; align-items: center; gap: 18px; padding: 20px; border-radius: 16px; background: linear-gradient(120deg, #1e40af, #2563eb 55%, #4f8cff); color: #fff; position: relative; overflow: hidden; }
.billing-hero::before { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, 0.07); }
.billing-hero::after { content: ""; position: absolute; right: 60px; bottom: -100px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, 0.05); }
.billing-hero .bh-main { position: relative; z-index: 1; flex: 1; }
.billing-hero .tag { background: rgba(255, 255, 255, 0.15); border-color: transparent; color: #fff; }
.billing-hero h2 { font-size: 19px; font-weight: 680; margin-top: 7px; letter-spacing: -0.01em; }
.billing-hero p { font-size: 11px; opacity: 0.8; margin-top: 3px; }
.billing-hero .bh-stats { display: flex; gap: 28px; position: relative; z-index: 1; }
.billing-hero .bh-stats span { display: block; font-size: 9.8px; opacity: 0.72; }
.billing-hero .bh-stats b { font-size: 20px; font-weight: 650; font-family: var(--font-num); }
.billing-hero .btn { position: relative; z-index: 1; background: #fff; color: #1d4ed8; border-color: transparent; }
.score-wrap { display: flex; align-items: center; gap: 22px; }
.score-ring { position: relative; width: 96px; height: 96px; flex: none; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .score-val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-ring .score-val b { font-size: 24px; font-weight: 680; font-family: var(--font-num); line-height: 1.1; }
.score-ring .score-val span { font-size: 9px; color: var(--text-3); }
.score-items { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.score-item { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.score-item .ic { width: 14px; height: 14px; color: var(--green); flex: none; }
.score-item .meter { margin-left: auto; width: 78px; height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.score-item .meter i { display: block; height: 100%; border-radius: 99px; background: var(--green); }
.perm-table th, .perm-table td { text-align: center; }
.perm-table th:first-child, .perm-table td:first-child { text-align: left; }
.perm-toggle { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-strong); display: inline-grid; place-items: center; background: var(--surface); }
.perm-toggle.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.perm-toggle:disabled { opacity: 0.55; cursor: not-allowed; }
.perm-toggle .ic { width: 11px; height: 11px; }
.role-card { display: flex; flex-direction: column; gap: 5px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.role-card h4 { font-size: 12px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.role-card p { font-size: 10.5px; color: var(--text-3); min-height: 30px; line-height: 1.5; }
.role-card .row { margin-top: 2px; }
.role-avatars { display: flex; }
.role-avatars .avatar { width: 22px; height: 22px; font-size: 9px; border-radius: 50%; border: 1.5px solid var(--surface); margin-left: -6px; }
.role-avatars .avatar:first-child { margin-left: 0; }
.role-avatars .more { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); border: 1.5px solid var(--surface); display: grid; place-items: center; font-size: 8px; color: var(--text-3); margin-left: -6px; }
.invoice-meta { display: flex; gap: 24px; flex-wrap: wrap; }
.invoice-meta div span { display: block; font-size: 10px; color: var(--text-3); }
.invoice-meta div b { font-size: 11.5px; font-weight: 600; }
.cost-row + .cost-row { margin-top: 15px; }
.cost-row .cr-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11.5px; }
.cost-row .cr-head b { font-weight: 600; }
.cost-row .cr-head span { color: var(--text-3); font-size: 10px; }
.cost-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--surface-3); margin-top: 6px; gap: 1.5px; }
.cost-bar i { height: 100%; display: block; }
.cost-bar i:first-child { border-radius: 99px 0 0 99px; }
.cost-bar i:last-child { border-radius: 0 99px 99px 0; }
.cost-tags { display: flex; gap: 12px; margin-top: 5px; font-size: 9.5px; color: var(--text-3); flex-wrap: wrap; }
.cost-tags span { display: inline-flex; align-items: center; gap: 4px; }
.cost-tags i { width: 5px; height: 5px; border-radius: 2px; }
.log-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 5px; }

/* ---------- 单条工资条编辑 ---------- */
.edit-slip-head { display: flex; align-items: center; gap: 10px; padding: 2px 0 14px; }
.edit-slip-head b { font-size: 13.5px; }
.edit-slip-head p { font-size: 10.5px; color: var(--text-3); margin-top: 1px; }
.edit-totals { display: flex; align-items: center; gap: 24px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 11px; margin-bottom: 16px; flex-wrap: wrap; }
.edit-totals span { display: block; font-size: 10px; color: var(--text-3); }
.edit-totals b { font-size: 14px; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.edit-totals .net { margin-left: auto; }
.edit-totals .net b { font-size: 18px; color: var(--brand); }
.edit-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.edit-sec-head h4 { font-size: 11.5px; font-weight: 650; }
.edit-sec-head .link-btn { font-size: 10.5px; }
.edit-list { display: flex; flex-direction: column; gap: 6px; }
.edit-row { display: grid; grid-template-columns: minmax(0, 1fr) 104px 30px; gap: 6px; align-items: center; }
.edit-row .input { height: 32px; font-size: 11.5px; border-radius: 7px; }
.edit-row .input.num { text-align: right; font-family: var(--font-num); }
.edit-row .icon-btn { width: 30px; height: 30px; border-radius: 7px; color: var(--text-3); }
.edit-row .icon-btn:hover { color: var(--red); background: var(--red-soft); }

.ding-code {
  margin: 14px auto 0; padding: 16px; border-radius: 12px;
  background: var(--brand-soft); border: 1px dashed color-mix(in srgb, var(--brand) 28%, var(--line));
  text-align: center; font-family: var(--mono); font-size: 30px; letter-spacing: 0.35em;
  color: var(--brand); font-weight: 700;
}

/* ---------- 管理端登录 ---------- */
.admin-login-page {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(circle at 14% 12%, rgba(79, 140, 255, 0.16), transparent 42%),
    radial-gradient(circle at 86% 88%, rgba(124, 92, 255, 0.12), transparent 42%),
    var(--bg);
}
.admin-login-card {
  width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; padding: 28px 28px 22px;
  box-shadow: 0 30px 80px -40px rgba(15, 23, 42, 0.38);
}
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.login-brand .brand-mark { width: 36px; height: 36px; border-radius: 11px; font-size: 16px; }
.login-brand .brand-name b { font-size: 15px; }
.login-brand .brand-name span { font-size: 10px; }
.admin-login-card h1 { font-size: 20px; font-weight: 680; letter-spacing: -0.01em; }
.admin-login-sub { margin-top: 5px; font-size: 11.5px; color: var(--text-3); line-height: 1.65; }
.admin-login-card form { display: flex; flex-direction: column; gap: 13px; margin-top: 18px; }
.admin-login-card .input { height: 40px; }
.admin-login-card .btn { margin-top: 2px; }
.admin-login-error { padding: 8px 10px; border-radius: 8px; background: var(--red-soft); color: var(--red); font-size: 11px; line-height: 1.5; }
.admin-login-demo { margin-top: 16px; padding: 9px 10px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-size: 10.5px; line-height: 1.5; display: flex; align-items: center; gap: 6px; }
.admin-login-demo .ic { width: 12px; height: 12px; flex: none; }
.admin-login-foot { margin-top: 14px; text-align: center; font-size: 9.5px; color: var(--text-3); display: flex; align-items: center; justify-content: center; gap: 5px; }
.admin-login-foot .ic { width: 11px; height: 11px; }
@media (max-width: 560px) {
  .admin-login-page { padding: 14px; }
  .admin-login-card { padding: 22px 20px 18px; border-radius: 16px; }
}

/* ---------- misc ---------- */
.divider { height: 1px; background: var(--line-2); margin: 16px 0; }
.divider.dashed { background: none; border-top: 1px dashed var(--line); }
.notice-icon-green { background: var(--green-soft); color: var(--green); }
.notice-icon-blue { background: var(--brand-soft); color: var(--brand); }
.notice-icon-amber { background: var(--amber-soft); color: var(--amber); }
.notice-icon-red { background: var(--red-soft); color: var(--red); }
.notice-icon-violet { background: var(--violet-soft); color: var(--violet); }
.inline-code { font-family: var(--mono); font-size: 10.5px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 4px; color: var(--text-2); }
.tip-line { display: flex; align-items: flex-start; gap: 8px; font-size: 10.8px; color: var(--text-3); line-height: 1.6; }
.tip-line .ic { width: 13px; height: 13px; color: var(--brand); flex: none; margin-top: 1px; }
.link-inline { color: var(--brand); font-weight: 550; }
.link-inline:hover { text-decoration: underline; }
.danger-zone { border: 1px solid color-mix(in srgb, var(--red) 20%, var(--line)); border-radius: 12px; padding: 14px; display: flex; align-items: center; gap: 12px; background: color-mix(in srgb, var(--red-soft) 40%, var(--surface)); }
.danger-zone b { font-size: 11.5px; display: block; }
.danger-zone p { font-size: 10.3px; color: var(--text-3); margin-top: 1px; }
.danger-zone .btn { margin-left: auto; flex: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.985); } }
@keyframes pageIn { from { opacity: 0; transform: translateY(5px); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

@media (max-width: 1240px) {
  .stat { padding: 0 18px; min-width: 88px; }
  .summary-card { gap: 14px; }
}
@media (max-height: 820px) {
  .side-promo { display: none; }
  .side-foot { padding-top: 8px; }
}
@media (max-width: 1080px) {
  .sidebar { flex-basis: 196px; }
  .plan-pill .trial { display: none; }
  .who-text { display: none; }
  .grid-main, .send-layout { grid-template-columns: 1fr; }
  .send-side { position: static; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .plan-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app-shell { padding: 0; }
  .shell { border-radius: 0; border: 0; }
  .sidebar {
    position: fixed; z-index: 70; left: 0; top: 0; bottom: 0; width: 232px; flex-basis: 232px;
    transform: translateX(-100%); transition: transform 0.22s ease; box-shadow: 30px 0 60px -40px rgba(0, 0, 0, 0.4);
  }
  .shell.nav-open .sidebar { transform: none; }
  .nav-scrim { position: fixed; inset: 0; z-index: 65; background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(2px); }
  .menu-toggle { display: grid; }
  .content { padding: 16px 14px 30px; }
  .topbar { padding: 0 12px; height: 56px; }
  .security-pill { display: none; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .page-actions { width: 100%; }
  .summary-actions { border-left: 0; padding-left: 0; margin-left: 0; width: 100%; justify-content: flex-end; }
  .summary-stats { width: 100%; }
  .stat:first-child { border-left: 0; padding-left: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .preview-layout { flex-direction: column-reverse; align-items: center; }
  .preview-side { width: 100%; }
  .preview-phone-wrap { position: static; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; overflow-x: auto; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .report-grid { grid-template-columns: 1fr; }
  .billing-hero { flex-wrap: wrap; }
  .skin-grid { grid-template-columns: 1fr 1fr; }
  .donut-wrap { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .topbar-left h1 { display: none; }
  .plan-pill { height: 24px; font-size: 10px; }
  .plan-pill .trial { display: none; }
  .summary-stats { flex-wrap: wrap; gap: 10px 0; }
  .stat { flex: 1 0 33%; padding: 0 10px; min-width: 0; }
  .stat b { font-size: 19px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .report-grid { grid-template-columns: 1fr; }
  .preview-phone-wrap { display: none; }
  .modal-foot { flex-wrap: wrap; }
  .settings-section { padding: 15px; }
  .chain-block { flex-basis: 150px; }
}
