/* 栖页 SitePub · 专业版控制台样式
   令牌与组件对齐线上 globals.css（2026-11-12 实测）：
   bg #fafbfa / panel #fff / ink #101a17 / line #e4ebe7 / green #1f4d40 / coral #e4573d
   外壳：桌面 224px 侧栏 + 手机 58px 五项底栏；OPS 独立 64px 顶栏。
*/

:root {
  color-scheme: light;
  --bg: #fafbfa;
  --panel: #ffffff;
  --panel-2: #f6f9f7;
  --ink: #101a17;
  --ink2: #46554f;
  --ink3: #59675f;
  --ink4: #72807a;
  --line: #e4ebe7;
  --line2: #edf2ef;
  --green: #1f4d40;
  --green-dk: #173d33;
  --green-soft: #e7efe9;
  --coral: #e4573d;
  --coral-dk: #c74730;
  --coral-soft: #fbeee8;
  --ok: #276749;
  --ok-bg: #e9f4ee;
  --warn: #8a6210;
  --warn-bg: #faf3e2;
  --danger: #b3442f;
  --danger-bg: #fdeee8;
  --r-card: 12px;
  --r-input: 10px;
  --r-pill: 999px;
  --shadow: 0 1px 2px rgba(16, 26, 23, 0.06);
  --shadow-2: 0 10px 28px -14px rgba(16, 26, 23, 0.18);
  --sans: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Consolas, monospace;
  --rail-w: 224px;
  --rail-h: calc(58px + env(safe-area-inset-bottom));
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --panel: #1c1c1e;
  --panel-2: #0a0a0b;
  --ink: #f5f5f7;
  --ink2: #c7c7cc;
  --ink3: #9a9aa0;
  --ink4: #9a9aa0;
  --line: #2c2c2e;
  --line2: #232325;
  --green: #4ade9f;
  --green-dk: #0a7b57;
  --green-soft: #12302a;
  --coral: #f2a68f;
  --coral-dk: #d4694f;
  --coral-soft: #3a2a24;
  --ok: #8fc7ad;
  --ok-bg: #22332c;
  --warn: #e5c17a;
  --warn-bg: #3a3220;
  --danger: #f0a08d;
  --danger-bg: #3a211c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  --shadow-2: 0 12px 32px -16px rgba(0, 0, 0, 0.75);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a.link { color: var(--green); border-bottom: 1px solid color-mix(in srgb, var(--green) 40%, transparent); }
a.link:hover { border-bottom-color: var(--green); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 24px; line-height: 1.3; }
h2 { font-size: 18px; line-height: 1.4; }
h3 { font-size: 15px; line-height: 1.45; }
p { margin: 0; }
img { max-width: 100%; }

/* ---------- 外壳 ---------- */
.app-shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; background: var(--bg); }

.rail {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; gap: 2px;
  padding: 18px 14px 14px;
  background: var(--bg);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.rail-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.rail-brand { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; min-width: 0; }
.rail-brand-logo { width: 28px; height: 28px; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); flex: 0 0 auto; }
.rail-theme-btn {
  margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 999px;
  background: none; color: var(--ink2); cursor: pointer; flex: 0 0 auto;
}
.rail-theme-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rail-theme-btn:hover { background: var(--panel-2); color: var(--ink); }

