/* GCP 机构办质控预约系统 · 设计系统 */
:root {
  --bg: #f3f7fc;
  --bg-2: #e9f1fa;
  --surface: #ffffff;
  --ink: #12253c;
  --ink-2: #3d5570;
  --muted: #74879d;
  --line: #e2eaf3;
  --brand: #1f4e79;
  --brand-2: #2e75b6;
  --brand-3: #4a9ad4;
  --sky: #e8f2fb;
  --ok: #1b7f5a;
  --ok-bg: #e6f6ef;
  --warn: #a86a00;
  --warn-bg: #fff5e0;
  --danger: #b83a2e;
  --danger-bg: #fdeceb;
  --info-bg: #eaf2fb;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(23, 61, 105, 0.08);
  --shadow-sm: 0 2px 10px rgba(23, 61, 105, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--brand-2); text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, h4, p { margin: 0; }
input, select, textarea { font-family: inherit; font-size: 15px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c9d6e4; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 外层布局 ---------------- */
#app { min-height: 100vh; }
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.shell-main { flex: 1; padding: 18px 16px 96px; max-width: 760px; margin: 0 auto; width: 100%; }
.shell-main.wide { max-width: 1180px; }
.shell-main.admin { padding-bottom: 40px; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(120deg, #1b4569 0%, #2e75b6 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(22, 59, 98, 0.18);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: rgba(255, 255, 255, 0.18);
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px; letter-spacing: .5px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.brand-text { min-width: 0; }
.brand-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 11px; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-user { display: flex; align-items: center; gap: 8px; font-size: 13px; opacity: .95; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .35);
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
}
.icon-btn {
  border: 0; background: rgba(255, 255, 255, .14); color: #fff;
  width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 16px;
  display: grid; place-items: center;
}
.icon-btn:active { background: rgba(255, 255, 255, .28); }

/* 移动端底部导航 */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 0; font-size: 11px; color: var(--muted); border-radius: 12px;
}
.tabbar a .ti { font-size: 19px; line-height: 1; }
.tabbar a.active { color: var(--brand); font-weight: 600; background: var(--sky); }

/* 管理端布局 */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { display: none; }
.side-nav { display: none; }

/* ---------------- 通用组件 ---------------- */
.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid rgba(226, 234, 243, .9);
  padding: 16px;
}
.card + .card { margin-top: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-title { font-size: 15px; font-weight: 650; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.card-title::before {
  content: ""; width: 4px; height: 15px; border-radius: 4px;
  background: linear-gradient(180deg, var(--brand-2), var(--brand-3));
}
.card-sub { font-size: 12px; color: var(--muted); }
.section-title { font-size: 13px; font-weight: 600; color: var(--muted); margin: 18px 2px 8px; letter-spacing: .3px; }

.btn {
  appearance: none; border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 550;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform .08s, background .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(46, 117, 182, .28);
}
.btn-primary:hover { background: linear-gradient(120deg, #1a4568 0%, #2868a4 100%); }
.btn-ghost { background: var(--sky); color: var(--brand); border-color: transparent; }
.btn-ghost:hover { background: #dcebf8; }
.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 20px; font-size: 16px; border-radius: 14px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 550; white-space: nowrap;
}
.pill-pending { background: var(--warn-bg); color: var(--warn); }
.pill-approved { background: var(--info-bg); color: var(--brand-2); }
.pill-checked_in { background: var(--ok-bg); color: var(--ok); }
.pill-checked_out { background: #eef2f6; color: #4a6076; }
.pill-rejected { background: var(--danger-bg); color: var(--danger); }
.pill-cancelled { background: #f0f2f5; color: #7c8ea1; }
.pill-no_show { background: var(--danger-bg); color: var(--danger); }

.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.input, .select, .textarea {
  width: 100%; padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--line); background: #fbfdff; color: var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand-3); background: #fff;
  box-shadow: 0 0 0 3px rgba(74, 154, 212, .16);
}
.textarea { min-height: 84px; resize: vertical; }
.form-grid { display: grid; gap: 0 14px; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 8px 14px; border-radius: 999px; font-size: 13.5px; cursor: pointer;
  transition: all .15s; user-select: none;
}
.chip.on {
  background: var(--sky); color: var(--brand); border-color: #bcd8ee; font-weight: 600;
  box-shadow: inset 0 0 0 1px #bcd8ee;
}

.empty { text-align: center; padding: 34px 12px; color: var(--muted); font-size: 13.5px; }
.empty .emo { font-size: 34px; display: block; margin-bottom: 8px; opacity: .8; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.flex-2 { display: grid; gap: 12px; }
@media (min-width: 900px) { .flex-2 { grid-template-columns: 1.15fr .85fr; align-items: start; } }

/* 通知条 */
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: linear-gradient(120deg, #fff8e6, #fffdf7);
  border: 1px solid #f4e3bd; border-left: 4px solid #f0b429;
  color: #7a5410; border-radius: 12px; padding: 11px 13px; font-size: 13px;
}

/* ---------------- 登录 / 注册 ---------------- */
.auth { min-height: 100vh; display: grid; background: var(--bg); }
@media (min-width: 960px) { .auth { grid-template-columns: 1.05fr .95fr; } }
.auth-hero {
  display: none; position: relative; overflow: hidden;
  background: linear-gradient(150deg, #143853 0%, #1f4e79 45%, #2e75b6 100%);
  color: #fff; padding: 56px 54px;
}
@media (min-width: 960px) { .auth-hero { display: flex; flex-direction: column; justify-content: center; } }
.auth-hero::after {
  content: ""; position: absolute; inset: auto -120px -160px auto;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%);
}
.auth-hero h1 { font-size: 30px; line-height: 1.35; font-weight: 700; letter-spacing: .5px; }
.auth-hero p { margin-top: 14px; font-size: 14.5px; line-height: 1.9; color: rgba(255, 255, 255, .82); max-width: 460px; }
.hero-points { margin-top: 30px; display: grid; gap: 12px; }
.hero-point { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: rgba(255, 255, 255, .92); }
.hero-point i {
  width: 26px; height: 26px; border-radius: 8px; flex: none; font-style: normal;
  background: rgba(255, 255, 255, .16); display: grid; place-items: center; font-size: 13px;
}
.hero-foot { margin-top: 40px; font-size: 12px; color: rgba(255, 255, 255, .55); }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 28px 18px 40px; }
.auth-box { width: 100%; max-width: 430px; }
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-logo .mark {
  width: 46px; height: 46px; border-radius: 14px; color: #fff; font-weight: 700;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; font-size: 17px; box-shadow: 0 8px 20px rgba(46, 117, 182, .3);
}
.auth-logo h2 { font-size: 19px; font-weight: 700; }
.auth-logo span { font-size: 12.5px; color: var(--muted); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--sky); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.auth-tabs button {
  border: 0; background: transparent; padding: 9px; border-radius: 9px;
  font-size: 14px; color: var(--ink-2); cursor: pointer; font-weight: 550;
}
.auth-tabs button.on { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }
.auth-card { background: #fff; border-radius: 20px; padding: 22px; box-shadow: var(--shadow); border: 1px solid rgba(226, 234, 243, .8); }
.auth-foot { margin-top: 16px; text-align: center; font-size: 13px; color: var(--muted); }
.auth-demo { margin-top: 14px; font-size: 12px; color: var(--muted); background: #f7fafd; border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; }

/* ---------------- 首页 ---------------- */
.hello { padding: 6px 2px 14px; }
.hello h2 { font-size: 21px; font-weight: 700; letter-spacing: .3px; }
.hello p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.hero-card {
  position: relative; overflow: hidden; border-radius: 20px; color: #fff; padding: 20px;
  background: linear-gradient(135deg, #1b4569 0%, #2e75b6 70%, #4a9ad4 100%);
  box-shadow: 0 14px 30px rgba(31, 78, 121, .28);
}
.hero-card::after {
  content: ""; position: absolute; width: 220px; height: 220px; right: -80px; top: -90px;
  border-radius: 50%; background: rgba(255, 255, 255, .12);
}
.hero-card .tag { font-size: 12px; opacity: .82; letter-spacing: .5px; }
.hero-card h3 { margin: 6px 0 2px; font-size: 20px; font-weight: 700; }
.hero-card .meta { font-size: 13px; opacity: .9; }
.hero-card .actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.hero-card .btn { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); color: #fff; }
.hero-card .btn.solid { background: #fff; color: var(--brand); border-color: #fff; }
.code-badge {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .14); border: 1px dashed rgba(255, 255, 255, .5);
  padding: 7px 12px; border-radius: 10px; font-size: 13px; letter-spacing: .5px;
}
.code-badge b { font-size: 18px; letter-spacing: 3px; font-family: ui-monospace, monospace; }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.quick {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 6px 11px; text-align: center; color: var(--ink-2);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 12px; box-shadow: var(--shadow-sm); cursor: pointer;
}
.quick .qi {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  font-size: 18px; background: var(--sky); color: var(--brand);
}
.quick:nth-child(2) .qi { background: #e7f5ef; color: var(--ok); }
.quick:nth-child(3) .qi { background: #fff4e0; color: var(--warn); }
.quick:nth-child(4) .qi { background: #f0ecfb; color: #6a52b8; }
.quick:active { transform: scale(.98); }

.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.stat-cell { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; }
.stat-cell b { display: block; font-size: 20px; font-weight: 700; color: var(--brand); line-height: 1.3; }
.stat-cell span { font-size: 11.5px; color: var(--muted); }

.appt-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 14px; display: flex; gap: 12px; align-items: flex-start;
  box-shadow: var(--shadow-sm); cursor: pointer;
}
.appt-card + .appt-card { margin-top: 10px; }
.appt-date {
  flex: none; width: 54px; text-align: center; border-radius: 11px; padding: 6px 4px;
  background: var(--sky); color: var(--brand);
}
.appt-date b { display: block; font-size: 18px; line-height: 1.2; }
.appt-date span { font-size: 11px; }
.appt-body { min-width: 0; flex: 1; }
.appt-title { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.appt-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; }
.chev { color: #b6c5d4; font-size: 18px; align-self: center; }

/* 日历 */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-title { font-size: 16px; font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-wd { text-align: center; font-size: 11.5px; color: var(--muted); padding-bottom: 2px; }
.cal-day {
  position: relative; aspect-ratio: 1 / 1; border-radius: 11px; border: 1px solid transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 14px; color: var(--ink-2); background: #f8fbfe; cursor: pointer; user-select: none;
}
.cal-day.muted { color: #c3cfdb; background: transparent; cursor: default; }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--brand-3); }
.cal-day.has { background: #fff; border-color: #d7e6f4; }
.cal-day.has.weekend { border-color: #f0dfb8; }
.cal-day.on { background: linear-gradient(140deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; }
.cal-day.full { opacity: .45; cursor: not-allowed; }
.cal-day .dot {
  width: 5px; height: 5px; border-radius: 50%; background: #46b37e;
}
.cal-day.on .dot { background: #fff; }
.cal-day .left { font-size: 9.5px; color: var(--muted); line-height: 1; }
.cal-day.on .left { color: rgba(255, 255, 255, .85); }
.cal-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); margin-top: 10px; }
.cal-legend i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; margin-right: 4px; }

.slot-list { display: grid; gap: 10px; }
.slot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px; background: #fff;
  cursor: pointer;
}
.slot.on { border-color: var(--brand-3); box-shadow: 0 0 0 3px rgba(74, 154, 212, .14); background: #f8fcff; }
.slot.disabled { opacity: .5; cursor: not-allowed; }
.slot b { font-size: 14.5px; }
.slot .st { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.slot .left-badge { font-size: 12px; color: var(--ok); background: var(--ok-bg); padding: 3px 9px; border-radius: 999px; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stepper button { border: 0; background: #f4f8fc; width: 40px; height: 40px; font-size: 18px; color: var(--brand); cursor: pointer; }
.stepper span { width: 46px; text-align: center; font-weight: 600; }

/* 我的预约 */
.seg { display: flex; gap: 6px; overflow-x: auto; padding: 2px; margin-bottom: 12px; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 7px 13px; border-radius: 999px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.seg button.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.timeline { display: grid; gap: 14px; margin-top: 6px; }
.tl-item { display: flex; gap: 12px; }
.tl-dot { width: 11px; height: 11px; border-radius: 50%; background: #cddbe8; margin-top: 5px; flex: none; position: relative; }
.tl-item:not(:last-child) .tl-dot::after {
  content: ""; position: absolute; left: 5px; top: 14px; width: 1.5px; height: 32px; background: var(--line);
}
.tl-item.done .tl-dot { background: var(--ok); }
.tl-item.now .tl-dot { background: var(--brand-2); box-shadow: 0 0 0 4px rgba(46, 117, 182, .16); }
.tl-item.bad .tl-dot { background: var(--danger); }
.tl-body b { font-size: 13.5px; font-weight: 600; }
.tl-body p { font-size: 12.5px; color: var(--muted); }

.kv { display: grid; grid-template-columns: 92px 1fr; gap: 9px 10px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); word-break: break-all; }

.big-code {
  text-align: center; padding: 16px; border-radius: 14px;
  background: linear-gradient(140deg, #f2f8ff, #e9f3fc); border: 1px dashed #b9d6ec;
}
.big-code b { font-size: 30px; letter-spacing: 8px; color: var(--brand); font-family: ui-monospace, monospace; }
.big-code span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 管理端 */
.sidebar {
  width: 226px; flex: none; background: linear-gradient(180deg, #173c5c 0%, #1f4e79 60%, #245a8a 100%);
  color: #fff; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
@media (min-width: 1000px) { .sidebar { display: block; } }
.side-brand { display: flex; gap: 10px; align-items: center; padding: 4px 6px 18px; }
.side-brand .mark {
  width: 36px; height: 36px; border-radius: 11px; background: rgba(255, 255, 255, .16);
  display: grid; place-items: center; font-weight: 700; border: 1px solid rgba(255, 255, 255, .2);
}
.side-brand b { display: block; font-size: 14px; }
.side-brand span { font-size: 10.5px; opacity: .65; }
.side-group { font-size: 10.5px; letter-spacing: 1px; color: rgba(255, 255, 255, .45); padding: 14px 10px 6px; }
.side-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px;
  color: rgba(255, 255, 255, .82); font-size: 13.5px; margin-bottom: 2px;
}
.side-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side-link.on { background: rgba(255, 255, 255, .16); color: #fff; font-weight: 600; }
.side-link .badge {
  margin-left: auto; background: #f0b429; color: #3d2a00; font-size: 11px;
  border-radius: 999px; padding: 0 7px; font-weight: 700;
}
.side-foot { margin-top: 18px; padding: 10px; font-size: 11px; color: rgba(255, 255, 255, .45); }

.admin-body { flex: 1; min-width: 0; }
.admin-top {
  position: sticky; top: 0; z-index: 20; background: rgba(243, 247, 252, .92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.admin-top h1 { font-size: 17px; font-weight: 700; }
.admin-top .sub { font-size: 12px; color: var(--muted); }
.admin-main { padding: 16px 16px 48px; max-width: 1240px; }
.mobile-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 57px; z-index: 19; }
.mobile-tabs a { white-space: nowrap; font-size: 13px; padding: 6px 12px; border-radius: 999px; background: #f2f7fc; color: var(--ink-2); }
.mobile-tabs a.on { background: var(--brand); color: #fff; }
@media (min-width: 1000px) { .mobile-tabs { display: none; } }

.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .kpi-grid.six { grid-template-columns: repeat(6, 1fr); } }
.kpi {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.kpi .lab { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi b { display: block; font-size: 26px; font-weight: 700; color: var(--brand); line-height: 1.35; margin-top: 4px; }
.kpi .sub { font-size: 11.5px; color: var(--muted); }
.kpi.accent { background: linear-gradient(140deg, #1f4e79, #2e75b6); border-color: transparent; color: #fff; }
.kpi.accent b, .kpi.accent .lab, .kpi.accent .sub { color: #fff; }
.kpi.accent .lab { opacity: .85; }
.kpi.warn b { color: var(--warn); }

.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 760px; }
table.tb th {
  text-align: left; font-weight: 600; font-size: 12px; color: var(--muted);
  background: #f7fafd; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tb td { padding: 11px 12px; border-bottom: 1px solid #eef3f8; vertical-align: middle; }
table.tb tr:last-child td { border-bottom: 0; }
table.tb tr:hover td { background: #fbfdff; }
.tb-name { font-weight: 600; }
.tb-sub { font-size: 11.5px; color: var(--muted); }

.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 108px 1fr 44px; gap: 10px; align-items: center; font-size: 12.5px; }
.bar-row .k { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 8px; background: #eef4fa; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-2), var(--brand-3)); }
.bar-row .v { text-align: right; color: var(--muted); }

.day-list { display: grid; gap: 10px; }
.day-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.day-row .d { width: 52px; text-align: center; font-size: 12px; color: var(--muted); flex: none; }
.day-row .d b { display: block; font-size: 17px; color: var(--ink); }
.day-row .info { flex: 1; min-width: 0; font-size: 13px; }
.day-row.closed { background: #fafbfd; }

/* 弹窗 / 提示 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16, 34, 53, .45); z-index: 90;
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
  animation: fade .16s ease;
}
@media (min-width: 640px) { .modal-mask { align-items: center; padding: 20px; } }
.modal {
  background: #fff; width: 100%; max-width: 480px; border-radius: 20px 20px 0 0;
  padding: 20px; box-shadow: 0 -10px 40px rgba(16, 34, 53, .2); animation: slideup .2s ease;
  max-height: 90vh; overflow-y: auto;
}
@media (min-width: 640px) { .modal { border-radius: 18px; } }
.modal h3 { font-size: 16px; margin-bottom: 12px; }
.modal-foot { display: flex; gap: 10px; margin-top: 18px; }
.modal-foot .btn { flex: 1; }
@keyframes fade { from { opacity: 0; } }
@keyframes slideup { from { transform: translateY(20px); opacity: .6; } }

.toast-wrap { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: calc(100% - 32px); max-width: 420px; }
.toast {
  background: rgba(18, 37, 60, .94); color: #fff; font-size: 13.5px;
  padding: 11px 15px; border-radius: 12px; box-shadow: 0 10px 26px rgba(0, 0, 0, .2);
  display: flex; gap: 8px; align-items: flex-start; animation: toastin .2s ease;
}
.toast.ok { background: linear-gradient(120deg, #1b7f5a, #24a173); }
.toast.err { background: linear-gradient(120deg, #a83a2e, #c0503f); }
@keyframes toastin { from { transform: translateY(-8px); opacity: 0; } }

.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 46px 0; color: var(--muted); font-size: 13px; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #d5e5f3; border-top-color: var(--brand-2); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 桌面端外部端视图 */
@media (min-width: 900px) {
  .shell-main:not(.admin) { padding-top: 26px; }
  .desk-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; align-items: start; }
}
@media (max-width: 899px) {
  .tabbar { display: grid; }
}
@media (min-width: 900px) {
  .tabbar { display: none; }
  .shell-main { padding-bottom: 40px; }
}
