:root {
  --bg: #f5f5f3;
  --panel: #ffffff;
  --raise: #f3f3f0;
  --raise-2: #e9e9e5;
  --line: #e6e5e0;
  --line-2: #d9d8d2;
  --text: #18181b;
  --dim: #6b6b72;
  --faint: #a3a3a9;
  --ink: #18181b;
  --on-ink: #ffffff;
  --accent: #2f55d4;
  --accent-soft: #eaf0ff;
  --ok: #18794e;
  --ok-soft: #e4f4eb;
  --warn: #946200;
  --warn-soft: #fbf1d8;
  --bad: #c0281f;
  --bad-soft: #fde8e6;
  --info: #2f55d4;
  --info-soft: #e8eefc;
  --agent: #6b3fa0;
  --agent-soft: #f1e9fb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 10px 30px rgba(0, 0, 0, .08);
  --row: 52px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113; --panel: #19191c; --raise: #222226; --raise-2: #2c2c31; --line: #2a2a2f; --line-2: #36363c;
    --text: #ededf0; --dim: #a1a1aa; --faint: #6e6e78; --ink: #ededf0; --on-ink: #111113;
    --accent: #8aa7ff; --accent-soft: #1d2645;
    --ok: #5fd197; --ok-soft: #14301f; --warn: #f2bb5c; --warn-soft: #33270f; --bad: #ff8b82; --bad-soft: #3a1b19;
    --info: #8aa7ff; --info-soft: #1d2645; --agent: #c9a8f6; --agent-soft: #2a2140;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14px/1.45 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.dim { color: var(--dim); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.boot { padding: 80px; text-align: center; color: var(--dim); }
[hidden] { display: none !important; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--panel); font: 11px/1 ui-monospace, Menlo, monospace; color: var(--dim); }

