/* ==========================================================================
   驿站饰品 · 统一视觉层 (Theme layer)
   --------------------------------------------------------------------------
   设计定位：账本感的运营控制台。
   - 深墨蓝作为"品牌面"（侧边栏 / 登录左屏），浅纸灰作为"工作面"
   - 主色取钢蓝（沉稳、金融感），黄铜色只用于金额与关键强调
   - 一套圆角与阴影，数字统一等宽，避免花哨渐变与紫色默认
   加载顺序：必须在 style.css / landing.css 之后。
   ========================================================================== */

:root {
  /* 品牌面 */
  --ink-900: #0b1219;
  --ink-800: #101a24;
  --ink-700: #182532;
  --ink-600: #22323f;

  /* 工作面 */
  --bg: #f3f5f7;
  --bg-soft: #eef1f4;
  --card: #ffffff;
  --surface-2: #f8fafc;

  /* 线 */
  --border: #e2e8ef;
  --border-light: #edf1f5;
  --border-strong: #cfd8e3;

  /* 文本 */
  --text: #15202b;
  --text-2: #48586c;
  --muted: #5f7288;

  /* 主色：钢蓝 */
  --primary: #2f5f8f;
  --primary-dark: #254c74;
  --primary-light: #eaf1f8;
  --primary-line: #c9dceb;

  /* 强调：黄铜（金额 / 关键数字） */
  --brass: #9a6a24;
  --brass-strong: #8a5f1f;
  --brass-tint: #f8f0e1;
  --brass-line: #e8d6b4;

  /* 语义 */
  --danger: #b23a32;
  --danger-tint: #fbeeed;
  --success: #2e7d63;
  --success-tint: #e9f5f0;
  --warn: #b4741f;

  /* 形状与光影 */
  --radius: 12px;
  --r-lg: 16px;
  --r-md: 10px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 26, 36, 0.05), 0 8px 24px -12px rgba(16, 26, 36, 0.12);
  --shadow-lift: 0 2px 4px rgba(16, 26, 36, 0.05), 0 16px 32px -18px rgba(16, 26, 36, 0.22);
  --ring: 0 0 0 3px rgba(47, 95, 143, 0.18);


  /* 字体 */
  --font-sans: ui-sans-serif, "Segoe UI Variable Text", "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-num: "SF Mono", "Cascadia Mono", "Segoe UI Mono", ui-monospace, monospace;
}

/* 外壳尺寸只在桌面端接管：≤900px 时 style.css 会切到抽屉式导航
   （--sidebar-w: 0），若无条件在 :root 覆盖，移动端会永远保留 236px 侧栏。 */
@media (min-width: 901px) {
  :root {
    --sidebar-w: 236px;
    --topbar-h: 68px;
  }
}

/* ── 基础 ─────────────────────────────────────────────────────────────── */

