/* =========================================================
   捷报 · 设计系统 v2
   移动端优先 / 浅色 / 现代 SaaS
   ========================================================= */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  /* 品牌 */
  --brand: #7C5AD6;
  --brand-ink: #54389E;
  --brand-soft: #F4F0FE;
  --brand-soft-2: #E6DDFB;
  --grad: linear-gradient(135deg, #A78BFA 0%, #7C5AD6 46%, #6B44C2 100%);
  --grad-soft: linear-gradient(135deg, #F4F0FE 0%, #E6DDFB 100%);

  /* 运行时可切换（由 theme.js 覆盖） */
  --brand-accent: #B9A4F5;
  --brand-rgb: 124, 90, 214;

  /* 语义色 */
  --ok: #059669;      --ok-soft: #ecfdf5;
  --warn: #d97706;    --warn-soft: #fffbeb;
  --danger: #e11d48;  --danger-soft: #fff1f2;
  --purple: #6B44C2;  --purple-soft: #E6DDFB;

  /* 中性 */
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #E7E1F6;
  --line-2: #f1f5f9;
  --bg: #F8F6FD;
  --card: #ffffff;

  /* 形状 */
  --r-xl: 24px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;

  /* 阴影 */
  --sh-1: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .04);
  --sh-2: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 30px -12px rgba(15, 23, 42, .16);
  --sh-brand: 0 12px 28px -12px rgba(var(--brand-rgb), .55);

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
          "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }
.hidden { display: none !important; }

/* =========================================================
   1. 顶部栏
   ========================================================= */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--grad);
  color: #fff;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  box-shadow: 0 6px 20px -10px rgba(var(--brand-rgb), .7);
}
.topbar h1 {
  font-size: 19px; margin: 0; font-weight: 700; letter-spacing: .2px;
}
.topbar .sub { font-size: 12.5px; opacity: .78; margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.topbar-right .small {
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .22);
  padding: 5px 12px; border-radius: 999px; font-weight: 600;
  white-space: nowrap; max-width: 40vw; overflow: hidden; text-overflow: ellipsis;
}
.badge-dot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #f43f5e; color: #fff; font-size: 11px; font-weight: 700;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9);
}

/* =========================================================
   2. 布局
   ========================================================= */
.wrap { padding: 16px 14px 96px; max-width: 640px; margin: 0 auto; }
.wrap.wide { max-width: 1180px; padding-bottom: 40px; }

.card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  padding: 18px;
  margin-bottom: 14px;
}
.card.tight { padding: 15px 16px; }
.card-title {
  font-size: 15px; font-weight: 700; margin: 0 0 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  letter-spacing: .1px;
}
.card-title .hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.section-hint { color: var(--muted); font-size: 12.5px; margin: -4px 0 12px; }

/* =========================================================
   3. 按钮
   ========================================================= */
