:root {
  --bg: #0b1120; --panel: #111a2e; --panel-2: #172238; --line: #24314d;
  --text: #e5e9f0; --muted: #8b97ad; --accent: #f97316; --accent-ink: #1a0d02;
  --ok: #22c55e; --warn: #eab308; --orange: #f97316; --bad: #ef4444; --info: #3b82f6; --off: #6b7280;
  --radius: 10px; --shadow: 0 6px 24px rgba(0,0,0,.35);
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f1f5f9; --panel: #ffffff; --panel-2: #f8fafc; --line: #dbe2ea;
  --text: #0f172a; --muted: #5b6678; --accent: #ea580c; --accent-ink: #fff;
  --shadow: 0 4px 16px rgba(15,23,42,.08);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.pad { padding: 16px; }
.mono { font-family: var(--mono); }

/* top bar */
.topbar { display: flex; align-items: center; gap: 16px; padding: 8px 16px; background: var(--panel);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1000; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text);
  font-weight: 800; letter-spacing: .08em; font-size: 18px; }
.clocks { font-family: var(--mono); font-size: 13px; display: flex; gap: 14px; color: var(--muted); }
.clocks #clock-utc { color: var(--accent); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.brand, .clocks { flex: none; }
.conn { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); display: inline-block; }
.conn.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
#user-box { display: flex; align-items: center; gap: 8px; font-size: 14px; }

/* SEOC status: a pill that fills the space between the clocks and the user controls */
.status-bar { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 5px 14px; border-radius: 8px; font-weight: 800; letter-spacing: .1em; font-size: 13px; color: #fff;
  text-align: center; white-space: nowrap; overflow: hidden; }
.status-bar #status-text { flex: none; }
.status-bar #status-banner { font-weight: 500; letter-spacing: normal; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.status-bar #status-banner:empty { display: none; }
.status-bar #status-control { flex: none; display: flex; align-items: center; gap: 4px; }
.status-bar select { background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.4); color: #fff;
  border-radius: 6px; padding: 2px 6px; font-size: 12px; }
