/* =========================================================
   充值中心 · 后台 —— 暗夜奢华金（Luxury Nocturne）双主题
   默认：暗炭黑 + 金；白天：暖白 + 深金
   通过 <html data-theme="light"> 切换
   ========================================================= */
:root {
  /* 暗色（默认） */
  --bg: #0a0c12;
  --surface: #141821;
  --surface-2: #1a2030;
  --ink: #f1eee4;
  --muted: #98a0b0;
  --faint: #5f6876;
  --gold: #e2b45a;
  --gold-bright: #f4ce7a;
  --gold-deep: #b8893a;
  --line: #252d3d;
  --line-strong: #333e55;
  --danger: #ef5350;
  --danger-bg: rgba(239, 83, 80, .12);
  --danger-line: rgba(239, 83, 80, .4);
  --warn: #f0a94b;
  --blue: #6d9dff;
  --input-bg: #0e1118;
  --hover-row: rgba(226, 180, 90, .045);
  --toast-bg: #1b2130;
  --mask: rgba(4, 6, 10, .62);
  --halo: rgba(226, 180, 90, .10);
  --halo-2: rgba(226, 180, 90, .055);
  --grain: rgba(226, 180, 90, .016);
  --topbar-bg: linear-gradient(180deg, rgba(20, 24, 33, .96), rgba(14, 17, 24, .96));
  --tabs-bg: linear-gradient(180deg, #0e1118, #0c0f15);
  --card-grad: linear-gradient(180deg, var(--surface-2), var(--surface));
  --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 12px 32px rgba(0, 0, 0, .38);
  --shadow-pop: 0 32px 90px rgba(0, 0, 0, .62);
  --radius: 14px;
  --radius-sm: 9px;
  --font-sans: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;
}

/* 白天主题 */
:root[data-theme="light"] {
  --bg: #f4f2ec;
  --surface: #ffffff;
  --surface-2: #fbfaf6;
  --ink: #1c1e22;
  --muted: #6b7280;
  --faint: #9aa1ab;
  --gold: #b2801d;
  --gold-bright: #8a6212;
  --gold-deep: #c99a3a;
  --line: #e9e6dd;
  --line-strong: #d7d3c6;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-line: #fca5a5;
  --warn: #d97706;
  --blue: #2563eb;
  --input-bg: #ffffff;
  --hover-row: rgba(178, 128, 29, .05);
  --toast-bg: #1c1e22;
  --mask: rgba(20, 22, 26, .4);
  --halo: rgba(178, 128, 29, .06);
  --halo-2: rgba(178, 128, 29, .04);
  --grain: rgba(178, 128, 29, .035);
  --topbar-bg: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(250, 249, 245, .97));
  --tabs-bg: linear-gradient(180deg, #ffffff, #fbfaf6);
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
  --shadow-pop: 0 24px 60px rgba(16, 24, 40, .22);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 540px at 84% -8%, var(--halo), transparent 62%),
    radial-gradient(900px 500px at 4% 108%, var(--halo-2), transparent 60%),
    repeating-linear-gradient(135deg, var(--grain) 0 1px, transparent 1px 10px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  height: 62px; padding: 0 20px;
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 700; letter-spacing: -.01em;
}
.topbar .logo::before {
  content: ''; width: 11px; height: 11px; border-radius: 3px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  box-shadow: 0 0 0 3px rgba(226, 180, 90, .15), 0 0 14px rgba(226, 180, 90, .4);
}
.topbar .logo span { color: var(--gold-bright); font-weight: 700; }
.topbar .right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
.topbar .right .who {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--gold-bright);
  background: rgba(226, 180, 90, .1); border: 1px solid rgba(226, 180, 90, .22);
  padding: 3px 9px; border-radius: 999px;
}
.topbar .right a { color: var(--muted); cursor: pointer; text-decoration: none; font-weight: 500; }
.topbar .right a:hover { color: var(--gold-bright); }

