/* StatMonitor - stile dashboard */
:root {
  color-scheme: light;
  --page: #f4f4f1;
  --surface: #fcfcfb;
  --surface-2: #f3f3f0;
  --text: #0b0b0b;
  --text-2: #52514e;
  --muted: #7a7873;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --border-strong: rgba(11, 11, 11, 0.18);
  --accent: #2a78d6;
  --accent-ink: #1c5cab;
  --accent-wash: rgba(42, 120, 214, 0.10);
  --good: #0ca30c;
  --good-ink: #006300;
  --warning: #fab219;
  --warning-ink: #8a5a00;
  --critical: #d03b3b;
  --critical-ink: #a32222;
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 2px 8px rgba(11, 11, 11, 0.04);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #222220;
    --text: #f0efec;
    --text-2: #c3c2b7;
    --muted: #93918b;
    --grid: #2c2c2a;
    --axis: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.18);
    --accent: #3987e5;
    --accent-ink: #86b6ef;
    --accent-wash: rgba(57, 135, 229, 0.16);
    --good-ink: #0ca30c;
    --warning-ink: #fab219;
    --critical-ink: #e66767;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #222220;
  --text: #f0efec;
  --text-2: #c3c2b7;
  --muted: #93918b;
  --grid: #2c2c2a;
  --axis: #383835;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --accent: #3987e5;
  --accent-ink: #86b6ef;
  --accent-wash: rgba(57, 135, 229, 0.16);
  --good-ink: #0ca30c;
  --warning-ink: #fab219;
  --critical-ink: #e66767;
  --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 14px/1.5 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 13px; font-weight: 600; color: var(--text-2); }
