:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #7a869a;
  --line: #e8edf6;
  --line-2: #f1f4fa;
  --brand: #5b5bd6;
  --brand-2: #4f46e5;
  --cyan: #06b6d4;
  --green: #10b981;
  --red: #ef4444;
  --amber: #f59e0b;
  --violet: #8b5cf6;
  --sidebar: #0b1220;
  --radius: 18px;
  --shadow: 0 12px 34px rgba(15, 23, 42, .06);
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, .05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
::selection { background: rgba(99, 102, 241, .18); }

/* scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d5dbe7; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ 布局 ============ */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 246px; flex: 0 0 246px; background: var(--sidebar); color: #cbd5e1;
  position: sticky; top: 0; height: 100vh; padding: 22px 14px 18px;
  display: flex; flex-direction: column; overflow-y: auto;
  background-image: radial-gradient(circle at 20% 0%, rgba(99, 102, 241, .28), transparent 42%),
    radial-gradient(circle at 100% 90%, rgba(6, 182, 212, .18), transparent 38%);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 22px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; flex: 0 0 38px;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  display: grid; place-items: center; color: #fff; box-shadow: 0 8px 22px rgba(79, 70, 229, .45);
}
.brand-name { font-size: 15.5px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.brand-sub { font-size: 11px; color: #64748b; letter-spacing: .08em; text-transform: uppercase; }
.nav-group { padding: 16px 12px 6px; font-size: 11px; color: #5b6b82; letter-spacing: .1em; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px;
  color: #aebbd0; cursor: pointer; font-size: 13.5px; margin: 2px 0; user-select: none;
  transition: background .18s, color .18s, transform .18s;
}
.nav-item svg { width: 18px; height: 18px; opacity: .9; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, .95), rgba(79, 70, 229, .75));
  color: #fff; box-shadow: 0 8px 20px rgba(79, 70, 229, .35);
}
.sidebar-foot { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid rgba(255,255,255,.07); }
.side-user { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px; display: grid; place-items: center;
  background: linear-gradient(135deg, #22d3ee, #6366f1); color: #fff; font-weight: 700; font-size: 13px;
}
.side-user-name { font-size: 13px; color: #e2e8f0; font-weight: 600; }
.side-user-sub { font-size: 11px; color: #64748b; }
.side-logout { margin-left: auto; color: #64748b; cursor: pointer; padding: 4px; border-radius: 8px; }
.side-logout:hover { color: #fff; background: rgba(255,255,255,.08); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 68px; display: flex; align-items: center; gap: 16px; padding: 0 30px;
  background: rgba(244, 246, 251, .82); backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(232, 237, 246, .8);
}
.page-title { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.page-crumb { font-size: 12px; color: var(--muted); margin-top: 1px; }
.topbar-spacer { flex: 1; }
.search-box {
  display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line);
  border-radius: 11px; padding: 8px 12px; width: 240px; color: var(--muted);
}
.search-box input { border: 0; outline: 0; background: transparent; width: 100%; color: var(--ink); }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; cursor: pointer; color: var(--ink-2); position: relative;
  transition: all .18s;
}
.icon-btn:hover { border-color: #cbd5e1; box-shadow: var(--shadow-sm); }
.dot-badge { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #fff; }
.top-avatar { width: 38px; height: 38px; border-radius: 11px; }

.page { padding: 24px 30px 40px; max-width: 1480px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.page-head h1 { font-size: 24px; margin: 0; letter-spacing: -.03em; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.page-head .spacer { flex: 1; }

/* ============ 卡片与统计 ============ */
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px 0; }
.card-head.pb { padding-bottom: 14px; }
.card-title { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.card-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.card-head .spacer { flex: 1; }
.card-body { padding: 18px 22px 22px; }

.stat-card { position: relative; padding: 20px 22px; }
.stat-top { display: flex; align-items: center; gap: 10px; }
.stat-icon {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 38px;
}
.stat-icon.i-indigo { background: #eef0ff; color: #5b5bd6; }
.stat-icon.i-cyan { background: #e6f9fd; color: #0891b2; }
.stat-icon.i-green { background: #e9f9f2; color: #059669; }
.stat-icon.i-amber { background: #fff5e6; color: #d97706; }
.stat-label { color: var(--muted); font-size: 12.5px; }
.stat-value { font-size: 27px; font-weight: 750; letter-spacing: -.035em; margin-top: 14px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.stat-foot { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 12px; color: var(--muted); }
.trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 650; }
.trend.up { color: var(--green); }
.trend.down { color: var(--red); }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-weight: 600; font-size: 13px; cursor: pointer;
  transition: all .18s; white-space: nowrap;
}
.btn:hover { border-color: #cbd5e1; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary {
  border: 0; color: #fff; background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 8px 20px rgba(79, 70, 229, .3);
}
.btn-primary:hover { box-shadow: 0 12px 26px rgba(79, 70, 229, .38); }
.btn-cyan { border: 0; color: #fff; background: linear-gradient(135deg, #22d3ee, #0891b2); box-shadow: 0 8px 20px rgba(6, 182, 212, .28); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--line-2); box-shadow: none; border-color: transparent; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12px; border-radius: 8px; }
.btn-danger { color: var(--red); border-color: #fde2e2; background: #fff7f7; }
.btn-danger:hover { border-color: #fecaca; }
.btn-block { width: 100%; }
.btn svg { width: 16px; height: 16px; }

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted);
  letter-spacing: .04em; padding: 11px 14px; background: #fafbfe; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #fafbff; }
.table .num { font-variant-numeric: tabular-nums; }
.table .strong { color: var(--ink); font-weight: 600; }
.table .sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.t-right { text-align: right !important; }
.t-center { text-align: center !important; }

.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill-green { color: #047857; background: #e7f8f1; }
.pill-red { color: #b91c1c; background: #fdecec; }
.pill-amber { color: #b45309; background: #fff4e0; }
.pill-gray { color: #64748b; background: #f1f5f9; }
.pill-blue { color: #1d4ed8; background: #eaf0ff; }
.pill-violet { color: #6d28d9; background: #f3ecff; }
.pill-no-dot::before { display: none; }

/* ============ 图表 ============ */
.chart { width: 100%; height: 260px; display: block; overflow: visible; }
.chart-sm { height: 190px; }
.legend { display: flex; gap: 16px; align-items: center; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.chart-tip {
  position: fixed; pointer-events: none; background: #0f172a; color: #fff; font-size: 12px;
  padding: 7px 10px; border-radius: 8px; opacity: 0; transform: translate(-50%, -115%);
  transition: opacity .12s; z-index: 80; white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,.22);
}
.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut-center { font-size: 20px; font-weight: 750; letter-spacing: -.03em; }
.donut-center-sub { font-size: 11px; color: var(--muted); font-weight: 500; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 11px; }
.donut-row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; }
.donut-row i { width: 8px; height: 8px; border-radius: 3px; flex: 0 0 8px; }
.donut-row .name { flex: 1; color: var(--ink-2); }
.donut-row .val { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ============ 表单 ============ */
.form-row { margin-bottom: 15px; }
.form-row label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.form-row .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.input, .select, .textarea {
  width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px;
  background: #fff; color: var(--ink); outline: 0; transition: border .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: #a5b4fc; box-shadow: 0 0 0 4px rgba(99, 102, 241, .1); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: #5b5bd6; }

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 24px;
  animation: fadeIn .16s ease;
}
.modal {
  background: #fff; border-radius: 20px; width: 520px; max-width: 100%; max-height: 90vh;
  display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(15, 23, 42, .28);
  animation: popIn .2s cubic-bezier(.2, .9, .3, 1.1);
}
.modal.wide { width: 720px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 16.5px; letter-spacing: -.02em; }
.modal-head p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.modal-close { margin-left: auto; width: 32px; height: 32px; border-radius: 9px; border: 0; background: var(--line-2); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.modal-close:hover { background: #e8edf6; color: var(--ink); }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 15px 22px 20px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); }

/* 后台：右侧抽屉式弹窗（与百宜企业综合管理系统后台对齐） */
.modal-mask.drawer {
  padding: 0; justify-content: flex-end; align-items: stretch;
  background: rgba(13, 31, 51, .35); backdrop-filter: blur(2px);
}
.modal-mask.drawer .modal {
  width: 620px; max-width: calc(100vw - 28px); height: auto; max-height: none;
  margin: 14px 14px 14px 0; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(230, 234, 240, .9);
  box-shadow: 0 20px 50px rgba(13, 31, 51, .25), 0 4px 16px rgba(13, 31, 51, .08);
  animation: drawerIn .3s cubic-bezier(.2, .8, .25, 1);
}
.modal-mask.drawer .modal.wide { width: 860px; }
.modal-mask.drawer .modal-head { flex: none; padding: 18px 24px; }
.modal-mask.drawer .modal-head h3 { font-size: 16px; }
.modal-mask.drawer .modal-body { flex: 1; min-height: 0; max-height: none; overflow-y: auto; padding: 20px 24px; }
.modal-mask.drawer .modal-foot { flex: none; padding: 16px 24px; }
@keyframes drawerIn { from { transform: translateX(80px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 560px) {
  .modal-mask.drawer .modal, .modal-mask.drawer .modal.wide {
    width: auto; max-width: 100vw; margin: 0; border-radius: 0; border: 0;
  }
  .modal-mask.drawer .modal-body { padding: 14px; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* ============ 提示 ============ */
.toast-wrap { position: fixed; top: 22px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #0f172a; color: #fff; padding: 11px 16px; border-radius: 11px; font-size: 13px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .28); display: flex; align-items: center; gap: 9px;
  animation: toastIn .22s ease; max-width: 360px;
}
.toast.ok { background: #065f46; }
.toast.err { background: #991b1b; }
@keyframes toastIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--line-2); display: grid; place-items: center; margin: 0 auto 12px; color: #a3adc2; }
.empty p { margin: 0; font-size: 13px; }

.loading { display: flex; align-items: center; justify-content: center; padding: 50px; color: var(--muted); gap: 10px; }
.spinner { width: 18px; height: 18px; border: 2px solid #e2e8f0; border-top-color: #6366f1; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 登录页 ============ */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: #fff; }
.auth-visual {
  position: relative; overflow: hidden; padding: 52px 60px; color: #fff;
  background: radial-gradient(1000px 600px at 10% 0%, #4f46e5 0%, #1e1b4b 52%, #0b1024 100%);
  display: flex; flex-direction: column;
}
.auth-visual::before, .auth-visual::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(2px); opacity: .5; pointer-events: none;
}
.auth-visual::before { width: 420px; height: 420px; right: -140px; top: -120px; background: radial-gradient(circle, rgba(34, 211, 238, .6), transparent 65%); }
.auth-visual::after { width: 360px; height: 360px; left: -120px; bottom: -130px; background: radial-gradient(circle, rgba(139, 92, 246, .55), transparent 65%); }
.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.auth-brand .brand-mark { box-shadow: 0 10px 30px rgba(0,0,0,.28); }
.auth-hero { margin-top: auto; position: relative; z-index: 2; max-width: 480px; }
.auth-hero h1 { font-size: 38px; line-height: 1.18; letter-spacing: -.04em; margin: 0 0 16px; font-weight: 750; }
.auth-hero h1 span { background: linear-gradient(90deg, #67e8f9, #a5b4fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-hero p { color: #c7d2fe; font-size: 14.5px; line-height: 1.75; margin: 0; }
.auth-points { display: flex; flex-direction: column; gap: 14px; margin: 30px 0 auto; position: relative; z-index: 2; }
.auth-point { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: #e0e7ff; }
.auth-point i { width: 26px; height: 26px; border-radius: 9px; background: rgba(255,255,255,.12); display: grid; place-items: center; color: #67e8f9; flex: 0 0 26px; }
.auth-note { margin-top: auto; font-size: 12px; color: #64748b; position: relative; z-index: 2; }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-form { width: 380px; max-width: 100%; }
.auth-form h2 { font-size: 27px; letter-spacing: -.035em; margin: 0 0 6px; }
.auth-form .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 28px; }
.auth-tabs { display: flex; background: var(--line-2); padding: 4px; border-radius: 11px; margin-bottom: 22px; }
.auth-tab { flex: 1; text-align: center; padding: 8px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .18s; }
.auth-tab.active { background: #fff; color: var(--ink); box-shadow: 0 3px 10px rgba(15,23,42,.08); }
.auth-form .btn { height: 44px; border-radius: 11px; }

/* ============ 客户端 ============ */
.balance-card {
  position: relative; overflow: hidden; border-radius: 22px; padding: 26px 28px;
  color: #fff; background: linear-gradient(120deg, #4f46e5 0%, #4338ca 46%, #0891b2 130%);
  box-shadow: 0 18px 44px rgba(67, 56, 202, .3);
}
.balance-card::before { content: ""; position: absolute; width: 300px; height: 300px; right: -90px; top: -150px; border-radius: 50%; background: rgba(255,255,255,.12); }
.balance-card::after { content: ""; position: absolute; width: 220px; height: 220px; right: 60px; bottom: -160px; border-radius: 50%; background: rgba(34, 211, 238, .22); }
.balance-label { font-size: 12.5px; color: #c7d2fe; display: flex; align-items: center; gap: 7px; }
.balance-value { font-size: 40px; font-weight: 760; letter-spacing: -.04em; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.balance-value small { font-size: 16px; font-weight: 500; margin-right: 6px; color: #c7d2fe; }
.balance-meta { display: flex; gap: 22px; margin-top: 18px; font-size: 12px; color: #c7d2fe; position: relative; z-index: 2; }
.balance-meta b { display: block; color: #fff; font-size: 15px; font-weight: 700; margin-top: 2px; }
.balance-actions { position: absolute; right: 26px; top: 26px; z-index: 3; display: flex; gap: 9px; }
.balance-actions .btn { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); color: #fff; backdrop-filter: blur(10px); box-shadow: none; }
.balance-actions .btn:hover { background: rgba(255,255,255,.22); }

.quick-start { background: #0f172a; border-radius: 16px; padding: 18px 20px; color: #cbd5e1; position: relative; overflow: hidden; }
.quick-start::after { content: ""; position: absolute; right: -60px; top: -80px; width: 220px; height: 220px; background: radial-gradient(circle, rgba(99,102,241,.35), transparent 65%); }
.code-block { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.85; color: #a5b4fc; white-space: pre-wrap; word-break: break-all; margin-top: 10px; }
.code-key { color: #67e8f9; }
.key-box { display: flex; align-items: center; gap: 10px; background: #f8faff; border: 1px dashed #d9e1f0; border-radius: 12px; padding: 12px 14px; }
.key-box code { flex: 1; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--ink-2); word-break: break-all; }
.key-new { border: 1px solid #bbf7d0; background: #f0fdf4; }

.model-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; transition: all .18s; }
.model-card:hover { border-color: #c7d2fe; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.model-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #eef0ff; color: #5b5bd6; flex: 0 0 40px; }
.model-name { font-weight: 700; font-size: 14px; }
.model-desc { font-size: 11.5px; color: var(--muted); }
.model-price { margin-left: auto; text-align: right; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.model-price b { display: block; color: var(--ink); font-size: 13px; }

/* QR 支付 */
.qr-panel { text-align: center; }
.qr-box { width: 240px; height: 240px; margin: 4px auto 14px; border: 1px solid var(--line); border-radius: 16px; padding: 10px; background: #fff; display: grid; place-items: center; }
.qr-box svg { width: 100%; height: 100%; display: block; }
.pay-amount { font-size: 30px; font-weight: 750; letter-spacing: -.03em; margin: 2px 0 4px; }
.pay-amount small { font-size: 14px; color: var(--muted); font-weight: 500; }
.amount-chips { display: flex; gap: 9px; flex-wrap: wrap; }
.amount-chip { padding: 8px 15px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; cursor: pointer; font-weight: 600; color: var(--ink-2); transition: all .15s; background: #fff; }
.amount-chip:hover { border-color: #a5b4fc; }
.amount-chip.active { border-color: #6366f1; background: #eef0ff; color: #4338ca; }
.pay-status { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12.5px; color: var(--muted); }

/* 支付落地页 */
.pay-page { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(800px 500px at 50% -10%, #e0e7ff, transparent 60%), var(--bg); padding: 24px; }
.pay-card { width: 420px; max-width: 100%; background: #fff; border-radius: 24px; box-shadow: 0 30px 80px rgba(15,23,42,.14); padding: 30px; text-align: center; }

/* 通用间距 */
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.text-green { color: var(--green); } .text-red { color: var(--red); } .text-amber { color: var(--amber); }

/* ============ 响应式 ============ */
@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 90; transform: translateX(-100%); transition: transform .22s ease; box-shadow: 0 0 60px rgba(0,0,0,.4); }
  .sidebar.open { transform: none; }
  .main { width: 100%; }
  .topbar { padding: 0 16px; height: 62px; }
  .page { padding: 18px 16px 32px; }
  .search-box { display: none; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-form-wrap { padding: 28px 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .balance-card { padding: 22px; }
  .balance-actions { position: static; margin-top: 16px; }
  .modal { max-height: 94vh; }
  .page-head { flex-wrap: wrap; }
  .mobile-menu { display: grid !important; }
}
.mobile-menu { display: none; }

/* ============ 后台紧凑布局 ============ */
#adminApp .sidebar { width: 216px; flex: 0 0 216px; padding: 16px 10px 12px; }
#adminApp .brand { padding: 2px 8px 14px; gap: 9px; }
#adminApp .brand-mark { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; }
#adminApp .brand-name { font-size: 14.5px; }
#adminApp .brand-sub { font-size: 10px; }
#adminApp .nav-group { padding: 11px 10px 4px; font-size: 10.5px; }
#adminApp .nav-item { padding: 8px 10px; margin: 1px 0; gap: 9px; font-size: 13px; border-radius: 8px; }
#adminApp .nav-item svg { width: 16px; height: 16px; }
#adminApp .sidebar-foot { padding: 10px 8px 0; }
#adminApp .avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: 12px; }
#adminApp .side-user-name { font-size: 12.5px; }
#adminApp .side-user-sub { font-size: 10.5px; }
#adminApp .topbar { height: 56px; padding: 0 20px; gap: 12px; }
#adminApp .page-title { font-size: 16px; }
#adminApp .page-crumb { font-size: 11.5px; }
#adminApp .search-box { padding: 6px 10px; width: 220px; border-radius: 9px; }
#adminApp .icon-btn { width: 34px; height: 34px; border-radius: 9px; }
#adminApp .top-avatar { width: 34px; height: 34px; border-radius: 9px; }
#adminApp .page { padding: 16px 20px 28px; max-width: 1600px; }
#adminApp .page-head { margin-bottom: 14px; gap: 12px; align-items: center; }
#adminApp .page-head h1 { font-size: 19px; }
#adminApp .page-head p { margin: 0; font-size: 12.5px; }
#adminApp .grid { gap: 14px; }
#adminApp .card { border-radius: 14px; box-shadow: 0 6px 18px rgba(15, 23, 42, .045); }
#adminApp .card-pad { padding: 16px 18px; }
#adminApp .card-head { padding: 14px 18px 0; gap: 10px; }
#adminApp .card-head.pb { padding-bottom: 10px; }
#adminApp .card-title { font-size: 14px; }
#adminApp .card-sub { font-size: 11.5px; margin-top: 1px; }
#adminApp .card-body { padding: 14px 18px 18px; }
#adminApp .stat-card { padding: 15px 17px; }
#adminApp .stat-top { gap: 8px; }
#adminApp .stat-icon { width: 32px; height: 32px; flex-basis: 32px; border-radius: 9px; }
#adminApp .stat-icon svg { width: 16px; height: 16px; }
#adminApp .stat-label { font-size: 12px; }
#adminApp .stat-value { font-size: 23px; margin-top: 10px; }
#adminApp .stat-value small { font-size: 12px; }
#adminApp .stat-foot { margin-top: 6px; font-size: 11.5px; }
#adminApp .table th { padding: 9px 12px; font-size: 11px; }
#adminApp .table td { padding: 10px 12px; font-size: 12.5px; }
#adminApp .table .sub { font-size: 11px; }
#adminApp .btn { height: 34px; padding: 0 13px; font-size: 12.5px; border-radius: 8px; }
#adminApp .btn-sm { height: 27px; padding: 0 9px; font-size: 11.5px; border-radius: 7px; }
#adminApp .btn svg { width: 14px; height: 14px; }
#adminApp .input, #adminApp .select { height: 36px; border-radius: 8px; font-size: 13px; }
#adminApp .textarea { min-height: 72px; border-radius: 8px; font-size: 13px; }
#adminApp .pill { height: 21px; padding: 0 8px; font-size: 11px; }
#adminApp .chart { height: 220px; }
#adminApp .legend { font-size: 11.5px; gap: 12px; }
#adminApp .modal { border-radius: 14px; }
#adminApp .modal-head { padding: 18px 20px 14px; }
#adminApp .modal-body { padding: 18px 20px; }
#adminApp .modal-foot { padding: 13px 20px 17px; }
#adminApp .form-row { margin-bottom: 12px; }
#adminApp .form-row label { font-size: 12px; margin-bottom: 5px; }
#adminApp .empty { padding: 34px 18px; }

@media (max-width: 860px) {
  #adminApp .sidebar { width: 216px; flex-basis: 216px; }
  #adminApp .topbar { height: 54px; padding: 0 14px; }
  #adminApp .page { padding: 14px 14px 26px; }
}
/* ============ 运营公告 ============ */
.notice-bar {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; margin-bottom: 16px;
  background: #f8faff; border: 1px solid #e6ecf9; border-radius: 11px;
}
.notice-bar.notice-success { background: #f6fcf9; border-color: #dff3e9; }
.notice-bar.notice-warning { background: #fffbf3; border-color: #f8e9cc; }
.notice-icon {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: 8px; display: grid; place-items: center;
  background: #eef2ff; color: #5b5bd6;
}
.notice-success .notice-icon { background: #e7f8f1; color: #059669; }
.notice-warning .notice-icon { background: #fff4e0; color: #d97706; }
.notice-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.notice-text b { font-size: 12.5px; color: #1f2937; font-weight: 600; }
.notice-text span { font-size: 12px; color: #6b7280; line-height: 1.6; }
.notice-more { margin-left: auto; flex: 0 0 auto; font-size: 11px; color: #9ca3af; padding-top: 3px; }
#adminApp .mt-20 { margin-top: 14px; }
#adminApp .mt-16 { margin-top: 12px; }
#adminApp .mt-12 { margin-top: 9px; }
#adminApp .mb-16 { margin-bottom: 12px; }

/* 系统设置 · 数据备份列表：半栏卡片里收紧按钮与单元格，避免横向溢出 */
#adminApp #bkList .btn { padding: 0 9px; }
#adminApp #bkList th, #adminApp #bkList td { padding-left: 8px; padding-right: 8px; }
