/* ==========================================================================
   卡网 · 纯白清爽质感主题
   ========================================================================== */
:root {
  --bg: #ffffff;
  --bg-2: #f8fafc;
  --card: #ffffff;
  --card-solid: #ffffff;
  --card-hover: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, .09);
  --line-2: rgba(15, 23, 42, .16);
  --primary: #7c3aed;
  --primary-d: #6d28d9;
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 45%, #06b6d4 100%);
  --grad-soft: linear-gradient(135deg, rgba(99, 102, 241, .12), rgba(139, 92, 246, .10) 50%, rgba(6, 182, 212, .10));
  --ok: #059669; --warn: #d97706; --bad: #dc2626; --info: #2563eb;
  --ok-bg: rgba(16, 185, 129, .11); --warn-bg: rgba(245, 158, 11, .12); --bad-bg: rgba(239, 68, 68, .10);
  --info-bg: rgba(37, 99, 235, .10); --gray-bg: rgba(15, 23, 42, .05);
  --shadow: 0 10px 30px -10px rgba(15, 23, 42, .07), 0 2px 8px -2px rgba(15, 23, 42, .04);
  --glow: 0 0 0 1px rgba(139, 92, 246, .35), 0 8px 26px -6px rgba(139, 92, 246, .45);
  --radius: 18px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh; background: #ffffff; color: var(--text); font-size: 15px; line-height: 1.6;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