body {
  font-family: var(--font-sans);
  background:
    radial-gradient(1200px 520px at 18% -10%, #ffffff 0%, rgba(255, 255, 255, 0) 70%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(47, 95, 143, 0.16);
}

:is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ── 应用外壳 ─────────────────────────────────────────────────────────── */

.app-shell {
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  grid-template-rows: var(--topbar-h) minmax(0, 1fr);
  background: transparent;
}

/* 侧边栏：深墨蓝品牌面 */
.sidebar {
  background:
    radial-gradient(420px 260px at 50% -12%, rgba(169, 118, 43, 0.16), transparent 70%),
    linear-gradient(180deg, var(--ink-800) 0%, var(--ink-900) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 18px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 99px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 8px 16px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}

.sidebar-brand .brand-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(150deg, #c08a37, #8a5f1f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 6px 16px -8px rgba(169, 118, 43, 0.8);
  color: #1a1205;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.sidebar-brand strong {
  display: block;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: #fff;
}

.sidebar-brand small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* 分组 */
.side-tabs {
  flex: 1;
  gap: 0;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.nav-group-label {
  margin: 0 0 4px;
  padding: 0 10px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.side-tabs .tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: var(--r-sm);
  background: transparent;
  color: rgba(255, 255, 255, 0.64);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.side-tabs .tab:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.side-tabs .tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 600;
}

.side-tabs .tab.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 18px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #d8a349, #a9762b);
  transform: translateY(-50%);
}

/* 覆盖旧层里残留的白色/紫色激活态 */
.sidebar .side-tabs .tab.active::after { display: none; }
.sidebar .side-tabs .tab.active { background: rgba(255, 255, 255, 0.1); color: #fff; }

.tab-icon {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  flex-shrink: 0;
  opacity: 0.92;
}

.tab-icon svg { width: 16px; height: 16px; stroke-width: 1.75; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 12px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
}

.sidebar-user-meta strong {
  display: block;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-user-meta #system-user-badge,
.sidebar-user-meta span {
  color: rgba(255, 255, 255, 0.88);
  font-size: 12.5px;
  font-weight: 550;
}

/* 顶栏 */
.topbar {
  padding: 0 clamp(16px, 2vw, 28px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(160%) blur(10px);
  gap: 16px;
}

.page-heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.page-heading #page-eyebrow,
.page-heading > span {
  color: var(--brass);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.page-heading h1 {
  margin: 0;
  color: var(--text);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 340px;
  margin-left: auto;
  padding: 0 12px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--muted);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.topbar-search:focus-within {
  border-color: var(--primary-line);
  background: #fff;
  box-shadow: var(--ring);
}

.topbar-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

.topbar-search svg { width: 15px; height: 15px; stroke-width: 1.8; }

.topbar-actions { gap: 6px; }

.icon-btn {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.icon-btn:hover {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--primary);
}

.icon-btn svg { width: 17px; height: 17px; stroke-width: 1.8; }

.notification-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 99px;
  background: var(--brass);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
}

.topbar-notification { position: relative; }

.user-menu summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: #fff;
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
  list-style: none;
}

.user-menu summary::-webkit-details-marker { display: none; }

.user-menu summary:hover { border-color: var(--border-strong); }

.topbar-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 12px;
  font-weight: 650;
}

.user-menu-popover {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}

.user-menu-popover button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.user-menu-popover button:hover { background: var(--surface-2); color: var(--primary); }

/* ── 内容区 ───────────────────────────────────────────────────────────── */

.content {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: clamp(16px, 1.6vw, 26px) clamp(16px, 2vw, 30px) 48px;
  gap: 18px;
}

.card,
.main-card,
.control-panel {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}

.main-card { padding: clamp(16px, 1.4vw, 26px); }

.control-panel {
  padding: 10px 16px;
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
}

.status-bar { gap: 9px; font-size: 12.5px; }

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-tint);
}

.status-text { color: var(--text-2); }

.panel-header { margin-bottom: 18px; gap: 6px; }

.panel-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.panel-header .muted,
.panel-header p {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

/* 指标卡 */
.summary {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.metric {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: 0 1px 2px rgba(16, 26, 36, 0.04);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.metric:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.metric-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex-shrink: 0;
  border-radius: 11px;
  background: var(--primary-light);
  color: var(--primary);
}

.metric-icon svg { width: 18px; height: 18px; stroke-width: 1.8; }
.metric-icon.neutral { background: var(--bg-soft); color: var(--text-2); }
.metric-icon.cyan { background: #e7f1f7; color: #2b6f8f; }
.metric-icon.green { background: var(--success-tint); color: var(--success); }
.metric-icon.amber { background: var(--brass-tint); color: var(--brass-strong); }

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 550;
  letter-spacing: 0.02em;
}

.metric-value,
.metric.highlight .metric-value {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-family: var(--font-num);
  font-size: 22px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.metric.highlight {
  border-color: var(--brass-line);
  background: linear-gradient(180deg, #fffdf8, var(--brass-tint));
}

.metric.highlight .metric-icon { background: #fff; color: var(--brass); border: 1px solid var(--brass-line); }
.metric.highlight .metric-value { color: var(--brass-strong); }

/* ── 表格 ─────────────────────────────────────────────────────────────── */

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: #fff;
  overflow: auto;
}

.table-wrap table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.table-wrap tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-2);
  vertical-align: middle;
}

.table-wrap tbody tr:last-child td { border-bottom: none; }

.table-wrap tbody tr { transition: background 140ms ease; }
.table-wrap tbody tr:hover td { background: #f9fbfd; }

.table-wrap tbody td strong {
  display: block;
  color: var(--text);
  font-weight: 600;
}

.table-wrap tbody td small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
}

/* 数字列统一等宽 */
.table-wrap td:nth-child(n) { font-variant-numeric: tabular-nums; }

.empty-row,
.table-wrap .empty-row td {
  padding: 34px 14px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* ── 按钮 ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 550;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease,
    box-shadow 160ms ease, transform 120ms ease;
}

.btn:hover { border-color: var(--border-strong); color: var(--text); }
.btn:active { transform: translateY(1px); }

.btn svg { width: 15px; height: 15px; stroke-width: 1.85; }

.btn.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(47, 95, 143, 0.75);
}

.btn.primary:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
  color: #fff;
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text-2);
}