/* 主题切换按钮 */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; padding: 0;
  background: var(--surface); border: 1px solid var(--line-strong);
  color: var(--muted); cursor: pointer; font-family: inherit;
  transition: color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle:hover { color: var(--gold-bright); border-color: var(--gold-deep); box-shadow: 0 0 12px rgba(226, 180, 90, .18); }
.auth-theme-toggle { position: fixed; top: 18px; right: 18px; z-index: 5; }

/* 导航 tabs（金色下划线式） */
.tabs {
  display: flex; gap: 4px; padding: 0 16px;
  background: var(--tabs-bg);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 62px; z-index: 29;
  overflow-x: auto;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 14px 14px; cursor: pointer;
  font-size: 14px; color: var(--muted); white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: color .15s ease;
}
.tab svg { width: 16px; height: 16px; flex-shrink: 0; }
.tab-dot {
  position: absolute; top: 7px; right: 4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px;
  background: #e5484d; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px;
  text-align: center; font-family: var(--font-mono);
  box-shadow: 0 0 0 2px var(--tabs-bg), 0 2px 6px rgba(229, 72, 77, .45);
  pointer-events: none;
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--gold-bright); font-weight: 600; }
.tab.on::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px;
  height: 2px; border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  box-shadow: 0 0 8px rgba(226, 180, 90, .5);
}

