/* ==========================================================================
   浮槎人家 CRM —— 样式表
   设计原则：信息优先、视觉降噪。全局只有一个主色按钮，其余全部走文字/次级按钮。
   ========================================================================== */

:root {
  --primary: #2f6fed;
  --primary-dark: #2058c9;
  --primary-soft: #eef4ff;
  --bg: #f5f6f8;
  --panel: #ffffff;
  --border: #e6e8ec;
  --border-strong: #d7dbe2;
  --text: #1f2430;
  --text-2: #5b6373;
  --text-3: #949aa8;
  --green: #16a34a;
  --green-soft: #eaf7ef;
  --orange: #ea8a00;
  --orange-soft: #fff5e6;
  --red: #dc2626;
  --red-soft: #fdeded;
  --purple: #7c3aed;
  --purple-soft: #f3eefe;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 12px rgba(16, 24, 40, .04);
  --shadow-lg: 0 8px 32px rgba(16, 24, 40, .12);
  --sidebar-w: 208px;
  --header-h: 56px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
input, select, textarea, button { font-family: inherit; font-size: 14px; color: var(--text); }
.hidden { display: none !important; }
.mono { font-variant-numeric: tabular-nums; }

/* ===================== 登录页 ===================== */
#auth-view {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef3fb 0%, #f7f8fa 45%, #eaf1ff 100%);
  z-index: 100;
}
.auth-card {
  width: 400px; background: #fff; border-radius: 14px; padding: 36px 36px 30px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  background: linear-gradient(135deg, var(--primary), #5b93f5); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
}
.auth-logo h1 { font-size: 17px; margin: 0 0 3px; font-weight: 600; }
.auth-logo p { font-size: 12px; color: var(--text-3); margin: 0; }
.auth-card h2 { font-size: 15px; margin: 0 0 16px; font-weight: 600; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); outline: none; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 111, 237, .1);
}
.form-msg { font-size: 13px; color: var(--red); min-height: 18px; margin: 4px 0 8px; }
.auth-tip {
  margin-top: 18px; padding: 12px; background: var(--bg); border-radius: var(--radius-sm);
  font-size: 12px; color: var(--text-2); line-height: 1.7;
}
.auth-tip b { color: var(--text); }

/* ===================== 主框架 ===================== */
#app { display: flex; flex-direction: column; height: 100vh; }
.topbar {
  height: var(--header-h); flex: none; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 16px 0 0; z-index: 20;
}
.topbar .brand {
  width: var(--sidebar-w); flex: none; display: flex; align-items: center; gap: 9px;
  padding-left: 16px; height: 100%;
}
.topbar .brand .logo-mark { width: 28px; height: 28px; font-size: 14px; border-radius: 8px; }
.topbar .brand span { font-size: 15px; font-weight: 600; letter-spacing: .2px; }
.global-search { position: relative; width: 320px; }
.global-search input {
  width: 100%; padding: 7px 12px 7px 32px; border: 1px solid var(--border);
  border-radius: 18px; background: var(--bg); outline: none; transition: all .15s;
}
.global-search input:focus { background: #fff; border-color: var(--primary); width: 360px; }
.global-search svg { position: absolute; left: 11px; top: 8px; opacity: .45; }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 8px; border: none; background: transparent;
  cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-2);
  position: relative;
}
.icon-btn:hover { background: var(--bg); color: var(--text); }
.icon-btn .badge {
  position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--red); color: #fff; font-size: 10px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.user-chip {
  display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px;
  border-radius: 18px; cursor: pointer; border: 1px solid transparent;
}
.user-chip:hover { background: var(--bg); border-color: var(--border); }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft);
  color: var(--primary-dark); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex: none;
}
.user-chip .uname { font-size: 13px; }
.user-chip .urole { font-size: 11px; color: var(--text-3); }

.body-wrap { flex: 1; display: flex; min-height: 0; }
.sidebar {
  width: var(--sidebar-w); flex: none; background: #fff; border-right: 1px solid var(--border);
  overflow-y: auto; padding: 10px 8px 20px;
}
.nav-group { margin-bottom: 6px; }
.nav-group-title {
  font-size: 11px; color: var(--text-3); padding: 10px 10px 5px; letter-spacing: .5px;
  font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 7px;
  cursor: pointer; color: var(--text-2); font-size: 13.5px; margin-bottom: 1px;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--bg); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.nav-item svg { flex: none; opacity: .8; }
