:root {
  --bg: #f4f5f9;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e4e7ef;
  --brand: #4f46e5;
  --brand-hover: #4338ca;
  --brand-soft: #eef0ff;
  --ok: #047857;
  --ok-soft: #e8f8f1;
  --warn: #b45309;
  --warn-soft: #fff6e5;
  --danger: #dc2626;
  --danger-soft: #fdeeee;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px rgba(15, 23, 42, .06);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .04), 0 16px 40px rgba(15, 23, 42, .10);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }
h1, h2, h3 { margin: 0; line-height: 1.3; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--ink); white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6 60%, #ec4899);
  color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .5px;
}
.nav { display: flex; gap: 4px; }
.nav a { padding: 7px 12px; border-radius: 8px; color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

/* ---------- 首页横幅 ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 400px at 85% -10%, rgba(139, 92, 246, .45), transparent 60%),
              radial-gradient(800px 300px at 10% 120%, rgba(16, 163, 127, .35), transparent 60%),
              #0f1226;
  color: #fff;
  padding: 44px 0 72px;
}
.hero h1 { font-size: 30px; font-weight: 800; letter-spacing: .5px; }
.hero-sub { margin-top: 10px; color: rgba(255, 255, 255, .72); font-size: 15px; max-width: 640px; }
.hero-points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 760px; }
.hero-points li {
  padding: 12px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .10);
}
.hero-points strong { display: block; font-size: 14px; }
.hero-points span { display: block; font-size: 12.5px; color: rgba(255, 255, 255, .62); margin-top: 2px; }

.hero + .wrap { margin-top: -40px; position: relative; }

/* ---------- 公告 / 提示 ---------- */
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; color: var(--ink-2); font-size: 14px;
}
.notice-tag {
  flex: none; font-size: 12px; font-weight: 700; color: var(--warn);
  background: var(--warn-soft); padding: 2px 8px; border-radius: 6px; margin-top: 1px;
}
.flashes { margin: 16px auto 0; display: grid; gap: 8px; }
.flash { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 14px; border: 1px solid transparent; }
.flash-error { background: var(--danger-soft); color: #991b1b; border-color: #f8d4d4; }
.flash-ok { background: var(--ok-soft); color: #065f46; border-color: #c7eedc; }

/* ---------- 分类 ---------- */
.tabs { display: flex; gap: 8px; margin: 22px 0 16px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; padding: 7px 16px; border-radius: 999px; font-size: 14px;
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--line);
}
.tab:hover { color: var(--ink); border-color: #cfd4e2; }
.tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- 商品卡片 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 40px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.product-card {
  display: flex; flex-direction: column; gap: 14px; padding: 18px; color: var(--ink);
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.product-card:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #dcdff8; }
.pc-head { display: flex; gap: 12px; align-items: flex-start; }
.pc-head h3 { font-size: 15.5px; font-weight: 650; }
.pc-head p { margin-top: 3px; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-icon {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--c, var(--brand)); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}
.pc-icon.lg { width: 60px; height: 60px; border-radius: 16px; font-size: 16px; }
.pc-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pc-meta { font-size: 12.5px; color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.tag-auto { background: var(--ok-soft); color: var(--ok); }
.tag-manual { background: var(--brand-soft); color: var(--brand); }
.pc-foot { margin-top: auto; display: flex; align-items: baseline; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--line); }
.price { font-size: 22px; font-weight: 750; color: #e11d48; letter-spacing: -.3px; }
.price small { font-size: 14px; font-weight: 700; margin-right: 1px; }
.orig { color: var(--muted); font-size: 13px; }
.pc-buy {
  margin-left: auto; align-self: center; font-size: 13px; font-weight: 600; color: #fff;
  background: var(--brand); padding: 5px 14px; border-radius: 999px;
}
.product-card.is-soldout { opacity: .62; }
.product-card.is-soldout .pc-buy { background: #94a3b8; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; grid-column: 1 / -1; }

/* ---------- 详情页 / 通用布局 ---------- */
.page { padding-top: 24px; padding-bottom: 48px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }
.detail {
  display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px 18px; align-items: start;
  grid-template-areas: "head buy" "steps buy" "desc buy" ". buy";
  grid-template-rows: auto auto auto 1fr;
}
.detail > .panel { margin-top: 0; }
.d-head { grid-area: head; }
.d-steps { grid-area: steps; }
.d-desc { grid-area: desc; }
.detail > .buy-box { grid-area: buy; }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.panel + .panel { margin-top: 16px; }
.panel-title { font-size: 15px; font-weight: 650; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.panel-title::before { content: ""; width: 4px; height: 15px; border-radius: 2px; background: var(--brand); }
.prod-head { display: flex; gap: 16px; align-items: center; }
.prod-head h1 { font-size: 22px; }
.prod-head p { color: var(--muted); margin-top: 4px; font-size: 14px; }
.prod-price { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 14px; padding: 14px 16px; border-radius: 12px; background: linear-gradient(90deg, #fff1f3, #fff7f8 60%, transparent); }
.prod-price .price { font-size: 30px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; color: var(--ink-2); }
.facts b { color: var(--ink); font-weight: 650; }
.desc { color: var(--ink-2); font-size: 14.5px; line-height: 1.85; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--surface-2); border-radius: 10px; padding: 12px 10px; font-size: 13px; text-align: center; color: var(--ink-2); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 22px; height: 22px; margin: 0 auto 6px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; }
.buy-box { position: sticky; top: 76px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label, .label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.req { color: #e11d48; margin-left: 2px; }
.hint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 14.5px; color: var(--ink);
  padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface);
  transition: border-color .15s, box-shadow .15s; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: #a5b4fc; box-shadow: 0 0 0 3px rgba(99, 102, 241, .15); }
textarea { resize: vertical; min-height: 80px; }
.stepper { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.stepper button { width: 38px; border: 0; background: var(--surface-2); font-size: 18px; cursor: pointer; color: var(--ink-2); }
.stepper button:hover { background: #eceef5; }
.stepper input { width: 56px; text-align: center; border: 0; border-radius: 0; box-shadow: none !important; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.paylist { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.payopt { position: relative; }
.payopt input { position: absolute; opacity: 0; pointer-events: none; }
.payopt span {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; color: var(--ink-2);
}
.payopt span i { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; color: #fff; font-style: normal; font-size: 11px; font-weight: 800; }
.payopt input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); }
.payopt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(99, 102, 241, .2); }
.pay-alipay { background: #1677ff; }
.pay-wxpay { background: #07c160; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 4px; border-top: 1px dashed var(--line); margin-top: 6px; }
.total .price { font-size: 26px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 14.5px; font-weight: 600; padding: 10px 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; background: var(--brand); color: #fff; white-space: nowrap;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--brand-hover); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: #a7aec0; cursor: not-allowed; }
.btn-block { width: 100%; padding: 12px; font-size: 15.5px; }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-ok { background: var(--ok); }
.btn-ok:hover { background: #065f46; }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #f3c7c7; }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-sm { padding: 5px 11px; font-size: 13px; }

/* ---------- 支付页 / 订单页 ---------- */
.narrow { max-width: 640px; margin: 0 auto; }
.pay-amount { text-align: center; padding: 8px 0 18px; }
.pay-amount .price { font-size: 40px; }
.countdown { display: inline-block; margin-top: 6px; font-size: 13.5px; color: var(--warn); background: var(--warn-soft); padding: 3px 12px; border-radius: 999px; }
.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 9px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); word-break: break-all; }
.mock-box { border: 1.5px dashed #c7cbe0; border-radius: 12px; padding: 18px; text-align: center; background: var(--surface-2); }
.mock-box p { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.status-hero { display: flex; gap: 14px; align-items: center; }
.status-icon { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 700; }
.st-delivered { background: var(--ok-soft); color: var(--ok); }
.st-paid { background: var(--brand-soft); color: var(--brand); }
.st-pending { background: var(--warn-soft); color: var(--warn); }
.st-cancelled, .st-refunded { background: #eef0f4; color: var(--muted); }
.status-hero h1 { font-size: 20px; }
.status-hero p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cards li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.cards code { flex: 1; font-family: var(--mono); font-size: 14.5px; word-break: break-all; color: var(--ink); }
.delivery-note { white-space: pre-wrap; background: var(--ok-soft); color: #065f46; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.order-list { display: grid; gap: 10px; }
.order-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--ink); }
.order-row:hover { color: var(--ink); box-shadow: var(--shadow-lg); }
.order-row .grow { flex: 1; min-width: 0; }
.order-row .grow b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-row .grow small { color: var(--muted); font-size: 12.5px; }

.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.b-pending { background: var(--warn-soft); color: var(--warn); }
.b-paid { background: var(--brand-soft); color: var(--brand); }
.b-delivered { background: var(--ok-soft); color: var(--ok); }
.b-cancelled, .b-refunded { background: #eef0f4; color: var(--muted); }

.error-page { text-align: center; padding: 80px 0; }
.error-page .code { font-size: 64px; font-weight: 800; color: #cbd2e1; line-height: 1; }
.error-page p { color: var(--muted); margin: 12px 0 20px; }

.footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; padding: 20px 0; margin-top: 24px; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; }

/* ---------- 后台 ---------- */
.admin-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 100vh; }
.side { background: #0f1226; color: #c7cbe0; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.side .brand { display: flex; color: #fff; margin: 0 8px 18px; font-size: 15px; }
.side .brand:hover { background: none; }
.side a, .side button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; color: #c7cbe0; font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; }
.side a:hover, .side button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side a.active { background: rgba(129, 140, 248, .18); color: #fff; font-weight: 600; }
.side .spacer { flex: 1; }
.admin-main { padding: 24px; min-width: 0; }
.admin-main h1 { font-size: 20px; margin-bottom: 16px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.stat span { font-size: 13px; color: var(--muted); }
.stat b { display: block; font-size: 24px; margin-top: 4px; letter-spacing: -.3px; }
.stat.hl b { color: var(--brand); }
.table-wrap { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 600; color: var(--muted); background: var(--surface-2); white-space: nowrap; font-size: 12.5px; }
tr:last-child td { border-bottom: 0; }
td.col-main > div { min-width: 190px; }
tbody tr:hover td { background: #fafbff; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters input[type=search] { width: 260px; }
.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.alert-warn { background: var(--warn-soft); color: #92400e; border: 1px solid #f6dfb3; }
.alert-info { background: var(--brand-soft); color: #3730a3; border: 1px solid #dfe3ff; }
.price-help { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 6px 12px; margin: 0 0 10px; padding: 12px 14px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 13.5px; }
.price-help dt { font-weight: 650; color: var(--ink); }
.price-help dd { margin: 0; color: var(--ink-2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.radio-row { display: flex; gap: 16px; font-size: 14px; padding: 8px 0; }
.radio-row label { display: flex; gap: 6px; align-items: center; font-weight: 400; margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.login-box { max-width: 360px; margin: 12vh auto 0; }

/* ---------- 账号 / 用户中心 ---------- */
.auth-box { max-width: 400px; margin: 4vh auto 0; }
.auth-title { font-size: 22px; margin-bottom: 6px; }
.auth-sub { font-size: 14px; margin-bottom: 18px; }
.auth-title + form, .auth-title + .field { margin-top: 14px; }
.auth-links { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; font-size: 14px; }
.center-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.agent-cta p { font-size: 14px; margin-bottom: 12px; }
.price-inline { color: #e11d48; }
.bullets { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-2); font-size: 14.5px; }
.input-suffix { display: flex; align-items: stretch; }
.input-suffix input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-suffix span { display: flex; align-items: center; padding: 0 12px; background: var(--surface-2); border: 1px solid var(--line); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted); font-size: 14px; white-space: nowrap; }
code { font-family: var(--mono); font-size: .92em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.cards code { background: none; padding: 0; }

/* ---------- 代理 / 资金 ---------- */
.side-agent { background: #0b2530; }
.totals { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; margin-bottom: 12px; font-size: 14px; }
.totals b { font-size: 16px; }
.profit { color: var(--ok); }
.loss { color: var(--danger); }
.a-pending, .w-pending { background: var(--warn-soft); color: var(--warn); }
.a-active, .w-paid { background: var(--ok-soft); color: var(--ok); }
.a-rejected, .a-disabled, .w-rejected { background: #eef0f4; color: var(--muted); }
a.stat { color: var(--ink); transition: box-shadow .15s; }
a.stat:hover { color: var(--ink); box-shadow: var(--shadow-lg); }
.mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.mail-row:last-child { border-bottom: 0; }
.withdraw-list { display: grid; gap: 12px; max-width: 860px; }
.withdraw-list .panel + .panel { margin-top: 0; }
.wi-main { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.wi-amount { font-size: 24px; font-weight: 750; color: #e11d48; white-space: nowrap; }
.payout { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; align-items: center; }
.filters input[type=date] { width: auto; }

/* ---------- 支付宝手动收款 / 待处理 ---------- */
.qr-box { display: grid; place-items: center; padding: 6px 0 16px; }
.qr-img { width: 240px; max-width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.pay-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.order-no-copy { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.order-no-copy code { font-size: 15px; padding: 3px 8px; }
.file-input { display: block; width: 100%; font: inherit; font-size: 14px; padding: 9px; border: 1px dashed #c7cbe0; border-radius: var(--radius-sm); background: var(--surface-2); }
.close-reason { margin-top: 6px; font-size: 14px; color: var(--ink-2); background: var(--surface-2); padding: 6px 10px; border-radius: 8px; }
.st-submitted { background: var(--brand-soft); color: var(--brand); }
.b-submitted { background: #fff1e6; color: #c2410c; }
.panel-attn { box-shadow: 0 0 0 2px #fdba74, var(--shadow); }
.proof-img { display: block; max-width: 220px; max-height: 260px; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 4px; }
.mail-body { width: 100%; font-size: 13px; }
.mail-body summary { cursor: pointer; color: var(--muted); }
.mail-body pre { white-space: pre-wrap; word-break: break-all; font-family: var(--font); background: var(--surface-2); border-radius: 8px; padding: 10px 12px; margin: 6px 0 0; }
.count-badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: #f97316; color: #fff; font-size: 12px; font-weight: 700; text-align: center; line-height: 20px; }
.setting-row { padding: 12px 0; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.setting-row .hint { margin-top: 4px; }
.switch-line { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.qr-setting { display: flex; gap: 16px; align-items: flex-start; margin-top: 12px; flex-wrap: wrap; }
.qr-thumb { width: 120px; height: 120px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.qr-empty { display: grid; place-items: center; color: var(--muted); font-size: 13px; background: var(--surface-2); }

/* ---------- 对单 / 操作员 / 操作记录 ---------- */
.amount-big { font-size: 18px; font-weight: 800; color: #e11d48; letter-spacing: -.2px; }
.order-no-big { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--ink); background: #fff7ed; border: 1px solid #fed7aa; padding: 2px 7px; border-radius: 6px; }
.tail-digits { color: #ea580c; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.pay-musts { display: grid; gap: 8px; margin: 4px 0 16px; }
.pay-must { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 14px; border-radius: 10px; background: #fff7ed; border: 1.5px solid #fdba74; color: #7c2d12; font-size: 15px; }
.pay-must p { margin: 0; flex: 1; min-width: 0; word-break: break-all; }
.pay-must > span { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #ea580c; color: #fff; font-size: 13px; font-weight: 800; }
.match-box { max-width: 1000px; }
.match-fields { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.match-fields .field { flex: 1; min-width: 200px; margin-bottom: 0; }
.match-results { display: grid; gap: 8px; margin-top: 14px; }
.match-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.match-row.match-good { background: var(--ok-soft); border-color: #bfe8d4; }
.match-flags { display: flex; gap: 4px; }
.check-line { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); margin: 0 0 12px; }
.restore-title { font-size: 15px; margin: 0 0 6px; }
.op-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; font-size: 13.5px; }
.op-log li { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.op-log li:last-child { border-bottom: 0; }
.op-time { color: var(--muted); font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.op-actor { font-weight: 600; color: var(--ink-2); background: var(--surface-2); padding: 1px 7px; border-radius: 6px; white-space: nowrap; }
.op-actor.op-operator { background: #ecfeff; color: #0e7490; }
.side-operator { background: #0b2a2a; }
.side-who { display: block; padding: 6px 12px; font-size: 12.5px; color: #9ca3af; }
.login-tabs { display: flex; gap: 6px; margin-bottom: 16px; padding: 4px; background: var(--surface-2); border-radius: 10px; }
.login-tabs a { flex: 1; text-align: center; padding: 8px; border-radius: 8px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.login-tabs a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- 发货标签 / 商品标签 / 人工处理时间 / 售后 / 验证码 ---------- */
.product-card { position: relative; }
.delivery-ribbon { position: absolute; top: 12px; right: 12px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.product-card .pc-head { padding-right: 84px; }
.dr-auto { background: var(--ok-soft); color: var(--ok); border: 1px solid #bfe8d4; }
.dr-manual { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.delivery-badge { font-size: 14px; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.ptags { display: flex; flex-wrap: wrap; gap: 6px; }
.ptags-lg { margin-top: 14px; align-items: center; }
.ptag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); border: 1px solid #dfe3ff; white-space: nowrap; }
.manual-hours { margin: 12px 0 4px; padding: 10px 12px; border-radius: 10px; background: #fff7ed; border: 1px solid #fed7aa; color: #7c2d12; font-size: 14px; }
.after-sales .as-contact { font-size: 15px; margin-bottom: 10px; }
.as-template { white-space: pre-wrap; font-family: var(--font); font-size: 14px; background: var(--surface-2); border: 1px dashed #c7cbe0; border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; }
.captcha-row { display: flex; gap: 8px; align-items: center; }
.captcha-row input { flex: 1; min-width: 0; letter-spacing: 4px; font-size: 16px; }
.captcha-img { flex: none; width: 132px; height: 44px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.qr-history { display: grid; gap: 12px; max-width: 860px; }
.qr-version { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.qr-version .panel + .panel { margin-top: 0; }
.qr-history .panel + .panel { margin-top: 0; }
.qr-current { box-shadow: 0 0 0 2px #86efac, var(--shadow); }
.qr-bad { outline: 3px solid var(--danger); }

/* ---------- 购买须知 / 同意勾选 ---------- */
.notice-box { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; padding: 12px 14px; }
.notice-box strong { color: #7c2d12; }
.agree-line { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0 14px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.agree-line input { margin-top: 3px; flex: none; }

/* ---------- 两步验证密钥框 ---------- */
.secret-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.secret-box code { background: none; font-size: 15px; letter-spacing: 1px; word-break: break-all; flex: 1; min-width: 0; }
.totp-qr { display: inline-block; background: #fff; padding: 8px; border: 1px solid var(--line); border-radius: 10px; line-height: 0; }
.totp-qr svg { display: block; width: 200px; height: 200px; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; margin: 0; padding: 14px 14px 14px 40px; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; }
.recovery-codes code { background: none; font-size: 16px; letter-spacing: 1px; }
@media (max-width: 480px) { .recovery-codes { grid-template-columns: 1fr; } }

/* ---------- 确认弹窗 ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; padding: 16px;
  display: grid; place-items: center;
  background: rgba(15, 23, 42, .45);
}
.modal { width: 100%; max-width: 380px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 22px; }
.modal-msg { font-size: 15px; line-height: 1.7; color: var(--ink); margin-bottom: 18px; white-space: pre-wrap; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.btn-danger-solid { background: var(--danger); }
.btn-danger-solid:hover { background: #b91c1c; }

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
  .admin-main .split { grid-template-columns: 1fr; }
  .admin-main .split > .panel { max-width: 760px; }
}
@media (max-width: 900px) {
  .detail, .split, .center-grid { grid-template-columns: 1fr; }
  .detail { grid-template-areas: "head" "buy" "steps" "desc"; grid-template-rows: none; }
  .buy-box { position: static; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-shell { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; padding: 10px; gap: 2px; }
  .side .brand { width: 100%; margin: 4px 8px 8px; }
  .side a, .side button { width: auto; padding: 7px 10px; }
  .side .spacer { display: none; }
  .admin-main { padding: 16px; }
}
@media (max-width: 640px) {
  .hero { padding: 30px 0 64px; }
  .hero h1 { font-size: 24px; }
  .hero-points { gap: 8px; margin-top: 18px; }
  .hero-points li { padding: 10px 8px; text-align: center; }
  .hero-points strong { font-size: 13px; }
  .hero-points span { display: none; }
  .grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .panel { padding: 18px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .filters input[type=search] { width: 100%; }
  .nav a { padding: 7px 8px; }
  .nav { gap: 0; }
  .brand { font-size: 15px; min-width: 0; }
  .brand-text { overflow: hidden; text-overflow: ellipsis; max-width: 38vw; }
  .wi-main { flex-wrap: wrap; }
}
