/* =========================================================
   粉迹 Design System · Console
   ========================================================= */
:root {
  --brand: #f2456b;
  --brand-deep: #d92f55;
  --brand-soft: #fff1f4;
  --brand-grad: linear-gradient(135deg, #f2456b 0%, #ff7a5c 100%);
  --ink: #0f172a;
  --ink-2: #1d2939;
  --text: #101828;
  --muted: #667085;
  --faint: #98a2b3;
  --line: #eaecf0;
  --line-soft: #f2f4f7;
  --bg: #f5f6fa;
  --card: #ffffff;
  --green: #12b76a;
  --green-soft: #ecfdf3;
  --amber: #f79009;
  --amber-soft: #fffaeb;
  --red: #f04438;
  --red-soft: #fef3f2;
  --blue: #2e90fa;
  --blue-soft: #eff8ff;
  --violet: #7a5af8;
  --sidebar: #0d1424;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.05), 0 12px 28px -14px rgba(16, 24, 40, 0.18);
  --shadow-lg: 0 24px 64px -24px rgba(15, 23, 42, 0.32);
  --font: "Inter", -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);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
svg { display: block; }
::selection { background: rgba(242, 69, 107, 0.18); }

*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #d7dbe3; border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #bcc3cf; background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------- layout -------------------------------- */
.app { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  background:
    radial-gradient(600px 280px at -10% -8%, rgba(242, 69, 107, 0.18), transparent 62%),
    radial-gradient(480px 320px at 120% 108%, rgba(122, 90, 248, 0.16), transparent 60%),
    linear-gradient(180deg, #101a2e 0%, #0b1220 100%);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  z-index: 40;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; }
.brand-mark { width: 36px; height: 36px; flex: none; filter: drop-shadow(0 6px 14px rgba(242, 69, 107, 0.4)); }
.brand-text { line-height: 1.1; }
.brand-name { color: #fff; font-size: 17px; font-weight: 800; letter-spacing: 1px; }
.brand-sub { color: #7c8aa5; font-size: 9.5px; letter-spacing: 2.6px; margin-top: 4px; font-weight: 600; }

.workspace {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 18px;
}
.workspace .ws-logo {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, #f2456b, #ff8a5c);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px;
}
.workspace .ws-name { color: #e6ebf4; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 118px; }
.workspace .ws-plan { color: #8f9cb3; font-size: 10.5px; margin-top: 3px; display: flex; align-items: center; gap: 5px; }
.workspace .ws-plan::before { content: ""; width: 5px; height: 5px; border-radius: 99px; background: #34d399; }
.workspace svg { margin-left: auto; color: #6c7a92; flex: none; }

.nav { flex: 1; overflow-y: auto; padding-right: 2px; }
.nav::-webkit-scrollbar { width: 0; }
.nav-group { margin-bottom: 14px; }
.nav-label { font-size: 10px; letter-spacing: 1.6px; color: #5d6b84; font-weight: 700; padding: 0 10px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px; color: #a9b6cb;
  font-size: 13px; font-weight: 500; margin-bottom: 2px;
  cursor: pointer; position: relative; transition: background 0.16s, color 0.16s;
}
.nav-item svg { width: 17px; height: 17px; flex: none; opacity: 0.85; }
.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: #e9eef7; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(242, 69, 107, 0.2), rgba(242, 69, 107, 0.05));
  color: #fff;
}
.nav-item.active svg { opacity: 1; color: #ff7d93; }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px;
  border-radius: 0 4px 4px 0; background: var(--brand-grad);
}
.nav-item .nav-dot { margin-left: auto; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 99px; background: rgba(242, 69, 107, 0.9); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }

.sidebar-foot { margin-top: 10px; }
.support-card {
  border-radius: 12px; padding: 12px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.support-card .sc-title { color: #e7ecf5; font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.support-card .sc-text { color: #8794ab; font-size: 11.5px; line-height: 1.6; margin-top: 5px; }
.support-card button {
  margin-top: 10px; width: 100%; height: 28px; border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06); color: #dfe6f1; border-radius: 7px; font-size: 11.5px; cursor: pointer;
}
.support-card button:hover { background: rgba(255, 255, 255, 0.12); }

.main { margin-left: 236px; min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  height: 62px; flex: none; display: flex; align-items: center; gap: 14px;
  padding: 0 28px; background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar .menu-btn { display: none; }
.crumb { display: flex; align-items: center; gap: 7px; color: var(--faint); font-size: 12.5px; white-space: nowrap; min-width: 0; }
.crumb b { color: var(--text); font-weight: 600; font-size: 14.5px; }
.crumb svg { color: #c3c9d4; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.credit-chip { display: inline-flex; align-items: center; gap: 4px; height: 29px; padding: 0 10px; margin-right: 4px; border-radius: 99px; background: #fff1f4; border: 1px solid #ffe0e6; color: #b42318; font-size: 11.5px; text-decoration: none; white-space: nowrap; }
.credit-chip b { font-weight: 750; font-variant-numeric: tabular-nums; }
.credit-chip span { color: #b5475b; font-size: 10.5px; }
.credit-chip:hover { background: #ffe7ec; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: none; background: transparent;
  display: grid; place-items: center; color: #5b667a; cursor: pointer; position: relative;
}
.icon-btn:hover { background: #f2f4f7; color: var(--text); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 6px; height: 6px; border-radius: 99px; background: var(--brand); border: 1.5px solid #fff; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 8px 5px 5px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; margin-left: 4px; }
.user-chip:hover { background: #f9fafb; border-color: var(--line); }
.user-chip .u-name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.user-chip .u-role { font-size: 10.5px; color: var(--faint); margin-top: 2px; }
.avatar {
  border-radius: 99px; display: grid; place-items: center; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, #7a5af8, #f2456b); flex: none; overflow: hidden;
  font-size: 12px; letter-spacing: 0.2px;
}
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.md { width: 34px; height: 34px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }

.page { padding: 24px 28px 56px; width: 100%; max-width: 1480px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; font-weight: 700; letter-spacing: -0.3px; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 6px; line-height: 1.6; }
.page-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ------------------------------- buttons ------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid transparent;
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: all 0.16s ease; background: #fff; color: var(--ink-2);
}
.btn svg { width: 15px; height: 15px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -8px rgba(242, 69, 107, 0.9); }
.btn-primary:hover:not(:disabled) { background: var(--brand-deep); box-shadow: 0 8px 20px -8px rgba(242, 69, 107, 0.95); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); box-shadow: var(--shadow-sm); }
.btn-ghost:hover:not(:disabled) { border-color: #d5dae3; background: #fcfcfd; }
.btn-soft { background: var(--brand-soft); color: var(--brand-deep); }
.btn-soft:hover:not(:disabled) { background: #ffe4ea; }
.btn-danger { background: #fff; border-color: #fecdca; color: var(--red); }
.btn-danger:hover:not(:disabled) { background: var(--red-soft); }
.btn-text { background: transparent; color: var(--muted); padding: 0 8px; height: 30px; }
.btn-text:hover { color: var(--text); background: #f2f4f7; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn .spin { width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 99px; animation: spin 0.7s linear infinite; }
.btn-ghost .spin { border-color: rgba(16, 24, 40, 0.2); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------------------- cards -------------------------------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.card-head h3 { font-size: 14.5px; font-weight: 650; letter-spacing: -0.1px; }
.card-head .hint { color: var(--faint); font-size: 12px; }
.card-head .head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 20px; }
.card-body.tight { padding: 0; }

/* ---------------------------------- kpi -------------------------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 14px;
  position: relative; overflow: hidden; box-shadow: var(--shadow-sm);
}
.kpi::after {
  content: ""; position: absolute; right: -34px; top: -34px; width: 108px; height: 108px;
  border-radius: 99px; background: radial-gradient(circle, rgba(242, 69, 107, 0.1), transparent 68%);
}
.kpi .k-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi .k-top .k-ico { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.kpi .k-top .k-ico svg { width: 13px; height: 13px; }
.kpi .k-val { font-size: 29px; font-weight: 750; letter-spacing: -0.8px; margin-top: 10px; display: flex; align-items: baseline; gap: 4px; }
.kpi .k-val small { font-size: 12px; font-weight: 500; color: var(--faint); letter-spacing: 0; }
.kpi .k-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 650; font-size: 11.5px; padding: 2px 6px; border-radius: 6px; }
.delta.up { color: #067647; background: var(--green-soft); }
.delta.down { color: #b42318; background: var(--red-soft); }
.delta.flat { color: var(--muted); background: #f2f4f7; }
.kpi .spark { position: absolute; right: 14px; bottom: 14px; width: 88px; height: 34px; opacity: 0.9; }

/* -------------------------------- grids -------------------------------- */
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(280px, 1fr); gap: 14px; margin-bottom: 16px; align-items: start; }
.grid-1-1 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* -------------------------------- chart -------------------------------- */
.chart-wrap { position: relative; padding: 6px 4px 0; }
.chart-tip {
  position: absolute; pointer-events: none; opacity: 0; transform: translate(-50%, -100%);
  background: #101828; color: #fff; border-radius: 8px; padding: 7px 10px; font-size: 11.5px;
  line-height: 1.6; white-space: nowrap; z-index: 5; transition: opacity 0.12s; box-shadow: var(--shadow-lg);
}
.chart-tip.show { opacity: 1; }
.chart-tip b { font-weight: 650; }
.chart-tip .t-row { display: flex; align-items: center; gap: 6px; }
.chart-tip .t-dot { width: 6px; height: 6px; border-radius: 99px; }
.legend { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; margin-right: 6px; }

.donut-wrap { display: flex; align-items: center; gap: 18px; padding: 8px 4px 4px; }
.donut-center { font-size: 10px; fill: var(--faint); }
.legend-list { flex: 1; display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.legend-row .dot { width: 7px; height: 7px; border-radius: 3px; flex: none; }
.legend-row .l-name { color: var(--ink-2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend-row .l-val { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.legend-row .l-pct { color: var(--faint); width: 38px; text-align: right; font-variant-numeric: tabular-nums; }

/* -------------------------------- table -------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; font-weight: 600; color: var(--faint); font-size: 11.5px;
  padding: 10px 16px; background: #fafbfc; border-bottom: 1px solid var(--line-soft);
  white-space: nowrap; letter-spacing: 0.2px;
}
table.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; color: #344054; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover td { background: #fcfcfd; }
table.tbl tbody tr.clickable { cursor: pointer; }
table.tbl .strong { color: var(--text); font-weight: 600; }
table.tbl .num { font-variant-numeric: tabular-nums; }
/* 列较多的管理表：收紧内边距与字号，尽量在一屏内放下操作列 */
table.tbl.compact { font-size: 12.5px; }
table.tbl.compact th { padding: 9px 10px; }
table.tbl.compact td { padding: 10px 10px; }
table.tbl.compact .cell-title { max-width: 150px; font-size: 12.5px; }
table.tbl.compact .cell-sub { max-width: 150px; }
table.tbl.compact .badge { height: 20px; padding: 0 6px; }
.cell-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-title { font-weight: 600; color: var(--text); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.cell-sub { color: var(--faint); font-size: 11.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 11.5px; }
code.mono { white-space: nowrap; }

/* ---------------------- 自动上下线（列表快捷编辑） ---------------------- */
.auto-chip {
  display: inline-flex; flex-direction: column; gap: 1px; align-items: flex-start;
  max-width: 152px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; text-align: left; transition: all 0.15s;
}
.auto-chip:hover { border-color: #d4d9e2; box-shadow: 0 2px 8px -2px rgba(16, 24, 40, 0.12); }
.auto-chip .ac-mode { font-size: 11.5px; font-weight: 700; color: var(--ink-2); display: block; white-space: nowrap; }
.auto-chip .ac-sub {
  font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 136px;
}
.auto-chip.plain { color: var(--faint); background: #fcfcfd; }
.auto-chip.plain .ac-mode { color: var(--muted); }
.auto-chip.on { background: #f6fef9; border-color: #abefc6; }
.auto-chip.on .ac-mode { color: #067647; }
.auto-chip.off { background: #f9fafb; }
.auto-chip.danger { background: #fef3f2; border-color: #fecdca; }
.auto-chip.danger .ac-mode { color: #b42318; }
.auto-chip.danger .ac-sub { color: #b42318; }
.mini-select {
  height: 28px; width: 58px; padding: 0 4px 0 8px; border: 1px solid var(--line);
  border-radius: 7px; background: #fff; font-size: 12px; font-weight: 600; color: var(--text); cursor: pointer;
}
.mini-select:hover { border-color: #d4d9e2; }

.auto-editor { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fcfcfd; }
.auto-editor .auto-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 12px; }
.auto-editor .auto-modes .chip-tab { justify-content: center; padding: 0 6px; }
.auto-editor .auto-pane.hidden { display: none; }
.auto-editor .field { margin-bottom: 12px; }
.auto-editor .f-label { font-size: 12px; }
.range-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.range-row .select { height: 34px; width: 106px; padding-left: 9px; font-variant-numeric: tabular-nums; }
.range-row .range-sep { font-size: 12px; color: var(--faint); }
.auto-mode-hint { padding-top: 10px; border-top: 1px dashed var(--line); }
.auto-usage {
  display: flex; align-items: center; gap: 6px; margin-top: 12px; padding: 10px 12px;
  border-radius: 10px; background: #fff7ed; border: 1px solid #fed7aa;
  font-size: 12px; color: #b54708;
}
.auto-usage b { font-weight: 700; }

/* -------------------------------- badges ------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
  border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: #f2f4f7; color: var(--muted);
}
.badge .bdot { width: 5px; height: 5px; border-radius: 99px; background: currentColor; }
.badge.green { background: var(--green-soft); color: #067647; }
.badge.amber { background: var(--amber-soft); color: #b54708; }
.badge.red { background: var(--red-soft); color: #b42318; }
.badge.blue { background: var(--blue-soft); color: #175cd3; }
.badge.violet { background: #f4f3ff; color: #5925dc; }
.badge.gray { background: #f2f4f7; color: #475467; }
.badge.outline { background: #fff; border: 1px solid var(--line); color: var(--muted); }
.pf-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: #475467; white-space: nowrap; }
.pf-dot { width: 7px; height: 7px; border-radius: 2.5px; flex: none; }

/* 首页：分平台消耗 */
.pf-spend { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.pfs-head, .pfs-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px 40px 62px; align-items: center; gap: 6px; }
.pfs-head { font-size: 10.5px; color: var(--faint); padding: 2px 6px 6px; }
.pfs-head span:not(:first-child) { text-align: right; }
.pfs-row { padding: 6px; border-radius: 7px; font-size: 11.5px; color: #344054; }
.pfs-row:hover { background: #fafbfc; }
.pfs-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.pfs-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* -------------------------------- forms -------------------------------- */
.field { margin-bottom: 18px; }
.field > label, .f-label {
  display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); margin-bottom: 7px;
}
.f-label .req { color: var(--brand); }
.f-hint { font-size: 11.5px; color: var(--faint); line-height: 1.55; margin-top: 6px; display: flex; gap: 4px; }
.f-hint svg { flex: none; margin-top: 1px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid #e2e6ee; background: #fff; border-radius: 9px;
  padding: 0 11px; height: 38px; font-size: 13px; color: var(--text); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s; font-family: inherit;
}
.textarea { height: auto; padding: 9px 11px; line-height: 1.6; resize: vertical; min-height: 78px; }
.input::placeholder, .textarea::placeholder { color: #b3bccb; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(242, 69, 107, 0.1); }
.select {
  appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.input-group { display: flex; align-items: center; gap: 8px; }
.input-group .input { flex: 1; }
.input-suffix { position: relative; }
.input-suffix .input { padding-right: 52px; }
.input-suffix .suffix { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--faint); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { padding: 4px 0 2px; }
.form-section + .form-section { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 20px; }
.form-section-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.form-section-title::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--brand-grad); }
.form-section-title .opt, .f-label .opt { font-weight: 500; font-size: 11px; color: var(--faint); letter-spacing: 0; }
/* 平台小圆点：绿色=回传已配置，空心=未配置 */
.pst { width: 5px; height: 5px; border-radius: 99px; border: 1px solid #d0d5dd; background: transparent; margin-left: 1px; flex: none; }
.pst.on { border-color: #12B76A; background: #12B76A; }

.checkbox, .radio {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: #344054;
  cursor: pointer; user-select: none;
}
.checkbox input, .radio input { appearance: none; margin: 0; width: 16px; height: 16px; border: 1.5px solid #cfd6e0; background: #fff; cursor: pointer; flex: none; transition: all 0.15s; }
.checkbox input { border-radius: 4.5px; }
.radio input { border-radius: 99px; }
.checkbox input:checked { background: var(--brand); border-color: var(--brand); background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; }
.radio input:checked { border-color: var(--brand); border-width: 5px; }
.check-group { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 12px 22px; }
.radio-card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.radio-card {
  display: flex; align-items: center; gap: 7px; border: 1px solid #e4e8ef; border-radius: 9px;
  padding: 9px 10px; cursor: pointer; font-size: 12.5px; color: #344054; background: #fff;
  transition: all 0.15s; user-select: none;
}
.radio-card:hover { border-color: #cfd6e0; }
.radio-card input { display: none; }
.radio-card .rdot { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.radio-card:has(input:checked) { border-color: var(--brand); background: #fff7f8; box-shadow: 0 0 0 3px rgba(242, 69, 107, 0.07); }
.radio-card:has(input:checked)::after {
  content: ""; margin-left: auto; width: 14px; height: 14px; flex: none;
  background: var(--brand); border-radius: 99px;
  -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 9px no-repeat;
  mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 9px no-repeat;
}

/* switch */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track {
  width: 34px; height: 19px; border-radius: 99px; background: #dfe3ea; position: relative;
  transition: background 0.18s; flex: none;
}
.switch .track::after {
  content: ""; position: absolute; left: 2px; top: 2px; width: 15px; height: 15px;
  background: #fff; border-radius: 99px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.2); transition: transform 0.18s;
}
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(15px); }
.switch.small .track { width: 30px; height: 17px; }
.switch.small .track::after { width: 13px; height: 13px; }
.switch.small input:checked + .track::after { transform: translateX(13px); }

/* -------------------------------- tabs --------------------------------- */
.segmented { display: inline-flex; background: #eef0f5; border-radius: 9px; padding: 3px; gap: 2px; }
.segmented button {
  border: none; background: transparent; height: 28px; padding: 0 12px; border-radius: 7px;
  font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; transition: all 0.15s;
}
.segmented button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1); }

.tabs { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs button {
  border: none; background: none; padding: 11px 12px; font-size: 13px; font-weight: 600; color: var(--muted);
  cursor: pointer; position: relative;
}
.tabs button.on { color: var(--text); }
.tabs button.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--brand); border-radius: 2px; }

.chip-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-tab {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; font-size: 12px; font-weight: 600; color: var(--muted);
  cursor: pointer; transition: all 0.15s;
}
.chip-tab:hover { border-color: #d4d9e2; color: var(--ink-2); }
.chip-tab.on { background: #fff1f4; border-color: #ffd0da; color: var(--brand-deep); }
/* 平台选择：等宽排布，避免最后一行只剩一颗 */
.plat-chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-bottom: 2px; }
.plat-chips .chip-tab { justify-content: center; padding: 0 8px; height: 32px; }
@media (max-width: 760px) { .plat-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.chip-tab .cnt { font-size: 10.5px; background: rgba(16, 24, 40, 0.06); padding: 1px 5px; border-radius: 99px; color: var(--muted); }
.chip-tab.on .cnt { background: rgba(242, 69, 107, 0.12); color: var(--brand-deep); }

/* ------------------------------- toolbar ------------------------------- */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; border-bottom: 1px solid var(--line-soft); background: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
}
.toolbar .grow { flex: 1; }
.search { position: relative; width: 220px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 15px; height: 15px; }
.search .input { padding-left: 32px; height: 34px; font-size: 12.5px; background: #fbfcfd; }
.search .input:focus { background: #fff; }
.filter-select { height: 34px; font-size: 12.5px; width: auto; min-width: 108px; padding-right: 28px; }

/* ------------------------------- drawer -------------------------------- */
.overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.42); z-index: 100;
  opacity: 0; pointer-events: none; transition: opacity 0.22s; backdrop-filter: blur(2px);
}
.overlay.show { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 760px; max-width: 94vw;
  background: #fff; z-index: 101; display: flex; flex-direction: column;
  transform: translateX(102%); transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: -24px 0 60px -24px rgba(15, 23, 42, 0.35);
}
.drawer.show { transform: none; }
.drawer-head { padding: 18px 22px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 12px; flex: none; }
.drawer-head h3 { font-size: 16px; font-weight: 700; }
.drawer-head .d-sub { color: var(--faint); font-size: 12px; margin-top: 5px; line-height: 1.5; }
.drawer-head .close { margin-left: auto; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px 12px; }
.drawer-foot { flex: none; padding: 14px 22px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; background: #fff; }
.drawer-foot .foot-note { font-size: 11.5px; color: var(--faint); margin-right: auto; }

/* -------------------------------- modal -------------------------------- */
.modal {
  position: fixed; z-index: 101; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(0.98);
  width: 520px; max-width: calc(100vw - 32px); background: #fff; border-radius: 16px;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all 0.2s ease;
  max-height: calc(100vh - 80px); display: flex; flex-direction: column;
}
.modal.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal-head { padding: 20px 22px 0; }
.modal-head h3 { font-size: 16px; font-weight: 700; }
.modal-head p { color: var(--muted); font-size: 12.5px; margin-top: 6px; line-height: 1.6; }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-foot { padding: 0 22px 20px; display: flex; gap: 10px; justify-content: flex-end; }

/* -------------------------------- toast -------------------------------- */
.toasts { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 8px; background: #101828; color: #fff;
  padding: 10px 15px; border-radius: 10px; font-size: 12.5px; font-weight: 500;
  box-shadow: var(--shadow-lg); animation: toastIn 0.22s ease; max-width: 92vw;
}
.toast.success { background: #054f31; }
.toast.error { background: #7a271a; }
.toast svg { width: 15px; height: 15px; flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* -------------------------------- misc --------------------------------- */
.empty { padding: 48px 24px; text-align: center; }
.empty .e-ico { width: 52px; height: 52px; border-radius: 14px; background: #f6f7fb; display: grid; place-items: center; margin: 0 auto 14px; color: #b3bccb; }
.empty h4 { font-size: 14px; font-weight: 650; }
.empty p { color: var(--faint); font-size: 12.5px; margin-top: 7px; line-height: 1.6; }
.empty .btn { margin-top: 16px; }

.copy-field {
  display: flex; align-items: center; gap: 8px; background: #f8fafc; border: 1px solid var(--line);
  border-radius: 8px; padding: 5px 5px 5px 11px; font-size: 12px; color: var(--muted); min-width: 0;
}
.copy-field span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.copy-field button { flex: none; display: inline-flex; align-items: center; gap: 4px; border: none; background: #fff; border-radius: 6px; height: 25px; padding: 0 9px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; box-shadow: var(--shadow-sm); white-space: nowrap; }
.copy-field button:hover { color: var(--brand-deep); }

.avatar-stack { display: flex; align-items: center; }
.avatar-stack .avatar { border: 2px solid #fff; margin-left: -7px; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-stack .more { margin-left: -7px; width: 26px; height: 26px; border-radius: 99px; background: #f2f4f7; border: 2px solid #fff; display: grid; place-items: center; font-size: 10px; color: var(--muted); font-weight: 600; }

.progress { height: 6px; border-radius: 99px; background: #f0f2f6; overflow: hidden; min-width: 70px; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: var(--brand-grad); }

.page-fade { animation: fadeUp 0.3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.skeleton { background: linear-gradient(90deg, #f1f3f7 25%, #f8f9fc 37%, #f1f3f7 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.menu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60;
  animation: fadeUp 0.16s ease;
}
.menu-pop .menu-item { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; font-size: 12.5px; color: #344054; cursor: pointer; }
.menu-pop .menu-item:hover { background: #f8fafc; }
.menu-pop .menu-item svg { width: 15px; height: 15px; color: var(--faint); }
.menu-pop .menu-sep { height: 1px; background: var(--line-soft); margin: 5px 4px; }
.menu-pop .menu-note { padding: 10px 10px 4px; font-size: 11px; color: var(--faint); }

.hint-list { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: #f8fafc; border-radius: 10px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.hint-list b { color: var(--ink-2); font-weight: 600; }
/* 带图标的说明行：图标与文字同一行 */
.hint-list > div:has(> svg) { display: flex; align-items: flex-start; gap: 7px; }
.hint-list > div > svg { flex: none; margin-top: 2px; }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat-strip.six { grid-template-columns: repeat(6, 1fr); }

.hourly { display: flex; align-items: flex-end; gap: 6px; padding: 4px 2px 0; }
.hourly .hour-col { flex: 1; min-width: 0; }
.hourly .hour-bar-wrap { height: 118px; display: flex; align-items: flex-end; }
.hourly .hour-bar { display: block; width: 100%; min-height: 2px; border-radius: 4px 4px 2px 2px; transition: height 0.3s ease; }
.hourly .hour-label { height: 16px; margin-top: 5px; font-size: 9px; color: var(--faint); text-align: center; }
.mini-stat { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.mini-stat .ms-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.mini-stat .ms-val { font-size: 22px; font-weight: 750; margin-top: 7px; letter-spacing: -0.5px; }
.mini-stat .ms-val small { font-size: 11.5px; color: var(--faint); font-weight: 500; margin-left: 3px; }

.visitor-tbl { font-size: 11px; }
.visitor-tbl th, .visitor-tbl td { padding: 9px 8px; white-space: nowrap; }
.visitor-tbl th { font-size: 10.5px; }
.visitor-tbl .badge { padding: 2px 7px; font-size: 10px; }
.visitor-tbl .url-cell { display: inline-block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; cursor: help; }
.visitor-tbl .url-cell:hover { color: var(--brand-deep, #7A5AF8); }

/* ------------------------------- responsive ---------------------------- */
@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2-1 { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-strip.six { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; }
  .sidebar.open { transform: none; box-shadow: 28px 0 60px -30px rgba(15, 23, 42, 0.5); }
  .main { margin-left: 0; }
  .topbar .menu-btn { display: grid; }
  .page { padding: 20px 20px 48px; }
  .topbar { padding: 0 18px; }
  /* 窄屏顶栏放不下面包屑：隐藏，页面内已有主标题 */
  .topbar .crumb { display: none; }
}
@media (max-width: 760px) {
  .kpi-grid, .stat-strip { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi .k-val { font-size: 24px; }
  .kpi .spark { display: none; }
  .kpi .k-foot { font-size: 10.5px; }
  .cell-title { max-width: 170px; }
  .cell-sub { max-width: 180px; }
  table.tbl th, table.tbl td { padding-left: 12px; padding-right: 12px; }
  .page-head h1 { font-size: 19px; }
  .grid-1-1 { grid-template-columns: 1fr; }
  .search { width: 100%; }
  .toolbar { padding: 10px 12px; }
  .radio-card-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .donut-wrap { flex-direction: column; align-items: stretch; }
  .user-chip .u-name, .user-chip .u-role { display: none; }
  .drawer { width: 100vw; max-width: 100vw; }
  .drawer-body { padding: 16px; }
  .card-body { padding: 16px; }
  body.drawer-open { overflow: hidden; }
}

/* -------------------------------- boot --------------------------------- */
.boot {
  position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #f5f6fa; gap: 14px; z-index: 500;
}
.boot-logo { filter: drop-shadow(0 16px 30px rgba(242, 69, 107, 0.28)); animation: floaty 2.6s ease-in-out infinite; }
.boot-title { font-size: 19px; font-weight: 800; letter-spacing: 4px; color: #101828; }
.boot-bar { width: 120px; height: 3px; border-radius: 99px; background: #e9ecf2; overflow: hidden; }
.boot-bar i { display: block; width: 40%; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #f2456b, #ff8a5c); animation: bootslide 1.1s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes bootslide { 0% { transform: translateX(-110%); } 100% { transform: translateX(320%); } }

/* -------------------------------- pager -------------------------------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.pager .p-info { font-size: 12px; color: var(--faint); }
.pager .p-btns { display: flex; align-items: center; gap: 4px; }
.p-btn {
  min-width: 28px; height: 28px; border-radius: 7px; border: 1px solid transparent; background: transparent;
  color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; display: inline-grid; place-items: center; padding: 0 6px;
}
.p-btn:hover:not(:disabled) { background: #f2f4f7; color: var(--text); }
.p-btn.on { background: #fff1f4; color: var(--brand-deep); border-color: #ffd3dd; }
.p-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.p-dots { color: var(--faint); padding: 0 4px; font-size: 12px; }

/* -------------------------------- bar rows ------------------------------ */
.bar-row { display: flex; align-items: center; gap: 10px; font-size: 12px; margin-bottom: 11px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-row .b-name { width: 92px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; }
.bar-row .b-track { flex: 1; height: 7px; background: #f2f4f7; border-radius: 99px; overflow: hidden; }
.bar-row .b-track i { display: block; height: 100%; border-radius: 99px; }
.bar-row .b-val { width: 46px; text-align: right; color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }

/* ------------------------------ utility -------------------------------- */
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.fs-12 { font-size: 12px; } .fs-13 { font-size: 13px; }
.grow { flex: 1; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--line-soft); margin: 16px 0; }
.text-green { color: #067647; } .text-red { color: #b42318; } .text-amber { color: #b54708; }
@media (max-width: 760px) { .hide-sm { display: none !important; } }

/* ------------------------------ link cards ------------------------------ */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.link-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px 10px; background: #fff;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.link-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); border-color: #e0e5ee; }
.lc-top { display: flex; align-items: center; gap: 8px; }
.lc-time { margin-left: auto; font-size: 10.5px; color: var(--faint); }
.lc-name { font-size: 15px; font-weight: 650; margin: 11px 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-short { height: 32px; }
.lc-url { font-size: 11.5px; color: var(--faint); margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-acq { display: inline-flex; align-items: center; gap: 4px; margin-top: 7px; font-size: 10.5px; color: #6941C6; }
.lc-stats { display: flex; gap: 22px; margin: 13px 0 11px; padding: 11px 0; border-top: 1px dashed #eef0f5; border-bottom: 1px dashed #eef0f5; }
.lc-stats > div { display: flex; flex-direction: column; gap: 3px; }
.lc-stats b { font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.lc-stats span { font-size: 10.5px; color: var(--faint); }
.lc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lc-actions { display: flex; align-items: center; gap: 0; }

/* ----------------------------- agent picker ----------------------------- */
.agent-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-height: 230px; overflow: auto; padding: 2px; }
.agent-opt { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 9px; cursor: pointer; font-size: 12px; user-select: none; }
.agent-opt input { display: none; }
.agent-opt b { display: block; font-size: 12px; font-weight: 600; }
.agent-opt i { display: block; font-style: normal; font-size: 10.5px; color: var(--faint); margin-top: 1px; }
.agent-opt em { font-style: normal; font-size: 10px; color: #98A2B3; margin-left: auto; }
.agent-opt em.on { color: #067647; }
.agent-opt.on, .agent-opt:has(input:checked) { border-color: #ffd0da; background: #fff7f8; box-shadow: 0 0 0 3px rgba(242, 69, 107, .05); }

/* --------------------------- integration rows --------------------------- */
.int-row { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); align-items: flex-start; }
.int-row:last-child { border-bottom: none; }
.int-logo { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; flex: none; letter-spacing: .2px; }
.int-main { flex: 1; min-width: 0; }
.int-name { font-size: 13.5px; font-weight: 650; }
.int-sub { font-size: 11.5px; color: var(--faint); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.int-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tag-mini { font-size: 10.5px; color: #667085; background: #f5f6fa; border-radius: 5px; padding: 2px 6px; }
.int-error { margin-top: 7px; font-size: 11.5px; color: #B42318; display: flex; gap: 4px; align-items: center; }
.int-del { color: #B42318; }
.int-del:hover { background: #fef3f2; border-color: #fecdca; }
.int-side { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; flex: none; }
.int-meta { font-size: 10.5px; color: #98A2B3; }

/* ------------------------------- code/tests ----------------------------- */
.code-block {
  background: #0f172a; color: #d6e0f0; border-radius: 10px; padding: 14px; font-size: 11.5px;
  line-height: 1.65; overflow: auto; font-family: "SFMono-Regular", Consolas, monospace;
  margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; max-height: 280px;
}
.test-step { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.test-step:last-child { border-bottom: none; }
.ts-ico { width: 20px; height: 20px; border-radius: 99px; display: grid; place-items: center; flex: none; margin-top: 1px; }
.ts-ico.ok { background: #ecfdf3; color: #067647; }
.ts-ico.bad { background: #fef3f2; color: #b42318; }
.ts-title { font-size: 12.5px; font-weight: 600; }
.ts-detail { font-size: 11.5px; color: #98a2b3; margin-top: 2px; line-height: 1.5; }
.ts-ms { font-size: 10.5px; color: #98a2b3; font-variant-numeric: tabular-nums; }
.success-icon { width: 48px; height: 48px; border-radius: 14px; background: #ecfdf3; color: #067647; display: grid; place-items: center; margin: 0 auto 12px; }
.help-link { color: #d92f55; font-weight: 600; }

@media (max-width: 760px) {
  .link-grid { grid-template-columns: 1fr; }
  .agent-picker { grid-template-columns: 1fr; }
  .int-row { flex-wrap: wrap; }
  .int-side { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
}

/* ------------------------------- leads --------------------------------- */
.lead-filterbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.lead-summary { margin-left: auto; display: flex; gap: 16px; font-size: 11.5px; color: var(--faint); }
.lead-summary b { color: var(--ink-2); font-weight: 650; }
.lead-tbl { min-width: 1080px; }
.lead-tbl td { padding: 12px 14px; vertical-align: middle; }
.pass-clock { font-size: 16px; font-weight: 750; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .2px; }
.pass-date { margin-top: 3px; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.sort-mark { color: var(--primary); font-size: 11px; margin-left: 2px; }
.duration-pill { display: inline-block; padding: 2px 7px; border-radius: 6px; background: #f2f4f7; color: #475467; font-size: 11.5px; white-space: nowrap; }
.gender { display: inline-block; margin-left: 5px; font-size: 9.5px; color: #667085; background: #f2f4f7; border-radius: 3px; padding: 0 4px; font-weight: 500; vertical-align: 1px; }
.tag-inline { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 600; color: #5925dc; background: #f4f3ff; border-radius: 4px; padding: 1px 5px; vertical-align: 1px; }

.lead-hero { display: flex; align-items: center; gap: 13px; padding: 14px; border-radius: 13px; background: linear-gradient(140deg, #fff6f8, #fff); border: 1px solid #ffe8ec; }
.lead-name { font-size: 16px; font-weight: 750; }
.lead-sub { font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.detail-section { margin-top: 22px; }
.detail-title { font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.detail-title::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--brand-grad); }

.timeline { padding: 4px 0 0 4px; }
.tl-item { display: flex; gap: 11px; position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: 9px; top: 20px; bottom: 0; width: 1.5px; background: #eef0f5; }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 19px; height: 19px; border-radius: 99px; border: 1.5px solid #e4e8ef; background: #fff; display: grid; place-items: center; flex: none; color: #fff; margin-top: 1px; z-index: 1; }
.tl-item.done .tl-dot { background: var(--brand); border-color: var(--brand); }
.tl-title { font-size: 12.5px; font-weight: 600; color: #344054; }
.tl-desc { font-size: 11.5px; color: var(--faint); margin-top: 3px; line-height: 1.5; }
.tl-time { font-size: 10.5px; color: #98a2b3; white-space: nowrap; margin-left: 10px; font-variant-numeric: tabular-nums; }

.kv-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.kv-list > div { display: flex; gap: 14px; padding: 10px 13px; font-size: 12px; border-bottom: 1px solid var(--line-soft); background: #fff; }
.kv-list > div:last-child { border-bottom: none; }
.kv-list > div span { width: 92px; flex: none; color: var(--faint); }
.kv-list > div b { color: var(--ink-2); font-weight: 500; min-width: 0; word-break: break-all; }
.log-item { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.log-item:last-child { border-bottom: none; padding-bottom: 0; }

/* ------------------------------- settings ------------------------------ */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 14px; align-items: start; }
.profile-row { display: flex; align-items: center; gap: 14px; }
.plan-card { border-radius: 13px; padding: 16px; background: linear-gradient(150deg, #fff7f9, #fff); border: 1px solid #ffe4ea; }
.plan-name { font-size: 15px; font-weight: 700; margin-top: 12px; }
.plan-price { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; margin-top: 6px; }
.plan-price span { font-size: 11.5px; color: var(--faint); font-weight: 500; }
.plan-list { list-style: none; padding: 0; margin: 14px 0 16px; display: flex; flex-direction: column; gap: 9px; }
.plan-list li { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #475467; }
.plan-list li svg { color: #12b76a; }

/* ------------------------------- wecom --------------------------------- */
.corp-card { display: flex; align-items: center; gap: 13px; }
.corp-list { padding: 4px 16px; }
.corp-item { display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.corp-item:last-child { border-bottom: 0; }
.corp-main { flex: 1; min-width: 0; }
.corp-title-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.corp-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex-wrap: wrap; max-width: 260px; }
.corp-caps { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.corp-cap { display: inline-flex; align-items: center; gap: 3px; height: 21px; padding: 0 7px; border-radius: 5px; font-size: 10.5px; }
.corp-cap.on { color: #067647; background: #ecfdf3; }
.corp-cap.off { color: #98a2b3; background: #f2f4f7; }
.check-corp { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.check-corp:last-of-type { border-bottom: 0; }
.check-corp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: 12px; }
.auth-mode-tabs { display: flex; gap: 4px; background: #f2f4f7; border-radius: 9px; padding: 3px; margin-bottom: 16px; }
.auth-mode-tab { flex: 1; height: 32px; border: 0; border-radius: 7px; background: transparent; color: #667085; font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer; }
.auth-mode-tab.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(16,24,40,.08); }
.real-checks { display: grid; gap: 6px; margin-top: 12px; }
.real-check { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 8px; border: 1px solid transparent; }
.real-check.ok { background: #ecfdf3; border-color: #abefc6; }
.real-check.bad { background: #fef3f2; border-color: #fecdca; }
.real-check-ico { width: 18px; height: 18px; border-radius: 99px; display: grid; place-items: center; flex: none; margin-top: 1px; }
.real-check.ok .real-check-ico { background: #067647; color: #fff; }
.real-check.bad .real-check-ico { background: #b42318; color: #fff; }
.real-check b { display: block; font-size: 11.5px; color: #344054; }
.real-check span { display: block; font-size: 10.5px; color: #667085; margin-top: 2px; word-break: break-all; }
.scan-status { display: none; margin-top: 10px; padding: 9px 10px; border-radius: 8px; font-size: 11.5px; line-height: 1.55; }
.scan-status.ok { display: block; background: #ecfdf3; color: #067647; }
.scan-status.bad { display: block; background: #fef3f2; color: #b42318; }
.acq-list { padding: 4px 16px; }
.acq-item { display: flex; align-items: flex-start; gap: 13px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.acq-item:last-child { border-bottom: 0; }
.acq-icon { width: 42px; height: 42px; border-radius: 12px; background: #eef4ff; color: #175CD3; display: grid; place-items: center; flex: none; }
.acq-main { flex: 1; min-width: 0; }
.acq-link { margin-top: 6px; font-size: 10.5px; color: #475467; background: #f8fafc; border: 1px solid var(--line-soft); border-radius: 6px; padding: 5px 8px; word-break: break-all; }
.acq-members { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.acq-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex-wrap: wrap; max-width: 270px; }
.acq-picked { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -2px 0 12px; padding: 9px 10px; background: #f8fafc; border: 1px solid var(--line-soft); border-radius: 8px; }
.acq-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; max-height: 190px; overflow: auto; }
.acq-pick .check { font-size: 12px; display: flex; align-items: center; gap: 5px; }
.acq-link-list { display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.acq-link-row { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 900px) {
  .acq-item { flex-wrap: wrap; }
  .acq-actions { max-width: none; width: 100%; justify-content: flex-start; }
}
@media (max-width: 900px) {
  .corp-item { flex-wrap: wrap; }
  .corp-actions { max-width: none; width: 100%; justify-content: flex-start; }
}
.corp-logo { width: 50px; height: 50px; border-radius: 14px; background: linear-gradient(135deg, #07c160, #2fd67f); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 8px 18px -10px rgba(7, 193, 96, 0.8); }
.corp-name { font-size: 16px; font-weight: 700; }
.corp-id { font-size: 11px; color: var(--faint); margin-top: 4px; }
.corp-meta { font-size: 10.5px; color: #98a2b3; margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.cap-title { font-size: 12px; font-weight: 650; color: var(--ink-2); margin-bottom: 10px; }
.cap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cap-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .cap-grid-4 { grid-template-columns: 1fr 1fr; } }
.cap-item { display: flex; gap: 9px; align-items: flex-start; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; }
.cap-item b { font-size: 12px; font-weight: 600; display: block; }
.cap-item span.cap-ico { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.cap-ico.on { background: #ecfdf3; color: #067647; }
.cap-ico.off { background: #f2f4f7; color: #98a2b3; }
.cap-item div > span { font-size: 10.5px; color: var(--faint); display: block; margin-top: 3px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 7px 0; }
.check-row svg { width: 15px; height: 15px; padding: 2px; border-radius: 99px; background: #f2f4f7; color: #98a2b3; box-sizing: content-box; }
.check-row.done { color: var(--ink-2); }
.check-row.done svg { background: #ecfdf3; color: #067647; }
.corp-stat { font-size: 21px; font-weight: 750; letter-spacing: -0.5px; }
.corp-stat-label { font-size: 10.5px; color: var(--faint); margin-top: 3px; }

.auth-hero { text-align: center; padding: 34px 20px 26px; max-width: 560px; margin: 0 auto; }
.ah-art { width: 72px; height: 72px; border-radius: 20px; background: linear-gradient(135deg, #07c160, #2fd67f); color: #fff; display: grid; place-items: center; margin: 0 auto 18px; box-shadow: 0 18px 36px -18px rgba(7, 193, 96, 0.8); }
.auth-hero h3 { font-size: 19px; font-weight: 750; letter-spacing: -0.3px; }
.auth-hero p { font-size: 12.5px; color: var(--muted); line-height: 1.8; margin-top: 10px; }
.ah-steps { display: flex; justify-content: center; gap: 26px; margin: 22px 0 26px; }
.ah-steps div { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 11px; color: var(--faint); }
.ah-steps b { width: 26px; height: 26px; border-radius: 99px; background: #ecfdf3; color: #067647; display: grid; place-items: center; font-size: 11.5px; }
.qr-panel { text-align: center; padding: 4px 0 0; }
.qr-box { width: 168px; height: 168px; margin: 0 auto; border: 1px solid var(--line); border-radius: 14px; padding: 12px; position: relative; background: #fff; }
.qr-grid { display: grid; grid-template-columns: repeat(11, 1fr); gap: 2px; width: 100%; height: 100%; }
.qr-grid i { background: transparent; border-radius: 1px; }
.qr-grid i.on { background: #101828; }
.qr-grid i:nth-child(1), .qr-grid i:nth-child(11) { background: #101828; }
.qr-logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 9px; background: #07c160; color: #fff; display: grid; place-items: center; border: 3px solid #fff; }
.qr-hint { font-size: 11.5px; color: var(--faint); margin-top: 12px; }
.qr-box.scanning::after {
  content: ""; position: absolute; left: 10px; right: 10px; height: 2px; top: 12px;
  background: linear-gradient(90deg, transparent, #07c160, transparent); animation: scanline 1.4s ease-in-out infinite;
}
@keyframes scanline { 0% { top: 12px; } 100% { top: 154px; } }

/* ------------------------------- bulk bar ------------------------------ */
.bulk-bar { display: flex; align-items: center; gap: 8px; padding: 9px 16px; background: #fff8f9; border-bottom: 1px solid #ffe4ea; }

@media (max-width: 1100px) {
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .lead-filterbar { gap: 8px; }
  .lead-summary { margin-left: 0; }
  .cap-grid { grid-template-columns: 1fr; }
  .ah-steps { gap: 14px; }
}

/* ------------------------------ vivo oauth ----------------------------- */
.vivo-oauth { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.oauth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin-top: 12px; }
.oauth-grid .full { grid-column: 1 / -1; }
@media (max-width: 760px) { .oauth-grid { grid-template-columns: 1fr; } }

/* ------------------------------ vivo wizard ---------------------------- */
.btn-vivo { background: #eef2ff; color: #2b46d9; border: 1px solid #dbe2ff; }
.btn-vivo:hover:not(:disabled) { background: #e4e9ff; border-color: #cbd5ff; }
.vivo-wizard { min-height: 250px; }
.wz-steps { display: flex; gap: 8px; margin-bottom: 20px; }
.wz-step { flex: 1; display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 10px; background: #f7f8fb; color: #98a2b3; font-size: 12px; font-weight: 600; }
.wz-step b { width: 20px; height: 20px; border-radius: 99px; background: #e9ecf2; display: grid; place-items: center; font-size: 11px; flex: none; }
.wz-step.on { background: #eef2ff; color: #2b46d9; }
.wz-step.on b { background: #2b46d9; color: #fff; }
.wz-step.done { color: #067647; background: #f3fdf8; }
.wz-step.done b { background: #12b76a; color: #fff; }
.wz-note { display: flex; gap: 8px; align-items: flex-start; background: #f8fafc; border: 1px solid #eef0f5; border-radius: 10px; padding: 11px 13px; font-size: 12px; color: #667085; line-height: 1.6; margin-bottom: 16px; }
.wz-note svg { flex: none; margin-top: 2px; color: #415fff; }
.wz-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.wz-wait { text-align: center; padding: 14px 8px 4px; }
.wz-spin { display: flex; justify-content: center; margin-bottom: 10px; }
.wz-spin .spin { width: 26px; height: 26px; border-color: #e4e8ef; border-top-color: #415fff; }
.wz-wait h4 { font-size: 15px; font-weight: 700; margin: 0 0 8px; }
.wz-wait p { font-size: 12.5px; color: #667085; line-height: 1.75; max-width: 440px; margin: 0 auto 14px; }
.wz-code { margin-top: 16px; text-align: left; background: #f8fafc; border: 1px dashed #e4e8ef; border-radius: 10px; padding: 12px; }
.wz-test { padding-top: 4px; }
.wz-test-head { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: #667085; padding: 4px 0 14px; }
.wz-test-head .spin { width: 16px; height: 16px; border-color: #e4e8ef; border-top-color: #415fff; }
.wz-result-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.wz-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.wz-badge.ok { background: #ecfdf3; color: #067647; }
.wz-badge.bad { background: #fef3f2; color: #b42318; }

.wz-retry { margin-top: 14px; padding: 12px; border: 1px dashed #e4e8ef; border-radius: 10px; background: #f8fafc; }

/* ------------------------------- admin --------------------------------- */
.admin-login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(900px 500px at 20% 0%, #3b1220 0%, transparent 55%), radial-gradient(800px 500px at 90% 20%, #101b3d 0%, transparent 60%), #080d18;
}
.admin-login-card { width: 430px; max-width: 100%; background: #fff; border-radius: 18px; padding: 30px 30px 24px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.admin-login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.admin-logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg,#F2456B,#FF8A5C); color: #fff; flex: none; }
.admin-brand-name { font-size: 15px; font-weight: 750; color: var(--ink); }
.admin-brand-sub { font-size: 9.5px; letter-spacing: 1.1px; color: var(--faint); margin-top: 2px; }
.admin-login-card h1 { font-size: 25px; margin: 0 0 8px; letter-spacing: -.4px; }
.admin-login-sub { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin: 0 0 20px; }
.admin-login-card .field { margin-bottom: 14px; }
.admin-login-card .field label { display: block; font-size: 12px; font-weight: 650; color: #344054; margin-bottom: 6px; }
.admin-login-card .error-box { background: #fef3f2; color: #b42318; border: 1px solid #fee4e2; border-radius: 8px; padding: 8px 10px; font-size: 12px; margin-bottom: 12px; }
.admin-login-hint { margin-top: 16px; text-align: center; font-size: 11px; color: #98a2b3; }
.admin-shell { min-height: 100vh; display: flex; background: #f6f7f9; }
.admin-side { width: 218px; flex: none; background: #0f172a; color: #fff; padding: 20px 14px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.admin-side-brand { display: flex; align-items: center; gap: 9px; padding: 2px 6px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-side-brand .admin-brand-name { color: #fff; }
.admin-side-brand .admin-brand-sub { color: #7c8aa5; }
.admin-nav-label { font-size: 9.5px; letter-spacing: 1.2px; color: #64748b; padding: 18px 8px 8px; text-transform: uppercase; }
.admin-nav-item { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; font-size: 12.5px; color: #cbd5e1; }
.admin-nav-item.on { background: rgba(242,69,107,.16); color: #ffd7df; font-weight: 650; }
.admin-side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; }
.admin-me { font-size: 12px; font-weight: 650; color: #e2e8f0; padding: 4px 6px 10px; }
.admin-me span { display: block; font-size: 10.5px; color: #7c8aa5; font-weight: 400; margin-top: 2px; }
.admin-side-foot .btn { color: #cbd5e1; border-color: rgba(255,255,255,.12); }
.admin-main { flex: 1; min-width: 0; padding: 24px 28px 40px; }
.admin-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.admin-top h1 { font-size: 22px; margin: 0 0 5px; letter-spacing: -.3px; }
.admin-top p { margin: 0; font-size: 12px; color: var(--muted); }
.admin-range-note { font-size: 10.5px; color: var(--faint); background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; white-space: nowrap; }
.admin-perm-badge { display: inline-flex; align-items: center; gap: 4px; height: 25px; padding: 0 8px; border-radius: 99px; font-size: 10.5px; font-weight: 650; border: 1px solid transparent; }
.admin-perm-badge.on { color: #067647; background: #ecfdf3; border-color: #abefc6; }
.admin-perm-badge.off { color: #b42318; background: #fef3f2; border-color: #fecdca; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.admin-stat { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 13px 15px; }
.admin-stat span { display: block; font-size: 10.5px; color: var(--faint); margin-bottom: 6px; }
.admin-stat b { font-size: 22px; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.admin-stat small { font-size: 10px; color: var(--faint); font-weight: 500; margin-left: 3px; }
.admin-range { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; margin-bottom: 14px; }
.admin-presets { display: flex; gap: 4px; }
.admin-preset { border: 0; background: transparent; color: #667085; font-size: 12px; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-family: inherit; }
.admin-preset:hover { background: #f2f4f7; }
.admin-preset.on { background: #fff1f4; color: var(--brand-deep); font-weight: 650; }
.admin-custom-range { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--faint); }
.admin-custom-range .input { height: 31px; width: 130px; font-size: 11.5px; }
.admin-range-hint { margin-left: auto; font-size: 10.5px; color: #98a2b3; }
.admin-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.admin-card-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); }
.admin-card-head h3 { margin: 0; font-size: 13px; }
.admin-card-head span { font-size: 10.5px; color: var(--faint); }
.admin-table { min-width: 1080px; }
.admin-table td { padding: 10px 12px; }
.admin-table th { white-space: nowrap; }
@media (max-width: 980px) {
  .admin-side { width: 64px; padding: 14px 8px; }
  .admin-side-brand > div:last-child, .admin-nav-label, .admin-nav-item span, .admin-me, .admin-side-foot .btn { display: none; }
  .admin-side-brand { justify-content: center; border: 0; padding: 4px 0 14px; }
  .admin-nav-item { justify-content: center; }
  .admin-main { padding: 18px 14px 32px; }
  .admin-stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .admin-top { flex-direction: column; }
}
