/* ============ Shopify 经营看板 ============ */
:root {
  --bg: #f3f4f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --border: #e5e7ee;
  --border-strong: #d4d7e1;
  --text: #161a26;
  --text-2: #5b6275;
  --text-3: #8b92a5;
  --primary: #4f46e5;
  --primary-soft: #eef0ff;
  --primary-ink: #3730a3;
  --green: #059669;
  --green-soft: #e7f7f1;
  --red: #e11d48;
  --red-soft: #fdebef;
  --amber: #d97706;
  --amber-soft: #fff5e6;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --side: #10131c;
  --side-2: #1a1e2b;
  --side-text: #a7adbf;
  --shadow: 0 1px 2px rgba(16, 19, 28, .04), 0 2px 8px rgba(16, 19, 28, .04);
  --shadow-lg: 0 12px 40px rgba(16, 19, 28, .16);
  --radius: 14px;
  --radius-sm: 9px;
  --c1: #4f46e5; --c2: #10b981; --c3: #f59e0b; --c4: #ef4444; --c5: #06b6d4; --c6: #a855f7; --c7: #64748b;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0d13;
  --surface: #141823;
  --surface-2: #191e2b;
  --border: #252b3b;
  --border-strong: #323a4f;
  --text: #e9ecf4;
  --text-2: #a3aac0;
  --text-3: #6f778d;
  --primary: #818cf8;
  --primary-soft: #1f2340;
  --primary-ink: #c7d2fe;
  --green: #34d399;
  --green-soft: #0f2a22;
  --red: #fb7185;
  --red-soft: #33141d;
  --amber: #fbbf24;
  --amber-soft: #2e2410;
  --blue: #60a5fa;
  --blue-soft: #132238;
  --side: #090b10;
  --side-2: #141823;
  --shadow: 0 1px 2px rgba(0,0,0,.3);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
  --c1: #818cf8; --c2: #34d399; --c3: #fbbf24; --c4: #fb7185; --c5: #22d3ee; --c6: #c084fc; --c7: #94a3b8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.pos { color: var(--green) !important; }
.neg { color: var(--red) !important; }
.hidden { display: none !important; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--side); color: var(--side-text); padding: 20px 14px; position: sticky; top: 0;
  height: 100vh; display: flex; flex-direction: column; gap: 6px; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; color: #fff; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, #6366f1, #10b981); box-shadow: 0 4px 14px rgba(99,102,241,.4);
}
.brand-mark svg { width: 19px; height: 19px; }
.brand b { font-size: 15px; letter-spacing: .2px; display: block; }
.brand small { font-size: 11px; color: var(--side-text); }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #5d6479; padding: 14px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px;
  color: var(--side-text); font-weight: 500; transition: .15s;
}
.nav a svg { width: 18px; height: 18px; opacity: .85; }
.nav a:hover { background: var(--side-2); color: #fff; }
.nav a.active { background: linear-gradient(90deg, rgba(99,102,241,.22), rgba(99,102,241,.06)); color: #fff; box-shadow: inset 2px 0 0 #818cf8; }
.side-foot { margin-top: auto; border-top: 1px solid #222736; padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 4px 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #2a3044; color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.side-btn { background: transparent; border: 1px solid #262c3c; color: var(--side-text); border-radius: 9px; padding: 7px 10px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 13px; width: 100%; }
.side-btn:hover { color: #fff; border-color: #3a4258; }
.side-btn svg { width: 15px; height: 15px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 14px 28px; flex-wrap: wrap;
}
.topbar h1 { font-size: 19px; margin: 0; font-weight: 700; letter-spacing: -.2px; }
.topbar .sub { font-size: 12px; color: var(--text-3); }
.topbar .spacer { flex: 1; }
.content { padding: 22px 28px 60px; display: flex; flex-direction: column; gap: 18px; max-width: 1600px; width: 100%; }
.btn.menu-toggle { display: none; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font-weight: 500; font-size: 13.5px; cursor: pointer; transition: .15s; white-space: nowrap;
  font-family: inherit;
}
.btn:hover { border-color: var(--text-3); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--primary); }
.btn-danger { color: var(--red); }
.btn-danger:hover { border-color: var(--red); background: var(--red-soft); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-icon { width: 32px; padding: 0; height: 32px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn .spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.input, select.input, textarea.input {
  height: 36px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--text); padding: 0 11px; font-size: 13.5px; font-family: inherit; outline: none; transition: .15s; min-width: 0;
}
textarea.input { height: auto; padding: 8px 11px; resize: vertical; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.field .hint { font-size: 12px; color: var(--text-3); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }

.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--text-2); padding: 5px 11px; border-radius: 7px; cursor: pointer; font-size: 13px; font-family: inherit; white-space: nowrap; }
.seg button.on { background: var(--primary-soft); color: var(--primary-ink); font-weight: 600; }
.range-box { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.range-custom { display: none; align-items: center; gap: 6px; }
.range-custom.show { display: flex; }
.range-custom .input { height: 32px; width: 140px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); white-space: nowrap; }
.badge { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.b-green { background: var(--green-soft); color: var(--green); }
.b-red { background: var(--red-soft); color: var(--red); }
.b-amber { background: var(--amber-soft); color: var(--amber); }
.b-blue { background: var(--blue-soft); color: var(--blue); }
.b-gray { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.b-purple { background: var(--primary-soft); color: var(--primary); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; flex-wrap: wrap; }
.card-h h3 { margin: 0; font-size: 15px; font-weight: 650; }
.card-h .desc { font-size: 12px; color: var(--text-3); }
.card-h .spacer { flex: 1; }
.card-b { padding: 16px 18px 18px; }
.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.span-2 { grid-column: span 2; }

/* hero */
.hero {
  position: relative; overflow: hidden; border-radius: var(--radius); padding: 22px 24px; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #312e81 0%, #1e1b4b 45%, #0f172a 100%);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; justify-content: space-between; gap: 16px; min-height: 100%;
}
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,.35), transparent 65%); }
.hero.loss::after { background: radial-gradient(circle, rgba(244,63,94,.35), transparent 65%); }
.hero-label { font-size: 13px; color: #c7cbe8; display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.hero-label svg { width: 16px; height: 16px; flex: none; }
.hero > * { position: relative; z-index: 1; }
.hero-value { font-size: 40px; font-weight: 750; letter-spacing: -1px; line-height: 1.05; }
.hero-value small { font-size: 18px; font-weight: 600; opacity: .8; margin-right: 4px; }
.hero-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; position: relative; z-index: 1; }
.hero-stat { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.09); border-radius: 11px; padding: 10px 12px; }
.hero-stat span { font-size: 12px; color: #b9bee0; display: block; }
.hero-stat b { font-size: 17px; font-variant-numeric: tabular-nums; }
.progress { height: 9px; background: rgba(255,255,255,.12); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #34d399, #10b981); transition: width .8s ease; }
.progress.light { background: var(--surface-2); border: 1px solid var(--border); }
.progress.amber > i { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.progress-meta { display: flex; justify-content: space-between; font-size: 12px; color: #c7cbe8; }

/* KPI */
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.kpi-top { display: flex; align-items: center; gap: 8px; }
.kpi-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.kpi-ico svg { width: 16px; height: 16px; }
.kpi-label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.kpi-value { font-size: 24px; font-weight: 720; letter-spacing: -.4px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi-value small { font-size: 13px; color: var(--text-3); font-weight: 600; margin-right: 2px; }
.kpi-foot { font-size: 12px; color: var(--text-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ic-indigo { background: var(--primary-soft); color: var(--primary); }
.ic-green { background: var(--green-soft); color: var(--green); }
.ic-red { background: var(--red-soft); color: var(--red); }
.ic-amber { background: var(--amber-soft); color: var(--amber); }
.ic-blue { background: var(--blue-soft); color: var(--blue); }

.mini { padding: 13px 15px; }
.mini .l { font-size: 12px; color: var(--text-2); }
.mini .v { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.mini .s { font-size: 11.5px; color: var(--text-3); }

.chart-box { position: relative; height: 300px; }
.chart-box.sm { height: 230px; }
.chart-box.xs { height: 190px; }

.legend-list { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.legend-item { display: grid; grid-template-columns: 10px 1fr auto auto; gap: 10px; align-items: center; font-size: 13px; }
.legend-item i { width: 10px; height: 10px; border-radius: 3px; }
.legend-item .pct { color: var(--text-3); font-size: 12px; width: 48px; text-align: right; }

/* funnel */
.funnel { display: flex; flex-direction: column; gap: 9px; }
.f-row { display: grid; grid-template-columns: 82px 1fr 74px; gap: 10px; align-items: center; font-size: 13px; }
.f-bar { height: 26px; background: var(--surface-2); border-radius: 7px; overflow: hidden; position: relative; }
.f-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 7px; background: linear-gradient(90deg, color-mix(in srgb, var(--c1) 45%, transparent), color-mix(in srgb, var(--c5) 40%, transparent)); }
.f-bar span { position: absolute; left: 10px; top: 0; line-height: 26px; font-size: 12px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.f-rate { text-align: right; font-size: 12px; color: var(--text-3); }

/* alerts */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 11px; font-size: 13px; border: 1px solid; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert-amber { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 30%, transparent); color: var(--amber); }
.alert-red { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 30%, transparent); color: var(--red); }
.alert-blue { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 30%, transparent); color: var(--blue); }
.alert b { font-weight: 650; }
.alert a { text-decoration: underline; color: inherit; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tbl th { text-align: left; font-weight: 600; color: var(--text-2); font-size: 12px; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.tbl .r { text-align: right; }
.tbl .c { text-align: center; }
.tbl tr.excluded td { opacity: .5; }
.tbl tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--border); }
.tbl input.cell { width: 118px; height: 30px; text-align: right; padding: 0 8px; font-variant-numeric: tabular-nums; }
.tbl input.cell.missing { border-color: color-mix(in srgb, var(--amber) 60%, transparent); background: var(--amber-soft); }
.tbl input.cell.saved { border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 20%, transparent); }
.tbl input.cell.bad { border-color: var(--red); }
.thumb { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--border); flex: none; }
.prod { display: flex; gap: 9px; align-items: center; max-width: 280px; }
.prod .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.ord-name { font-weight: 650; white-space: nowrap; }
.fee-src { font-size: 10.5px; padding: 0 5px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-3); margin-left: 3px; font-weight: 600; }
.tbl td.nw { white-space: nowrap; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.toolbar .spacer { flex: 1; }
.search { position: relative; }
.search svg { position: absolute; left: 10px; top: 10px; width: 16px; height: 16px; color: var(--text-3); }
.search .input { padding-left: 32px; width: 230px; }
.empty { padding: 48px 20px; text-align: center; color: var(--text-3); }
.empty svg { width: 40px; height: 40px; opacity: .5; margin-bottom: 8px; }

.sum-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); border-bottom: 1px solid var(--border); }
.sum-strip > div { padding: 12px 18px; border-right: 1px solid var(--border); }
.sum-strip > div:last-child { border-right: 0; }
.sum-strip span { font-size: 12px; color: var(--text-3); display: block; }
.sum-strip b { font-size: 16px; font-variant-numeric: tabular-nums; }

/* dropzone */
.dropzone { display: block; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); padding: 26px; text-align: center; cursor: pointer; transition: .15s; background: var(--surface-2); }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }
.dropzone svg { width: 34px; height: 34px; color: var(--primary); }
.dropzone b { display: block; margin: 6px 0 2px; }

/* modal & drawer */
.overlay { position: fixed; inset: 0; background: rgba(10, 12, 20, .5); z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); }
.overlay.show { display: flex; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 16px; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.modal-h { display: flex; align-items: center; padding: 18px 20px 6px; }
.modal-h h3 { margin: 0; font-size: 17px; flex: 1; }
.modal-b { padding: 12px 20px 8px; display: flex; flex-direction: column; gap: 14px; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px 18px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.items-list { display: flex; flex-direction: column; gap: 8px; }
.items-list .it { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: 10px; }

/* toast */
.toasts { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { background: var(--text); color: var(--bg); padding: 11px 16px; border-radius: 11px; box-shadow: var(--shadow-lg); font-size: 13.5px; max-width: 380px; animation: up .2s; display: flex; gap: 8px; align-items: flex-start; }
.toast.err { background: var(--red); color: #fff; }
.toast.ok { background: #065f46; color: #fff; }
@keyframes up { from { transform: translateY(10px); opacity: 0; } }

/* login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art {
  background: radial-gradient(120% 120% at 10% 10%, #3730a3 0%, #1e1b4b 40%, #0b0d13 100%);
  color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.login-art::before { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(16,185,129,.35), transparent 65%); }
.login-art h2 { font-size: 34px; line-height: 1.25; margin: 0 0 14px; letter-spacing: -.5px; position: relative; }
.login-art p { color: #c7cbe8; max-width: 420px; position: relative; }
.login-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 460px; position: relative; }
.login-feats div { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: #dfe2f5; }
.login-feats b { display: block; color: #fff; font-size: 14px; margin-bottom: 2px; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--surface); }
.login-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 16px; }
.login-card h1 { margin: 0; font-size: 24px; }
.login-card .input { height: 44px; font-size: 14.5px; }
.login-card .btn { height: 44px; font-size: 15px; }
.pw-wrap { position: relative; }
.pw-wrap button { position: absolute; right: 6px; top: 6px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }

.section-title { font-size: 13px; font-weight: 650; color: var(--text-2); margin: 4px 0 -4px; display: flex; align-items: center; gap: 8px; }
.divider { height: 1px; background: var(--border); margin: 4px 0; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 1380px) {
  .g-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .g-main, .g-3 { grid-template-columns: 1fr; }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -260px; width: 240px; transition: left .2s; }
  .sidebar.open { left: 0; box-shadow: var(--shadow-lg); }
  .btn.menu-toggle { display: inline-flex; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .g-2, .g-6, .g-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-2 { grid-column: auto; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .hero-value { font-size: 32px; }
}
@media (max-width: 560px) {
  .g-4, .g-2, .g-6, .g-5 { grid-template-columns: 1fr; }
  .hero-row { grid-template-columns: 1fr; }
  .search .input { width: 100%; }
}

/* ---------- 权限 ---------- */
body[data-role="viewer"] .w-only { display: none !important; }
.role-admin { background: var(--red-soft); color: var(--red); }
.role-editor { background: var(--blue-soft); color: var(--blue); }
.role-viewer { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.role-system { background: var(--amber-soft); color: var(--amber); }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell .avatar { background: var(--primary-soft); color: var(--primary); width: 32px; height: 32px; flex: none; }
.chg { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.chg .old { color: var(--red); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--red) 50%, transparent); }
.chg .new { color: var(--green); font-weight: 600; }
.chg .lbl { color: var(--text-3); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--border); font-size: 13px; }
.pw-box { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 20px; letter-spacing: 1px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--border-strong); text-align: center; user-select: all; }
.tbl td.detail-cell { max-width: 460px; }
.input:disabled { background: var(--surface-2); color: var(--text-2); border-color: transparent; cursor: default; }