.btn.ghost:hover {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--primary);
}

.btn.danger {
  border-color: #f0d2cf;
  background: var(--danger-tint);
  color: var(--danger);
}

.btn.danger:hover { border-color: #e3b7b2; background: #f8e3e1; color: #932e27; }

.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── 表单 ─────────────────────────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: 6px; }

.field > span,
.form-card label > span,
label > span {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.01em;
}

input[type="text"],
input[type="search"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="email"],
input:not([type]),
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder,
textarea::placeholder { color: #a3b0c2; }

input:hover:not(:disabled),
select:hover:not(:disabled),
textarea:hover:not(:disabled) { border-color: var(--border-strong); }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: var(--ring);
  outline: none;
}

input:disabled,
select:disabled { background: var(--bg-soft); color: var(--muted); cursor: not-allowed; }

.form-card,
.operations-toolbar {
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.operations-summary {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.operations-summary > div {
  padding: 14px 16px;
  border-right: 1px solid var(--border-light);
}

.operations-summary > div:last-child { border-right: none; }
.operations-summary span { color: var(--muted); font-size: 11.5px; }
.operations-summary strong {
  margin-top: 4px;
  color: var(--text);
  font-family: var(--font-num);
  font-size: 18px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* ── 徽标 / 状态 ──────────────────────────────────────────────────────── */

.badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 550;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge.ok,
.status-badge.online { border-color: #c7e3d7; background: var(--success-tint); color: var(--success); }
.badge.warn { border-color: var(--brass-line); background: var(--brass-tint); color: var(--brass-strong); }
.badge.danger { border-color: #eed3cf; background: var(--danger-tint); color: var(--danger); }

/* ── 登录页 ───────────────────────────────────────────────────────────── */

.web-auth-gate {
  display: grid;
  padding: 0;
  background: var(--ink-900);
}

.auth-shell {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
}

/* 左屏：品牌面 */
.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: clamp(32px, 6vw, 84px);
  overflow: hidden;
  background:
    radial-gradient(600px 380px at 12% 8%, rgba(169, 118, 43, 0.22), transparent 62%),
    radial-gradient(700px 500px at 92% 96%, rgba(47, 95, 143, 0.42), transparent 66%),
    linear-gradient(160deg, #0b1219 0%, #101c27 58%, #0a1118 100%);
  color: #fff;
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 40% 30%, #000 0%, transparent 78%);
  pointer-events: none;
}

.auth-brand > * { position: relative; z-index: 1; }

.auth-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(150deg, #c08a37, #8a5f1f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 10px 24px -12px rgba(169, 118, 43, 0.9);
  color: #1a1205;
  font-size: 20px;
  font-weight: 800;
}

.auth-eyebrow {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.auth-brand h1 {
  margin: 0;
  max-width: 15em;
  color: #fff;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.24;
}

.auth-brand h1 em {
  color: #e0b268;
  font-style: normal;
}

.auth-sub {
  margin: 0;
  max-width: 34em;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13.5px;
  line-height: 1.75;
}

.auth-points {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 6px 0 0;
  padding: 0;
  max-width: 30em;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-points li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.auth-points li span {
  color: rgba(224, 178, 104, 0.9);
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* 右屏：表单面 */
.web-auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: none;
  padding: clamp(32px, 5vw, 72px);
  border: none;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.web-auth-card header { margin-bottom: 26px; }

.web-auth-card h1,
.web-auth-card h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.web-auth-card header p,
.web-auth-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.web-auth-card .field { margin-bottom: 14px; gap: 7px; }
.web-auth-card .field input { min-height: 44px; font-size: 14px; }

.web-auth-card .btn.primary {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
}

.web-auth-error {
  min-height: 20px;
  margin: 2px 0 6px;
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.5;
}

.auth-foot {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}

.web-auth-brand { display: none; }

/* 登录页宽度收窄时的表单列 */
@media (min-width: 981px) {
  .web-auth-card {
    align-items: stretch;
    border-left: 1px solid rgba(16, 26, 36, 0.06);
  }
  .web-auth-card > * { max-width: 396px; width: 100%; margin-inline: auto; }
  .web-auth-card header { margin-top: auto; }
  .web-auth-card .auth-foot { margin-bottom: auto; }
}

/* ── 面板内分区（用户页 / 管理页复用） ─────────────────────────────────── */
/* 一个 panel 里放多块内容时用 .panel-section 包一层，标题带序号，
   避免多个 .panel-header 叠在一起、层级全靠 margin 硬撑。 */

.panel-section + .panel-section { margin-top: 22px; }

.panel-section-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.panel-section-head .panel-section-index {
  flex: none;
  padding-top: 1px;
  color: var(--brass);
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.panel-section-head h4,
.panel-section-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.panel-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.panel-section-head .panel-section-meta {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 11.5px;
  white-space: nowrap;
}

/* 概览条里的文字型数值（用户名 / 角色名）不用等宽字体 */
.operations-summary strong.text {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

/* 概览条里的次级说明（启用 X · 停用 Y） */
.operations-summary small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}

/* 表格内联下拉（账号归属） */
.table-wrap select {
  min-height: 32px;
  padding: 4px 26px 4px 9px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background-color: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
}

.table-wrap select:hover { border-color: var(--border-strong); }

.table-wrap select:focus {
  border-color: var(--primary);
  box-shadow: var(--ring);
  outline: none;
}

.table-wrap td .muted { color: var(--muted); }

/* ── 响应式 ───────────────────────────────────────────────────────────── */

@media (max-width: 1180px) {
  .summary { grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); }
  .topbar-search { max-width: 220px; }
}

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; min-height: 100dvh; }
  .auth-brand {
    gap: 14px;
    padding: 28px clamp(20px, 6vw, 40px) 24px;
  }
  .auth-brand h1 { font-size: 24px; max-width: none; }
  /* 标题里的 <br> 是为宽屏左屏做的定版断行；窄屏改为自然回流。 */
  .auth-brand h1 br { display: none; }
  .auth-sub { font-size: 12.5px; }
  .auth-points { display: none; }
  .web-auth-card {
    padding: 28px clamp(20px, 6vw, 40px) 40px;
    border-left: none;
    justify-content: flex-start;
  }
  .web-auth-card header { margin-top: 0; }
}

@media (max-width: 720px) {
  .content { padding: 14px 14px 40px; }
  .main-card { padding: 14px; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric { padding: 13px 14px; }
  .metric-value { font-size: 19px; }
  .topbar-search { display: none; }
  .page-heading h1 { font-size: 16px; }
  .table-wrap thead th { padding: 10px 12px; }
  .table-wrap tbody td { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Modern minimal refresh ────────────────────────────────────────────
   A calm, editorial palette for repeated daily operations. The layout and
   interaction contracts remain unchanged; this layer only refines emphasis,
   spacing and visual hierarchy. */
:root {
  --ink-900: #17221f;
  --ink-800: #1d2c28;
  --ink-700: #294039;
  --ink-600: #39554b;
  --bg: #f5f7f5;
  --bg-soft: #eef3f0;
  --surface-2: #f7faf8;
  --border: #dfe8e3;
  --border-light: #edf2ef;
  --border-strong: #c7d7cf;
  --text: #18231f;
  --text-2: #52655d;
  --muted: #74847d;
  --primary: #367266;
  --primary-dark: #2b5d53;
  --primary-light: #e8f2ef;
  --primary-line: #bfd8cf;
  --brass: #b77a3d;
  --brass-strong: #97612e;
  --brass-tint: #fbf1e5;
  --brass-line: #ecd6bb;
  --success: #3b8067;
  --success-tint: #e9f5ef;
  --danger: #b84c43;
  --danger-tint: #fbeeed;
  --shadow: 0 1px 2px rgba(23, 34, 31, 0.04), 0 12px 30px -18px rgba(23, 34, 31, 0.24);
  --shadow-lift: 0 2px 5px rgba(23, 34, 31, 0.06), 0 18px 38px -20px rgba(23, 34, 31, 0.24);
  --ring: 0 0 0 3px rgba(54, 114, 102, 0.16);
  --radius: 14px;
  --r-lg: 16px;
  --r-md: 11px;
  --r-sm: 8px;
}

body {
  background:
    radial-gradient(900px 420px at 82% -18%, rgba(255, 255, 255, 0.9), transparent 68%),
    var(--bg);
}

.app-shell { min-height: 100dvh; }

.sidebar {
  background: #1d2c28;
  border-right-color: rgba(255, 255, 255, 0.08);
  box-shadow: 8px 0 28px -26px rgba(23, 34, 31, 0.8);
}

.sidebar-brand .brand-icon,
.auth-mark {
  background: #c18a4d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 8px 18px -12px rgba(193, 138, 77, 0.95);
}

.sidebar-brand,
.sidebar-user { border-color: rgba(255, 255, 255, 0.1); }

.side-tabs .tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.side-tabs .tab.active::before { background: #c18a4d; }

.topbar {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: var(--border);
}

.content { max-width: 1480px; padding-top: 22px; }

.card,
.main-card,
.control-panel {
  border-color: var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.control-panel {
  padding: 11px 16px;
  background: #fff;
}

.main-card { padding: clamp(18px, 1.7vw, 28px); }

.panel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.panel-header .muted { max-width: 42em; }

.summary { gap: 12px; margin-bottom: 22px; }

.metric {
  min-height: 86px;
  padding: 15px 16px;
  border-radius: var(--r-md);
  box-shadow: none;
}

.metric:hover { transform: translateY(-2px); }

.metric.highlight {
  border-color: var(--brass-line);
  background: var(--brass-tint);
}

.metric-value,
.metric.highlight .metric-value { font-size: 21px; }

.table-wrap { border-radius: var(--r-md); }

.table-wrap thead th {
  background: #f2f6f3;
  color: #667a70;
  letter-spacing: 0.04em;
}

.table-wrap tbody td { padding: 13px 14px; }

.table-wrap tbody tr:hover td { background: #f5faf7; }

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 7px 16px -10px rgba(54, 114, 102, 0.9);
}

.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.platform-order-rental {
  min-width: 158px;
  padding: 7px 9px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #fbfdfc;
}

.platform-order-rental-duration {
  color: var(--text);
  font-weight: 650;
}

.platform-order-rental-expiry { color: var(--muted); }

/* 登录页采用一个居中的工作台面板，避免全屏表单带来的空旷感。 */
.web-auth-gate {
  padding: 24px;
  background: #eef3f0;
}

.auth-shell {
  width: min(1180px, 100%);
  min-height: min(720px, calc(100dvh - 48px));
  max-height: 820px;
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 28px 70px -30px rgba(23, 34, 31, 0.34);
}

.auth-brand {
  padding: clamp(34px, 5vw, 76px);
  background: #1d2c28;
}

.auth-brand::before { opacity: 0.36; }

.auth-brand h1 { font-size: clamp(30px, 3vw, 44px); }

.auth-brand h1 em { color: #e3b16e; }

.web-auth-card {
  padding: clamp(34px, 5vw, 76px);
  background: #fff;
}

.web-auth-card .btn.primary { min-height: 46px; }

@media (max-width: 980px) {
  .web-auth-gate { padding: 0; }
  .auth-shell {
    min-height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
}

@media (max-width: 720px) {
  .panel-header { display: block; }
  .panel-header .muted { margin-top: 5px; }
  .metric { min-height: 78px; }
}

/* ── Editorial admin system ─────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body { letter-spacing: 0; }

.sidebar-brand .brand-icon,
.landing-brand-mark,
.auth-mark {
  display: grid;
  place-items: center;
}

.sidebar-brand .brand-icon svg,
.landing-brand-mark svg,
.auth-mark svg { width: 19px; height: 19px; stroke-width: 1.8; }

.sidebar-brand .brand-icon { color: #1d2c28; }

.sidebar-brand .brand-icon,
.landing-brand-mark { font-size: 0; }

.panel { animation: panel-rise 360ms cubic-bezier(.22, 1, .36, 1) both; }

@keyframes panel-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-heading h1 { letter-spacing: -0.025em; }

.topbar-search { border-radius: 12px; }

.topbar-search input::placeholder { color: #9aaa9f; }

.topbar-actions .status-badge { font-weight: 650; }

.content { gap: 14px; }

.status-bar {
  min-height: 22px;
  font-size: 12px;
  letter-spacing: .01em;
}

.status-bar::before {
  content: "SYSTEM / LIVE";
  margin-right: 4px;
  color: var(--brass);
  font-family: var(--font-num);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
}

.panel-header h3 { letter-spacing: -0.025em; }

.panel-header-actions .btn { min-height: 34px; }

.summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.metric { overflow: hidden; }

.metric::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -34px;
  width: 90px;
  height: 90px;
  border: 1px solid rgba(54, 114, 102, .08);
  border-radius: 50%;
}

.metric.highlight::after { border-color: rgba(183, 122, 61, .16); }

.info-card,
.aggregated-account-card,
.platform-merchant-status,
.report-band,
.card-inner { border-radius: var(--r-md); }

.table-wrap tbody td:first-child { color: var(--text); }

.platform-order-row.platform-order-uhaozu { background: #fffaf4; }
.platform-order-row.platform-order-fivee { background: #f8fbfa; }

.platform-order-row:hover td { background: #edf7f3 !important; }

.platform-order-badge { border-radius: 6px; font-weight: 700; }

.operations-summary {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: #f9fbfa;
}

.panel-section-head { margin-bottom: 14px; }

.panel-section-head .panel-section-index {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--brass-line);
  border-radius: 7px;
  background: var(--brass-tint);
  color: var(--brass-strong);
  font-size: 10px;
}

.form-card { border-radius: var(--r-md); }

.access-audit-table-wrap tbody tr td:first-child {
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 11px;
}

.landing-header,
.landing-section,
.landing-security,
.landing-footer { position: relative; }

.landing-brand-mark svg { width: 19px; height: 19px; stroke-width: 1.8; }

.landing-hero { background: #18231f; }

.landing-hero-scrim {
  width: min(820px, 62vw);
  background: linear-gradient(90deg, rgba(17, 29, 25, .94), rgba(17, 29, 25, .82) 68%, rgba(17, 29, 25, 0));
}

.landing-hero-content { color: #fff; }

.landing-eyebrow { color: #e3b16e; }

.landing-hero h1 { max-width: 10em; color: #fff; font-size: clamp(42px, 5.4vw, 78px); letter-spacing: -0.045em; }

.landing-hero-content > p { color: rgba(255, 255, 255, .68); }

.landing-primary-btn { background: #c18a4d; color: #1d2c28; }
.landing-primary-btn:hover { background: #d49a5a; }
.landing-secondary-btn { border-color: rgba(255,255,255,.24); background: rgba(255,255,255,.08); color: #fff; }
.landing-secondary-btn:hover { border-color: #e3b16e; color: #e3b16e; background: rgba(255,255,255,.12); }

.landing-proof div { border-color: rgba(255,255,255,.18); }
.landing-proof dt { color: #fff; }
.landing-proof dd { color: rgba(255,255,255,.52); }

.landing-section-heading h2 { letter-spacing: -0.03em; }

@media (max-width: 1180px) {
  .summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary .metric:nth-child(2) { grid-column: span 2; }
  .summary .metric:nth-child(2) .metric-value { font-size: 24px; }
  .landing-hero-scrim { width: 100%; background: linear-gradient(180deg, rgba(17,29,25,.44), rgba(17,29,25,.94) 72%); }
  .landing-hero h1 { font-size: clamp(38px, 12vw, 58px); }
}

@media (prefers-reduced-motion: reduce) {
  .panel { animation: none; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; --topbar-h: 104px; }
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-areas: "topbar" "content";
  }
  .sidebar {
    display: none;
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    width: min(280px, 86vw);
    height: calc(100vh - var(--topbar-h));
    z-index: 220;
  }
  .sidebar.open { display: flex; }
  .topbar {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    grid-template-rows: 40px 40px;
    gap: 8px;
    padding: 8px 12px;
  }
  .mobile-nav-toggle { display: inline-grid; grid-column: 1; grid-row: 1; }
  .page-heading { grid-column: 2; grid-row: 1; }
  .page-heading span { display: none; }
  .topbar-actions { grid-column: 1 / -1; grid-row: 2; }
  .topbar-search { display: none; }
  .content { padding: 14px 14px 28px; }
}
