/* =============================================================
   半斤九两业务中心 · 设计 token + 全局
   ============================================================= */

:root {
  color-scheme: light;

  /* —— 文本 / 灰阶 —— */
  --ink: #1f2530;
  --ink-soft: #39414e;
  --muted: #7a828d;
  --muted-strong: #5b6472;
  --line: #e2e6eb;
  --line-strong: #cdd6e0;

  /* —— 表面 —— */
  --paper: #f4f6f8;
  --panel: #ffffff;
  --panel-soft: #f7f9fc;

  /* —— 品牌蓝（收敛到 4 个：bg / brand / strong / ink） —— */
  --brand-bg: #16335b;        /* 品牌深蓝，仅用于强调 */
  --brand-bg-2: #1f4779;
  --brand-bg-3: #2563eb;
  --brand: #2563eb;           /* 主品牌蓝 / 链接 / chip */
  --brand-strong: #1d4ed8;    /* hover / 强调 */
  --brand-ink: #16335b;       /* 标题与小字深色 */
  --brand-soft: #eaf1fe;      /* chip / 背景柔色 */
  --brand-soft-2: #f4f8ff;    /* 信息条柔色 */
  --brand-line: #cfe0fb;

  /* —— 强调色 / CTA 橙 —— */
  --accent: #b45309;
  --accent-hover: #92400e;
  --accent-soft: #fbeed8;
  --accent-line: #efd2a4;

  /* —— 状态色（语义 token：信息密度收敛） —— */
  --success: #147857;
  --success-soft: #e8f7f0;
  --success-line: #bee8d5;

  --warning: #a15c07;
  --warning-soft: #fff5e7;
  --warning-line: #ffd9a8;

  --danger: #dc2626;
  --danger-soft: #fbe9e9;
  --danger-line: #f0b7b7;

  /* —— 微信品牌色 —— */
  --wechat: #07c160;
  --wechat-soft: #e8f9f0;

  /* —— 阴影 / 圆角 / 间距 —— */
  --shadow: 0 18px 42px rgba(20, 40, 80, 0.08);
  --shadow-soft: 0 8px 22px rgba(20, 40, 80, 0.045);
  --shadow-hover: 0 10px 24px rgba(20, 40, 80, 0.08);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* —— 焦点环 —— */
  --focus-ring: 0 0 0 3px rgba(21, 91, 213, 0.35);
  --focus-ring-accent: 0 0 0 3px rgba(232, 111, 22, 0.32);

  /* 字体：去掉未加载的 Geist，留下系统 + 中文优先栈 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  min-width: 320px;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

/* —— 全局焦点环（替代 outline:none，保留键盘 a11y） —— */
:where(button, [role="button"], a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* =============================================================
   架构：shell / sidebar / main
   ============================================================= */

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  background: var(--paper);
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  min-height: 100vh;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 8px 14px;
  border-bottom: 1px solid var(--line);
}

.sidebar .brand-logo {
  width: 126px;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.brand-logo {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.hero-logo { width: 156px; }

.brand h1 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.page-tabs,
.primary-tabs {
  display: grid;
  gap: 6px;
}

.nav-item {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.nav-item-filters {
  display: grid;
  gap: 6px;
}

.nav-section-label {
  padding: 6px 10px 4px;
  color: #a6adb7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.nav-section-admin {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.admin-tabs .page-tab {
  color: var(--ink-soft);
}

.page-tab,
.nav-button {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 9px;
  min-height: 40px;
  padding: 0 10px;
  background: transparent;
  color: #525b68;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.page-tab span,
.nav-button span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-tab strong {
  flex: 0 0 auto;
  min-width: 0;
  margin-left: auto;
  padding-left: 8px;
  color: #9a5b10;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.page-tab.active,
.page-tab:hover,
.nav-button.active,
.nav-button:hover {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--brand-strong);
}

.page-tab:active,
.nav-button:active,
.button:active {
  transform: translateY(1px) scale(0.99);
}

.page-tab.active {
  box-shadow: inset 3px 0 0 var(--brand);
  font-weight: 700;
}

.page-tab.active strong { color: var(--accent); }

.nav-group { display: grid; gap: 8px; }

/* 侧栏筛选组 — 统一设计：点击标签展开/回收 */
.sidebar-filter-group {
  margin: 0 0 2px 10px;
  padding: 5px 0 2px 10px;
  gap: 3px;
  border-left: 1px solid var(--line);
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 32px;
  padding: 4px 10px 4px 0;
  color: #9aa1ac;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
}

.nav-group-toggle:hover {
  color: var(--brand);
}

.nav-group-toggle .toggle-arrow {
  font-size: 10px;
  transition: transform 0.15s;
}

.nav-group-body { display: grid; gap: 2px; }

.nav-group-body.collapsed { display: none; }

.sidebar-filter-group .nav-button {
  min-height: 32px;
  padding: 3px 8px;
  color: #67707d;
  font-size: 12.5px;
  background: transparent;
  border-radius: 6px;
}

.sidebar-filter-group .nav-button:hover {
  background: #f4f8ff;
  color: var(--brand);
}

.sidebar-filter-group .nav-button.active {
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 700;
}

.side-note {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 8px;
  background: var(--panel-soft);
}

.side-note strong {
  color: var(--ink);
  font-size: 13px;
}

.side-note span {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.user-block {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 8px;
  background: var(--panel-soft);
}

.user-name {
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
}

.user-meta {
  color: var(--muted);
  font-size: 12px;
}

.main {
  width: min(100%, 1480px);
  margin: 0 auto;
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 4px;
  font-weight: 700;
}

h2, h3 { margin: 0; letter-spacing: 0; }
h2 { font-size: 24px; line-height: 1.2; }
h3 { font-size: 18px; }

.page-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* =============================================================
   按钮 / 表单 / 输入框
   ============================================================= */

.button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 8px;
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 650;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.button:hover { border-color: var(--line-strong); }

.button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.button.primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}

.button.cta {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button.cta:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.button.cta { font-weight: 800; }

.button.danger {
  border-color: var(--danger-line);
  color: var(--danger);
  background: var(--danger-soft);
}

.button.danger:hover {
  border-color: var(--danger);
  background: #ffe7e4;
}

.button.auth-main {
  width: 100%;
  min-height: 46px;
  font-weight: 800;
}

.button.ghost-danger {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar .button.ghost-danger {
  border-color: var(--danger-line);
  color: var(--danger);
  background: #fff;
}

.sidebar .button.ghost-danger:hover {
  background: var(--danger-soft);
}

.button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.button.compact {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12.5px;
}

.button:focus-visible {
  box-shadow: var(--focus-ring), var(--shadow-soft);
}

.button.cta:focus-visible,
.button.primary:focus-visible {
  box-shadow: var(--focus-ring-accent), var(--shadow-soft);
}

.grid { display: grid; gap: 16px; }

.auth-panel,
.dev-auth-box,
.dev-users {
  display: grid;
  gap: 12px;
}

.auth-note {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  background: var(--panel-soft);
  font-size: 13px;
  line-height: 1.55;
}

.auth-note strong { color: var(--ink); }

.dev-auth-box {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.dev-auth-box p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  min-height: 88px;
  display: grid;
  align-content: space-between;
  box-shadow: var(--shadow-soft);
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong { font-size: 28px; }

.scope-bar {
  margin: -4px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.scope-bar div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.scope-bar strong {
  color: var(--ink);
  font-size: 14px;
}

.scope-bar span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.scope-bar select {
  width: 190px;
  min-width: 168px;
}

/* =============================================================
   工作区 / 卡片
   ============================================================= */

.workspace {
  display: grid;
  grid-template-columns: minmax(460px, 1.25fr) minmax(360px, 0.75fr);
  gap: 20px;
  align-items: start;
}

.workspace.customer-workspace {
  grid-template-columns: minmax(380px, 0.82fr) minmax(520px, 1.18fr);
}

.workspace.customer-workspace.customer-workspace-full,
.workspace.customer-workspace-full,
.workspace.order-workspace-full {
  grid-template-columns: minmax(0, 1fr);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  min-width: 0;
  overflow: hidden;
}

.panel-head {
  padding: 15px 18px;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.panel-sub {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.panel-body {
  padding: 16px;
  min-width: 0;
}

.customer-toolbar {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 150px;
  gap: 8px;
}

.order-list,
.customer-list {
  display: grid;
  gap: 10px;
}

.dashboard-workspace {
  grid-template-columns: minmax(620px, 1.35fr) minmax(320px, 0.65fr);
}

.work-list {
  display: grid;
  gap: 8px;
}

.work-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 0.9fr) 112px;
  align-items: center;
  gap: 10px 14px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.work-item:hover {
  border-color: rgba(21, 111, 236, 0.36);
  box-shadow: var(--shadow-hover);
}

.work-item-main {
  display: block;
  min-width: 0;
}

.work-item-main > div { min-width: 0; }

.work-item-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
  color: var(--muted);
  font-size: 13px;
  min-width: 0;
}

.work-item-meta span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-item-meta b {
  margin-right: 4px;
  color: #98a2b3;
  font-weight: 600;
}

.dashboard-side {
  display: grid;
  gap: 16px;
}

.dashboard-mini-section {
  display: grid;
  gap: 8px;
}

.dashboard-mini-section h4 {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.dashboard-mini-muted {
  padding-top: 2px;
  border-top: 1px dashed var(--line);
}

.dashboard-recap {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.recap-row {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 0 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.recap-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recap-row strong {
  color: var(--ink);
  font-size: 13px;
}

.dashboard-ops-panel {
  grid-column: 1 / -1;
}

.dashboard-ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ops-section {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.ops-section h4 {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.ops-table {
  display: grid;
  gap: 6px;
}

.ops-row {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 0 10px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(58px, 0.6fr));
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.ops-row.ops-head {
  min-height: 26px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.ops-row span,
.ops-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-row strong {
  color: var(--ink);
  font-size: 12px;
  text-align: right;
}

.ops-row.ops-head strong {
  color: var(--muted);
  font-weight: 600;
}

.ops-chart-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  align-content: start;
}

.ops-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ops-chart-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.ops-chart-summary {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 86px;
}

.ops-donut {
  width: 82px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--ops-donut));
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.ops-donut::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.ops-donut span {
  position: relative;
  z-index: 1;
  max-width: 52px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  word-break: break-all;
}

.ops-chart-legend {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.ops-chart-legend span {
  min-width: 0;
  color: var(--ink-soft);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.ops-chart-list {
  display: grid;
  gap: 10px;
}

.ops-chart-row {
  display: grid;
  gap: 6px;
}

.ops-chart-row-main,
.ops-chart-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.ops-chart-row-main span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.ops-chart-row-main strong {
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
}

.ops-bar-track {
  height: 7px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.ops-bar-track span {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
}

.ops-chart-values {
  justify-content: flex-start;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.ops-chart-values span {
  white-space: nowrap;
}

.ops-chart-values b {
  margin-right: 4px;
  color: #98a2b3;
  font-weight: 600;
}

/* === 工作中心改版：轻看板 / 今日任务队列 === */

.metrics {
  gap: 12px;
}

.metric {
  min-height: 86px;
  align-content: stretch;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border-color: var(--line);
  border-radius: 12px;
  box-shadow: 0 5px 16px rgba(20, 40, 80, 0.035);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.metric:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-hover);
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.metric-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: var(--brand);
}

.metric-copy {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  justify-content: space-between;
}

.metric span {
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 600;
}

.metric strong {
  color: var(--ink);
  font-size: 27px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.metric small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}

.metric-blue .metric-dot { background: var(--brand); }
.metric-green .metric-dot { background: var(--success); }
.metric-amber .metric-dot { background: var(--accent); }
.metric-red .metric-dot { background: var(--danger); }
.metric-grey .metric-dot,
.metric-navy .metric-dot { background: #6b7280; }

.metric-amber {
  box-shadow: inset 3px 0 0 var(--accent), 0 5px 16px rgba(20, 40, 80, 0.035);
}

.metric-red {
  box-shadow: inset 3px 0 0 var(--danger), 0 5px 16px rgba(20, 40, 80, 0.035);
}

.metric-amber small { color: var(--accent); }
.metric-red small { color: var(--danger); }

.topbar .button.primary {
  background: var(--brand);
  border-color: var(--brand);
}

.topbar .button.primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}

.dashboard-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  gap: 18px;
}

.dashboard-main-panel,
.dashboard-flow-panel,
.dashboard-conversion-panel,
.dashboard-ops-panel,
.dashboard-rail .panel {
  border-radius: var(--radius-lg);
}

.dashboard-main-panel {
  min-height: 360px;
}

.business-assistant-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(360px, 1fr);
  gap: 14px 18px;
  align-items: center;
  padding: 18px;
  border-color: #d7e2f2;
  background:
    linear-gradient(135deg, rgba(234, 241, 254, 0.95), rgba(255, 255, 255, 0.96) 44%),
    #fff;
}

.assistant-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.assistant-mode {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: var(--radius-pill);
  padding: 0 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.assistant-mode-green {
  color: var(--success);
  background: var(--success-soft);
}

.assistant-mode-amber {
  color: var(--warning);
  background: var(--warning-soft);
}

.business-assistant-copy {
  display: grid;
  gap: 5px;
}

.business-assistant-copy span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.business-assistant-copy strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
}

.business-assistant-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.business-assistant-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.business-assistant-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 13px;
  background: #fff;
  color: var(--ink);
}

.business-command-list {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.business-command {
  min-height: 30px;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--brand-ink);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.business-command:hover {
  background: var(--brand-soft);
  border-color: rgba(37, 99, 235, 0.34);
}

.business-command:active {
  transform: translateY(1px);
}

.assistant-answer {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 13px 14px;
}

.assistant-conversation {
  max-height: min(52vh, 520px);
  overflow: auto;
  align-content: start;
}

.assistant-message {
  display: grid;
  gap: 8px;
  max-width: 88%;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 14px;
  padding: 11px 12px;
  background: #fff;
}

.assistant-message.from-user {
  justify-self: end;
  border-color: rgba(37, 99, 235, 0.22);
  background: #eff6ff;
}

.assistant-message.from-vector {
  justify-self: start;
  background: #fff;
}

.assistant-message.assistant-thinking {
  color: var(--muted);
  background: #f8fbff;
}

.assistant-message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.assistant-message-head small {
  color: var(--warning);
  font-weight: 700;
}

.assistant-message p {
  margin: 0;
  color: var(--ink);
  line-height: 1.68;
}

.assistant-new-chat {
  justify-self: start;
}

.assistant-answer.empty {
  color: var(--muted);
  font-size: 13px;
}

.assistant-answer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.assistant-answer-head small {
  color: var(--warning);
  font-weight: 700;
}

.assistant-answer p {
  margin: 0;
  color: var(--ink);
  line-height: 1.65;
}

.assistant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assistant-error {
  border: 1px solid var(--danger-line);
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
}

.assistant-ops-body {
  display: grid;
  gap: 10px;
}

.assistant-ops-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.assistant-ops-body div {
  display: grid;
  gap: 3px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.assistant-ops-body span {
  color: var(--muted);
  font-size: 12px;
}

.assistant-ops-body strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.assistant-log-mini {
  display: grid;
  gap: 8px;
}

.assistant-log-mini article {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 8px 9px;
}

.assistant-log-mini article strong {
  color: var(--ink);
  font-size: 12px;
}

.assistant-log-mini article span,
.assistant-log-mini article p,
.assistant-log-empty {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.assistant-log-mini article p {
  margin: 0;
}

.dashboard-rail {
  display: grid;
  gap: 16px;
}

.compact-head {
  min-height: 56px;
  padding: 15px 16px;
}

.compact-head h3 {
  font-size: 16px;
}

.work-list {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  padding: 10px;
}

.work-item {
  grid-template-columns: minmax(0, 1fr) minmax(94px, auto) minmax(92px, auto);
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.work-item:last-child {
  border-bottom: 1px solid transparent;
}

.work-item:hover {
  border-color: var(--brand-line);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.work-item:nth-child(even) {
  background: #fff;
}

.work-item:nth-child(even):hover {
  background: #f8fafc;
}

.task-group {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #465468;
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.task-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.task-group::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--brand);
  flex: 0 0 auto;
}

.task-tone-amber .task-group::before { background: var(--accent); }
.task-tone-blue .task-group::before { background: var(--brand); }
.task-tone-green .task-group::before { background: var(--success); }
.task-tone-red .task-group::before { background: var(--danger); }

.work-item-next {
  display: grid;
  gap: 3px;
  justify-items: end;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.work-item-next small {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.work-item-next span {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-task-action {
  min-width: 96px;
  border-color: #d7dee7;
  color: var(--brand);
  background: #fff;
}

.dashboard-task-action.amber {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.dashboard-task-action.blue {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: var(--brand-line);
}

.dashboard-task-action.green {
  color: var(--success);
  background: var(--success-soft);
  border-color: var(--success-line);
}

.dashboard-task-action.red {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: var(--danger-line);
}

.dashboard-task-action:hover {
  filter: none;
  background: #fff;
}

.dashboard-empty {
  min-height: 220px;
  border: 0;
  border-radius: 0;
  display: grid;
  place-items: center;
  gap: 6px;
  color: var(--muted);
  text-align: center;
  background: var(--panel-soft);
}

.dashboard-empty strong {
  color: var(--ink);
  font-size: 16px;
}

.dashboard-empty span {
  max-width: 32em;
  line-height: 1.55;
}

.dashboard-more {
  border: 0;
  border-top: 1px solid var(--brand-line);
  border-radius: 0;
  background: var(--brand-soft-2);
  padding: 13px 14px;
  display: grid;
  gap: 8px;
}

.dashboard-more strong {
  color: var(--brand-ink);
  font-size: 14px;
}

.dashboard-more span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.dashboard-more > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-status-list {
  display: grid;
  gap: 0;
  padding-top: 4px;
}

.dashboard-status-list div {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.dashboard-status-list div:last-child {
  border-bottom: 0;
}

.dashboard-status-list strong {
  color: var(--ink);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.dashboard-check-list,
.dashboard-reminder-list {
  display: grid;
  gap: 11px;
}

.dashboard-check-list div,
.dashboard-reminder-list div {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.dashboard-check-list span,
.dashboard-reminder-list span {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: 999px;
  display: block;
  border: 2px solid var(--success);
  background: var(--success-soft);
}

.dashboard-check-list p,
.dashboard-reminder-list p {
  margin: 0;
}

.dashboard-reminder-list .reminder-red span {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.dashboard-reminder-list .reminder-amber span {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dashboard-reminder-list .reminder-blue span {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.dashboard-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-shortcut-card {
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 15px;
  display: grid;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.dashboard-shortcut-card:hover {
  border-color: var(--brand-line);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.dashboard-shortcut-card strong {
  font-size: 15px;
}

.dashboard-shortcut-card span {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.dashboard-shortcut-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.dashboard-shortcut-card em {
  align-self: end;
  color: var(--brand);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.dashboard-flow-panel,
.dashboard-conversion-panel,
.dashboard-ops-panel {
  grid-column: 1 / -1;
}

.dashboard-flow {
  display: grid;
  grid-template-columns: 1fr 28px 1fr 28px 1fr 28px 1fr 28px 1fr;
  align-items: center;
  gap: 12px;
}

.flow-step {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 10px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.flow-step:hover {
  border-color: var(--brand-line);
  box-shadow: var(--shadow-hover);
}

.flow-step:active {
  transform: translateY(1px);
}

.flow-step span {
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.flow-step strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 14px;
}

.flow-step small {
  color: var(--muted);
  font-size: 12px;
}

.flow-step.active {
  border-color: var(--brand-line);
  background: var(--brand-soft-2);
}

.flow-link {
  height: 2px;
  border-radius: 999px;
  background: var(--line-strong);
  position: relative;
}

.flow-link::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 2px solid var(--line-strong);
  border-right: 2px solid var(--line-strong);
  transform: translateY(-50%) rotate(45deg);
}

.dashboard-conversion-panel .dashboard-side {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-conversion-panel .dashboard-mini-muted {
  padding-top: 0;
  border-top: 0;
}

.dashboard-ops-panel {
  margin-top: 0;
}

@media (max-width: 1180px) {
  .dashboard-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-flow {
    grid-template-columns: 1fr;
  }

  .flow-link {
    width: 2px;
    height: 18px;
    justify-self: center;
  }

  .flow-link::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: -1px;
    transform: translateX(-50%) rotate(135deg);
  }

  .dashboard-conversion-panel .dashboard-side,
  .dashboard-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .metric {
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 82px;
  }

  .metric-mark {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .dashboard-rail,
  .dashboard-conversion-panel .dashboard-side,
  .dashboard-shortcuts {
    grid-template-columns: 1fr;
  }
}

.mini-row {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.mini-row:hover { border-color: var(--line-strong); }

.mini-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-row strong {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.compact-empty {
  padding: 10px;
  font-size: 13px;
}

.order-card,
.customer-card,
.payment-config-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  gap: 10px;
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.order-card:hover,
.customer-card:hover,
.payment-config-card:hover {
  border-color: rgba(21, 111, 236, 0.36);
  box-shadow: var(--shadow-hover);
}

.order-card {
  width: 100%;
  text-align: left;
}

.order-card.selected {
  border-color: rgba(21, 91, 213, 0.55);
  box-shadow: 0 0 0 3px rgba(21, 91, 213, 0.08);
}

/* === order/customer 行布局 === */

.order-row {
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.1fr) minmax(380px, 1.45fr) 128px;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 12px;
}

.order-row .order-identity { grid-column: 1; min-width: 0; }
.order-row .order-stage    { grid-column: 2; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 0; }
.order-row .order-stage .chip { border-radius: var(--radius-sm); padding: 3px 7px; font-size: 12px; }

.order-row .order-meta {
  grid-column: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px 10px;
  color: var(--muted);
  font-size: 13px;
  min-width: 0;
}

.order-row .order-meta span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-row .order-meta b {
  margin-right: 4px;
  color: #98a2b3;
  font-weight: 600;
}

.order-row .order-amount {
  grid-column: 4;
  display: grid;
  justify-items: end;
  gap: 3px;
  min-width: 0;
}

.order-row .order-amount strong { font-size: 15px; white-space: nowrap; }

.order-row .order-amount span {
  max-width: 100%;
  color: var(--warning);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-card header,
.customer-card header,
.payment-config-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.order-title { font-weight: 800; }

.order-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
  line-height: 1.45;
}

.customer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 13px;
}

.customer-row {
  grid-template-columns: minmax(170px, 0.9fr) minmax(120px, 0.6fr) minmax(390px, 1.7fr) minmax(240px, 1.05fr) 188px;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 12px;
  cursor: pointer;
}

.customer-row:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.customer-row .customer-identity { grid-column: 1; min-width: 0; display: grid; gap: 6px; }
.customer-row .customer-stage    { grid-column: 2; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 0; }
.customer-row .customer-stage .chip { border-radius: var(--radius-sm); padding: 3px 7px; font-size: 12px; }

.customer-row .customer-meta {
  grid-column: 3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px 10px;
  align-items: center;
  min-width: 0;
}

.customer-row .customer-meta span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-row .customer-meta b {
  margin-right: 4px;
  color: #98a2b3;
  font-weight: 600;
}

.customer-row .customer-note {
  grid-column: 4;
  color: var(--ink);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-row .customer-actions {
  grid-column: 5;
  align-self: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
}

.customer-row .customer-status {
  grid-column: 1;
  font-size: 11px;
  line-height: 1.2;
}

.customer-row .customer-update-form {
  grid-column: 1 / -1;
  margin-top: 4px;
}

.customer-row.is-editing { grid-template-columns: 1fr; }

.customer-row.is-editing header,
.customer-row.is-editing .customer-stage,
.customer-row.is-editing .customer-meta,
.customer-row.is-editing p,
.customer-row.is-editing .customer-actions,
.customer-row.is-editing .customer-status {
  grid-column: 1;
}

.customer-row.is-editing .customer-actions {
  grid-row: auto;
  justify-content: flex-start;
}

.customer-card p,
.payment-config-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}

.customer-status {
  color: var(--muted);
  font-size: 12px;
}

.customer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.customer-update-form {
  border: 1px solid rgba(22, 119, 255, 0.18);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: 12px;
  display: grid;
  gap: 12px;
}

.price-adjust-note {
  color: var(--warning);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.45;
}

/* === Chips === */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  border-radius: var(--radius-pill);
  padding: 4px 9px;
  font-size: 12px;
  color: var(--muted);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.chip.green { color: var(--success); background: var(--success-soft); border-color: var(--success-line); }
.chip.blue  { color: var(--brand-strong); background: var(--brand-soft); border-color: var(--brand-line); }
.chip.amber { color: var(--warning); background: var(--warning-soft); border-color: var(--warning-line); }
.chip.red   { color: var(--danger);  background: var(--danger-soft);  border-color: var(--danger-line);  }

/* === 表单 === */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  background: #f8fafc;
  font-size: 13px;
}

.checkbox-line.full { grid-column: 1 / -1; }

.checkbox-line input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.field.highlight textarea {
  border-color: #ffbf7a;
  box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.12);
}

label {
  font-size: 13px;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 36px;
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

textarea { min-height: 88px; resize: vertical; }

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(21, 91, 213, 0.62);
  box-shadow: var(--focus-ring);
}

.file-picker {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  cursor: pointer;
}

.file-picker input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-button {
  min-height: 30px;
  border-radius: var(--radius-sm);
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  color: #fff;
  background: var(--brand);
  font-weight: 700;
  white-space: nowrap;
}

.file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.new-order-form {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--panel-soft);
}

.form-inline-status {
  font-size: 13px;
}

.payment-confirm-form,
.payment-proof-form {
  border: 1px solid rgba(22, 119, 255, 0.18);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.payment-proof-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.payment-proof-head > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.payment-proof-head strong {
  font-size: 14px;
}

.payment-proof-head span:not(.chip) {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.payment-proof-preview {
  width: min(260px, 100%);
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
}

.payment-proof-preview img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
}

.import-guide {
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--accent-soft);
  padding: 11px 12px;
  display: grid;
  gap: 5px;
  color: var(--warning);
  font-size: 13px;
  line-height: 1.55;
}

.import-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(8, 26, 62, 0.42);
  backdrop-filter: blur(8px);
}

.import-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(8, 26, 62, 0.22);
}

.order-detail-dialog {
  width: min(760px, calc(100vw - 32px));
}

.customer-detail-dialog {
  width: min(960px, calc(100vw - 32px));
}

.verification-detail-dialog {
  width: min(820px, calc(100vw - 32px));
}

.import-dialog .panel-head {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

/* === 订单 / 客户卡片上的时间标签 === */

.order-time-label {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.time-aux {
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  line-height: 1.4;
}

.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); }

/* === 订单 / 客户筛选工具条扩展 === */

.customer-toolbar-wide {
  grid-template-columns: minmax(220px, 1.6fr) 140px 140px 200px 96px;
}

.wxshop-toolbar {
  grid-template-columns: minmax(260px, 1.5fr) 150px 140px 140px 96px;
}

.student-toolbar {
  grid-template-columns: minmax(260px, 1.5fr) minmax(180px, 0.8fr) 150px minmax(190px, 0.8fr) 96px;
}

.order-toolbar {
  margin-top: 8px;
  grid-template-columns: minmax(260px, 1fr) 150px 150px 96px;
}

@media (max-width: 1100px) {
  .customer-toolbar-wide,
  .order-toolbar,
  .wxshop-toolbar,
  .student-toolbar {
    grid-template-columns: 1fr 1fr;
  }
  .customer-toolbar-wide > :nth-child(n+3),
  .order-toolbar > :nth-child(n+3),
  .wxshop-toolbar > :nth-child(n+3),
  .student-toolbar > :nth-child(n+3) {
    grid-column: span 1;
  }
  .student-session-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* === 客户详情弹窗布局 === */

.customer-detail-modal .panel-body { padding: 18px; }

.customer-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.customer-detail-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: 14px 16px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.customer-detail-section h4 {
  margin: 0;
  font-size: 14px;
  color: var(--brand-ink);
  letter-spacing: 0.4px;
}

.customer-detail-section-wide {
  grid-column: 1 / -1;
}

.permission-event-list {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}

.permission-event-row {
  background: #fff;
  border-color: var(--line);
  grid-template-columns: minmax(0, 1fr) minmax(160px, auto);
}

.permission-event-row span,
.permission-event-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.follow-log {
  margin-top: 10px;
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.follow-log-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: #fff;
  display: grid;
  gap: 4px;
}

.follow-log-time {
  color: var(--muted);
  font-size: 12px;
}

.follow-log-note {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

@media (max-width: 880px) {
  .customer-detail-grid { grid-template-columns: 1fr; }
}

/* === 客户核验详情 === */

.verification-detail-body {
  display: grid;
  gap: 16px;
}

.verification-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.verification-detail-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  padding: 12px;
}

.verification-detail-row span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.verification-detail-row p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.verification-detail-row-strong {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.verification-detail-row-wide {
  grid-column: 1 / -1;
}

.verification-note-field {
  display: grid;
  gap: 8px;
}

.verification-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 760px) {
  .verification-detail-grid,
  .verification-action-grid {
    grid-template-columns: 1fr;
  }
}

/* === 详情 / 链接 === */

.detail-empty {
  color: var(--muted);
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
}

.detail-empty.compact-empty {
  min-height: auto;
  place-items: start;
  text-align: left;
}

.detail-stack { display: grid; gap: 14px; }

.detail-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  font-size: 14px;
  min-width: 0;
}

.detail-row span:first-child { color: var(--muted); }
.detail-row > * { min-width: 0; overflow-wrap: anywhere; }

.link-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  color: var(--brand-strong);
  overflow-wrap: anywhere;
  word-break: break-word;
  background: var(--panel-soft);
  font-size: 13px;
}

.mapping-log {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: grid;
  gap: 8px;
}

.mapping-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  font-size: 13px;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mapping-item a {
  color: var(--brand-strong);
  overflow-wrap: anywhere;
}

.delivery-checklist-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 12px;
}

.delivery-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.delivery-head > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.delivery-head strong {
  color: var(--ink);
}

.delivery-head span {
  color: var(--muted);
  font-size: 13px;
}

.delivery-alert {
  min-height: auto;
  padding: 9px 10px;
}

.delivery-items {
  display: grid;
  gap: 8px;
}

.delivery-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.delivery-item.checked {
  border-color: var(--success-line);
  background: var(--success-soft);
}

.delivery-item input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
}

.delivery-item span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.delivery-item strong {
  color: var(--ink);
  font-size: 13px;
}

.delivery-item a {
  width: fit-content;
  color: var(--brand-strong);
  font-size: 12px;
}

.delivery-item em,
.delivery-updated {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.customer-order-links {
  display: grid;
  gap: 8px;
}

.detail-stack .actions { justify-content: flex-start; }

.detail-stack .actions .button {
  white-space: normal;
  text-align: center;
}

/* =============================================================
   登录 / 客户支付页
   ============================================================= */

.login-screen,
.client-screen {
  min-height: 100vh;
  padding: 28px;
  display: grid;
  place-items: center;
}

.client-screen {
  align-items: start;
  padding: 42px 22px;
}

.login-card,
.client-card {
  width: min(100%, 1080px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.login-card { max-width: 430px; }

.client-screen .client-card {
  width: min(100%, 1180px);
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  box-shadow: 0 28px 80px rgba(8, 22, 58, 0.13);
}

.login-hero,
.client-hero {
  padding: 24px;
  background: linear-gradient(135deg, var(--brand-bg) 0%, #0c2c85 64%, #1677ff 100%);
  color: #fff;
}

.client-screen .client-hero {
  min-height: 620px;
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-card header p,
.client-card header p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

.login-card .panel-body,
.client-card .panel-body {
  padding: 22px;
}

.client-screen .panel-body { padding: 24px; }

.client-brand-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
}

.client-screen .client-brand-row {
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 28px;
}

.client-hero h2 {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.client-screen .client-hero h2 {
  font-size: 34px;
  line-height: 1.1;
}

.client-price-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.client-price-line strong {
  font-size: 36px;
  line-height: 1;
}

.client-screen .client-price-line strong { font-size: 44px; }

.list-price {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: line-through;
  font-size: 15px;
}

/* 替代旧 vip-note：作为 chip 紧贴价格行 */
.vip-chip {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

/* 新增：报名页 hero 订单摘要 */
.order-summary {
  margin: 22px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 8px;
  color: #fff;
  font-size: 14px;
}

.order-summary > div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.order-summary dt {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.order-summary dd {
  margin: 0;
  color: #fff;
  overflow-wrap: anywhere;
}

.order-summary dd.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.order-summary dd strong {
  font-size: 16px;
  font-weight: 800;
}

.client-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

.client-trust,
.payment-guidance {
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--brand-soft-2);
  display: grid;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.55;
}

.client-trust strong { color: var(--ink); }

/* 新增：退款条款抽屉 */
.refund-disclosure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  overflow: hidden;
}

.refund-disclosure > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.refund-disclosure > summary::-webkit-details-marker { display: none; }

.refund-disclosure > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 180ms ease;
  margin-right: 4px;
}

.refund-disclosure[open] > summary::after { transform: rotate(225deg); }

.refund-body {
  padding: 0 14px 14px;
  display: grid;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.65;
  border-top: 1px solid var(--line);
}

.refund-body p { margin: 12px 0 0; }

.checkline {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.checkline-confirm {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.proof-choice input,
.checkline input {
  width: auto;
  min-height: auto;
  margin: 2px 0 0;
  flex: 0 0 auto;
}

/* 新增：右栏金额复述条 */
.pay-amount-recap {
  border: 1px solid var(--brand-line);
  background: var(--brand-soft);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.recap-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.recap-amount {
  color: var(--brand-ink);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}

.recap-meta {
  color: var(--muted);
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

.pay-methods {
  display: grid;
  gap: 10px;
  align-content: start;
  position: sticky;
  top: 24px;
}

.pay-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  gap: 8px;
  background: var(--panel-soft);
}

.pay-card.disabled { opacity: 0.82; }

.pay-card.qr-only {
  padding: 16px;
  justify-items: center;
  background: #fff;
}

.pay-card.qr-only strong {
  justify-self: start;
  width: 100%;
}

.pay-card.qr-only .qr-image {
  width: min(100%, 238px);
  aspect-ratio: 1;
  max-height: none;
  border: 0;
  border-radius: var(--radius);
}

.pay-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.qr-image {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.payment-config-list { display: grid; gap: 10px; }

.payment-config-thumb {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.lead-pool-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.lead-pool-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 11px 12px;
  display: grid;
  gap: 4px;
  min-width: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.lead-pool-card:hover,
.lead-pool-card.active {
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.lead-pool-card:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.lead-pool-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.lead-pool-card strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.lead-pool-card small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-pool-card-blue { border-left: 3px solid var(--brand); }
.lead-pool-card-amber { border-left: 3px solid var(--warning); }
.lead-pool-card-green { border-left: 3px solid var(--success); }
.lead-pool-card-neutral { border-left: 3px solid #98a2b3; }

.lead-pool-context {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--muted);
  padding: 9px 12px;
  margin-bottom: 12px;
  font-size: 13px;
}

.lead-pool-context strong {
  color: var(--ink);
  white-space: nowrap;
}

.lead-management-details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 12px;
  overflow: hidden;
}

.lead-management-details summary {
  min-height: 42px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.lead-management-details summary::-webkit-details-marker {
  display: none;
}

.lead-management-details summary span {
  font-size: 14px;
  font-weight: 800;
}

.lead-management-details summary small {
  color: var(--muted);
  font-size: 12px;
}

.lead-management-details summary::after {
  content: "展开";
  flex: 0 0 auto;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.lead-management-details[open] summary {
  border-bottom: 1px solid var(--line);
}

.lead-management-details[open] summary::after {
  content: "收起";
}

.lead-management-body {
  padding: 12px;
  display: grid;
  gap: 12px;
  background: var(--panel-soft);
}

.lead-management-body .lead-rule-panel,
.lead-management-body .active-dev-panel {
  margin-bottom: 0;
}

.lead-rule-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  margin-bottom: 12px;
  overflow: hidden;
}

.lead-rule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}

.lead-rule-head strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.lead-rule-head span {
  color: var(--muted);
  font-size: 12px;
}

.lead-rule-head-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.lead-rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.lead-rule-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: 11px;
  display: grid;
  gap: 10px;
}

.lead-rule-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.lead-rule-card header strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.lead-rule-card header span:not(.chip) {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.lead-rule-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.lead-rule-metrics div {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 8px;
  min-width: 0;
}

.lead-rule-metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-rule-metrics strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.lead-rule-note {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.55;
}

.lead-rule-list {
  display: grid;
  gap: 6px;
}

.lead-rule-list-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.lead-rule-customer {
  background: #fff;
  border-color: var(--line);
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.lead-rule-customer.wake {
  border-left-color: #12805c;
}

.customer-sync-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  margin-bottom: 12px;
  overflow: hidden;
}

.customer-sync-panel > summary {
  cursor: pointer;
  list-style: none;
}

.customer-sync-panel > summary::-webkit-details-marker {
  display: none;
}

.customer-sync-panel:not([open]) {
  background: #fff;
}

.customer-sync-panel:not([open]) .lead-rule-head {
  border-bottom: 0;
}

.customer-sync-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.customer-sync-source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.customer-sync-source {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 9px 10px;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.customer-sync-source strong,
.customer-sync-candidate strong {
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-sync-source span,
.customer-sync-preview-head span,
.customer-sync-candidate span {
  color: var(--muted);
  font-size: 12px;
}

.customer-sync-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.customer-sync-summary div {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 8px;
  min-width: 0;
}

.customer-sync-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-sync-summary strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.customer-sync-guide {
  color: var(--muted-strong);
}

.customer-sync-error,
.customer-sync-result {
  margin: 0;
}

.customer-sync-preview {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: grid;
  gap: 8px;
}

.customer-sync-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.customer-sync-preview-head strong {
  color: var(--ink);
}

.customer-sync-candidates {
  display: grid;
  gap: 7px;
}

.customer-sync-candidate {
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: minmax(220px, 0.35fr) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.customer-sync-candidate > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.customer-sync-candidate p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 12.5px;
  line-height: 1.5;
  min-width: 0;
}

.active-dev-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  margin-bottom: 12px;
  overflow: hidden;
}

.active-dev-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}

.active-dev-head strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.active-dev-head span:not(.chip) {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.active-dev-list {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
}

.active-dev-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  padding: 9px 10px;
}

.active-dev-card strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.active-dev-card span:not(.chip) {
  color: var(--muted);
  font-size: 12px;
}

.active-dev-card-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

/* 直播线索卡片：列表页只保留判断和动作，长文本在主内容区内收缩 */
.wxshop-row {
  grid-template-columns: minmax(0, 1fr) minmax(94px, auto);
  align-items: start;
  gap: 12px 18px;
  padding: 15px 16px;
  cursor: pointer;
}
.wxshop-row:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.wxshop-row-main {
  grid-column: 1;
  min-width: 0;
  display: grid;
  gap: 8px;
}

.wxshop-row-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  min-width: 0;
}

.wxshop-row .customer-identity {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.wxshop-row .customer-identity > div {
  min-width: 0;
}
.wxshop-row .customer-identity .order-title {
  font-size: 14.5px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wxshop-row .customer-identity .order-sub {
  margin-top: 0;
  font-size: 12.5px;
  line-height: 1.4;
}
.wxshop-row .wxshop-subline {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  min-width: 0;
  max-width: 100%;
}
.wxshop-row .wxshop-subline span {
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wxshop-row .wxshop-subline span:not(:last-child)::after {
  content: "·";
  margin-left: 6px;
  color: #b6bdc8;
}

.wxshop-row .customer-stage {
  grid-column: 1;
  display: flex;
  align-items: flex-start;
  align-content: flex-start;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 100%;
  min-width: 0;
}
.wxshop-row .customer-stage .chip {
  border-radius: var(--radius-sm);
  padding: 3px 7px;
  font-size: 12px;
}

.wxshop-row-focus {
  max-width: 100%;
  color: var(--warning);
  font-size: 12.5px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wxshop-row .customer-meta {
  grid-column: 1;
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr);
  gap: 5px 12px;
  align-items: center;
  color: var(--muted);
  font-size: 12.5px;
  min-width: 0;
}
.wxshop-row .customer-meta span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wxshop-row .customer-meta b {
  margin-right: 4px;
  color: #98a2b3;
  font-weight: 600;
}

.wxshop-row .customer-actions {
  grid-column: 2;
  align-self: center;
  display: grid;
  justify-items: stretch;
  gap: 6px;
  margin-top: 0;
  padding-top: 0;
  min-width: 92px;
}

.wxshop-row .customer-actions .button {
  justify-content: center;
  white-space: nowrap;
}

.student-row .customer-meta {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.student-session-overview {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.student-session-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.student-session-kpis div,
.student-session-card,
.student-session-empty {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.student-session-kpis div {
  min-height: 72px;
  padding: 12px 14px;
  display: grid;
  align-content: space-between;
}

.student-session-kpis span,
.student-session-card small,
.student-session-empty span {
  color: var(--muted);
  font-size: 13px;
}

.student-session-kpis strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.student-session-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.student-session-card {
  min-height: 132px;
  padding: 14px;
  text-align: left;
  display: grid;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.student-session-card:hover,
.student-session-card.active {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.student-session-card.active {
  background: #eff6ff;
}

.student-session-card .session-title {
  color: var(--ink);
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-session-card strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.session-mini-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.session-mini-metrics span {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel-soft);
  padding: 3px 8px;
  font-size: 12px;
}

.student-session-empty {
  min-height: 96px;
  padding: 16px;
  display: grid;
  gap: 6px;
  align-content: center;
}

.student-session-empty strong {
  color: var(--ink);
}

.student-record-list {
  display: grid;
  gap: 8px;
}

.student-public-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
}

.student-public-result {
  display: grid;
  gap: 14px;
  align-content: start;
}

.student-public-summary {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: 12px;
}

.wxshop-service-form {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}

/* 错误信息内联在 identity 下方，紧凑橙色文字（不再独占整块 alert） */
.wxshop-row-alert {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--warning);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 详情弹窗里的 detail-row 仍保留小标题 84px 列宽 */
.wxshop-card .detail-row,
.wxshop-row .detail-row {
  grid-template-columns: 84px minmax(0, 1fr);
}

/* 窄屏（< 1100px）回退为多行堆叠，避免列被挤爆 */
@media (max-width: 1100px) {
  .business-assistant-panel,
  .business-command-list {
    grid-template-columns: 1fr;
    grid-column: 1;
  }

  .business-assistant-form {
    grid-template-columns: 1fr;
  }

  .work-item {
    grid-template-columns: 1fr;
  }

  .work-item-next {
    justify-items: start;
  }

  .lead-pool-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-pool-context {
    display: grid;
  }

  .lead-rule-head,
  .active-dev-head {
    align-items: flex-start;
    display: grid;
  }

  .lead-rule-head-meta {
    justify-content: flex-start;
  }

  .lead-rule-grid {
    grid-template-columns: 1fr;
  }

  .active-dev-card {
    grid-template-columns: 1fr;
  }

  .active-dev-card-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .wxshop-row {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .wxshop-row-top {
    grid-template-columns: 1fr;
  }
  .wxshop-row .customer-actions {
    grid-column: 1;
  }
  .wxshop-row .customer-stage {
    justify-content: flex-start;
    max-width: none;
  }
  .wxshop-row .customer-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wxshop-row .customer-actions {
    justify-content: flex-start;
  }
}

.service-screen .client-card { width: min(100%, 960px); }

.service-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.service-contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: 16px;
  display: grid;
  gap: 12px;
  justify-items: stretch;
}

.service-qr {
  width: min(100%, 260px);
  aspect-ratio: 1;
  object-fit: contain;
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.proof-box {
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  gap: 10px;
  background: var(--brand-soft-2);
}

.proof-box h3 { font-size: 16px; }

.proof-box p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.proof-choice {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  background: #fff;
}

.qr-placeholder {
  height: 154px;
  border: 1px dashed #9fb9e8;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #fff;
  text-align: center;
  padding: 12px;
}

/* === 状态条/通知 === */

.alert {
  border: 1px solid var(--warning-line);
  color: var(--warning);
  background: var(--warning-soft);
  border-radius: var(--radius);
  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.55;
}

.status-banner {
  border: 1px solid var(--success-line);
  color: var(--success);
  background: var(--success-soft);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.5;
}

.status-banner strong { color: var(--ink); white-space: nowrap; }

.status-banner.warning {
  border-color: var(--warning-line);
  color: var(--warning);
  background: var(--warning-soft);
}

.success {
  border: 1px solid var(--success-line);
  color: var(--success);
  background: var(--success-soft);
  border-radius: var(--radius);
  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.55;
}

.error {
  border: 1px solid var(--danger-line);
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: var(--radius);
  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.55;
}

.hidden { display: none !important; }

/* === Skeleton === */

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(216, 226, 242, 0.7);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: shimmer 1.2s infinite;
}

.skeleton-title  { width: 62%; height: 38px; background: rgba(255, 255, 255, 0.22); }
.skeleton-price  { width: 44%; height: 48px; background: rgba(255, 255, 255, 0.28); }
.skeleton-line   { width: 52%; height: 20px; background: rgba(255, 255, 255, 0.18); }
.skeleton-panel  { height: 92px; }
.skeleton-input  { height: 72px; }
.skeleton-qr     { height: 268px; }

@keyframes shimmer { 100% { transform: translateX(100%); } }

/* =============================================================
   微信支付二维码区
   ============================================================= */

.wxpay-qr-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.wxpay-state {
  text-align: center;
  padding: 32px 24px;
  border-radius: var(--radius);
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.wxpay-state strong {
  display: block;
  font-size: 18px;
  margin: 12px 0 6px;
  color: var(--ink);
}

.wxpay-state p {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 8px;
}

.wxpay-icon-row {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}

/* 内联 SVG 图标尺寸自带 width/height，无需额外样式 */
.wxpay-svg { display: block; }

.wxpay-desc {
  font-size: 13px !important;
  line-height: 1.6;
  max-width: 260px;
  margin: 0 auto 16px !important;
}

.wxpay-state.generating { padding: 40px 24px; }

.spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 16px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.wxpay-state.active {
  background: #fff;
  border-color: var(--line);
}

.wxpay-qr-canvas {
  display: flex;
  justify-content: center;
  margin: 16px auto;
}

.wxpay-qr-canvas canvas,
.wxpay-qr-canvas img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.wxpay-timer {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

.wxpay-timer span {
  font-variant-numeric: tabular-nums;
  color: var(--danger);
  font-weight: 600;
}

.wxpay-hint {
  font-size: 12px !important;
  color: var(--muted) !important;
  max-width: 260px;
  margin: 0 auto !important;
}

.wxpay-state.success-state {
  background: var(--success-soft);
  border-color: var(--success-line);
}

.wxpay-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 8px;
}

.wxpay-txn {
  font-size: 12px !important;
  color: var(--muted) !important;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  margin-top: 4px !important;
}

.wxpay-state.fallback {
  text-align: left;
  padding: 24px;
}

.wxpay-state.fallback strong {
  text-align: center;
  margin-bottom: 16px;
}

.form-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.submit-hint {
  font-size: 12px;
  color: var(--muted);
}

#client-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* =============================================================
   响应式断点
   ============================================================= */

@media (max-width: 1180px) {
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .workspace,
  .workspace.customer-workspace,
  .dashboard-workspace {
    grid-template-columns: 1fr;
  }

  .customer-row,
  .order-row,
  .work-item {
    grid-template-columns: 1fr;
  }

  .order-row .order-identity,
  .order-row .order-stage,
  .order-row .order-meta,
  .order-row .order-amount,
  .work-item .task-group,
  .work-item .work-item-main,
  .work-item .work-item-meta,
  .work-item .customer-actions,
  .customer-row header,
  .customer-row .customer-meta,
  .customer-row p,
  .customer-row .customer-actions,
  .customer-row .customer-status {
    grid-column: 1;
  }

  .order-row .order-amount { justify-items: start; }

  .customer-row .customer-actions {
    grid-row: auto;
    justify-content: flex-start;
  }

  .work-item .customer-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }

  .dashboard-ops-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
    max-width: 100vw;
    height: auto;
    overflow-y: visible;
    min-height: auto;
    padding: 10px 16px 12px;
    gap: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(20, 40, 80, 0.08);
    overflow-x: hidden;
  }

  .brand {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 2px 10px;
    padding: 0;
    border-bottom: 0;
    min-width: 0;
  }

  .sidebar .brand-logo {
    grid-row: 1 / 3;
    width: 104px;
  }

  .brand h1 {
    margin: 0;
    font-size: 15px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand p {
    font-size: 12px;
  }

  .nav-section-label {
    display: none;
  }

  .page-tabs,
  .primary-tabs {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .page-tabs::-webkit-scrollbar,
  .primary-tabs::-webkit-scrollbar,
  .nav-group-body::-webkit-scrollbar {
    display: none;
  }

  .page-tabs {
    flex-direction: column;
    overflow: visible;
    padding-bottom: 0;
  }

  .main {
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
  }

  .page-tab {
    flex: 0 0 auto;
    min-height: 38px;
    min-width: max-content;
    border-color: var(--line);
    background: #fff;
    box-shadow: none;
  }

  .nav-item {
    flex: 0 0 auto;
  }

  .nav-item-filters {
    display: none;
  }

  .page-tab.active {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
    box-shadow: none;
  }

  .page-tab.active strong {
    color: #fff;
  }

  .sidebar-filter-group {
    flex: 0 0 auto;
    min-width: 178px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
  }

  .nav-group-toggle {
    min-height: 34px;
    padding: 0 10px;
  }

  .nav-group-body {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0 8px 8px;
  }

  .nav-group-body.collapsed {
    display: none;
  }

  .sidebar-filter-group .nav-button {
    flex: 0 0 auto;
    min-height: 30px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
  }

  .side-note,
  .user-block {
    display: none;
  }

  .client-screen .client-card { display: block; }

  .client-screen .client-hero {
    min-height: auto;
    padding: 26px 22px;
  }

  .client-screen .client-brand-row { margin-bottom: 22px; }

  .client-layout { grid-template-columns: 1fr; }

  .service-layout { grid-template-columns: 1fr; }

  .customer-sync-source-list,
  .customer-sync-summary,
  .customer-sync-candidate {
    grid-template-columns: 1fr;
  }

  .pay-methods {
    order: -1;
    position: static;
  }
}

@media (max-width: 720px) {
  .wxpay-state { padding: 24px 16px; }

  .wxpay-qr-canvas canvas,
  .wxpay-qr-canvas img {
    width: 180px !important;
    height: 180px !important;
  }
}

@media (max-width: 640px) {
  .main,
  .login-screen,
  .client-screen {
    padding: 16px;
  }

  .sidebar {
    padding: 10px 12px;
  }

  .sidebar .brand-logo {
    width: 92px;
  }

  .brand h1 {
    font-size: 14px;
  }

  .brand p {
    display: none;
  }

  .page-tab {
    min-height: 36px;
    padding: 0 10px;
    font-size: 13px;
  }

  .topbar {
    gap: 10px;
    padding: 12px;
    margin-bottom: 12px;
  }

  .page-hint {
    display: none;
  }

  .topbar .actions {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .topbar .actions::-webkit-scrollbar {
    display: none;
  }

  .topbar .actions .button {
    flex: 0 0 auto;
  }

  .topbar,
  .order-card header,
  .customer-card header,
  .client-brand-row {
    flex-direction: column;
    align-items: flex-start;
  }

	  .form-grid,
	  .customer-toolbar,
	  .dashboard-recap,
    .dashboard-ops-grid {
	    grid-template-columns: 1fr;
	  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
  }

  .metric {
    min-height: 68px;
    padding: 10px 11px;
    gap: 8px;
  }

  .metric-copy {
    display: grid;
    gap: 2px;
  }

  .metric strong {
    font-size: 23px;
  }

  .metric small {
    font-size: 11.5px;
  }

  .scope-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 8px;
    padding: 9px 10px;
  }

  .scope-bar span {
    display: none;
  }

  .scope-bar select {
    width: 100%;
    min-width: 0;
  }

  .status-banner {
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 10px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .panel-head {
    padding: 13px 14px;
  }

  .panel-body {
    padding: 14px;
  }

  .import-modal {
    padding: 14px;
    align-items: end;
  }

  .import-dialog {
    width: 100%;
    max-height: calc(100dvh - 28px);
  }

  h2 { font-size: 23px; }

  .client-screen .client-hero h2 { font-size: 26px; }
  .client-screen .client-price-line strong { font-size: 34px; }

  .order-summary > div { grid-template-columns: 56px minmax(0, 1fr); }
}

@media (max-width: 380px) {
  .metrics {
    grid-template-columns: 1fr;
  }
}

/* =============================================================
   自用样板：Vector 首页对话入口
   ============================================================= */

.main-home {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding-block: 40px;
}

.dashboard-workspace {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-dialog-workspace {
  width: min(100%, 860px);
  justify-self: center;
  align-self: center;
}

.business-home {
  display: grid;
  gap: 0;
}

.business-home-copy {
  display: grid;
  gap: 10px;
  text-align: center;
}

.business-home-copy span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.business-home-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: 0;
}

.business-home-copy p {
  width: min(100%, 720px);
  margin: 0 auto;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.business-assistant-panel {
  padding: 22px;
  border-color: #cfdcf0;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.98) 48%),
    #fff;
}

.vector-hero-panel {
  min-height: 252px;
  align-content: center;
}

.vector-home-panel {
  grid-template-columns: 1fr;
  gap: 22px;
  min-height: 320px;
  align-content: space-between;
  padding: clamp(20px, 4vw, 34px);
  border-color: #dde6f2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.08);
}

.vector-home-panel .business-assistant-copy {
  text-align: left;
  gap: 8px;
}

.vector-home-panel .business-assistant-copy span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.vector-home-panel .business-assistant-copy strong {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
}

.vector-home-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.vector-home-answer {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.business-assistant-copy strong {
  font-size: 23px;
  line-height: 1.35;
  letter-spacing: 0;
}

.business-assistant-copy small {
  color: var(--muted);
  line-height: 1.7;
}

.business-assistant-form {
  align-self: end;
}

.business-assistant-form input {
  min-height: 46px;
}

.business-assistant-form input,
.assistant-dock-form input {
  font-size: 14px;
}

.work-list {
  border: 0;
  background: transparent;
  padding: 0;
  gap: 10px;
}

.work-item {
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto) auto;
  gap: 12px 18px;
  min-height: 96px;
  padding: 16px 18px;
  border-color: #dde5f0;
  border-radius: 12px;
  background: #fff;
}

.work-item-main {
  display: grid;
  gap: 8px;
}

.task-line {
  min-width: 0;
}

.work-item .order-title {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

.work-item .order-sub {
  max-width: 68ch;
  color: var(--muted);
  line-height: 1.55;
  white-space: normal;
}

.work-item-next {
  justify-items: start;
  align-self: center;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  white-space: normal;
}

.work-item-next small {
  color: var(--muted);
  font-weight: 700;
}

.work-item-next strong {
  max-width: 150px;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-item .customer-actions {
  justify-content: flex-end;
  align-self: center;
}

.dashboard-task-action {
  min-width: 104px;
  white-space: nowrap;
}

.dashboard-task-vector {
  min-width: 86px;
  white-space: nowrap;
}

.assistant-context-chip {
  min-width: 0;
  border: 1px solid #d6e4ff;
  border-radius: 12px;
  background: #f5f9ff;
  color: #315484;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-dock {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: grid;
  justify-items: end;
  gap: 10px;
  pointer-events: none;
}

.assistant-dock-toggle,
.assistant-dock-panel {
  pointer-events: auto;
}

.assistant-dock-toggle {
  min-width: 154px;
  min-height: 46px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 999px;
  background: #0f2f6f;
  color: #fff;
  box-shadow: 0 16px 42px rgba(15, 47, 111, 0.22);
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 800;
}

.assistant-dock-toggle small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 700;
}

.assistant-dock-panel {
  width: min(420px, calc(100vw - 32px));
  max-height: min(680px, calc(100dvh - 104px));
  overflow: auto;
  border: 1px solid #cfdcf0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 70px rgba(16, 24, 40, 0.24);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.assistant-dock-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.assistant-dock-head div {
  display: grid;
  gap: 4px;
}

.assistant-dock-head strong {
  color: var(--ink);
  font-size: 16px;
}

.assistant-dock-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.assistant-dock-head .assistant-dock-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.assistant-dock-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.assistant-dock-form input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
}

.assistant-dock-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assistant-dock .assistant-answer {
  border-radius: 12px;
  background: #f8fbff;
}

@media (max-width: 1180px) {
  .dashboard-workspace {
    grid-template-columns: 1fr;
  }

  .business-assistant-panel {
    grid-template-columns: 1fr;
  }

  .business-command-list {
    grid-column: 1;
  }
}

@media (max-width: 860px) {
  .main-home {
    min-height: auto;
    padding: 16px;
  }

  .assistant-message {
    max-width: 100%;
  }

  .business-home {
    gap: 14px;
  }

  .business-home-copy {
    text-align: left;
  }

  .business-home-copy h2 {
    font-size: 30px;
  }

  .business-home-copy p {
    margin: 0;
    font-size: 14px;
  }

  .vector-home-panel {
    padding: 18px;
    min-height: 280px;
  }

  .vector-home-form {
    grid-template-columns: 1fr;
  }

  .work-item {
    grid-template-columns: 1fr;
  }

  .student-session-kpis,
  .student-session-grid {
    grid-template-columns: 1fr;
  }

  .work-item .customer-actions {
    justify-content: stretch;
  }

  .dashboard-task-action {
    width: 100%;
  }

  .assistant-dock {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .assistant-dock-toggle {
    width: 100%;
  }

  .assistant-dock-panel {
    width: 100%;
    max-height: min(620px, calc(100dvh - 86px));
    border-radius: 14px;
  }
}

/* =============================================================
   减动效 / 打印（无障碍 + 离线场景）
   ============================================================= */

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

  .skeleton::after { animation: none; }
  .spinner { animation: none; border-top-color: var(--brand); }
}

@media print {
  :root { color-scheme: light; }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .sidebar,
  .topbar .actions,
  .panel-actions,
  .form-actions,
  .pay-methods,
  .refund-disclosure > summary::after,
  #wxpay-qr-section,
  .button {
    display: none !important;
  }

  .shell { grid-template-columns: 1fr; }
  .main { width: auto; padding: 0; }
  .panel,
  .client-card,
  .login-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
  }

  .client-screen .client-card { display: block; }
  .client-screen .client-hero {
    background: #fff !important;
    color: #000 !important;
    border-bottom: 1px solid #ccc;
    min-height: auto;
  }
  .client-hero h2,
  .client-screen .client-price-line strong,
  .order-summary,
  .order-summary dt,
  .order-summary dd { color: #000 !important; }
  .order-summary { background: #fff !important; border-color: #ccc !important; }

  .refund-disclosure[open] > summary { font-weight: 700; }
  .refund-disclosure { border-color: #ccc !important; background: #fff !important; }
  .refund-body { display: block !important; }

  a::after { content: " (" attr(href) ")"; font-size: 10pt; color: #444; }
}