::selection { background: rgba(139, 92, 246, .22); }
a { color: #6d28d9; text-decoration: none; transition: color .15s; }
a:hover { color: #4f46e5; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; color: var(--text); }
[hidden] { display: none !important; }

/* ---------- 背景光效（纯白底色） ---------- */
.bg-fx {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: #ffffff;
}
.bg-fx::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(15, 23, 42, .03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(15, 23, 42, .03) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 20%, transparent 75%);
}
.bg-fx i { display: none; }
@media (prefers-reduced-motion: reduce) { .bg-fx i, .card { animation: none !important; } }

/* ---------- 布局 ---------- */
.container { max-width: 780px; margin: 0 auto; padding: 24px 18px 64px; position: relative; }
.container.wide { max-width: 1240px; }
.card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; margin-bottom: 18px;
  animation: rise .5s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.card h2 { font-size: 17px; font-weight: 650; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.step {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; font-size: 14px; font-weight: 700;
  background: var(--grad); color: #fff; box-shadow: 0 4px 14px -2px rgba(139, 92, 246, .45); flex-shrink: 0;
}
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; min-width: 0; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13.5px; color: #1e293b; margin-bottom: 7px; font-weight: 650;
  letter-spacing: .01em;
}
.field label .lbl-sub { color: #64748b; font-weight: 500; }
.field label .lbl-key {
  color: #0369a1; font-weight: 700; padding: 1px 6px; border-radius: 5px;
  background: rgba(14, 165, 233, .12); border: 1px solid rgba(14, 165, 233, .28);
}
input, select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid rgba(15, 23, 42, .15); border-radius: 12px;
  background: #f8fafc; color: #0f172a; font-size: 15px; font-weight: 500; outline: none; font-family: inherit;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder, textarea::placeholder { color: #94a3b8; font-weight: 400; opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: rgba(15, 23, 42, .25); }
input:focus, select:focus, textarea:focus {
  border-color: rgba(124, 58, 237, .65); background: #ffffff; box-shadow: 0 0 0 4px rgba(124, 58, 237, .12);
}
input[type="checkbox"] { width: 16px; height: 16px; padding: 0; accent-color: var(--primary); cursor: pointer; vertical-align: middle; }
select option { background: #ffffff; color: var(--text); }
textarea { resize: vertical; min-height: 96px; font-family: ui-monospace, "JetBrains Mono", Consolas, monospace; font-size: 13px; line-height: 1.7; }
.input-group { display: flex; gap: 10px; }
.input-group input { flex: 1; min-width: 0; font-family: ui-monospace, "JetBrains Mono", Consolas, monospace; letter-spacing: .06em; font-size: 16px; }

/* ---------- 按钮 ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 20px; border: 0; border-radius: 12px; background: var(--grad); background-size: 160% 160%;
  color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; letter-spacing: .02em;
  font-family: inherit; box-shadow: 0 6px 18px -6px rgba(139, 92, 246, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .15s, box-shadow .2s, background-position .4s, opacity .2s;
}
.btn:hover { background-position: 100% 50%; box-shadow: var(--glow); transform: translateY(-1px); color: #fff; }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost { background: var(--gray-bg); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }
.btn.ghost:hover { background: var(--card-hover); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); }
.btn.danger { background: linear-gradient(135deg, #ef4444, #db2777); box-shadow: 0 6px 18px -6px rgba(239, 68, 68, .45); }
.btn.good { background: linear-gradient(135deg, #10b981, #06b6d4); box-shadow: 0 6px 18px -6px rgba(16, 185, 129, .45); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; padding: 14px 20px; font-size: 16px; }

/* ---------- 徽标 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px;
  font-weight: 600; border: 1px solid transparent; white-space: nowrap; line-height: 1.6;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-pending { background: var(--gray-bg); color: #475569; border-color: var(--line); }
.b-running { background: var(--info-bg); color: var(--info); border-color: rgba(37, 99, 235, .25); }
.b-running::before { animation: pulse 1.2s ease-in-out infinite; }
.b-success { background: var(--ok-bg); color: var(--ok); border-color: rgba(16, 185, 129, .28); }
.b-failed { background: var(--bad-bg); color: var(--bad); border-color: rgba(239, 68, 68, .28); }
.b-cancelled { background: var(--warn-bg); color: var(--warn); border-color: rgba(245, 158, 11, .28); }
.b-on { background: var(--ok-bg); color: var(--ok); border-color: rgba(16, 185, 129, .28); }
.b-off { background: var(--gray-bg); color: var(--muted); border-color: var(--line); }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

/* ---------- 提示条 ---------- */
.notice, .tips { padding: 12px 16px; border-radius: 12px; font-size: 14px; white-space: pre-wrap; display: flex; gap: 10px; }
.notice { background: #fffbeb; color: #92400e; border: 1px solid rgba(245, 158, 11, .35); margin-bottom: 18px; }
.notice::before { content: "📢"; flex-shrink: 0; }
.notice-content { flex: 1; min-width: 0; word-break: break-word; }
.tips { background: var(--grad-soft); color: #4338ca; border: 1px solid rgba(99, 102, 241, .22); font-size: 13px; margin-bottom: 16px; }
.tips::before { content: "💡"; flex-shrink: 0; }

/* ---------- 额度 ---------- */
.quota { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 4px 0 14px; }
.quota > div { background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px; text-align: center; }
.quota b { display: block; font-size: 28px; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.3; color: var(--text); }
.quota > div:last-child b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.quota span { font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.progress { height: 8px; background: rgba(15, 23, 42, .08); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .6s cubic-bezier(.2, .8, .2, 1); }

/* ---------- 订单卡片 ---------- */
.task {
  position: relative; background: #f8fafc; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px 14px 19px; margin-bottom: 10px; overflow: hidden; transition: background .2s;
}
.task::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line-2); }
.task:hover { background: #f1f5f9; }
.task.s-running::before { background: var(--info); }
.task.s-success::before { background: var(--ok); }
.task.s-failed::before { background: var(--bad); }
.task .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.task .mail { font-weight: 600; word-break: break-all; color: var(--text); }
.task .msg { margin-top: 8px; font-size: 13px; color: #334155; word-break: break-all; white-space: pre-wrap; background: rgba(15, 23, 42, .05); padding: 8px 10px; border-radius: 8px; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp .7s linear infinite; vertical-align: -1px; }
@keyframes sp { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--muted); padding: 32px 0; }

/* ---------- 分段切换 ---------- */
.seg { display: flex; background: #f1f5f9; border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.seg button { flex: 1; border: 0; background: none; color: var(--muted); padding: 9px; border-radius: 9px; font-size: 14px; cursor: pointer; font-family: inherit; transition: color .2s, background .2s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: #ffffff; color: #6d28d9; font-weight: 600; box-shadow: 0 2px 6px rgba(15, 23, 42, .06), inset 0 0 0 1px rgba(139, 92, 246, .35); }

/* ---------- 提示 / 弹窗 ---------- */
.toast-wrap { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: rgba(255, 255, 255, .96); color: var(--text); padding: 11px 18px; border-radius: 12px; font-size: 14px; max-width: 90vw;
  border: 1px solid var(--line-2); box-shadow: 0 12px 32px -8px rgba(15, 23, 42, .18);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); animation: fi .25s cubic-bezier(.2, .8, .2, 1);
}
.toast.ok { border-color: rgba(16, 185, 129, .45); }
.toast.ok::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.toast.bad { border-color: rgba(239, 68, 68, .45); }
.toast.bad::before { content: "✕ "; color: var(--bad); font-weight: 700; }
@keyframes fi { from { opacity: 0; transform: translateY(-10px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); display: none; align-items: center; justify-content: center; z-index: 500; padding: 16px; }
.modal-bg.show { display: flex; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal {
  background: #ffffff; border: 1px solid var(--line-2); border-radius: var(--radius); width: 100%; max-width: 580px;
  max-height: 88vh; overflow: auto; padding: 24px; box-shadow: 0 25px 60px -15px rgba(15, 23, 42, .22); animation: rise .25s cubic-bezier(.2, .8, .2, 1);
}
.modal h3 { margin-bottom: 16px; font-size: 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.modal table th { width: 64px; }

/* ---------- 语言切换与公告铃铛按钮 ---------- */
.lang-btn {
  border: 1px solid rgba(124, 58, 237, .35) !important;
  background: rgba(124, 58, 237, .08) !important;
  color: #6d28d9 !important;
  font-weight: 600 !important;
}
.lang-btn:hover {
  border-color: rgba(6, 182, 212, .55) !important;
  background: rgba(6, 182, 212, .12) !important;
  color: #0e7490 !important;
  box-shadow: 0 4px 14px -4px rgba(6, 182, 212, .35) !important;
}
.notice-bell {
  position: relative; width: 32px; height: 32px; border-radius: 10px; display: inline-grid; place-items: center;
  flex-shrink: 0; cursor: pointer; margin-left: auto; padding: 0;
  background: #f8fafc; border: 1.5px solid var(--line-2);
  font-size: 16px; line-height: 1; transition: transform .15s, border-color .2s, background .2s, box-shadow .2s;
}
.notice-bell:hover {
  transform: translateY(-1px); border-color: rgba(245, 158, 11, .6);
  background: #fffbeb; box-shadow: 0 6px 18px -6px rgba(245, 158, 11, .35);
}
.notice-bell .bell-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: #ef4444; color: #fff; font-size: 10.5px; font-weight: 800;
  line-height: 17px; text-align: center; box-shadow: 0 2px 8px rgba(239, 68, 68, .5), 0 0 0 2px #ffffff;
}
#noticeModalBg .modal {
  border-color: rgba(245, 158, 11, .4);
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, .22), 0 0 30px -10px rgba(245, 158, 11, .18);
}
#noticeModalBg .modal h3 { color: #b45309; }
.notice-modal-body {
  background: #fffbeb;
  border: 1px solid rgba(245, 158, 11, .45); border-left: 4px solid #f59e0b; border-radius: 13px;
  padding: 16px 18px; color: #92400e; font-size: 15px; font-weight: 600; line-height: 1.85;
  letter-spacing: .01em;
  box-shadow: 0 6px 20px -10px rgba(245, 158, 11, .18);
  white-space: pre-wrap; word-break: break-word; max-height: 56vh; overflow-y: auto;
}
.notice-link {
  color: #0369a1; font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-thickness: 1.5px; text-decoration-color: rgba(3, 105, 161, .55);
  background: rgba(14, 165, 233, .12); border-radius: 5px; padding: 1px 6px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  word-break: break-all; cursor: pointer; text-shadow: none;
  transition: color .15s, background .15s, text-decoration-color .15s, box-shadow .15s;
}
.notice-link::after {
  content: "↗"; display: inline-block; margin-left: 3px; font-size: .88em;
}
.notice-link:hover {
  color: #075985; background: rgba(14, 165, 233, .22); text-decoration-color: #075985;
}

/* ---------- 批量检测卡密弹窗 ---------- */
.bc-filters {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
}
.bc-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; border: 1px solid var(--line);
  background: #f8fafc; color: var(--muted); font-family: inherit;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.bc-pill:hover { color: var(--text); border-color: var(--line-2); background: #f1f5f9; }
.bc-pill.on {
  background: var(--grad-soft); color: #6d28d9; border-color: rgba(139, 92, 246, .45);
}
.bc-pill b { font-variant-numeric: tabular-nums; }
.bc-table-wrap {
  max-height: 36vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px;
  background: #ffffff;
}
.bc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bc-table th {
  position: sticky; top: 0; z-index: 2; background: #f8fafc; color: var(--muted);
  font-size: 11.5px; padding: 8px 10px; border-bottom: 1px solid var(--line-2);
}
.bc-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); }
.bc-table tbody tr:last-child td { border-bottom: 0; }
.bc-code-link {
  color: #6d28d9; cursor: pointer; font-family: ui-monospace, "JetBrains Mono", Consolas, monospace;
  font-weight: 600; transition: color .15s;
}
.bc-code-link:hover { color: #0284c7; text-decoration: underline; }

/* ---------- 买家页 Hero & 一屏双栏布局 ---------- */
.buyer-wrap { max-width: 1280px; padding: 18px 20px 28px; }
.buyer-grid { display: grid; grid-template-columns: 1.04fr 1fr; gap: 18px; align-items: stretch; }
.buyer-col { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.buyer-col > .card, .buyer-col > .prereq, .buyer-col > .notice { margin-bottom: 0; }
.buyer-wrap .card { padding: 14px 18px; }
.buyer-wrap .card h2 { margin-bottom: 9px; font-size: 15.5px; }
.buyer-wrap .field { margin-bottom: 8px; }
.buyer-wrap .field label { margin-bottom: 5px; font-size: 13px; }
.buyer-wrap input, .buyer-wrap textarea { padding: 8px 12px; font-size: 13.5px; }
.buyer-wrap .seg { margin-bottom: 10px; padding: 3px; }
.buyer-wrap .seg button { padding: 5px 10px; font-size: 13px; }
.buyer-wrap .btn.block { padding: 9px 18px; font-size: 14.5px; }
.buyer-wrap .tips { margin-bottom: 9px; padding: 8px 12px; font-size: 12.5px; }
.buyer-wrap .quota { gap: 10px; margin: 2px 0 7px; }
.buyer-wrap .quota > div { padding: 6px 10px; border-radius: 10px; display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.buyer-wrap .quota b { display: inline; font-size: 18px; line-height: 1.1; }
.buyer-wrap .progress { height: 5px; }
.buyer-wrap .notice { font-size: 13px; line-height: 1.64; padding: 14px 16px; flex: 1; }
.buyer-wrap #listCard { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.buyer-wrap #tasks { flex: 1; min-height: 120px; contain: size; overflow-y: auto; padding-right: 4px; display: block; }
.buyer-wrap #tasks > .empty { padding: 32px 0 !important; }
.buyer-wrap .task { padding: 10px 14px 10px 16px; margin-bottom: 8px; }
.buyer-wrap .task .msg { margin-top: 6px; padding: 6px 9px; font-size: 12.5px; }

.hero {
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  padding: 2px 2px 14px; margin-bottom: 0; border-bottom: 1px solid var(--line);
  animation: rise .5s cubic-bezier(.2, .8, .2, 1) both;
}
.hero-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hero-txt { flex: 1; min-width: 0; }
.logo {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--grad); box-shadow: 0 0 0 1px rgba(255, 255, 255, .25) inset, 0 8px 22px -6px rgba(139, 92, 246, .55);
  position: relative;
}
.logo svg { width: 24px; height: 24px; }
.hero-top { display: flex; align-items: center; gap: 7px; flex-wrap: nowrap; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  color: #6d28d9; background: rgba(124, 58, 237, .08); border: 1px solid rgba(124, 58, 237, .25); letter-spacing: .02em; white-space: nowrap; flex-shrink: 0;
}
.eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); animation: pulse 1.6s infinite; }
.hero h1 {
  font-size: clamp(20px, 2.2vw, 25px); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; white-space: nowrap; flex-shrink: 0;
  background: linear-gradient(135deg, #1e1b4b 20%, #6d28d9 65%, #0891b2 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--muted); margin: 4px 0 0; font-size: 13px; }
.hero-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.features { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; }
.feat { flex: 1; justify-content: center; display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 10px; font-size: 12.5px; color: #334155; background: #f8fafc; border: 1px solid var(--line); white-space: nowrap; }
.feat b { font-size: 13.5px; }

footer { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }
footer:empty { display: none; }

/* ==========================================================================
   后台
   ========================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .88); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
}
.topbar .in { max-width: 1240px; margin: 0 auto; padding: 12px 18px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; color: var(--text); }
.brand .mark { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); box-shadow: 0 4px 14px -2px rgba(139, 92, 246, .45); }
.brand .mark svg { width: 18px; height: 18px; }
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; padding: 4px; background: #f1f5f9; border: 1px solid var(--line); border-radius: 12px; scrollbar-width: none; }
.tab { padding: 7px 16px; border-radius: 9px; cursor: pointer; color: var(--muted); white-space: nowrap; border: 0; background: none; font-size: 14px; font-family: inherit; transition: color .2s, background .2s; }
.tab:hover { color: var(--text); }
.tab.active { background: #ffffff; color: #6d28d9; font-weight: 600; box-shadow: 0 2px 6px rgba(15, 23, 42, .06), inset 0 0 0 1px rgba(139, 92, 246, .35); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat {
  position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); animation: rise .5s cubic-bezier(.2, .8, .2, 1) both;
}
.stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: var(--grad); opacity: .08; filter: blur(10px); }
.stat:nth-child(1)::after { background: #94a3b8; } .stat:nth-child(2)::after { background: var(--info); }
.stat:nth-child(3)::after { background: var(--ok); } .stat:nth-child(4)::after { background: var(--bad); }
.stat span { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat b { display: block; font-size: 32px; font-weight: 750; margin-top: 4px; font-variant-numeric: tabular-nums; line-height: 1.3; color: var(--text); }
.stat small { color: var(--muted); font-size: 12px; }

.chart { display: flex; align-items: flex-end; gap: 14px; height: 190px; padding: 10px 6px 0; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; font-size: 12px; color: var(--muted); }
.chart .bars { display: flex; align-items: flex-end; gap: 4px; height: 100%; width: 100%; justify-content: center; }
.chart .bar { width: 40%; max-width: 22px; border-radius: 6px 6px 2px 2px; min-height: 3px; transition: height .6s cubic-bezier(.2, .8, .2, 1); }
.bar.s { background: linear-gradient(180deg, #34d399, #059669); }
.bar.f { background: linear-gradient(180deg, #f87171, #be123c); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.tablewrap { overflow-x: auto; margin: 0 -6px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; text-transform: uppercase; letter-spacing: .06em; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(15, 23, 42, .025); }
tbody tr:last-child td { border-bottom: 0; }
td.mono, .mono { font-family: ui-monospace, "JetBrains Mono", Consolas, monospace; font-size: 13px; }
td .wrap { max-width: 300px; word-break: break-all; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.toolbar input, .toolbar select { width: auto; min-width: 160px; padding: 9px 12px; font-size: 14px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 16px; font-size: 13px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.login-box { max-width: 400px; margin: 14vh auto 0; text-align: center; }
.login-box .logo { margin-bottom: 18px; }
.login-box h2 { justify-content: center; font-size: 22px; margin-bottom: 6px; }
.login-box .sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); animation: pulse 1.8s infinite; }
.dot.off { background: #cbd5e1; }
.codes-box { font-family: ui-monospace, "JetBrains Mono", Consolas, monospace; font-size: 13px; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 14px; max-height: 320px; overflow: auto; white-space: pre; user-select: all; color: #5b21b6; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, .15); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(15, 23, 42, .28); }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 960px) {
  .buyer-grid { grid-template-columns: 1fr; }
  .buyer-wrap #tasks { contain: none; max-height: 280px; }
}
@media (max-width: 760px) {
  .grid2, .grid4 { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .quota b { font-size: 22px; }
  .hero { padding: 12px 0 14px; }
  .hero-top { flex-wrap: wrap; }
  .topbar .in { gap: 10px; }
  .tabs { order: 3; flex-basis: 100%; }
  .input-group { flex-direction: column; }
}

/* ---------- 实时队列 ---------- */
.live {
  display: inline-flex; align-items: center; gap: 5px; flex-wrap: nowrap; justify-content: center; flex-shrink: 0;
  padding: 3px 10px; border-radius: 999px; font-size: 11.5px; color: #334155; white-space: nowrap;
  background: #ffffff; border: 1px solid var(--line-2);
  box-shadow: 0 4px 16px -6px rgba(124, 58, 237, .18);
}
.live b { display: inline-block; min-width: 1.1em; text-align: center; font-size: 13.5px; font-weight: 750; color: #0f172a; font-variant-numeric: tabular-nums; }
.live b.run { color: var(--info); }
.live .sep { color: #cbd5e1; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); animation: pulse 1.6s infinite; flex-shrink: 0; }
.bump { animation: bump .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes bump { 0% { transform: translateY(-6px) scale(1.25); opacity: .4; } 100% { transform: none; opacity: 1; } }
@media (max-width: 480px) { .live { font-size: 12px; gap: 5px; padding: 6px 11px; white-space: normal; flex-wrap: wrap; } .live .sep { display: none; } }

/* ---------- 使用前必做 ---------- */
.prereq {
  position: relative; margin-bottom: 18px; padding: 14px 16px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(251, 191, 36, .12), rgba(244, 63, 94, .06));
  border: 1px solid rgba(245, 158, 11, .35);
  box-shadow: 0 8px 24px -12px rgba(245, 158, 11, .2);
  animation: rise .5s cubic-bezier(.2, .8, .2, 1) both;
}
.prereq-title { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; color: #b45309; margin-bottom: 10px; }
.warn-ico {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; font-size: 14px;
  background: rgba(245, 158, 11, .18); color: #d97706;
  animation: pulse 2s ease-in-out infinite;
}
.prereq-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.prereq-step {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--text);
  background: #ffffff; border: 1px solid rgba(245, 158, 11, .28);
  transition: transform .15s, border-color .2s, background .2s, box-shadow .2s;
}
.prereq-step:hover {
  color: var(--text); transform: translateY(-2px); border-color: rgba(245, 158, 11, .6);
  background: #fffbeb; box-shadow: 0 8px 20px -10px rgba(245, 158, 11, .35);
}
.prereq-step .num {
  flex-shrink: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; font-weight: 800; font-size: 13.5px;
  background: linear-gradient(135deg, #f59e0b, #f43f5e); color: #fff; box-shadow: 0 4px 12px -3px rgba(245, 158, 11, .5);
}
.prereq-step .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.prereq-step .txt b { font-size: 14px; color: #0f172a; }
.prereq-step .txt small { font-size: 11.5px; color: #d97706; margin-top: 1px; }
.prereq-step .arr { font-size: 16px; color: #d97706; transition: transform .2s; }
.prereq-step:hover .arr { transform: translate(2px, -2px); }
@media (max-width: 480px) { .prereq-steps { grid-template-columns: 1fr; } }

/* ---------- 近 1 小时成功情况（方块图） ---------- */
.pr-card { --c-s: #0ea5e9; --c-f: #a855f7; --c-c: #6366f1; --c-e: rgba(148, 163, 184, .22); }
.pr-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.pr-title { display: flex; align-items: center; gap: 10px; }
.pr-title b { display: block; font-size: 15.5px; font-weight: 750; letter-spacing: .5px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pr-title small { display: block; margin-top: 1px; font-size: 11.5px; color: var(--muted); letter-spacing: 1px; }
.pr-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: var(--grad-soft); border: 1px solid var(--line-2); }
.pr-ico svg { width: 18px; height: 18px; fill: #6d28d9; }
.pr-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.pr-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pr-legend b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.pr-legend i { width: 9px; height: 9px; border-radius: 50%; }
.pr-legend i.c-s { background: var(--c-s); }
.pr-legend i.c-f { background: var(--c-f); }
.pr-legend i.c-c { background: var(--c-c); }
.pr-legend i.c-e { background: var(--c-e); border-radius: 2px; }

/* 1 小时 = 360 个小格子（每格 10 秒）：电脑 60 列 × 6 行，手机 30 列 × 12 行 */
.pr-grid { display: grid; grid-template-columns: repeat(60, 1fr); gap: 2px;
  padding: 10px; border-radius: 12px; background: #f8fafc; border: 1px solid var(--line); }
.pr-grid.narrow { grid-template-columns: repeat(30, 1fr); }
.pr-grid i { display: block; aspect-ratio: 1; min-width: 0; border-radius: 2px; background: var(--c-e); }
.pr-grid i:not(.c-e):hover { transform: scale(1.8); position: relative; z-index: 1; }
.pr-grid i.c-s { background: var(--c-s); }
.pr-grid i.c-f { background: var(--c-f); }

.pr-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 9px;
  font-size: 11.5px; letter-spacing: 1.5px; color: var(--muted); }
.pr-rate { font-size: 12.5px; font-weight: 700; letter-spacing: .5px; color: #0284c7; }
@media (max-width: 480px) { .pr-grid { padding: 8px; } .pr-legend { gap: 6px 12px; font-size: 12px; } }

/* ---------- 卡密验证门禁页 ---------- */
.gate-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px; max-width: 100%;
}
.gate-box {
  width: 100%; max-width: 430px; margin: 0; padding: 26px 26px 24px;
  text-align: center;
}
.gate-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 20px;
}
.gate-box .logo {
  width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 14px;
}
.gate-box .logo svg { width: 26px; height: 26px; }
.gate-title {
  font-size: 24px; font-weight: 800; line-height: 1.25; letter-spacing: -.02em; margin-bottom: 6px;
  background: linear-gradient(135deg, #1e1b4b 20%, #6d28d9 65%, #0891b2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gate-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 20px; }
.gate-box input {
  text-align: center; font-family: ui-monospace, "JetBrains Mono", Consolas, monospace;
  letter-spacing: .06em; font-size: 15.5px; padding: 12px 14px;
}
.gate-err {
  margin: -4px 0 14px; padding: 9px 12px; border-radius: 10px; text-align: left;
  font-size: 13px; color: var(--bad); background: var(--bad-bg);
  border: 1px solid rgba(239, 68, 68, .28);
}
.gate-foot {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
}
@media (max-width: 480px) {
  .gate-box { padding: 22px 18px 20px; }
  .gate-title { font-size: 21px; }
}
