:root {
  --bg: #f5f7fb;
  --bg-2: #eef1f8;
  --surface: #ffffff;
  --surface-2: #f3f5fa;
  --border: #dde3ef;
  --text: #141a28;
  --muted: #5d6a85;
  --accent: #2f6fec;
  --accent-2: #6a4cf0;
  --accent-text: #ffffff;
  --ok: #2fbf71;
  --warn: #f0a83a;
  --bad: #ef5a5a;
  --code-bg: #f1f4fa;
  --shadow: 0 8px 24px rgba(20, 30, 60, .08);
  --radius: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre, .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; font-size: 13px; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding: 32px 0 56px; }

/* ------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; color: #fff;
}
.brand-mark svg { width: 18px; height: 18px; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a { color: var(--muted); padding: 6px 12px; border-radius: 8px; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav a.active { color: var(--text); background: var(--surface-2); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 6px 10px; cursor: pointer; }

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 16px 12px;
  }
  .nav.open { display: flex; }
}

/* ------------------------------------------------------------ footer */

.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; padding: 20px 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 16px; }
.site-footer a { color: var(--muted); }

/* ------------------------------------------------------------ hero */

.hero { text-align: center; padding: 24px 0 32px; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.15; margin: 0 0 12px; letter-spacing: -.02em; }
.hero h1 .grad { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 17px; margin: 0 auto; max-width: 620px; }
.hero-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--muted);
}
.pill strong { color: var(--text); font-weight: 600; }