.nav-item .count {
  margin-left: auto; font-size: 11px; background: var(--bg); color: var(--text-2);
  padding: 1px 6px; border-radius: 8px; font-weight: 500;
}
.nav-item.active .count { background: #fff; color: var(--primary-dark); }

.content { flex: 1; min-width: 0; overflow-y: auto; padding: 18px 22px 60px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h2 { font-size: 19px; margin: 0; font-weight: 600; }
.page-head .desc { font-size: 12.5px; color: var(--text-3); margin-left: 2px; }
.page-head .spacer { flex: 1; }

/* ===================== 按钮 ===================== */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: #fff;
  cursor: pointer; color: var(--text); font-size: 13px; transition: all .13s; white-space: nowrap;
}
.btn:hover { border-color: var(--text-3); background: #fafbfc; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 500; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-danger { color: var(--red); border-color: #f3d4d4; }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.link-btn {
  background: none; border: none; color: var(--primary); cursor: pointer; padding: 0 4px;
  font-size: 13px;
}
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--red); }

/* 下拉菜单 */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute; top: calc(100% + 4px); right: 0; min-width: 168px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 5px; z-index: 60; display: none;
}
.dropdown-menu.show { display: block; }
.dropdown-menu.left { right: auto; left: 0; }
.dropdown-menu button {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border: none;
  background: none; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; color: var(--text);
}
.dropdown-menu button:hover { background: var(--bg); }
.dropdown-menu button.danger { color: var(--red); }
.dropdown-menu .divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ===================== 卡片与统计 ===================== */
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.card-head {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.card-head h3 { font-size: 14.5px; margin: 0; font-weight: 600; }
.card-head .spacer { flex: 1; }
.card-head .sub { font-size: 12px; color: var(--text-3); }
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.stat {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.stat .label { font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }
.stat .value { font-size: 23px; font-weight: 650; letter-spacing: -.3px; line-height: 1.1; }
.stat .value small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 2px; }
.stat .foot { font-size: 11.5px; color: var(--text-3); margin-top: 7px; }
.stat.accent { background: linear-gradient(135deg, #f7faff, #fff); border-color: #dfe8fb; }
.stat .value.pos { color: var(--green); }
.stat .value.neg { color: var(--red); }

/* ===================== 表格 ===================== */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; font-weight: 600; color: var(--text-2); font-size: 12.5px;
  padding: 10px 12px; background: #fafbfc; border-bottom: 1px solid var(--border);
  white-space: nowrap; position: sticky; top: 0; z-index: 2;
}
table.data td {
  padding: 10px 12px; border-bottom: 1px solid #f2f3f5; vertical-align: middle;
}
table.data tbody tr:hover { background: #fafbfd; }
table.data tbody tr.selected { background: var(--primary-soft); }
table.data td.nowrap, table.data th.nowrap { white-space: nowrap; }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .row-actions { display: flex; gap: 2px; align-items: center; white-space: nowrap; }
table.data input[type=checkbox] { cursor: pointer; width: 15px; height: 15px; accent-color: var(--primary); }

.cell-main { font-weight: 550; color: var(--text); }
.cell-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.clickable { cursor: pointer; }
.clickable:hover .cell-main { color: var(--primary); }

.empty { padding: 46px 20px; text-align: center; color: var(--text-3); font-size: 13px; }
.empty svg { opacity: .35; margin-bottom: 10px; }

.pager {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2);
}
.pager .spacer { flex: 1; }
.pager button {
  border: 1px solid var(--border-strong); background: #fff; border-radius: var(--radius-sm);
  padding: 5px 11px; cursor: pointer;
}
.pager button:disabled { opacity: .45; cursor: not-allowed; }

/* ===================== 标签与徽章 ===================== */
.tag-chip {
  display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 4px;
  font-size: 11.5px; line-height: 18px; margin: 1px 3px 1px 0; white-space: nowrap;
  background: #f1f3f5; color: var(--text-2);
}
.tag-chip.blue { background: #eaf2ff; color: #1d5fd0; }
.tag-chip.green { background: var(--green-soft); color: #127a37; }
.tag-chip.orange { background: var(--orange-soft); color: #a56100; }
.tag-chip.red { background: var(--red-soft); color: #b91c1c; }
.tag-chip.purple { background: var(--purple-soft); color: #6d28d9; }
.tag-chip.gray { background: #f1f3f5; color: var(--text-2); }

.badge2 {
  display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; line-height: 18px;
  background: #f1f3f5; color: var(--text-2); white-space: nowrap;
}
.badge2.blue { background: #eaf2ff; color: #1d5fd0; }
.badge2.green { background: var(--green-soft); color: #127a37; }
.badge2.orange { background: var(--orange-soft); color: #a56100; }
.badge2.red { background: var(--red-soft); color: #b91c1c; }
.badge2.purple { background: var(--purple-soft); color: #6d28d9; }

.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; }
.dot.green { background: var(--green); } .dot.orange { background: var(--orange); }
.dot.red { background: var(--red); } .dot.blue { background: var(--primary); }

/* ===================== 筛选栏 ===================== */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.search-inline { position: relative; }
.search-inline input {
  padding: 7px 12px 7px 31px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); width: 230px; outline: none; background: #fff;
}
.search-inline input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,237,.1); }
.search-inline svg { position: absolute; left: 10px; top: 8px; opacity: .4; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 5px 11px; border-radius: 15px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; font-size: 12.5px; color: var(--text-2);
}
.chip:hover { border-color: var(--text-3); }
.chip.active { background: var(--primary-soft); border-color: #bcd3fb; color: var(--primary-dark); font-weight: 600; }

/* ===================== 抽屉 ===================== */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(17, 24, 39, .32); z-index: 80;
  opacity: 0; transition: opacity .2s;
}
.drawer-mask.show { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 460px; max-width: 94vw; background: #fff;
  z-index: 81; box-shadow: -8px 0 32px rgba(16,24,40,.14); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .24s cubic-bezier(.32,.72,.35,1);
}
.drawer.show { transform: translateX(0); }
.drawer.wide { width: 620px; }
.drawer-head {
  flex: none; padding: 15px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.drawer-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.drawer-head .spacer { flex: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px; }
.drawer-foot {
  flex: none; padding: 12px 18px; border-top: 1px solid var(--border);
  display: flex; gap: 8px; justify-content: flex-end; background: #fafbfc;
}

/* ===================== 表单 ===================== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .field { margin-bottom: 0; }
.form-grid .field label .req { color: var(--red); margin-left: 2px; }
.drawer .field textarea, .form-grid textarea { resize: vertical; min-height: 74px; }
.hint { font-size: 12px; color: var(--text-3); margin-top: 5px; line-height: 1.6; }
.hint.warn { color: var(--orange); }

/* ===================== 详情面板 ===================== */
.detail-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.detail-tabs button {
  border: none; background: none; padding: 9px 13px; cursor: pointer; font-size: 13.5px;
  color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.detail-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 9px 12px; font-size: 13px; }
.kv .k { color: var(--text-3); }
.kv .v { color: var(--text); word-break: break-all; }

.timeline { position: relative; padding-left: 20px; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 5px; bottom: 5px; width: 1px; background: var(--border);
}
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before {
  content: ''; position: absolute; left: -19px; top: 5px; width: 7px; height: 7px;
  border-radius: 50%; background: #fff; border: 2px solid var(--primary);
}
.tl-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tl-head .who { font-weight: 600; }
.tl-head .when { color: var(--text-3); font-size: 12px; margin-left: auto; }
.tl-body { font-size: 13px; color: var(--text-2); margin-top: 4px; line-height: 1.65; }

/* ===================== Toast / 弹窗 ===================== */
#toast-box {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200;
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
}
.toast {
  background: #1f2430; color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 13px;
  box-shadow: var(--shadow-lg); animation: toastIn .2s ease; max-width: 460px;
}
.toast.ok { background: #15803d; }
.toast.err { background: #b91c1c; }
.toast.warn { background: #b45309; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.modal-mask {
  position: fixed; inset: 0; background: rgba(17,24,39,.35); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); width: 520px;
  max-width: 100%; max-height: 88vh; display: flex; flex-direction: column;
  animation: modalIn .18s ease;
}
.modal.wide { width: 720px; }
@keyframes modalIn { from { opacity: 0; transform: scale(.97) translateY(6px); } to { opacity: 1; transform: none; } }
.modal-head { padding: 15px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.modal-head h3 { margin: 0; font-size: 15.5px; }
.modal-head .spacer { flex: 1; }
.modal-body { padding: 18px; overflow-y: auto; flex: 1; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: #fafbfc; border-radius: 0 0 12px 12px; }

/* ===================== 图表 ===================== */
.chart { width: 100%; display: block; overflow: visible; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-top: 10px; }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.chart-empty { padding: 40px; text-align: center; color: var(--text-3); font-size: 13px; }

.funnel-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 13px; }
.funnel-row .fname { width: 68px; color: var(--text-2); flex: none; }
.funnel-row .fbar-wrap { flex: 1; background: #f2f4f7; border-radius: 4px; height: 22px; overflow: hidden; }
.funnel-row .fbar { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #6ea0f8, var(--primary)); transition: width .4s; }
.funnel-row .fval { width: 52px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); flex: none; }

.progress-bar { height: 6px; background: #f0f1f4; border-radius: 3px; overflow: hidden; }
.progress-bar > i { display: block; height: 100%; background: var(--primary); border-radius: 3px; }
.progress-bar.green > i { background: var(--green); }
.progress-bar.orange > i { background: var(--orange); }
.progress-bar.red > i { background: var(--red); }

/* ===================== 其它 ===================== */
.rank-num {
  display: inline-flex; align-items: center; justify-content: center; width: 21px; height: 21px;
  border-radius: 50%; background: #f1f3f5; color: var(--text-2); font-size: 11.5px; font-weight: 700;
}
.rank-num.r1 { background: #fff2d6; color: #b45309; }
.rank-num.r2 { background: #eef1f5; color: #4b5563; }
.rank-num.r3 { background: #fbeadf; color: #a3521c; }

.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.split-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1180px) { .split-2, .split-3 { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  :root { --sidebar-w: 168px; }
  .global-search { width: 180px; }
  .global-search input:focus { width: 200px; }
}

.dept-tree { font-size: 13.5px; }
.dept-node { padding: 6px 8px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.dept-node:hover { background: var(--bg); }
.dept-node.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.dept-node .mcount { margin-left: auto; font-size: 11.5px; color: var(--text-3); }

.settings-row {
  display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid #f2f3f5;
}
.settings-row:last-child { border-bottom: none; }
.settings-row .slabel { width: 168px; flex: none; font-size: 13.5px; }
.settings-row .sdesc { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.settings-row .sctrl { flex: 1; display: flex; align-items: center; gap: 8px; }
.settings-row input[type=text], .settings-row input[type=number], .settings-row select {
  padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  width: 190px; outline: none;
}
.settings-row input:focus, .settings-row select:focus { border-color: var(--primary); }

.code-box {
  background: #f7f8fa; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; font-family: ui-monospace, Consolas, monospace; font-size: 12px;
  color: var(--text-2); word-break: break-all; line-height: 1.7;
}
.switch { position: relative; width: 38px; height: 21px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; background: #d5d8de; border-radius: 12px; cursor: pointer; transition: .2s;
}
.switch .slider::before {
  content: ''; position: absolute; width: 17px; height: 17px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; transition: .2s;
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(17px); }

.loading { padding: 40px; text-align: center; color: var(--text-3); font-size: 13px; }
.spinner {
  width: 22px; height: 22px; border: 2px solid #e3e6eb; border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.section-title { font-size: 14px; font-weight: 600; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.muted { color: var(--text-3); font-size: 12.5px; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; } .mb12 { margin-bottom: 12px; } .mt12 { margin-top: 12px; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-wrap { flex-wrap: wrap; }
.text-right { text-align: right; }
.big-num { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
