:root {
  --bg: #ffffff;
  --bg-2: #fafafa;
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --line: #e7e7e9;
  --line-strong: #d6d6da;
  --text: #141519;
  --muted: #6f7480;
  --subtle: #f5f5f6;
  --accent: #1a1a1f;
  --accent-soft: #f0f0f2;
  --green: #137a4b;
  --amber: #9a5b00;
  --red: #b42318;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 18, 24, 0.04), 0 8px 24px rgba(16, 18, 24, 0.05);
  --font: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

/* ------------------------------------------------------------------ 导航 */
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px clamp(16px, 5vw, 48px);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 650; letter-spacing: 0.2px; }

.brand-orb {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--text);
  position: relative;
}
.brand-orb::after {
  content: ""; position: absolute; inset: 5px; border-radius: 3px; background: #fff;
}

.brand-text { font-size: 16px; }

.nav-links { display: flex; gap: 18px; margin-left: 8px; flex: 1; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; padding: 4px 0; }
.nav-links a:hover { color: var(--text); }

.nav-user { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.avatar-fallback { display: inline-flex; align-items: center; justify-content: center; background: var(--subtle); color: var(--text); font-weight: 600; font-size: 12px; }
.nickname { color: var(--text); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline { display: inline; }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0; }
.link-btn:hover { color: var(--text); }

/* ------------------------------------------------------------------ 通用 */
.container { width: min(1080px, 92vw); margin: 0 auto; padding: 40px 0 72px; }

h1, h2, h3 { margin: 0 0 10px; line-height: 1.25; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: clamp(26px, 3.6vw, 40px); }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { color: var(--muted); line-height: 1.7; margin: 0 0 10px; font-size: 14px; }
a { color: var(--text); }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.stack { display: grid; gap: 14px; }
.mt { margin-top: 20px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.card:hover { border-color: var(--line-strong); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid var(--text);
  font-size: 14px; font-weight: 550; cursor: pointer; text-decoration: none;
  color: #fff; background: var(--text);
  transition: opacity .15s ease, transform .12s ease, background .15s ease;
  font-family: inherit;
}

.btn:hover { opacity: 0.86; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--subtle); opacity: 1; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { padding: 13px 22px; font-size: 15px; border-radius: 11px; }
.btn-block { width: 100%; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; white-space: nowrap; background: #fff; }
.pill-ok { color: var(--green); border-color: #cfe8db; background: #f2fbf6; }
.pill-warn { color: var(--amber); border-color: #f0e0c2; background: #fdf9f0; }
.pill-bad { color: var(--red); border-color: #f3d3cf; background: #fdf2f1; }

input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text);
  font-size: 14px; font-family: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}

input:focus, select:focus, textarea:focus { border-color: var(--text); box-shadow: 0 0 0 3px rgba(20, 21, 25, 0.06); }
input::placeholder, textarea::placeholder { color: #a2a6ae; }

label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }

/* ------------------------------------------------------------------ 首页 */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 8px 0; }
.hero-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; background: #fff; }
.hero-title { font-size: clamp(30px, 4.6vw, 52px); line-height: 1.1; margin: 18px 0 14px; letter-spacing: -0.03em; }
.grad { color: var(--text); border-bottom: 3px solid var(--text); padding-bottom: 2px; }
.hero p { font-size: 15px; max-width: 540px; }

.orb-card {
  border-radius: var(--radius); padding: 22px; background: var(--subtle);
  border: 1px solid var(--line);
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

.stat { padding: 14px 16px; border-radius: 10px; background: var(--subtle); border: 1px solid var(--line); }
.stat b { font-size: 22px; display: block; color: var(--text); font-weight: 650; }
.stat span { color: var(--muted); font-size: 12px; }

.product-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; position: relative; overflow: hidden; }
.product-card .emoji { font-size: 36px; height: 96px; display: flex; align-items: center; justify-content: center; background: var(--subtle); border-radius: 10px; }
.product-card .emoji img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.product-card .price { color: var(--text); font-weight: 650; font-size: 18px; }
.product-card .price small { color: var(--muted); font-weight: 400; font-size: 12px; }
.product-card .tag { position: absolute; right: 14px; top: 14px; font-size: 11px; color: var(--muted); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; background: #fff; }

.queue-strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 0 10px; }
.queue-chip { min-width: 200px; padding: 13px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.queue-chip .pos { color: var(--muted); font-size: 12px; }

.badge-live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.badge-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

/* ------------------------------------------------------------------ 绑定 */
.bind-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.code-box {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: 8px;
  text-align: center;
  padding: 20px 10px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--subtle);
  color: var(--text);
}

.result-item {
  display: flex; align-items: center; gap: 12px; padding: 11px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.result-item:hover { border-color: var(--line-strong); background: var(--subtle); }
.result-item.selected { border-color: var(--text); background: var(--subtle); }
.result-item .avatar { width: 38px; height: 38px; }
.result-item .name { font-weight: 600; font-size: 14px; }
.result-item .meta { font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------------ 订单/队列 */
.timeline { display: grid; gap: 10px; }
.timeline .step { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 14px; }
.timeline .step i { width: 11px; height: 11px; border-radius: 50%; margin-top: 4px; border: 2px solid var(--line-strong); flex: none; }
.timeline .step.done { color: var(--text); }
.timeline .step.done i { background: var(--text); border-color: var(--text); }
.timeline .step.active i { border-color: var(--text); }

.order-card { border: 1px solid var(--line); border-radius: 10px; padding: 15px; background: #fff; }
.order-card .oid { font-family: Consolas, monospace; font-size: 12px; color: var(--muted); }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 500; font-size: 12px; }
.table code, code { font-family: Consolas, monospace; font-size: 12px; background: var(--subtle); padding: 1px 5px; border-radius: 5px; }

.status-tag { padding: 2px 8px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); background: #fff; }
.status-created, .status-pending { color: var(--amber); border-color: #f0e0c2; }
.status-paid, .status-delivering { color: var(--text); border-color: var(--line-strong); }
.status-delivered { color: var(--green); border-color: #cfe8db; }
.status-failed, .status-refunded, .status-expired { color: var(--red); border-color: #f3d3cf; }

/* ------------------------------------------------------------------ 表单页 */
.tab-btn.is-active { border-color: var(--text); color: var(--text); background: var(--subtle); }
.tab-panel[hidden] { display: none; }

/* ------------------------------------------------------------------ 提示 */
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 50; }
.toast {
  padding: 11px 14px; border-radius: 10px; background: #fff;
  border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-size: 13.5px;
}
.toast.ok { border-color: #cfe8db; }
.toast.err { border-color: #f3d3cf; }

.footer {
  display: flex; gap: 9px; justify-content: center; align-items: center; flex-wrap: wrap;
  padding: 24px 16px 36px; color: var(--muted); font-size: 12px;
  border-top: 1px solid var(--line);
}
.footer .dot { opacity: .5; }
.footer a { color: var(--muted); }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .big { font-size: 36px; display: block; margin-bottom: 10px; }

.divider { height: 1px; background: var(--line); margin: 18px 0; }

.code { font-family: Consolas, monospace; background: var(--subtle); border: 1px solid var(--line); border-radius: 9px; padding: 11px; overflow: auto; font-size: 12px; white-space: pre-wrap; }

/* ------------------------------------------------------------------ 响应式 */
@media (max-width: 900px) {
  .hero, .bind-grid, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .nav { flex-wrap: wrap; gap: 10px; }
  .nav-links { order: 3; width: 100%; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; }
}

/* ==================================================================
   2026 侧边栏改版：参考 MCSM / CA 用户中心的浅色玻璃风格
   ================================================================== */
:root {
  --bg: #eef3fb;
  --bg-2: #f7f9fe;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-solid: #ffffff;
  --line: rgba(108, 132, 172, 0.18);
  --line-strong: rgba(108, 132, 172, 0.32);
  --text: #16233b;
  --muted: #6b7890;
  --subtle: rgba(244, 247, 253, 0.9);
  --accent: #2f7cf6;
  --accent-soft: rgba(47, 124, 246, 0.10);
  --green: #0f8a5f;
  --amber: #a86400;
  --red: #c0322a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(35, 55, 90, 0.04), 0 14px 34px rgba(35, 55, 90, 0.08);
  --sidebar-w: 236px;
}

body.is-app, body.is-auth {
  background:
    radial-gradient(1100px 720px at 0% 0%, #dbe7ff 0%, rgba(219, 231, 255, 0) 55%),
    radial-gradient(900px 640px at 100% 0%, #ffe4f2 0%, rgba(255, 228, 242, 0) 55%),
    radial-gradient(900px 700px at 86% 100%, #d9f7ee 0%, rgba(217, 247, 238, 0) 60%),
    linear-gradient(135deg, #f5f8ff 0%, #fbf7ff 46%, #f3fbf8 100%);
  background-attachment: fixed;
}

/* ---------------- 侧边栏 ---------------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  padding: 18px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(22px) saturate(160%);
  border-right: 1px solid var(--line);
  z-index: 40;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 12px;
  text-decoration: none;
  color: var(--text);
}
.side-brand b { display: block; font-size: 15px; letter-spacing: 0.2px; }
.side-brand small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.side-brand .brand-orb { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, #3b86ff, #7a5cff); }
.side-brand .brand-orb::after { inset: 6px; border-radius: 3px; }

.side-nav { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 3px; padding: 0 2px; }
.side-label {
  margin: 12px 10px 5px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  color: #4b5a76;
  text-decoration: none;
  font-size: 13.5px;
  transition: background .15s ease, color .15s ease;
}
.side-link svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.side-link:hover { background: rgba(255, 255, 255, 0.9); color: var(--text); }
.side-link.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-link.is-active svg { stroke: var(--accent); }

.side-user {
  border-top: 1px solid var(--line);
  padding: 12px 6px 4px;
  display: grid;
  gap: 10px;
}
.side-user-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.side-user-row .avatar { width: 34px; height: 34px; }
.side-user-meta { min-width: 0; }
.side-user-meta b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-meta small { display: block; color: var(--muted); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ---------------- 顶栏 / 内容 ---------------- */
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 11px clamp(16px, 3vw, 30px);
  background: rgba(247, 250, 255, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.topbar-title b { display: block; font-size: 16px; font-weight: 650; margin-top: 1px; }
.top-actions { display: flex; align-items: center; gap: 10px; }

.menu-btn { display: none; }
.icon-btn {
  width: 34px; height: 34px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75); color: #46546e; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.icon-btn:hover { background: #fff; border-color: var(--line-strong); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.content { width: 100%; max-width: 1220px; margin: 0 auto; padding: clamp(18px, 2.4vw, 30px) clamp(16px, 3vw, 30px) 44px; flex: 1; }

.foot {
  display: flex; gap: 9px; justify-content: center; align-items: center; flex-wrap: wrap;
  padding: 16px; color: var(--muted); font-size: 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
}
.foot a { color: var(--muted); text-decoration: none; }
.foot .dot { opacity: .5; }

.scrim { display: none; }

/* ---------------- 玻璃卡片 / 控件 ---------------- */
.card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(150%);
  border-radius: var(--radius);
}
.card:hover { border-color: rgba(255, 255, 255, 0.95); }
.card h2, .card h3 { color: var(--text); }

.btn {
  background: linear-gradient(180deg, #3b86ff, #2f6fe0);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(47, 124, 246, 0.22);
}
.btn:hover { opacity: 1; filter: brightness(1.03); }
.btn-ghost { background: rgba(255, 255, 255, 0.8); color: var(--text); border-color: var(--line-strong); box-shadow: none; }
.btn-ghost:hover { background: #fff; }
.btn-sm { border-radius: 8px; }

input, select, textarea {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--line-strong);
  border-radius: 9px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 124, 246, 0.13);
}

.pill { background: rgba(255, 255, 255, 0.85); }
.pill-ok { color: var(--green); border-color: #bfe7d5; background: #f0fbf6; }
.pill-warn { color: var(--amber); border-color: #f0dfbe; background: #fdf8ee; }

.stat { background: rgba(246, 249, 255, 0.85); border-color: var(--line); }
.queue-chip, .order-card, .result-item { background: rgba(255, 255, 255, 0.8); border-color: var(--line); }
.product-card .emoji { background: rgba(246, 249, 255, 0.9); }
.hero-badge { background: rgba(255, 255, 255, 0.8); }
.code-box { background: rgba(246, 249, 255, 0.9); }

.table th, .table td { border-bottom-color: var(--line); }
.table tr:hover td { background: rgba(246, 249, 255, 0.55); }

/* 后台原有的横向 tab 导航，改成胶囊分段 */
.tabs, .admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a, .admin-nav a {
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7); color: var(--muted); text-decoration: none; font-size: 13px;
}
.tabs a.is-active, .admin-nav a.is-active { background: var(--accent-soft); border-color: rgba(47, 124, 246, 0.25); color: var(--accent); font-weight: 600; }

/* ---------------- 登录 / 初始化 ---------------- */
.auth-content { width: min(560px, 92vw); margin: 0 auto; padding: 7vh 0 26px; }
.auth-brand {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 16px 4px; color: var(--text); text-decoration: none;
  font-weight: 650; font-size: 17px;
}
.auth-brand .brand-orb { width: 24px; height: 24px; border-radius: 7px; background: linear-gradient(135deg, #3b86ff, #7a5cff); }
.auth-brand .brand-orb::after { inset: 5px; border-radius: 3px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 11.5px; padding: 0 0 28px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
  .sidebar { transform: translateX(-102%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(20, 35, 60, .18); }
  .sidebar.is-open { transform: none; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(20, 30, 50, 0.26); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .scrim.is-open { opacity: 1; pointer-events: auto; }
  .topbar { padding: 10px 14px; }
  .content { padding: 16px 14px 36px; }
  .top-actions .badge-live { display: none; }
}

@media (max-width: 720px) {
  .hero, .bind-grid, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .topbar-title small { display: none; }
  .auth-content { padding-top: 5vh; }
}

@media (max-width: 720px) {
  .table { display: block; overflow-x: auto; white-space: nowrap; }
  .content > .card, .content > .stack > .card { padding: 16px; }
}

/* 未登录：只保留「登录 / 注册」两个入口 */
.auth-nav {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px clamp(14px, 4vw, 26px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.auth-nav .auth-brand { margin: 0; font-size: 16px; }
.auth-nav-links {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(12px);
}
.auth-nav-link {
  padding: 6px 16px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: color .15s ease, background .15s ease;
}
.auth-nav-link:hover { color: var(--text); }
.auth-nav-link.is-active {
  background: #fff;
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(35, 55, 90, 0.08);
}

.auth-content { padding: 3vh 0 26px; }

@media (max-width: 720px) {
  .auth-nav { padding: 12px 14px; }
  .auth-nav-link { padding: 6px 13px; }
}

/* QQ 号输入：后缀固定 @qq.com */
.mail-field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.85);
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.mail-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 124, 246, 0.13);
}
.mail-field input {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  flex: 1;
  min-width: 0;
}
.mail-field input:focus { border: 0; box-shadow: none; }
.mail-suffix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(244, 247, 253, 0.9);
  border-left: 1px solid var(--line);
  white-space: nowrap;
}

/* 侧边栏折叠（桌面端只显示图标） */
.side-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px 10px;
}
.side-toggle {
  width: 34px;
  height: 34px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: #46546e;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.side-toggle:hover { background: #fff; border-color: var(--line-strong); }
.side-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.side-brand { padding: 0; flex: 1; min-width: 0; }
.side-brand-text { min-width: 0; }
.side-brand-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (min-width: 981px) {
  .sidebar, .main { transition: width .2s ease, margin-left .2s ease; }
  body.side-collapsed .sidebar { width: 78px; padding-left: 10px; padding-right: 10px; }
  body.side-collapsed .main { margin-left: 78px; }
  body.side-collapsed .side-head { justify-content: center; padding-left: 0; padding-right: 0; }
  body.side-collapsed .side-brand { display: none; }
  body.side-collapsed .side-label { display: none; }
  body.side-collapsed .side-link {
    justify-content: center;
    padding: 11px 0;
    font-size: 0;
    gap: 0;
  }
  body.side-collapsed .side-link svg { width: 20px; height: 20px; }
  body.side-collapsed .side-user { padding-left: 0; padding-right: 0; align-items: center; }
  body.side-collapsed .side-user-meta { display: none; }
  body.side-collapsed .side-user-row { justify-content: center; }
  body.side-collapsed .side-user-actions { flex-direction: column; align-items: center; gap: 6px; }
  body.side-collapsed .side-user-actions .pill { display: none; }
}

/* 顶栏汉堡只在移动端出现；桌面端用侧边栏顶部的折叠按钮 */
body .menu-btn { display: none; }
@media (max-width: 980px) {
  body .menu-btn { display: inline-flex; }
}

/* 折叠按钮只在手机端出现；电脑端侧边栏始终完整显示 */
.side-toggle { display: none; }
@media (max-width: 980px) {
  .side-toggle { display: inline-flex; }
}

/* 未登录：账号侧边栏（登录 / 注册），移动端变成顶部一行 */
.auth-sidebar .side-head { padding-bottom: 6px; }
.auth-sidebar .side-nav { flex: 0; }

@media (max-width: 980px) {
  .auth-sidebar {
    position: static;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: none;
  }
  .auth-sidebar .side-head { padding: 0; flex: none; }
  .auth-sidebar .side-brand-text small { display: none; }
  .auth-sidebar .side-nav {
    flex-direction: row;
    align-items: center;
    margin-left: auto;
    padding: 0;
    gap: 4px;
    overflow: visible;
  }
  .auth-sidebar .side-label { display: none; }
  .auth-sidebar .side-link { padding: 7px 12px; font-size: 13px; gap: 6px; }
  .auth-sidebar .side-link svg { width: 16px; height: 16px; }
  .auth-main { margin-left: 0; min-height: auto; }
  .auth-content { padding-top: 5vh; }
}

.auth-main .auth-content { flex: 1; }


/* 未登录布局：侧边栏显示登录/注册，卡片在视口正中（忽略侧边栏宽度） */
.auth-sidebar .side-nav { flex: 0 0 auto; }
.auth-main { margin-left: 0; min-height: 100vh; }
.auth-main .auth-content {
  flex: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-main .auth-content > div { width: 100%; max-width: 560px; margin: 0 auto; }

@media (max-width: 980px) {
  .auth-main { min-height: auto; }
  .auth-main .auth-content { padding: 5vh 14px 24px; }
}

/* 未绑定账号的强制弹窗（不可关闭） */
body.is-gated { overflow: hidden; }
.bind-gate {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(238, 244, 255, 0.62);
  backdrop-filter: blur(16px) saturate(140%);
}
.bind-gate-card {
  width: min(420px, 92vw);
  padding: 30px 26px 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 60px rgba(35, 55, 90, 0.18);
  text-align: center;
}
.bind-gate-card h2 { font-size: 22px; }
.bind-gate-card p { margin-bottom: 18px; }

.badge-live.off i { background: var(--muted); }


.home-blank { min-height: 60vh; }


/* 通用弹窗（修改密码等） */
body.modal-open { overflow: hidden; }
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 35, 60, 0.28);
  backdrop-filter: blur(8px);
}
.modal-mask[hidden] { display: none; }
.modal-card {
  width: min(440px, 94vw);
  padding: 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 60px rgba(35, 55, 90, 0.22);
}

/* 商品图：正方形 */
.product-card .emoji {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  font-size: 56px;
  border-radius: 12px;
}
.product-card .emoji img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.product-card .tag { display: none; }

.save-fab { position: fixed; right: 28px; bottom: 28px; z-index: 60; box-shadow: 0 12px 30px rgba(47, 124, 246, .35); }
.save-hint { position: fixed; right: 28px; bottom: 86px; z-index: 60; background: rgba(255,255,255,.9); padding: 4px 10px; border-radius: 8px; }
@media (max-width: 720px) { .save-fab { right: 16px; bottom: 16px; } .save-hint { right: 16px; bottom: 70px; } }


.modal-card.modal-wide { width: min(680px, 94vw); max-height: 90vh; overflow-y: auto; }


/* 空状态卡片占满整行，跟随内容区自适应 */
.grid-3 > .empty, .grid-2 > .empty { grid-column: 1 / -1; width: 100%; }


/* 后台表格 */
.table-wrap { overflow-x: auto; }
.table td.actions { white-space: nowrap; }
.table td.actions form { display: inline-block; margin: 2px 0; }
.table td.actions .btn { padding: 5px 9px; font-size: 12px; }


/* ==================================================================
   极简白设计系统（2026-11 UI 重构）
   ================================================================== */
:root {
  --bg: #F9FAFB;
  --bg-2: #F3F4F6;
  --panel: #FFFFFF;
  --panel-solid: #FFFFFF;
  --line: #E5E7EB;
  --line-strong: #D1D5DB;
  --text: #111827;
  --muted: #6B7280;
  --subtle: #F9FAFB;
  --accent: #3B82F6;
  --accent-soft: #EFF6FF;
  --green: #15803D;
  --amber: #B45309;
  --red: #B91C1C;
  --radius: 16px;
  --shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --sidebar-w: 260px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

body.is-app, body.is-auth {
  background: #F9FAFB;
  background-image: none;
}

h1 { font-size: 2rem; font-weight: 650; }
h2 { font-size: 1.5rem; font-weight: 650; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { font-size: 1rem; line-height: 1.6; color: var(--muted); }

/* 侧边栏 260px */
.sidebar {
  width: var(--sidebar-w);
  padding: 20px 16px 16px;
  background: #FFFFFF;
  border-right: 1px solid var(--line);
  backdrop-filter: none;
  gap: 16px;
}

.side-brand b { font-size: 1.05rem; }
.side-link {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #374151;
  transition: background .2s ease-in-out, color .2s ease-in-out;
}
.side-link:hover { background: #F3F4F6; color: var(--text); }
.side-link.is-active { background: var(--accent-soft); color: #2563EB; }
.side-link svg { width: 19px; height: 19px; }
.side-label { color: var(--muted); font-size: 0.72rem; letter-spacing: .06em; }
.side-user { border-top: 1px solid var(--line); }

/* 顶栏 */
.topbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
  padding: 14px clamp(16px, 3vw, 32px);
}
.topbar-title b { font-size: 1.1rem; }
.topbar-title small { color: var(--muted); }

/* 内容区：最大 1280px，水平居中 */
.content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 32px) 48px;
}

/* 卡片 */
.card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  backdrop-filter: none;
  transition: transform .2s ease-in-out, box-shadow .2s ease-in-out, border-color .2s ease-in-out;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 18px -6px rgba(0, 0, 0, 0.10);
  border-color: var(--line);
}

/* 按钮 */
.btn {
  background: #3B82F6;
  border: 1px solid #3B82F6;
  color: #FFFFFF;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 500;
  box-shadow: none;
  transition: background-color .2s ease-in-out, border-color .2s ease-in-out, transform .2s ease-in-out;
}
.btn:hover { background: #2563EB; border-color: #2563EB; opacity: 1; filter: none; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: #FFFFFF; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: #F3F4F6; border-color: var(--line-strong); }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; border-radius: 8px; }
.btn-lg { padding: 13px 26px; font-size: 1rem; border-radius: 8px; }
.btn[disabled] { opacity: .45; }

/* 输入框 */
input, select, textarea {
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 10px 12px;
  background: #FFFFFF;
  color: var(--text);
  font-family: var(--font);
  transition: border-color .2s ease-in-out, box-shadow .2s ease-in-out;
}
input:focus, select:focus, textarea:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  outline: none;
}
label { color: var(--muted); font-size: 0.82rem; }

/* 其他通用元素 */
.hero-badge { background: #FFFFFF; border-color: var(--line); }
.pill { background: #FFFFFF; border-color: var(--line); }
.pill-ok { background: #F0FDF4; border-color: #BBF7D0; color: #15803D; }
.pill-warn { background: #FFFBEB; border-color: #FDE68A; color: #B45309; }
.stat { background: #F9FAFB; border-color: var(--line); border-radius: 12px; }
.queue-chip, .order-card, .result-item { background: #FFFFFF; border-color: var(--line); }
.code-box { background: #F9FAFB; }
.table th { color: var(--muted); }
.table tr:hover td { background: #F9FAFB; }

/* 未登录页面 */
.auth-sidebar { background: #FFFFFF; }
.auth-content { padding: 4vh 0 26px; }

@media (max-width: 980px) {
  .sidebar { width: var(--sidebar-w); }
  .content { padding: 20px 14px 36px; }
}

/* 站点配置：卡片入口 */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.setting-tile {
  text-align: left;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  font-family: inherit;
  transition: transform .2s ease-in-out, box-shadow .2s ease-in-out;
}
.setting-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 18px -6px rgba(0, 0, 0, 0.10);
}
.setting-tile b { display: block; font-size: 1.05rem; color: var(--text); margin-bottom: 6px; }
.setting-tile span { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }

/* ==================================================================
   石与苔 · 2026-11 公共商店改版
   目标：像服务器自己的商店账本，而不是通用 SaaS 面板。
   ================================================================== */
:root {
  --bg: #f2f0e8;
  --bg-2: #eae7dd;
  --panel: #fbfaf6;
  --panel-solid: #fbfaf6;
  --line: #ddd8ca;
  --line-strong: #c7c1b1;
  --text: #20251f;
  --muted: #6c7266;
  --subtle: #efece3;
  --accent: #3f6b3a;
  --accent-ink: #2f512c;
  --accent-soft: #e6ecdf;
  --green: #3f6b3a;
  --amber: #8a5a22;
  --red: #9c3b32;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(32, 37, 31, 0.05);
  --sidebar-w: 248px;
  --font: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, rgba(32, 37, 31, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(32, 37, 31, 0.035) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
}

body.is-app, body.is-auth {
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, rgba(32, 37, 31, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(32, 37, 31, 0.035) 1px, transparent 1px);
  background-size: 24px 24px;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
h1 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 24px; line-height: 1.3; margin: 0 0 10px; }
h3 { font-size: 17px; line-height: 1.4; margin: 0 0 8px; }
p { font-size: 14px; line-height: 1.7; color: var(--muted); margin: 0 0 12px; }

a { color: var(--text); }
img { max-width: 100%; }

.mono, .price, .item-index, .catalog-row-price, .product-caption, .topbar-title small {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---------------- 侧边栏 ---------------- */
.sidebar {
  width: var(--sidebar-w);
  padding: 20px 14px 14px;
  gap: 14px;
  background: #f7f5ee;
  border-right: 1px solid var(--line);
  backdrop-filter: none;
  box-shadow: none;
}

.side-head { padding: 2px 4px 10px; }
.side-brand { gap: 10px; padding: 0; color: var(--text); }
.side-brand b { font-family: var(--font-serif); font-size: 17px; font-weight: 600; letter-spacing: 0; }
.side-brand small { color: var(--muted); font-size: 11px; }
.brand-orb {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 4px;
  background: var(--accent);
  position: relative;
}
.brand-orb::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 2px;
  background: var(--panel);
}

.side-nav { gap: 2px; padding: 0; }
.side-label {
  margin: 18px 10px 6px;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--muted);
}
.side-link {
  height: 34px;
  padding: 0 10px;
  gap: 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--muted);
  transition: background-color .15s ease, color .15s ease;
}
.side-link svg { width: 18px; height: 18px; stroke-width: 1.5; }
.side-link:hover { background: #efece3; color: var(--text); }
.side-link.is-active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--accent);
}
.side-link.is-active svg { stroke: var(--accent-ink); }

.side-user { padding: 12px 6px 4px; border-top: 1px solid var(--line); gap: 10px; }
.side-user-row .avatar { width: 32px; height: 32px; border: 1px solid var(--line); }
.side-user-meta b { font-size: 12.5px; }
.side-user-meta small { font-size: 10.5px; }
.avatar-fallback { background: var(--subtle); color: var(--text); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  white-space: nowrap;
  text-decoration: none;
}
.pill-ok { color: var(--green); border-color: #c8d6bd; background: #eef4e8; }
.pill-warn { color: var(--amber); border-color: #e2d2b6; background: #f7f0e3; }
.pill-bad { color: var(--red); border-color: #e0c4bf; background: #f6e9e7; }

/* ---------------- 顶栏 / 内容 ---------------- */
.topbar {
  padding: 12px clamp(16px, 3vw, 30px);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
}
.topbar-title small { color: var(--muted); font-size: 10.5px; letter-spacing: 0.04em; }
.topbar-title b { font-family: var(--font-serif); font-size: 16px; font-weight: 600; margin-top: 1px; }
.top-actions { gap: 8px; }

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--subtle); border-color: var(--line-strong); color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; stroke-width: 1.5; }
.badge-live { font-size: 11.5px; color: var(--muted); gap: 6px; }
.badge-live i { width: 6px; height: 6px; background: var(--accent); }

.content {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 32px) 52px;
  flex: 1;
}
body.is-storefront .content { max-width: 1160px; padding-top: 34px; }

.foot {
  padding: 16px;
  color: var(--muted);
  font-size: 11.5px;
  border-top: 1px solid var(--line);
  background: transparent;
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }

/* ---------------- 卡片 / 按钮 / 表单 ---------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  backdrop-filter: none;
  padding: 20px;
  transition: border-color .15s ease;
}
.card:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--line-strong);
}
.card h2, .card h3 { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition: background-color .15s ease, border-color .15s ease, transform .12s ease;
}
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); opacity: 1; filter: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 2px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: var(--subtle); border-color: var(--line-strong); color: var(--text); }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 5px; }
.btn-lg { padding: 12px 20px; font-size: 14.5px; border-radius: 7px; }
.btn-block { width: 100%; }

input, select, textarea {
  width: 100%;
  padding: 9px 10px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: #9b9d92; }
label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
textarea.code, .code { font-family: var(--font-mono); font-size: 11.5px; }

.divider { height: 1px; background: var(--line); margin: 18px 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.spread { gap: 16px; }
.stack { gap: 12px; }
.mt { margin-top: 18px; }

.toast {
  padding: 10px 12px;
  border-radius: 7px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  font-size: 12.5px;
}
.toast.ok { border-color: #c8d6bd; }
.toast.err { border-color: #e0c4bf; }

/* ---------------- 表格 / 状态 ---------------- */
.table { font-size: 13px; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--line); }
.table th { font-weight: 500; color: var(--muted); font-size: 11px; letter-spacing: 0.02em; }
.table tr:hover td { background: var(--subtle); }
.table code, code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--subtle);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 4px;
}
.status-tag { border-radius: 4px; padding: 2px 7px; font-size: 11px; }
.status-created, .status-pending { color: var(--amber); border-color: #e2d2b6; }
.status-paid, .status-delivering { color: var(--text); border-color: var(--line-strong); }
.status-delivered { color: var(--green); border-color: #c8d6bd; }
.status-failed, .status-refunded, .status-expired { color: var(--red); border-color: #e0c4bf; }

/* ---------------- 弹窗 / 提示 ---------------- */
.modal-mask { background: rgba(32, 37, 31, 0.34); backdrop-filter: none; }
.modal-card {
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(32, 37, 31, 0.18);
}
.bind-gate { background: rgba(242, 240, 232, 0.78); backdrop-filter: none; }
.bind-gate-card {
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(32, 37, 31, 0.16);
}

/* ---------------- 首页 ---------------- */
.home {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 190px);
  padding: 12px 0 40px;
}
.home-copy { max-width: 560px; }
.home-copy h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.08; margin: 0 0 18px; }
.home-lead { max-width: 460px; font-size: 15px; color: var(--muted); margin-bottom: 24px; }
.home-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.home-note { margin-top: 28px; font-size: 11.5px; color: var(--muted); }
.home-visual { display: flex; flex-direction: column; gap: 10px; }
.home-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
}

/* ---------------- 商品目录 ---------------- */
.catalog { max-width: 1080px; }
.catalog-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.catalog-head h1 { font-size: clamp(32px, 4vw, 46px); margin: 0 0 10px; }
.catalog-lead { max-width: 540px; margin: 0; color: var(--muted); font-size: 14px; }
.catalog-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; padding-bottom: 4px; }
.catalog-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.catalog-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}
.text-link:hover { color: var(--accent-ink); border-color: var(--accent); }

.featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: center;
  margin-top: 24px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease;
}
.featured:hover { border-color: var(--line-strong); }
.featured-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.featured-copy h2 { font-size: clamp(26px, 3vw, 36px); margin: 0 0 10px; }
.featured-copy p { max-width: 460px; }
.featured-meta { display: flex; align-items: baseline; gap: 16px; margin: 18px 0 8px; }
.featured .text-link { margin-top: 10px; }
.pixel-item {
  position: relative;
  z-index: 1;
  width: 58%;
  height: 58%;
  image-rendering: pixelated;
}
.item-plate-lg .pixel-item { width: 68%; height: 68%; }
.item-plate-sm .pixel-item { width: 60%; height: 60%; }

.item-plate {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--subtle);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.item-plate::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(32, 37, 31, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(32, 37, 31, 0.05) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}
.item-plate img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
}
.item-plate-lg {
  width: 300px;
  height: 300px;
  min-height: 0;
  aspect-ratio: auto;
  justify-self: end;
}
.item-plate-xl { min-height: 380px; aspect-ratio: 1 / 1; }
.item-plate-sm { width: 64px; height: 64px; flex: none; }
.item-glyph {
  position: relative;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: clamp(64px, 9vw, 112px);
  line-height: 1;
  color: var(--text);
  opacity: 0.9;
}
.item-plate-sm .item-glyph { font-size: 28px; }
.item-index {
  position: absolute;
  left: 10px;
  bottom: 8px;
  z-index: 2;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(251, 250, 246, 0.86);
  font-size: 10px;
  color: var(--muted);
}
.item-plate-sm .item-index { display: none; }

.price {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.price small { font-family: var(--font); font-size: 11.5px; color: var(--muted); letter-spacing: 0; }
.price-lg { font-size: 26px; }
.stock { font-size: 11.5px; color: var(--muted); }

.catalog-list { margin-top: 8px; border-top: 1px solid var(--line); }
.catalog-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto auto 20px;
  gap: 16px;
  align-items: center;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background-color .15s ease;
}
.catalog-row:hover { background: rgba(63, 107, 58, 0.045); }
.catalog-row-copy strong { display: block; font-size: 15px; font-weight: 600; }
.catalog-row-copy small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.catalog-row-price { font-size: 13px; white-space: nowrap; }
.catalog-row-stock { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.catalog-arrow { color: var(--muted); font-size: 14px; text-align: right; }
.catalog-row:hover .catalog-arrow { color: var(--accent); }
.catalog-note { margin-top: 20px; font-size: 11.5px; color: var(--muted); }

.empty-state {
  margin-top: 24px;
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
}
.empty-state h2 { margin: 0 0 6px; }

/* ---------------- 商品详情 ---------------- */
.product-page { max-width: 1080px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
}
.back-link:hover { color: var(--text); }
.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.product-visual { display: flex; flex-direction: column; gap: 10px; }
.process {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 52px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.process-step { display: flex; align-items: flex-start; gap: 12px; }
.process-no { padding-top: 2px; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
.process-step strong { display: block; font-size: 13px; font-weight: 600; }
.process-step p { margin: 2px 0 0; font-size: 12px; line-height: 1.6; }
.product-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
}
.buy-panel { padding-top: 4px; }
.buy-panel h1 { font-size: clamp(30px, 3.6vw, 42px); margin: 0 0 12px; }
.product-summary { color: var(--text); font-size: 15px; margin-bottom: 10px; }
.product-description { white-space: pre-line; font-size: 13px; color: var(--muted); }
.buy-price-row { display: flex; align-items: baseline; gap: 16px; margin-top: 22px; }
.buy-label { margin: 0 0 4px; font-size: 11px; color: var(--muted); }
.buy-player { margin: 0 0 16px; font-family: var(--font-mono); font-size: 14px; }
.buy-note { margin-top: 10px; font-size: 11.5px; color: var(--muted); }

/* ---------------- 后台轻整理 ---------------- */
.thumb {
  width: 64px;
  height: 64px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--subtle);
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--text);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.empty-mark { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.admin-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.admin-crumb a { color: var(--muted); text-decoration: none; }
.admin-crumb a:hover { color: var(--text); }
.admin-crumb-user { margin-left: auto; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "＋"; margin-right: 6px; color: var(--muted); }
details[open] > summary::before { content: "－"; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
  .content { padding: 22px 16px 40px; }
  body.is-storefront .content { padding-top: 24px; }
  .home { grid-template-columns: 1fr; gap: 28px; min-height: 0; padding-top: 8px; }
  .home-visual { max-width: 420px; }
  .catalog-head { grid-template-columns: 1fr; gap: 16px; }
  .catalog-side { flex-direction: row; align-items: center; gap: 18px; }
  .featured { grid-template-columns: 1fr; }
  .item-plate-lg {
    width: 100%;
    height: auto;
    min-height: 240px;
    aspect-ratio: 1 / 1;
    justify-self: stretch;
  }
  .product-layout { grid-template-columns: 1fr; gap: 26px; }
  .item-plate-xl { min-height: 280px; }
}

@media (max-width: 640px) {
  h1 { font-size: 28px; }
  .home-copy h1 { font-size: 34px; }
  .featured { padding: 16px; }
  .item-plate-lg { min-height: 200px; }
  .catalog-row { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; }
  .item-plate-sm { width: 48px; height: 48px; }
  .catalog-row-price { grid-column: 2; grid-row: 2; }
  .catalog-row-stock, .catalog-arrow { display: none; }
  .catalog-row-copy small { white-space: normal; }
  .buy-panel h1 { font-size: 30px; }
  .process { grid-template-columns: 1fr; gap: 14px; margin-top: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; }
}

/* 旧层里带更高特异性的渐变/玻璃规则，统一压平 */
.side-brand .brand-orb,
.auth-brand .brand-orb {
  background: var(--accent);
  box-shadow: none;
}
.side-brand .brand-orb::after,
.auth-brand .brand-orb::after {
  inset: 6px;
  border-radius: 2px;
  background: var(--panel);
}
.auth-nav-links {
  background: transparent;
  backdrop-filter: none;
}
.auth-nav-link.is-active {
  background: var(--panel);
  color: var(--accent-ink);
  box-shadow: none;
}
.setting-tile:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--line-strong);
}
.save-fab {
  background: var(--accent);
  box-shadow: none;
}
.scrim {
  background: rgba(32, 37, 31, 0.28);
  backdrop-filter: none;
}

/* ---------------- v15 表格 / 卡片列表整理 ---------------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.page-title { margin: 0; font-size: clamp(26px, 3vw, 32px); }
.page-head .eyebrow { margin-bottom: 6px; }

.table-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.table-card .table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.data-table th {
  padding: 10px 14px;
  background: var(--subtle);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: var(--subtle); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .col-action { text-align: right; white-space: nowrap; }
.data-table .cell-main { color: var(--text); font-weight: 600; }
.data-table .cell-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 400;
}
.data-table .price-cell { font-family: var(--font-mono); font-size: 12.5px; }
.data-table .actions { white-space: nowrap; }
.data-table .actions form { display: inline-block; margin: 0; }
.data-table .actions .btn { padding: 5px 9px; font-size: 12px; }
.mono-link {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.mono-link:hover { border-color: var(--line-strong); }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.queue-pos { color: var(--muted); font-size: 11.5px; }

/* 后台商品卡片列表 */
.admin-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
  gap: 14px;
  align-items: start;
}
.admin-product-card { padding: 16px; }
.admin-product-card .product-card-head { align-items: flex-start; }
.admin-product-card details {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.admin-product-card details > summary { color: var(--muted); }
.admin-product-card .thumb { width: 56px; height: 56px; }

/* 商品图标上传 */
.image-field { margin: 2px 0; }
.image-field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.file-btn { position: relative; overflow: hidden; }
.file-btn input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.image-preview-box {
  display: grid;
  place-items: center;
  min-height: 150px;
  margin-top: 8px;
  padding: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--subtle);
  text-align: center;
}
.image-preview-box img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  object-fit: contain;
}
.image-preview-box-sm { min-height: 96px; }
.image-preview-box-sm img { max-height: 120px; }
.image-preview-empty { padding: 22px 10px; }

/* 卡片列表统一留白 */
.grid-2 > .card { height: 100%; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

@media (max-width: 980px) {
  .admin-product-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .data-table th, .data-table td { padding: 11px 12px; }
  .data-table .col-optional { display: none; }
  .data-table .actions { white-space: normal; }
  .data-table .actions .btn { margin: 2px 0; }
  .orders-table .col-action { width: 64px; }
}

.admin-product-card details > .grid-2 { grid-template-columns: minmax(0, 1fr) 170px; }
@media (max-width: 640px) {
  .admin-product-card details > .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .orders-table th.col-action,
  .orders-table td.col-action { display: none; }
  .orders-table .mono-link { font-size: 10.5px; }
}

.admin-orders-table .col-action { min-width: 190px; }
.admin-orders-table .col-action .row { flex-wrap: nowrap; }
.admin-orders-table .col-action form { display: inline-flex; }
.admin-orders-table .col-action .btn { white-space: nowrap; }

.admin-orders-table { table-layout: fixed; width: 100%; }
.admin-orders-table th:nth-child(1) { width: 20%; }
.admin-orders-table th:nth-child(2) { width: 12%; }
.admin-orders-table th:nth-child(3) { width: 8%; }
.admin-orders-table th:nth-child(4) { width: 13%; }
.admin-orders-table th:nth-child(5) { width: 25%; }
.admin-orders-table th:nth-child(6) { width: 22%; }
.admin-orders-table .col-action { min-width: 0; }
.admin-orders-table .cell-main { overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .orders-table { table-layout: fixed; }
  .orders-table th:nth-child(1) { width: 42%; }
  .orders-table th:nth-child(2) { width: 24%; }
  .orders-table th:nth-child(3) { width: 13%; }
  .orders-table th:nth-child(4) { width: 21%; }
  .orders-table td { overflow-wrap: anywhere; }
}

/* 商品目录：统一卡片，不做首件置顶 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease;
}
.product-card:hover { border-color: var(--line-strong); }
.product-card .item-plate-card {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.product-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  padding: 14px 16px 16px;
}
.product-card-body .eyebrow { margin: 0; }
.product-card-body h2 { margin: 0; font-size: 20px; }
.product-card-summary {
  min-height: 2.8em;
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}
.product-card-foot {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}
.product-card-link { margin-left: auto; color: var(--muted); font-size: 12px; }
.product-card:hover .product-card-link { color: var(--accent-ink); }

@media (max-width: 640px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* 侧栏：导航滚动，底部用户卡片固定 */
.sidebar:not(.auth-sidebar) { height: 100dvh; max-height: 100dvh; overflow: hidden; }
.sidebar:not(.auth-sidebar) .side-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.sidebar:not(.auth-sidebar) .side-user { flex: 0 0 auto; }
.sidebar:not(.auth-sidebar) .side-head { flex: 0 0 auto; }

.pill-offline { background: #fff; border-color: var(--line); color: var(--muted); }

.field-hint { margin: 5px 0 0; line-height: 1.5; }

/* 手机端：订单改为卡片，桌面仍是表格 */
.mobile-order-list { display: none; }
.order-limit-note { margin-top: 12px; }
.order-limit-note a { color: var(--text); }

@media (max-width: 640px) {
  .orders-table-card { display: none; }
  .mobile-order-list { display: grid; gap: 10px; margin-top: 14px; }
  .mobile-order-card {
    display: block;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    color: inherit;
    text-decoration: none;
  }
  .mobile-order-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .mobile-order-id {
    overflow: hidden;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 10.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-order-product { display: block; margin-top: 9px; font-size: 15px; }
  .mobile-order-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
  }
  .mobile-order-price { color: var(--text); font-family: var(--font-mono); font-size: 13px; }
  .mobile-order-time { margin-top: 5px; color: var(--muted); font-size: 10.5px; }
}

@media (max-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
  .product-card-body { padding: 9px 10px 10px; gap: 4px; }
  .product-card-body .eyebrow { font-size: 9px; }
  .product-card-body h2 { font-size: 15px; line-height: 1.3; }
  .product-card-summary {
    display: -webkit-box;
    min-height: 0;
    overflow: hidden;
    font-size: 10.5px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .product-card-foot { flex-wrap: wrap; gap: 4px; padding-top: 6px; }
  .product-card-foot .price { font-size: 14px; }
  .product-card-foot .stock { font-size: 9.5px; }
  .product-card-link { font-size: 10px; }
  .item-plate-card .item-index { left: 6px; bottom: 5px; font-size: 8px; }
  .catalog-head h1 { font-size: 30px; }
  .catalog-lead { font-size: 13px; }
}

@media (max-width: 640px) {
  .product-page { padding-top: 2px; }
  .back-link { margin-bottom: 12px; }
  .product-layout { gap: 18px; }
  .product-visual { align-items: center; }
  .item-plate-xl { width: 190px; height: 190px; min-height: 0; aspect-ratio: 1 / 1; }
  .product-caption { width: 190px; }
  .buy-panel h1 { font-size: 28px; margin-bottom: 8px; }
  .product-summary { font-size: 13px; margin-bottom: 7px; }
  .product-description { font-size: 12.5px; }
  .buy-price-row { margin-top: 12px; }
  .buy-label { margin-bottom: 2px; }
  .buy-player { font-size: 13px; margin-bottom: 12px; }
  .buy-note { margin-top: 8px; }
  .process { margin-top: 28px; padding-top: 16px; gap: 10px; }
}

@media (max-width: 640px) {
  .topbar { padding-top: calc(10px + env(safe-area-inset-top)); }
  .content { padding-bottom: calc(42px + env(safe-area-inset-bottom)); }
  .foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .sidebar:not(.auth-sidebar) { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}

.mobile-admin-orders { display: none; }
@media (max-width: 640px) {
  .admin-orders-table-wrap { display: none; }
  .mobile-admin-orders { display: grid; gap: 10px; margin-top: 14px; }
  .mobile-admin-order {
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
  }
  .mobile-admin-error {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 7px;
    color: var(--red);
    font-size: 10.5px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  .mobile-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }
  .mobile-admin-actions form { margin: 0; }
}

@media (max-width: 640px) {
  .mobile-order-list, .mobile-admin-orders { grid-template-columns: minmax(0, 1fr); }
  .mobile-order-card, .mobile-admin-order { min-width: 0; overflow: hidden; }
  .mobile-admin-error { overflow-wrap: anywhere; word-break: break-word; }
}

/* 自定义站点 Logo */
.brand-orb.has-logo { overflow: hidden; background: transparent; }
.brand-orb.has-logo::after { display: none; }
.brand-orb.has-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.branding-grid { align-items: start; }
.branding-preview { min-height: 120px; }
.branding-preview img { max-height: 120px; }

/* 顶栏机器人状态 */
.topbar-bot {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 42vw;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}
.bot-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(180, 60, 50, 0.08);
}
.bot-dot.is-online {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(63, 107, 58, 0.1);
}
.bot-name {
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bot-state { color: var(--muted); white-space: nowrap; }

@media (max-width: 640px) {
  .topbar-bot { max-width: 52vw; padding: 6px 8px; gap: 6px; }
  .bot-name { max-width: 92px; font-size: 10px; }
  .bot-state { font-size: 10px; }
}

/* 首页敬请期待 */
.wait-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 58vh;
  max-width: 680px;
  padding: 24px 0 48px;
}
.wait-page h1 {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(64px, 11vw, 120px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--text);
}
.wait-lead {
  max-width: 440px;
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
@media (max-width: 640px) {
  .wait-page { min-height: 55vh; padding: 18px 0 32px; }
  .wait-page h1 { font-size: clamp(56px, 17vw, 84px); }
  .wait-lead { font-size: 13px; }
}

[hidden] { display: none !important; }