.lvl-normal { background: #15803d; } .lvl-monitoring { background: #a16207; }
.lvl-partial { background: #c2410c; } .lvl-full { background: #b91c1c; animation: pulse 2s infinite; }
@keyframes pulse { 50% { background: #7f1d1d; } }

.nav { display: flex; gap: 4px; padding: 8px 12px; overflow-x: auto; background: var(--panel-2);
  border-bottom: 1px solid var(--line); }
.nav a { padding: 7px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); white-space: nowrap;
  font-weight: 600; font-size: 14px; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.active { color: var(--accent-ink); background: var(--accent); }

.view { padding: 16px; max-width: 1500px; margin: 0 auto; }

/* buttons & inputs */
button, .btn { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
button:hover, .btn:hover { border-color: var(--accent); }
button.primary, .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
button.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); }
button.ghost { background: transparent; border-color: transparent; }
button.small { padding: 3px 8px; font-size: 12px; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
textarea { min-height: 90px; resize: vertical; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }

/* layout */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar h2 { margin: 0 auto 0 0; font-size: 20px; }
.toolbar input, .toolbar select { width: auto; min-width: 160px; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cols-dash { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
@media (max-width: 960px) { .cols-2, .cols-dash { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > h3 { margin: 0; padding: 12px 14px; font-size: 15px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px; }
.card > h3 .right { margin-left: auto; }
.card-body { padding: 12px 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { padding: 14px; }
.stat .n { font-size: 30px; font-weight: 800; font-family: var(--mono); }
.stat .l { color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

/* lists */
.items { list-style: none; margin: 0; padding: 0; }
.items li { padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.items li:last-child { border-bottom: 0; }
.items li:hover { background: var(--panel-2); }
.items .t { font-weight: 700; }
.items .s { color: var(--muted); font-size: 13px; }
.empty { padding: 18px; text-align: center; color: var(--muted); }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  padding: 8px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr.click:hover td { background: var(--panel-2); cursor: pointer; }
.table-wrap { overflow-x: auto; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; border: 1px solid currentColor; white-space: nowrap; }
.c-ok { color: var(--ok); } .c-warn { color: var(--warn); } .c-orange { color: var(--orange); }
.c-bad { color: var(--bad); } .c-info { color: var(--info); } .c-off { color: var(--off); }

/* map */
.map { height: 420px; border-radius: 0 0 var(--radius) var(--radius); }
.map.tall { height: calc(100vh - 210px); min-height: 420px; border-radius: var(--radius); }
.leaflet-container { background: #1e293b; font: inherit; }
.leaflet-popup-content { margin: 10px 12px; color: #0f172a; }
.leaflet-control-layers label { display: block; color: #0f172a; font-weight: 500; font-size: 13px; }
.leaflet-control-layers input { width: auto; padding: 0; margin: 0 6px 0 0; vertical-align: middle; }
input[type="checkbox"], input[type="radio"] { width: auto; }
.status-bar select { width: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; padding: 8px 14px; color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }

/* reports board */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.report { padding: 12px 14px; border-left: 4px solid var(--off); cursor: pointer; }
.report.sev-minor { border-left-color: var(--warn); } .report.sev-moderate { border-left-color: var(--orange); }
.report.sev-major { border-left-color: var(--bad); } .report.sev-info { border-left-color: var(--info); }
.report h4 { margin: 4px 0; font-size: 15px; }
.report p { margin: 6px 0 0; white-space: pre-wrap; font-size: 14px; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 10px 14px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 130px 1fr; gap: 10px; }
.timeline .when { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.timeline .body { white-space: pre-wrap; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0; font-size: 14px;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.kv dt, .kv dd { margin: 0; padding: 4px 12px; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); font-weight: 600; background: var(--panel-2); border-right: 1px solid var(--line); }
.kv dd { white-space: pre-wrap; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }

/* net check-ins */
.net-form { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1.4fr) 170px auto; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--line); }
.net-form input.mono { text-transform: uppercase; font-weight: 700; }
@media (max-width: 800px) { .net-form { grid-template-columns: 1fr 1fr; } .net-form button { grid-column: 1 / -1; justify-content: center; } }
select.mini { width: auto; padding: 3px 6px; font-size: 13px; }
select.traffic-routine { color: var(--info); } select.traffic-priority { color: var(--orange); font-weight: 700; }
select.traffic-emergency { color: var(--bad); font-weight: 800; }
.net-table tr.out td { opacity: .5; }
.net-table tr.has-priority td:first-child { box-shadow: inset 4px 0 var(--orange); }
.net-table tr.has-emergency td { background: color-mix(in srgb, var(--bad) 14%, transparent); }
.net-table tr.has-emergency td:first-child { box-shadow: inset 4px 0 var(--bad); }

/* ---------- weather ---------- */
.ticker { display: flex; align-items: stretch; min-height: 36px; border-bottom: 1px solid var(--line);
  background: var(--panel); font-size: 14px; overflow: hidden; }
.ticker[hidden] { display: none; }
.ticker-btn { border-radius: 0; border: 0; border-right: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.25);
  color: inherit; font-weight: 700; white-space: nowrap; padding: 0 12px; }
.ticker-static { display: flex; align-items: center; gap: 4px; padding: 0 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker-meta { opacity: .75; font-weight: 400; }
.ticker-idle { color: var(--muted); }
.ticker-ok { background: color-mix(in srgb, var(--ok) 14%, var(--panel)); color: var(--text); }
.ticker-warning { background: #7f1d1d; color: #fff; }
.ticker-watch { background: #78350f; color: #fff; }
.ticker-advisory { background: #3f3f46; color: #fff; }
.ticker-label { display: flex; align-items: center; padding: 0 12px; font-weight: 900; letter-spacing: .1em; font-size: 12px;
  background: rgba(0,0,0,.3); white-space: nowrap; }
.ticker-warning .ticker-label { animation: tickerBlink 1s steps(2, start) infinite; }
@keyframes tickerBlink { to { background: #dc2626; } }
.ticker-viewport { flex: 1; overflow: hidden; display: flex; align-items: center; min-width: 0;
  mask-image: linear-gradient(90deg, transparent, #000 30px, #000 calc(100% - 30px), transparent); }
.ticker-track { display: flex; width: max-content; animation: tickerScroll var(--dur, 30s) linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-run { display: flex; gap: 48px; padding-right: 48px; }
@keyframes tickerScroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } .ticker-viewport { overflow-x: auto; } }
.tick-item { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; white-space: nowrap; }
.tick-item:hover b { text-decoration: underline; }
.wx-chip { display: inline-block; padding: 1px 8px; border-radius: 4px; font-weight: 800; font-size: 12px;
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }

.wx-card.wx-warm { border-color: var(--warn); }
.wx-card.wx-hot { border: 2px solid var(--bad); animation: hotPulse 1.6s ease-in-out infinite; }
@keyframes hotPulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 45%, transparent), var(--shadow); } }
body.wx-flash-warning::after, body.wx-flash-watch::after, body.wx-flash-advisory::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 4000; animation: wxFlash 1.5s ease-in-out 6; }
body.wx-flash-warning::after { --flash: #ef4444; } body.wx-flash-watch::after { --flash: #f59e0b; } body.wx-flash-advisory::after { --flash: #a1a1aa; }
@keyframes wxFlash { 0%, 100% { box-shadow: inset 0 0 0 0 transparent; } 50% { box-shadow: inset 0 0 0 10px var(--flash), inset 0 0 120px var(--flash); } }
@media (prefers-reduced-motion: reduce) { body[class*="wx-flash"]::after { animation-iteration-count: 1; } }

.seg { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.wx-list li { padding-left: 12px; }
.radar-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 8px 14px; font-size: 13px; border-bottom: 1px solid var(--line); }
.radar-wrap { background: #000; display: flex; justify-content: center; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.radar-img { display: block; max-width: 100%; height: auto; max-height: 560px; object-fit: contain; }
.wx-pre { white-space: pre-wrap; font-family: var(--mono); font-size: 13px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px; margin: 0; }
.wx-pre.product { max-height: 420px; overflow: auto; }
.wx-modal-head { padding: 4px 0 4px 12px; }
.fc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.fc { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.fc.night { background: var(--bg); }
.fc-name { font-weight: 700; font-size: 13px; } .fc-temp { font-size: 22px; font-weight: 800; font-family: var(--mono); }
.fc-short { font-size: 13px; } .fc-meta { font-size: 12px; margin-top: 4px; }
.county-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px; max-height: 50vh; overflow: auto;
  border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin: 8px 0; }
.county { flex-direction: row; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 6px; color: var(--text); font-weight: 500; cursor: pointer; }
.county.on { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.county input, .inline-check input { width: auto; }
.inline-check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }

/* chat */
.chat { display: grid; grid-template-columns: 220px 1fr; gap: 16px; height: calc(100vh - 200px); min-height: 400px; }
.chat .channels a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; }
.chat .channels a.active { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.chat-main { display: flex; flex-direction: column; min-height: 0; }
.msgs { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.msg .who { font-weight: 700; font-size: 13px; } .msg .who .muted { font-weight: 400; margin-left: 6px; }
.msg .txt { white-space: pre-wrap; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form textarea { min-height: 42px; height: 42px; }
@media (max-width: 700px) { .chat { grid-template-columns: 1fr; height: auto; } .msgs { height: 55vh; } }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(2,6,23,.7); display: flex; align-items: flex-start;
  justify-content: center; padding: 5vh 16px; z-index: 2000; overflow-y: auto; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; width: 100%; max-width: 720px; box-shadow: var(--shadow); }
.modal header { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal header h3 { margin: 0; flex: 1; }
.modal-body { padding: 16px; }
.modal footer { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal footer .left { margin-right: auto; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-form .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .grid-form { grid-template-columns: 1fr; } }
.meta { font-size: 12px; color: var(--muted); margin-top: 12px; }
.err { color: var(--bad); font-weight: 600; margin-top: 10px; }

/* login */
.login { width: 100%; max-width: 380px; margin: 0 auto; padding: 24px; }
.login h2 { margin-top: 0; }
.login form { display: grid; gap: 12px; }

.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 3000; }
.toast { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 10px 14px;
  border-radius: 8px; box-shadow: var(--shadow); max-width: 340px; }
.toast.error { border-left-color: var(--bad); }

@media (max-width: 1100px) {
  /* not enough room: drop the status pill onto its own full-width row under the top bar */
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .status-bar { order: 10; flex-basis: 100%; white-space: normal; flex-wrap: wrap; }
}
@media (max-width: 700px) {
  .topbar { gap: 8px; padding: 8px 10px; }
  .brand { font-size: 16px; gap: 6px; }
  .top-actions { gap: 4px; }
  #user-box button { padding: 6px 8px; }
  .clocks #clock-local { display: none; }
  .view { padding: 12px; }
  .toolbar input, .toolbar select { min-width: 0; flex: 1; }
}
@media print {
  .topbar, .nav, .status-bar, .toolbar button, .no-print, .toasts { display: none !important; }
  body, .card { background: #fff; color: #000; box-shadow: none; }
  .card { border-color: #999; }
}

/* access control: restricted incidents, program / agency membership */
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.pick { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--bg); }
.pick-q { margin-bottom: 6px; }
.pick-list { max-height: 180px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 12px; }
.pick-list .inline-check { padding: 3px 0; }
.pick-list .inline-check[hidden] { display: none; }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; line-height: 1.4; }
.lock { font-size: .9em; }
.members { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.members h4 { margin: 6px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--panel-2, rgba(148,163,184,.15)); border: 1px solid var(--line); font-size: 13px; }
ul.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.card.serving { border-color: var(--info, #3b82f6); box-shadow: inset 4px 0 0 var(--info, #3b82f6); }
.card.serving h4 { margin: 10px 0 4px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.card.serving .card-body > h4:first-child { margin-top: 0; }

/* SITREP war room */
.wr-kpis .stat .sub { font-size: 11px; margin-top: 2px; }
.stat.click { cursor: pointer; }
.wr-main { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; margin-bottom: 16px; }
.wr-map { height: 560px; }
.wr-feed-card { display: flex; flex-direction: column; max-height: 680px; }
.wr-feed-card .seg { padding: 8px 14px 4px; }
.wr-feed { overflow-y: auto; flex: 1; padding: 6px 10px 10px; display: flex; flex-direction: column; gap: 6px; min-height: 200px; }
.fi { border: 1px solid var(--line); border-left: 4px solid var(--off); border-radius: 8px; padding: 7px 10px; font-size: 13px; cursor: pointer; background: var(--panel-2); }
.fi:hover { border-color: var(--info); }
.fi.ours { border-left-color: var(--info); }
.fi.ours.sev-major { border-left-color: var(--bad); } .fi.ours.sev-moderate { border-left-color: var(--orange); } .fi.ours.sev-minor { border-left-color: var(--warn); }
.fi.storm { border-left-color: var(--orange); }
.fi.alert { border-left-color: var(--bad); }
.fi-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fi-h .right, .right { margin-left: auto; }
.fi-r { margin-top: 3px; line-height: 1.35; }
.small { font-size: 12px; }
.hz { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 5px;
  color: #fff; font-weight: 800; font-size: 11px; text-shadow: 0 1px 1px rgba(0,0,0,.4); }
.hz-icon span { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%;
  color: #fff; font: 800 10px/1 system-ui, sans-serif; border: 2px solid #0b1120; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.hz-icon.ours span { border-radius: 4px; transform: rotate(45deg); }
.hz-icon.ours span::after { content: ''; }
.cam-pin { font-size: 18px; line-height: 20px; text-align: center; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.cam-pop { width: 240px; max-width: 60vw; display: block; margin: 6px 0; border-radius: 6px; cursor: zoom-in; }
.cam-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; padding: 12px 14px; }
.cam { margin: 0; background: #000; border-radius: 8px; overflow: hidden; cursor: zoom-in; border: 1px solid var(--line); }
.cam img, .cam-off { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.cam-off { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.cam figcaption { padding: 5px 8px; font-size: 12px; background: var(--panel-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-big { width: 100%; border-radius: 8px; background: #000; margin-bottom: 8px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
h3 .btn-row { margin: 0; }
.link-row { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 14px; font-size: 13px; border-top: 1px solid var(--line); }
.feed-note { font-size: 11px; color: var(--muted); padding: 6px 14px 10px; }
.feed-note.warn { color: var(--orange); }
.ok-note { color: var(--ok); font-size: 13px; font-weight: 600; margin: 6px 0; }
td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.net-region { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.net-sigs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 8px; }
.spark { width: 100%; height: 40px; display: block; }
.spark path { fill: none; stroke: var(--info); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.wr-section { margin: 20px 0 8px; }
body.warroom-mode .nav { display: none; }
body.warroom-mode .view { max-width: none; }
body.warroom-mode .wr-map { height: 64vh; }
@media (max-width: 1100px) { .wr-main { grid-template-columns: 1fr; } .wr-map { height: 420px; } .wr-feed-card { max-height: 480px; } }

/* mesh */
.origin { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--info); white-space: nowrap; font-weight: 600; }
.peer-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--off); vertical-align: middle; }
.peer-dot.up { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.peer-dot.down { background: var(--bad); }
.peer-dot.wait { background: var(--warn); }
.badge.link-lan { background: rgba(59,130,246,.18); color: var(--info); }
.badge.link-aredn { background: rgba(249,115,22,.18); color: var(--orange); }
.badge.link-vpn { background: rgba(34,197,94,.18); color: var(--ok); }
.badge.link-internet { background: rgba(234,179,8,.18); color: var(--warn); }
.invite-code { margin-top: 14px; padding: 12px; border: 1px dashed var(--accent); border-radius: var(--radius); }
.invite-code .code { font-size: 24px; font-weight: 800; letter-spacing: .08em; color: var(--accent); margin: 6px 0; word-break: break-all; }
.plain-ol { margin: 8px 0; padding-left: 20px; }
.grid-form label.check, label.check { display: flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.grid-form label.check input, label.check input { width: auto; flex: none; margin: 0; }
.warn-text { color: var(--orange); font-weight: 600; }
.update-note { padding: 10px 14px; margin-bottom: 12px; border-left: 4px solid var(--accent, #3b82f6); }

/* the signed-in user's program: under the site name and as a dashboard banner */
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-program { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
  max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.program-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 16px; }
.program-hero .ph-item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: inset 5px 0 0 var(--accent); padding: 14px 18px 14px 22px; cursor: pointer; }
.program-hero .ph-item:hover { border-color: var(--accent); }
.program-hero .ph-kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.program-hero .ph-name { font-size: 24px; font-weight: 800; margin: 2px 0 4px; }
.program-hero .ph-meta { color: var(--muted); font-size: 14px; }
@media (max-width: 700px) { .brand-program { max-width: 140px; } .program-hero .ph-name { font-size: 20px; } }

/* APRS tab */
.cols-aprs { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); margin-bottom: 16px; }
@media (max-width: 960px) { .cols-aprs { grid-template-columns: 1fr; } }
.aprs-map { height: 560px; }
.aprs-list { max-height: 500px; overflow-y: auto; }
.aprs-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.aprs-tools input { flex: 1 1 160px; min-width: 0; }
.aprs-marker { background: none; border: none; white-space: nowrap; }
.aprs-marker > div { display: flex; align-items: center; gap: 3px; transform: translate(-11px, -12px); }
.aprs-ico { font-size: 20px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.aprs-lbl { font: 600 10.5px/1.2 var(--mono); background: rgba(11,17,32,.82); color: #fff; padding: 1px 4px; border-radius: 4px; }
.aprs-pop { min-width: 220px; display: grid; gap: 4px; }
.aprs-pop .btn-row { margin: 4px 0 0; }
.aprs-out { margin-top: 8px; word-break: break-all; }
.aprs-raw { max-height: 360px; overflow: auto; margin: 0; padding: 0 16px 16px; white-space: pre-wrap; word-break: break-all; }
label.block { display: block; margin: 8px 0; }
details > summary { cursor: pointer; font-weight: 600; margin: 8px 0; }
details.card > summary { margin: 0; }

/* sign-in page: logo centered, form below, footer at the bottom */
.login-page { min-height: calc(100vh - 140px); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 20px; padding: 24px 0 8px; }
.login-brand { text-align: center; display: grid; justify-items: center; gap: 6px; margin-top: auto; }
.login-brand img { width: 190px; height: 190px; filter: drop-shadow(0 6px 18px rgba(0,0,0,.35)); }
.login-name { font-size: 28px; font-weight: 800; letter-spacing: .12em; }
.login-footer { margin-top: auto; padding-top: 24px; color: var(--muted); font-size: 13px; text-align: center; }
@media (max-width: 600px) { .login-brand img { width: 140px; height: 140px; } .login-page { min-height: calc(100vh - 120px); } }

/* program admins */
.chip-admin { border-color: var(--accent); }
td.center { text-align: center; }

/* MeshCore tab */
.mc-types { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.mc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1px solid #0b1120; }
.mc-text { white-space: pre-wrap; word-break: break-word; }
.mc-embed iframe { width: 100%; height: 75vh; border: 0; border-top: 1px solid var(--line); background: #fff; }

/* program logos */
.prog-logo { object-fit: contain; border-radius: 6px; vertical-align: middle; margin-right: 6px; background: #fff1; }
.ph-name .ph-logo { margin-right: 10px; }
.logo-preview { min-height: 72px; display: flex; align-items: center; }
.logo-preview .prog-logo { width: 72px; height: 72px; }

/* weather: stations + top-bar conditions */
.wx-stations { max-height: 340px; overflow-y: auto; }
.wx-station { padding: 10px 12px; margin: 8px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); display: grid; gap: 4px; }
.wx-big { font-size: 22px; font-weight: 800; }
.wx-big span { font-size: 15px; font-weight: 600; }
.wx-station button { justify-self: start; }
.wx-now { font-size: 13px; color: var(--text); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.wx-now-glyph { font-size: 15px; }
.wx-now-text { color: var(--muted); }
@media (max-width: 900px) { .wx-now-text { display: none; } }