.ico { display: inline-block; vertical-align: -3px; flex: none; }
.muted { color: var(--muted); }
.sec { color: var(--text-2); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.inline { display: inline; margin: 0; }
.hide { display: none !important; }

/* ---------- Barra superiore ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar-in { max-width: 1440px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); font-size: 15px; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); display: flex; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav a { color: var(--text-2); padding: 7px 12px; border-radius: 8px; font-weight: 500; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav a.on { background: var(--accent-wash); color: var(--accent-ink); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.wrap { max-width: 1440px; width: 100%; margin: 0 auto; padding: 24px 16px 40px; flex: 1; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 16px; }
.foot a { color: var(--muted); }

/* ---------- Bottoni e moduli ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; background: var(--accent); color: #fff;
  padding: 8px 14px; border-radius: 8px; font: 500 14px/1.2 var(--font); cursor: pointer;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: transparent; color: var(--critical-ink); border-color: var(--border); }
.btn-danger:hover { background: rgba(208, 59, 59, 0.08); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.icon-btn { background: none; border: 0; color: var(--text-2); padding: 6px; border-radius: 8px; cursor: pointer; display: flex; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
input[type=text], input[type=password], input[type=search], input[type=date], input[type=number], input[type=email], select, textarea {
  font: 14px/1.4 var(--font); color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 8px; padding: 8px 10px; width: 100%; max-width: 100%;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { resize: vertical; min-height: 70px; }
label { font-weight: 500; }
.field { margin-bottom: 16px; }
.field > label { display: block; margin-bottom: 6px; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.check, .field > label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 3px; }
.field > label.radio-card, .radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; font-weight: 400; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
.radio-card input { margin-top: 3px; }
.radio-card b { display: block; font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.alert { padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; border: 1px solid var(--border); background: var(--surface); }
.alert-ok { border-color: rgba(12, 163, 12, 0.35); background: rgba(12, 163, 12, 0.07); }
.alert-err { border-color: rgba(208, 59, 59, 0.35); background: rgba(208, 59, 59, 0.07); }
.alert-warn { border-color: rgba(250, 178, 25, 0.5); background: rgba(250, 178, 25, 0.09); }

/* ---------- Intestazione pagina ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .sub { color: var(--text-2); margin-top: 4px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 13px; margin-bottom: 6px; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 4px 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); display: inline-block; flex: none; }
.dot.pulse { box-shadow: 0 0 0 0 rgba(12, 163, 12, 0.5); animation: pulse 2s infinite; }
.dot.off { background: var(--axis); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(12, 163, 12, 0.45); } 70% { box-shadow: 0 0 0 7px rgba(12, 163, 12, 0); } 100% { box-shadow: 0 0 0 0 rgba(12, 163, 12, 0); } }
@media (prefers-reduced-motion: reduce) { .dot.pulse { animation: none; } }

/* ---------- Card ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head .meta { color: var(--muted); font-size: 12.5px; }
.cols { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols > .card + .card { margin-top: 0; }
.span-2 { grid-column: span 2; }

/* ---------- KPI ---------- */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.kpi-label { color: var(--text-2); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.kpi-value { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; margin-top: 4px; line-height: 1.15; }
.kpi-foot { font-size: 12px; color: var(--muted); margin-top: 4px; }
.delta-up { color: var(--good-ink); }
.delta-down { color: var(--critical-ink); }
.hero { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.hero-main { min-width: 180px; }
.hero-value { font-size: 56px; font-weight: 650; letter-spacing: -0.03em; line-height: 1; margin-top: 6px; }
.hero-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; flex: 1; min-width: 260px; }
.hero-tiles .kpi { box-shadow: none; background: var(--surface-2); border-color: transparent; }

/* ---------- Tabelle ---------- */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.r, .tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tbody tr.link { cursor: pointer; }
.tbl tbody tr.link:hover td { background: var(--surface-2); }
.tbl .page { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .title-sub { display: block; color: var(--muted); font-size: 12px; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-name { font-weight: 600; color: var(--text); }
.site-dom { display: block; color: var(--muted); font-size: 12px; }
.big-num { font-size: 15px; font-weight: 600; }
.cell-stack { line-height: 1.3; }
.cell-stack small { display: block; color: var(--muted); font-size: 12px; }

/* ---------- Badge ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; padding: 2px 8px 2px 6px; border-radius: 99px; border: 1px solid var(--border); white-space: nowrap; color: var(--text-2); }
.badge-human { color: var(--good-ink); border-color: rgba(12, 163, 12, 0.35); }
.badge-suspect { color: var(--warning-ink); border-color: rgba(250, 178, 25, 0.6); background: rgba(250, 178, 25, 0.08); }
.badge-bot { color: var(--critical-ink); border-color: rgba(208, 59, 59, 0.4); background: rgba(208, 59, 59, 0.06); }
.tag { display: inline-block; font-size: 11.5px; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.tag-accent { background: var(--accent-wash); color: var(--accent-ink); }

/* ---------- Filtri periodo ---------- */
.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg a, .seg button { padding: 6px 11px; border-radius: 7px; color: var(--text-2); font: 500 13px/1.2 var(--font); border: 0; background: none; cursor: pointer; white-space: nowrap; }
.seg a:hover, .seg button:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.seg .on { background: var(--accent-wash); color: var(--accent-ink); }
.filters select { width: auto; padding: 7px 10px; font-size: 13px; }
.custom-range { display: inline-flex; gap: 6px; align-items: center; }
.custom-range input { width: 150px; padding: 6px 8px; font-size: 13px; }

/* ---------- Schede ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--grid); margin: -4px -18px 16px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; font: 500 13.5px var(--font); color: var(--text-2); cursor: pointer; white-space: nowrap; text-decoration: none; }
.tabs a:hover, .tabs button:hover { color: var(--text); text-decoration: none; }
.tabs a.on, .tabs button.on { color: var(--accent-ink); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.on { display: block; }

/* ---------- Classifiche con barra ---------- */
ol.bars { list-style: none; margin: 0; padding: 0; }
ol.bars li { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 8px; min-height: 32px; border-radius: 6px; }
ol.bars li + li { margin-top: 2px; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent-wash); border-radius: 6px; z-index: 0; }
.bar-label { position: relative; z-index: 1; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-extra { position: relative; z-index: 1; color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar-val { position: relative; z-index: 1; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }
.empty { color: var(--muted); padding: 18px 0; text-align: center; margin: 0; }

/* ---------- Grafici ---------- */
.chart { position: relative; width: 100%; height: 240px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .gl { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .bl { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart .tk { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--accent); }
.chart .bar.dim { opacity: 0.45; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .bar, .chart g.on .bar { filter: brightness(1.15); }
.chart .hover-band { fill: var(--accent-wash); }
.tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); border-radius: 8px; padding: 7px 10px; font-size: 12px; white-space: nowrap; z-index: 5; transform: translate(-50%, -100%); margin-top: -8px; }
.tip b { display: block; font-size: 14px; font-weight: 650; }
.tip span { color: var(--text-2); }
.spark { width: 110px; height: 28px; display: block; }
.spark path { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart-table { margin-top: 10px; }
.chart-table summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }

/* ---------- Dettaglio visita ---------- */
.dl { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 0; margin: 0; }
.dl dt { color: var(--muted); padding: 7px 0; border-bottom: 1px solid var(--grid); font-size: 13px; }
.dl dd { margin: 0; padding: 7px 0 7px 10px; border-bottom: 1px solid var(--grid); word-break: break-word; }
.dl dt:last-of-type, .dl dd:last-of-type { border-bottom: 0; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 28px; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: -2px; width: 2px; background: var(--grid); }
.timeline li:last-child::before { display: none; }
.timeline .tl-dot { position: absolute; left: 1px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.timeline li.ev .tl-dot { border-color: var(--good); }
.timeline .tl-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline .tl-title { font-weight: 600; }
.timeline .tl-path { font-size: 12.5px; color: var(--text-2); word-break: break-all; }
.timeline .tl-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.score { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.meter { flex: 1; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; }
.reasons { margin: 0; padding-left: 18px; }
.reasons li { margin-bottom: 4px; }
.ua { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; background: var(--surface-2); padding: 8px 10px; border-radius: 8px; word-break: break-all; color: var(--text-2); }

/* ---------- Codice da installare ---------- */
.code { position: relative; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 44px 12px 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; color: var(--text); margin: 0; }
.code .copy { position: absolute; top: 6px; right: 6px; }
.steps { margin: 0; padding-left: 20px; }
.steps li { margin-bottom: 6px; }

/* ---------- Login ---------- */
.login-box { max-width: 380px; margin: 9vh auto 0; }
.login-box .brand { justify-content: center; font-size: 20px; margin-bottom: 18px; }

/* ---------- Paginazione ---------- */
.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.search-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.search-row input[type=search] { flex: 1 1 220px; width: auto; }
.search-row select { width: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .cols, .cols-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .hero-value { font-size: 44px; }
  .topbar-in { gap: 10px; }
  .brand span + * { display: none; }
  .hide-sm { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding-top: 16px; }
  .brand { font-size: 0; gap: 0; }
  .kpi-value { font-size: 22px; }
  .chart { height: 200px; }
  .card { padding: 14px; }
  .table-wrap { margin: 0 -14px; padding: 0 14px; }
  .tabs { margin: -2px -14px 14px; }
  .custom-range input { width: 130px; }
  .nav a { padding: 7px 8px; }
  .topbar-in { gap: 6px; }
  .topbar-right form { display: none; }
}

/* ---------- Mappa ---------- */
:root {
  --cat-1: #2a78d6; --cat-2: #eb6834; --cat-3: #1baf7a; --cat-4: #eda100;
  --cat-5: #e87ba4; --cat-6: #008300; --cat-7: #6250d6; --cat-8: #e34948; --cat-0: #898781;
  --seq-1: #cde2fb; --seq-2: #9ec5f4; --seq-3: #6da7ec; --seq-4: #2a78d6; --seq-5: #184f95;
  --sea: #f6f8fa; --land: #e9e8e2; --land-line: #fcfcfb; --nb: #f1f0ec; --nb-line: #e1e0d9;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cat-1: #3987e5; --cat-2: #d95926; --cat-3: #199e70; --cat-4: #c98500;
    --cat-5: #d55181; --cat-6: #008300; --cat-7: #9085e9; --cat-8: #e66767; --cat-0: #898781;
    --seq-1: #184f95; --seq-2: #1c5cab; --seq-3: #2a78d6; --seq-4: #5598e7; --seq-5: #9ec5f4;
    --sea: #141413; --land: #2c2c2a; --land-line: #1a1a19; --nb: #20201e; --nb-line: #2c2c2a;
  }
}
:root[data-theme="dark"] {
  --cat-1: #3987e5; --cat-2: #d95926; --cat-3: #199e70; --cat-4: #c98500;
  --cat-5: #d55181; --cat-6: #008300; --cat-7: #9085e9; --cat-8: #e66767; --cat-0: #898781;
  --seq-1: #184f95; --seq-2: #1c5cab; --seq-3: #2a78d6; --seq-4: #5598e7; --seq-5: #9ec5f4;
  --sea: #141413; --land: #2c2c2a; --land-line: #1a1a19; --nb: #20201e; --nb-line: #2c2c2a;
}
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.map-side .card + .card { margin-top: 12px; }
.map-card { padding: 0; overflow: hidden; position: sticky; top: 72px; }
.map { position: relative; height: calc(100vh - 290px); min-height: 520px; background: var(--sea); touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.map.dragging { cursor: grabbing; }
.map svg { display: block; width: 100%; height: 100%; }
.map-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); margin: 0; }
.map-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 14px; border-top: 1px solid var(--border); }
.map-ctrl { position: absolute; top: 12px; right: 12px; z-index: 3; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.map-ctrl .icon-btn { width: 36px; height: 36px; justify-content: center; align-items: center; border-radius: 0; font: 600 18px/1 var(--font); }
.map-ctrl .icon-btn + .icon-btn { border-top: 1px solid var(--border); }
.map-scale { position: absolute; left: 12px; bottom: 12px; z-index: 3; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font-size: 12px; color: var(--text-2); box-shadow: var(--shadow); }
.map-scale .ramp { list-style: none; margin: 6px 0 0; padding: 0; }
.map-scale .ramp li { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; line-height: 1.6; }
.map-scale .ramp i { display: block; width: 16px; height: 10px; border-radius: 3px; }
.m-city, .m-rl { pointer-events: none; }
.m-nb { fill: var(--nb); stroke: var(--nb-line); stroke-width: 0.8; vector-effect: non-scaling-stroke; }
.m-reg { fill: var(--land); stroke: var(--land-line); stroke-width: 1.2; vector-effect: non-scaling-stroke; transition: fill .2s; }
.m-reg.q1 { fill: var(--seq-1); } .m-reg.q2 { fill: var(--seq-2); } .m-reg.q3 { fill: var(--seq-3); } .m-reg.q4 { fill: var(--seq-4); } .m-reg.q5 { fill: var(--seq-5); }
.m-reg.hov { stroke: var(--text); stroke-width: 1.6; }
.m-prov { fill: none; stroke: var(--land-line); stroke-width: 0.6; vector-effect: non-scaling-stroke; opacity: .9; }
.m-city circle { fill: var(--text-2); }
.m-city text, .m-rl text { fill: var(--text-2); font-family: var(--font); paint-order: stroke; stroke: var(--sea); stroke-linejoin: round; }
.m-rl text { fill: var(--text); }
.m-rl text.v { font-weight: 650; }
.m-rl text.on-dark { fill: #fff; stroke: none; }
.m-rl text.on-light { fill: #0b0b0b; stroke: none; }
.m-pt, .m-sl { stroke: var(--surface); vector-effect: non-scaling-stroke; cursor: pointer; }
.m-pt { stroke-width: 1.5; }
.m-sl { stroke-width: 1; }
.m-pt.bot { fill: var(--surface) !important; stroke-width: 2; }
.m-hit { fill: transparent; cursor: pointer; }
.m-sel { fill: none; stroke: var(--text); stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.c0 { fill: var(--cat-0); } .c1 { fill: var(--cat-1); } .c2 { fill: var(--cat-2); } .c3 { fill: var(--cat-3); } .c4 { fill: var(--cat-4); }
.c5 { fill: var(--cat-5); } .c6 { fill: var(--cat-6); } .c7 { fill: var(--cat-7); } .c8 { fill: var(--cat-8); }
.m-pt.bot.c1 { stroke: var(--cat-1); } .m-pt.bot.c2 { stroke: var(--cat-2); } .m-pt.bot.c3 { stroke: var(--cat-3); } .m-pt.bot.c4 { stroke: var(--cat-4); }
.m-pt.bot.c5 { stroke: var(--cat-5); } .m-pt.bot.c6 { stroke: var(--cat-6); } .m-pt.bot.c7 { stroke: var(--cat-7); } .m-pt.bot.c8 { stroke: var(--cat-8); } .m-pt.bot.c0 { stroke: var(--cat-0); }
.m-bub { fill-opacity: .82; }
.m-pulse { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; animation: mpulse 1.8s ease-out 4; pointer-events: none; }
.m-pulse.c0 { stroke: var(--cat-0); } .m-pulse.c1 { stroke: var(--cat-1); } .m-pulse.c2 { stroke: var(--cat-2); } .m-pulse.c3 { stroke: var(--cat-3); } .m-pulse.c4 { stroke: var(--cat-4); }
.m-pulse.c5 { stroke: var(--cat-5); } .m-pulse.c6 { stroke: var(--cat-6); } .m-pulse.c7 { stroke: var(--cat-7); } .m-pulse.c8 { stroke: var(--cat-8); }
@keyframes mpulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(3.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .m-pulse { animation: none; display: none; } }
.map .tip { transform: translate(-50%, calc(-100% - 12px)); margin: 0; max-width: 300px; white-space: normal; z-index: 4; }
.tip .tl { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12px; }
.tip .tl i, .site-legend i, .lk { display: inline-block; width: 12px; height: 3px; border-radius: 2px; flex: none; }
.tip .tl b { display: inline; font-size: 12px; margin-left: auto; padding-left: 10px; }
.tip .tsub { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.bg0 { background: var(--cat-0); } .bg1 { background: var(--cat-1); } .bg2 { background: var(--cat-2); } .bg3 { background: var(--cat-3); } .bg4 { background: var(--cat-4); }
.bg5 { background: var(--cat-5); } .bg6 { background: var(--cat-6); } .bg7 { background: var(--cat-7); } .bg8 { background: var(--cat-8); }
.site-legend { list-style: none; margin: 0; padding: 0; }
.site-legend li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.site-legend li:hover { background: var(--surface-2); }
.site-legend li i { width: 10px; height: 10px; border-radius: 50%; }
.site-legend li.off { opacity: .45; }
.site-legend li.off i { background: transparent !important; box-shadow: inset 0 0 0 1.5px var(--muted); }
.site-legend .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-legend .n { font-weight: 600; font-variant-numeric: tabular-nums; }
.user-list { list-style: none; margin: 0; padding: 0; }
.user-list li { padding: 7px 0; border-bottom: 1px solid var(--grid); font-size: 13px; line-height: 1.35; }
.user-list li:last-child { border-bottom: 0; }
.user-list .ul-top { display: flex; align-items: center; gap: 6px; }
.user-list .ul-top a { font-weight: 600; color: var(--text); }
.user-list .ul-sub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-links { list-style: none; margin: 8px 0 0; padding: 0; }
.detail-links li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--grid); }
.detail-links li:last-child { border-bottom: 0; }
.detail-links .n { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) {
  .map-layout { grid-template-columns: minmax(0, 1fr); }
  .map-card { position: static; }
  .map { height: 70vh; min-height: 420px; }
}
