/* =====================================================================
   HBMonv2 Light Theme
   A clean, light, responsive skin for the HBMonv2 / HBlink3 dashboard.
   The accent colour is set in include/theme.php (ACCENT).
   ===================================================================== */

:root {
  --accent: #0A5CC2;
  --accent-ink: #0A4FA6;
  --accent-soft: #E8F0FB;

  --bg: #F4F6F9;
  --card: #FFFFFF;
  --line: #E2E7EE;
  --line-soft: #EEF1F5;
  --head: #F8FAFC;
  --ink: #0F1B2D;
  --ink-2: #3A4657;
  --muted: #5B6779;

  --ok-bg: #E5F4EC;  --ok-ink: #0B6B43;  --ok-dot: #13915B;
  --rx-bg: #FDECEC;  --rx-ink: #9F1D24;  --rx-dot: #D12C35;
  --tx-bg: #E6F1FA;  --tx-ink: #0B4F86;
  --warn-bg: #FFF2DE; --warn-ink: #8A4B00; --warn-dot: #D97A00;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .04);

  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3 { margin: 0; line-height: 1.25; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .9em; background: var(--line-soft); padding: 1px 5px; border-radius: 4px; }

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.num { text-align: right; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -48px; z-index: 50;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm);
}
.skip:focus { top: 12px; color: #fff; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* ---------- Header ---------- */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; padding-top: 14px; padding-bottom: 14px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand-mark, .brand-img { flex-shrink: 0; display: block; border-radius: 10px; }
.brand-img { object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 700; font-size: 18px; }
.brand-sub { font-size: 13px; color: var(--muted); }

.nav { display: flex; flex-wrap: wrap; gap: 2px; flex: 1 1 520px; }
.nav a {
  padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--ink-2); font-size: 14px; font-weight: 500;
}
.nav a:hover { background: var(--line-soft); color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

.status {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--line-soft); color: var(--ink-2);
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #9AA5B4; }
.status[data-state="live"]    { background: var(--ok-bg);   color: var(--ok-ink); }
.status[data-state="live"] .status-dot { background: var(--ok-dot); animation: pulse 2s ease-in-out infinite; }
.status[data-state="warn"]    { background: var(--warn-bg); color: var(--warn-ink); }
.status[data-state="warn"] .status-dot { background: var(--warn-dot); }
.status[data-state="offline"] { background: var(--rx-bg);   color: var(--rx-ink); }
.status[data-state="offline"] .status-dot { background: var(--rx-dot); }
.status[data-state="connecting"] .status-dot { animation: pulse 1s ease-in-out infinite; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 860px) {
  .nav { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; margin: 0 -8px; padding: 0 8px 2px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex-shrink: 0; }
  .status { margin-left: auto; }
}

/* ---------- Page ---------- */
.content { padding-top: 28px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 24px; }
.page-title h1 { font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.page-title .lede { margin-top: 4px; color: var(--muted); max-width: 70ch; }
@media (max-width: 600px) { .page-title h1 { font-size: 23px; } .content { padding-top: 20px; gap: 18px; } }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; min-width: 0;
}
.card.flush { padding: 0; overflow: hidden; }
.card .pad, .card-head.pad { padding: 16px 20px; }
.card-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px;
  margin-bottom: 14px;
}
.card.flush > .card-head { margin-bottom: 0; border-bottom: 1px solid var(--line); }
.card-head h2, .card h2 { font-size: 18px; font-weight: 600; }
.card-head .more { font-size: 14px; font-weight: 500; }
.count {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
  background: var(--line-soft); color: var(--ink-2); font-size: 13px; font-weight: 600; vertical-align: 2px;
}
.card-head > .count { margin-left: 0; }
.note { font-size: 13px; color: var(--muted); margin-top: 12px; }
.card.flush .note.pad { margin-top: 0; padding-top: 12px; padding-bottom: 16px; }
.sub-h { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 10px; }
.stack { display: flex; flex-direction: column; gap: 24px; }