.rail-group {
  margin: 14px 0 4px; padding: 10px 10px 0;
  border-top: 1px solid var(--line2);
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--ink4);
}
.rail-group:first-of-type { border-top: 0; margin-top: 4px; padding-top: 0; }
.rail nav { display: grid; gap: 2px; }
.rail nav.rail-nav-desktop { display: grid; }
.rail nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 11px; border-radius: 9px;
  font-size: 13px; font-weight: 600; color: var(--ink2);
  transition: background 0.14s, color 0.14s;
}
.rail nav a svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rail nav a:hover { background: #efece5; color: var(--ink); }
.rail nav a.on { background: var(--green-soft); color: var(--green); }
html[data-theme="dark"] .rail nav a:hover { background: #242a27; }
.rail nav a .rail-dot { margin-left: auto; width: 7px; height: 7px; border-radius: 999px; background: var(--coral); }

.rail nav.rail-nav-mobile { display: none; }
.mobile-top { display: none; }
.rail-note { margin-top: auto; padding: 12px 10px 0; font-size: 11.5px; line-height: 1.6; color: var(--ink4); border-top: 1px solid var(--line2); }

.app-view { width: 100%; max-width: 1400px; margin: 0 auto; padding: 28px 32px 72px; min-width: 0; }
.app-view > .page { max-width: 1080px; }

/* ---------- 页面头 ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { margin-top: 6px; color: var(--ink3); font-size: 13.5px; max-width: 640px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--ink4); text-transform: uppercase; margin-bottom: 6px; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink3); margin-bottom: 10px; }
.crumb a:hover { color: var(--ink); }

/* ---------- 按钮 ---------- */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 9px 18px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  background: var(--green); color: #fff;
  font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: background 0.16s, border-color 0.16s, transform 0.12s;
}
.btn:hover { background: var(--green-dk); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
html[data-theme="dark"] .btn:not(.ghost):not(.danger) { color: #04120c; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.coral { background: var(--coral); color: #1b120e; }
.btn.coral:hover { background: var(--coral-dk); }
.btn.danger { background: var(--danger-bg); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.btn.sm { min-height: 32px; padding: 5px 13px; font-size: 13px; }
.btn.row { width: 100%; }

/* ---------- 卡片 ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); min-width: 0; }
.card.pad { padding: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line2); }
.card-head h3 { font-size: 15px; }
.card-body { padding: 16px; }

/* ---------- chip ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 1px 10px; border: 1px solid transparent; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600; line-height: 1.7; white-space: nowrap;
  background: var(--panel-2); color: var(--ink2);
}
.chip .dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--danger-bg); color: var(--danger); }
.chip.info { background: var(--green-soft); color: var(--green); }
.chip.coral { background: var(--coral-soft); color: var(--coral-dk); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); }
.kpi .label { font-size: 12px; color: var(--ink3); }
.kpi .value { margin-top: 4px; font-size: 22px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.kpi .hint { margin-top: 2px; font-size: 12px; color: var(--ink3); }

/* ---------- 站点卡 ---------- */
.sites { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.site-card {
  display: flex; flex-direction: column; gap: 12px; padding: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card);
  transition: border-color 0.16s, box-shadow 0.16s;
}
.site-card:hover { border-color: color-mix(in srgb, var(--green) 35%, var(--line)); box-shadow: var(--shadow-2); }
.site-card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.site-card .name { font-size: 15px; font-weight: 600; }
.site-card .addr { margin-top: 2px; font-family: var(--mono); font-size: 12px; color: var(--ink3); }
.site-card .meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink3); }
.site-card .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }

.bar { height: 4px; border-radius: 999px; background: var(--line2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--green); }
.bar.warn > i { background: var(--coral); }
.bar.bad > i { background: var(--danger); }

/* ---------- 空态 ---------- */
.empty { padding: 40px 20px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r-card); background: var(--panel-2); }
.empty h3 { margin-bottom: 6px; }
.empty p { max-width: 460px; margin: 0 auto 14px; color: var(--ink3); font-size: 13.5px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 9px 12px; font-size: 13px; font-weight: 600; color: var(--ink3); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--green); border-bottom-color: var(--green); }

.status-hero { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px; margin-bottom: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); }
.status-hero .big { font-size: 17px; font-weight: 600; }

/* ---------- 布局 ---------- */
.grid2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.kv { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 8px 14px; font-size: 13px; }
.kv dt { color: var(--ink3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- 上传 ---------- */
.upload { padding: 28px 18px; text-align: center; border: 1.5px dashed var(--line); border-radius: var(--r-card); background: var(--panel-2); transition: border-color 0.16s, background 0.16s; }
.upload.drag { border-color: var(--green); background: var(--green-soft); }
.upload .hint { margin-top: 6px; font-size: 12.5px; color: var(--ink3); }
.upload input[type="file"] { display: none; }
.upload-icon { margin-bottom: 8px; font-size: 20px; line-height: 1; color: var(--green); }
.progress { display: none; height: 5px; margin-top: 12px; border-radius: 999px; background: var(--line2); overflow: hidden; }
.progress.on { display: block; }
.progress > i { display: block; width: 0; height: 100%; background: var(--green); transition: width 0.12s linear; }

.report { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.report .rhead { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: var(--panel-2); font-size: 13.5px; font-weight: 600; }
.report.ok .rhead { background: var(--ok-bg); color: var(--ok); }
.report.bad .rhead { background: var(--danger-bg); color: var(--danger); }
.report ul { margin: 0; padding: 10px 16px 10px 30px; font-size: 13px; color: var(--ink2); }
.report li { margin: 3px 0; }
.report .filelist { max-height: 200px; overflow: auto; padding: 10px 14px; border-top: 1px solid var(--line2); font-family: var(--mono); font-size: 12px; color: var(--ink3); }

.versions { display: flex; flex-direction: column; gap: 8px; }
.version { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 11px 13px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-input); }
.version .seq { width: 40px; font-family: var(--mono); font-size: 13px; color: var(--ink3); }
.version .main { flex: 1; min-width: 150px; }
.version time { font-size: 12.5px; color: var(--ink3); }

/* ---------- 表格 ---------- */
.table-wrap { width: 100%; overflow: auto; max-height: 62vh; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--panel); -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { position: sticky; top: 0; z-index: 1; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); color: var(--ink3); font-size: 12.5px; font-weight: 600; text-align: left; white-space: nowrap; }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; overflow-wrap: anywhere; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 表单 ---------- */
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row label { font-size: 13px; font-weight: 600; color: var(--ink2); }
.form-row .help { font-size: 12.5px; color: var(--ink3); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r-input);
  background: var(--panel); color: var(--ink); font: inherit; font-size: 14px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 16%, transparent); }
