:root {
  --bg: #f4f6f8;
  --card: #fff;
  --ink: #142033;
  --muted: #667085;
  --line: #e6eaf0;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --sidebar: #0f172a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a { color: var(--blue); text-decoration: none; }
.top {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}
.brand { font-weight: 700; color: var(--ink); font-size: 18px; }
.nav { display: flex; gap: 22px; align-items: center; color: #344054; }
.nav a.active { color: var(--blue); font-weight: 600; }
.balance { color: #344054; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 28px; }
h1 { margin: 0 0 18px; font-size: 28px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.04);
}
.price { font-size: 28px; margin: 12px 0 4px; }
.stock { color: var(--muted); }
button, .btn {
  border: 0;
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
}
button:disabled { background: #d0d5dd; color: #667085; }
.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: #475467; font-weight: 600; }
code { font-size: 12px; }
.flash { background: #eff6ff; color: #1d4ed8; padding: 10px 12px; border-radius: 8px; margin-bottom: 16px; }
.flash.bad { background: #fef3f2; color: #b42318; }
.toolbar, .batch { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; }
.toolbar input, .batch input { width: 220px; }
.batch select, .toolbar button, .batch button, .ops input, .ops button, .ops .btn { width: auto; }
input.check { width: 16px; height: 16px; padding: 0; }
.main th, .main td { white-space: nowrap; vertical-align: middle; }
.ops { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; white-space: normal; }
.ops form { display: flex; gap: 6px; align-items: center; margin: 0; }
.ops input { width: 110px; }
.auth { max-width: 420px; margin: 80px auto; }
label { display: block; margin: 12px 0 6px; color: #344054; }
input, select, textarea {
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}
textarea { min-height: 120px; }
.hint { color: var(--muted); font-size: 13px; }
.admin { display: flex; min-height: 100vh; }
.side {
  width: 220px;
  background: var(--sidebar);
  color: #cbd5e1;
  padding: 22px 14px;
}
.side a { display: block; color: #cbd5e1; padding: 10px 12px; border-radius: 8px; }
.side a.active, .side a:hover { background: #1e293b; color: #fff; }
.main { flex: 1; padding: 28px; }
.row2 { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 18px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pay { text-align: center; }
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  padding: 24px;
}
.modal-card {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 28px 22px 20px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  color: #667085;
  font-size: 28px;
  line-height: 1;
}
.modal-card h2 { margin: 0; }
.modal-wide { width: min(860px, 100%); }
.order-meta { color: #667085; margin: 10px 0 14px; }
.order-lines { font-size: 13px; }
.order-lines code { word-break: break-all; }
.qty { display: flex; gap: 8px; align-items: center; }
.qty input { width: 72px; }
.qty button { width: auto; flex: 1; }
.pay-amount { color: #dc2626; font-size: 42px; font-weight: 700; margin: 8px 0; }
.pay-amount span { font-size: 18px; }
.qrcode { display: inline-block; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.qrcode img, .qrcode canvas { display: block; }
.pay-address { word-break: break-all; }
.pay-steps { text-align: left; color: #344054; line-height: 1.7; }
.countdown { font-size: 20px; font-weight: 600; }
.row-actions { display: flex; gap: 8px; align-items: center; }
.row-actions form { margin: 0; }
.row-actions .btn, .row-actions button { width: auto; }
.minutes { display: flex; gap: 8px; align-items: center; }
.minutes input { width: 120px; }
.minutes-card { max-width: 520px; margin-bottom: 18px; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 8px; }
.checks label { display: flex; align-items: center; gap: 6px; margin: 0; }
.checks input { width: auto; }
@media (max-width: 900px) {
  .cards, .row2, .stats { grid-template-columns: 1fr; }
  .admin { display: block; }
  .side { width: auto; }
  .top { height: auto; flex-wrap: wrap; padding: 12px 16px; }
}

/* ---------- 前台：玻璃卡片 ---------- */

body.site {
  --s-ink: #0f1728;
  --s-ink-2: #344054;
  --s-muted: #6b7489;
  --s-faint: #98a2b3;
  --s-accent: #1f4fd8;
  --s-accent-2: #2f63ee;
  --s-accent-soft: rgba(31, 79, 216, 0.08);
  --s-ok: #067647;
  --s-ok-soft: rgba(6, 118, 71, 0.09);
  --s-warn: #b54708;
  --s-warn-soft: rgba(181, 71, 8, 0.09);
  --s-bad: #b42318;
  --s-bad-soft: rgba(180, 35, 24, 0.08);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-edge: rgba(255, 255, 255, 0.75);
  --hair: rgba(15, 23, 40, 0.08);
  --hair-2: rgba(15, 23, 40, 0.06);
  --shadow: 0 1px 2px rgba(15, 23, 40, 0.04), 0 14px 36px -18px rgba(15, 23, 40, 0.22);
  --r-card: 16px;
  --r-ctl: 10px;
  position: relative;
  min-height: 100vh;
  color: var(--s-ink);
  background: #eef1f6;
  font-family: "Segoe UI", -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.site::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 560px at 6% -10%, rgba(47, 99, 238, 0.22), transparent 62%),
    radial-gradient(760px 520px at 98% 2%, rgba(56, 189, 248, 0.16), transparent 60%),
    radial-gradient(700px 420px at 42% 34%, rgba(99, 130, 246, 0.07), transparent 65%),
    radial-gradient(860px 600px at 74% 108%, rgba(234, 179, 8, 0.12), transparent 62%),
    radial-gradient(640px 460px at -6% 94%, rgba(16, 185, 129, 0.08), transparent 60%),
    linear-gradient(180deg, #f3f5f9 0%, #edf0f5 100%);
}
body.site::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.06 0 0 0 0 0.09 0 0 0 0 0.16 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.site a { color: var(--s-accent); }
body.site ::selection { background: rgba(31, 79, 216, 0.16); }

/* 公告与顶栏 */
body.site .promo {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--s-ink-2);
  background: rgba(255, 255, 255, 0.45);
  border-bottom: 1px solid var(--hair-2);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
body.site .promo::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--s-accent);
  box-shadow: 0 0 0 3px rgba(31, 79, 216, 0.14);
}
body.site .top {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 60px;
  padding: 0 max(20px, calc((100vw - 1120px) / 2));
  background: rgba(248, 250, 252, 0.66);
  border-bottom: 1px solid var(--hair);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}
.top-left, .top-right { display: flex; align-items: center; gap: 26px; }
.top-right { gap: 10px; }
body.site .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--s-ink);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
body.site .logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(160deg, #3a6df0 0%, #1b44c4 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 2px 6px -1px rgba(27, 68, 196, 0.45);
}
body.site .nav { gap: 6px; }
body.site .nav a {
  color: var(--s-muted);
  padding: 7px 14px;
  border-radius: 8px;
  font-weight: 500;
  transition: color 0.15s, background-color 0.15s;
}
body.site .nav a:hover { color: var(--s-ink); background: rgba(15, 23, 40, 0.04); }
body.site .nav a.active { color: var(--s-ink); background: rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 1px var(--hair), 0 1px 2px rgba(15, 23, 40, 0.05); }
body.site .balance {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-ctl);
  color: var(--s-muted);
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 1px var(--hair);
}
body.site .balance strong {
  color: var(--s-ink);
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
body.site a.nav-ghost, body.site a.nav-solid {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--r-ctl);
  font-weight: 550;
  line-height: 1;
}
body.site a.nav-ghost { color: var(--s-ink-2); background: rgba(255, 255, 255, 0.7); box-shadow: 0 0 0 1px var(--hair); }
body.site a.nav-ghost:hover { background: #fff; }
body.site a.nav-solid {
  color: #fff;
  background: linear-gradient(180deg, var(--s-accent-2), var(--s-accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(15, 23, 40, 0.12);
}
.user-menu { position: relative; }
body.site button.user-btn {
  height: 34px;
  max-width: 140px;
  padding: 0 12px;
  color: var(--s-ink-2);
  font-weight: 550;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 1px var(--hair);
}
body.site button.user-btn:hover { background: #fff; filter: none; }
body.site button.user-btn.active { color: var(--s-ink); background: #fff; }
body.site button.user-btn::after {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.7;
}
.user-name { overflow: hidden; text-overflow: ellipsis; }
.user-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 148px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 1px var(--hair), 0 16px 40px -18px rgba(15, 23, 40, 0.45);
}
.user-pop[hidden] { display: none !important; }
body.site .user-pop a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--s-ink-2);
  font-size: 13.5px;
  font-weight: 550;
}
body.site .user-pop a:hover, body.site .user-pop a.active { color: var(--s-ink); background: rgba(15, 23, 40, 0.05); }
body.site .user-pop .menu-out { margin-top: 4px; color: var(--s-muted); box-shadow: inset 0 1px 0 var(--hair-2); border-radius: 0 0 8px 8px; }

/* 版心与标题 */
body.site .wrap { max-width: 1120px; padding: 36px 20px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
body.site h1 { margin: 0; font-size: 24px; font-weight: 680; letter-spacing: -0.025em; }
.page-sub { margin: 4px 0 0; color: var(--s-muted); font-size: 13px; }
.cat-notice {
  margin: -8px 0 16px;
  max-width: 720px;
  color: var(--s-ink-2);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-line;
}
body.site h2 { margin: 0 0 12px; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
body.site .section-title { margin: 34px 0 12px; font-size: 15px; font-weight: 650; }

/* 玻璃卡片 */
body.site .card, body.site .panel, .glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-card);
  padding: 22px;
  color: var(--s-ink);
  box-shadow: 0 0 0 1px var(--hair-2), inset 0 1px 0 rgba(255, 255, 255, 0.9), var(--shadow);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
}

/* 表单控件 */
body.site label { margin: 14px 0 6px; color: var(--s-ink-2); font-size: 13px; font-weight: 550; }
body.site input, body.site select, body.site textarea {
  height: 40px;
  padding: 0 12px;
  color: var(--s-ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(15, 23, 40, 0.12);
  border-radius: var(--r-ctl);
  box-shadow: inset 0 1px 2px rgba(15, 23, 40, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
body.site textarea { height: auto; padding: 10px 12px; }
body.site input::placeholder { color: var(--s-faint); }
body.site input:focus, body.site select:focus, body.site textarea:focus {
  outline: none;
  background: #fff;
  border-color: rgba(31, 79, 216, 0.55);
  box-shadow: 0 0 0 4px rgba(31, 79, 216, 0.12);
}
body.site input:disabled { color: var(--s-faint); background: rgba(255, 255, 255, 0.45); }
body.site input[type="number"] { font-variant-numeric: tabular-nums; }

/* 按钮 */
body.site button, body.site .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  color: #fff;
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  border: 0;
  border-radius: var(--r-ctl);
  background: linear-gradient(180deg, var(--s-accent-2), var(--s-accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(15, 23, 40, 0.14), 0 6px 14px -8px rgba(31, 79, 216, 0.7);
  cursor: pointer;
  transition: filter 0.15s, transform 0.05s, box-shadow 0.15s;
}
body.site button:hover, body.site .btn:hover { filter: brightness(1.06); }
body.site button:active, body.site .btn:active { transform: translateY(1px); }
body.site button:focus-visible, body.site .btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(31, 79, 216, 0.2); }
body.site button:disabled, body.site button:disabled:hover {
  color: var(--s-faint);
  background: rgba(15, 23, 40, 0.05);
  box-shadow: inset 0 0 0 1px var(--hair-2);
  filter: none;
  cursor: not-allowed;
}
body.site .ghost, body.site button.ghost, body.site .btn.ghost {
  color: var(--s-ink-2);
  background: rgba(255, 255, 255, 0.75);
  border: 0;
  box-shadow: 0 0 0 1px rgba(15, 23, 40, 0.1), 0 1px 2px rgba(15, 23, 40, 0.04);
}
body.site .ghost:hover { background: #fff; filter: none; }
body.site .btn-sm, body.site button.btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }

/* 提示 */
body.site .hint { color: var(--s-muted); font-size: 12.5px; }
body.site .flash {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 11px 14px;
  color: var(--s-ink-2);
  border-radius: 12px;
  background: var(--glass-strong);
  box-shadow: 0 0 0 1px var(--hair), var(--shadow);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
body.site .flash::before {
  content: "";
  flex: none;
  width: 3px;
  align-self: stretch;
  border-radius: 3px;
  background: var(--s-accent);
}
body.site .flash.bad::before { background: var(--s-bad); }
body.site code {
  font-family: "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  color: var(--s-ink-2);
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 550;
  color: var(--s-muted);
  background: rgba(15, 23, 40, 0.05);
  white-space: nowrap;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.tag.ok { color: var(--s-ok); background: var(--s-ok-soft); }
.tag.wait { color: var(--s-warn); background: var(--s-warn-soft); }
.tag.info { color: var(--s-accent); background: var(--s-accent-soft); }
.tag.off { color: var(--s-faint); }

/* 表格 */
.table-card { padding: 0 !important; overflow: hidden; }
.table-scroll { overflow-x: auto; }
body.site table { width: 100%; background: transparent; border-collapse: separate; border-spacing: 0; }
body.site th, body.site td { padding: 13px 16px; border-bottom: 1px solid var(--hair-2); color: var(--s-ink); font-size: 13.5px; vertical-align: middle; }
body.site th {
  color: var(--s-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}
body.site tbody tr { transition: background-color 0.12s; }
body.site tbody tr:hover { background: rgba(255, 255, 255, 0.55); }
body.site tbody tr:last-child td { border-bottom: 0; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.num.plus { color: var(--s-ok); }
.num.minus { color: var(--s-ink); }
.muted { color: var(--s-muted); }
.right { text-align: right !important; }
.empty { padding: 40px 16px !important; text-align: center; color: var(--s-muted) !important; }

/* 商店 */
.cat-tabs {
  display: inline-flex;
  gap: 4px;
  max-width: 100%;
  margin: -6px 0 20px;
  padding: 4px;
  overflow-x: auto;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px var(--hair), 0 1px 2px rgba(15, 23, 40, 0.04);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
body.site .cat-tabs a {
  flex: none;
  padding: 7px 18px;
  border-radius: 9px;
  color: var(--s-muted);
  font-size: 13.5px;
  font-weight: 550;
  white-space: nowrap;
  transition: color 0.15s, background-color 0.15s;
}
body.site .cat-tabs a:hover { color: var(--s-ink); }
body.site .cat-tabs a.active { color: var(--s-ink); background: #fff; box-shadow: 0 0 0 1px var(--hair), 0 2px 6px -2px rgba(15, 23, 40, 0.14); }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.product {
  display: flex;
  flex-direction: column;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--hair), inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 22px 44px -22px rgba(15, 23, 40, 0.3); }
.product.is-off { opacity: 0.72; }
.product.is-off:hover { transform: none; }
.product-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.product-title { min-width: 0; }
.mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: var(--s-ink);
  font-size: 17px;
  font-weight: 700;
  background: linear-gradient(180deg, #fff, rgba(255, 255, 255, 0.6));
  box-shadow: 0 0 0 1px var(--hair), 0 2px 6px -2px rgba(15, 23, 40, 0.12);
}
.mark.tint-0 { color: #1f4fd8; background: linear-gradient(160deg, #eef3ff, #dfe8ff); }
.mark.tint-1 { color: #0f7a5c; background: linear-gradient(160deg, #ecf8f3, #d9f0e6); }
.mark.tint-2 { color: #9a4a10; background: linear-gradient(160deg, #fff4e8, #fbe5cc); }
.mark.tint-3 { color: #6b3fc4; background: linear-gradient(160deg, #f4efff, #e6dcfb); }
.mark.tint-4 { color: #b4234a; background: linear-gradient(160deg, #fff0f3, #fbdbe3); }
.product h2 {
  margin: 0 !important;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-code { margin: 3px 0 0; color: var(--s-faint); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; }
.product-stats {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 16px;
  padding-top: 16px;
  border-top: 1px solid var(--hair-2);
}
.product-price {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.product-price span { margin-left: 5px; color: var(--s-muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.product-buy { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px 10px; margin-top: auto; }
.product-buy .buy-btn { grid-column: 1 / -1; width: 100%; height: 40px; }
.subtotal { justify-self: end; color: var(--s-muted); font-size: 12.5px; white-space: nowrap; }
.subtotal b { margin-left: 4px; color: var(--s-ink); font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.stepper {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px var(--hair), 0 1px 2px rgba(15, 23, 40, 0.04);
}
body.site .stepper .step {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
  color: var(--s-ink-2);
  font-size: 16px;
  font-weight: 500;
  background: transparent;
  box-shadow: none;
}
body.site .stepper .step:hover:not(:disabled) { background: rgba(15, 23, 40, 0.06); filter: none; }
body.site .stepper input {
  width: 44px;
  height: 30px;
  padding: 0;
  border: 0;
  text-align: center;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  background: transparent;
  box-shadow: none;
  -moz-appearance: textfield;
}
body.site .stepper input:focus { box-shadow: none; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper.is-disabled { opacity: 0.5; }

/* 购买确认 */
.modal-mask[hidden], .confirm-card [hidden], .ask-card [hidden] { display: none !important; }
body.site button.modal-close {
  height: 30px;
  padding: 0;
  color: var(--s-muted);
  background: transparent;
  box-shadow: none;
}
body.site button.modal-close:hover { background: rgba(15, 23, 40, 0.05); color: var(--s-ink); filter: none; }
.confirm-card { width: min(400px, 100%) !important; }
body.site .confirm-lead { margin: 6px 0 16px; color: var(--s-muted); font-size: 13px; }
.confirm-box, .confirm-balance {
  padding: 4px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 0 1px var(--hair-2);
}
.confirm-balance { margin-top: 10px; background: transparent; }
.confirm-box .kv:first-child, .confirm-balance .kv:first-child { border-top: 0; }
.confirm-card .kv { padding: 10px 0; }
.confirm-card .kv b { color: var(--s-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.confirm-card .kv-total b { font-size: 18px; font-weight: 700; color: var(--s-accent); }
body.site .confirm-warn { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; color: var(--s-bad); font-size: 13px; background: var(--s-bad-soft); }
.confirm-foot { gap: 8px; margin-top: 20px; }
.confirm-foot > * { min-width: 96px; }

/* 订单 */
.minutes-card { max-width: none; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.minutes-card label { margin: 0 0 2px; }
.minutes-card .hint { margin: 0; max-width: 560px; }
.minutes input { width: 96px; text-align: center; }
.progress { display: inline-flex; align-items: center; gap: 8px; line-height: 1; font-variant-numeric: tabular-nums; }
.progress-bar { width: 46px; height: 4px; border-radius: 4px; background: rgba(15, 23, 40, 0.08); overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: var(--s-ok); border-radius: 4px; }

/* 概览与账户 */
.glance { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.glance-card span { display: block; color: var(--s-muted); font-size: 13px; }
.glance-card b { display: block; margin: 8px 0 4px; color: var(--s-ink); font-size: 28px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.glance-card small { color: var(--s-faint); font-size: 12px; }
.chart-card h2 { margin: 0; font-size: 16px; }
.chart-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 16px; }
.chart { display: flex; align-items: stretch; gap: 6px; height: 220px; }
.bar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.bar-value { height: 16px; color: var(--s-faint); font-size: 10px; font-variant-numeric: tabular-nums; }
.bar-track { flex: 1; width: min(28px, 100%); display: flex; align-items: flex-end; border-radius: 8px; background: rgba(15, 23, 40, 0.05); }
.bar-track i { display: block; width: 100%; border-radius: 8px; background: linear-gradient(180deg, #4c7dff, var(--s-accent)); }
.bar-count { margin-top: 6px; color: var(--s-ink); font-size: 12px; font-weight: 650; }
.bar-label { color: var(--s-faint); font-size: 11px; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.token-row { display: flex; gap: 8px; align-items: center; }
.token-row input { font-family: "Cascadia Mono", Consolas, monospace; }
.token-row .ghost { flex: none; }
#token-form { margin-top: 14px; }
body.site button.danger { color: #fff; background: var(--s-bad); }
.api-doc { margin-bottom: 16px; }
.api-catalog { padding: 0; overflow: hidden; }
.catalog-head { padding: 22px 22px 0; }
.catalog-head h2 { margin-bottom: 6px; }
.catalog-head .hint { margin: 0 0 14px; }
.api-code { font-family: "Cascadia Mono", Consolas, monospace; font-size: 12.5px; }
.api-sample { margin: 12px 0; padding: 14px 16px; border-radius: 12px; overflow: auto; color: var(--s-ink-2); font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; background: rgba(15, 23, 40, 0.04); }
body.site .notes { margin: 8px 0 0; padding-left: 18px; color: var(--s-ink-2); font-size: 13px; line-height: 1.8; }
@media (max-width: 900px) {
  .glance, .account-grid { grid-template-columns: 1fr 1fr; }
  .bar-value { display: none; }
}
@media (max-width: 640px) {
  .glance, .account-grid { grid-template-columns: 1fr; }
}

/* 充值 */
body.site .row2 { grid-template-columns: 1fr 1fr; gap: 16px; }
.amount-input { position: relative; }
.amount-input input { height: 48px; padding-right: 64px; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.amount-input span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--s-muted); font-size: 12.5px; font-weight: 600; }
.quick { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.quick button { height: 30px; padding: 0 12px; font-size: 12.5px; }
.card-foot { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.addr-box {
  margin: 6px 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 0 1px var(--hair-2);
  word-break: break-all;
}
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--hair-2); font-size: 13px; }
.kv span:first-child { color: var(--s-muted); }

/* 登录注册 */
body.site .auth { max-width: 400px; margin: 56px auto 0; padding: 32px 30px 26px; }
.auth-mark { display: flex; justify-content: center; margin-bottom: 18px; }
.auth-mark .logo { width: 40px !important; height: 40px !important; border-radius: 12px !important; font-size: 17px !important; }
body.site .auth h1 { text-align: center; font-size: 21px; }
.auth-lead { margin: 6px 0 10px; text-align: center; }
body.site .auth button { width: 100%; height: 42px; margin-top: 22px; }
.captcha-row { display: flex; align-items: center; gap: 8px; }
.captcha-row input { flex: 1; min-width: 0; }
body.site .auth button.captcha-refresh {
  width: auto;
  height: 48px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: inherit;
  background: #fff;
  box-shadow: 0 0 0 1px var(--hair);
}
body.site .auth button.captcha-refresh:hover { filter: none; background: #fff; }
.captcha-refresh img { display: block; width: 132px; height: 48px; }
.auth-foot { margin: 18px 0 0; text-align: center; }

/* 弹层 */
body.site .modal-mask {
  background: rgba(15, 23, 40, 0.28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade 0.18s ease-out;
}
body.site .modal-card {
  padding: 26px 24px 22px;
  color: var(--s-ink);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--glass-edge);
  border-radius: 18px;
  box-shadow: 0 0 0 1px var(--hair), inset 0 1px 0 #fff, 0 30px 80px -24px rgba(15, 23, 40, 0.45);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  animation: rise 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.site .modal-close {
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--s-muted);
  font-size: 20px;
}
body.site .modal-close:hover { background: rgba(15, 23, 40, 0.05); color: var(--s-ink); }
body.site .modal-card h2 { margin: 0; font-size: 17px; }
body.site .order-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 18px; color: var(--s-muted); font-size: 12.5px; }
body.site .order-meta b { color: var(--s-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.order-table { border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--hair-2); background: rgba(255, 255, 255, 0.5); }
body.site .order-lines td { font-size: 13px; }
.link-cell { display: flex; align-items: center; gap: 8px; }
.link-cell code { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.site .order-lines th, body.site .order-lines td { padding: 12px 14px; white-space: nowrap; }
.code-cell { display: flex; align-items: center; gap: 8px; }
.code-value { font-family: "Cascadia Mono", Consolas, monospace; font-size: 15px; font-weight: 650; letter-spacing: 0.08em; color: var(--s-ink); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* 收银台 */
body.site .pay h2 { font-size: 15px; color: var(--s-muted); font-weight: 600; }
body.site .pay-amount { margin: 6px 0 2px; color: var(--s-ink); font-size: 38px; font-weight: 720; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
body.site .pay-amount span { color: var(--s-muted); font-size: 15px; font-weight: 600; letter-spacing: 0; }
body.site .qrcode { margin: 14px 0 10px; padding: 12px; background: #fff; border: 0; border-radius: 14px; box-shadow: 0 0 0 1px var(--hair), 0 10px 24px -14px rgba(15, 23, 40, 0.35); }
body.site .pay-address { margin: 8px auto; max-width: 320px; }
body.site .pay-steps { margin: 16px 0 0; padding: 14px 16px 14px 32px; border-radius: 12px; color: var(--s-ink-2); font-size: 13px; line-height: 1.8; background: rgba(255, 255, 255, 0.55); box-shadow: inset 0 0 0 1px var(--hair-2); }
body.site .countdown { margin: 14px 0 0; color: var(--s-muted); font-size: 13px; font-weight: 500; }
body.site .countdown span { color: var(--s-ink); font-weight: 650; font-variant-numeric: tabular-nums; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  body.site .top { height: auto; padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .top-left { gap: 12px; width: 100%; min-width: 0; flex-wrap: nowrap; justify-content: flex-start; }
  .top-right { width: 100%; justify-content: flex-end; }
  body.site .nav { flex: 1 1 auto; min-width: 0; overflow-x: auto; }
  body.site .nav a { flex: none; white-space: nowrap; }
  .chart { overflow-x: auto; }
  .bar-col { min-width: 36px; flex: none; }
  .bar-label { white-space: nowrap; }
  body.site .wrap { padding: 24px 14px 48px; }
  body.site .row2 { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .link-cell code { max-width: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  body.site *, body.site *::before { animation: none !important; transition: none !important; }
}

/* ---------- 后台：沿用前台玻璃风格 ---------- */

body.console .admin { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
body.console .side {
  position: sticky;
  top: 0;
  height: 100vh;
  width: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 12px 16px;
  color: var(--s-ink-2);
  background: rgba(255, 255, 255, 0.5);
  border-right: 1px solid var(--hair);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  overflow-y: auto;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.side-brand b { display: block; color: var(--s-ink); font-size: 14.5px; font-weight: 650; line-height: 1.2; }
.side-brand small { color: var(--s-faint); font-size: 11.5px; }
.side-group { margin: 14px 10px 4px; color: var(--s-faint); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; }
body.console .side a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--s-muted);
  font-size: 13.5px;
  font-weight: 500;
  background: transparent;
  transition: color 0.15s, background-color 0.15s;
}
body.console .side a svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
body.console .side a:hover { color: var(--s-ink); background: rgba(15, 23, 40, 0.04); }
body.console .side a.active { color: var(--s-ink); background: rgba(255, 255, 255, 0.9); box-shadow: 0 0 0 1px var(--hair), 0 1px 2px rgba(15, 23, 40, 0.05); }
body.console .side a.active svg { color: var(--s-accent); opacity: 1; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--hair-2); }
body.console .main { min-width: 0; padding: 32px 36px 64px; }
.main-inner { max-width: 1240px; margin: 0 auto; }

/* 概览 */
body.console .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { display: flex; flex-direction: column; gap: 14px; }
.stat-head { display: flex; align-items: center; justify-content: space-between; color: var(--s-muted); font-size: 13px; font-weight: 550; }
.stat-value { font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-link { color: var(--s-muted) !important; font-size: 12.5px; }
.stat-link:hover { color: var(--s-accent) !important; }
.stat .mark { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
.mark svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat .mark svg { width: 17px; height: 17px; }
.shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.shortcut { display: flex; align-items: center; gap: 14px; color: var(--s-ink) !important; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.shortcut:hover { transform: translateY(-2px); }
.shortcut b { display: block; font-weight: 650; }
.shortcut span.hint { display: block; margin-top: 2px; }

/* 列表工具条 */
.table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hair-2);
  background: rgba(255, 255, 255, 0.35);
}
body.console .toolbar, body.console .batch { margin: 0; gap: 8px; flex-wrap: wrap; }
body.console .toolbar input { width: 240px; }
body.console .batch input { width: 160px; }
body.console .toolbar input, body.console .toolbar select,
body.console .batch input, body.console .batch select { height: 34px; font-size: 13px; }
body.console .toolbar button, body.console .toolbar .btn,
body.console .batch button { height: 34px; padding: 0 14px; font-size: 13px; }
body.console .find-bar { display: grid; gap: 8px; margin: 14px 16px 0; }
body.console .find-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
body.console .find-head p { margin: 0; color: var(--s-ink-2); font-size: 13px; line-height: 1.6; }
body.console .find-bar label { margin: 0; }
body.console textarea.find-missing { min-height: 88px; max-height: 180px; font-family: "Cascadia Mono", Consolas, monospace; font-size: 12.5px; }
body.console .body-view {
  margin: 12px 0 0;
  max-height: min(60vh, 520px);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.65;
}
.count { color: var(--s-faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
body.console .main th, body.console .main td { padding: 12px 14px; }
body.console td.wrap-cell { white-space: normal; min-width: 220px; max-width: 420px; word-break: break-word; }
body.console td .sub { color: var(--s-faint); font-size: 12px; }
body.console td.muted, body.console td .muted { color: var(--s-muted); }
body.console .mono { font-family: "Cascadia Mono", Consolas, monospace; font-size: 12px; color: var(--s-ink-2); }
body.console .ellipsis { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
body.console .ops { gap: 6px; flex-wrap: nowrap; }
body.console td.ops-cell { width: 1%; }
body.console .ops input { width: 110px; height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
body.console .ops button, body.console .ops .btn { height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
body.console .ops a.btn-link { padding: 0 6px; font-size: 13px; font-weight: 550; }
body.console .ops-sep { width: 1px; height: 18px; margin: 0 4px; background: var(--hair); }
body.console button.danger, body.console .btn.danger {
  color: var(--s-bad);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 0 1px rgba(180, 35, 24, 0.22);
}
body.console button.danger:hover { background: var(--s-bad-soft); filter: none; }
.tag.bad { color: var(--s-bad); background: var(--s-bad-soft); }

/* 表单页 */
body.console .row2 { grid-template-columns: 380px minmax(0, 1fr); gap: 18px; align-items: start; }
body.console .row2.list-first { grid-template-columns: minmax(0, 1fr) 380px; }
body.console .form-card { max-width: 680px; }
body.console .form-card h2, body.console .row2 h2 { margin-bottom: 4px; }
body.console .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
body.console .form-grid > .full { grid-column: 1 / -1; }
body.console .field-hint { margin: 6px 0 0; color: var(--s-faint); font-size: 12px; line-height: 1.6; }
body.console form.cleanup-foot,
body.console .cleanup-foot { flex-direction: column; align-items: flex-end; }
body.console .cleanup-foot .field-hint { align-self: stretch; margin: 0 0 12px; }
body.console input.days { width: 76px; height: 34px; text-align: right; }
body.console .keep-actions { display: flex; align-items: center; gap: 8px; }
body.console .keep-actions form { margin: 0; }
body.console .form-section { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--hair-2); color: var(--s-ink); font-size: 13px; font-weight: 650; }
body.console .form-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
body.console textarea { min-height: 110px; font-family: "Cascadia Mono", Consolas, monospace; font-size: 12.5px; line-height: 1.6; }
body.console textarea.plain { font-family: inherit; font-size: 13.5px; }
body.console .checks { gap: 8px; margin: 2px 0 4px; }
body.console .checks label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  margin: 0;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px var(--hair);
  cursor: pointer;
}
body.console input[type="checkbox"] {
  width: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
  accent-color: var(--s-accent);
  box-shadow: none;
}
.switch-row { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; padding: 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.55); box-shadow: inset 0 0 0 1px var(--hair-2); }
body.console .switch-row label { margin: 0; font-weight: 600; }
.switch-row .field-hint { margin-top: 4px; }
body.console .notes { margin: 8px 0 0; padding-left: 18px; color: var(--s-ink-2); font-size: 13px; line-height: 1.85; }
body.console .setting-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
body.console button.setting-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  height: auto;
  min-height: 108px;
  padding: 22px;
  text-align: left;
  white-space: normal;
  color: var(--s-ink);
  font-weight: 500;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-card);
  box-shadow: 0 0 0 1px var(--hair-2), inset 0 1px 0 rgba(255, 255, 255, 0.9), var(--shadow);
  cursor: pointer;
}
body.console button.setting-card:hover { filter: none; background: rgba(255, 255, 255, 0.92); }
body.console button.setting-card h2 { margin: 0 0 8px; font-size: 15px; font-weight: 650; }
body.console button.setting-card p { margin: 0; color: var(--s-muted); font-size: 13px; font-weight: 450; line-height: 1.55; }
body.console .setting-dialog { width: min(560px, 100%); }
body.console .setting-dialog.wide { width: min(720px, 100%); }
body.console .setting-dialog textarea.plain { min-height: 72px; }
body.console button.modal-close {
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--s-muted);
  background: transparent;
  box-shadow: none;
  font-size: 22px;
  font-weight: 400;
}
body.console button.modal-close:hover { filter: none; background: rgba(15, 23, 40, 0.05); color: var(--s-ink); }
body.console .notice-stack { display: grid; gap: 10px; margin-bottom: 18px; }
body.console .notice-stack .flash { margin: 0; }
body.console .flash.warn::before { background: var(--s-warn); }

/* 分类 */
body.console .cat-table input { height: 32px; font-size: 13px; }
body.console .cat-table .cat-name { width: 130px; font-weight: 600; }
body.console .cat-table .cat-domains { width: 100%; min-width: 180px; }
body.console .cat-table textarea.cat-notice { height: auto; min-height: 64px; width: 240px; padding: 6px 8px; font-size: 13px; line-height: 1.5; }
body.console .support-row { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px; margin-top: 8px; }
body.console .cat-table .cat-sort { width: 64px; text-align: right; }
body.console .sort-form { display: inline-flex; align-items: center; gap: 6px; }
body.console .sort-input { width: 64px; text-align: right; }
body.console .cat-table td .sub { margin-top: 4px; }
body.console .inline-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 500; white-space: nowrap; }
body.console .table-foot { margin: 0; padding: 12px 16px; border-top: 1px solid var(--hair-2); }
.filter-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 10px; background: rgba(15, 23, 40, 0.04); }
body.console .filter-tabs a { padding: 5px 12px; border-radius: 8px; color: var(--s-muted); font-size: 12.5px; font-weight: 550; white-space: nowrap; }
body.console .filter-tabs a:hover { color: var(--s-ink); }
body.console .filter-tabs a.active { color: var(--s-ink); background: #fff; box-shadow: 0 0 0 1px var(--hair), 0 1px 2px rgba(15, 23, 40, 0.06); }
.cat-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin-right: 6px; border-radius: 6px; color: var(--s-accent); background: var(--s-accent-soft); font-size: 11.5px; font-weight: 600; vertical-align: 1px; }
.cat-stock { margin-top: 14px; }
.checks [hidden], #extra-list[hidden] { display: none !important; }
.account-line { display: inline-block; max-width: 520px; font-size: 12px; white-space: pre-wrap; word-break: break-all; user-select: all; }
.product-head .kind-tag { margin-left: auto; align-self: flex-start; flex: none; }
body.console .pager, body.site .pager { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--hair-2); color: var(--s-muted); font-size: 13px; }
body.console .pager a, body.site .pager a { font-weight: 600; }
body.console .import-preview { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: rgba(15, 23, 40, 0.04); font-size: 13px; }
body.console .import-preview p { margin: 0 0 8px; }
body.console .import-preview ul { margin: 0; padding-left: 18px; max-height: 180px; overflow: auto; }
body.console .import-preview li { margin: 3px 0; word-break: break-all; }
body.console #extra-wrap { margin: 8px 0 4px; }
body.console #import-lines { min-height: 140px; }

/* 订单明细退款 */
body.console .refund-bar { display: flex; gap: 8px; align-items: center; margin-top: 16px; }
body.console .refund-bar input { flex: 1; height: 36px; }
body.console .refund-bar select { width: 150px; height: 36px; }
body.console .refund-bar button { height: 36px; }
body.console .order-lines button.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }

/* 后台确认弹窗 */
body.console .ask-card { width: min(380px, 100%); }
body.console .ask-card button.danger {
  color: #fff;
  background: linear-gradient(180deg, #d0402f, var(--s-bad));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 14px -8px rgba(180, 35, 24, 0.7);
}
body.console .ask-card button.danger:hover { filter: brightness(1.06); background: linear-gradient(180deg, #d0402f, var(--s-bad)); }
body.console .ask-card p { margin: 8px 0 0; color: var(--s-ink-2); font-size: 13.5px; line-height: 1.7; }

/* 后台登录 */
body.console-login .wrap { display: flex; min-height: 100vh; align-items: flex-start; justify-content: center; }
body.console-login .auth { width: 100%; }

@media (max-width: 1280px) {
  body.console .row2, body.console .row2.list-first { grid-template-columns: 1fr; }
  body.console .setting-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.console .row2 > form.card { max-width: 680px; }
}
@media (max-width: 1100px) {
  body.console .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  body.console .admin { display: block; }
  body.console .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--hair); }
  .side-brand { width: 100%; padding-bottom: 8px; }
  .side-group { display: none; }
  .side-foot { margin: 0; padding: 0; border: 0; }
  body.console .main { padding: 22px 14px 48px; }
  .shortcuts, body.console .form-grid { grid-template-columns: 1fr; }
  body.console .setting-grid { grid-template-columns: 1fr; }
}