.btn {
  border: none; border-radius: var(--r-md); padding: 12px 18px; font-weight: 650;
  background: var(--brand); color: #fff;
  transition: transform .08s ease, box-shadow .18s, opacity .18s;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  box-shadow: 0 6px 16px -8px rgba(var(--brand-rgb), .8);
  letter-spacing: .2px;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.block { width: 100%; }
.btn.ghost {
  background: #fff; color: var(--brand-ink);
  border: 1.5px solid var(--brand-soft-2); box-shadow: none;
}
.btn.gray { background: #eef1f6; color: var(--ink-2); box-shadow: none; }
.btn.ok { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 6px 16px -8px rgba(5, 150, 105, .8); }
.btn.warn { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: none; }
.btn.danger { background: linear-gradient(135deg, #fb7185, #e11d48); box-shadow: none; }
.btn.sm { padding: 8px 13px; font-size: 13px; border-radius: 11px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 130px; }
.link-btn { background: none; border: none; color: var(--brand); font-size: 13.5px; padding: 8px 2px 2px; font-weight: 600; }

/* =========================================================
   4. 表单
   ========================================================= */
.field { margin-bottom: 13px; }
.field label {
  display: block; font-size: 12.5px; color: var(--muted);
  margin-bottom: 6px; font-weight: 600; letter-spacing: .2px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 13px; border: 1.5px solid var(--line);
  border-radius: var(--r-md); background: #fff; outline: none; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .1);
}
.field textarea { min-height: 80px; resize: vertical; line-height: 1.6; }

/* 多选清单（校长端分配拨打人等） */
.check-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.check-row {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-bottom: 1px solid var(--line-2);
  cursor: pointer; font-weight: 400; font-size: 14px; margin: 0;
}
.check-row:last-child { border-bottom: none; }
.check-row:hover { background: var(--brand-soft); }
.check-row input[type="checkbox"] { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.check-row .grow { min-width: 0; }
.inline-2 { display: flex; gap: 10px; }
.inline-2 > * { flex: 1; min-width: 0; }

/* =========================================================
   5. 标签 / 文本
   ========================================================= */
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; line-height: 1.55; letter-spacing: .2px;
  white-space: nowrap;
}
.tag.blue { background: var(--brand-soft); color: var(--brand-ink); }
.tag.green { background: var(--ok-soft); color: #047857; }
.tag.orange { background: var(--warn-soft); color: #b45309; }
.tag.red { background: var(--danger-soft); color: #be123c; }
.tag.gray { background: var(--line-2); color: var(--muted); }
.tag.purple { background: var(--purple-soft); color: #6d28d9; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, "Cascadia Mono", monospace; letter-spacing: .6px; }

/* =========================================================
   6. 数据卡片
   ========================================================= */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stats.c2 { grid-template-columns: repeat(2, 1fr); }
.stats.c3 { grid-template-columns: repeat(3, 1fr); }
.stats.c4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .stats.c4 { grid-template-columns: repeat(4, 1fr); } }

.stat {
  background: #f7f9fc; border-radius: var(--r-md); padding: 12px 13px;
  min-width: 0; transition: background .15s;
}
.stat .v {
  font-size: 23px; font-weight: 800; color: var(--ink); line-height: 1.2;
  letter-spacing: -.6px; font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis;
}
.stat .v .small { font-weight: 600; color: var(--muted); font-size: 13px; letter-spacing: 0; }
.stat .v.small-v { font-size: 16px; font-weight: 700; letter-spacing: -.2px; line-height: 1.35; }
.stat .k { font-size: 11.5px; color: var(--muted); margin-top: 4px; font-weight: 500; }
.stat.ok { background: var(--ok-soft); } .stat.ok .v { color: #047857; }
.stat.warn { background: var(--warn-soft); } .stat.warn .v { color: #b45309; }
.stat.danger { background: var(--danger-soft); } .stat.danger .v { color: #be123c; }
.stat.brand { background: var(--brand-soft); } .stat.brand .v { color: var(--brand-ink); }

/* =========================================================
   7. 打卡英雄卡
   ========================================================= */
.card.hero {
  background: var(--grad);
  color: #fff; border: none; box-shadow: var(--sh-brand);
  padding: 20px 18px 18px; position: relative; overflow: hidden;
}
.card.hero::after {
  content: ''; position: absolute; width: 260px; height: 260px; right: -90px; top: -110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, 0) 68%);
  pointer-events: none;
}
.card.hero::before {
  content: ''; position: absolute; width: 180px; height: 180px; left: -70px; bottom: -110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}
.card.hero > * { position: relative; z-index: 1; }
.hero-top {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: rgba(255, 255, 255, .82); font-weight: 600;
}
.hero-date {
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .2);
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.clock { text-align: center; padding: 14px 0 4px; }
.clock .time {
  font-size: 46px; font-weight: 800; letter-spacing: -1.5px;
  color: #fff; line-height: 1; font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 18px rgba(0, 0, 0, .16);
}
.clock .date { font-size: 12.5px; color: rgba(255, 255, 255, .75); margin-top: 7px; letter-spacing: .6px; }
.punch-state { display: flex; gap: 9px; margin: 16px 0 0; }
.punch-state .it {
  flex: 1; text-align: center; padding: 10px 6px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--r-md);
}
.punch-state .it .l { font-size: 11.5px; color: rgba(255, 255, 255, .74); font-weight: 600; }
.punch-state .it .t {
  font-size: 16px; font-weight: 700; color: #fff; margin-top: 3px;
  font-variant-numeric: tabular-nums; letter-spacing: .4px;
}
.card.hero .punch-state .it .t .tag { background: rgba(255, 255, 255, .95); }
.card.hero .callout {
  background: rgba(255, 255, 255, .16); color: #fff;
  border-left-color: rgba(255, 255, 255, .75);
}
.card.hero .callout b { color: #fff; }
.card.hero .muted, .card.hero .small.muted { color: rgba(255, 255, 255, .78); }
.card.hero .btn {
  background: #fff; color: var(--brand-ink); border: none;
  box-shadow: 0 10px 22px -12px rgba(2, 6, 23, .7);
}
.card.hero .btn.ghost, .card.hero .btn.gray {
  background: rgba(255, 255, 255, .16); color: #fff;
  border: 1px solid rgba(255, 255, 255, .3); box-shadow: none;
}
.card.hero .btn:disabled { background: rgba(255, 255, 255, .2); color: rgba(255, 255, 255, .75); opacity: 1; }

/* =========================================================
   8. 列表
   ========================================================= */
.list { list-style: none; margin: 0; padding: 0; }
.list li {
  border-bottom: 1px solid var(--line-2); padding: 13px 2px;
  display: flex; align-items: center; gap: 11px;
}
.list li:last-child { border-bottom: none; }
.list .grow { flex: 1; min-width: 0; }
.list .name { font-weight: 650; font-size: 14.5px; letter-spacing: .1px; }
.list .meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.list li:active { background: #fafbff; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* =========================================================
   9. 号码卡
   ========================================================= */
.phone-list { list-style: none; margin: 0; padding: 0; }
.phone-list li {
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  padding: 13px 14px; margin-bottom: 10px; background: #fff;
  transition: border-color .18s, background .18s;
}
.phone-list li.done { background: #fafbfe; border-color: var(--line-2); }
.phone-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.phone-no {
  font-size: 18px; font-weight: 700; letter-spacing: 1.2px;
  font-variant-numeric: tabular-nums; color: var(--ink-2);
}
.phone-no.revealed { color: var(--brand-ink); }
.phone-actions { display: flex; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.chip-row { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 11px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 13px; font-size: 12.5px; color: var(--ink-2); font-weight: 600;
  transition: all .15s;
}
.chip.on {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 4px 12px -6px rgba(var(--brand-rgb), .9);
}
.chip.on.empty { background: var(--danger); border-color: var(--danger); box-shadow: none; }
.progressbar { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; margin-top: 11px; }
.progressbar > i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-accent), var(--brand));
  transition: width .35s cubic-bezier(.4, 0, .2, 1);
}

/* =========================================================
   10. 底部导航
   ========================================================= */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
  display: flex; padding: 7px 6px calc(7px + env(safe-area-inset-bottom, 0px));
}
.tabbar button {
  flex: 1; background: none; border: none; padding: 2px 0 3px;
  color: var(--muted-2); font-size: 10.5px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  position: relative;
}
.tabbar button .ic {
  width: 40px; height: 26px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s;
}
.tabbar button svg { width: 21px; height: 21px; display: block; }
.tabbar button.on { color: var(--brand); font-weight: 700; }
.tabbar button.on .ic { background: var(--brand-soft); }
.tabbar .badge-dot { position: absolute; top: 0; left: 50%; margin-left: 8px; }

/* =========================================================
   11. 提示 / 气泡
   ========================================================= */
.toast {
  position: fixed; left: 50%; top: 78px; transform: translateX(-50%);
  background: rgba(15, 23, 42, .95); color: #fff;
  padding: 11px 18px; border-radius: var(--r-md);
  font-size: 13.5px; z-index: 90; max-width: 88vw; text-align: center;
  box-shadow: 0 14px 34px -12px rgba(2, 6, 23, .6);
  animation: toastIn .22s cubic-bezier(.2, .9, .3, 1.2);
  font-weight: 500;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px) scale(.96); } }
.toast.err { background: rgba(190, 18, 60, .96); }
.toast.ok { background: rgba(4, 120, 87, .96); }

.callout {
  border-radius: var(--r-md); padding: 12px 14px; font-size: 13px; line-height: 1.65;
  background: var(--brand-soft); color: var(--brand-ink);
  border-left: 4px solid var(--brand);
}
.callout.warn { background: var(--warn-soft); color: #92400e; border-left-color: var(--warn); }
.callout.danger { background: var(--danger-soft); color: #9f1239; border-left-color: var(--danger); }
.callout.ok { background: var(--ok-soft); color: #047857; border-left-color: var(--ok); }
.callout + .callout { margin-top: 8px; }

/* =========================================================
   12. 模态
   ========================================================= */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  z-index: 60; display: flex; align-items: flex-end; justify-content: center;
  animation: maskIn .2s ease;
}
@keyframes maskIn { from { opacity: 0; } }
.modal {
  background: #fff; width: 100%; max-width: 640px;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  max-height: 88vh; overflow: auto; box-shadow: 0 -10px 40px rgba(2, 6, 23, .2);
  animation: sheetIn .28s cubic-bezier(.2, .9, .3, 1);
}
@keyframes sheetIn { from { transform: translateY(24px); opacity: .4; } }
.modal h3 { margin: 0 0 14px; font-size: 17px; font-weight: 750; letter-spacing: .1px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }
@media (min-width: 700px) {
  .modal-mask { align-items: center; }
  .modal { border-radius: var(--r-xl); max-height: 84vh; }
}

/* =========================================================
   13. 桌面网格 / 表格
   ========================================================= */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-2.wide-left { grid-template-columns: 1.45fr 1fr; }
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
table.data th, table.data td { padding: 11px 10px; text-align: left; border-bottom: 1px solid var(--line-2); }
table.data th {
  color: var(--muted-2); font-weight: 700; font-size: 11.5px;
  letter-spacing: .4px; text-transform: none; background: #fafbfe; white-space: nowrap;
}
table.data th:first-child { border-top-left-radius: var(--r-sm); }
table.data th:last-child { border-top-right-radius: var(--r-sm); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tbody tr { transition: background .15s; }
table.data tbody tr:hover { background: #fafbff; }
table.data tr:last-child td { border-bottom: none; }
.data-emphasis { color: var(--danger); font-weight: 800; }

.tabs {
  display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap;
  background: #eef1f7; padding: 5px; border-radius: 999px; width: fit-content; max-width: 100%;
  overflow-x: auto;
}
.tabs button {
  border: none; background: transparent; border-radius: 999px;
  padding: 9px 17px; font-size: 13.5px; color: var(--muted); font-weight: 650;
  transition: all .18s; white-space: nowrap;
}
.tabs button.on {
  background: #fff; color: var(--brand-ink);
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, .18);
}
.tabs.plain { background: transparent; padding: 0; }
.tabs.plain button { background: #fff; border: 1.5px solid var(--line); color: var(--ink-2); }
.tabs.plain button.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.empty { text-align: center; color: var(--muted); font-size: 13.5px; padding: 30px 12px; line-height: 1.7; }

/* =========================================================
   14. 登录页
   ========================================================= */
#authScreen {
  min-height: 100vh; min-height: 100dvh;
  background: var(--grad); position: relative;
  overflow-x: hidden; overflow-y: auto;
  display: flex; align-items: center; justify-content: center;
}
#authScreen::before {
  content: ''; position: absolute; width: 420px; height: 420px; right: -160px; top: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, 0) 70%);
}
#authScreen::after {
  content: ''; position: absolute; width: 340px; height: 340px; left: -140px; bottom: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 70%);
}
#authScreen .wrap { padding: 0; width: 100%; }
.login-card { position: relative; z-index: 1; max-width: 410px; margin: 0 auto; padding: 30px 20px 40px; }
.brand { text-align: center; margin-bottom: 20px; }
.brand .logo {
  width: 62px; height: 62px; border-radius: 20px; margin: 0 auto 12px;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .32);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; font-size: 27px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px -12px rgba(2, 6, 23, .5);
}
.brand h2 { margin: 0; font-size: 21px; color: #fff; font-weight: 750; letter-spacing: .4px; }
.brand p { margin: 6px 0 0; color: rgba(255, 255, 255, .82); font-size: 13px; }
#authScreen .card { box-shadow: 0 24px 60px -20px rgba(2, 6, 23, .55); padding: 20px; }
#authScreen .tabs { display: flex; width: 100%; margin-bottom: 16px; }
#authScreen .tabs button { flex: 1; }

/* =========================================================
   15. 校长端外壳（侧边栏 + 主区）
   ========================================================= */
.admin-shell { display: block; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; z-index: 30;
  background: var(--grad); color: #fff;
  padding: calc(13px + env(safe-area-inset-top, 0px)) 14px 0;
}
.side-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.side-brand .logo {
  width: 40px; height: 40px; border-radius: 13px; flex: 0 0 auto;
  background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .3);
  color: #fff; font-size: 19px; display: flex; align-items: center; justify-content: center;
}
.side-brand-txt { min-width: 0; }
.side-brand-txt b { display: block; font-size: 15.5px; font-weight: 750; letter-spacing: .3px; }
.side-brand-txt span { display: block; font-size: 11.5px; color: rgba(255, 255, 255, .78); }

.side-nav { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 13px; }
.side-nav::-webkit-scrollbar { display: none; }
.side-nav button {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px;
  padding: 8px 15px; font-size: 13px; font-weight: 650;
  transition: all .18s; white-space: nowrap;
}
.side-nav button svg { width: 16px; height: 16px; }
.side-nav button.on {
  background: #fff; color: var(--brand-ink); border-color: #fff;
  box-shadow: 0 8px 18px -10px rgba(2, 6, 23, .6);
}
.side-foot { display: none; }

.admin-main { padding: 16px 14px calc(40px + env(safe-area-inset-bottom, 0px)); max-width: 1180px; margin: 0 auto; }
.page-head { margin: 2px 2px 14px; }
.page-head h1 { margin: 0; font-size: 21px; font-weight: 780; letter-spacing: -.2px; color: var(--ink); }
.page-sub { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); font-weight: 500; }

@media (min-width: 1024px) {
  .admin-shell { display: grid; grid-template-columns: 246px minmax(0, 1fr); }
  .sidebar {
    position: sticky; top: 0; height: 100vh; padding: 22px 16px;
    background: linear-gradient(180deg, #1e1b4b 0%, #111827 100%);
    display: flex; flex-direction: column; gap: 8px;
  }
  .side-brand { margin-bottom: 20px; padding: 0 4px; }
  .side-brand .logo { width: 42px; height: 42px; background: var(--grad); border: none; }
  .side-nav { flex-direction: column; overflow: visible; padding: 0; gap: 4px; flex: 1; }
  .side-nav button {
    background: transparent; border: none; border-radius: 12px;
    padding: 11px 13px; font-size: 13.5px; width: 100%; justify-content: flex-start;
    color: rgba(255, 255, 255, .7);
  }
  .side-nav button:hover { background: rgba(255, 255, 255, .08); color: #fff; }
  .side-nav button.on {
    background: rgba(255, 255, 255, .13); color: #fff;
    box-shadow: inset 3px 0 0 0 var(--brand-accent); font-weight: 700;
  }
  .side-foot {
    display: block; border-top: 1px solid rgba(255, 255, 255, .1);
    padding-top: 14px; margin-top: 10px;
  }
  .side-user { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
  .side-avatar {
    width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
    background: var(--grad); color: #fff; font-weight: 700; font-size: 15px;
    display: flex; align-items: center; justify-content: center;
  }
  .side-user b { display: block; font-size: 13.5px; color: #fff; font-weight: 650; }
  .side-user span { display: block; font-size: 11.5px; color: rgba(255, 255, 255, .55); }
  .side-foot .btn { background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .85); border: 1px solid rgba(255, 255, 255, .14); box-shadow: none; }
  .side-foot .btn:hover { background: rgba(255, 255, 255, .18); color: #fff; }
  .admin-main { padding: 26px 30px 60px; }
  .page-head { margin-bottom: 18px; }
  .page-head h1 { font-size: 23px; }
  .card { padding: 20px 22px; }
}

/* =========================================================
   16. 话术卡
   ========================================================= */
.script-item {
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  padding: 13px 14px; margin-bottom: 10px; background: #fff;
}
.script-item:last-child { margin-bottom: 0; }
.script-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 8px;
}
.script-title { font-weight: 700; font-size: 14px; color: var(--brand-ink); letter-spacing: .1px; }
.script-body {
  margin: 0; font-size: 13.5px; line-height: 1.75; color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word;
  background: var(--grad-soft); border-radius: var(--r-sm); padding: 11px 12px;
}

/* =========================================================
   17. 今日闯关（游戏化）
   ========================================================= */
.quest-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.quest-score {
  font-size: 26px; font-weight: 800; letter-spacing: -.8px; color: var(--brand-ink);
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.quest-score .small { font-size: 13px; color: var(--muted); font-weight: 600; }
.quest-list { list-style: none; margin: 14px 0 0; padding: 0; }
.quest-list li {
  display: flex; align-items: center; gap: 10px; padding: 9px 0;
  border-bottom: 1px solid var(--line-2); font-size: 13.5px;
}
.quest-list li:last-child { border-bottom: none; }
.quest-list li .qk {
  width: 22px; height: 22px; flex: 0 0 auto; border-radius: 8px;
  border: 1.5px solid var(--line); display: flex; align-items: center;
  justify-content: center; font-size: 13px; color: transparent;
  background: #f8fafc;
}
.quest-list li.done .qk {
  background: linear-gradient(135deg, #34d399, #059669);
  border-color: transparent; color: #fff;
}
.quest-list li.done .qt { color: var(--muted); text-decoration: line-through; }
.quest-list .qt { flex: 1; min-width: 0; font-weight: 600; }
.quest-list .qn { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.quest-list li.done .qn { color: var(--ok); }

.streak {
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1px solid #fed7aa; color: #c2410c;
  padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--grad-soft); border: 1px solid var(--brand-soft-2);
  color: var(--brand-ink); padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
}
.badge.off { background: #f8fafc; border-color: var(--line); color: var(--muted-2); }

/* 过关庆祝 */
.celebrate { text-align: center; padding: 8px 0 2px; position: relative; overflow: hidden; }
.celebrate .em { font-size: 52px; line-height: 1; animation: pop .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); } }
.celebrate h2 { margin: 12px 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.celebrate p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.celebrate .win-num {
  font-size: 40px; font-weight: 800; color: var(--brand); letter-spacing: -1.5px;
  font-variant-numeric: tabular-nums; margin: 6px 0 2px;
}

/* =========================================================
   18. 今日计划
   ========================================================= */
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-badge {
  font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--grad-soft); color: var(--brand-ink); border: 1px solid var(--brand-soft-2);
  white-space: nowrap;
}
.plan-badge.rest { background: #f8fafc; color: var(--muted); border-color: var(--line); }
.plan-meta { display: flex; gap: 9px; margin-top: 13px; }
.plan-meta .m {
  flex: 1; min-width: 0; background: var(--grad-soft);
  border: 1px solid var(--brand-soft-2); border-radius: var(--r-md); padding: 9px 11px;
}
.plan-meta .m .v {
  font-size: 18px; font-weight: 800; color: var(--brand-ink);
  letter-spacing: -.4px; font-variant-numeric: tabular-nums; line-height: 1.25;
}
.plan-meta .m .k { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 13px; }
.plan-cell {
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  padding: 10px 11px; background: #fff; transition: border-color .18s, background .18s;
}
.plan-cell.done { border-color: #a7f3d0; background: linear-gradient(135deg, #f0fdf4, #ecfdf5); }
.pc-label { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.plan-cell.done .pc-label { color: #047857; }
.pc-num { margin-top: 4px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.pc-num b { font-size: 21px; font-weight: 800; color: var(--brand-ink); letter-spacing: -.7px; }
.pc-num span { font-size: 12.5px; color: var(--muted); margin-left: 1px; }
.plan-cell.done .pc-num b { color: var(--ok); }
.pc-sub { font-size: 11px; color: var(--muted-2); margin-top: 5px; font-variant-numeric: tabular-nums; }
.progressbar.sm { height: 5px; margin-top: 7px; }
.plan-note { font-size: 12px; color: var(--muted); margin: 12px 0 0; line-height: 1.65; }

/* =========================================================
   19. 计划任务清单
   ========================================================= */
.task-list { list-style: none; margin: 12px 0 0; padding: 0; }
.task-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--line-2);
}
.task-item:last-child { border-bottom: none; }
.task-item .tk {
  flex: 0 0 auto; width: 24px; height: 24px; margin-top: 1px;
  border-radius: 9px; border: 1.5px solid var(--line); background: #f8fafc;
  color: transparent; font-size: 13px; line-height: 1; display: flex;
  align-items: center; justify-content: center; padding: 0;
}
.task-item.done .tk {
  background: linear-gradient(135deg, #34d399, #059669);
  border-color: transparent; color: #fff;
}
.task-item .grow { flex: 1; min-width: 0; }
.task-item .tt { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.45; }
.task-item.done .tt { color: var(--muted); text-decoration: line-through; }
.task-item .td { display: flex; align-items: center; gap: 7px; margin-top: 3px; flex-wrap: wrap; }
.task-item .tn { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.task-item.done .tn { color: var(--ok); }
.auto-tag {
  font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-ink); border: 1px solid var(--brand-soft-2);
}
.task-item .btn.sm { padding: 5px 9px; font-size: 12px; margin-top: 0; }
.money-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.money-big { font-size: 20px; font-weight: 800; color: var(--brand-ink); letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
