/* ============================================================
   客诉通 · Design System
   暖纸色底 + 深松绿主色 + 陶土橙强调色
   ============================================================ */
:root {
  --ink: #17211f;
  --ink-2: #33413d;
  --muted: #6b7873;
  --faint: #98a39f;
  --bg: #f4f1e9;
  --bg-deep: #ece7db;
  --surface: #fffdf8;
  --surface-2: #faf7f0;
  --surface-3: #f3efe5;
  --line: #e3ddd2;
  --line-strong: #d2c9ba;
  --brand: #0d6b5c;
  --brand-deep: #084f44;
  --brand-ink: #0a302a;
  --brand-soft: #e2f1ec;
  --brand-tint: #f0f8f5;
  --accent: #d9773f;
  --accent-deep: #b75c2a;
  --accent-soft: #fdf0e7;
  --danger: #b9403a;
  --danger-soft: #fdecea;
  --warning: #9a6508;
  --warning-soft: #fdf1cd;
  --blue: #1d6fa5;
  --blue-soft: #e8f3fa;
  --shadow-sm: 0 1px 2px rgba(23, 33, 31, .04), 0 5px 14px rgba(23, 33, 31, .05);
  --shadow-md: 0 14px 44px rgba(23, 33, 31, .09);
  --shadow-lg: 0 30px 90px rgba(23, 33, 31, .14);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar: 234px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
::selection { background: #c9e7dd; color: var(--brand-ink); }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid rgba(13, 107, 92, .28);
  outline-offset: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------- 基础组件 */
.brand-lockup { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: grid; place-items: center; color: #fff;
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,.25), transparent 42%),
    linear-gradient(145deg, #12806d, #084f44);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 6px 16px rgba(8,79,68,.24);
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 16px; font-weight: 750; letter-spacing: .01em; }
.brand-sub { font-size: 10.5px; letter-spacing: .16em; color: var(--muted); text-transform: uppercase; margin-top: 3px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 650; font-size: 14px; line-height: 1; white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary {
  color: #fff; background: var(--brand); border-color: var(--brand);
  box-shadow: 0 8px 20px rgba(13, 107, 92, .2);
}
.btn-primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.btn-accent {
  color: #fff; background: var(--accent); border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(217, 119, 63, .2);
}
.btn-accent:hover { background: var(--accent-deep); }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: transparent; }
.btn-ghost:hover { background: rgba(23,33,31,.06); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: #f3c7c3; }
.btn-danger:hover { background: #fbdcd9; }
.btn-sm { min-height: 34px; padding: 0 12px; border-radius: 9px; font-size: 12.5px; }
.btn-lg { min-height: 52px; padding: 0 24px; border-radius: 14px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .58; pointer-events: none; }
.btn.is-loading::after {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface); display: inline-grid; place-items: center; color: var(--ink-2);
  transition: .16s ease;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }
.icon-btn svg { width: 18px; height: 18px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 25px; padding: 0 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .01em;
  white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.no-dot::before { display: none; }
.status-pending { color: var(--warning); background: var(--warning-soft); }
.status-processing { color: var(--blue); background: var(--blue-soft); }
.status-completed { color: #166534; background: #dcfce7; }
.badge-urgent { color: var(--danger); background: var(--danger-soft); }
.badge-normal { color: var(--muted); background: var(--surface-3); }
.badge-mock { color: #8a5a12; background: #fdf1cd; }
.badge-sent { color: #166534; background: #dcfce7; }
.badge-failed { color: var(--danger); background: var(--danger-soft); }
.badge-skipped { color: var(--muted); background: var(--surface-3); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 31px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink-2); font-size: 12.5px; font-weight: 550; transition: .15s ease;
}
.chip:hover, .chip.is-active { border-color: var(--brand); background: var(--brand-tint); color: var(--brand); }
.chip svg { width: 14px; height: 14px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.tiny { font-size: 11.5px; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > label, .field-label {
  font-size: 13px; font-weight: 700; color: var(--ink-2);
  display: flex; justify-content: flex-start; align-items: baseline; gap: 6px;
}
.field > label .counter, .field > label .hint, .field-label .hint {
  margin-left: auto; font-weight: 450; text-align: right;
}
.field .required { color: var(--accent); margin-left: 2px; }
.field .hint { font-size: 11.5px; color: var(--faint); font-weight: 450; }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 12px;
  background: #fffefa; padding: 12px 14px; font-size: 14.5px; color: var(--ink);
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.input::placeholder, .textarea::placeholder { color: #a9b0ab; }
.input:hover, .textarea:hover, .select:hover { border-color: #bfb5a5; }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 4px rgba(13, 107, 92, .09);
}
.textarea { resize: vertical; min-height: 116px; line-height: 1.7; }
.select {
  appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%236b7873' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.field-error { color: var(--danger); font-size: 12px; min-height: 0; }
.input.has-error, .textarea.has-error, .select.has-error { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(185,64,58,.08); }
.counter { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.counter.is-over { color: var(--danger); font-weight: 700; }

.empty-state { text-align: center; padding: 46px 24px; color: var(--muted); }
.empty-state .empty-icon {
  width: 54px; height: 54px; border-radius: 18px; margin: 0 auto 14px;
  display: grid; place-items: center; color: var(--brand); background: var(--brand-soft);
}
.empty-state .empty-icon svg { width: 25px; height: 25px; }
.empty-state h3 { color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.empty-state p { font-size: 12.5px; }

.toast-wrap {
  position: fixed; z-index: 999; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
  width: min(92vw, 460px);
}
.toast {
  background: #12201d; color: #f3f7f5; padding: 11px 16px; border-radius: 11px;
  font-size: 13px; box-shadow: 0 16px 40px rgba(0,0,0,.22);
  display: flex; align-items: center; gap: 8px; animation: toastIn .22s ease;
  border: 1px solid rgba(255,255,255,.1);
}
.toast.success { background: #0d5749; }
.toast.error { background: #7f2621; }
.toast svg { width: 16px; height: 16px; flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 800; background: rgba(13, 25, 22, .55);
  display: grid; place-items: center; padding: 20px; backdrop-filter: blur(3px);
  animation: fadeIn .18s ease;
}
.modal {
  width: min(560px, 100%); background: var(--surface); border-radius: 20px;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.4);
  max-height: min(88vh, 780px); overflow: auto; animation: modalIn .22s cubic-bezier(.2,.8,.2,1);
}
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 24px 0; }
.modal-head h3 { font-size: 19px; letter-spacing: -.02em; }
.modal-head p { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.modal-body { padding: 20px 24px; }
.modal-foot { padding: 0 24px 22px; display: flex; justify-content: flex-end; gap: 10px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } }

/* ---------------------------------------------------------- 落地页 */
.landing-page {
  background:
    radial-gradient(900px 600px at 12% -8%, rgba(13,107,92,.10), transparent 60%),
    radial-gradient(700px 500px at 92% 4%, rgba(217,119,63,.10), transparent 60%),
    var(--bg);
  min-height: 100vh;
}
.landing-nav {
  max-width: 1180px; margin: 0 auto; padding: 24px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.landing-nav .nav-links { display: flex; align-items: center; gap: 8px; }
.landing-nav .nav-links a { color: var(--ink-2); font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 9px; }
.landing-nav .nav-links a:hover { background: rgba(23,33,31,.06); }
.demo-badge {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border-radius: 999px; background: #fdf1cd; color: #7c560e; font-size: 11.5px; font-weight: 700;
  border: 1px solid #f0dfae;
}
.landing-hero {
  max-width: 1180px; margin: 0 auto; padding: 56px 28px 40px;
  display: grid; grid-template-columns: 1.12fr .88fr; gap: 64px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 800;
  letter-spacing: .18em; text-transform: uppercase; color: var(--brand);
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: var(--brand); }
.landing-hero h1 {
  font-size: clamp(40px, 5.2vw, 66px); line-height: 1.12; letter-spacing: -.045em;
  margin: 20px 0 20px; font-weight: 780;
}
.landing-hero h1 em {
  font-style: normal; color: var(--brand); position: relative; white-space: nowrap;
}
.landing-hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 5px; height: 10px;
  background: rgba(217, 119, 63, .18); z-index: -1; border-radius: 4px;
}
.landing-lede { font-size: 17px; line-height: 1.85; color: var(--muted); max-width: 560px; }
.landing-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.landing-proof { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.landing-proof .proof { display: flex; flex-direction: column; gap: 2px; }
.landing-proof strong { font-size: 21px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.landing-proof span { font-size: 11.5px; color: var(--muted); }

.qr-showcase {
  background: var(--surface); border: 1px solid var(--line); border-radius: 26px;
  box-shadow: var(--shadow-md); padding: 20px; position: relative;
  transform: rotate(.8deg);
}
.qr-showcase::before {
  content: ""; position: absolute; inset: -14px -14px auto auto; width: 90px; height: 90px;
  border-radius: 50%; background: var(--accent-soft); z-index: -1;
}
.qr-showcase-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 14px; }
.qr-showcase-head span { font-size: 11.5px; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.qr-plate {
  background: var(--brand-tint); border: 1px solid #d4e8e1; border-radius: 18px;
  padding: 24px 24px 20px; text-align: center;
}
.qr-plate img { width: 228px; height: 228px; display: block; margin: 0 auto; border-radius: 8px; }
.qr-store { font-size: 18px; font-weight: 760; margin-top: 14px; letter-spacing: -.01em; }
.qr-cta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.qr-showcase-foot { display: flex; justify-content: space-between; align-items: center; padding: 14px 4px 0; font-size: 11.5px; color: var(--muted); }
.qr-showcase-foot a { font-weight: 650; }

.landing-features {
  max-width: 1180px; margin: 0 auto; padding: 26px 28px 70px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.feature-card {
  background: rgba(255,253,248,.66); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px; transition: .2s ease;
}
.feature-card:hover { background: var(--surface); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.feature-icon {
  width: 42px; height: 42px; border-radius: 13px; background: var(--brand-soft);
  color: var(--brand); display: grid; place-items: center; margin-bottom: 14px;
}
.feature-icon svg { width: 21px; height: 21px; }
.feature-card h3 { font-size: 15.5px; margin-bottom: 5px; }
.feature-card p { font-size: 12.5px; color: var(--muted); line-height: 1.75; }
.landing-footer { max-width: 1180px; margin: 0 auto; padding: 22px 28px 34px; color: var(--faint); font-size: 11.5px; display: flex; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------- 顾客填单页 */
.customer-page {
  --form-max: 640px;
  background:
    radial-gradient(800px 540px at 8% -4%, rgba(13,107,92,.12), transparent 62%),
    radial-gradient(620px 440px at 96% 10%, rgba(217,119,63,.12), transparent 62%),
    var(--bg);
  min-height: 100vh;
}
.cust-shell {
  max-width: 1120px; margin: 0 auto; padding: 26px 26px 54px;
  display: grid; grid-template-columns: .92fr 1.08fr; gap: 64px; align-items: start;
}
.cust-aside { position: sticky; top: 34px; padding-top: 40px; }
.cust-aside .brand-lockup { margin-bottom: 48px; }
.cust-aside h1 {
  font-size: clamp(34px, 4.1vw, 50px); line-height: 1.16; letter-spacing: -.045em;
  margin: 16px 0 18px; font-weight: 780;
}
.cust-aside h1 em { font-style: normal; color: var(--brand); }
.cust-aside .lede { color: var(--muted); font-size: 15px; line-height: 1.9; max-width: 440px; }
.trust-list { margin-top: 30px; display: grid; gap: 13px; }
.trust-item { display: flex; gap: 11px; align-items: flex-start; font-size: 13px; color: var(--ink-2); }
.trust-item .tick {
  width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); margin-top: 1px;
}
.trust-item .tick svg { width: 12px; height: 12px; }
.cust-contact { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.cust-contact strong { color: var(--ink-2); }

.cust-form-col { min-width: 0; }
.cust-form-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow-md); overflow: hidden;
}
.cust-form-head {
  padding: 24px 26px 20px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fffefa, #fbf8f1);
}
.cust-form-head h2 { font-size: 21px; letter-spacing: -.02em; }
.cust-form-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.store-banner {
  margin: 18px 26px 0; padding: 13px 15px; border-radius: 14px; border: 1px solid #d5e8e1;
  background: var(--brand-tint); display: flex; align-items: center; gap: 12px;
}
.store-pin {
  width: 34px; height: 34px; border-radius: 10px; background: #fff; color: var(--brand);
  display: grid; place-items: center; flex: none; border: 1px solid #d5e8e1;
}
.store-pin svg { width: 17px; height: 17px; }
.store-meta { min-width: 0; flex: 1; }
.store-meta .store-label { font-size: 10.5px; color: var(--brand); font-weight: 750; letter-spacing: .1em; }
.store-meta .store-title { font-size: 14px; font-weight: 700; line-height: 1.4; }
.store-meta .store-address { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-switch {
  border: 1px solid #c8ded7; background: #fff; color: var(--brand); border-radius: 9px;
  font-size: 11.5px; font-weight: 650; padding: 7px 10px; flex: none;
}
.store-switch:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

.cust-form { padding: 22px 26px 26px; display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.quick-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; }
.consent-row { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.consent-row input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.consent-row a { text-decoration: underline; text-underline-offset: 2px; }
.submit-sticky { position: sticky; bottom: 12px; z-index: 5; padding-top: 2px; }
.submit-note { text-align: center; color: var(--faint); font-size: 10.5px; margin-top: 8px; }

.cust-success { padding: 34px 28px 30px; text-align: center; }
.success-mark {
  width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 18px;
  display: grid; place-items: center; color: #fff; background: var(--brand);
  box-shadow: 0 0 0 10px var(--brand-soft), 0 16px 34px rgba(13,107,92,.25);
  animation: popIn .45s cubic-bezier(.2,1.2,.4,1);
}
.success-mark svg { width: 34px; height: 34px; }
@keyframes popIn { from { transform: scale(.7); opacity: 0; } }
.cust-success h2 { font-size: 24px; letter-spacing: -.02em; }
.cust-success .success-sub { color: var(--muted); font-size: 13px; margin: 6px 0 20px; }
.ticket-stub {
  border: 1px dashed var(--line-strong); border-radius: 14px; background: var(--surface-2);
  padding: 15px 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  text-align: left; margin-bottom: 16px;
}
.ticket-stub .stub-label { font-size: 10.5px; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.ticket-stub .stub-no { font-family: var(--mono); font-weight: 700; font-size: 15px; margin-top: 2px; }
.category-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 29px; padding: 0 11px;
  border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft);
}
.success-timeline { display: flex; align-items: flex-start; justify-content: space-between; gap: 0; margin: 22px 0; }
.success-timeline .step { flex: 1; text-align: center; position: relative; font-size: 10.5px; color: var(--faint); }
.success-timeline .step::before {
  content: ""; position: absolute; top: 10px; left: -50%; width: 100%; height: 2px; background: var(--line);
}
.success-timeline .step:first-child::before { display: none; }
.success-timeline .step.done { color: var(--brand); }
.success-timeline .step.done::before { background: var(--brand-soft); }
.success-timeline .dot {
  width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); color: var(--faint);
  display: grid; place-items: center; margin: 0 auto 6px; position: relative; z-index: 1;
  border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line);
}
.success-timeline .step.done .dot { background: var(--brand); color: #fff; box-shadow: none; }
.success-timeline .dot svg { width: 11px; height: 11px; }
.success-actions { display: grid; gap: 9px; }
.success-tip { font-size: 11px; color: var(--faint); margin-top: 14px; }
.cust-footer { text-align: center; color: var(--faint); font-size: 10.5px; margin-top: 18px; padding: 0 8px; }

/* 进度查询 */
.track-page {
  background:
    radial-gradient(720px 480px at 50% -10%, rgba(13,107,92,.13), transparent 65%),
    var(--bg);
  min-height: 100vh;
}
.track-wrap { max-width: 700px; margin: 0 auto; padding: 26px 22px 60px; }
.track-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 26px; }
.track-top .back-link { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.track-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-md); overflow: hidden; }
.track-head { padding: 26px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg,#fffefa,#faf7f0); }
.track-head .ticket-no { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.track-head h1 { font-size: 24px; letter-spacing: -.025em; margin: 6px 0 10px; }
.track-head .store-line { color: var(--muted); font-size: 12.5px; }
.track-body { padding: 24px 26px; display: grid; gap: 22px; }
.track-stepper { display: grid; gap: 0; }
.track-step { display: grid; grid-template-columns: 28px 1fr; gap: 13px; position: relative; padding-bottom: 22px; }
.track-step:last-child { padding-bottom: 0; }
.track-step::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.track-step:last-child::before { display: none; }
.track-step.done::before { background: var(--brand-soft); }
.track-step .step-dot {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); color: var(--faint); border: 1px solid var(--line); z-index: 1;
}
.track-step.done .step-dot { background: var(--brand); color: #fff; border-color: var(--brand); }
.track-step .step-dot svg { width: 13px; height: 13px; }
.track-step .step-title { font-weight: 700; font-size: 13.5px; }
.track-step .step-time { font-size: 11.5px; color: var(--faint); margin-top: 1px; }
.track-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.track-detail .kv { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.track-detail .k { font-size: 10.5px; color: var(--muted); font-weight: 700; letter-spacing: .05em; }
.track-detail .v { font-size: 13px; margin-top: 2px; font-weight: 600; }
.resolution-box { background: var(--brand-tint); border: 1px solid #d5e8e1; border-radius: 14px; padding: 16px 18px; }
.resolution-box .res-label { display: flex; align-items: center; gap: 7px; color: var(--brand); font-size: 11.5px; font-weight: 800; letter-spacing: .06em; }
.resolution-box p { margin-top: 8px; font-size: 13.5px; line-height: 1.8; color: var(--ink-2); white-space: pre-wrap; }
.track-foot { text-align: center; color: var(--faint); font-size: 11px; margin-top: 18px; }

.notfound-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.notfound-card { max-width: 460px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 42px 32px; box-shadow: var(--shadow-md); }
.notfound-card .brand-mark { margin: 0 auto 18px; width: 54px; height: 54px; border-radius: 16px; }
.notfound-card h1 { font-size: 23px; letter-spacing: -.02em; }
.notfound-card p { color: var(--muted); font-size: 13px; margin: 8px 0 24px; }

/* ---------------------------------------------------------- 工作台框架 */
.workspace-page { background: var(--bg); min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 40;
  background:
    radial-gradient(420px 260px at 20% -5%, rgba(50,160,134,.22), transparent 65%),
    #11201c;
  color: #e9f0ed; display: flex; flex-direction: column; padding: 22px 16px 16px;
  border-right: 1px solid rgba(255,255,255,.06);
}
.sidebar .brand-lockup { padding: 0 8px 24px; }
.sidebar .brand-name { color: #f4f8f6; }
.sidebar .brand-sub { color: #7f9b92; }
.sidebar .brand-mark { box-shadow: 0 8px 20px rgba(0,0,0,.3); }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav .nav-section { font-size: 9.5px; letter-spacing: .14em; color: #69857b; text-transform: uppercase; padding: 14px 12px 6px; font-weight: 700; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: #a9bdb6; font-size: 13px; font-weight: 600; transition: .15s ease;
}
.side-nav a svg { width: 17px; height: 17px; opacity: .85; }
.side-nav a:hover { background: rgba(255,255,255,.065); color: #eef6f2; }
.side-nav a.active { background: rgba(38,130,107,.26); color: #fff; box-shadow: inset 0 0 0 1px rgba(92,199,170,.16); }
.side-nav a .nav-count {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: rgba(255,255,255,.12); color: #d5e5df; font-size: 10px; display: grid; place-items: center;
  font-variant-numeric: tabular-nums;
}
.side-nav a.active .nav-count { background: rgba(255,255,255,.2); }
.sidebar-foot { margin-top: auto; padding: 12px 8px 2px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 11px; background: rgba(255,255,255,.045); }
.avatar {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(145deg, #2b8c76, #145f4f); color: #fff; font-size: 12px; font-weight: 800;
  flex: none; letter-spacing: .02em;
}
.side-user .u-name { font-size: 12.5px; font-weight: 700; color: #f2f7f5; line-height: 1.3; }
.side-user .u-role { font-size: 10.5px; color: #7f9b92; margin-top: 1px; }
.side-user .logout-btn { margin-left: auto; color: #7f9b92; background: none; border: 0; padding: 5px; border-radius: 6px; }
.side-user .logout-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.side-user .logout-btn svg { width: 15px; height: 15px; }
.side-demo { margin: 10px 8px 0; font-size: 9.5px; color: #7f9b92; line-height: 1.5; }

.app-main { margin-left: var(--sidebar); min-height: 100vh; }
.topbar {
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(244,241,233,.82);
  backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 30;
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-title { font-size: 13px; font-weight: 700; color: var(--muted); }
.topbar-title b { color: var(--ink); font-weight: 750; }
.topbar-right { display: flex; align-items: center; gap: 9px; }
.topbar .mobile-brand { display: none; }
.page { padding: 30px 34px 50px; max-width: 1560px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; letter-spacing: -.035em; line-height: 1.2; }
.page-head p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.page-actions .select { width: auto; min-width: 108px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 22px; }
.kpi-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 18px; position: relative; overflow: hidden;
}
.kpi-card::after {
  content: ""; position: absolute; right: -20px; top: -24px; width: 82px; height: 82px;
  border-radius: 50%; background: var(--kpi-tint, var(--brand-tint)); opacity: .7;
}
.kpi-label { font-size: 11.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi-label svg { width: 14px; height: 14px; color: var(--kpi-color, var(--brand)); }
.kpi-value { font-size: 30px; line-height: 1.12; font-weight: 760; letter-spacing: -.04em; margin: 8px 0 2px; font-variant-numeric: tabular-nums; position: relative; z-index: 1; }
.kpi-value small { font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--muted); margin-left: 3px; }
.kpi-foot { font-size: 10.5px; color: var(--faint); display: flex; align-items: center; gap: 5px; position: relative; z-index: 1; }
.kpi-delta { font-weight: 700; }
.kpi-delta.up { color: var(--danger); }
.kpi-delta.down { color: #15803d; }
.kpi-delta.neutral { color: var(--muted); }

.work-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
}
.segmented {
  display: inline-flex; gap: 3px; padding: 4px; background: var(--surface-3);
  border: 1px solid var(--line); border-radius: 12px;
}
.segmented button {
  border: 0; background: transparent; color: var(--muted); padding: 7px 12px;
  border-radius: 8px; font-size: 12px; font-weight: 650; display: flex; align-items: center; gap: 6px;
  transition: .15s ease;
}
.segmented button .n {
  min-width: 18px; height: 17px; padding: 0 5px; display: grid; place-items: center;
  border-radius: 999px; background: rgba(23,33,31,.07); font-size: 9.5px; font-variant-numeric: tabular-nums;
}
.segmented button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(23,33,31,.09); }
.segmented button.active .n { background: var(--brand); color: #fff; }
.toolbar-spacer { flex: 1; }
.search-box { position: relative; width: min(260px, 100%); }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--faint); }
.search-box input {
  width: 100%; height: 38px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface); padding: 0 12px 0 34px; font-size: 12.5px;
}
.search-box input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13,107,92,.08); }
.select-sm {
  height: 38px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 12px; padding: 0 30px 0 11px; max-width: 170px;
}
.select-sm:focus { outline: none; border-color: var(--brand); }

.work-layout { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 16px; align-items: start; }
.list-pane { min-width: 0; }
.ticket-list { display: grid; gap: 9px; }
.ticket-card {
  width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 15px 13px; position: relative; transition: .16s ease;
  box-shadow: 0 1px 2px rgba(23,33,31,.025);
}
.ticket-card::before {
  content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--status-color, var(--line-strong));
}
.ticket-card:hover { border-color: #c8bfae; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.ticket-card.active { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(13,107,92,.1); }
.ticket-top { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.ticket-store { font-size: 11px; color: var(--muted); font-weight: 600; }
.ticket-time { font-size: 10.5px; color: var(--faint); margin-left: auto; white-space: nowrap; }
.ticket-title { font-size: 13.5px; font-weight: 680; line-height: 1.5; color: var(--ink); margin-bottom: 8px; }
.ticket-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ticket-cat { font-size: 10.5px; font-weight: 650; color: var(--ink-2); background: var(--surface-3); padding: 3px 7px; border-radius: 6px; }
.ticket-no { font-size: 9.5px; color: var(--faint); font-family: var(--mono); }
.ticket-age { margin-left: auto; font-size: 10px; color: var(--faint); display: flex; align-items: center; gap: 4px; }
.ticket-age.overdue { color: var(--danger); font-weight: 650; }

.detail-pane {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  min-height: 500px; position: sticky; top: 80px; max-height: calc(100vh - 104px);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
}
.detail-empty { flex: 1; display: grid; place-items: center; padding: 40px; }
.detail-inner { overflow: auto; flex: 1; }
.detail-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 3; }
.detail-head-top { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.detail-head h2 { font-size: 19px; line-height: 1.4; letter-spacing: -.02em; }
.detail-sub { margin-top: 5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--faint); font-size: 10.5px; }
.detail-close { display: none; }
.detail-body { padding: 18px 22px 22px; display: grid; gap: 18px; }
.detail-section-title { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; color: var(--faint); text-transform: uppercase; margin-bottom: 9px; }
.customer-strip {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 13px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.customer-strip .avatar { width: 38px; height: 38px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-size: 13px; }
.customer-strip .c-name { font-size: 13.5px; font-weight: 700; }
.customer-strip .c-phone { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.customer-strip .contact-actions { margin-left: auto; display: flex; gap: 6px; }
.contact-btn {
  width: 33px; height: 33px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; color: var(--brand);
}
.contact-btn:hover { background: var(--brand-tint); border-color: var(--brand); }
.contact-btn svg { width: 15px; height: 15px; }
.content-block { font-size: 14px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; color: var(--ink-2); }
.requirement-block { background: var(--accent-soft); border: 1px solid #f3ddcd; border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.75; color: #5c3a24; white-space: pre-wrap; }
.category-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.category-select {
  height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  font-size: 11.5px; padding: 0 25px 0 9px; color: var(--ink-2);
}
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.meta-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.meta-box .k { font-size: 9.5px; color: var(--faint); font-weight: 700; letter-spacing: .05em; }
.meta-box .v { font-size: 12px; font-weight: 600; margin-top: 2px; }
.timeline { display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 20px 1fr; gap: 10px; position: relative; padding-bottom: 15px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: 9px; top: 18px; bottom: 0; width: 1.5px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 19px; height: 19px; border-radius: 50%; background: var(--brand-soft); border: 1px solid #cbe3da; display: grid; place-items: center; color: var(--brand); z-index: 1; }
.tl-dot svg { width: 9px; height: 9px; }
.tl-title { font-size: 12px; font-weight: 650; line-height: 1.5; }
.tl-note { font-size: 11.5px; color: var(--muted); line-height: 1.65; margin-top: 1px; white-space: pre-wrap; }
.tl-time { font-size: 10px; color: var(--faint); margin-top: 2px; }
.resolution-card { background: var(--brand-tint); border: 1px solid #d5e8e1; border-radius: 13px; padding: 14px 15px; }
.resolution-card .r-label { display: flex; align-items: center; gap: 6px; color: var(--brand); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; }
.resolution-card p { margin-top: 6px; font-size: 13px; line-height: 1.8; white-space: pre-wrap; }
.detail-actions {
  border-top: 1px solid var(--line); padding: 13px 22px; background: var(--surface);
  display: flex; gap: 9px; align-items: center;
}
.detail-actions .btn { min-height: 42px; }
.detail-actions .action-hint { font-size: 10.5px; color: var(--faint); margin-right: auto; }

.template-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.template-chip {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2);
  border-radius: 999px; padding: 5px 10px; font-size: 11px;
}
.template-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }

/* 登录 */
.login-view {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
  background:
    radial-gradient(800px 600px at 15% 0%, rgba(13,107,92,.14), transparent 60%),
    var(--bg);
}
.login-aside { padding: 46px 8vw 40px 6vw; display: flex; flex-direction: column; justify-content: space-between; }
.login-aside .brand-lockup { margin-bottom: 60px; }
.login-aside h1 { font-size: clamp(38px, 4.6vw, 58px); line-height: 1.14; letter-spacing: -.045em; max-width: 560px; }
.login-aside h1 em { font-style: normal; color: var(--brand); }
.login-aside .lede { color: var(--muted); font-size: 15px; line-height: 1.9; margin-top: 18px; max-width: 520px; }
.login-points { display: grid; gap: 14px; margin-top: 34px; max-width: 500px; }
.login-point { display: flex; gap: 12px; }
.login-point .num {
  width: 27px; height: 27px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--brand); flex: none;
}
.login-point h4 { font-size: 13.5px; }
.login-point p { font-size: 12px; color: var(--muted); line-height: 1.7; }
.login-aside-foot { color: var(--faint); font-size: 11px; }
.login-panel-wrap { display: grid; place-items: center; padding: 32px 30px; }
.login-panel {
  width: min(430px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; box-shadow: var(--shadow-md); padding: 28px;
}
.login-panel h2 { font-size: 22px; letter-spacing: -.025em; }
.login-panel > p { font-size: 12.5px; color: var(--muted); margin-top: 4px; margin-bottom: 20px; }
.login-mode-note {
  padding: 10px 12px; background: var(--warning-soft); border: 1px solid #f0dfae;
  border-radius: 10px; color: #7c560e; font-size: 11.5px; line-height: 1.65; margin-bottom: 14px;
}
.demo-user-list { display: grid; gap: 8px; max-height: 380px; overflow: auto; padding-right: 2px; }
.demo-user {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px;
  transition: .15s ease;
}
.demo-user:hover { border-color: var(--brand); background: var(--brand-tint); transform: translateX(2px); }
.demo-user .avatar { width: 35px; height: 35px; border-radius: 10px; }
.demo-user .du-name { font-size: 13px; font-weight: 700; }
.demo-user .du-meta { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.demo-user .du-go { margin-left: auto; color: var(--faint); }
.demo-user .du-go svg { width: 16px; height: 16px; }
.login-help { font-size: 11px; color: var(--faint); line-height: 1.7; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.login-error { background: var(--danger-soft); border: 1px solid #f3c7c3; color: #8d2f2a; border-radius: 10px; padding: 11px 12px; font-size: 12px; line-height: 1.65; margin-bottom: 12px; }
.boot-screen { min-height: 100vh; display: grid; place-items: center; color: var(--muted); font-size: 13px; gap: 12px; }
.boot-screen .loader { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }

.mobile-nav { display: none; }

/* ---------------------------------------------------------- 分析页 */
.analytics-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 15px; margin-bottom: 15px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(23,33,31,.025); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h3 { font-size: 14.5px; letter-spacing: -.01em; }
.panel-head p { font-size: 10.5px; color: var(--faint); margin-top: 2px; }
.insight-strip {
  background: linear-gradient(120deg, #123b33, #0b5648); color: #eaf5f1; border-radius: 16px;
  padding: 16px 18px; margin-bottom: 15px; display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid rgba(255,255,255,.08); box-shadow: var(--shadow-sm);
}
.insight-strip .insight-icon {
  width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.11);
  display: grid; place-items: center; flex: none;
}
.insight-strip .insight-icon svg { width: 17px; height: 17px; }
.insight-strip h4 { font-size: 10.5px; letter-spacing: .12em; color: #93c9b9; font-weight: 800; margin-bottom: 5px; }
.insight-strip ul { margin: 0; padding-left: 17px; display: grid; gap: 3px; font-size: 12px; line-height: 1.65; color: #dcece6; }
.insight-strip li::marker { color: #6fc1aa; }

.trend-chart { width: 100%; height: 260px; display: block; overflow: visible; }
.chart-legend { display: flex; gap: 14px; font-size: 10.5px; color: var(--muted); }
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.chart-tooltip { pointer-events: none; }
.chart-empty { height: 220px; display: grid; place-items: center; color: var(--faint); font-size: 12px; }

.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut {
  width: 150px; height: 150px; border-radius: 50%; flex: none; position: relative;
  background: conic-gradient(var(--line) 0 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.03);
}
.donut::after {
  content: ""; position: absolute; inset: 23px; border-radius: 50%; background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}
.donut-center { position: absolute; inset: 23px; display: grid; place-items: center; text-align: center; z-index: 1; }
.donut-center strong { font-size: 24px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.donut-center span { font-size: 9.5px; color: var(--faint); }
.cat-legend { flex: 1; min-width: 0; display: grid; gap: 7px; max-height: 232px; overflow: auto; }
.cat-legend-row { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.cat-legend-row .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.cat-legend-row .name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-legend-row .pct { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.bar-list { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 86px 1fr 34px; gap: 9px; align-items: center; font-size: 11.5px; }
.bar-row .bar-name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--brand); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.bar-row .bar-count { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.keyword-cloud { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.keyword {
  display: inline-flex; align-items: baseline; gap: 4px; padding: 4px 9px; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
  font-weight: 600; line-height: 1.3;
}
.keyword b { color: var(--faint); font-size: 9px; font-weight: 600; }

.store-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 11.5px; }
.store-table th {
  text-align: left; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint); font-weight: 800; padding: 0 10px 9px; border-bottom: 1px solid var(--line);
}
.store-table td { padding: 10px; border-bottom: 1px solid #efeae0; vertical-align: middle; }
.store-table tr:last-child td { border-bottom: 0; }
.store-table .s-name { font-weight: 700; }
.store-table .s-mgr { font-size: 10px; color: var(--faint); }
.store-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.store-table .bar-cell { width: 130px; }
.mini-bar { height: 5px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.mini-bar span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.rate { font-weight: 700; }
.rate.good { color: #15803d; }
.rate.warn { color: var(--warning); }
.rate.bad { color: var(--danger); }

.hour-chart { display: flex; align-items: flex-end; gap: 3px; height: 100px; margin-top: 6px; }
.hour-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; justify-content: flex-end; }
.hour-bar .hb { width: 100%; max-width: 18px; border-radius: 3px 3px 1px 1px; background: var(--brand-soft); min-height: 2px; }
.hour-bar.peak .hb { background: var(--accent); }
.hour-bar .hl { font-size: 8px; color: var(--faint); }
.hour-summary { display: flex; justify-content: space-between; font-size: 10px; color: var(--faint); margin-top: 6px; }

.analysis-two { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }

/* ---------------------------------------------------------- 二维码页 */
.qr-page-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.qr-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(23,33,31,.025);
}
.qr-card-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.qr-card-top .store-avatar {
  width: 37px; height: 37px; border-radius: 11px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none;
}
.qr-card h3 { font-size: 14px; line-height: 1.35; }
.qr-card .mgr { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.qr-card .mgr.missing { color: var(--danger); }
.qr-image-wrap { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; place-items: center; }
.qr-image-wrap img { width: 172px; height: 172px; display: block; }
.qr-link {
  margin-top: 10px; font-family: var(--mono); font-size: 9.5px; color: var(--faint);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px;
  padding: 6px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.qr-actions { display: flex; gap: 6px; margin-top: 10px; }
.qr-actions .btn { flex: 1; padding: 0 8px; font-size: 11px; min-height: 32px; }
.print-header { display: none; }

/* ---------------------------------------------------------- 设置页 */
.settings-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 15px; align-items: start; }
.store-admin-list { display: grid; gap: 9px; }
.store-admin-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 13px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface-2);
}
.store-admin-row .sa-name { font-size: 13px; font-weight: 700; }
.store-admin-row .sa-meta { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.store-admin-row .sa-mgr { margin-left: auto; text-align: right; font-size: 10.5px; color: var(--muted); }
.store-admin-row .sa-mgr.missing { color: var(--danger); }
.store-admin-row .btn { margin-left: 4px; }
.inline-code { font-family: var(--mono); font-size: 10.5px; background: var(--surface-3); padding: 2px 5px; border-radius: 4px; }
.warn-list { display: grid; gap: 7px; }
.warn-item { display: flex; gap: 8px; align-items: flex-start; background: var(--warning-soft); border: 1px solid #f0dfae; border-radius: 10px; padding: 9px 11px; font-size: 11.5px; color: #7c560e; line-height: 1.6; }
.warn-item svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.notify-list { display: grid; gap: 7px; max-height: 430px; overflow: auto; }
.notify-row { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: var(--surface-2); }
.notify-row-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.notify-row .nt-title { font-size: 11.5px; font-weight: 650; }
.notify-row .nt-meta { font-size: 9.5px; color: var(--faint); margin-top: 3px; }
.notify-row .nt-error { font-size: 10px; color: var(--danger); margin-top: 3px; line-height: 1.5; word-break: break-all; }
.notify-row .btn { margin-left: auto; }

/* ---------------------------------------------------------- 响应式 */
@media (min-width: 901px) {
  .work-layout { align-items: start; }
  .list-pane {
    max-height: calc(100vh - 232px); overflow-y: auto; padding-right: 5px;
    scrollbar-width: thin; scrollbar-color: #c9c0b1 transparent;
  }
  .list-pane::-webkit-scrollbar { width: 6px; }
  .list-pane::-webkit-scrollbar-thumb { background: #d4ccbd; border-radius: 999px; }
  .detail-pane { max-height: calc(100vh - 104px); }
}
@media (max-width: 1180px) {
  .landing-hero { gap: 40px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .qr-page-grid { grid-template-columns: repeat(2, 1fr); }
  .work-layout { grid-template-columns: 350px minmax(0, 1fr); }
  .analytics-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .landing-hero { grid-template-columns: 1fr; padding-top: 34px; }
  .qr-showcase { max-width: 430px; transform: none; }
  .landing-features { grid-template-columns: 1fr; }
  .cust-shell { grid-template-columns: 1fr; gap: 22px; max-width: 700px; padding-top: 18px; }
  .cust-aside { position: static; padding-top: 10px; }
  .cust-aside .brand-lockup { margin-bottom: 28px; }
  .cust-aside h1 { font-size: 38px; }
  .trust-list { display: none; }
  .cust-contact { display: none; }
  .customer-page .cust-aside .lede { font-size: 14px; }
  .login-view { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .login-panel-wrap { min-height: 100vh; }
  .analysis-two { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  :root { --sidebar: 0px; }
  .sidebar { display: none; }
  .app-main { margin-left: 0; }
  .topbar { padding: 0 18px; height: 58px; }
  .topbar .mobile-brand { display: inline-flex; }
  .topbar-title { display: none; }
  .page { padding: 20px 16px 92px; }
  .page-head h1 { font-size: 24px; }
  .work-layout { grid-template-columns: 1fr; }
  .detail-pane {
    position: fixed; inset: 58px 0 0; z-index: 60; border-radius: 0; max-height: none;
    transform: translateY(102%); transition: transform .26s cubic-bezier(.2,.8,.2,1);
    box-shadow: 0 -20px 60px rgba(23,33,31,.18);
  }
  .detail-pane.open { transform: translateY(0); }
  .detail-close { display: inline-grid; margin-left: auto; }
  .detail-head { padding-top: 16px; }
  .detail-actions { padding-bottom: max(13px, env(safe-area-inset-bottom)); }
  .mobile-nav {
    display: flex; position: fixed; left: 12px; right: 12px; bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 50; background: rgba(17,32,28,.96); border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px; padding: 6px; backdrop-filter: blur(14px);
    box-shadow: 0 18px 40px rgba(0,0,0,.24);
  }
  .mobile-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    color: #95aaa2; font-size: 9.5px; font-weight: 600; padding: 6px 2px; border-radius: 10px;
  }
  .mobile-nav a svg { width: 18px; height: 18px; }
  .mobile-nav a.active { color: #fff; background: rgba(255,255,255,.1); }
  .qr-page-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-grid { margin-bottom: 12px; }
  .insight-strip { margin-bottom: 12px; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .landing-nav { padding: 18px 16px; }
  .landing-nav .nav-links a:not(.btn) { display: none; }
  .landing-hero { padding: 18px 16px 28px; gap: 30px; }
  .landing-hero h1 { font-size: 39px; }
  .landing-lede { font-size: 14.5px; }
  .landing-actions .btn { flex: 1; }
  .landing-proof { gap: 16px; }
  .landing-features { padding: 12px 16px 44px; gap: 10px; }
  .landing-footer { flex-direction: column; padding: 18px 16px 28px; }
  .qr-showcase { padding: 14px; border-radius: 20px; }
  .qr-plate { padding: 18px 12px 16px; }
  .qr-plate img { width: 200px; height: 200px; }
  .cust-shell { padding: 14px 14px 38px; }
  .cust-form-card { border-radius: 19px; }
  .cust-form-head { padding: 20px 18px 16px; }
  .store-banner { margin: 14px 18px 0; }
  .cust-form { padding: 18px 18px 22px; gap: 15px; }
  .form-row { grid-template-columns: 1fr; gap: 15px; }
  .cust-success { padding: 28px 20px 26px; }
  .track-wrap { padding: 16px 14px 40px; }
  .track-head { padding: 20px 18px; }
  .track-body { padding: 18px; }
  .track-detail { grid-template-columns: 1fr; }
  .topbar { padding: 0 14px; }
  .page { padding: 16px 12px 88px; }
  .page-head { margin-bottom: 14px; }
  .page-head h1 { font-size: 22px; }
  .kpi-grid { gap: 8px; margin-bottom: 14px; }
  .kpi-card { padding: 13px 13px; border-radius: 13px; }
  .kpi-value { font-size: 25px; }
  .kpi-label { font-size: 10.5px; }
  .kpi-foot { font-size: 9.5px; }
  .work-toolbar { gap: 7px; }
  .segmented { width: 100%; overflow-x: auto; }
  .segmented button { flex: 1; justify-content: center; padding: 7px 7px; font-size: 11px; }
  .segmented button .n { display: none; }
  .search-box { flex: 1; width: auto; min-width: 150px; }
  .select-sm { max-width: 130px; }
  .ticket-card { padding: 13px 13px 12px; }
  .detail-body { padding: 15px 16px 18px; }
  .detail-head { padding: 14px 16px 12px; }
  .detail-actions { padding: 12px 16px; }
  .meta-grid { grid-template-columns: 1fr; }
  .qr-page-grid { grid-template-columns: 1fr; }
  .qr-image-wrap img { width: 190px; height: 190px; }
  .donut-wrap { flex-direction: column; align-items: flex-start; }
  .cat-legend { width: 100%; max-height: none; }
  .store-table .bar-cell { display: none; }
  .store-table th:nth-child(5), .store-table td:nth-child(5) { display: none; }
  .login-panel-wrap { padding: 20px 14px; }
  .login-panel { padding: 22px 18px; }
  .modal-backdrop { padding: 10px; align-items: end; }
  .modal { border-radius: 20px 20px 14px 14px; max-height: 92vh; }
  .modal-head { padding: 20px 18px 0; }
  .modal-body { padding: 16px 18px; }
  .modal-foot { padding: 0 18px 18px; }
  .landing-hero h1 { font-size: 36px; }
}

/* ---------------------------------------------------------- 打印 */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff !important; }
  .sidebar, .topbar, .mobile-nav, .page-actions, .page-head p, .no-print, .toast-wrap { display: none !important; }
  .app-main { margin: 0 !important; }
  .page { padding: 0 !important; max-width: none; }
  .print-header { display: block; text-align: center; margin-bottom: 8mm; }
  .print-header h1 { font-size: 20pt; letter-spacing: -.02em; }
  .print-header p { font-size: 9pt; color: #555; margin-top: 2mm; }
  .qr-page-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; }
  .qr-card {
    break-inside: avoid; page-break-inside: avoid; border: 1px solid #bbb; border-radius: 4mm;
    padding: 4.5mm 5mm; box-shadow: none;
  }
  .qr-image-wrap { border: 0; padding: 1mm; }
  .qr-image-wrap img { width: 45mm; height: 45mm; }
  .qr-card-top { margin-bottom: 2mm; }
  .qr-card h3 { font-size: 12pt; }
  .qr-card .mgr { font-size: 8.5pt; }
  .qr-link, .qr-actions { display: none !important; }
  .qr-card h3 { font-size: 13pt; }
  .qr-card .mgr { font-size: 9pt; }
  .print-footer { display: block; text-align: center; font-size: 8pt; color: #777; margin-top: 8mm; }
}
.print-footer { display: none; }
