:root {
  --ink: #17324d;
  --muted: #708094;
  --line: #e4e9ef;
  --paper: #f7f9fb;
  --blue: #2f6fed;
  --blue-soft: #edf3ff;
  --gold: #d79b45;
  --green: #138a68;
  --danger: #bf4b4b;
  --shadow: 0 18px 60px rgba(32, 59, 84, .08);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #f7f9fb; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 44px; color: white; background: #17324d; }
.brand { display:flex; align-items:center; gap: 12px; font-weight: 700; letter-spacing: .04em; }
.brand-mark { width: 34px; height:34px; border-radius: 11px 11px 11px 3px; display:grid; place-items:center; color:#17324d; background: #f0c77b; font-size: 18px; }
.topbar-right { display:flex; align-items:center; gap: 20px; font-size: 13px; color: #cbd9e5; }
.wechat-user { color:#eaf2ff; font-size:12px; }
.role-toggle { display:flex; background: rgba(255,255,255,.1); border-radius: 999px; padding: 3px; }
.role-toggle button { border: 0; border-radius: 999px; padding: 7px 13px; color: #cbd9e5; background: transparent; font-size: 12px; }
.role-toggle button.active { color: var(--ink); background: white; }
.page { max-width: 1240px; margin: 0 auto; padding: 36px 28px 64px; }
.eyebrow { color: var(--gold); font-size: 12px; letter-spacing: .18em; font-weight: 700; }
h1 { margin: 9px 0 8px; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.04em; }
h2 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
h3 { margin: 0; font-size: 16px; }
.lead { max-width: 650px; margin: 0; color: var(--muted); line-height: 1.8; }
.hero { display:flex; justify-content:space-between; gap: 28px; align-items:flex-end; margin-bottom: 28px; }
.hero-actions { display:flex; gap: 10px; flex-wrap:wrap; }
.btn { border: 1px solid transparent; border-radius: 10px; padding: 11px 16px; font-size: 13px; font-weight: 700; transition: .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: white; background: var(--blue); box-shadow: 0 8px 18px rgba(47,111,237,.2); }
.btn-dark { color: white; background: var(--ink); }
.btn-ghost { color: var(--ink); background: white; border-color: var(--line); }
.btn-danger { color: var(--danger); background: #fff5f5; border-color: #f3d6d6; }
.grid { display:grid; gap: 18px; }
.stats { grid-template-columns: repeat(4, 1fr); margin-bottom: 22px; }
.stat, .card, .panel { background:white; border:1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.stat { padding: 20px 20px 18px; }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { margin-top: 9px; font-size: 29px; font-weight: 750; letter-spacing: -.04em; }
.stat-foot { margin-top: 7px; color: var(--muted); font-size: 12px; }
.main-grid { grid-template-columns: 1.3fr .7fr; align-items: start; }
.panel { padding: 24px; }
.panel-head { display:flex; justify-content:space-between; gap: 16px; align-items:center; margin-bottom: 18px; }
.panel-sub { color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x:auto; }
.bulk-toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:0 0 10px; padding:8px 10px; background:#f7fafc; border:1px solid var(--line); border-radius:9px; }
table { width:100%; border-collapse: collapse; font-size:13px; min-width: 620px; }
th { color: var(--muted); text-align:left; font-size:11px; font-weight: 600; letter-spacing:.05em; padding: 12px 10px; border-bottom:1px solid var(--line); white-space:nowrap; }
td { padding: 15px 10px; border-bottom:1px solid #eef1f4; white-space:nowrap; }
tr:last-child td { border-bottom:0; }
.tag { display:inline-flex; align-items:center; padding:5px 8px; border-radius: 999px; font-size:11px; font-weight: 700; }
.tag-green { color: var(--green); background:#eaf8f3; }
.tag-gold { color:#9a691e; background:#fff6e4; }
.tag-blue { color:#2f63c8; background:#edf3ff; }
.tag-gray { color:#7b8795; background:#f1f3f5; }
.tag-red { color:var(--danger); background:#fff0f0; }
.form-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.field { display:flex; flex-direction:column; gap:7px; }
.field.full { grid-column:1 / -1; }
.field label { font-size:12px; color:var(--muted); }
.field input, .field select { width:100%; padding: 11px 12px; border:1px solid var(--line); border-radius: 9px; outline: none; background:#fff; color:var(--ink); }
.field input:focus, .field select:focus { border-color: #9cb8f5; box-shadow: 0 0 0 3px #edf3ff; }
.checkline { display:flex; gap:9px; align-items:center; color:var(--muted); font-size:12px; }
.checkline input { width:auto; padding:0; border:0; box-shadow:none; accent-color:var(--blue); flex:0 0 auto; }
.notice { padding: 13px 14px; color: #5c6e80; background:#f7f9fb; border-radius: 10px; font-size:12px; line-height:1.65; }
.progress { margin: 15px 0 8px; height: 8px; border-radius:99px; background:#edf1f5; overflow:hidden; }
.progress i { display:block; height:100%; border-radius:99px; background: linear-gradient(90deg, #e5ad54, #f1cd83); }
.timeline { display:flex; flex-direction:column; gap: 14px; }
.timeline-row { display:grid; grid-template-columns: 84px 1fr; gap: 12px; align-items:start; }
.timeline-date { color:var(--muted); font-size:11px; padding-top:2px; }
.timeline-copy { border-left: 2px solid #e7edf3; padding: 0 0 3px 13px; font-size:13px; line-height:1.6; }
.timeline-copy b { display:block; margin-bottom:2px; }
.empty { padding: 36px 16px; text-align:center; color:var(--muted); font-size:13px; }
.h5-wrap { width:100%; max-width: 500px; margin: 0 auto; min-height: calc(100vh - 72px); background:#f8fafc; overflow:hidden; }
.h5-hero { padding: 34px 22px 26px; color:white; background: linear-gradient(140deg, #17324d, #2d5578); border-radius: 0 0 26px 26px; overflow:hidden; }
.h5-hero.has-banner { padding:0; background:#17324d; }
.h5-banner { position:relative; width:100%; aspect-ratio:1.586 / 1; overflow:hidden; border-radius:18px; background:#eadfc7; }
.h5-banner-image { display:block; width:100%; height:100%; object-fit:contain; object-position:center; background:#eadfc7; }
.h5-banner::after { content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(180deg,rgba(8,25,42,.04) 22%,rgba(8,25,42,.18) 48%,rgba(8,25,42,.86) 100%); }
.h5-hero-copy { position:absolute; z-index:1; inset:auto 0 0; padding:34px 22px 22px; color:#fff; }
.h5-hero h1 { font-size: 30px; margin-top: 8px; }
.h5-hero p { color:#d2e0eb; font-size:13px; line-height:1.7; margin-bottom:0; }
.h5-body { padding: 18px; }
.stepper { display:flex; gap: 7px; align-items:center; margin-bottom:16px; }
.step { display:flex; gap:6px; align-items:center; color:#9aa7b5; font-size:11px; }
.step b { width:21px; height:21px; display:grid; place-items:center; border-radius:50%; background:#e8edf2; font-size:10px; }
.step.active { color:var(--blue); font-weight:700; }.step.active b { color:white; background:var(--blue); }
.step-line { width: 24px; height:1px; background:#dae1e8; }
.h5-card { background:white; border:1px solid var(--line); border-radius:16px; padding:18px; box-shadow:0 10px 30px rgba(23,50,77,.06); margin-bottom:14px; }
.code-row { display:flex; gap:8px; margin-top:12px; }
.code-row input { flex:1; min-width:0; padding:12px 13px; border:1px solid var(--line); border-radius:10px; text-transform:uppercase; letter-spacing:.08em; }
.scan-btn { width:46px; border:1px solid var(--line); border-radius:10px; color:var(--ink); background:#fff; }
.product-list { display:grid; gap:10px; margin-top:14px; }
.product { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:12px; }
.product.selected { border-color:#8cadf3; background:#f5f8ff; }
.product-main { display:flex; gap:10px; align-items:center; min-width:0; }
.product-thumb { width:44px; height:44px; border-radius:10px; display:grid; place-items:center; background:linear-gradient(135deg,#e9d9bf,#fff9ed); font-size:22px; }
.product-image { width:44px; height:44px; object-fit:cover; border-radius:10px; }
.admin-banner-preview { display:block; width:220px; max-width:100%; height:140px; object-fit:contain; border-radius:12px; margin-top:12px; border:1px solid var(--line); background:#f4f7fa; }
.copy-text { border:0; padding:0; color:var(--blue); background:transparent; font-size:11px; cursor:pointer; }
.product-name { font-size:13px; font-weight:700; }.product-desc { color:var(--muted); font-size:11px; margin-top:3px; }
.radio { width:19px; height:19px; border-radius:50%; border:1px solid #c8d2dc; display:grid; place-items:center; }
.product.selected .radio { border-color:var(--blue); }.product.selected .radio:after { content:""; width:9px; height:9px; border-radius:50%; background:var(--blue); }
.random-pick { display:flex; justify-content:space-between; align-items:center; padding:13px; margin-top:12px; border:1px dashed #b7c6d6; border-radius:12px; background:#fbfdff; }
.random-pick strong { display:block; font-size:13px; }.random-pick span { display:block; margin-top:3px; color:var(--muted); font-size:11px; }
.choice { display:flex; gap:8px; }.choice button { padding:7px 10px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--muted); font-size:11px; }.choice button.active { color:var(--blue); border-color:#a8bff2; background:#eff4ff; }
.summary { display:flex; justify-content:space-between; padding:11px 0; margin-top:12px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }.summary b { color:var(--ink); }
.toast { position:fixed; left:50%; bottom:26px; transform:translateX(-50%) translateY(20px); z-index:20; opacity:0; pointer-events:none; color:white; background:#17324d; border-radius: 9px; padding:11px 16px; font-size:12px; transition:.25s; }.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
.modal-backdrop { position:fixed; inset:0; z-index:10; display:grid; place-items:center; padding:20px; background:rgba(18,37,55,.45); }.modal { width:min(600px,100%); max-height:90vh; overflow:auto; padding:23px; border-radius:16px; background:white; box-shadow:0 20px 70px rgba(0,0,0,.2); }.modal-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; }.close { border:0; background:transparent; color:var(--muted); font-size:22px; }.qr-box { width:178px; height:178px; margin:14px auto; padding:10px; border:1px solid var(--line); border-radius:12px; background:#fff; }.qr-svg { width:100%; height:100%; image-rendering: pixelated; }.qr-image { display:block; width:158px; height:158px; object-fit:contain; }
.footer-note { margin-top:28px; color:#a0acb8; font-size:11px; text-align:center; }
.admin-tabs { display:flex; gap:8px; flex-wrap:wrap; margin:0 0 18px; padding:8px; background:#fff; border:1px solid var(--line); border-radius:14px; position:sticky; top:10px; z-index:3; box-shadow:0 8px 24px rgba(23,50,77,.06); }
.admin-tab { border:1px solid transparent; background:transparent; color:var(--muted); border-radius:9px; padding:10px 16px; font-size:13px; cursor:pointer; }
.admin-tab:hover { color:var(--blue); background:#f5f8ff; }.admin-tab.active { color:#fff; background:var(--blue); box-shadow:0 4px 10px rgba(23,50,77,.18); }
.admin-row { width:100%; margin-bottom:18px; }.admin-settings { grid-template-columns:1fr; align-items:stretch; }
.region-tree { display:grid; gap:10px; }.region-node, .region-children details { border:1px solid var(--line); border-radius:10px; padding:10px 12px; background:#fbfdff; }.region-tree summary { cursor:pointer; display:flex; justify-content:space-between; align-items:center; gap:10px; }.region-children { display:grid; gap:8px; margin:10px 0 0 14px; }.region-districts { display:flex; flex-wrap:wrap; gap:6px; margin-top:9px; }.region-actions { display:inline-flex; gap:4px; margin-left:auto; vertical-align:middle; }.region-actions .region-action { line-height:1; }.check-grid { display:grid !important; width:100%; grid-template-columns:repeat(2,minmax(180px,1fr)); gap:9px 18px; margin-top:9px; }.check-grid .checkline { min-width:0; justify-content:flex-start; white-space:nowrap; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); }.main-grid { grid-template-columns:1fr; }.hero { align-items:flex-start; flex-direction:column; } }
@media (max-width: 700px) { .admin-settings { grid-template-columns:1fr; } .admin-tabs { position:static; overflow:auto; flex-wrap:nowrap; } .admin-tab { white-space:nowrap; } }
@media (max-width: 560px) { .topbar { padding:0 18px; }.topbar-right > span:not(.wechat-user) { display:none; }.wechat-user { display:inline !important; max-width:140px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.page { padding:27px 15px 44px; }.stats { gap:10px; }.stat { padding:15px; }.form-grid { grid-template-columns:1fr; }.field.full { grid-column:auto; }.panel { padding:18px; }.check-grid { grid-template-columns:1fr; } }
