/* ============ 基础 ============ */
:root {
  --bg: #f3f5fa;
  --card: #ffffff;
  --ink: #101828;
  --ink-2: #344054;
  --muted: #7b8798;
  --line: #e7ebf3;
  --line-2: #eef1f7;
  --brand: #2f6bff;
  --brand-2: #5b8bff;
  --brand-soft: #eef4ff;
  --ok: #12a150;
  --ok-soft: #e8f8ef;
  --warn: #e48a00;
  --warn-soft: #fff5e5;
  --danger: #e5484d;
  --danger-soft: #fdeeee;
  --purple: #7a5af8;
  --purple-soft: #f1edff;
  --slate-soft: #f1f4f9;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 24px 60px rgba(16, 24, 40, 0.18);
  --sidebar-w: 232px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
::selection { background: #d7e3ff; }

/* ============ 登录 ============ */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(900px 500px at 12% 8%, #1e3a8a 0%, transparent 60%),
    radial-gradient(700px 500px at 92% 92%, #0e7490 0%, transparent 55%), #0a1220;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 22px;
  padding: 36px 32px 28px;
  box-shadow: var(--shadow-lg);
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-brand .mark { width: 42px; height: 42px; border-radius: 12px; }
.auth-brand h1 { font-size: 19px; }
.auth-brand p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.auth-hint {
  margin-top: 18px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: #2b57b7;
  font-size: 12.5px;
  line-height: 1.7;
}
.auth-hint b { font-weight: 600; }
.mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--brand) 0%, #7c3aed 120%);
  color: #fff;
  flex: none;
  box-shadow: 0 4px 12px rgba(47, 107, 255, 0.35);
}

/* ============ 布局 ============ */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  flex: none;
  position: fixed;
  inset: 0 auto 0 0;
  background: linear-gradient(180deg, #0b1424 0%, #0d1930 100%);
  color: #c7d2e4;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  z-index: 60;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 20px; }
.sidebar .brand b { color: #fff; font-size: 15px; font-weight: 650; letter-spacing: 0.2px; }
.sidebar .brand span { display: block; font-size: 11px; color: #6f819c; letter-spacing: 0.6px; }
.nav-group { margin-top: 6px; }
.nav-label {
  font-size: 10.5px;
  letter-spacing: 1.2px;
  color: #5d708c;
  padding: 10px 12px 6px;
  text-transform: uppercase;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  margin-bottom: 2px;
  border-radius: 10px;
  color: #a8b7cc;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.nav-item svg { opacity: 0.85; }
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-item.active { background: rgba(47, 107, 255, 0.18); color: #fff; }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  bottom: 11px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand-2);
}
.nav-item .nav-badge {
  margin-left: auto;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 1px 7px;
  color: #dbe6f7;
}
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.sidebar-user:hover { background: rgba(255, 255, 255, 0.06); }
.sidebar-user .name { color: #f2f6ff; font-size: 13px; line-height: 1.3; }
.sidebar-user .role { color: #6f819c; font-size: 11px; }
.sidebar-foot .logout { margin-left: auto; color: #7d8ea8; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; }
.sidebar-foot .logout:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar {
  height: 64px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar h2 { font-size: 16.5px; }
.topbar .sub { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.topbar .spacer { flex: 1; }
.topbar .quick {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.topbar .quick div { font-size: 11px; color: var(--muted); line-height: 1.4; }
.topbar .quick b { display: block; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(145deg, #2f6bff, #7c3aed);
  color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600;
}
.menu-toggle { display: none; }

.view { padding: 24px 28px 48px; flex: 1; max-width: 1560px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h3 { font-size: 20px; }
.page-head .desc { color: var(--muted); font-size: 13px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.page-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

/* ============ 卡片 / 通用 ============ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-head h4 { font-size: 14.5px; }
.card-head .more { margin-left: auto; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.card-head .more:hover { color: var(--brand); }

.grid { display: grid; gap: 16px; }
.stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.stat .ico {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
}
.stat .ico.ok { background: var(--ok-soft); color: var(--ok); }
.stat .ico.warn { background: var(--warn-soft); color: var(--warn); }
.stat .ico.purple { background: var(--purple-soft); color: var(--purple); }
.stat .label { font-size: 12.5px; color: var(--muted); }
.stat .value { font-size: 24px; font-weight: 660; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.25; }
.stat .value small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.stat .foot { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.05s, box-shadow 0.15s;
  user-select: none;
}
.btn:hover { background: #f8fafc; border-color: #d7deea; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(180deg, #3a74ff, #2f6bff);
  border-color: #2f6bff;
  color: #fff;
  box-shadow: 0 1px 2px rgba(47, 107, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn.primary:hover { background: linear-gradient(180deg, #4a80ff, #2a63f2); border-color: #2a63f2; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--slate-soft); color: var(--ink); }
.btn.danger { color: var(--danger); border-color: #f6d3d4; background: #fffafa; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn.link { border: 0; background: transparent; color: var(--brand); padding: 0 4px; height: auto; }

.input, .select, .textarea {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: #9dbaff; box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.12); }
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.65; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237b8798' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px; }
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.field .tip { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #98a2b3; pointer-events: none; }
.input-icon .input { padding-left: 34px; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 40px; }
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  padding: 0;
  border-radius: 7px;
  background: transparent;
  color: #98a2b3;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.pw-toggle:hover { background: var(--slate-soft); color: var(--ink-2); }
.pw-toggle:active { background: #e8eef7; }

/* ============ 工具栏 ============ */
.toolbar { padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar .grow { flex: 1; min-width: 180px; }
.toolbar .input, .toolbar .select { height: 36px; }
.tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--line-2); overflow-x: auto; }
.tab {
  position: relative;
  padding: 12px 12px 11px;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 550; }
.tab .count { font-size: 11px; background: var(--slate-soft); color: var(--muted); border-radius: 20px; padding: 1px 7px; }
.tab.active .count { background: var(--brand-soft); color: var(--brand); }

/* ============ 表格 ============ */
.table-wrap { overflow: auto; border-radius: 0 0 var(--radius) var(--radius); }
table.tb { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.2px; }
.tb thead th {
  position: sticky; top: 0; z-index: 2;
  background: #fafbfd;
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tb tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tb tbody tr:hover { background: #f8faff; }
.tb tbody tr:last-child td { border-bottom: 0; }
.tb .num { font-variant-numeric: tabular-nums; }
.tb .phone { font-variant-numeric: tabular-nums; letter-spacing: 0.2px; font-weight: 550; color: var(--ink); }
.tb .muted { color: var(--muted); }
.cell-main { display: flex; align-items: center; gap: 10px; }
.cell-main .avatar-sm {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 600;
  background: var(--brand-soft); color: #2b57b7;
}
.cell-main .nm { font-weight: 550; line-height: 1.35; }
.cell-main .sub { font-size: 11.5px; color: var(--muted); }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; }
.icon-btn {
  width: 30px; height: 30px; border: 1px solid transparent; background: transparent;
  border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: var(--muted);
}
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); border-color: #dbe6ff; }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); border-color: #f6d3d4; }
.check { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }

/* ============ 徽章 ============ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 500; white-space: nowrap;
  background: var(--slate-soft); color: #5b6b82;
}
.badge.public { background: var(--slate-soft); color: #667085; }
.badge.owned { background: var(--brand-soft); color: #2b57b7; }
.badge.appointment { background: var(--purple-soft); color: #6941c6; }
.badge.deal { background: var(--ok-soft); color: #0f8a45; }
.badge.invalid { background: #f2f4f7; color: #98a2b3; }
.badge.blacklist { background: var(--danger-soft); color: #c03035; }
.badge.intent-A { background: #fff1ed; color: #d94a1c; }
.badge.intent-B { background: var(--warn-soft); color: #b97a00; }
.badge.intent-C { background: var(--brand-soft); color: #2b57b7; }
.badge.intent-D { background: var(--slate-soft); color: #667085; }
.badge.soft { background: var(--slate-soft); color: #667085; }
.badge.hot { background: #fff1ed; color: #d94a1c; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ============ 分页 / 空态 ============ */
.pager { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); }
.pager .spacer { flex: 1; }
.empty { padding: 54px 20px; text-align: center; color: var(--muted); }
.empty .ico { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 14px; display: grid; place-items: center; background: var(--slate-soft); color: #98a2b3; }
.empty h4 { font-size: 14px; color: var(--ink-2); margin-bottom: 4px; }
.empty p { margin: 0; font-size: 12.5px; }
.skeleton { background: linear-gradient(90deg, #f1f4f9 25%, #f8fafc 37%, #f1f4f9 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: 8px; height: 14px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ============ 抽屉 / 弹窗 ============ */
.overlay {
  position: fixed; inset: 0; background: rgba(11, 20, 36, 0.42);
  backdrop-filter: blur(2px); z-index: 100; opacity: 0; transition: opacity 0.2s;
}
.overlay.show { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 560px; max-width: 100%;
  background: #fff; z-index: 101; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); transform: translateX(24px); opacity: 0;
  transition: transform 0.24s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.2s;
}
.drawer.show { transform: none; opacity: 1; }
.drawer-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 12px; }
.drawer-head h3 { font-size: 17px; }
.drawer-head .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.drawer-body { flex: 1; overflow: auto; padding: 18px 20px 40px; background: #fbfcfe; }
.drawer-foot { padding: 12px 20px; border-top: 1px solid var(--line); background: #fff; display: flex; gap: 8px; }

.modal {
  position: fixed; z-index: 101; left: 50%; top: 50%;
  width: 520px; max-width: calc(100vw - 32px); max-height: calc(100vh - 64px);
  transform: translate(-50%, -46%); opacity: 0; transition: transform 0.2s, opacity 0.2s;
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
}
.modal.show { transform: translate(-50%, -50%); opacity: 1; }
.modal-head { padding: 18px 20px 12px; display: flex; align-items: center; gap: 10px; }
.modal-head h3 { font-size: 16px; }
.modal-head .x { margin-left: auto; }
.modal-body { padding: 4px 20px 8px; overflow: auto; }
.modal-foot { padding: 14px 20px 18px; display: flex; gap: 8px; justify-content: flex-end; }

.toast-root { position: fixed; top: 76px; right: 18px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast {
  min-width: 200px; max-width: 360px; padding: 10px 14px; border-radius: 10px;
  background: #101828; color: #fff; font-size: 13px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 8px; animation: tin 0.18s ease;
}
.toast.ok { background: #0d7a45; }
.toast.err { background: #b42318; }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }

/* ============ 拨号面板 ============ */
.call-panel {
  background: linear-gradient(160deg, #10213f 0%, #16305c 60%, #1b3d78 100%);
  color: #fff; border-radius: 16px; padding: 18px; margin-bottom: 16px;
  box-shadow: 0 10px 24px rgba(16, 33, 63, 0.25);
}
.call-panel .who { font-size: 12.5px; color: #a9c0e4; display: flex; align-items: center; gap: 8px; }
.call-panel .num {
  font-size: 30px; font-weight: 650; letter-spacing: 1.5px; margin: 6px 0 14px;
  font-variant-numeric: tabular-nums; word-break: break-all;
}
.call-panel .acts { display: flex; gap: 8px; }
.call-panel .acts .btn { height: 38px; }
.call-panel .acts .btn.primary { background: #fff; color: #16305c; border-color: #fff; box-shadow: none; }
.call-panel .acts .btn.ghost { color: #cfe0ff; border-color: rgba(255, 255, 255, 0.18); }
.call-panel .acts .btn.ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.call-panel .hint { margin-top: 10px; font-size: 11.5px; color: #8fabd4; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.info-grid .k { font-size: 11.5px; color: var(--muted); }
.info-grid .v { font-size: 13px; color: var(--ink-2); word-break: break-all; }
.section-title { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; font-size: 12.5px; color: var(--ink-2); cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px; transition: all 0.12s;
}
.chip:hover { border-color: #b9cdff; color: var(--brand); }
.chip.on { background: var(--brand-soft); border-color: #a9c2ff; color: #2758c4; font-weight: 550; }
.chip.on.green { background: var(--ok-soft); border-color: #a9e3c2; color: #0f8a45; }
.chip.on.red { background: var(--danger-soft); border-color: #f5c2c4; color: #c03035; }
.chip.on.amber { background: var(--warn-soft); border-color: #f3d39a; color: #a86f00; }
.chip.on.purple { background: var(--purple-soft); border-color: #d6c9ff; color: #6941c6; }

/* ============ 时间轴 ============ */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 16px; }
.tl-item::before {
  content: ""; position: absolute; left: -17px; top: 5px; width: 9px; height: 9px; border-radius: 50%;
  background: #fff; border: 2px solid #c8d4e8;
}
.tl-item.good::before { border-color: var(--ok); background: var(--ok-soft); }
.tl-item.bad::before { border-color: var(--danger); background: var(--danger-soft); }
.tl-item .tl-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-item .tl-title { font-size: 13px; font-weight: 550; }
.tl-item .tl-time { font-size: 11.5px; color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }
.tl-item .tl-note { font-size: 12.5px; color: #5b6b82; margin-top: 3px; white-space: pre-wrap; word-break: break-word; }
.tl-empty { font-size: 12.5px; color: var(--muted); padding: 10px 0; }

/* ============ 统计 ============ */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding: 8px 4px 0; }
.chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; height: 100%; position: relative; }
.chart .bar-wrap { width: 100%; max-width: 30px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.chart .bar { border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #6f97ff, #2f6bff); min-height: 2px; transition: height 0.3s; }
.chart .bar.alt { background: linear-gradient(180deg, #56d29a, #12a150); }
.chart .cap { font-size: 10.5px; color: var(--muted); white-space: nowrap; margin-top: 4px; }
.chart .col:hover .bar { filter: brightness(1.05); }
.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.chart-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 5px; }

.bar-list { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 92px 1fr 44px; align-items: center; gap: 10px; font-size: 12.5px; }
.bar-row .track { height: 8px; border-radius: 6px; background: var(--slate-soft); overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #6f97ff, #2f6bff); }
.bar-row .n { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ============ 其他 ============ */
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a;
  color: #8a5a00; font-size: 13px; margin-bottom: 16px;
}
.two-col { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line-2); }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: #f9fbff; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .nm { font-size: 13.5px; font-weight: 550; }
.list-item .sub { font-size: 11.5px; color: var(--muted); }
.list-item .right { text-align: right; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.flex { display: flex; }
.gap8 { gap: 8px; }
.gap12 { gap: 12px; }
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.mb16 { margin-bottom: 16px; }
.hide { display: none !important; }
.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-ok { color: var(--ok); }
.text-sm { font-size: 12.5px; }
.dropzone {
  border: 1.5px dashed #ccd6e6; border-radius: 14px; padding: 26px; text-align: center;
  color: var(--muted); background: #fbfcff; cursor: pointer; transition: all 0.15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.dropzone b { color: var(--ink-2); }
.kv-list { display: grid; gap: 8px; }
.kv-list .row { display: flex; justify-content: space-between; font-size: 13px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); }
.kv-list .row:last-child { border-bottom: 0; }
.kv-list .k { color: var(--muted); }

.bulk {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--brand-soft);
  border-top: 1px solid #dbe6ff;
  border-bottom: 1px solid #dbe6ff;
  font-size: 12.5px;
  color: #2758c4;
}
.bulk b { font-weight: 600; }
.script-body { position: relative; }

/* ============ 响应式 ============ */
@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
  .topbar .quick { display: none; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.22s cubic-bezier(0.32, 0.72, 0, 1); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .menu-toggle { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
  .topbar { padding: 0 16px; height: 58px; }
  .topbar h2 { font-size: 15px; }
  .view { padding: 16px 14px 40px; }
  .stat { padding: 14px; }
  .stat .value { font-size: 21px; }
  .drawer { width: 100%; }
  .page-head .actions { width: 100%; margin-left: 0; }
  .hide-sm { display: none !important; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .ico { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .toolbar { padding: 12px; }
  .toolbar .grow { min-width: 100%; }
  .drawer-body { padding: 14px 14px 32px; }
  .call-panel .num { font-size: 26px; }
}