/* 容器与卡片 */
.container { max-width: 1120px; margin: 0 auto; padding: 20px; }
.panel {
  background: var(--card-grad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px; margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.panel h3 {
  margin: 0 0 16px; font-size: 15px; font-weight: 700;
  letter-spacing: -.01em; display: flex; align-items: center;
}
.panel h3 small { color: var(--faint); font-weight: 400; margin-left: 8px; font-size: 12px; font-family: var(--font-mono); }

/* 统计卡片（图标块 + 金色数字） */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card-grad); box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.stat::after {
  content: ''; position: absolute; right: -22px; top: -22px; width: 74px; height: 74px;
  border-radius: 50%; background: radial-gradient(circle, rgba(226, 180, 90, .07), transparent 70%);
  pointer-events: none;
}
.s-ico {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.s-ico svg { width: 21px; height: 21px; }
.stat.gold .s-ico { background: rgba(226, 180, 90, .15); color: var(--gold-bright); }
.stat.amber .s-ico { background: rgba(240, 169, 75, .14); color: #e89a2f; }
.stat.blue .s-ico { background: rgba(109, 157, 255, .14); color: var(--blue); }
.stat.rose .s-ico { background: rgba(244, 114, 118, .14); color: #e2676c; }
.s-info { flex: 1; min-width: 0; }
.stat .k { font-size: 12px; color: var(--muted); letter-spacing: .03em; }
.stat .v {
  font-size: 25px; font-weight: 700; margin-top: 3px;
  font-variant-numeric: tabular-nums; letter-spacing: -.01em; color: var(--ink);
}
.stat.gold .v, .stat.blue .v {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat .s-sub { font-size: 11px; color: var(--faint); margin-top: 3px; letter-spacing: .02em; }

/* 筛选条 */
.filter-bar { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; padding: 2px; }
.filter-bar::-webkit-scrollbar { display: none; }
.fchip {
  flex-shrink: 0; display: inline-flex; align-items: center;
  padding: 6px 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-strong);
  color: var(--muted); font-size: 13px; cursor: pointer; font-family: inherit;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.fchip:hover { color: var(--ink); border-color: var(--gold-deep); }
.fchip.on {
  background: linear-gradient(180deg, #f3cc74, #dfb052);
  color: #231a08; border-color: transparent; font-weight: 600;
}
.fchip .cnt {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 5px; margin-left: 6px;
  border-radius: 999px; font-size: 11px; font-weight: 600; font-style: normal;
  background: var(--line); color: var(--muted);
}
.fchip.on .cnt { background: rgba(0, 0, 0, .15); color: #2a1f08; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.table td { overflow-wrap: break-word; vertical-align: middle; }
.table th {
  color: var(--faint); font-weight: 500; font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase;
}
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: var(--hover-row); }
.table tr:last-child td { border-bottom: none; }
.ops { display: flex; flex-wrap: wrap; gap: 6px; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.amt { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 700; color: var(--gold-bright); }
.table small { color: var(--muted); font-size: 11.5px; }

/* 徽章（暗色底 + 语义色字） */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 500; line-height: 1.6;
}
.b-pending { background: rgba(240, 169, 75, .15); color: #e09a2f; }
.b-paid { background: rgba(109, 157, 255, .15); color: var(--blue); }
.b-completed { background: rgba(226, 180, 90, .16); color: var(--gold-bright); }
.b-rejected { background: rgba(239, 83, 80, .15); color: #e2676c; }
:root[data-theme="light"] .b-pending { color: #c07d10; }
:root[data-theme="light"] .b-paid { color: #2563eb; }
:root[data-theme="light"] .b-completed { color: #8a6212; }
:root[data-theme="light"] .b-rejected { color: #dc2626; }

/* 按钮体系 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 8px 14px; border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; font-family: inherit;
  cursor: pointer; white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease, opacity .15s ease, box-shadow .15s ease;
}
.btn:active { opacity: .82; }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(180deg, #f3cc74, #dfb052);
  color: #231a08; box-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 0 16px rgba(226, 180, 90, .18);
}
.btn-primary:hover { background: linear-gradient(180deg, #f8d98c, #e6b75c); }
.btn-line { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-line:hover { background: var(--surface-2); border-color: var(--gold-deep); color: var(--gold-bright); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--danger-line); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-warn { background: var(--surface); color: var(--warn); border-color: rgba(240, 169, 75, .4); }
.btn-warn:hover { background: rgba(240, 169, 75, .12); }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 7px; }
.btn-ic svg { width: 13px; height: 13px; flex-shrink: 0; }

/* 表单 */
.form-row { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.form-row label { font-size: 12px; color: var(--muted); min-width: 68px; line-height: 40px; letter-spacing: .02em; }
.form-row input, .form-row textarea {
  flex: 1; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font-size: 14px; outline: none; font-family: inherit;
  background: var(--input-bg); color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-row input::placeholder, .form-row textarea::placeholder { color: var(--faint); }
.form-row input:focus, .form-row textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(226, 180, 90, .14), 0 0 12px rgba(226, 180, 90, .12);
}
.form-row textarea { min-height: 70px; resize: vertical; }
.form-row .grow { flex: 1; display: flex; gap: 8px; }
.form-row .grow input { flex: 1; }
/* 客服方式等长内容字段：label 在上、输入框独占整行，更宽更好书写 */
.form-row.col { flex-direction: column; align-items: stretch; gap: 6px; }
.form-row.col label { min-width: 0; line-height: 1.4; }
.form-row.col input { width: 100%; min-height: 44px; }
.btn-bar { display: flex; gap: 8px; margin-top: 2px; }
.btn-bar .btn-primary { flex: 1; }

/* 批量添加套餐面板 */
.batch-tip { font-size: 11.5px; color: var(--muted); line-height: 1.55; margin-bottom: 12px; }

/* ===== 套餐管理布局 ===== */
.plans-layout { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.plans-left { display: flex; flex-direction: column; gap: 16px; }
.fold-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
}
.fold-head .fold-arrow {
  flex-shrink: 0; width: 0; height: 0;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 7px solid var(--faint); transition: transform .2s ease;
}
.plan-form-panel.collapsed .fold-arrow,
.plan-batch-panel.collapsed .fold-arrow { transform: rotate(-90deg); }

/* 套餐卡片列表 */
.plan-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 15px; border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 10px; background: var(--card-grad);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.plan-card:hover {
  border-color: var(--gold-deep);
  box-shadow: var(--shadow), 0 0 0 1px rgba(226, 180, 90, .08), 0 0 18px rgba(226, 180, 90, .06);
}
.plan-card.off { opacity: .55; }
.pc-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.pc-name { font-weight: 650; font-size: 14.5px; letter-spacing: -.01em; }
.pc-meta { font-size: 13px; color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; gap: 1px; }
.pc-meta .pc-amt { color: var(--gold-bright); font-weight: 700; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.pc-meta i { font-style: normal; margin: 0 8px; color: var(--line-strong); }
.pc-meta b { font-weight: 600; color: var(--ink); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.pc-ops { margin-top: 2px; }

/* ===== 订单紧凑卡片 ===== */
.order-card {
  display: flex; flex-direction: column; gap: 9px;
  padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 10px; background: var(--card-grad);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.order-card:hover {
  border-color: var(--gold-deep);
  box-shadow: var(--shadow), 0 0 0 1px rgba(226, 180, 90, .08);
}
.oc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.oc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.oc-no {
  font-family: var(--font-mono); font-size: 12px; color: var(--faint);
  letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.oc-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.oc-user { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-amt { font-family: var(--font-mono); font-weight: 700; color: var(--gold-bright); font-size: 14.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.oc-amt small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.oc-sub { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.oc-sub .pay { display: inline-flex; align-items: center; gap: 4px; }
.oc-sub .pay::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-deep); flex-shrink: 0; }
.oc-remark { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: 12px; color: var(--ink); padding-top: 1px; }
.oc-remark-label { flex-shrink: 0; color: var(--ink); font-weight: 600; font-size: 12px; }
.oc-remark-val { font-family: var(--font-mono); font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-remark .oc-copy { flex-shrink: 0; padding: 4px 7px; }
.oc-ops { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 2px; }
.oc-ops .btn { flex: 1; min-width: 0; }

/* 空态 */
.empty { text-align: center; color: var(--faint); font-size: 13px; padding: 34px 0; }
.empty::before {
  content: ''; display: block; width: 40px; height: 40px; margin: 0 auto 12px;
  border: 1px dashed var(--line-strong); border-radius: 10px;
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
  background-size: 8px 8px;
}

/* toast */
#toast {
  position: fixed; left: 50%; bottom: 46px; transform: translateX(-50%) translateY(16px);
  background: var(--toast-bg); color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 13.5px; opacity: 0; pointer-events: none;
  border: 1px solid var(--line-strong);
  transition: opacity .22s ease, transform .22s ease; z-index: 120; max-width: 82vw;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .5);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 自定义确认模态框 ===== */
.modal-mask {
  position: fixed; inset: 0; z-index: 110;
  display: flex; align-items: center; justify-content: center; padding: 22px;
  background: var(--mask); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.modal-mask.show { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%; max-width: 336px;
  background: var(--card-grad);
  border: 1px solid var(--line-strong); border-radius: 16px;
  padding: 22px 20px 18px; box-shadow: var(--shadow-pop);
  transform: translateY(12px) scale(.97); transition: transform .2s cubic-bezier(.2, .8, .3, 1);
}
.modal-mask.show .modal { transform: none; }
.modal-title { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.modal-body { font-size: 14px; color: var(--muted); margin-top: 8px; line-height: 1.65; }
.modal-body b { color: var(--gold-bright); font-weight: 600; }
.modal-ops { display: flex; gap: 10px; margin-top: 22px; }
.modal-ops .btn { flex: 1; padding: 10px 14px; font-size: 14px; }

/* ===== 后台登录页 ===== */
.admin-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.admin-auth-card {
  width: 100%; max-width: 380px;
  background: var(--card-grad);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 36px 30px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.admin-auth-card::before {
  content: ''; position: absolute; left: 50%; top: -70px; transform: translateX(-50%);
  width: 220px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(226, 180, 90, .16), transparent 70%);
  pointer-events: none;
}
.admin-auth-card h1 { margin: 0 0 4px; font-size: 22px; text-align: center; letter-spacing: -.01em; }
.admin-auth-card h1 span {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.admin-auth-card .sub { text-align: center; font-size: 13px; color: var(--muted); margin: 0 0 24px; letter-spacing: .02em; }
.admin-auth-err {
  display: none; color: var(--danger); background: var(--danger-bg);
  border: 1px solid var(--danger-line); border-radius: var(--radius-sm);
  font-size: 13px; text-align: center; padding: 9px 12px; margin-bottom: 14px;
}
.admin-auth-err.show { display: block; }

/* ===== 动效编排 ===== */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.panel { animation: rise .4s cubic-bezier(.2, .8, .3, 1) both; }
.panel:nth-child(2) { animation-delay: .05s; }
.panel:nth-child(3) { animation-delay: .1s; }
.plan-card, .order-card { animation: rise .34s cubic-bezier(.2, .8, .3, 1) both; }
.plan-card:nth-child(2), .order-card:nth-child(2) { animation-delay: .04s; }
.plan-card:nth-child(3), .order-card:nth-child(3) { animation-delay: .08s; }
.plan-card:nth-child(4), .order-card:nth-child(4) { animation-delay: .12s; }
.plan-card:nth-child(5), .order-card:nth-child(5) { animation-delay: .16s; }

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

/* ===== 响应式 ===== */
@media (min-width: 900px) {
  .plans-layout { grid-template-columns: 360px 1fr; }
  .plans-left { position: sticky; top: 122px; }
  .fold-head { cursor: default; }
  .fold-head .fold-arrow { display: none; }
  .plan-card { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
  .pc-left { flex: 1; min-width: 0; }
  .pc-ops { flex-shrink: 0; margin-top: 0; }
}

@media (min-width: 760px) {
  /* 订单卡片：桌面单行横向 */
  .order-card { flex-direction: row; align-items: center; gap: 16px; }
  .oc-main { flex-direction: row; align-items: center; gap: 16px; }
  .oc-top { gap: 8px; }
  .oc-no { max-width: 190px; }
  .oc-meta { gap: 8px; }
  .oc-ops { flex-shrink: 0; padding-top: 0; }
  .oc-ops .btn { flex: none; }
}

@media (max-width: 760px) {
  .container { padding: 14px 14px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 13px; gap: 10px; }
  .s-ico { width: 36px; height: 36px; }
  .stat .v { font-size: 21px; }

  /* 表格 → 卡片列表（仪表盘/用户仍用表格的场景） */
  .table { display: block; }
  .table thead { display: none; }
  .table tbody { display: block; }
  .table tr {
    display: block; margin-bottom: 12px; padding: 12px 14px;
    background: var(--card-grad);
    border: 1px solid var(--line); border-radius: var(--radius);
  }
  .table td {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line);
    text-align: right; font-size: 13px;
  }
  .table tr td:last-child { border-bottom: none; }
  .table td::before {
    content: attr(data-label); color: var(--faint); font-size: 12px;
    flex-shrink: 0; text-align: left;
  }
  .table td.td-ops { flex-direction: column; align-items: stretch; gap: 8px; }
  .table td.td-ops::before { text-align: left; }
  .ops { justify-content: flex-end; }

  /* 表单纵向排列 */
  .form-row { flex-direction: column; gap: 6px; }
  .form-row label { min-width: 0; line-height: 1.4; }
  .form-row .grow { width: 100%; flex-direction: column; }
  .form-row .grow input { width: 100%; max-width: none !important; }

  /* 顶部导航 → 底部悬浮胶囊导航：5 个标签均分、圆角悬浮、免横向滑动 */
  .tabs {
    position: fixed; top: auto;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 12px; right: 12px;
    display: grid; grid-template-columns: repeat(5, 1fr);
    gap: 0; padding: 9px 4px;
    overflow: visible;
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .38), 0 2px 8px rgba(0, 0, 0, .3);
    z-index: 40;
  }
  .tab {
    flex-direction: column; gap: 4px;
    justify-content: center;
    padding: 8px 2px 9px;
    font-size: 12px; line-height: 1;
    border-radius: 16px;
    margin: 0 2px;
  }
  .tab svg { width: 23px; height: 23px; }
  .tab.on {
    background: var(--halo);
    color: var(--gold-bright);
    font-weight: 600;
  }
  .tab.on::after { display: none; }
  .tab-dot {
    top: 2px; right: auto; left: 50%; margin-left: 3px;
    min-width: 14px; height: 14px; padding: 0 4px; line-height: 14px; font-size: 9px;
  }

  /* 订单筛选胶囊：手机端缩小，单行放下，放不下则换行（绝不横向滑动） */
  .filter-bar { gap: 3px; flex-wrap: wrap; }
  .fchip { padding: 4px 6px; font-size: 11px; }
  .fchip .cnt { min-width: 13px; height: 13px; padding: 0 2px; margin-left: 2px; font-size: 9.5px; }
}

/* ===== 老板 APP 下载面板 ===== */
.app-hero {
  display: flex; gap: 14px; align-items: center;
  padding: 16px; margin-bottom: 14px;
  background: linear-gradient(180deg, rgba(226, 180, 90, .10), rgba(226, 180, 90, .03));
  border: 1px solid rgba(226, 180, 90, .22); border-radius: var(--radius);
}
.app-ico {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #1a2030, #0e1118);
  border: 1px solid var(--line-strong);
  color: var(--gold-bright);
  box-shadow: 0 0 18px rgba(226, 180, 90, .12);
}
.app-ico svg { width: 28px; height: 28px; }
.app-info { flex: 1; min-width: 0; }
.app-title { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.app-desc { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.6; }

.app-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted); margin-bottom: 14px;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface);
}
.app-dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
  background: var(--faint);
  box-shadow: 0 0 0 3px rgba(95, 104, 118, .15);
}
.app-dot.dot-on { background: #34c77b; box-shadow: 0 0 0 3px rgba(52, 199, 123, .16), 0 0 10px rgba(52, 199, 123, .5); }
.app-dot.dot-off { background: var(--faint); }

.app-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.app-actions .btn { flex: 1 1 calc(33% - 8px); min-width: 0; white-space: normal; }

.app-link { margin-bottom: 14px; }
.app-link > label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.app-link-row { display: flex; gap: 8px; }
.app-link-row input {
  flex: 1; min-width: 0; padding: 10px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--input-bg); color: var(--ink);
  font-family: var(--font-mono); font-size: 12.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app-link-row .btn { flex-shrink: 0; }

.app-qr-wrap { text-align: center; margin-bottom: 14px; }
.app-qr-wrap img {
  width: 168px; height: 168px; border-radius: 12px;
  background: #f4f2ec; padding: 8px;
  border: 1px solid var(--line-strong);
}
.app-qr-tip { font-size: 12px; color: var(--faint); margin-top: 8px; }

.app-steps { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.app-steps-t { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.app-steps ol { margin: 0; padding-left: 18px; }
.app-steps b { color: var(--gold-bright); font-weight: 600; }

@media (max-width: 640px) {
  .app-actions .btn { flex: 1 1 100%; }
  .app-hero { align-items: flex-start; }
}

/* ===== 内容区滚动条（滑动块）：金色主题、可拖动 ===== */
html {
  scrollbar-width: thin;                 /* Firefox */
  scrollbar-color: var(--gold-deep) transparent;
}
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--gold-deep);
  border-radius: 9px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-bright);
  background-clip: padding-box;
}
::-webkit-scrollbar-corner { background: transparent; }
