/* MacRent — 自包含样式（无外部依赖） */
:root {
  --primary: #0a66ff;
  --primary-600: #0052d9;
  --primary-700: #0041b3;
  --primary-50: #eef4ff;
  --primary-100: #dbe8ff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #526075;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --bg: #f5f7fb;
  --surface: #f8fafc;
  --card: #ffffff;
  --success: #15803d;
  --success-50: #ecfdf3;
  --success-border: #bbf7d0;
  --warning: #b45309;
  --warning-50: #fffbeb;
  --warning-border: #fde68a;
  --danger: #b91c1c;
  --danger-solid: #dc2626;
  --danger-solid-hover: #b91c1c;
  --danger-50: #fef2f2;
  --danger-border: #fecaca;
  --info: #0e7490;
  --info-50: #ecfeff;
  --info-border: #a5f3fc;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, .16);
  --focus-ring: 0 0 0 3px rgba(10, 102, 255, .22);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.6;
  color: var(--ink); background: var(--bg); overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body.drawer-open { overflow: hidden; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; letter-spacing: -.015em; color: var(--ink); }
p { margin: 0 0 1em; }
code, pre, .mono { font-family: var(--mono); font-size: 13px; }
code { background: #f1f5f9; padding: 1px 5px; border-radius: 5px; color: var(--ink); }
pre code { background: none; padding: 0; color: inherit; }
img, svg { vertical-align: middle; max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

/* 可访问性焦点环与跳转链接 */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--primary); box-shadow: var(--focus-ring);
}
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 200; padding: 10px 16px;
  background: var(--primary); color: #fff; border-radius: var(--radius-md); font-weight: 600;
  box-shadow: var(--shadow-lg); text-decoration: none !important; transition: top .15s;
}
.skip-link:focus { top: 12px; }

/* 顶部进度条 */
.top-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 300;
  background: linear-gradient(90deg, var(--primary), #7c3aed, var(--primary));
  background-size: 200% 100%; transform: scaleX(0); transform-origin: left;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.top-progress.active {
  opacity: 1; animation: progress-indeterminate 1.2s ease-in-out infinite;
}
@keyframes progress-indeterminate {
  0% { transform: scaleX(.15); background-position: 0% 0; }
  50% { transform: scaleX(.75); background-position: 100% 0; }
  100% { transform: scaleX(.95); background-position: 200% 0; }
}

/* ---------- 通用工具类 ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 860px; margin: 0 auto; }
.card-narrow { max-width: 560px; }
.card-medium { max-width: 780px; }
.card-wide { max-width: 860px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.lead-sub { font-size: 16px; color: var(--muted); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-danger { color: var(--danger); }
.nowrap { white-space: nowrap; }
.num, .stat-value, .price, .summary .total { font-variant-numeric: tabular-nums; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.inline { display: inline-flex; align-items: center; }

/* 图标规范 */
.icon {
  width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0;
}
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }
.icon-xl { width: 40px; height: 40px; stroke-width: 1.4; }
.brand-icon { width: 19px; height: 19px; flex-shrink: 0; display: inline-block; }

