/* ============================================================
   朗齿 · 客户下单中心 — 设计系统
   ============================================================ */
:root {
  --brand: #0f8b7e;
  --brand-2: #12a394;
  --brand-ink: #0a5f57;
  --brand-soft: #e6f5f1;
  --brand-soft-2: #d5efe9;
  --ink: #0f2326;
  --text: #1b3034;
  --sub: #647b81;
  --muted: #8fa1a5;
  --bg: #f3f8f9;
  --surface: #ffffff;
  --surface-2: #f7fbfb;
  --surface-3: #eef5f5;
  --line: #e5edef;
  --line-strong: #d6e3e6;
  --amber: #a96812; --amber-bg: #fdf1da;
  --blue: #2258d6; --blue-bg: #e8efff;
  --purple: #6d35d6; --purple-bg: #f0eaff;
  --cyan: #0b6f88; --cyan-bg: #dff5fb;
  --green: #157a3d; --green-bg: #e2f7e9;
  --red: #bb3a34; --red-bg: #fdecea;
  --gray: #5f7180; --gray-bg: #eef3f5;
  --shadow-xs: 0 1px 2px rgba(15, 35, 38, .04);
  --shadow-sm: 0 4px 16px rgba(15, 35, 38, .05);
  --shadow-md: 0 14px 34px rgba(15, 35, 38, .10);
  --shadow-lg: 0 28px 70px rgba(15, 35, 38, .18);
  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --side: 238px;
  --top: 66px;
  --font: "Segoe UI Variable", "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}
html[data-theme="dark"] {
  --ink: #eaf4f5; --text: #dce9eb; --sub: #9cb1b5; --muted: #7d9397;
  --bg: #0a1416; --surface: #111d20; --surface-2: #152427; --surface-3: #1a2c30;
  --line: #213336; --line-strong: #2b4246;
  --brand-soft: #10322e; --brand-soft-2: #154039; --brand-ink: #8ee0d3; --brand: #2bb3a2;
  --amber-bg: #33280f; --blue-bg: #152445; --purple-bg: #261b3e; --cyan-bg: #0d2f37;
  --green-bg: #12301e; --red-bg: #351817; --gray-bg: #1c2a2e;
  --shadow-xs: 0 1px 2px rgba(0,0,0,.3); --shadow-sm: 0 4px 16px rgba(0,0,0,.28);
  --shadow-md: 0 14px 34px rgba(0,0,0,.4); --shadow-lg: 0 28px 70px rgba(0,0,0,.55);
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --ink: #eaf4f5; --text: #dce9eb; --sub: #9cb1b5; --muted: #7d9397;
    --bg: #0a1416; --surface: #111d20; --surface-2: #152427; --surface-3: #1a2c30;
    --line: #213336; --line-strong: #2b4246;
    --brand-soft: #10322e; --brand-soft-2: #154039; --brand-ink: #8ee0d3; --brand: #2bb3a2;
    --amber-bg: #33280f; --blue-bg: #152445; --purple-bg: #261b3e; --cyan-bg: #0d2f37;
    --green-bg: #12301e; --red-bg: #351817; --gray-bg: #1c2a2e;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: light; }
html[data-theme="dark"], html[data-theme="auto"] { color-scheme: light dark; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }
img, video { max-width: 100%; }
::selection { background: var(--brand-soft-2); color: var(--brand-ink); }
.ic { width: 20px; height: 20px; flex: none; display: block; }
.ic.sm { width: 16px; height: 16px; }
.ic.lg { width: 24px; height: 24px; }
.muted { color: var(--sub); }
.dim { color: var(--muted); }
.brand-text { color: var(--brand); }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.flex { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; } .mb20 { margin-bottom: 20px; }
.fs12 { font-size: 12px; } .fs13 { font-size: 13px; } .fs15 { font-size: 15px; }
.w100 { width: 100%; }

/* ---------- 启动 ---------- */
.boot-splash { min-height: 100vh; display: grid; place-items: center; color: var(--sub); }
.boot-splash .spinner { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 壳层 ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--side); flex: none; position: fixed; inset: 0 auto 0 0; z-index: 40;
  display: flex; flex-direction: column; padding: 18px 13px 14px;
  background: var(--surface); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 18px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, #14ab9c, #0b7167); box-shadow: 0 6px 14px rgba(15,139,126,.24);
}
.brand-mark .ic { width: 23px; height: 23px; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: .2px; color: var(--ink); line-height: 1.25; }
.brand-sub { font-size: 10.5px; color: var(--muted); letter-spacing: .3px; margin-top: 1px; }
.side-scroll { flex: 1; overflow-y: auto; min-height: 0; padding-right: 2px; }
.side-scroll::-webkit-scrollbar { width: 4px; }
.side-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.nav-group { margin: 2px 0 12px; }
.nav-label { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; color: var(--muted); padding: 8px 12px 6px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; margin: 2px 0;
  border-radius: 10px; color: var(--sub); font-size: 13.5px; font-weight: 500; transition: .16s; cursor: pointer;
}
.nav-item .ic { width: 19px; height: 19px; opacity: .92; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 650; }
.nav-item.active .ic { color: var(--brand); }
.nav-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.nav-badge.soft { background: var(--brand-soft-2); color: var(--brand-ink); }
.side-foot { padding-top: 10px; border-top: 1px solid var(--line); position: relative; }
.side-help {
  margin: 0 2px 10px; padding: 12px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-ink);
  font-size: 12px; line-height: 1.5;
}
.side-help b { display: block; font-size: 12.5px; margin-bottom: 2px; }
.side-help a { color: var(--brand-ink); font-weight: 600; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 12px; cursor: pointer; }
.side-user:hover { background: var(--surface-2); }
.side-user-info { min-width: 0; flex: 1; }
.side-user-name { font-size: 13px; font-weight: 650; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-role { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { margin-left: var(--side); width: calc(100% - var(--side)); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--top); flex: none; position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px; padding: 0 28px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar-title { font-size: 15px; font-weight: 650; color: var(--ink); }
.crumb { font-size: 11.5px; color: var(--muted); }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid transparent; background: transparent;
  color: var(--sub); display: inline-grid; place-items: center; cursor: pointer; transition: .15s; position: relative;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .ic { width: 20px; height: 20px; }
.icon-btn.badged::after {
  content: attr(data-count); position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center;
}
.content { padding: 24px 28px 56px; width: 100%; max-width: 1500px; margin: 0 auto; }
.page { animation: rise .32s cubic-bezier(.2,.7,.3,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 移动端导航 ---------- */
.mobile-top { display: none; }
.bottom-nav { display: none; }
.drawer-scrim { display: none; }

/* ---------- 通用控件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px;
  border-radius: 10px; border: 1px solid transparent; font-size: 13.5px; font-weight: 600; color: var(--text);
  background: var(--surface); cursor: pointer; white-space: nowrap; transition: .16s; user-select: none;
}
.btn .ic { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.985); }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.btn.primary { color: #fff; background: linear-gradient(135deg, #13a696, #0b786e); box-shadow: 0 7px 16px rgba(15, 139, 126, .22); }
.btn.primary:hover { box-shadow: 0 9px 20px rgba(15, 139, 126, .3); }
.btn.ghost { border-color: var(--line-strong); background: var(--surface); color: var(--text); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.btn.soft { background: var(--brand-soft); color: var(--brand-ink); }
.btn.soft:hover { background: var(--brand-soft-2); }
.btn.danger { background: var(--red); color: #fff; box-shadow: 0 6px 14px rgba(187,58,52,.2); }
.btn.danger-ghost { color: var(--red); border-color: var(--red-bg); background: var(--red-bg); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn.sm .ic { width: 15px; height: 15px; }
.btn.lg { height: 46px; padding: 0 24px; font-size: 14.5px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.icon { width: 38px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--sub); }
.field-hint { font-size: 11.5px; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; height: 39px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--text); font-size: 13.5px; transition: .16s; outline: none;
}
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.input::placeholder { color: var(--muted); }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input[readonly] { background: var(--surface-2); color: var(--sub); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--sub) 50%), linear-gradient(135deg, var(--sub) 50%, transparent 50%); background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.w-90 { max-width: 90px; } .w-120 { max-width: 120px; } .w-150 { max-width: 150px; } .w-160 { max-width: 160px; }
.w-180 { max-width: 180px; } .w-200 { max-width: 200px; } .w-220 { max-width: 220px; } .w-260 { max-width: 260px; }
.w-320 { max-width: 320px; } .w-auto { max-width: 100%; }
.form-row { display: flex; flex-wrap: wrap; gap: 14px 16px; align-items: flex-end; }
.form-row .field { flex: 0 1 auto; }
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px 16px; }
.form-grid .col-3 { grid-column: span 3; } .form-grid .col-4 { grid-column: span 4; } .form-grid .col-5 { grid-column: span 5; }
.form-grid .col-6 { grid-column: span 6; } .form-grid .col-7 { grid-column: span 7; } .form-grid .col-8 { grid-column: span 8; }
.form-grid .col-12 { grid-column: span 12; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); gap: 2px; }
.seg button { height: 31px; padding: 0 12px; border: 0; background: transparent; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--sub); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--brand-ink); box-shadow: var(--shadow-xs); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-size: 13px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 38px; height: 22px; border-radius: 999px; background: var(--line-strong); transition: .18s; position: relative; flex: none; }
.switch .track::after { content: ''; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: .18s; }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(16px); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--sub); cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650; background: var(--gray-bg); color: var(--gray); white-space: nowrap;
}
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
.chip.lg { height: 28px; padding: 0 11px; font-size: 12.5px; }
.chip.plain { background: transparent; border: 1px solid var(--line-strong); color: var(--sub); }
.tone-amber { background: var(--amber-bg); color: var(--amber); }
.tone-blue { background: var(--blue-bg); color: var(--blue); }
.tone-purple { background: var(--purple-bg); color: var(--purple); }
.tone-cyan { background: var(--cyan-bg); color: var(--cyan); }
.tone-teal { background: var(--brand-soft); color: var(--brand-ink); }
.tone-green { background: var(--green-bg); color: var(--green); }
.tone-red { background: var(--red-bg); color: var(--red); }
.tone-gray { background: var(--gray-bg); color: var(--gray); }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--sub); border: 1px solid var(--line); }
.pill.brand { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); display: inline-block; }
.dot-off { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); display: inline-block; }

.avatar { border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 650; flex: none; width: 36px; height: 36px; font-size: 14px; }
.avatar.av-sm { width: 28px; height: 28px; font-size: 11.5px; }
.avatar.av-xs { width: 22px; height: 22px; font-size: 10px; }
.avatar.av-lg { width: 52px; height: 52px; font-size: 20px; }
.av-teal { background: linear-gradient(145deg, #17b3a2, #0b7a70); }
.av-blue { background: linear-gradient(145deg, #5b8df7, #2955c9); }
.av-purple { background: linear-gradient(145deg, #9a6bf0, #6a35cc); }
.av-amber { background: linear-gradient(145deg, #f0b45a, #c07b17); }
.av-rose { background: linear-gradient(145deg, #ee8b8b, #bf4b4b); }
.av-cyan { background: linear-gradient(145deg, #4bc0d9, #0d7993); }
.av-green { background: linear-gradient(145deg, #5fbd7d, #187d3d); }

/* ---------- 卡片 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.card.pad { padding: 18px 20px; }
.card-head { display: flex; align-items: flex-start; gap: 12px; padding: 17px 20px 0; }
.card-head .grow { min-width: 0; }
.card-title { font-size: 15px; font-weight: 650; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.card-title .ic { width: 18px; height: 18px; color: var(--brand); }
.card-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.card-body { padding: 16px 20px 20px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--sub); }
.card-hover { transition: .18s; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--line-strong); }
.card.tint { background: var(--brand-soft); border-color: transparent; }
.card.plain { box-shadow: none; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.home-grid > *, .grid2 > *, .grid3 > * { min-width: 0; }
.card { min-width: 0; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--brand); text-transform: uppercase; margin-bottom: 4px; }
.page-title { font-size: 23px; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; color: var(--ink); margin: 0; }
.page-sub { margin: 5px 0 0; font-size: 12.8px; color: var(--sub); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section-title { font-size: 14px; font-weight: 650; color: var(--ink); display: flex; align-items: center; gap: 8px; margin: 22px 0 12px; }
.section-title:first-child { margin-top: 0; }

/* ---------- 统计卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.stat-grid.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat-grid.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stat-card {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px 17px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-xs); position: relative; overflow: hidden;
  color: inherit; transition: .18s;
}
a.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--line-strong); }
.stat-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand); }
.stat-ic .ic { width: 19px; height: 19px; }
.stat-ic.tone-amber { background: var(--amber-bg); color: var(--amber); }
.stat-ic.tone-blue { background: var(--blue-bg); color: var(--blue); }
.stat-ic.tone-purple { background: var(--purple-bg); color: var(--purple); }
.stat-ic.tone-green { background: var(--green-bg); color: var(--green); }
.stat-ic.tone-cyan { background: var(--cyan-bg); color: var(--cyan); }
.stat-ic.tone-red { background: var(--red-bg); color: var(--red); }
.stat-main { min-width: 0; }
.stat-label { font-size: 12px; color: var(--sub); font-weight: 500; white-space: nowrap; }
.stat-value { font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; color: var(--ink); margin-top: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-value small { font-size: 13px; font-weight: 600; color: var(--sub); margin-left: 2px; }
.stat-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.stat-trend { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--green); background: var(--green-bg); padding: 2px 7px; border-radius: 6px; }

/* ---------- 首页 hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 24px 26px;
  background: linear-gradient(118deg, #0b6d65 0%, #0f8b7e 47%, #14a291 100%);
  color: #fff; box-shadow: 0 16px 36px rgba(12, 98, 90, .18);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.hero::before { content: ''; position: absolute; width: 330px; height: 330px; border-radius: 50%; right: -80px; top: -160px; border: 1px solid rgba(255,255,255,.18); }
.hero::after { content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%; right: 10px; bottom: -150px; border: 1px solid rgba(255,255,255,.14); }
.hero-tooth { position: absolute; right: 150px; top: 4px; width: 180px; height: 180px; color: rgba(255,255,255,.08); transform: rotate(-12deg); pointer-events: none; }
.hero-tooth .ic { width: 100%; height: 100%; }
.hero-main { position: relative; z-index: 1; min-width: 0; }
.hero-hello { font-size: 12.5px; letter-spacing: .04em; color: rgba(255,255,255,.82); }
.hero-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 3px 0 6px; }
.hero-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: rgba(255,255,255,.86); }
.hero-meta .sep { width: 1px; height: 12px; background: rgba(255,255,255,.35); }
.hero-actions { position: relative; z-index: 1; display: flex; gap: 9px; flex-wrap: wrap; }
.btn.on-hero { background: #fff; color: #0a655c; box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.btn.on-hero-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.hero-notice { position: relative; z-index: 1; margin-top: 14px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); border-radius: 10px; padding: 8px 11px; font-size: 12px; display: flex; gap: 8px; align-items: flex-start; max-width: 660px; }
.hero-notice .ic { width: 15px; height: 15px; margin-top: 1px; flex: none; }

/* ---------- 图表 ---------- */
.chart { position: relative; width: 100%; color: var(--brand); }
.chart-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.bar-chart .bar rect { fill: var(--brand-soft-2); transition: fill .15s; }
.bar-chart .bar.active rect, .bar-chart .bar:hover rect { fill: var(--brand); }
.chart-labels { position: relative; height: 18px; margin-top: 4px; color: var(--muted); font-size: 10.5px; }
.chart-labels span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.chart-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--sub); flex-wrap: wrap; }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 5px; }
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { position: relative; flex: none; }
.donut svg { width: 100%; height: 100%; transform: rotate(0); }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-center b { font-size: 23px; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.donut-center span { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.legend { flex: 1; display: grid; gap: 7px; min-width: 0; }
.legend-row { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--sub); }
.legend-dot { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.legend-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend-val { margin-left: auto; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- 列表 / 表格 ---------- */
.table-wrap { width: 100%; overflow-x: auto; border-radius: var(--r-md); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th {
  text-align: left; font-size: 11.5px; font-weight: 650; color: var(--muted); letter-spacing: .02em;
  padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table th:first-child { border-top-left-radius: 10px; }
.table th:last-child { border-top-right-radius: 10px; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--text); vertical-align: middle; }
.table tbody tr { transition: background .13s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .strong { font-weight: 650; color: var(--ink); }
.table .col-actions { text-align: right; white-space: nowrap; position: sticky; right: 0; z-index: 2; background: var(--surface); box-shadow: -8px 0 10px -10px rgba(15,35,38,.35); }
.table th.col-actions { background: var(--surface-2); z-index: 3; }
.table tbody tr:hover td.col-actions { background: var(--surface-2); }
.table.mini td, .table.mini th { padding: 8px 10px; }
.table .sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.row-link { cursor: pointer; }
.list { display: grid; grid-template-columns: minmax(0, 1fr); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { min-width: 0; }
.list-title { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-side { text-align: right; flex: none; }

/* ---------- 空状态 / 骨架 ---------- */
.empty { padding: 44px 20px; text-align: center; }
.empty-ic { width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.empty-ic .ic { width: 26px; height: 26px; }
.empty-title { font-size: 14px; font-weight: 650; color: var(--ink); }
.empty-desc { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.empty-action { margin-top: 14px; }
.skeleton-wrap { display: grid; gap: 12px; }
.skeleton { border-radius: 14px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.sk-card { height: 92px; }
.sk-line { height: 13px; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- 标签页 ---------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  height: 36px; padding: 0 13px; border-radius: 9px; border: 1px solid transparent; background: transparent;
  color: var(--sub); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.tab:hover { background: var(--surface-2); color: var(--text); }
.tab.on { background: var(--brand-soft); color: var(--brand-ink); border-color: var(--brand-soft-2); }
.tab .n { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 6px; }
.tab.on .n { background: var(--surface); color: var(--brand); }
.tabs.line { gap: 20px; border-bottom: 1px solid var(--line); }
.tabs.line .tab { height: 42px; border-radius: 0; padding: 0 1px; border: 0; border-bottom: 2px solid transparent; background: transparent; }
.tabs.line .tab.on { color: var(--brand-ink); border-bottom-color: var(--brand); background: transparent; }
.filter-bar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.filter-bar .search { position: relative; min-width: 210px; }
.search { position: relative; }
.search > .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); z-index: 1; pointer-events: none; }
.search .input { padding-left: 34px; }
.filter-bar .search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.filter-bar .search .input { padding-left: 34px; }

/* ---------- 订单列表 ---------- */
.order-tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.order-tab { position: relative; height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--sub); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.order-tab::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: transparent; border-radius: 2px; }
.order-tab.on { color: var(--brand-ink); }
.order-tab.on::after { background: var(--brand); }
.order-tab .n { font-size: 11px; background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 1px 6px; }
.order-tab.on .n { background: var(--brand-soft); color: var(--brand); }
.order-cards { display: none; }
.order-card { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 14px; transition: .16s; }
.order-card + .order-card { margin-top: 10px; }
.order-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.order-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.order-no { font-size: 13px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.order-card-mid { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 10px 0 8px; }
.order-patient { font-size: 16px; font-weight: 650; color: var(--ink); }
.order-proj { font-size: 12px; color: var(--sub); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.order-amt { font-size: 17px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.order-card-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--muted); }
.action-menu { position: relative; display: inline-block; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); min-width: 132px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow-md); padding: 5px; z-index: 20; }
.menu button, .menu a { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 9px; border: 0; background: transparent; color: var(--text); font-size: 12.5px; border-radius: 8px; cursor: pointer; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.menu button.danger { color: var(--red); }
.menu .ic { width: 15px; height: 15px; }
.menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }

/* ---------- 详情 ---------- */
.detail-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 20px 22px; }
.detail-no { font-size: 21px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.detail-meta { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; color: var(--sub); font-size: 12.5px; margin-top: 6px; }
.detail-amount { font-size: 26px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 354px; gap: 18px; align-items: start; }
.detail-main, .detail-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.steps { display: flex; align-items: flex-start; padding: 8px 4px 2px; }
.step { flex: 1; position: relative; text-align: center; min-width: 0; }
.step::before { content: ''; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.step:first-child::before { display: none; }
.step.done::before, .step.current::before { background: var(--brand); }
.step-dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; margin: 0 auto 6px; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line); color: var(--muted); }
.step-dot .ic { width: 14px; height: 14px; }
.step.done .step-dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.step.current .step-dot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.step.done .step-dot::after { content: ''; }
.step-label { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.step.done .step-label, .step.current .step-label { color: var(--brand-ink); }
.step-time { font-size: 10px; color: var(--muted); margin-top: 1px; }
.step.cancelled .step-dot { background: var(--red); border-color: var(--red); color: #fff; }

.tooth-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.tooth-chip { min-width: 26px; height: 22px; padding: 0 5px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); color: var(--sub); font-size: 10.5px; font-weight: 650; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.attach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.attach { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--surface-2); cursor: pointer; transition: .15s; }
.attach:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.attach-thumb { height: 92px; display: grid; place-items: center; background: var(--surface-3); color: var(--sub); overflow: hidden; }
.attach-thumb img { width: 100%; height: 100%; object-fit: cover; }
.attach-thumb .ic { width: 26px; height: 26px; }
.attach-info { padding: 7px 9px; }
.attach-name { font-size: 11.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach-sub { font-size: 10px; color: var(--muted); margin-top: 1px; }
.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 5px; bottom: 5px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 15px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -19px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.tl-item.muted .tl-dot { border-color: var(--line-strong); }
.tl-title { font-size: 12.5px; color: var(--text); font-weight: 600; }
.tl-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.kv { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px 12px; font-size: 12.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); word-break: break-all; }
.kv dd.strong { font-weight: 650; color: var(--ink); }
.design-notes { background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: var(--sub); line-height: 1.6; white-space: pre-wrap; }
.alert-box { display: flex; gap: 9px; padding: 10px 12px; border-radius: 10px; background: var(--amber-bg); color: var(--amber); font-size: 12px; line-height: 1.55; }
.alert-box .ic { width: 16px; height: 16px; margin-top: 1px; flex: none; }
.alert-box.info { background: var(--blue-bg); color: var(--blue); }
.alert-box.danger { background: var(--red-bg); color: var(--red); }
.alert-box.ok { background: var(--green-bg); color: var(--green); }

/* ---------- 下单 ---------- */
.catalog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 376px; gap: 18px; align-items: start; }
.catalog-main { min-width: 0; }
.cat-chips { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip { height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--sub); font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.cat-chip .n { font-size: 10px; color: var(--muted); }
.cat-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.cat-chip.on .n { color: rgba(255,255,255,.8); }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(222px, 1fr)); gap: 11px; }
.prod-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; display: flex; flex-direction: column; gap: 8px; transition: .16s; position: relative; }
.prod-card:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.prod-name { font-size: 13.5px; font-weight: 650; color: var(--ink); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.prod-meta { font-size: 11px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.prod-foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: auto; }
.prod-price { font-size: 18px; font-weight: 700; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.prod-price small { font-size: 11px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.prod-add { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--brand-soft-2); background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; cursor: pointer; }
.prod-add:hover { background: var(--brand); color: #fff; }
.prod-add .ic { width: 16px; height: 16px; }
.cart-panel { position: sticky; top: calc(var(--top) + 16px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); overflow: hidden; }
.cart-head { padding: 15px 17px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.cart-body { padding: 13px 17px; }
.cart-items { display: grid; gap: 8px; max-height: 260px; overflow-y: auto; }
.cart-item { display: flex; gap: 9px; padding: 9px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.cart-item-main { flex: 1; min-width: 0; }
.cart-item-name { font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-sub { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.cart-item-amt { font-size: 12.5px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.cart-empty { padding: 26px 10px; text-align: center; color: var(--muted); font-size: 12px; }
.cart-total { display: flex; align-items: flex-end; justify-content: space-between; padding: 14px 0 2px; margin-top: 10px; border-top: 1px dashed var(--line); }
.cart-total-label { font-size: 12px; color: var(--sub); }
.cart-total-val { font-size: 25px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.cart-foot { padding: 12px 17px 16px; border-top: 1px solid var(--line); }
.cart-note { font-size: 10.5px; color: var(--muted); margin-top: 8px; text-align: center; }
.mobile-cart-bar { display: none; }

.tooth-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; max-width: 430px; }
.tooth-quarter { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.tooth-btn { height: 30px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--sub); font-size: 10.5px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.tooth-btn:hover { border-color: var(--brand); color: var(--brand-ink); }
.tooth-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.tooth-legend { font-size: 10.5px; color: var(--muted); text-align: center; margin-top: 6px; }

.upload-zone { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 18px; text-align: center; color: var(--sub); background: var(--surface-2); cursor: pointer; transition: .16s; }
.upload-zone:hover, .upload-zone.drag { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.upload-zone .ic { width: 26px; height: 26px; margin: 0 auto 6px; }
.upload-zone b { font-size: 12.5px; }
.upload-zone span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.up-item { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-size: 11.5px; }
.up-item .grow { min-width: 0; }
.up-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-bar { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.up-bar i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .2s; }

/* ---------- 账单 ---------- */
.bill-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bill-kpi { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.bill-kpi-label { font-size: 11.5px; color: var(--muted); }
.bill-kpi-val { font-size: 21px; font-weight: 700; color: var(--ink); margin-top: 3px; font-variant-numeric: tabular-nums; }
.review-row td { background: var(--surface-2); }
.review-actions { display: flex; gap: 6px; justify-content: flex-end; }
.review-ok { color: var(--green); font-size: 12px; display: inline-flex; gap: 4px; align-items: center; }
.review-dispute { color: var(--red); font-size: 12px; display: inline-flex; gap: 4px; align-items: center; }
.bill-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 20px 22px; }

/* ---------- 聊天 ---------- */
.chat-layout { display: grid; grid-template-columns: 306px minmax(0, 1fr); height: calc(100vh - 152px); min-height: 460px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-xs); }
.thread-panel { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.thread-panel-head { padding: 14px 15px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.thread-list { flex: 1; overflow-y: auto; }
.thread-item { display: flex; gap: 10px; padding: 12px 14px; cursor: pointer; border-bottom: 1px solid var(--line); transition: .13s; }
.thread-item:hover { background: var(--surface-2); }
.thread-item.on { background: var(--brand-soft); }
.thread-item .grow { min-width: 0; }
.thread-name { font-size: 12.8px; font-weight: 650; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.thread-last { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.thread-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.thread-time { font-size: 10px; color: var(--muted); }
.unread-badge { min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.chat-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-head { height: 62px; flex: none; padding: 0 18px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.chat-title { font-size: 13.5px; font-weight: 650; color: var(--ink); }
.chat-head-sub { font-size: 11px; color: var(--muted); margin-top: 1px; display: flex; align-items: center; gap: 6px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px 20px 8px; background: var(--surface-2); min-height: 0; }
.chat-day { text-align: center; font-size: 10.5px; color: var(--muted); margin: 12px 0; }
.msg { display: flex; gap: 9px; margin-bottom: 14px; max-width: 82%; }
.msg.mine { margin-left: auto; flex-direction: row-reverse; }
.msg-body { min-width: 0; }
.msg-name { font-size: 10.5px; color: var(--muted); margin-bottom: 3px; }
.msg.mine .msg-name { text-align: right; }
.bubble { padding: 9px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; line-height: 1.6; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.msg.mine .bubble { background: linear-gradient(135deg, #13a696, #0c7d72); border-color: transparent; color: #fff; }
.msg-time { font-size: 9.5px; color: var(--muted); margin-top: 3px; }
.msg.mine .msg-time { text-align: right; }
.bubble-file { display: flex; align-items: center; gap: 9px; min-width: 170px; padding: 4px 2px; }
.bubble-file .ic { width: 20px; height: 20px; }
.bubble-file b { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.bubble-file span { font-size: 10.5px; opacity: .75; }
.chat-composer { flex: none; border-top: 1px solid var(--line); padding: 10px 14px 12px; background: var(--surface); }
.composer-tools { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.composer-input { display: flex; gap: 8px; align-items: flex-end; }
.composer-input textarea { flex: 1; min-height: 40px; max-height: 120px; padding: 9px 11px; border-radius: 11px; border: 1px solid var(--line-strong); background: var(--surface-2); resize: none; font-size: 13px; line-height: 1.5; outline: none; }
.composer-input textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.typing { font-size: 10.5px; color: var(--brand); height: 14px; padding-left: 2px; }
.typing i { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--brand); margin-right: 3px; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
.chat-empty { display: grid; place-items: center; height: 100%; color: var(--muted); text-align: center; }

/* ---------- 文件 ---------- */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 12px; }
.file-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; cursor: pointer; transition: .16s; }
.file-tile:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.file-tile-thumb { height: 112px; background: var(--surface-3); display: grid; place-items: center; color: var(--sub); overflow: hidden; position: relative; }
.file-tile-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-tile-ic .ic { width: 30px; height: 30px; }
.file-tile-thumb .kind { position: absolute; left: 8px; top: 8px; }
.file-tile-body { padding: 9px 11px; }
.file-tile-name { font-size: 11.8px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-tile-sub { font-size: 10px; color: var(--muted); margin-top: 2px; display: flex; justify-content: space-between; gap: 6px; }
.lightbox { background: #0c1719; border-radius: 12px; display: grid; place-items: center; min-height: 220px; max-height: 70vh; overflow: hidden; }
.lightbox img { max-height: 70vh; object-fit: contain; }
.video-box { background: #0c1719; border-radius: 12px; overflow: hidden; }
.video-box video { width: 100%; max-height: 68vh; display: block; }

/* ---------- EM 录单式：修复项目 + 牙位 ---------- */
.oei-entry { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 14px; align-items: start; }
.oei-left { min-width: 0; position: relative; }
.oei-chart { min-width: 0; }
.prod-combo { position: relative; margin-top: 7px; }
.combo-trigger { width: 100%; height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 13.5px; font-weight: 600; cursor: pointer; text-align: left; }
.combo-trigger:hover { border-color: var(--brand); }
.combo-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-trigger span.placeholder { color: var(--muted); font-weight: 500; }
.combo-trigger .ic { color: var(--muted); flex: none; }
.combo-pop { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; width: 390px; max-width: calc(100vw - 40px); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 9px; }
.combo-search { height: 36px; margin-bottom: 7px; }
.combo-search .input { height: 36px; font-size: 12.5px; }
.combo-options { max-height: 300px; overflow-y: auto; display: grid; gap: 2px; }
.combo-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 8px 9px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; color: var(--ink); }
.combo-option:hover, .combo-option.on { background: var(--brand-soft); }
.combo-opt-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.combo-opt-main b { font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-opt-main small { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-opt-price { flex: none; font-size: 12px; font-weight: 700; color: var(--brand-ink); white-space: nowrap; }
.combo-opt-price small { font-size: 10px; color: var(--muted); font-weight: 500; }
.combo-empty { padding: 18px 10px; text-align: center; color: var(--muted); font-size: 12px; }
.combo-foot { padding: 7px 9px 2px; border-top: 1px solid var(--line); margin-top: 5px; font-size: 10.5px; color: var(--muted); }
.oei-prod-selected { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 10px 11px; border: 1px solid var(--brand-soft-2); background: var(--brand-soft); border-radius: 10px; }
.oei-prod-name { font-size: 13px; font-weight: 650; color: var(--brand-ink); line-height: 1.35; }
.oei-prod-price { flex: none; text-align: right; font-size: 15px; font-weight: 750; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.oei-prod-price small { font-size: 10px; color: var(--sub); font-weight: 500; }
.oei-prod-price .pill { display: flex; margin-top: 4px; font-size: 9px; justify-content: flex-end; }
.oei-prod-empty { margin-top: 10px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.oei-hint { display: flex; gap: 5px; margin-top: 10px; font-size: 10.5px; line-height: 1.55; color: var(--muted); }
.oei-hint .ic { width: 13px; height: 13px; flex: none; margin-top: 1px; }
.tooth-panel { border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-2); padding: 9px; }
.tooth-quadrants { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.tooth-quad { min-width: 0; padding: 6px 7px 7px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.tooth-quad-head { display: flex; align-items: center; justify-content: space-between; gap: 5px; font-size: 10px; color: var(--sub); font-weight: 650; }
.tooth-arch { display: inline-flex; align-items: center; gap: 3px; font-size: 9px; color: var(--muted); font-weight: 500; cursor: pointer; white-space: nowrap; }
.tooth-arch input { width: 11px; height: 11px; accent-color: var(--brand); }
.tooth-cells { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; margin-top: 5px; }
.tooth-cell { height: 25px; min-width: 0; padding: 0; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); color: var(--sub); font-size: 10.5px; font-weight: 650; font-variant-numeric: tabular-nums; cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.tooth-cell:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.tooth-cell.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.tooth-cell.cur { box-shadow: 0 0 0 2px var(--brand-soft-2); }
.tooth-cell.pending { border-style: dashed; border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.tooth-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line-strong); }
.tooth-quick-item { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tooth-quick-item span { font-size: 8.5px; color: var(--muted); white-space: nowrap; }
.tooth-quick-item .input { height: 29px; padding: 3px 6px; font-size: 11px; text-align: center; letter-spacing: .5px; }
.tooth-legend { display: flex; align-items: flex-start; gap: 4px; margin-top: 6px; font-size: 9.5px; color: var(--muted); line-height: 1.5; }
.tooth-legend .ic { width: 12px; height: 12px; flex: none; margin-top: 1px; }
.oei-groups { display: grid; gap: 9px; margin-top: 12px; }
.oei-empty { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 11px; color: var(--muted); background: var(--surface); }
.oei-empty > .ic { width: 22px; height: 22px; color: var(--brand); flex: none; }
.oei-empty b { display: block; color: var(--sub); font-size: 12px; }
.oei-empty span { display: block; margin-top: 2px; font-size: 11px; }
.oei-group { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); padding: 10px 12px; }
.oei-group-head { display: flex; align-items: flex-start; gap: 8px; }
.oei-group-name { font-size: 13px; font-weight: 650; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.oei-group-sub { margin-top: 3px; font-size: 10.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.oei-group-sub .pill { font-size: 9px; }
.oei-group-head .icon-btn { color: var(--muted); }
.oei-group-head .icon-btn:hover { color: var(--red); background: var(--red-bg); }
.oei-teeth { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.tooth-chip { display: inline-flex; align-items: center; gap: 2px; height: 23px; padding: 0 7px; border: 1px solid var(--brand-soft-2); border-radius: 7px; background: var(--brand-soft); color: var(--brand-ink); font-size: 10.5px; font-weight: 650; cursor: pointer; }
.tooth-chip:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }
.tooth-chip .ic { width: 11px; height: 11px; }
.oei-group-fields { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed var(--line); }
.oei-group-fields .field { margin: 0; }
.oei-group-fields .input { height: 32px; font-size: 12px; }
.oei-subtotal { margin-left: auto; display: flex; align-items: baseline; gap: 7px; color: var(--muted); font-size: 10.5px; }
.oei-subtotal b { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 1340px) { .oei-entry { grid-template-columns: 1fr; } .oei-left { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 8px 14px; align-items: start; } .oei-left > .field-label { grid-column: 1; } .oei-left .prod-combo { grid-column: 1; } .oei-left #prodInfo { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; } .oei-left .oei-hint { grid-column: 1 / -1; } .oei-left #clearItems { grid-column: 1; justify-self: start; } }
@media (max-width: 1100px) { .oei-left { display: block; } .oei-left #prodInfo { margin-top: 10px; } }
@media (max-width: 900px) {
  .oei-left { display: block; }
  .oei-left #prodInfo { margin-top: 10px; }
  .oei-left .oei-hint { margin-top: 9px; }
  .tooth-quadrants { grid-template-columns: 1fr; }
  .tooth-cell { height: 30px; font-size: 11px; }
  .tooth-quick { grid-template-columns: 1fr 1fr; }
  .tooth-quick-item span { font-size: 9px; }
  .combo-pop { width: 100%; max-width: none; }
  .oei-group-fields { gap: 7px; }
  .oei-subtotal { width: 100%; margin-left: 0; justify-content: flex-end; padding-top: 2px; }
}

/* ---------- 实时进度 / 发货提醒 ---------- */
.push-tip { display: flex; align-items: center; gap: 11px; padding: 11px 14px; margin-top: 14px; border: 1px solid var(--brand-soft-2); background: var(--brand-soft); border-radius: 13px; }
.push-tip .push-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--brand); flex: none; }
.push-tip b { display: block; font-size: 12.5px; color: var(--brand-ink); }
.push-tip span { font-size: 11.5px; color: var(--sub); }
.live-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; font-size: 12.5px; color: var(--sub); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: livePulse 1.6s ease-out infinite; flex: none; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 var(--green-bg); } 70% { box-shadow: 0 0 0 6px var(--green-bg); } 100% { box-shadow: 0 0 0 0 var(--green-bg); } }
.live-time { font-size: 11px; color: var(--muted); }
.track-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 14px; }
.track-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; transition: .16s; min-width: 0; }
.track-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.track-card.shipped { border-color: var(--cyan-bg); }
.track-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.track-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 10px 0 4px; }
.track-patient { font-size: 16px; font-weight: 650; color: var(--ink); }
.track-proj { font-size: 11.5px; color: var(--sub); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.track-amt { font-size: 17px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.track-steps { display: flex; margin: 12px 0 10px; }
.track-step { flex: 1; text-align: center; position: relative; min-width: 0; }
.track-step::before { content: ''; position: absolute; top: 4px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.track-step:first-child::before { display: none; }
.track-step.done::before, .track-step.cur::before { background: var(--brand); }
.track-step i { position: relative; z-index: 1; display: block; width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); margin: 0 auto 4px; }
.track-step.done i { background: var(--brand); }
.track-step.cur i { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.track-step span { display: block; font-size: 9px; color: var(--muted); white-space: nowrap; }
.track-step.done span, .track-step.cur span { color: var(--brand-ink); }
.track-last { display: flex; align-items: center; gap: 6px; padding: 7px 9px; background: var(--surface-2); border-radius: 8px; font-size: 11.5px; color: var(--sub); }
.track-last .ic { width: 14px; height: 14px; color: var(--brand); flex: none; }
.track-last span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-last time { margin-left: auto; font-size: 10px; color: var(--muted); flex: none; }
.track-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 11px; color: var(--muted); }
.track-foot .ic { width: 13px; height: 13px; }
.track-foot span { display: inline-flex; align-items: center; gap: 4px; }
.track-foot .late { color: var(--red); }
.track-foot .express { color: var(--cyan); }
.track-actions { display: flex; gap: 6px; margin-top: 10px; }
.ship-banner {
  position: fixed; top: 80px; right: 22px; z-index: 150; width: min(400px, calc(100vw - 24px));
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 13px;
  background: var(--surface); border: 1px solid var(--brand); border-radius: 14px; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-8px); transition: .22s;
}
.ship-banner.in { opacity: 1; transform: none; }
.ship-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.ship-title { font-size: 13px; font-weight: 650; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ship-body { font-size: 11.5px; color: var(--sub); margin-top: 2px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-ic.type-ship { background: var(--cyan-bg); color: var(--cyan); }

/* ---------- 团队 / 账号 ---------- */
.split { display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 16px; align-items: start; }
.clinic-list { max-height: calc(100vh - 230px); overflow-y: auto; }
.clinic-item { padding: 11px 13px; border-bottom: 1px solid var(--line); cursor: pointer; transition: .13s; }
.clinic-item:hover { background: var(--surface-2); }
.clinic-item.on { background: var(--brand-soft); }
.clinic-name { font-size: 13px; font-weight: 650; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.clinic-sub { font-size: 11px; color: var(--muted); margin-top: 2px; display: flex; gap: 7px; flex-wrap: wrap; }
.clinic-item .pill { margin-left: auto; }
.inline-form { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr 1fr auto; gap: 8px; align-items: end; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.inline-form .field-label { font-size: 11px; }
.inline-form .input { height: 34px; font-size: 12.5px; }
.inline-form .btn { height: 34px; }
.member-row { display: flex; align-items: center; gap: 11px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.member-row:last-child { border-bottom: 0; }
.member-main { flex: 1; min-width: 0; }
.member-name { font-size: 13px; font-weight: 650; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.member-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.perm-note { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.role-select { height: 30px; padding: 0 8px; font-size: 11.5px; border-radius: 7px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }

/* ---------- 登录 ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.06fr .94fr; background: var(--surface); }
.login-brand { position: relative; overflow: hidden; background: linear-gradient(150deg, #0a625b 0%, #0d7c72 45%, #139b8b 100%); color: #fff; padding: 46px 54px; display: flex; flex-direction: column; }
.login-brand::before { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); right: -180px; top: -160px; }
.login-brand::after { content: ''; position: absolute; width: 360px; height: 360px; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); right: -90px; bottom: -150px; }
.login-logo { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.login-logo .brand-mark { background: rgba(255,255,255,.14); box-shadow: none; }
.login-logo-name { font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.login-logo-sub { font-size: 10.5px; color: rgba(255,255,255,.7); letter-spacing: .12em; margin-top: 1px; }
.login-hero { margin-top: auto; position: relative; z-index: 1; max-width: 470px; }
.login-hero h1 { font-size: 38px; line-height: 1.28; letter-spacing: -.02em; margin: 0 0 14px; font-weight: 700; }
.login-hero h1 em { font-style: normal; color: #b9f2e7; }
.login-hero p { font-size: 14px; line-height: 1.75; color: rgba(255,255,255,.78); margin: 0; }
.login-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin-top: 30px; position: relative; z-index: 1; }
.login-feat { display: flex; gap: 9px; font-size: 12.5px; color: rgba(255,255,255,.85); }
.login-feat .ic { width: 17px; height: 17px; color: #b9f2e7; margin-top: 1px; }
.login-foot { margin-top: auto; padding-top: 30px; position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; font-size: 11px; color: rgba(255,255,255,.55); }
.login-form-side { display: grid; place-items: center; padding: 40px 28px; background: var(--surface); }
.login-card { width: 100%; max-width: 382px; }
.login-title { font-size: 25px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.login-sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.login-tabs { display: inline-flex; gap: 3px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; margin: 22px 0 20px; }
.login-tab { height: 32px; padding: 0 16px; border: 0; background: transparent; border-radius: 8px; font-size: 12.5px; font-weight: 650; color: var(--sub); cursor: pointer; }
.login-tab.on { background: var(--surface); color: var(--brand-ink); box-shadow: var(--shadow-xs); }
.field-ic { position: relative; }
.field-ic .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }
.field-ic .input { height: 44px; padding-left: 38px; border-radius: 11px; }
.login-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 18px; }
.link-btn { border: 0; background: transparent; color: var(--brand); font-size: 12px; font-weight: 600; cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.login-btn { height: 46px; border-radius: 12px; font-size: 14.5px; }
.demo-card { margin-top: 24px; padding: 12px 13px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line-strong); }
.demo-title { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--muted); margin-bottom: 7px; }
.demo-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--sub); padding: 4px 0; }
.demo-row b { color: var(--text); font-weight: 600; }
.demo-row .btn { margin-left: auto; }

/* ---------- 通知 / 下拉 ---------- */
.popover { position: absolute; right: 0; top: calc(100% + 8px); width: 366px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 50; overflow: hidden; }
.popover-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.popover-title { font-size: 13px; font-weight: 650; color: var(--ink); }
.popover-list { max-height: 380px; overflow-y: auto; }
.popover-item { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.popover-item:hover { background: var(--surface-2); }
.popover-item.unread { background: var(--brand-soft); }
.popover-item .grow { min-width: 0; }
.popover-item-title { font-size: 12.5px; font-weight: 600; color: var(--text); }
.popover-item-body { font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.popover-item-time { font-size: 10px; color: var(--muted); flex: none; }
.popover-foot { padding: 9px 14px; text-align: center; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; margin-top: 5px; }
.notif-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.notif-ic .ic { width: 16px; height: 16px; }
.notif-ic.type-order { background: var(--blue-bg); color: var(--blue); }
.notif-ic.type-urge { background: var(--amber-bg); color: var(--amber); }
.notif-ic.type-bill { background: var(--purple-bg); color: var(--purple); }
.notif-ic.type-status { background: var(--brand-soft); color: var(--brand); }
.user-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; }
.user-pop button { display: flex; align-items: center; gap: 9px; width: 100%; height: 36px; border: 0; background: transparent; border-radius: 8px; padding: 0 10px; font-size: 12.5px; color: var(--text); cursor: pointer; }
.user-pop button:hover { background: var(--surface-2); }
.user-pop .ic { width: 16px; height: 16px; color: var(--sub); }

/* ---------- 弹窗 / 提示 ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(8, 24, 26, .5); display: grid; place-items: center; padding: 18px; opacity: 0; transition: opacity .18s; }
.overlay.in { opacity: 1; }
.modal { width: min(520px, 100%); max-height: 88vh; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateY(10px) scale(.985); transition: transform .2s cubic-bezier(.2,.8,.3,1); overflow: hidden; }
.overlay.in .modal { transform: none; }
.modal.modal-sm { width: min(420px, 100%); }
.modal.modal-lg { width: min(820px, 100%); }
.modal.modal-xl { width: min(1040px, 100%); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex: none; }
.modal-head h3 { margin: 0; font-size: 15.5px; font-weight: 650; color: var(--ink); flex: 1; min-width: 0; }
.modal-body { padding: 18px 20px; overflow-y: auto; flex: 1; min-height: 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--line); background: var(--surface); flex: none; }
.confirm-text { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--sub); }
.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; }
.toast-root { position: fixed; right: 20px; top: 18px; z-index: 200; display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 9px 14px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md); font-size: 12.5px; color: var(--text); transform: translateY(-8px); opacity: 0; transition: .22s; }
.toast.in { transform: none; opacity: 1; }
.toast .ic { width: 17px; height: 17px; }
.toast-success .ic { color: var(--green); }
.toast-error .ic { color: var(--red); }
.toast-info .ic { color: var(--blue); }

/* ---------- 设置 ---------- */
.setting-row { display: flex; align-items: flex-start; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--sub); display: grid; place-items: center; flex: none; }
.setting-main { flex: 1; min-width: 0; }
.setting-title { font-size: 13px; font-weight: 650; color: var(--ink); }
.setting-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.setting-side { flex: none; }

/* ---------- 打印 ---------- */
.print-sheet { display: none; }
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .bottom-nav, .mobile-top, .page-actions, .no-print { display: none !important; }
  .main { margin: 0; width: 100%; }
  .content { padding: 0; max-width: none; }
  .print-sheet { display: block; }
  .card { box-shadow: none; border-color: #ccc; }
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1280px) {
  .content { padding: 20px 20px 48px; }
  .topbar { padding: 0 20px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 330px; }
  .stat-grid.g5, .stat-grid.g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  :root { --side: 216px; }
  .home-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { grid-template-columns: 1fr 1fr; align-items: start; }
  .catalog-layout { grid-template-columns: minmax(0, 1fr) 340px; }
  .split { grid-template-columns: 310px minmax(0, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid.g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --top: 56px; }
  .sidebar { transform: translateX(-104%); transition: transform .24s cubic-bezier(.2,.8,.3,1); box-shadow: none; width: 268px; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .drawer-scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(8,24,26,.45); opacity: 0; pointer-events: none; transition: .2s; }
  .drawer-scrim.on { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; width: 100%; }
  .topbar { display: none; }
  .mobile-top {
    display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 14px; position: sticky; top: 0; z-index: 30;
    background: var(--surface); border-bottom: 1px solid var(--line);
  }
  .mobile-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
  .mobile-brand .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .mobile-brand .brand-mark .ic { width: 19px; height: 19px; }
  .mobile-title { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-top .spacer { flex: 1; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(58px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line);
  }
  .bnav { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 10px; font-weight: 600; text-decoration: none; position: relative; }
  .bnav .ic { width: 21px; height: 21px; }
  .bnav.on { color: var(--brand); }
  .bnav .nb { position: absolute; top: 6px; left: 50%; margin-left: 6px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 999px; background: var(--red); color: #fff; font-size: 9px; display: grid; place-items: center; }
  .content { padding: 16px 14px calc(84px + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom: 14px; }
  .page-title { font-size: 21px; }
  .page-sub { font-size: 12px; }
  .page-actions { width: 100%; justify-content: flex-end; }
  .page-actions .btn { flex: 1; }
  .page-actions .btn.ghost { flex: 0 0 auto; }
  .hero { padding: 19px 18px; border-radius: 18px; flex-direction: column; align-items: stretch; gap: 14px; }
  .hero-title { font-size: 22px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }
  .hero-notice { max-width: none; background: rgba(255,255,255,.12); }
  .hero-tooth { display: none; }
  .stat-grid, .stat-grid.g5, .stat-grid.g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 13px; gap: 9px; }
  .stat-value { font-size: 21px; }
  .stat-ic { width: 33px; height: 33px; border-radius: 9px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .detail-side { grid-template-columns: 1fr; }
  .card-head { padding: 14px 15px 0; }
  .card-body { padding: 13px 15px 16px; }
  .card.pad { padding: 15px; }
  .catalog-layout { grid-template-columns: 1fr; }
  .cart-panel { display: none; }
  .mobile-cart-bar { display: none; position: fixed; left: 12px; right: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 35; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 9px 11px; align-items: center; gap: 10px; }
  .mobile-cart-bar.has-items { display: flex; }
  .mobile-cart-bar .grow { min-width: 0; }
  .mobile-cart-bar .mcb-label { font-size: 10px; color: var(--muted); }
  .mobile-cart-bar .mcb-val { font-size: 17px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
  .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .prod-card { padding: 11px; }
  .prod-name { font-size: 12.5px; min-height: 36px; }
  .prod-price { font-size: 16px; }
  .split { grid-template-columns: 1fr; }
  .clinic-list { max-height: 320px; border: 1px solid var(--line); border-radius: 12px; }
  .inline-form { grid-template-columns: 1fr 1fr; }
  .inline-form .btn { grid-column: span 2; }
  .form-grid .col-3, .form-grid .col-4, .form-grid .col-5, .form-grid .col-6, .form-grid .col-7, .form-grid .col-8 { grid-column: span 12; }
  .form-grid .col-6.half { grid-column: span 6; }
  .form-row .field { flex: 1 1 150px; }
  .form-row .field .input { width: 100%; }
  .member-row { flex-wrap: wrap; align-items: flex-start; gap: 10px; }
  .member-row .member-main { flex: 1 1 calc(100% - 56px); }
  .member-row > .member-sub { min-width: 0 !important; display: none; }
  .member-row .btn-group { flex: 1 1 100%; justify-content: flex-end; }
  .table-wrap { overflow-x: auto; }
  .order-cards { display: block; }
  .order-table-wrap { display: none; }
  .order-tabs { margin-left: 0; margin-right: 0; padding: 0; flex-wrap: wrap; gap: 6px; border-bottom: 0; margin-bottom: 12px; overflow: visible; }
  .order-tab { padding: 0 10px; font-size: 12.5px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
  .order-tab::after { display: none; }
  .order-tab.on { background: var(--brand-soft); border-color: var(--brand-soft-2); }
  .cat-chips { flex-wrap: wrap; overflow: visible; }
  .steps { overflow: visible; padding: 6px 0 2px; }
  .step { min-width: 0; }
  .step-dot { width: 24px; height: 24px; margin-bottom: 4px; }
  .step-dot .ic { width: 12px; height: 12px; }
  .step-label { font-size: 10px; }
  .step-time { font-size: 9px; }
  .bill-table-wrap { display: none; }
  .tooth-picker { grid-template-columns: 1fr; max-width: 100%; gap: 5px; }
  .tooth-quarter { gap: 3px; }
  .tooth-btn { height: 28px; font-size: 10px; }
  .detail-hero { padding: 16px; }
  .detail-no { font-size: 18px; }
  .detail-amount { font-size: 22px; }
  .chat-layout { grid-template-columns: 1fr; height: calc(100vh - 132px); border-radius: 14px; }
  .thread-panel { border-right: 0; }
  .chat-layout.has-thread .thread-panel { display: none; }
  .chat-layout:not(.has-thread) .chat-panel { display: none; }
  .chat-mobile-back { display: inline-grid !important; }
  .chat-msgs { padding: 14px 12px 6px; }
  .msg { max-width: 90%; }
  .chat-composer { padding: 8px 10px 10px; }
  .track-grid { grid-template-columns: 1fr; }
  .track-card { padding: 12px 13px; }
  .track-proj { max-width: 200px; }
  .track-step span { font-size: 9px; }
  .live-bar .fs12.muted { display: none; }
  .ship-banner { top: 62px; left: 12px; right: 12px; width: auto; }
  .push-tip { align-items: flex-start; }
  .push-tip .btn { flex: none; }
  .popover { position: fixed; left: 12px; right: 12px; top: 60px; width: auto; }
  .modal { width: 100%; max-height: 92vh; border-radius: 16px; }
  .modal-sheet { align-self: end; border-radius: 18px 18px 0 0; max-height: 88vh; }
  .overlay:has(.modal-sheet) { place-items: end center; padding: 0; }
  .toast-root { left: 12px; right: 12px; top: 10px; }
  .toast { width: 100%; }
  .login-page { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-form-side { padding: 26px 20px; align-items: start; }
  .login-card { max-width: 430px; margin: 0 auto; }
  .login-mobile-brand { display: flex !important; align-items: center; gap: 10px; margin-bottom: 26px; }
  .login-title { font-size: 23px; }
  .file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .file-tile-thumb { height: 96px; }
  .bill-summary { grid-template-columns: 1fr; }
  .donut-wrap { flex-direction: column; align-items: flex-start; }
  .attach-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline { padding-left: 16px; }
  .member-row { flex-wrap: wrap; }
  .member-row .role-select { margin-left: 0; }
}
@media (min-width: 901px) {
  .login-mobile-brand { display: none; }
  .chat-mobile-back { display: none !important; }
}
@media (max-width: 900px) {
  .order-items { display: block; border-collapse: separate; }
  .order-items thead { display: none; }
  .order-items tbody { display: block; }
  .order-items tr { display: block; border: 1px solid var(--line); border-radius: 11px; padding: 9px 11px; margin-bottom: 8px; background: var(--surface); }
  .order-items tr:last-child { margin-bottom: 0; }
  .order-items td { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border: 0; padding: 3px 0; text-align: right; }
  .order-items td::before { content: attr(data-label); color: var(--muted); font-size: 11px; flex: none; text-align: left; }
  .order-items td:first-child { display: block; text-align: left; border-bottom: 1px dashed var(--line); padding-bottom: 7px; margin-bottom: 5px; }
  .order-items td:first-child::before { display: none; }
}
@media (max-width: 420px) {
  .stat-grid, .stat-grid.g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-label { font-size: 11px; }
  .stat-value { font-size: 19px; }
  .prod-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions { width: 100%; }
  .form-row .field { width: 100%; max-width: none; }
}