.inline-input { display: flex; }
.inline-input input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.inline-input .suffix { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-left: 0; border-radius: 0 var(--r-input) var(--r-input) 0; background: var(--panel-2); font-family: var(--mono); font-size: 12.5px; color: var(--ink3); }

.seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--panel-2); }
.seg button { padding: 6px 16px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink3); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }

.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.plan { padding: 13px; text-align: left; border: 1.5px solid var(--line); border-radius: var(--r-card); background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; }
.plan.on { border-color: var(--green); background: var(--green-soft); }
.plan .pname { font-size: 14px; font-weight: 700; }
.plan .pdesc { margin-top: 3px; font-size: 12.5px; line-height: 1.55; color: var(--ink3); }
.plan .pprice { margin-top: 8px; font-size: 20px; font-weight: 600; }

.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days button { padding: 8px 15px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--panel); color: var(--ink2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.days button.on { border-color: var(--green); background: var(--green); color: #fff; }
html[data-theme="dark"] .days button.on { color: #04120c; }

.summary { position: sticky; top: 20px; }
.summary .line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; color: var(--ink2); }
.summary .line.total { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink); font-size: 14px; font-weight: 700; }
.summary .total .price { font-size: 24px; font-weight: 600; }

.steps { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.step { flex: 1; min-width: 120px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-input); background: var(--panel); color: var(--ink3); font-size: 12.5px; }
.step b { color: var(--ink); font-weight: 700; }
.step.on { border-color: var(--green); background: var(--green-soft); color: var(--ink2); }

.notice { padding: 11px 13px; border: 1px solid transparent; border-radius: var(--r-input); font-size: 12.5px; line-height: 1.65; }
.notice.info { background: var(--green-soft); color: var(--green); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.bad { background: var(--danger-bg); color: var(--danger); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }

/* ---------- 收银台 ---------- */
.pay-card { max-width: 460px; margin: 32px auto; }
.pay-amount { font-size: 40px; font-weight: 600; letter-spacing: -0.03em; }
.pay-amount small { margin-right: 4px; font-size: 16px; font-weight: 500; color: var(--ink3); }

.copy { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--panel-2); font-family: var(--mono); font-size: 12px; color: var(--ink2); cursor: pointer; }
.copy:hover { border-color: var(--ink3); }

.toast-host { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 9px 16px; border-radius: var(--r-pill); background: var(--ink); color: var(--bg); font-size: 13px; box-shadow: var(--shadow-2); }
.toast.bad { background: var(--danger); color: #fff; }

.footer { max-width: 1080px; margin: 0 auto; padding: 0 32px 32px; display: flex; gap: 16px; flex-wrap: wrap; color: var(--ink4); font-size: 12px; }

/* ---------- OPS 外壳 ---------- */
.ops-shell { min-height: 100vh; background: var(--bg); }
.ops-topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 24px;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.ops-topbar .brand { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 700; }
.ops-topbar .brand img { width: 26px; height: 26px; border-radius: 7px; box-shadow: 0 0 0 1px var(--line); }
.ops-topbar .sep { width: 1px; height: 22px; background: var(--line); }
.ops-topbar .back { font-size: 13px; color: var(--ink3); }
.ops-topbar .back:hover { color: var(--ink); }
.ops-topbar .spacer { flex: 1; }
.ops-topbar .who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink3); white-space: nowrap; }
.ops-topbar .small, .ops-topbar .back { white-space: nowrap; }
.ops-content { width: 100%; max-width: 1360px; margin: 0 auto; padding: 20px 32px 72px; }
.ops-tabs { display: flex; gap: 2px; margin: 0 0 18px; padding-bottom: 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ops-tabs a { padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--ink3); border-bottom: 2px solid transparent; white-space: nowrap; }
.ops-tabs a.on { color: var(--green); border-bottom-color: var(--green); }
.ops-group-title { margin: 18px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--ink4); }