.empty-state { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 28px 20px; color: var(--muted); text-align: center; }
.empty-state p { max-width: 60ch; }
.empty-state strong { color: var(--ink); }
.empty-inline { color: var(--muted); display: flex; align-items: center; gap: 10px; }
.card.flush .empty-inline { padding: 16px 20px; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .9s linear infinite;
}
.live-wait.offline { background: var(--warn-bg); border-color: #F2D9B3; color: var(--warn-ink); }
.live-wait.offline strong { color: var(--warn-ink); }

/* ---------- Buttons, inputs, badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 14px; border-radius: var(--radius-sm);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  border: 1px solid transparent; background: var(--accent); color: #fff;
}
.btn:hover { text-decoration: none; filter: brightness(.95); color: #fff; }
.btn-ghost { background: var(--card); border-color: #CDD5E0; color: var(--ink); }
.btn-ghost:hover { background: var(--line-soft); color: var(--ink); filter: none; }
.btn-ghost[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.btn-light { background: #fff; color: var(--ink); margin-top: 16px; min-height: 44px; font-weight: 600; }
.btn-light:hover { color: var(--ink); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); margin-right: 6px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

.search {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px;
  border: 1px solid #CDD5E0; border-radius: var(--radius-sm); background: var(--card); color: var(--muted);
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input {
  border: 0; outline: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 14px; width: 200px; min-width: 0;
}
@media (max-width: 600px) { .search { flex: 1 1 100%; } .search input { width: 100%; } }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 6px; white-space: nowrap;
  background: var(--line-soft); color: var(--ink-2); font-size: 12px; font-weight: 600;
}
.tg-pill {
  display: inline-block; padding: 1px 8px; border-radius: 6px; white-space: nowrap;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; font-size: 13px;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.pill .dot, .chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-bg); color: var(--ok-ink); }
.pill.bad { background: var(--rx-bg); color: var(--rx-ink); }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hb-table th, .hb-table td { padding: 11px 14px; text-align: left; vertical-align: top; border: 0; }
.hb-table thead th {
  background: var(--head); color: var(--muted); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; padding-top: 10px; padding-bottom: 10px;
}
.hb-table tbody tr { border-top: 1px solid var(--line-soft); }
.hb-table tbody tr.group-start { border-top: 1px solid var(--line); }
.hb-table tbody tr:hover { background: #FAFBFD; }
.hb-table th:first-child, .hb-table td:first-child { padding-left: 20px; }
.hb-table th:last-child, .hb-table td:last-child { padding-right: 20px; }
.hb-table td.station:first-child { padding-left: 14px; }
.hb-table th.num, .hb-table td.num { text-align: right; }
.hb-table th[scope="row"] { font-weight: 600; }
.hb-table .sys { white-space: nowrap; }
.hb-table .sub { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.hb-table .sub.tiny { font-size: 12px; }
.hb-table .station { min-width: 220px; }

.call { font-family: var(--mono); font-weight: 600; }
.id { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* Slot activity cells (masters / peers) */
.slot-cell { min-width: 200px; }
.slot { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-radius: var(--radius-sm); font-size: 13px; }
.slot-tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.slot-who { font-weight: 600; }
.slot.idle { flex-direction: row; gap: 8px; align-items: baseline; color: var(--muted); padding-left: 0; }
.slot.idle .slot-tag { color: #8A95A5; }
.slot.rx { background: var(--rx-bg); color: var(--rx-ink); }
.slot.tx { background: var(--tx-bg); color: var(--tx-ink); }
.legend { font-size: 13px; color: var(--muted); display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.slot-key { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.slot-key.rx { background: var(--rx-bg); color: var(--rx-ink); }
.slot-key.tx { background: var(--tx-bg); color: var(--tx-ink); margin-left: 8px; }

.streams { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.stream { padding: 3px 10px; border-radius: var(--radius-sm); font-size: 13px; }
.stream.rx { background: var(--rx-bg); color: var(--rx-ink); }
.stream.tx { background: var(--tx-bg); color: var(--tx-ink); }

/* ---------- Dashboard layout ---------- */
.dash {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}
.dash-live { display: contents; }
.dash-live > .live-wait { grid-column: 1; grid-row: 1; }
.dash-onair { grid-column: 1 / -1; grid-row: 1; }
.dash-stats { grid-column: 1 / -1; grid-row: 2; }
.dash-lh    { grid-column: 1; grid-row: 3; }
.dash-conn  { grid-column: 1; grid-row: 4; }
.dash-side  { grid-column: 2; grid-row: 3 / span 2; display: flex; flex-direction: column; gap: 24px; min-width: 0; }

@media (max-width: 1000px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .dash-live > *, .dash-onair, .dash-stats, .dash-lh, .dash-conn, .dash-side { grid-column: 1; grid-row: auto; }
  .dash-side { order: 10; }
}
@media (max-width: 600px) { .dash, .dash-side { gap: 18px; } }

/* On air */
.dash-onair .card-head { margin-bottom: 10px; }
.dash-onair h2 { display: flex; align-items: center; gap: 10px; }
.dash-onair.is-live { border-color: #F3C9CC; box-shadow: 0 0 0 3px #FDF3F3; }
.dash-onair.is-live h2::before {
  content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--rx-dot);
  animation: pulse 1.4s ease-in-out infinite;
}
.qso-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.qso {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px;
  padding-top: 14px; border-top: 1px solid var(--line-soft);
}
.qso:first-child { padding-top: 0; border-top: 0; }
.qso-icon {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.qso-who { display: flex; flex-direction: column; flex: 1 1 220px; min-width: 0; }
.qso-flag { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--rx-ink); }
.qso-call { font-family: var(--mono); font-size: 32px; font-weight: 600; line-height: 1.1; color: var(--ink); }
a.qso-call:hover { color: var(--accent-ink); }
.qso-name { color: var(--muted); }
.qso-facts {
  margin: 0; flex: 2 1 460px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 24px;
}
.qso-facts dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.qso-facts dd { margin: 2px 0 0; font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
.qso-facts dd .sub { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.qso + .qso .qso-call { font-size: 24px; }
.qso + .qso .qso-icon { width: 44px; height: 44px; }
@media (max-width: 600px) {
  .qso-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qso-call { font-size: 26px; }
}

/* Stat tiles */
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat {
  display: flex; flex-direction: column; gap: 2px; padding: 18px 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--ink);
}
.stat:hover { text-decoration: none; border-color: #C8D2DF; color: var(--ink); }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-family: var(--mono); font-size: 30px; font-weight: 600; line-height: 1.2; }
.stat-of { font-size: 18px; color: var(--muted); font-weight: 500; }
.stat-link { font-size: 13px; color: var(--accent); font-weight: 500; }
@media (max-width: 600px) { .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .stat { padding: 14px 16px; } .stat-value { font-size: 24px; } }

/* Connected station chips */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--head);
  font-size: 14px;
}
.chip-call { font-family: var(--mono); font-weight: 600; }
.chip.is-live { background: var(--rx-bg); border-color: #F3C9CC; }
.chip.peer.up { color: var(--ok-ink); background: var(--ok-bg); border-color: #C6E6D5; font-weight: 600; }
.chip.peer.down { color: var(--rx-ink); background: var(--rx-bg); border-color: #F3C9CC; font-weight: 600; }
.pop {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 20; width: 260px;
  display: none; flex-direction: column; gap: 3px; padding: 12px 14px;
  background: var(--ink); color: #E8EDF4; border-radius: 10px; font-size: 13px;
  box-shadow: 0 8px 24px rgba(15, 27, 45, .18);
}
.pop-row b { display: inline-block; min-width: 82px; color: #A9B4C4; font-weight: 500; }
.chip:hover .pop, .chip:focus-within .pop, .chip:focus .pop { display: flex; }

/* Last heard on the dashboard (markup written by HBMonv2's monitor.py) */
.lh-body br, .lh-body legend { display: none; }
.lh-body fieldset { border: 0 !important; margin: 0 !important; padding: 0 !important; background: none !important; min-width: 0; }
.lh-body table {
  width: 100% !important; border-collapse: collapse !important; background: none !important;
  font: inherit !important; font-size: 14px !important; min-width: 640px;
}
.lh-body th, .lh-body td { border: 0 !important; padding: 10px 12px; text-align: left; background: none; white-space: nowrap; }
.lh-body tr.theme_color, .lh-body tr:first-child { background: var(--head) !important; color: var(--muted) !important; background-image: none !important; height: auto !important; }
.lh-body th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.lh-body tr.log { border-top: 1px solid var(--line-soft); }
.lh-body tr.log:hover { background: #FAFBFD; }
.lh-body th:first-child, .lh-body td:first-child { padding-left: 20px; }
.lh-body th:last-child, .lh-body td:last-child { padding-right: 20px; }
.lh-body font, .lh-body b { color: inherit !important; font-weight: inherit; }
.lh-body td:nth-child(1) { color: var(--muted); }
.lh-body td:nth-child(2) { font-family: var(--mono); color: var(--muted); }
.lh-body td:nth-child(3) a, .lh-body td:nth-child(3) font { font: 600 14px var(--mono) !important; color: var(--accent) !important; }
.lh-body td:nth-child(3) span { font: 12px var(--mono) !important; color: var(--muted) !important; }
.lh-body td:nth-child(5) font {
  display: inline-block; padding: 1px 8px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent-ink) !important; font-weight: 600; font-size: 13px;
}
.lh-body td:nth-child(5) font::before { content: 'TG '; }
.lh-body td:nth-child(6) { color: var(--ink-2); white-space: normal; }
.lh-body td:nth-child(7) { font-family: var(--mono); text-align: right; }
.lh-body td:nth-child(7)::after { content: 's'; color: var(--muted); }
.lh-body th:nth-child(7) { text-align: right; }
.lh-body td:nth-child(8) { color: var(--muted); }
.lh-body tr.lh-empty-row td { color: var(--muted); white-space: normal; text-align: center; padding: 24px 20px; }
.lh-body tr.lh-empty-row td::after { content: none; }

/* Talkgroups (sidebar) */
.tg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tg-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 10px; }
.tg-num { font-weight: 600; font-size: 16px; min-width: 72px; }
.tg-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tg-name { font-weight: 600; }
.tg-desc { font-size: 13px; color: var(--muted); }

/* Connect card */
.card-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.card-dark h2 { margin-bottom: 4px; }
.lede-dark { color: #C3CCD9; font-size: 14px; margin-bottom: 14px; }
.kv { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; font-size: 14px; }
.kv dt { color: #A9B4C4; font-size: 12px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- Call log ---------- */
.calllog {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
  background: #FBFCFD; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; overflow: auto; white-space: pre; color: var(--ink-2);
}
.calllog-short { height: 260px; margin-top: 12px; font-size: 11.5px; }
.calllog-tall { height: min(68vh, 720px); }
.calllog:empty::before { content: 'Waiting for activity…'; color: var(--muted); font-family: var(--font); }
.log-line { padding: 1px 6px; border-radius: 4px; }
.log-line.start { color: var(--rx-ink); background: #FEF6F6; }
.log-line.end { color: var(--ink-2); }
.log-line.sys { color: var(--muted); font-style: italic; }
.log-card .card-head { margin-bottom: 12px; }

.mini-log summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.mini-log summary::-webkit-details-marker { display: none; }
.mini-log summary .more { font-size: 14px; color: var(--accent); font-weight: 500; }
.mini-log[open] summary .more { font-size: 0; }
.mini-log[open] summary .more::after { content: 'Hide'; font-size: 14px; }

/* ---------- System graphs ---------- */
.graph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 24px; }
.graph { margin: 0; }
.graph figcaption { font-weight: 600; margin-bottom: 12px; }
.graph img { display: block; max-width: 100%; height: auto; border-radius: 6px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--card); }
.footer-row { padding-top: 20px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }

/* ---------- Legacy markup fallback ----------
   If HBMonv2 is still using its original templates, these rules keep
   the old tables readable on the light theme. */
.live-area fieldset { border: 1px solid var(--line) !important; border-radius: var(--radius) !important; background: var(--card) !important; width: auto !important; margin: 0 0 24px !important; padding: 16px 20px !important; }
.live-area legend { font-weight: 600; padding: 0 6px; }
.live-area table { width: 100%; border-collapse: collapse; font: inherit !important; font-size: 14px !important; }
.live-area tr.theme_color, .live-area th.theme_color { background: var(--head) !important; background-image: none !important; color: var(--muted) !important; }
.live-area td, .live-area th { border: 1px solid var(--line-soft); padding: 8px 10px; }
.tooltip { position: relative; display: inline-block; }
.tooltip .tooltiptext { visibility: hidden; position: absolute; z-index: 5; background: var(--ink); color: #fff; border-radius: 8px; padding: 8px; width: 240px; left: 100%; }
.tooltip:hover .tooltiptext { visibility: visible; }
.dash-live > br { display: none; }
.dash-live > fieldset { grid-column: 1; margin: 0 !important; }