/* 加载旋转器 */
.spinner {
  width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; display: inline-block; flex-shrink: 0; animation: spin .7s linear infinite;
}
.spinner-sm { width: 14px; height: 14px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 0 16px; border-radius: var(--radius-md);
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
  font: inherit; font-weight: 500; line-height: 1.2; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .08s;
  text-decoration: none !important;
}
.btn:hover { border-color: #94a3b8; background: var(--surface); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn.disabled, .btn.is-loading { opacity: .6; cursor: not-allowed; pointer-events: none; }
.btn-primary {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: 0 1px 2px rgba(10, 102, 255, .2);
}
.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }
.btn-danger { color: var(--danger); border-color: var(--danger-border); background: #fff; }
.btn-danger:hover { background: var(--danger-50); border-color: var(--danger); color: var(--danger); }
.btn-danger-solid { background: var(--danger-solid); border-color: var(--danger-solid); color: #fff; }
.btn-danger-solid:hover { background: var(--danger-solid-hover); border-color: var(--danger-solid-hover); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(15, 23, 42, .06); border-color: transparent; color: var(--ink); }
.btn-light { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .28); color: #fff; }
.btn-light:hover { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-white { background: #fff; color: var(--primary); border-color: #fff; font-weight: 600; }
.btn-white:hover { background: var(--primary-50); border-color: var(--primary-50); color: var(--primary-600); }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 7px; }
.btn-lg { min-height: 46px; padding: 0 22px; font-size: 15px; font-weight: 600; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; min-height: 38px; padding: 0; }
.btn-icon.btn-sm { width: 34px; min-height: 34px; }
.btn.is-loading::before {
  content: ""; width: 15px; height: 15px; border: 2px solid currentColor;
  border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite;
}

/* ---------- 徽标 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap;
  background: #f1f5f9; color: var(--ink-2);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--success-50); color: var(--success); }
.badge-warning { background: var(--warning-50); color: var(--warning); }
.badge-danger { background: var(--danger-50); color: var(--danger); }
.badge-info { background: var(--info-50); color: var(--info); }
.badge-primary { background: var(--primary-50); color: var(--primary); }
.badge-muted { background: #f1f5f9; color: var(--muted); }
.tag {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--radius-sm);
  background: var(--primary-50); color: var(--primary); font-size: 12px; font-weight: 700;
  letter-spacing: .04em;
}

/* ---------- 提示 / Flash / Toast ---------- */
.alert {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border-radius: 10px; margin-bottom: 16px; border: 1px solid; font-size: 14px; line-height: 1.5;
}
.alert-icon { display: inline-flex; flex-shrink: 0; margin-top: 2px; }
.alert-text { flex: 1; min-width: 0; }
.alert-close {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin: -4px -6px -4px 4px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: currentColor; opacity: .7; cursor: pointer; transition: opacity .15s, background .15s;
}
.alert-close:hover { opacity: 1; background: rgba(15, 23, 42, .07); }
.alert-success { background: var(--success-50); border-color: var(--success-border); color: #14532d; }
.alert-danger { background: var(--danger-50); border-color: var(--danger-border); color: #7f1d1d; }
.alert-warning { background: var(--warning-50); border-color: var(--warning-border); color: #78350f; }
.alert-info { background: var(--info-50); border-color: var(--info-border); color: #164e63; }
.alert a { color: inherit; font-weight: 600; text-decoration: underline; }
.flashes { position: relative; }
.flash-container { padding-top: 16px; }
.alert.is-dismissing { opacity: 0; transform: translateY(-4px); transition: opacity .18s, transform .18s; }

/* 轻量 Toast */
.toast-stack {
  position: fixed; right: 20px; bottom: 20px; z-index: 250;
  display: flex; flex-direction: column; gap: 10px; max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-radius: 10px; background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 500;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, .1);
  animation: toast-in .18s ease-out;
}
.toast-success { background: #14532d; border-color: rgba(187, 247, 208, .25); }
.toast-danger { background: #7f1d1d; border-color: rgba(254, 202, 202, .25); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity .18s, transform .18s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 卡片与网格 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); min-width: 0;
}
.card-header {
  padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center;
  justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.card-header h2, .card-header h3 { margin: 0; font-size: 15px; font-weight: 600; }
.card-body { padding: 20px; }
.card + .card { margin-top: 20px; }
.grid > .card + .card { margin-top: 0; }
.grid { display: grid; gap: 20px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }

/* 数据面板：骨架加载与错误重试 */
.data-card { position: relative; }
.panel-loading { display: none; padding: 18px 20px; }
.data-card.is-loading .table-wrap,
.data-card.is-loading .pagination,
.data-card.is-loading .empty { display: none; }
.data-card.is-loading .panel-loading { display: block; }
.skeleton-head, .skeleton-row {
  display: flex; gap: 16px; align-items: center; padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.skeleton-row:last-child { border-bottom: 0; }
.skeleton-bar {
  height: 14px; border-radius: 6px;
  background: linear-gradient(90deg, #eef2f7 25%, #e2e8f0 50%, #eef2f7 75%);
  background-size: 200% 100%; animation: shimmer 1.2s ease-in-out infinite;
}
.skeleton-head .skeleton-bar { height: 11px; opacity: .75; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.panel-error {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px 20px; background: var(--danger-50); border-bottom: 1px solid var(--danger-border);
  color: #7f1d1d;
}
.panel-error-body { display: flex; align-items: center; gap: 12px; min-width: 0; }
.panel-error-icon {
  width: 36px; height: 36px; border-radius: 50%; background: #fee2e2; color: var(--danger);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.panel-error-title { font-weight: 600; font-size: 14px; }
.panel-error-sub { font-size: 13px; color: #991b1b; }

/* ---------- 表格 ---------- */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%;
  background:
    linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left center,
    linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) right center,
    radial-gradient(farthest-side at 0 50%, rgba(15,23,42,.10), rgba(15,23,42,0)) left center,
    radial-gradient(farthest-side at 100% 50%, rgba(15,23,42,.10), rgba(15,23,42,0)) right center;
  background-repeat: no-repeat;
  background-size: 24px 100%, 24px 100%, 10px 100%, 10px 100%;
  background-attachment: local, local, scroll, scroll;
}
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td {
  padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle;
}
.table th {
  font-weight: 600; color: var(--muted); font-size: 12.5px; background: var(--surface);
  white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafcff; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions .btn + .btn,
.table .actions .btn + form,
.table .actions form + .btn,
.table .actions form + form { margin-left: 6px; }
.amount-pos { color: var(--success); font-weight: 600; }
.amount-neg { color: var(--ink); font-weight: 600; }

/* ---------- 表单与内联校验 ---------- */
.field { margin-bottom: 16px; }
.field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.field-head label { margin-bottom: 0; }
.field label, .label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 13px; color: var(--ink-2); }
.field-check-aligned { padding-top: 28px; }
.input, input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-md); background: #fff; font: inherit; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:disabled, select:disabled, textarea:disabled {
  background: var(--surface); color: var(--muted); cursor: not-allowed;
}
textarea { min-height: 112px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: var(--focus-ring);
}
input.is-invalid, select.is-invalid, textarea.is-invalid {
  border-color: var(--danger-solid); background: #fffafa;
}
input.is-invalid:focus, select.is-invalid:focus, textarea.is-invalid:focus {
  border-color: var(--danger-solid); box-shadow: 0 0 0 3px rgba(220, 38, 38, .18);
}
.help { margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.field-error {
  display: flex; align-items: flex-start; gap: 6px; margin-top: 6px;
  font-size: 12.5px; color: var(--danger); line-height: 1.4;
}
.field-error:empty { display: none; }
.field-error::before {
  content: "!"; display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; margin-top: 1px; border-radius: 50%; flex-shrink: 0;
  background: var(--danger-solid); color: #fff; font-size: 11px; font-weight: 700;
}

/* 密码显示/隐藏切换 */
.password-wrap { position: relative; display: flex; align-items: center; }
.password-wrap input { padding-right: 44px; }
.password-toggle {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: var(--radius-sm); background: transparent;
  color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s;
}
.password-toggle:hover { color: var(--ink); background: rgba(15, 23, 42, .05); }
.password-toggle .icon-hide { display: none; }
.password-toggle[aria-pressed="true"] .icon-show { display: none; }
.password-toggle[aria-pressed="true"] .icon-hide { display: inline-block; }

/* 密码规则清单 */
.pw-rules {
  list-style: none; padding: 8px 10px; margin: 8px 0 0; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted);
}
.pw-rules li { display: inline-flex; align-items: center; gap: 5px; transition: color .15s; }
.pw-rules li::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1;
  transition: background .15s, transform .15s;
}
.pw-rules li.ok { color: var(--success); font-weight: 500; }
.pw-rules li.ok::before { background: var(--success); transform: scale(1.1); }

/* 验证码输入框 */
.otp-input {
  text-align: center; font-family: var(--mono); font-size: 20px; font-weight: 700;
  letter-spacing: .35em; padding-left: 18px;
}

.check {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-weight: 400; color: var(--ink-2); min-height: 28px;
}
.check input { width: 17px; height: 17px; min-height: 17px; margin: 0; accent-color: var(--primary); flex-shrink: 0; }
.form-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form-inline .input, .form-inline select, .form-inline input { width: auto; min-width: 150px; }
.toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  justify-content: space-between; margin-bottom: 16px;
}
.toolbar-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 16px; box-shadow: var(--shadow-xs);
}

/* ---------- 选项卡片（部署向导 / 充值） ---------- */
.options { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.options-presets { grid-template-columns: repeat(auto-fill, minmax(min(110px, 45%), 1fr)); }
.option {
  position: relative; display: block; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 14px 16px; cursor: pointer; background: #fff;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.option:hover { border-color: #93c5fd; background: #fcfdff; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option.selected, .option:has(input:checked) {
  border-color: var(--primary); background: var(--primary-50);
  box-shadow: 0 0 0 3px rgba(10, 102, 255, .12);
}
.option:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.option.disabled { opacity: .48; cursor: not-allowed; background: var(--surface); }
.option-title { font-weight: 600; color: var(--ink); }
.option-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.option-price { margin-top: 6px; font-weight: 600; color: var(--primary); font-variant-numeric: tabular-nums; }
.step-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; margin: 0 0 14px; }
.step-no {
  width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.summary { position: sticky; top: 80px; }
.summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.summary .total { font-size: 26px; font-weight: 700; color: var(--primary); margin: 2px 0 8px; }

/* ---------- 统计卡片 ---------- */
.stats { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); min-width: 0;
}
.stat-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat-value { font-size: 26px; font-weight: 700; margin-top: 6px; letter-spacing: -.02em; color: var(--ink); }
.stat-value-lg { font-size: 38px; }
.stat-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* ---------- 键值与代码框 ---------- */
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 16px; margin: 0; }
.kv-compact { grid-template-columns: 96px minmax(0, 1fr); }
.kv-split { grid-template-columns: 1fr auto; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; word-break: break-word; min-width: 0; }
.codebox {
  display: flex; align-items: center; gap: 8px; background: #0f172a; color: #e2e8f0;
  border-radius: var(--radius-md); padding: 8px 8px 8px 12px; font-family: var(--mono);
  font-size: 13px; max-width: 100%; min-width: 0;
}
.codebox span { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; }
.codebox .btn {
  min-height: 28px; padding: 0 10px; font-size: 12px; flex-shrink: 0;
  background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .24);
}
.codebox .btn:hover { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .4); }
pre.block {
  background: #0f172a; color: #e2e8f0; padding: 14px 16px; border-radius: 10px;
  overflow-x: auto; line-height: 1.6; max-width: 100%;
}

/* ---------- 分段控件、分页与空状态 ---------- */
.segmented {
  display: inline-flex; background: #e8edf5; border-radius: 9px; padding: 3px;
  gap: 2px; flex-wrap: wrap; max-width: 100%;
}
.segmented a, .segmented button {
  border: 0; background: transparent; padding: 6px 14px; min-height: 32px; border-radius: 7px;
  color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  text-decoration: none !important; display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s, box-shadow .15s;
}
.segmented a:hover, .segmented button:hover { color: var(--ink); }
.segmented .active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }

.pagination {
  display: flex; gap: 10px; justify-content: space-between; align-items: center;
  padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap;
}
.pagination-total { color: var(--muted); font-size: 12.5px; }
.pagination-links { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pagination-links a, .pagination-links span {
  min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center;
  justify-content: center; border-radius: 7px; border: 1px solid var(--line); background: #fff;
  color: var(--ink-2); font-size: 13px; font-weight: 500; text-decoration: none !important;
  transition: background .15s, border-color .15s, color .15s;
}
.pagination-links a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.pagination-links .current { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pagination-links .disabled { opacity: .45; cursor: not-allowed; }
.pagination-links .ellipsis { border-color: transparent; background: transparent; }

.empty {
  text-align: center; padding: 48px 24px; color: var(--muted);
  display: flex; flex-direction: column; align-items: center;
}
.empty-icon {
  width: 56px; height: 56px; border-radius: 50%; background: var(--surface);
  border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); margin-bottom: 14px;
}
.empty-icon .icon { width: 26px; height: 26px; stroke-width: 1.6; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.empty-sub { font-size: 13.5px; color: var(--muted); max-width: 400px; margin: 6px 0 0; }
.empty-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.empty-compact { padding: 24px 16px; }
.empty-compact .empty-icon { width: 40px; height: 40px; margin-bottom: 8px; }
.empty-compact .empty-icon .icon { width: 20px; height: 20px; }

/* ======================= 官网 ======================= */
.site-nav {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, .9);
}
.site-nav .container { display: flex; align-items: center; height: 64px; gap: 24px; }
.logo {
  display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px;
  color: var(--ink); text-decoration: none !important; flex-shrink: 0;
}
.logo-mark {
  width: 30px; height: 30px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0a66ff, #7c3aed);
  display: inline-flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
}
.logo-mark svg { width: 18px; height: 18px; }
.site-links { display: flex; align-items: center; gap: 6px; flex: 1; }
.site-links a {
  color: var(--ink-2); font-weight: 500; padding: 7px 12px; border-radius: var(--radius-md);
  text-decoration: none !important; transition: color .15s, background .15s;
}
.site-links a:hover { color: var(--primary); background: var(--primary-50); }
.site-links a.active { color: var(--primary); background: var(--primary-50); font-weight: 600; }
.nav-toggle { display: none; }
.site-links .hide-desktop { display: none; }
.site-links-divider { display: none; }

.hero {
  position: relative; overflow: hidden; color: #fff; padding: 88px 0 80px;
  background: radial-gradient(1200px 500px at 80% -10%, rgba(124, 58, 237, .45), transparent 60%),
              radial-gradient(900px 500px at 0% 110%, rgba(10, 102, 255, .45), transparent 60%), #070b18;
}
.hero .container { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.hero .container > * { min-width: 0; }
.hero h1 { font-size: 48px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 18px; color: #fff; }
.hero h1 .grad { background: linear-gradient(90deg, #60a5fa, #c084fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 17px; color: #cbd5e1; max-width: 560px; margin-bottom: 28px; line-height: 1.7; }
.hero .eyebrow {
  display: inline-flex; gap: 8px; align-items: center; padding: 5px 13px; border-radius: var(--radius-pill);
  font-size: 13px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
  color: #e2e8f0; margin-bottom: 20px;
}
.hero-stats { display: flex; gap: 32px; margin-top: 38px; flex-wrap: wrap; }
.hero-stats b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; }
.hero-stats span { color: #cbd5e1; font-size: 13px; }
.terminal {
  background: rgba(15, 23, 42, .88); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45); overflow: hidden; max-width: 100%;
}
.terminal-bar { display: flex; gap: 7px; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; display: inline-block; }
.terminal-bar i:nth-child(2) { background: #febc2e; }
.terminal-bar i:nth-child(3) { background: #28c840; }
.terminal pre {
  margin: 0; padding: 18px 20px; color: #e2e8f0; font-family: var(--mono); font-size: 13px;
  line-height: 1.75; overflow-x: auto; white-space: pre;
}
.terminal .c1 { color: #60a5fa; } .terminal .c2 { color: #34d399; }
.terminal .c3 { color: #94a3b8; } .terminal .c4 { color: #f472b6; }

.section { padding: 76px 0; }
.section-tight-top { padding-top: 36px; }
.section-no-top { padding-top: 0; }
.section.alt { background: #fff; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head h2 { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.section-head p { color: var(--muted); font-size: 16px; }
.feature { padding: 24px; }
.feature-icon {
  width: 44px; height: 44px; border-radius: 11px; display: inline-flex; align-items: center;
  justify-content: center; background: var(--primary-50); color: var(--primary); margin-bottom: 14px;
}
.feature-icon .icon { width: 22px; height: 22px; }
.feature h3 { font-size: 17px; }
.feature p { color: var(--muted); margin: 0; }

.plan-card { display: flex; flex-direction: column; padding: 26px; position: relative; }
.plan-card.featured { border: 2px solid var(--primary); }
.plan-card .ribbon {
  position: absolute; top: -12px; left: 24px; background: var(--primary); color: #fff;
  font-size: 12px; font-weight: 600; padding: 2px 11px; border-radius: var(--radius-pill);
}
.plan-card h3 { font-size: 19px; margin-bottom: 3px; }
.plan-chip { color: var(--muted); font-size: 13px; }
.price { margin: 18px 0 4px; font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.price small { font-size: 14px; font-weight: 500; color: var(--muted); }
.price-alt { font-size: 13px; color: var(--muted); }
.spec-list { list-style: none; padding: 0; margin: 18px 0 22px; flex: 1; }
.spec-list li { display: flex; gap: 8px; align-items: center; padding: 5px 0; color: var(--ink-2); }
.spec-list .icon { width: 16px; height: 16px; color: var(--success); }
.stock { font-size: 12px; margin-bottom: 14px; }

.steps { counter-reset: step; }
.step { padding: 26px; }
.step::before {
  counter-increment: step; content: counter(step); display: inline-flex; width: 34px; height: 34px;
  border-radius: 50%; align-items: center; justify-content: center; background: var(--ink);
  color: #fff; font-weight: 700; margin-bottom: 12px;
}
.region { display: flex; gap: 12px; align-items: center; padding: 16px 18px; }
.region-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 4px var(--success-50); flex-shrink: 0;
}

.faq details { border-bottom: 1px solid var(--line); padding: 16px 4px; }
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 15px; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border-radius: var(--radius-sm);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 20px; line-height: 1; flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }

.cta {
  background: linear-gradient(120deg, #0a66ff, #7c3aed); color: #fff;
  border-radius: 20px; padding: 48px 32px; text-align: center;
}
.cta h2 { font-size: 30px; color: #fff; }
.cta p { color: rgba(255, 255, 255, .9); font-size: 16px; }

.site-footer { background: #0b1020; color: #94a3b8; padding: 56px 0 28px; }
.site-footer .logo { color: #fff; }
.site-footer h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.site-footer a { color: #94a3b8; display: block; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.site-footer .bottom {
  border-top: 1px solid #1e293b; margin-top: 40px; padding-top: 20px; font-size: 12.5px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

.page-hero { background: #fff; border-bottom: 1px solid var(--line); padding: 44px 0 36px; }
.page-hero h1 { font-size: 34px; font-weight: 800; margin-bottom: 8px; }
.doc { max-width: 860px; }
.doc h2 { margin-top: 36px; font-size: 22px; scroll-margin-top: 84px; }
.doc h3 { margin-top: 24px; font-size: 17px; }
.doc li { margin-bottom: 6px; }
.doc-toc {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px;
}
.doc-toc a {
  padding: 6px 12px; border-radius: var(--radius-pill); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 500;
  text-decoration: none !important;
}
.doc-toc a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }

/* ======================= 认证（登录 / 注册） ======================= */
.auth-wrap {
  min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(700px 400px at 100% 0%, rgba(124, 58, 237, .08), transparent 60%),
              radial-gradient(700px 400px at 0% 100%, rgba(10, 102, 255, .08), transparent 60%), var(--bg);
}
.auth-card { width: 100%; max-width: 440px; padding: 32px; }
.auth-header { margin-bottom: 20px; }
.auth-header h1 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.auth-header p { margin: 0; color: var(--muted); font-size: 14px; }

/* 第三方登录按钮 */
.social-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.social-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 46px; padding: 0 18px; border-radius: 10px;
  font-size: 14.5px; font-weight: 600; text-decoration: none !important;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
  box-shadow: var(--shadow-xs); transition: background .15s, border-color .15s, box-shadow .15s, transform .08s;
}
.social-btn:hover { background: var(--surface); border-color: #94a3b8; box-shadow: 0 2px 6px rgba(15, 23, 42, .07); }
.social-btn.social-google { background: #fff; border-color: #cbd5e1; color: #1f2937; }
.social-btn.social-google:hover { background: #f8fafc; border-color: #94a3b8; }
.social-btn.social-github { background: #24292f; border-color: #24292f; color: #fff; }
.social-btn.social-github:hover { background: #161b22; border-color: #161b22; color: #fff; }
.divider {
  display: flex; align-items: center; gap: 12px; margin: 20px 0;
  color: var(--muted); font-size: 13px; font-weight: 500;
}
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* 登录方式标签页 */
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  background: #edf1f7; border-radius: 10px; margin-bottom: 18px;
}
.auth-tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: 13.5px;
  font-weight: 500; min-height: 40px; padding: 6px 10px; border-radius: 7px; cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.auth-tab:hover { color: var(--ink); }
.auth-tab[aria-selected="true"], .auth-tab.active {
  background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(15, 23, 42, .1);
}
.auth-panel[hidden] { display: none; }
.auth-alt-links {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px; text-align: center; font-size: 13.5px; color: var(--muted);
}
.auth-alt-links a { font-weight: 600; }

/* ======================= 控制台 / 后台 ======================= */
.app { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: #fff; border-right: 1px solid var(--line); padding: 18px 12px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  z-index: 60;
}
.sidebar-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 4px 8px 16px;
}
.sidebar-head .logo { padding: 0; }
.sidebar-close { display: none; }
.sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .45);
  z-index: 55; opacity: 0; transition: opacity .2s ease;
}
.sidebar-backdrop.open { display: block; opacity: 1; }
.side-group {
  font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase;
  letter-spacing: .06em; padding: 14px 12px 6px;
}
.side-link {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: var(--radius-md); color: var(--ink-2); font-weight: 500; margin-bottom: 2px;
  text-decoration: none !important; transition: background .15s, color .15s;
}
.side-link:hover { background: #f1f5f9; color: var(--ink); }
.side-link.active {
  background: var(--primary-50); color: var(--primary); font-weight: 600;
}
.side-link.active::before {
  content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--primary);
}
.side-link .count {
  margin-left: auto; background: var(--danger-solid); color: #fff; border-radius: var(--radius-pill);
  font-size: 11px; padding: 0 7px; line-height: 18px; font-weight: 600;
}
.sidebar .side-foot {
  margin-top: auto; padding: 14px 12px 6px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
}
.sidebar-mobile-links { display: none; }

/* 后台深色侧栏（保证 WCAG AA 对比度） */
.app.admin .sidebar { background: #0b1020; border-right-color: #1e293b; }
.app.admin .sidebar .logo { color: #fff; }
.app.admin .sidebar-close { color: #cbd5e1; }
.app.admin .sidebar-close:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.app.admin .side-link { color: #cbd5e1; }
.app.admin .side-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.app.admin .side-link.active { background: rgba(10, 102, 255, .28); color: #fff; }
.app.admin .side-link.active::before { background: #60a5fa; }
.app.admin .side-group { color: #94a3b8; }
.app.admin .sidebar .side-foot { color: #94a3b8; border-top-color: #1e293b; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  min-height: 60px; background: #fff; border-bottom: 1px solid var(--line); display: flex;
  align-items: center; padding: 0 28px; gap: 12px; position: sticky; top: 0; z-index: 20;
}
.sidebar-toggle { display: none; }
.topbar-brand { display: none; font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none !important; }
.topbar .grow { flex: 1; min-width: 0; }
.balance-pill {
  display: inline-flex; gap: 8px; align-items: center; padding: 4px 6px 4px 12px;
  border-radius: var(--radius-pill); background: #f1f5f9; font-size: 13px; white-space: nowrap;
}
.balance-pill b { font-variant-numeric: tabular-nums; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 500; min-width: 0; }
.user-chip-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #0a66ff, #7c3aed); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px; flex-shrink: 0;
}
.content { padding: 24px 28px 48px; max-width: 1360px; width: 100%; }
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.page-head h1 { font-size: 22px; font-weight: 700; margin: 0; }
.page-head .sub { color: var(--muted); margin-top: 4px; font-size: 13.5px; }

/* 面包屑 */
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 13px; color: var(--muted); margin-bottom: 8px;
}
.breadcrumb a { color: var(--muted); font-weight: 500; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: #94a3b8; user-select: none; }

.action-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.action-divider { width: 1px; height: 22px; background: var(--line); margin: 0 2px; }
.notice { display: flex; gap: 10px; align-items: flex-start; }

/* 图表与进度条 */
.bar-chart-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 185px; padding-top: 12px; min-width: 440px; }
.bar-col {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  height: 100%; justify-content: flex-end; min-width: 24px;
}
.bar {
  width: 100%; max-width: 32px; background: linear-gradient(180deg, #3b82f6, #0a66ff);
  border-radius: 6px 6px 2px 2px; min-height: 3px; transition: opacity .15s;
}
.bar-col:hover .bar { opacity: .85; }
.bar-label { font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.meter { height: 8px; background: #e8edf5; border-radius: var(--radius-pill); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--primary); border-radius: var(--radius-pill); }

/* 工单消息 */
.msg {
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 12px; background: #fff;
}
.msg.staff { background: var(--primary-50); border-color: #c7dbff; }
.msg-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted); margin-bottom: 8px;
}

/* 弹窗与二次确认 */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5); display: none;
  align-items: center; justify-content: center; z-index: 120; padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 460px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .26); overflow: hidden; max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px 0;
}
.modal-head h3 { margin: 0; font-size: 17px; }
.modal .card-body { padding: 20px 22px 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.confirm-icon {
  width: 40px; height: 40px; border-radius: 50%; background: var(--warning-50); color: var(--warning);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.confirm-icon.danger { background: var(--danger-50); color: var(--danger); }

/* 错误页 */
.error-page {
  min-height: 68vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.error-card {
  width: 100%; max-width: 480px; padding: 40px 32px; text-align: center;
}
.error-icon-wrap {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--primary-50); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
}
.error-card .code {
  font-size: 56px; font-weight: 800; color: var(--primary); letter-spacing: -.04em; line-height: 1.05;
  margin-bottom: 8px;
}
.error-card h1 { font-size: 22px; margin-bottom: 8px; }
.error-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }

/* ---------- 响应式（平板 + 手机 375px–414px） ---------- */
@media (max-width: 1100px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero .container { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 860px) {
  /* 基础布局收口，杜绝横向溢出 */
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: minmax(0, 1fr); }
  .stats, .stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .span-2 { grid-column: auto; }
  .container { padding: 0 16px; }
  .field-check-aligned { padding-top: 0; }

  /* 官网导航折叠菜单 */
  .site-nav .container { height: 60px; gap: 12px; }
  .site-links {
    display: none; position: fixed; top: 60px; left: 0; right: 0; max-height: calc(100vh - 60px);
    overflow-y: auto; background: #fff; flex-direction: column; align-items: stretch;
    padding: 12px 16px 20px; gap: 4px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg); z-index: 49;
  }
  .site-links.open { display: flex; }
  .site-links a {
    min-height: 44px; display: flex; align-items: center; padding: 0 14px; font-size: 15px;
  }
  .site-links .hide-desktop { display: flex; }
  .site-links-divider { display: block; height: 1px; background: var(--line); margin: 8px 0; }
  .site-nav .nav-actions { display: none; }
  .nav-toggle { display: inline-flex; margin-left: auto; min-width: 44px; min-height: 44px; }
  .hide-mobile { display: none !important; }

  /* 官网区块 */
  .hero { padding: 48px 0 52px; }
  .hero h1 { font-size: 32px; }
  .hero p.lead { font-size: 15.5px; }
  .hero-stats { gap: 20px; margin-top: 28px; }
  .hero-stats > div { min-width: calc(50% - 10px); }
  .terminal pre { font-size: 12px; padding: 14px; }
  .section { padding: 48px 0; }
  .section-tight-top { padding-top: 28px; }
  .section-head { margin-bottom: 28px; }
  .section-head h2 { font-size: 25px; }
  .page-hero { padding: 28px 0 24px; }
  .page-hero h1 { font-size: 26px; }
  .cta { padding: 32px 20px; border-radius: 14px; }
  .cta h2 { font-size: 24px; }

  /* 认证页 */
  .auth-wrap { padding: 24px 16px; min-height: calc(100vh - 60px); align-items: flex-start; }
  .auth-card { padding: 24px 20px; }

  /* 控制台 / 后台：移动端抽屉侧栏 */
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(290px, 84vw); height: 100vh;
    transform: translateX(-105%); transition: transform .22s ease; box-shadow: var(--shadow-lg);
    padding: 16px 12px;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: inline-flex; min-width: 40px; min-height: 40px; }
  .sidebar-mobile-links { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(148, 163, 184, .2); }
  .sidebar-toggle { display: inline-flex; min-width: 42px; min-height: 42px; margin-left: -6px; }
  .topbar { padding: 0 12px; gap: 8px; min-height: 56px; }
  .topbar-brand { display: inline-flex; align-items: center; gap: 8px; }
  .balance-pill { padding: 3px 4px 3px 10px; font-size: 12.5px; }
  .content { padding: 16px 14px 40px; }
  .page-head { gap: 12px; margin-bottom: 16px; }
  .page-head h1 { font-size: 20px; }
  .page-head > .btn, .page-head > form { width: 100%; }
  .page-head > form .btn { width: 100%; }
  .action-bar { width: 100%; }
  .action-divider { display: none; }

  /* 表单与工具栏全宽 + 触控目标 >= 40px */
  input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
    font-size: 16px; min-height: 44px;
  }
  .btn { min-height: 42px; }
  .btn-sm { min-height: 40px; padding: 0 12px; }
  .btn-icon { width: 42px; min-height: 42px; }
  .btn-icon.btn-sm { width: 40px; min-height: 40px; }
  .side-link { min-height: 44px; padding: 10px 12px; }
  .password-toggle { width: 40px; height: 40px; }
  .auth-tab { min-height: 42px; }
  .alert-close { width: 40px; height: 40px; }
  .segmented { width: 100%; }
  .segmented a, .segmented button { flex: 1; min-height: 40px; padding: 6px 10px; }
  .pagination { padding: 12px 14px; justify-content: center; }
  .pagination-links a, .pagination-links span { min-width: 40px; height: 40px; }
  .faq summary { min-height: 44px; }

  .form-inline { width: 100%; flex-direction: column; align-items: stretch; }
  .form-inline .input, .form-inline select, .form-inline input, .form-inline .btn {
    width: 100%; min-width: 0;
  }
  .toolbar { flex-direction: column; align-items: stretch; }
  .card-header { padding: 14px 16px; }
  .card-body { padding: 16px; }
  .table th, .table td { padding: 10px 12px; }
  .kv, .kv-compact { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
  .kv-split { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .kv-split dd { margin-bottom: 0; }
  .summary { position: static; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
  .error-card { padding: 28px 20px; }
  .error-actions .btn { width: 100%; }
  .toast-stack { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}

@media (max-width: 430px) {
  .stats, .stats-2 { grid-template-columns: minmax(0, 1fr); }
  .stat { padding: 14px 16px; }
  .stat-value { font-size: 22px; }
  .balance-pill .balance-label { display: none; }
  .hero .flex .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}