/* ---------- 工具类 ---------- */
.muted { color: var(--ink3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.mobile-only { display: none; }
.spacer { flex: 1; }

/* ---------- 登录（竖排文案母题） ---------- */
.auth {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 40px 20px;
  background: radial-gradient(120% 90% at 12% 0%, #eef6f1 0%, var(--bg) 58%);
}
html[data-theme="dark"] .auth { background: radial-gradient(120% 90% at 12% 0%, #0d1613 0%, var(--bg) 58%); }
.auth-wrap { width: 100%; max-width: 1040px; display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 56px; align-items: center; }
.auth-aside { display: flex; flex-direction: column; align-items: flex-end; gap: 22px; text-align: right; }
.auth-vert { display: flex; align-items: flex-start; justify-content: flex-end; gap: 22px; }
.auth-brand { display: flex; align-items: center; gap: 10px; justify-content: flex-end; font-size: 20px; font-weight: 700; }
.auth-brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.auth-slogan { writing-mode: vertical-rl; text-orientation: upright; margin: 0; font-size: 30px; font-weight: 800; letter-spacing: 0.06em; line-height: 1.25; }
.auth-sub { writing-mode: vertical-rl; text-orientation: upright; margin: 0; font-size: 12.5px; line-height: 2.1; letter-spacing: 0.12em; color: var(--ink3); }
.auth-card { width: 100%; }
.auth-card .card { padding: 24px; box-shadow: var(--shadow-2); }
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; gap: 20px; }
  .auth-aside { align-items: flex-start; text-align: left; }
  .auth-vert { flex-direction: column; align-items: flex-start; gap: 10px; }
  .auth-brand { justify-content: flex-start; }
  .auth-slogan, .auth-sub { writing-mode: horizontal-tb; text-orientation: initial; letter-spacing: 0; line-height: 1.45; }
  .auth-slogan { font-size: 24px; }
  .auth-sub { max-height: none; line-height: 1.7; }
}

.rail-theme-btn .ic-moon { display: none; }
html[data-theme="dark"] .rail-theme-btn .ic-sun { display: none; }
html[data-theme="dark"] .rail-theme-btn .ic-moon { display: block; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .grid2 { grid-template-columns: 1fr; }
  .summary { position: static; }
}

@media (max-width: 880px) {
  .app-shell { display: block; min-height: 100dvh; }
  .mobile-top {
    display: flex; align-items: center; gap: 9px;
    position: sticky; top: 0; z-index: 35; height: 56px; padding: 0 14px;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .mobile-top .rail-brand-logo { width: 26px; height: 26px; border-radius: 7px; }
  .mobile-top .rail-brand { font-size: 16px; }
  .rail {
    position: fixed; inset: auto 0 0 0; z-index: 40;
    height: var(--rail-h); padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: saturate(1.4) blur(12px);
    border-right: 0; border-top: 1px solid var(--line);
    overflow: visible;
  }
  .rail-head, .rail-nav-desktop, .rail-note { display: none !important; }
  .rail nav.rail-nav-mobile { display: flex; height: 100%; }
  .rail-nav-mobile a {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    padding: 5px 0 3px; border-radius: 8px;
    font-size: 11.5px; font-weight: 600; color: var(--ink3); line-height: 1.15;
  }
  .rail-nav-mobile a svg { width: 22px; height: 22px; }
  .rail-nav-mobile a.on { color: var(--green); background: transparent; }
  .app-view { padding: 18px 16px calc(76px + env(safe-area-inset-bottom)); }
  .kpis { grid-template-columns: 1fr; }
  .sites { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .mobile-only { display: inline; }
  .ops-topbar { height: 56px; padding: 0 14px; gap: 8px; }
  .ops-topbar .back { display: none; }
  .ops-topbar .ws-label, .ops-topbar .who-name { display: none; }
  .ops-topbar .sep { display: none; }
  .ops-content { padding: 14px 14px 80px; }
}

/* 手机：表格转卡片（对齐 OPS 现有 ≤900 口径） */
@media (max-width: 760px) {
  .table-wrap { max-height: none; border: 0; background: transparent; box-shadow: none; overflow: visible; }
  table.data { display: block; }
  table.data thead { display: none; }
  table.data caption { display: none; }
  table.data tbody { display: grid; gap: 10px; }
  table.data tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px;
    padding: 12px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--panel);
  }
  table.data td { display: block; min-width: 0; padding: 0; border: 0; text-align: left !important; }
  table.data td::before { content: attr(data-label); display: block; margin-bottom: 1px; font-size: 11px; color: var(--ink3); }
  table.data td[data-label="操作"] { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
  table.data td[data-label="操作"]::before { width: 100%; }
}

@media (max-width: 640px) {
  h1 { font-size: 21px; }
  .page-head { gap: 10px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(3) { grid-column: 1 / -1; }
  .kpi .value { font-size: 20px; }
  .table-wrap { box-shadow: inset -14px 0 14px -14px rgba(16, 26, 23, 0.28); }
  .kv { grid-template-columns: 96px minmax(0, 1fr); }
  .footer { padding: 0 16px 28px; }
}

@media (max-width: 520px) {
  .steps { gap: 6px; }
  .step { flex: 1 1 0; min-width: 0; padding: 8px 9px; font-size: 11.5px; }
  .site-card .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-card .actions .btn { width: 100%; }
  .pay-amount { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