/* ------------------------------------------------------------ toolbar / filters */

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.chip:hover { color: var(--text); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.search {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 8px 12px; font: inherit; min-width: 220px;
}
@media (max-width: 640px) { .search { width: 100%; min-width: 0; } }

/* ------------------------------------------------------------ cards */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.server-card { display: flex; flex-direction: column; gap: 14px; transition: border-color .15s, transform .15s; }
.server-card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); transform: translateY(-2px); }
.server-head { display: flex; align-items: center; gap: 12px; }
.flag { width: 36px; height: 26px; border-radius: 4px; object-fit: cover; background: var(--surface-2); flex: none; box-shadow: 0 0 0 1px var(--border); }
.server-name { font-weight: 650; font-size: 16px; line-height: 1.25; }
.server-sub { color: var(--muted); font-size: 13px; }
.status { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.dot.bad { background: var(--bad); }

.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 13px; }
.meta div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.meta span { display: block; color: var(--muted); font-size: 12px; }
.meta strong { font-weight: 600; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.tag.ssh { color: #1f6fd1; }
.tag.vmess { color: #7448d6; }
.tag.vless { color: #13865f; }
.tag.trojan { color: #c75a1c; }
.tag.wireguard { color: #b0245a; }

.quota { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.quota-row { display: flex; justify-content: space-between; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.bar.low > i { background: var(--warn); }
.bar.empty > i { background: var(--bad); }

.server-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: 10px; padding: 9px 16px; font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; white-space: nowrap; transition: filter .15s, background .15s;
}
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; }
.btn.danger { color: var(--bad); }
.btn.small { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.block { width: 100%; }
.server-actions .btn { flex: 1; }

/* ------------------------------------------------------------ forms */

.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 860px) { .layout-2 { grid-template-columns: 1fr; } }

.page-title { margin: 0 0 6px; font-size: 26px; letter-spacing: -.01em; }
.page-sub { margin: 0 0 24px; color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label, .label { font-weight: 600; font-size: 14px; }
.hint { color: var(--muted); font-size: 12px; }
.err { color: var(--bad); font-size: 13px; min-height: 0; }
.input, select.input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font: inherit;
}
.input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 1px; border-color: var(--accent); }
.input.invalid { border-color: var(--bad); }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .addon {
  display: flex; align-items: center; padding: 0 12px; background: var(--surface-2);
  border: 1px solid var(--border); border-left: 0; border-radius: 0 10px 10px 0; color: var(--muted); font-size: 14px; white-space: nowrap;
}
.input-group .addon.btn { border-radius: 0 10px 10px 0; font-weight: 500; }

.seg { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
@media (max-width: 480px) { .seg { grid-template-columns: repeat(3, 1fr); } }
.seg button {
  border: 1px solid var(--border); background: var(--bg-2); color: var(--muted);
  border-radius: 10px; padding: 10px 6px; font: inherit; font-weight: 600; cursor: pointer;
}
.seg button.active { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 15%, var(--bg-2)); }
.seg button:disabled { opacity: .35; cursor: not-allowed; }

.captcha-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.captcha-row img { width: 180px; height: 60px; border-radius: 8px; border: 1px solid var(--border); }
.captcha-row .input { max-width: 160px; letter-spacing: .2em; }
.icon-btn { background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); border-radius: 8px; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

.alert { border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 16px; border: 1px solid; }
.alert.error { background: color-mix(in srgb, var(--bad) 12%, transparent); border-color: color-mix(in srgb, var(--bad) 40%, transparent); color: var(--text); }
.alert.info { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.alert.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }

.side-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.side-list li { display: flex; justify-content: space-between; gap: 12px; }
.side-list span { color: var(--muted); }
.side h3 { margin: 0 0 14px; font-size: 15px; }
.side + .side { margin-top: 16px; }

/* ------------------------------------------------------------ result */

.result-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.result-head h2 { margin: 0; font-size: 22px; }
.result-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 22px 0 10px; font-weight: 600; }

.kv { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.kv-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border); }
.kv-row:first-child { border-top: 0; }
.kv-row:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.kv-row .k { color: var(--muted); font-size: 13px; }
.kv-row .v { overflow-wrap: anywhere; font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; font-size: 13px; }
@media (max-width: 600px) {
  .kv-row { grid-template-columns: minmax(0, 1fr) auto; }
  .kv-row .k { grid-column: 1 / -1; margin-bottom: -6px; }
}
.copy { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 7px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.copy:hover { color: var(--text); border-color: var(--accent); }
.copy.done { color: var(--ok); border-color: var(--ok); }

.qr-box { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.conf { margin: 14px 0 0; padding: 12px 14px; background: var(--code-bg); border: 1px solid var(--border); border-radius: 12px; overflow-x: auto; white-space: pre; }
.qr-box img { width: 200px; height: 200px; background: #fff; padding: 8px; border-radius: 12px; }

/* ------------------------------------------------------------ prose (guide / rules) */

.prose { max-width: 780px; }
.prose h1 { font-size: 30px; margin: 0 0 8px; letter-spacing: -.01em; }
.prose h2 { font-size: 20px; margin: 32px 0 10px; }
.prose h3 { font-size: 16px; margin: 20px 0 6px; }
.prose p, .prose li { color: color-mix(in srgb, var(--text) 85%, var(--muted)); }
.prose code { background: var(--code-bg); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--border); }
.prose ol, .prose ul { padding-left: 22px; }
.prose li { margin: 4px 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }

.rule-list { list-style: none; padding: 0; counter-reset: r; display: flex; flex-direction: column; gap: 10px; }
.rule-list li { counter-increment: r; display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin: 0; }
.rule-list li::before { content: counter(r); flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }

/* ------------------------------------------------------------ features / steps */

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 48px; }
.feature h3 { margin: 10px 0 4px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }
.feature .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.feature .ico svg { width: 20px; height: 20px; }

/* ------------------------------------------------------------ table (admin) */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--border); white-space: nowrap; }
thead th { border-top: 0; background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.badge.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.badge.off { background: var(--surface-2); color: var(--muted); }
.badge.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.stat span { color: var(--muted); font-size: 12px; display: block; }
.stat strong { font-size: 24px; font-variant-numeric: tabular-nums; }

.login-box { max-width: 380px; margin: 40px auto; }

/* ------------------------------------------------------------ misc */

.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; border: 1px dashed var(--border); border-radius: var(--radius); }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); height: 250px; border: 1px solid var(--border); }
@keyframes shimmer { to { background-position: -200% 0; } }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.notfound { text-align: center; padding: 60px 0; }
.notfound .code { font-size: 88px; font-weight: 800; line-height: 1; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ------------------------------------------------------------ admin data panel */

:root {
  --c-ssh: #2a78d6;
  --c-vmess: #eb6834;
  --c-vless: #1baf7a;
  --c-trojan: #eda100;
  --c-wireguard: #c4306b;
  --grid: #e8ecf3;
  --axis: #c9d0dd;
  --good: #006300;
  --critical: #d03b3b;
}

.admin-top { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.admin-top .page-title { margin: 0; }
.admin-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg-sm { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.seg-sm button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 7px; cursor: pointer; }
.seg-sm button.active { background: var(--surface-2); color: var(--text); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs .count:empty { display: none; }
.tabs button { flex: none; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs .count { font-size: 11px; background: var(--surface-2); border-radius: 99px; padding: 1px 7px; margin-left: 6px; color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile .t-label { color: var(--muted); font-size: 12px; }
.tile .t-value { font-size: 26px; font-weight: 650; line-height: 1.2; }
.tile .t-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); min-height: 24px; }
.tile.lead .t-value { font-size: 44px; }
.delta { font-weight: 600; }
.delta.up { color: var(--good); }
.delta.down { color: var(--critical); }
.spark { width: 96px; height: 24px; flex: none; }

.meter { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 18%, var(--surface-2)); overflow: hidden; margin-top: 6px; }
.meter > i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.meter.warn > i { background: var(--warn); }
.meter.full > i { background: var(--critical); }
.meter.inline { width: 90px; display: inline-block; vertical-align: middle; margin: 0 8px 0 0; }

.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
@media (max-width: 860px) { .charts { grid-template-columns: 1fr; } }
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; min-width: 0; position: relative; }
.chart-card.wide { grid-column: 1 / -1; }
.chart-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.chart-head h3 { margin: 0; font-size: 15px; }
.chart-head p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.chart-body { position: relative; }
.chart-body.loading { opacity: .5; transition: opacity .2s; }
.chart-body svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-body svg text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart-body svg .grid { stroke: var(--grid); stroke-width: 1; }
.chart-body svg .base { stroke: var(--axis); stroke-width: 1; }
.chart-body svg .hit { fill: transparent; cursor: default; }
.chart-body svg .hit:hover + g, .chart-body svg .col:hover { filter: brightness(1.15); }
.chart-body svg .lbl { fill: var(--text); font-weight: 600; }
.chart-body svg .cell:hover { stroke: var(--text); stroke-width: 1.5; }
.chart-body svg .guide { stroke: var(--muted); stroke-width: 1; pointer-events: none; }

.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw-ssh { background: var(--c-ssh); }
.sw-vmess { background: var(--c-vmess); }
.sw-vless { background: var(--c-vless); }
.sw-trojan { background: var(--c-trojan); }
.sw-wireguard { background: var(--c-wireguard); }

.viz-tip {
  position: fixed; z-index: 60; pointer-events: none; min-width: 140px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow);
  padding: 8px 10px; font-size: 12px; opacity: 0; transition: opacity .1s;
}
.viz-tip.show { opacity: 1; }
.viz-tip .tt-title { color: var(--muted); margin-bottom: 4px; }
.viz-tip .tt-row { display: flex; align-items: center; gap: 8px; }
.viz-tip .tt-row i { width: 12px; height: 2px; border-radius: 1px; flex: none; }
.viz-tip .tt-row b { font-weight: 650; min-width: 28px; text-align: right; font-variant-numeric: tabular-nums; }
.viz-tip .tt-row span { color: var(--muted); }
.viz-tip .tt-total { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }

.heat-scale { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.heat-scale i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filters .input { width: auto; padding: 7px 10px; font-size: 13px; }
.filters .search { min-width: 180px; padding: 7px 10px; font-size: 13px; }
.bulk { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-left: auto; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
th.sorted::after { content: " ▾"; }
th.sorted.asc::after { content: " ▴"; }
td input[type=checkbox], th input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; }
tr.selected td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 2px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pager .btns { display: flex; gap: 6px; }
.proto { display: inline-flex; align-items: center; gap: 6px; }
.proto i { width: 8px; height: 8px; border-radius: 50%; }
.link-btn { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }
