/* ============================================================================
   Comboios · Usina Estivas — sistema visual "centro de operações"
   Superfícies planas, hairlines, cor só com função (status, identidade, dados).
   ============================================================================ */

:root,
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0c0d0f;
  --panel: #121316;
  --panel-2: #17191c;
  --raised: #1d1f23;
  --hover: rgba(255, 255, 255, 0.035);
  --line: #23252a;
  --line-strong: #2f3237;
  --text: #e9e9e6;
  --text-2: #a9a8a2;
  --muted: #74736e;
  --accent: #4b8fe8;
  --accent-ink: #ffffff;
  --accent-soft: rgba(75, 143, 232, 0.12);
  --focus: rgba(75, 143, 232, 0.45);

  /* gráficos */
  --surface: var(--panel);
  --grid: #1f2125;
  --axis: #2f3237;

  /* identidade dos comboios (ordem validada p/ daltonismo) */
  --v1: #3987e5;
  --v2: #d95926;
  --v3: #199e70;
  --v4: #c98500;

  /* categorias de alerta */
  --g-motorista: #d55181;
  --g-adas: #c98500;
  --g-conducao: #9085e9;
  --g-outros: #85847e;

  /* status */
  --good: #22a83a;
  --good-text: #4cc461;
  --warning: #e0a321;
  --critical: #e04b4b;
  --bad-text: #f07171;
  --st-run: #22a83a;
  --st-idle: #2a2c31;
  --st-idle-strong: #5d5c57;
  --st-pump: #8f7cff;
  --st-off: #5d5c57;
  /* talhões: mesmas cores nos dois temas (o véu claro é o fundo do número) */
  --talhao-fill: #eef0ea;
  --talhao-line: #6a6d66;
  --talhao-line-strong: #2b2c29;
  --talhao-sel: #a3a69e;
  --talhao-num: #4a2350;
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f3f3f1;
  --panel: #ffffff;
  --panel-2: #f8f8f6;
  --raised: #ffffff;
  --hover: rgba(10, 10, 10, 0.03);
  --line: #e6e5e0;
  --line-strong: #d6d5cf;
  --text: #121212;
  --text-2: #4d4c48;
  --muted: #85847e;
  --accent: #2a6fcb;
  --accent-soft: rgba(42, 111, 203, 0.09);
  --focus: rgba(42, 111, 203, 0.35);
  --grid: #eeede8;
  --axis: #d6d5cf;
  --v1: #2a78d6;
  --v2: #eb6834;
  --v3: #1baf7a;
  --v4: #eda100;
  --g-motorista: #d4568a;
  --g-adas: #d99200;
  --g-conducao: #4a3aa7;
  --good-text: #13792a;
  --bad-text: #c42b2b;
  --st-idle: #e9e8e3;
  --st-idle-strong: #b2b1aa;
  --st-pump: #4a3aa7;
  --st-off: #b2b1aa;
}

/* ---------------------------------------------------------------- Base */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  background: var(--bg);
  color: var(--text);
  font: 13px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'tnum';
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 13px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.mono, .num, .plate { font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-feature-settings: 'tnum'; }
.plate { font-weight: 600; letter-spacing: 0.01em; }
.muted { color: var(--muted); }
.tiny { font-size: 11px; }
.sub { color: var(--muted); font-size: 12px; }
.ic { flex: none; vertical-align: middle; }
.ic.accent { color: var(--accent); }
[hidden] { display: none !important; }
.label {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}

/* ---------------------------------------------------------------- Sidebar */
.sidebar {
  position: sticky; top: 0; height: 100vh; z-index: 1200;
  display: flex; flex-direction: column;
  background: var(--panel); border-right: 1px solid var(--line);
}
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 16px 14px; border-bottom: 1px solid var(--line); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; width: 150px; height: auto; }
.brand-product { font-size: 11px; color: var(--muted); letter-spacing: 0.02em; }
.corp { display: flex; justify-content: center; padding: 12px 16px 6px; }
.corp img { width: 72px; height: auto; opacity: 0.9; }
.logo svg { display: block; width: 24px; height: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 13.5px; font-weight: 600; }
.brand-text span { font-size: 11px; color: var(--muted); }
.nav { display: flex; flex-direction: column; padding: 10px 8px 0; gap: 1px; }
.nav-label { padding: 14px 10px 6px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px;
  border-radius: 4px; color: var(--text-2); font-weight: 500;
}
.nav-item .ic { color: var(--muted); width: 16px; height: 16px; }
.nav-item:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.nav-item.active .ic { color: var(--text); }
.nav-item em {
  margin-left: auto; font-style: normal; font-size: 11px; font-weight: 600; color: var(--text-2);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.fleet-item .vdot { width: 8px; height: 8px; margin: 0 4px; }
.fleet-item .plate { font-size: 12.5px; color: var(--text); }
.fleet-st { margin-left: auto; font-size: 11px; color: var(--muted); white-space: nowrap; }
.fleet-st.st-rodando { color: var(--good-text); }
.fleet-st.st-abastecendo { color: var(--st-pump); }
.fleet-st.st-sem-sinal { color: var(--bad-text); }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--line); }
.collector { display: flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 11.5px; color: var(--text-2); }
.collector div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.collector b { font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.collector span { color: var(--muted); font-size: 11px; }
.collector .dot { width: 6px; height: 6px; }
.collector.ok .dot { background: var(--good); }
.collector.warn .dot { background: var(--warning); }
.collector.err .dot { background: var(--critical); }
.foot-row { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 16px; height: 36px; border-top: 1px solid var(--line); }
.user-row { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 16px; border-top: 1px solid var(--line); }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line-strong); font-size: 11px; font-weight: 600; color: var(--text-2); flex: none; }
.user-row .who { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.user-row .who b { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-row .who span { font-size: 11px; color: var(--muted); }
.user-row .btn { margin-left: auto; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.scrim { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 1150; }

/* ---------------------------------------------------------------- Topbar */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 1100; height: 52px;
  display: flex; align-items: center; gap: 14px; padding: 0 20px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.titles { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.titles .sub { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.date-nav { display: flex; align-items: center; gap: 4px; }
.date-nav input[type='date'] {
  height: 30px; padding: 0 8px; border-radius: 4px; border: 1px solid var(--line-strong); background: var(--panel);
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px;
}
.btn.menu-btn { display: none; }
.live-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--good-text); font-weight: 500; }
.live-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px rgba(34, 168, 58, 0.18); }
.banner {
  margin: 12px 20px 0; padding: 10px 12px; border-radius: 6px; display: flex; gap: 10px; align-items: flex-start;
  background: color-mix(in srgb, var(--critical) 9%, var(--panel)); border: 1px solid color-mix(in srgb, var(--critical) 40%, transparent);
}
.banner .ic { color: var(--critical); margin-top: 1px; }

/* ---------------------------------------------------------------- Controles */
.btn {
  height: 30px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 4px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text);
  cursor: pointer; font-weight: 500; white-space: nowrap; transition: background 0.12s, border-color 0.12s;
}
.btn:hover:not(:disabled) { background: var(--raised); text-decoration: none; }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.icon { width: 30px; padding: 0; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.sm { height: 26px; font-size: 12px; padding: 0 8px; }
.btn.spin .ic { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 4px; overflow: hidden; background: var(--panel); }
.seg button {
  height: 28px; padding: 0 10px; border: 0; background: transparent; cursor: pointer; color: var(--text-2);
  font-weight: 500; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button:hover { color: var(--text); background: var(--hover); }
.seg button.on { background: var(--raised); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.icon-seg button { padding: 0 8px; }
.field {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 2px 0 9px;
  border-radius: 4px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--muted);
}
.field select { border: 0; background: transparent; color: var(--text); height: 100%; padding-right: 4px; outline: none; max-width: 180px; }
select option { background: var(--panel); color: var(--text); }

/* ---------------------------------------------------------------- Página / painéis */
.page { padding: 16px 20px 32px; display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 1760px; margin: 0 auto; }
.grid { display: grid; gap: 12px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1fr) 360px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; min-width: 0; padding: 0 0 12px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  min-height: 42px; padding: 8px 14px; margin-bottom: 12px; border-bottom: 1px solid var(--line);
}
.card-head > div { min-width: 0; }
.card-head h2 { display: flex; align-items: baseline; gap: 8px; }
.card-head .sub { margin-top: 0; }
.card > :not(.card-head):not(.table-wrap) { margin-left: 14px; margin-right: 14px; }
.card > .table-wrap { margin: 0 14px; }
.link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }

/* ---------------------------------------------------------------- Faixa de KPIs */
.kpi-strip {
  display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr));
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
}
.kpi-cell { padding: 11px 16px 12px; min-width: 0; box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line); display: flex; flex-direction: column; gap: 3px; text-align: left; background: transparent; border: 0; border-radius: 0; color: inherit; }
button.kpi-cell { cursor: pointer; font: inherit; }
button.kpi-cell:hover { background: var(--hover); }
.kpi-cell.selected { box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line), inset 0 -2px 0 var(--accent); background: var(--hover); }
.kpi-cell .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-val { font-size: 24px; font-weight: 500; letter-spacing: -0.025em; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kpi-val small { font-family: Inter, system-ui, sans-serif; font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.kpi-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.delta { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; }
.delta.good { color: var(--good-text); }
.delta.bad { color: var(--bad-text); }
.kpi-cell.flash .kpi-val { animation: flashText 0.9s ease-out; }
@keyframes flashText { 0% { color: var(--accent); } 100% { color: inherit; } }
.skel { background: linear-gradient(90deg, transparent, var(--hover), transparent); background-size: 200% 100%; animation: shimmer 1.2s infinite; min-height: 64px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- Status / categorias */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--st-off); flex: none; }
.status.ok { color: var(--good-text); }
.status.ok i { background: var(--good); box-shadow: 0 0 0 3px rgba(34, 168, 58, 0.16); }
.status.idle i { background: var(--warning); }
.status.pump { color: var(--st-pump); }
.status.pump i { background: var(--st-pump); }
.status.off-key i { background: var(--st-off); }
.status.off { color: var(--bad-text); }
.status.off i { background: var(--critical); }
.cat { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; color: var(--text); white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cat i { width: 8px; height: 8px; border-radius: 1px; background: var(--gc); flex: none; }
.vdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--vc); flex: none; vertical-align: middle; }
.chip { font-size: 11.5px; padding: 1px 7px; border-radius: 3px; border: 1px solid var(--line-strong); color: var(--text-2); white-space: nowrap; }
.chip b { color: var(--text); font-weight: 600; margin-left: 2px; font-family: 'JetBrains Mono', ui-monospace, monospace; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--text-2); align-items: center; }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.sw.line { width: 14px; height: 2px; border-radius: 1px; }
.sw.dashed { background: repeating-linear-gradient(90deg, var(--critical) 0 4px, transparent 4px 7px) !important; height: 2px; }

/* ---------------------------------------------------------------- Visão geral: mapa + frota */
.ops { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; height: clamp(520px, calc(100vh - 210px), 860px); }
.ops-map { position: relative; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--panel-2); min-height: 0; }
.ops-map .map { position: absolute; inset: 0; height: auto; border: 0; border-radius: 0; }
.map-overlay-tl { position: absolute; top: 10px; left: 10px; z-index: 900; display: flex; gap: 8px; align-items: center; }
.map-overlay-tl .seg { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }
.map-info { position: absolute; left: 10px; top: 50px; z-index: 900; font-size: 11px; color: var(--text-2); background: color-mix(in srgb, var(--panel) 85%, transparent); padding: 3px 8px; border-radius: 4px; border: 1px solid var(--line); pointer-events: none; }
.side { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.side-head { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); flex: none; }
.side-head .link { font-size: 11.5px; }
.fleet-list { flex: none; }
.frow {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 14px; border-bottom: 1px solid var(--line);
  cursor: pointer; position: relative;
}
.frow:hover { background: var(--hover); }
.frow.on { background: var(--hover); box-shadow: inset 2px 0 0 var(--vc); }
.frow-id { display: flex; align-items: center; gap: 8px; min-width: 0; }
.frow-id .plate { font-size: 13px; }
.frow-right { display: flex; align-items: center; gap: 2px; }
.frow-meta { grid-column: 1 / -1; display: flex; gap: 12px; font-size: 11.5px; color: var(--muted); font-family: 'JetBrains Mono', ui-monospace, monospace; }
.frow-meta b { color: var(--text-2); font-weight: 500; }
.frow-util { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.frow-util .util { flex: 1; }
.util { display: flex; height: 4px; border-radius: 2px; background: var(--st-idle); overflow: hidden; }
.util i { display: block; height: 100%; }
.frow .btn.icon { width: 24px; height: 24px; border-color: transparent; background: transparent; color: var(--muted); }
.frow .btn.icon:hover { color: var(--text); background: var(--raised); }
.frow .btn.icon.on { color: var(--accent); }
.side-sec { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 6px; flex: none; }
.alist { flex: 1; min-height: 0; overflow-y: auto; padding: 0 6px 14px; mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); }
.aitem { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; padding: 6px 8px; border: 0; border-radius: 4px; background: transparent; text-align: left; cursor: pointer; color: inherit; }
.aitem:hover { background: var(--hover); }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 3px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .play { position: absolute; right: 3px; bottom: 3px; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: rgba(0, 0, 0, 0.7); color: #fff; }
.aitem-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.aitem-meta { font-size: 11.5px; color: var(--muted); font-family: 'JetBrains Mono', ui-monospace, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aitem-addr { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- Mapas (geral) */
.map { height: 460px; border-radius: 4px; border: 1px solid var(--line); background: var(--panel-2); position: relative; }
.map-wrap { position: relative; border-radius: 4px; overflow: hidden; }
.map.active { outline: 1px solid var(--accent); outline-offset: -1px; }
.leaflet-container { font: inherit; background: var(--panel-2); }
.leaflet-control-attribution { background: color-mix(in srgb, var(--panel) 80%, transparent) !important; color: var(--muted) !important; font-size: 10px; }
.leaflet-control-attribution a { color: var(--text-2) !important; }
.leaflet-tooltip { background: var(--raised); color: var(--text); border: 1px solid var(--line-strong); border-radius: 4px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); font-size: 12px; padding: 5px 8px; }
.leaflet-tooltip-top::before { border-top-color: var(--line-strong); }
.leaflet-tooltip .muted { color: var(--muted); }
.map-hint {
  position: absolute; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(0, 0, 0, 0.5); color: #fff; font-weight: 500; pointer-events: none; opacity: 0; transition: opacity 0.2s;
}
.map-hint.show { opacity: 1; }
.map-hint kbd { font: inherit; padding: 0 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.28); }
.mapbar { display: flex; flex-direction: column; gap: 6px; }
.mapbar-group { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 4px; overflow: hidden; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }
.mapbar button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.mapbar button + button { border-top: 1px solid var(--line); }
.mapbar button:hover { background: var(--raised); color: var(--text); }
.mapbar button.on { color: var(--accent); }
.card.is-fullscreen, .ops-map.is-fullscreen { border-radius: 0; }
.card.is-fullscreen { display: flex; flex-direction: column; }
.card.is-fullscreen .map-wrap { flex: 1; }
.card.is-fullscreen .map { height: 100% !important; }

/* caminhão (marcador de veículo): corpo gira com o rumo; placa fixa embaixo */
.trk-wrap { background: none; border: 0; }
.trk { position: relative; width: 0; height: 0; }
.trk-body {
  position: absolute; left: 0; top: 0; width: 15px; height: 27px; margin: -13.5px 0 0 -7.5px; display: block;
  transform-origin: 50% 50%; transition: transform 0.5s ease; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}
.trk-body svg { display: block; }
.trk-label {
  position: absolute; top: 15px; left: 0; transform: translateX(-50%); padding: 1px 5px; border-radius: 3px; white-space: nowrap;
  font: 600 10.5px/1.35 'JetBrains Mono', ui-monospace, monospace; color: var(--text);
  background: color-mix(in srgb, var(--panel) 90%, transparent); border: 1px solid var(--line-strong); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.trk-label::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--vc); margin-right: 4px; vertical-align: 1px; }
.trk.st-desligado .trk-body, .trk.st-sem-sinal .trk-body { filter: grayscale(0.85) brightness(0.8) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55)); }
.trk.st-desligado .trk-label, .trk.st-sem-sinal .trk-label { color: var(--muted); }
.trk.hl .trk-label { border-color: var(--vc); color: var(--text); }
.trk.hl .trk-body { filter: drop-shadow(0 0 4px var(--vc)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55)); }
.zoomed-out .trk-label { font-size: 9.5px; padding: 0 4px; top: 13px; }
.ref-labels { pointer-events: none; }
.amk-wrap { background: none; border: 0; }
.amk { display: block; width: 9px; height: 9px; margin: 2px; background: var(--ac); transform: rotate(45deg); border: 1.5px solid var(--panel); }
.amk.big { width: 15px; height: 15px; animation: amkPulse 1.2s ease-in-out infinite; }
@keyframes amkPulse { 50% { transform: rotate(45deg) scale(1.3); } }

/* legenda e avisos do mapa */
.map-legend {
  position: absolute; left: 10px; bottom: 22px; z-index: 900; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; max-width: calc(100% - 80px);
  padding: 6px 10px; border-radius: 4px; font-size: 11.5px; color: var(--text-2);
  background: color-mix(in srgb, var(--panel) 90%, transparent); border: 1px solid var(--line-strong);
}
.map-legend .lg-title { font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-left: 4px; }
.ops-map:has(.replay:not([hidden])) .map-legend { display: none; }
.map-flash {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 960; padding: 4px 12px; border-radius: 4px; font-weight: 600;
  background: var(--raised); border: 1px solid var(--line-strong); opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.map-flash.show { opacity: 1; }

/* replay */
.replay {
  position: absolute; left: 10px; right: 52px; bottom: 22px; z-index: 950; display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: 6px; background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--line-strong); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}
.replay.on { border-color: color-mix(in srgb, var(--accent) 60%, var(--line-strong)); }
.replay button {
  height: 26px; min-width: 26px; padding: 0 7px; border-radius: 4px; border: 1px solid var(--line-strong); background: var(--panel-2);
  color: var(--text); cursor: pointer; display: grid; place-items: center; font: 600 11.5px 'JetBrains Mono', ui-monospace, monospace;
}
.replay .rp-play { width: 28px; height: 28px; border-radius: 50%; padding: 0; background: var(--accent); border-color: var(--accent); color: #fff; }
.rp-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rp-row { display: flex; gap: 10px; align-items: baseline; font-size: 11.5px; min-width: 0; }
.rp-time { font: 600 12.5px 'JetBrains Mono', ui-monospace, monospace; }
.rp-info { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-range { width: 100%; accent-color: var(--accent); height: 14px; margin: 0; cursor: pointer; }

/* ---------------------------------------------------------------- Gráficos */
.chart { position: relative; height: 260px; }
.chart.tall { height: 340px; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12.5px; background: var(--panel); }

/* ---------------------------------------------------------------- Linha do tempo (Gantt) */
.timeline { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.tl-row { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; }
.tl-name { display: inline-flex; align-items: center; gap: 8px; font: 600 12px 'JetBrains Mono', ui-monospace, monospace; color: var(--text); }
.tl-track {
  position: relative; height: 22px; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--line); cursor: crosshair;
  background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 24 - 1px), var(--line) calc(100% / 24 - 1px), var(--line) calc(100% / 24));
}
.tl-track .seg { position: absolute; top: 4px; bottom: 4px; }
.tl-track .seg.run { background: var(--st-run); }
.tl-track .seg.idle { background: var(--st-idle-strong); opacity: 0.6; }
.tl-track .seg.pump { background: var(--st-pump); top: 1px; bottom: 1px; }
.tl-track .now { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--accent); }
.tl-track .cursor { display: none; position: absolute; top: -1px; bottom: -1px; width: 1px; background: var(--text); pointer-events: none; z-index: 2; }
.tl-track .cursor::after {
  content: attr(data-t); position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font: 600 10.5px 'JetBrains Mono', ui-monospace, monospace;
  padding: 1px 5px; border-radius: 3px; background: var(--text); color: var(--bg); white-space: nowrap;
}
.tl-row.axis { margin-top: -2px; }
.tl-ticks { position: relative; height: 14px; font: 10.5px 'JetBrains Mono', ui-monospace, monospace; color: var(--muted); }
.tl-ticks span { position: absolute; transform: translateX(-50%); }
.tl-ticks span:first-child { transform: none; }
.tl-ticks span:last-child { transform: translateX(-100%); }
.timeline.single { margin-top: 12px; }
.timeline.single .tl-row { grid-template-columns: 96px 1fr; }

/* ---------------------------------------------------------------- Tabelas */
.table-card { padding-bottom: 0; }
.table-wrap { overflow: auto; max-height: 460px; border: 1px solid var(--line); border-radius: 4px; }
.table-wrap.tall { max-height: 520px; }
.card > .table-wrap { margin-bottom: 0; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.table th {
  position: sticky; top: 0; z-index: 1; background: var(--panel-2); color: var(--muted); text-align: left; padding: 7px 12px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 7px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--hover); }
.table .num { text-align: right; font-family: 'JetBrains Mono', ui-monospace, monospace; }
.table tr.clickable { cursor: pointer; }
.table .ellipsis { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.table .tthumb { width: 70px; padding: 4px 8px; }
.table .tthumb img { width: 56px; height: 32px; object-fit: cover; border-radius: 3px; display: block; }
.icon-link { color: var(--muted); display: inline-flex; }
.icon-link:hover { color: var(--accent); }
.dur { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* ---------------------------------------------------------------- Abastecimentos / comboio */
.by-vehicle { display: flex; flex-direction: column; gap: 16px; }
.bv-head, .bv-foot { display: flex; justify-content: space-between; font-size: 12.5px; }
.bv-head { align-items: center; }
.bv-foot { font-size: 11.5px; color: var(--muted); font-family: 'JetBrains Mono', ui-monospace, monospace; }
.bar { height: 6px; border-radius: 3px; background: var(--panel-2); margin: 6px 0 4px; overflow: hidden; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; }
.vhead { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.vh-id { display: flex; align-items: center; gap: 12px; }
.vh-plate { display: flex; align-items: center; gap: 14px; font: 600 20px 'JetBrains Mono', ui-monospace, monospace; }
.vh-plate .status { font-family: Inter, system-ui, sans-serif; }
.vh-id .sub { display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.ref-list { display: flex; flex-direction: column; max-height: 470px; overflow: auto; }
.ref-item { display: grid; grid-template-columns: 54px 1fr 64px; gap: 10px; align-items: center; padding: 6px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer; text-align: left; }
.ref-item:hover { background: var(--hover); }
.ref-time { display: flex; flex-direction: column; line-height: 1.2; font: 600 12px 'JetBrains Mono', ui-monospace, monospace; }
.ref-time em { font-style: normal; color: var(--muted); font-weight: 400; font-size: 11px; }
.ref-bar { height: 4px; border-radius: 2px; background: var(--panel-2); overflow: hidden; }
.ref-bar i { display: block; height: 100%; background: var(--st-pump); }
.ref-dur { text-align: right; font: 12px 'JetBrains Mono', ui-monospace, monospace; color: var(--text-2); }

/* ---------------------------------------------------------------- Alertas: facetas + galeria */
.facets { display: flex; flex-direction: column; gap: 10px; }
.facet-sum { display: flex; align-items: baseline; gap: 24px; flex-wrap: wrap; }
.facet-sum div { display: flex; align-items: baseline; gap: 7px; }
.facet-sum b { font: 500 20px 'JetBrains Mono', ui-monospace, monospace; }
.facet-sum span { color: var(--muted); }
.facet-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 9px; border-radius: 3px; border: 1px solid var(--line-strong); background: var(--panel); cursor: pointer; font-size: 12px; color: var(--text-2); }
.fchip i { width: 8px; height: 8px; border-radius: 1px; background: var(--gc); }
.fchip b { color: var(--text); font: 600 11.5px 'JetBrains Mono', ui-monospace, monospace; }
.fchip:hover { border-color: var(--muted); }
.fchip.on { border-color: var(--gc); color: var(--text); background: var(--raised); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.gallery.compact { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.acard { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; cursor: pointer; outline: none; transition: border-color 0.15s; }
.acard:hover, .acard:focus-visible { border-color: var(--muted); }
.acard-media { position: relative; aspect-ratio: 16 / 9; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.acard-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acard-media .nomedia { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 12px; }
.badge-video { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 3px; background: rgba(0, 0, 0, 0.72); color: #fff; font-size: 11px; font-weight: 600; }
.acard-time { position: absolute; right: 8px; bottom: 8px; padding: 1px 6px; border-radius: 3px; background: rgba(0, 0, 0, 0.72); color: #fff; font: 600 11.5px 'JetBrains Mono', ui-monospace, monospace; }
.acard-body { padding: 9px 12px 11px; display: flex; flex-direction: column; gap: 4px; }
.acard-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.acard-plate { display: inline-flex; align-items: center; gap: 6px; font: 600 12px 'JetBrains Mono', ui-monospace, monospace; white-space: nowrap; }
.acard-addr { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acard-addr .ic { color: var(--muted); }
.acard-meta { font: 11.5px 'JetBrains Mono', ui-monospace, monospace; color: var(--muted); }
.pager { display: flex; align-items: center; gap: 4px; justify-content: center; flex-wrap: wrap; }
.pager .btn { min-width: 30px; }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 32px 16px; color: var(--muted); text-align: center; }
.empty p { max-width: 340px; }

/* ---------------------------------------------------------------- Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 24px; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(4, 5, 6, 0.82); }
.lb-panel { position: relative; width: min(1320px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.lb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lb-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lb-plate { display: inline-flex; align-items: center; gap: 6px; font: 600 13px 'JetBrains Mono', ui-monospace, monospace; }
.lb-actions { display: flex; align-items: center; gap: 4px; }
.lb-count { color: var(--muted); font: 11.5px 'JetBrains Mono', ui-monospace, monospace; margin-right: 6px; }
.lb-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 0; flex: 1; }
.lb-media { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: #000; min-height: 0; }
.lb-tabs { align-self: flex-start; background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.14); }
.lb-tabs button { color: #ccc; }
.lb-tabs button.on { background: rgba(255, 255, 255, 0.12); color: #fff; }
.lb-stage { flex: 1; display: grid; place-items: center; min-height: 0; }
.lb-stage video, .lb-imgs img { max-width: 100%; max-height: calc(100vh - 200px); display: block; }
.lb-imgs { display: flex; flex-direction: column; gap: 8px; overflow: auto; max-height: calc(100vh - 180px); }
.lb-nomedia { color: #8a8a85; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 80px 20px; text-align: center; }
.lb-side { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; overflow: auto; border-left: 1px solid var(--line); }
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 7px 12px; margin: 0; font-size: 12.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); word-break: break-word; }
.lb-map { height: 180px; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.lb-links { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------------------------------------------------------------- Toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 4000; display: flex; flex-direction: column; gap: 8px; width: min(370px, calc(100vw - 32px)); }
.toast {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 6px;
  background: var(--raised); border: 1px solid var(--line-strong); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0; transform: translateY(10px); transition: opacity 0.22s, transform 0.22s;
}
.toast.in { opacity: 1; transform: none; }
.toast.alert { box-shadow: inset 3px 0 0 var(--g-motorista), 0 10px 30px rgba(0, 0, 0, 0.4); }
.toast img { width: 64px; height: 36px; object-fit: cover; border-radius: 3px; }
.toast-ic { width: 28px; height: 28px; border-radius: 4px; display: grid; place-items: center; background: var(--panel-2); color: var(--text-2); }
.toast-txt { display: flex; flex-direction: column; min-width: 0; font-size: 12px; }
.toast-txt b { font-size: 12.5px; font-weight: 600; }
.toast-txt span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 3px; }
.toast-x:hover { background: var(--hover); color: var(--text); }

/* ---------------------------------------------------------------- Login */
body.login-body { display: block; min-height: 100vh; background: var(--bg); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.login-brand { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 2px; border-bottom: 1px solid var(--line); }
.login-brand svg { width: 32px; height: 32px; }
.login-brand h1 { font-size: 16px; }
.login-field { display: flex; flex-direction: column; gap: 5px; font-weight: 500; color: var(--text-2); font-size: 12px; }
.login-field input { height: 36px; padding: 0 10px; border-radius: 4px; border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--text); outline: none; font-size: 13.5px; }
.login-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-btn { height: 36px; font-size: 13.5px; margin-top: 4px; }
.login-error { color: var(--bad-text); font-size: 12.5px; padding: 7px 10px; border-radius: 4px; border: 1px solid color-mix(in srgb, var(--critical) 40%, transparent); }
.login-foot { text-align: center; font-size: 11.5px; }

/* ---------------------------------------------------------------- Movimento */
@media (prefers-reduced-motion: no-preference) {
  .page.enter > * { animation: fadeIn 0.28s ease-out both; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------------------------------------------------------------- Responsivo */
@media (max-width: 1280px) {
  .ops { grid-template-columns: 1fr; height: auto; }
  .ops-map { height: 520px; }
  .side { max-height: 560px; }
  .g-main { grid-template-columns: 1fr; }
  .kpi-strip { grid-template-columns: repeat(var(--md, 3), minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .g-2 { grid-template-columns: 1fr; }
  .lb-body { grid-template-columns: 1fr; overflow: auto; }
  .lb-side { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  body { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; transform: translateX(-100%); transition: transform 0.2s; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; }
  .btn.menu-btn { display: inline-flex; }
  .topbar { height: auto; min-height: 52px; padding: 8px 12px; flex-wrap: wrap; }
  .titles { flex-direction: column; gap: 0; }
  .top-actions { margin-left: 0; width: 100%; }
  .page { padding: 12px 12px 28px; }
  .banner { margin: 10px 12px 0; }
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-map { height: 380px; }
  .map { height: 340px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery.compact { grid-template-columns: repeat(2, 1fr); }
  .replay { right: 10px; bottom: 20px; }
  .rp-info { display: none; }
  .lightbox { padding: 0; }
  .lb-panel { max-height: 100vh; height: 100vh; border-radius: 0; }
}
.cat > span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.share { display: flex; align-items: center; gap: 6px; min-width: 84px; }
.share .bar { flex: 1; margin: 0; }
.share .mono { font-size: 11.5px; color: var(--text-2); width: 34px; text-align: right; }
.rf-note { margin-top: 10px; line-height: 1.45; }
.map-wrap:has(.replay:not([hidden])) .map-legend { display: none; }
.facet-legend { margin-left: auto; }
.lg-title { font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.table.compact th, .table.compact td { padding: 7px 9px; }

/* Seletor de período */
.period { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.period-custom { display: inline-flex; align-items: center; gap: 6px; padding: 0 2px; }
.period-custom[hidden] { display: none; }
.period-custom label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.period-custom input[type='date'] {
  height: 30px; padding: 0 8px; border-radius: 4px; border: 1px solid var(--line-strong); background: var(--panel);
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: var(--text);
}
.period-custom input[type='date']:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.range-label { color: var(--muted); font-size: 12px; white-space: nowrap; }
.toolbar-sep { width: 1px; height: 22px; background: var(--line-strong); margin: 0 2px; }
.side-legend { padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 11px; gap: 4px 12px; flex: none; }
.side-legend .muted { margin-left: auto; }

/* Logos: versão por tema */
:root[data-theme='dark'] .th-light, :root:not([data-theme]) .th-light { display: none !important; }
:root[data-theme='light'] .th-dark { display: none !important; }
.login-brand { flex-direction: column; align-items: flex-start; gap: 12px; }
.login-logo { width: 190px; height: auto; display: block; }
.login-corp { display: flex; justify-content: center; padding-top: 12px; border-top: 1px solid var(--line); }
.login-corp img { width: 64px; height: auto; }
@media (max-height: 760px) { .corp { display: none; } }

/* ---------------------------------------------------------------- Talhões */
.talhao-lbl { background: none; border: 0; }
.talhao-lbl span {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none;
  font: 500 12px/1 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums;
  color: var(--talhao-num); text-shadow: 0 0 2px rgba(238, 240, 234, 0.7);
}
.sw.sw-talhao { background: color-mix(in srgb, var(--talhao-fill) 65%, transparent); box-shadow: inset 0 0 0 1px var(--talhao-line); }
.talhao-popup .leaflet-popup-content-wrapper {
  background: var(--raised); color: var(--text); border: 1px solid var(--line-strong); border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}
.talhao-popup .leaflet-popup-content { margin: 12px 14px; font: 13px/1.4 Inter, system-ui, sans-serif; }
.talhao-popup .leaflet-popup-tip { background: var(--raised); border: 1px solid var(--line-strong); }
.talhao-popup a.leaflet-popup-close-button { color: var(--muted); top: 4px; right: 4px; }
.talhao-popup a.leaflet-popup-close-button:hover { color: var(--text); }
.tp { display: flex; flex-direction: column; gap: 2px; min-width: 210px; }
.tp-faz { font-size: 15px; font-weight: 600; margin-bottom: 8px; padding-right: 14px; }
.tp-grid { display: grid; grid-template-columns: auto auto auto; gap: 4px 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.tp-grid div { display: flex; flex-direction: column; gap: 1px; }
.tp-grid b { font: 600 13px 'JetBrains Mono', ui-monospace, monospace; }
.tp-grid .tp-num { font-size: 18px; color: var(--accent); }