/* ---------- 按钮 / 表单 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, opacity .12s; }
.btn:hover { border-color: var(--line-2); background: var(--raise); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn.primary:hover { opacity: .88; background: var(--ink); }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--raise); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.icon { width: 34px; padding: 0; }
.btn.sm.icon { width: 28px; }
.input, select.input, textarea.input { height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); outline: none; min-width: 0; }
textarea.input { height: auto; padding: 8px 12px; }
.input:focus, .btn:focus-visible, .seg button:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 12%, transparent); }
label.field { display: grid; gap: 6px; font-size: 13px; color: var(--dim); }
label.field .input { color: var(--text); }

/* ---------- 顶栏 ---------- */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 0 20px; height: 54px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; }
.brand .logo { width: 22px; height: 15px; border-radius: 4px; background: linear-gradient(135deg, #d9bd84, #8f6b37); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tab { height: 32px; padding: 0 12px; border-radius: 9px; border: 0; background: none; cursor: pointer; color: var(--dim); white-space: nowrap; }
.tab:hover { color: var(--text); background: var(--raise); }
.tab.on { color: var(--text); background: var(--panel); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0,0,0,.04); font-weight: 600; }
.top .spacer { flex: 1; }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); white-space: nowrap; }
.sync .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.sync .dot.busy { background: var(--warn); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
main { max-width: 1480px; margin: 0 auto; padding: 18px 20px 120px; }

/* ---------- 公司标签：和卡台客户卡面同色 ---------- */
.co { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 650; white-space: nowrap; background: var(--raise-2); color: var(--text); letter-spacing: .01em; }
.co.gold { background: #f2e1bd; color: #6e4c0c; }
.co.ink { background: #1f1f21; color: #fff; }
.co.green { background: #d4eedf; color: #1d6b45; }
.co.blue { background: #dde3ec; color: #3c4656; }
.co.rose { background: #f6dce2; color: #8a2f46; }
@media (prefers-color-scheme: dark) { .co.ink { background: #000; box-shadow: inset 0 0 0 1px #3a3a40; } }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 6px; font-size: 12px; background: var(--raise); color: var(--dim); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }
.badge.active { background: var(--ok-soft); color: var(--ok); }
.badge.frozen { background: var(--info-soft); color: var(--info); }
.badge.cancelled, .badge.suspended, .badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.expired, .badge.inactive, .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.agent { background: var(--agent-soft); color: var(--agent); }

/* ---------- 工具栏 ---------- */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.search { position: relative; flex: 1 1 380px; display: flex; align-items: center; min-width: 0; }
.search svg.i { position: absolute; left: 13px; color: var(--faint); pointer-events: none; }
.search .input { width: 100%; height: 40px; padding: 0 44px 0 38px; border-radius: 11px; font-size: 14.5px; }
.search kbd { position: absolute; right: 10px; }
.search .clear { position: absolute; right: 8px; }
.views { display: flex; gap: 4px; flex-wrap: wrap; }
.view { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid transparent; background: none; color: var(--dim); cursor: pointer; white-space: nowrap; }
.view:hover { color: var(--text); background: var(--raise); }
.view.on { color: var(--text); background: var(--panel); border-color: var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.04); font-weight: 600; }
.view .n { font-size: 12px; color: var(--faint); font-weight: 500; }
.view.on .n { color: var(--dim); }
.view.alert .n { color: var(--bad); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sel { position: relative; display: inline-flex; align-items: center; }
.sel select { appearance: none; -webkit-appearance: none; height: 30px; padding: 0 28px 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; color: var(--dim); cursor: pointer; }
.sel select.set { color: var(--text); border-color: var(--line-2); background: var(--raise); font-weight: 550; }
.sel svg.i { position: absolute; right: 8px; width: 13px; height: 13px; pointer-events: none; color: var(--faint); }
.resultline { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--dim); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font-size: 13px; }
.linkbtn:hover { text-decoration: underline; }

/* 下拉菜单 */
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; min-width: 220px; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); }
.menu button { display: flex; width: 100%; align-items: flex-start; gap: 10px; padding: 9px 10px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; }
.menu button:hover { background: var(--raise); }
.menu button small { display: block; color: var(--dim); font-size: 12px; margin-top: 1px; }

/* ---------- 表格 ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: 0 12px; height: var(--row); border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
thead th { height: 38px; font-size: 12px; font-weight: 500; color: var(--faint); background: var(--panel); }
/* 宽屏表头吸顶（在顶栏下面）；窄屏表格要能横向滚，吸顶会叠到行上，就不吸 */
@media (min-width: 1200px) {
  .table-wrap { overflow: visible; }
  thead th { position: sticky; top: 54px; z-index: 5; }
}
thead th:first-child { border-top-left-radius: var(--radius); }
thead th:last-child { border-top-right-radius: var(--radius); }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover, th.sorted { color: var(--text); }
tbody tr { cursor: pointer; transition: background .08s; }
tbody tr:hover { background: var(--raise); }
tbody tr.cur { background: var(--raise); box-shadow: inset 2px 0 0 var(--ink); }
tbody tr.sel { background: var(--accent-soft); }
tbody tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
td.cb, th.cb { width: 40px; padding-right: 0; }
td.cb input, th.cb input { width: 15px; height: 15px; accent-color: var(--ink); cursor: pointer; }
.cell-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nick { max-width: 300px; overflow: hidden; text-overflow: ellipsis; font-weight: 560; }
.nick.none { color: var(--faint); font-weight: 400; }
.sub { font-size: 12px; color: var(--dim); }
.empty { padding: 56px 20px; text-align: center; color: var(--dim); }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.usage { display: grid; gap: 4px; justify-items: end; }
.usage .t { font-size: 13px; }
.usage .t .of { color: var(--faint); }
.meter { height: 4px; border-radius: 99px; background: var(--raise-2); overflow: hidden; width: 110px; }
.meter i { display: block; height: 100%; background: var(--ink); border-radius: 99px; }
.meter i.warn { background: var(--warn); }
.meter i.hot { background: var(--bad); }
.over { color: var(--bad); font-weight: 600; }
.ra { width: 1%; padding-left: 0; }
.row-acts { display: flex; gap: 2px; justify-content: flex-end; opacity: 0; transition: opacity .1s; }
tr:hover .row-acts, tr.cur .row-acts { opacity: 1; }
.more-row { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; color: var(--dim); font-size: 13px; border-top: 1px solid var(--line); }
.skel { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--raise) 0, var(--raise-2) 50%, var(--raise) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* 手机：卡片列表 */
.mlist { display: grid; }
.mitem { display: grid; grid-template-columns: 26px 1fr auto; gap: 4px 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.mitem:last-child { border-bottom: 0; }
.mitem.sel { background: var(--accent-soft); }
.mitem input { width: 16px; height: 16px; accent-color: var(--ink); grid-row: span 2; }
.mitem .l1 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mitem .l1 .nick { max-width: none; flex: 1; min-width: 0; }
.mitem .l2 { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--dim); min-width: 0; }
.mitem .rt { text-align: right; font-size: 13px; }

/* 批量条 */
.batch { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 35; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow); max-width: calc(100% - 24px); }
.batch .cnt { font-weight: 600; margin-right: 6px; }
.batch .btn { background: transparent; color: var(--on-ink); border-color: color-mix(in srgb, var(--on-ink) 25%, transparent); }
.batch .btn:hover { background: color-mix(in srgb, var(--on-ink) 12%, transparent); }
.batch .btn.danger { color: #ff9b92; }
.batch .sep { width: 1px; height: 20px; background: color-mix(in srgb, var(--on-ink) 25%, transparent); margin: 0 2px; }

/* 导出进度 */
.progress { position: fixed; right: 20px; bottom: 22px; z-index: 50; width: 320px; padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 8px; }
.progress .track { height: 6px; border-radius: 99px; background: var(--raise-2); overflow: hidden; }
.progress .track i { display: block; height: 100%; background: var(--ink); transition: width .3s; }
.progress .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }

/* 查找结果 */
.found { margin-bottom: 12px; padding: 14px 16px; display: grid; gap: 8px; }
.found .head { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.found .item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--raise); }
.hint { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--text); font-size: 13px; }

/* ---------- 抽屉 ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .22); animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(640px, 100%); background: var(--bg); border-left: 1px solid var(--line); overflow-y: auto; box-shadow: var(--shadow); animation: slide .18s ease-out; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(24px); opacity: .6; } }
.drawer.still { animation: none; }
.drawer-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 12px 16px 12px 20px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.drawer-head .pos { font-size: 12px; color: var(--faint); margin-right: auto; }
.drawer-body { padding: 18px 20px 48px; display: grid; gap: 14px; }
.title-row { display: grid; gap: 8px; }
.title-row h2 { margin: 0; font-size: 20px; letter-spacing: -.015em; line-height: 1.3; word-break: break-all; }
.title-row .tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.title-row .edit { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 2px 4px; border-radius: 6px; vertical-align: 2px; }
.title-row .edit:hover { color: var(--text); background: var(--raise); }
.section { padding: 16px; display: grid; gap: 12px; }
.section h3 { margin: 0; font-size: 13px; color: var(--dim); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.section h3 .r { margin-left: auto; font-weight: 400; }
.kv { display: grid; grid-template-columns: 88px 1fr; gap: 8px 12px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; min-width: 0; word-break: break-all; }
.copyable { cursor: pointer; border-radius: 5px; padding: 0 3px; margin: 0 -3px; }
.copyable:hover { background: var(--raise-2); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.note { font-size: 12.5px; color: var(--dim); line-height: 1.6; margin: 0; }

/* 卡面 */
.cardface { position: relative; border-radius: 18px; padding: 18px 20px; min-height: 188px; color: #fff; background: linear-gradient(140deg, #34343a, #101013 70%); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.cardface::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 100% 0, rgba(255,255,255,.14), transparent 55%); pointer-events: none; }
.cardface.gold { background: linear-gradient(140deg, #e4cb94, #a37a42 75%); color: #2a1d06; }
.cardface.green { background: linear-gradient(140deg, #5c9f7c, #1f5b3d 75%); }
.cardface.blue { background: linear-gradient(140deg, #8a96a8, #39424f 75%); }
.cardface.rose { background: linear-gradient(140deg, #d9a1b0, #8a3e55 75%); }
.cardface .row { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; font-size: 13px; }
.cardface .pan { position: relative; z-index: 1; font-size: 22px; letter-spacing: .09em; }
.cardface .lbl { font-size: 10px; opacity: .65; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 2px; }
.cardface .t { font-size: 12px; opacity: .8; }
.cardface .btn { background: rgba(255,255,255,.92); color: #18181b; border: 0; }
.cardface.gold .btn { background: rgba(255,255,255,.75); }
.copybar { display: flex; flex-wrap: wrap; gap: 6px; }
.copybar .btn { flex: 1 1 auto; }
.countdown { height: 3px; border-radius: 99px; background: var(--raise-2); overflow: hidden; }
.countdown i { display: block; height: 100%; background: var(--faint); transition: width 1s linear; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { padding: 10px 12px; border-radius: 11px; background: var(--raise); }
.stat .l { font-size: 12px; color: var(--dim); }
.stat .v { font-size: 17px; margin-top: 1px; letter-spacing: -.015em; }
.bigmeter { display: grid; gap: 6px; }
.bigmeter .meter { width: 100%; height: 8px; }
.bigmeter .line { display: flex; justify-content: space-between; font-size: 13px; }
.txlist { display: grid; }
.tx { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tx:last-child { border-bottom: 0; }
.tx .m { font-weight: 520; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx .a { text-align: right; }
.tx .meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--dim); }
.tx .why { grid-column: 1 / -1; font-size: 12px; color: var(--bad); }
.tx.failed .a { color: var(--faint); text-decoration: line-through; }
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--raise); gap: 2px; }
.seg button { height: 26px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--dim); cursor: pointer; font-size: 12.5px; }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.06); font-weight: 600; }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .32); animation: fade .12s; }
.modal-box { width: min(460px, 100%); max-height: 90vh; overflow-y: auto; background: var(--panel); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.modal-box h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.modal-box .foot { display: flex; justify-content: flex-end; gap: 8px; }
.shortcuts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 13.5px; align-items: center; }
.shortcuts span { display: flex; gap: 4px; }

/* ---------- 概览 ---------- */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); text-align: left; cursor: default; }
button.kpi { cursor: pointer; }
button.kpi:hover { border-color: var(--line-2); }
.kpi .l { font-size: 12.5px; color: var(--dim); }
.kpi .v { font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; }
.kpi .s { font-size: 12px; color: var(--faint); margin-top: 2px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.co-card { padding: 18px; display: grid; gap: 14px; align-content: start; }
.co-card .head { display: flex; align-items: center; gap: 8px; }
.co-card .head h3 { margin: 0; font-size: 16px; }
.capbar { height: 8px; border-radius: 99px; background: var(--raise-2); overflow: hidden; display: flex; }
.capbar i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; }
.legend button { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--dim); font-size: 12.5px; cursor: pointer; }
.legend button:hover { color: var(--text); border-color: var(--line-2); }
.legend button::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.list-rows { display: grid; gap: 7px; font-size: 13.5px; }
.list-rows > div { display: flex; justify-content: space-between; gap: 12px; }
.subhead { font-size: 12px; color: var(--faint); margin-bottom: -6px; }

/* ---------- 登录 ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-box { width: min(380px, 100%); padding: 28px; display: grid; gap: 14px; }
.login-box h1 { margin: 0 0 2px; font-size: 22px; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.qr { display: grid; place-items: center; padding: 12px; background: #fff; border-radius: 12px; }
.qr svg { width: 180px; height: 180px; }
.err { color: var(--bad); font-size: 13px; }

.toast { position: fixed; left: 50%; top: 66px; transform: translate(-50%, -8px); z-index: 80; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 11px; background: var(--ink); color: var(--on-ink); font-size: 13.5px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); color: #fff; }

@media (max-width: 760px) {
  :root { --row: 56px; }
  .top { padding: 0 12px; gap: 8px; height: 50px; }
  .brand span:last-child, .sync, .hide-sm { display: none; }
  main { padding: 12px 12px 120px; }
  .search { flex-basis: 100%; }
  .bar .btns { width: 100%; display: flex; gap: 8px; }
  .bar .btns > * { flex: 1; }
  .views { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; }
  .views::-webkit-scrollbar { display: none; }
  .resultline { margin-left: 0; width: 100%; justify-content: space-between; }
  .stat { padding: 9px 10px; }
  .stat .v { font-size: 15px; }
  .drawer-body { padding: 14px 14px 48px; }
  .drawer-head { padding: 10px 12px 10px 14px; }
  .batch { bottom: 12px; padding: 8px; border-radius: 12px; }
  .batch .cnt { width: 100%; margin: 0 4px 2px; }
  .progress { left: 12px; right: 12px; width: auto; bottom: 12px; }
  .grid { grid-template-columns: 1fr; }
  .cardface .pan { font-size: 19px; }
  .menu { right: auto; left: 0; }
}

/* ================= YIKA 管理台补充 ================= */
.brand .logo { background: linear-gradient(135deg, #5b7cff, #2f55d4); }
.modal-box.wide { width: min(820px, 100%); }
.modal-box .mhead { display: flex; align-items: center; gap: 8px; margin: -4px -6px 0 0; }
.modal-box .mhead h3 { flex: 1; }
.mbody { display: grid; gap: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.box { padding: 12px 14px; border-radius: 12px; background: var(--raise); font-size: 13.5px; display: grid; gap: 6px; }
.box.ok { background: var(--ok-soft); }
.box.bad { background: var(--bad-soft); color: var(--bad); }
.box.warn { background: var(--warn-soft); }
.box .line { display: flex; justify-content: space-between; gap: 12px; }
.box .line b { font-weight: 600; }
.box .total { border-top: 1px solid var(--line-2); padding-top: 6px; margin-top: 2px; font-weight: 600; }
.steps { display: flex; gap: 6px; font-size: 12.5px; color: var(--faint); flex-wrap: wrap; }
.steps span { display: inline-flex; align-items: center; gap: 6px; }
.steps span i { font-style: normal; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--raise-2); font-size: 11px; }
.steps span.on { color: var(--text); font-weight: 600; }
.steps span.on i { background: var(--ink); color: var(--on-ink); }
.steps span.done i { background: var(--ok); color: #fff; }
.steps .arrow { color: var(--line-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); font-size: 12.5px; color: var(--dim); white-space: nowrap; }
.chip b { color: var(--text); font-weight: 600; }
.chip.off { opacity: .55; text-decoration: line-through; }
.pickl { max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.pickl label { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13.5px; }
.pickl label:last-child { border-bottom: 0; }
.pickl label:hover { background: var(--raise); }
.pickl input { accent-color: var(--ink); width: 15px; height: 15px; }
.mini { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini th, .mini td { height: 34px; padding: 0 8px; border-bottom: 1px solid var(--line); }
.mini thead th { position: static; height: 30px; }
.mini tbody tr { cursor: default; }
.codebox { margin: 0; padding: 12px; border-radius: 10px; background: var(--raise); font: 12.5px/1.6 ui-monospace, Menlo, monospace; white-space: pre-wrap; word-break: break-all; max-height: 360px; overflow: auto; }
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); }
.tracker { position: fixed; right: 20px; bottom: 22px; z-index: 50; width: 340px; max-height: 50vh; overflow-y: auto; padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 8px; font-size: 13px; }
.tracker .head { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.tracker .head .btn { margin-left: auto; }
.tracker .it { display: flex; align-items: center; gap: 8px; }
.tracker .it .what { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice { padding: 22px; display: grid; gap: 10px; }
.notice h3 { margin: 0; font-size: 16px; }
.amt-neg { color: var(--bad); }
.amt-pos { color: var(--ok); }
.kpi .v.sm { font-size: 19px; }
.ops-row td .err { color: var(--bad); font-size: 12px; max-width: 360px; white-space: normal; }
.tx.op { grid-template-columns: 1fr auto; }
textarea.input.session { min-height: 120px; font: 12px/1.5 ui-monospace, Menlo, monospace; resize: vertical; }
.badge.info { background: var(--info-soft); color: var(--info); }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .row2, .row3 { grid-template-columns: 1fr; }
  .tracker { left: 12px; right: 12px; width: auto; bottom: 12px; }
}
.grid > .section, .grid > .panel { align-content: start; }
.list-rows > div { align-items: center; }
.list-rows .linkbtn { font-size: 13.5px; text-align: left; }
a.btn { text-decoration: none; }
