/* Night-shift dispatch console */
:root {
  --ink: #07111b;
  --console: #0c1925;
  --bezel: #122333;
  --bezel-hi: #18304a;
  --rule: #1d3448;
  --rule-soft: #162a3c;
  --text: #d7e3ee;
  --dim: #7d93a7;
  --faint: #4f6679;
  --scope: #57d3ec;
  --scope-deep: #1b5d73;
  --lcd: #ffb43d;
  --lcd-bg: #1d1407;
  --lcd-glow: rgba(255, 180, 61, .35);
  --tx: #ff5747;
  --ok: #4fe0a0;
  --warn: #ffcf5c;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --font: "Bahnschrift", "DIN Alternate", "Segoe UI", system-ui, sans-serif;
  --font-cond: "Bahnschrift Condensed", "Bahnschrift SemiCondensed", "Roboto Condensed", "Arial Narrow", var(--font);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--text); font: 14px/1.45 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: var(--scope); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--scope-deep); }
:focus-visible { outline: 2px solid var(--scope); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 10px; border: 2px solid var(--console); }
::-webkit-scrollbar-track { background: transparent; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: var(--bezel); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 7px 14px; cursor: pointer; transition: background .12s, border-color .12s; }
button:hover:not(:disabled) { background: var(--bezel-hi); border-color: #2b4a66; }
button:active:not(:disabled) { transform: translateY(1px); }
button.primary { background: linear-gradient(#1f6f8a, #175a71); border-color: #2c8eaf; color: #fff; }
button.primary:hover:not(:disabled) { background: linear-gradient(#2580a0, #1b6681); }
button.danger { background: #3a1518; border-color: #6e2a30; color: #ffd6d2; }
button.ghost { background: transparent; border-color: transparent; color: var(--dim); }
button.ghost:hover:not(:disabled) { color: var(--text); background: var(--bezel); }
button.small { padding: 4px 10px; font-size: 12.5px; border-radius: var(--r-sm); }
button.icon { padding: 0; width: 34px; height: 34px; display: inline-grid; place-items: center; }
button:disabled { opacity: .4; cursor: default; }
input, select, textarea { background: #08131e; border: 1px solid var(--rule); border-radius: var(--r-md); padding: 7px 10px; outline: none; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--scope); box-shadow: 0 0 0 3px rgba(87, 211, 236, .14); }
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { accent-color: var(--scope); }
input[type=range] { padding: 0; border: 0; background: none; accent-color: var(--lcd); }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--dim); }
.mono { font-family: var(--font-cond); letter-spacing: .02em; }

/* switch */
.switch { position: relative; display: inline-block; width: 36px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #0a1621; border: 1px solid var(--rule); border-radius: 20px; transition: .15s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 14px; height: 14px; left: 2px; top: 2px; border-radius: 50%; background: var(--faint); transition: .15s; }
.switch input:checked + span { background: #12404d; border-color: #2a7f96; }
.switch input:checked + span::after { left: 18px; background: var(--scope); box-shadow: 0 0 8px rgba(87, 211, 236, .6); }
.switch input:focus-visible + span { outline: 2px solid var(--scope); outline-offset: 2px; }

/* status lamps */
.lamp { width: 8px; height: 8px; border-radius: 50%; background: #3a1b1d; box-shadow: 0 0 0 2px rgba(255, 87, 71, .15); display: inline-block; flex: none; }
.lamp.on { background: var(--ok); box-shadow: 0 0 0 2px rgba(79, 224, 160, .18), 0 0 10px rgba(79, 224, 160, .7); }

/* ---------------- login ---------------- */
.login { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); height: 100%; }
.login-scope { position: relative; overflow: hidden; background: radial-gradient(circle at 50% 50%, #0d2433 0%, var(--ink) 70%); }
.login-scope canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.login-scope .brand { position: absolute; left: 48px; bottom: 44px; max-width: 46ch; }
.login-scope .brand h1 { font: 600 40px/1.05 var(--font-cond); margin: 0 0 10px; letter-spacing: .01em; }
.login-scope .brand p { color: var(--dim); margin: 0; }
.login-panel { display: grid; place-items: center; background: var(--console); border-left: 1px solid var(--rule); padding: 32px; }
.login-panel form { width: 100%; max-width: 320px; }
.login-panel h2 { font-size: 22px; font-weight: 600; margin: 0 0 4px; }
.login-panel .sub { color: var(--dim); margin: 0 0 26px; }
.login-panel label { display: block; color: var(--dim); font-size: 13px; margin: 14px 0 6px; }
.login-panel input { width: 100%; padding: 10px 12px; }
.login-panel button { width: 100%; margin-top: 24px; padding: 11px; font-weight: 600; }
.err { color: #ff9a8f; min-height: 20px; margin-top: 12px; font-size: 13px; }

/* ---------------- app shell ---------------- */
.app { display: grid; grid-template-rows: 52px 1fr; height: 100%; }
.topbar { height: 52px; display: flex; align-items: center; gap: 18px; padding: 0 16px; background: linear-gradient(#0f1f2e, #0b1824); border-bottom: 1px solid var(--rule); position: relative; z-index: 5; }
.brandmark { display: flex; align-items: center; gap: 10px; font: 600 17px var(--font-cond); letter-spacing: .02em; white-space: nowrap; }
.brandmark svg { width: 26px; height: 26px; }
.pills { display: flex; gap: 8px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; border-radius: 30px; background: #0a1622; border: 1px solid var(--rule-soft); font-size: 12.5px; color: var(--dim); white-space: nowrap; }
.pill b { color: var(--text); font-weight: 500; }
.topbar .spacer { flex: 1; }
.userbox { display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #1f6f8a, #123a4d); display: grid; place-items: center; font-weight: 600; font-size: 13px; color: #e6f8ff; }
.userbox .who { line-height: 1.15; }
.userbox .who small { display: block; color: var(--dim); font-size: 11.5px; }

.main { display: grid; grid-template-columns: 300px minmax(0, 1fr) 392px; min-height: 0; }
.panel { background: var(--console); display: flex; flex-direction: column; min-height: 0; }
.panel.left { border-right: 1px solid var(--rule); }
.panel.right { border-left: 1px solid var(--rule); }
.panel-head { padding: 14px 14px 10px; }
.searchbox { position: relative; }
.searchbox svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.searchbox input { width: 100%; padding-left: 34px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 6px; border-radius: 30px; border: 1px solid var(--rule); background: #0a1622; color: var(--dim); font-size: 12.5px; cursor: pointer; user-select: none; transition: .12s; }
.chip canvas { flex: none; }
.chip .n { color: var(--faint); font-size: 11.5px; min-width: 1ch; }
.chip.on { color: var(--text); border-color: #2a5670; background: #0f2636; }
.chip.on .n { color: var(--scope); }
.chip:hover { border-color: #2f5672; }
.list-head { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 14px 6px; border-top: 1px solid var(--rule); color: var(--dim); font-size: 12.5px; }
.elist { flex: 1; overflow: auto; padding: 0 6px 10px; }
.erow { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r-md); cursor: pointer; }
.erow:hover { background: var(--bezel); }
.erow.sel { background: #10303f; box-shadow: inset 2px 0 0 var(--scope); }
.erow .nm { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.erow .nm small { display: block; color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.erow .sp { color: var(--dim); font: 13px var(--font-cond); text-align: right; }
.erow .sp.talk { color: var(--ok); }
.empty { color: var(--dim); padding: 18px 14px; font-size: 13px; }

/* map */
.mapwrap { position: relative; min-width: 0; min-height: 0; background: var(--ink); overflow: hidden; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#map.drag { cursor: grabbing; }
.hud { position: absolute; display: flex; gap: 6px; }
.hud.tl { top: 14px; left: 14px; }
.hud.tr { top: 14px; right: 14px; flex-direction: column; }
.hud.bl { bottom: 14px; left: 14px; align-items: flex-end; }
.hud.br { bottom: 14px; right: 14px; }
.glass { background: rgba(10, 22, 34, .82); backdrop-filter: blur(8px); border: 1px solid rgba(87, 211, 236, .14); border-radius: var(--r-md); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.hud select.glass { padding: 7px 10px; }
.hud .stack { display: flex; flex-direction: column; overflow: hidden; }
.hud .stack button { border: 0; border-radius: 0; background: transparent; width: 36px; height: 36px; padding: 0; display: grid; place-items: center; color: var(--dim); }
.hud .stack button + button { border-top: 1px solid var(--rule-soft); }
.hud .stack button:hover { color: var(--text); background: rgba(87, 211, 236, .08); }
.hud .stack button.on { color: var(--scope); }
.coords { padding: 6px 10px; font: 13px var(--font-cond); color: var(--dim); }
.coords b { color: var(--text); font-weight: 500; }
.tooltip { position: absolute; pointer-events: none; padding: 7px 10px; font-size: 12.5px; transform: translate(14px, 14px); white-space: nowrap; z-index: 4; }
.tooltip b { display: block; font-weight: 600; }
.tooltip span { color: var(--dim); }
.ctxmenu { position: fixed; padding: 5px; z-index: 30; min-width: 200px; }
.ctxmenu div { padding: 8px 12px; cursor: pointer; border-radius: var(--r-sm); }
.ctxmenu div:hover { background: rgba(87, 211, 236, .1); }

/* right panel tabs */
.tabs { display: flex; gap: 2px; padding: 10px 10px 0; border-bottom: 1px solid var(--rule); }
.tabs button { flex: 1; border: 0; border-radius: var(--r-md) var(--r-md) 0 0; background: transparent; padding: 10px 6px 11px; color: var(--dim); display: flex; justify-content: center; align-items: center; gap: 7px; position: relative; }
.tabs button:hover:not(:disabled) { background: var(--bezel); color: var(--text); }
.tabs button.on { color: var(--text); background: var(--bezel); }
.tabs button.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--scope); border-radius: 2px; }
.tabs .count { background: var(--tx); color: #fff; border-radius: 10px; font-size: 11px; padding: 0 6px; line-height: 17px; }
.tabbody { flex: 1; overflow: auto; padding: 16px; min-height: 0; }

/* details */
.dhead { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.dicon { width: 54px; height: 54px; border-radius: var(--r-lg); background: radial-gradient(circle, #143246, #0b1b28); border: 1px solid var(--rule); display: grid; place-items: center; flex: none; }
.dtitle { font: 600 21px/1.15 var(--font-cond); letter-spacing: .01em; }
.dsub { color: var(--dim); font-size: 13px; margin-top: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag { padding: 3px 9px; border-radius: 20px; background: #0a1622; border: 1px solid var(--rule); font-size: 12px; color: var(--dim); }
.tag.alert { background: #3a1518; border-color: #8d2f37; color: #ffcbc5; }
.tag.good { background: #0f3324; border-color: #23704f; color: #b7f5d8; }
.tag.unit { background: #10303f; border-color: #2a6b85; color: #c8f2ff; }
.gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.gauge { background: var(--bezel); border: 1px solid var(--rule-soft); border-radius: var(--r-md); padding: 10px 10px 9px; }
.gauge .v { font: 600 22px/1 var(--font-cond); }
.gauge .v small { font-size: 13px; color: var(--dim); font-weight: 400; margin-left: 2px; }
.gauge .l { color: var(--dim); font-size: 12px; margin-top: 5px; }
.compass-mini { width: 22px; height: 22px; vertical-align: -5px; margin-right: 4px; }
.kv { display: grid; grid-template-columns: 112px 1fr; gap: 0; border-top: 1px solid var(--rule-soft); }
.kv > div { padding: 8px 0; border-bottom: 1px solid var(--rule-soft); }
.kv .k { color: var(--dim); font-size: 13px; }
.kv .v { word-break: break-word; }
.bar { height: 6px; background: #0a1622; border-radius: 6px; overflow: hidden; margin-top: 5px; }
.bar i { display: block; height: 100%; border-radius: 6px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }
.section-title { font-size: 13px; color: var(--dim); margin: 18px 0 8px; }
.form-row { display: flex; gap: 8px; margin-bottom: 8px; }
.form-row > * { flex: 1; min-width: 0; }
.placeholder { display: grid; place-items: center; text-align: center; height: 100%; color: var(--dim); padding: 30px; }
.placeholder svg { width: 54px; height: 54px; stroke: var(--faint); margin-bottom: 12px; stroke-width: 1.2; }

/* calls & bolos */
.card { background: var(--bezel); border: 1px solid var(--rule-soft); border-radius: var(--r-md); padding: 12px; margin-bottom: 10px; }
.card .t { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.card .meta { color: var(--dim); font-size: 12px; margin-top: 6px; }
.callcard { border-left: 3px solid var(--tx); }
.code { font: 600 13px var(--font-cond); background: #3a1518; color: #ffcbc5; border-radius: var(--r-sm); padding: 1px 6px; }
.plate { display: inline-block; font: 600 17px var(--font-cond); letter-spacing: .12em; background: #f2f0e6; color: #1c2a5a; border-radius: 4px; padding: 2px 10px; border: 2px solid #c9c6b6; }
.composer { background: #0a1622; border: 1px dashed var(--rule); border-radius: var(--r-md); padding: 12px; margin-bottom: 14px; }
.composer .t { font-weight: 600; margin-bottom: 10px; }

/* toasts */
.toast-wrap { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { background: rgba(12, 25, 37, .96); backdrop-filter: blur(8px); border: 1px solid var(--rule); border-left: 3px solid var(--scope); border-radius: var(--r-md); padding: 11px 14px; min-width: 280px; max-width: 400px; box-shadow: var(--shadow); animation: toastIn .18s ease-out; }
.toast.bad { border-left-color: var(--tx); }
.toast button { margin-left: 8px; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- radio console ---------------- */
.rc-status { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.rc-status .state { flex: 1; color: var(--dim); font-size: 13px; }
.rc-status .state b { color: var(--text); font-weight: 500; display: block; }
.tuner { background: linear-gradient(#0f1e2c, #0b1723); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 12px; margin-bottom: 14px; box-shadow: var(--shadow); }
.bandsel { display: flex; gap: 4px; margin-bottom: 10px; }
.bandsel button { flex: 1; padding: 6px 4px; font-size: 12.5px; border-radius: var(--r-sm); background: #0a1622; color: var(--dim); }
.bandsel button.on { color: var(--lcd); border-color: #6d4a12; background: #24190a; }
.lcdrow { display: flex; gap: 6px; align-items: stretch; }
.lcd { flex: 1; background: radial-gradient(ellipse at 50% 0%, #2a1d0a, var(--lcd-bg) 70%); border: 1px solid #3a2a10; border-radius: var(--r-md); padding: 6px 12px; box-shadow: inset 0 0 18px rgba(0, 0, 0, .6); position: relative; }
.lcd input { width: 100%; border: 0; background: transparent; padding: 0; color: var(--lcd); text-shadow: 0 0 10px var(--lcd-glow); font: 600 30px/1.15 var(--font-cond); letter-spacing: .06em; box-shadow: none; }
.lcd input::placeholder { color: rgba(255, 180, 61, .25); }
.lcd .unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: rgba(255, 180, 61, .55); font: 13px var(--font-cond); pointer-events: none; }
.lcd .range { color: rgba(255, 180, 61, .5); font: 12px var(--font-cond); }
.stepper { display: flex; flex-direction: column; gap: 4px; }
.stepper button { flex: 1; width: 38px; padding: 0; border-radius: var(--r-sm); }
.tuner .addbtn { margin-top: 10px; width: 100%; }

.ptt { width: 100%; padding: 16px; margin: 0 0 6px; border-radius: var(--r-lg); background: linear-gradient(#2a1114, #1c0b0d); border: 1px solid #5b2229; color: #ffb4ab; font: 600 17px var(--font-cond); letter-spacing: .04em; user-select: none; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ptt small { font: 400 12px var(--font); color: rgba(255, 180, 171, .6); letter-spacing: 0; }
.ptt.on { background: radial-gradient(circle at 50% 30%, #ff7a6c, var(--tx) 60%, #b4281c); border-color: #ffb0a6; color: #fff; box-shadow: 0 0 30px rgba(255, 87, 71, .45); }
.ptt.on small { color: rgba(255, 255, 255, .85); }
.meter { height: 5px; background: #0a1622; border-radius: 5px; overflow: hidden; margin: 6px 2px 16px; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ok), var(--warn) 75%, var(--tx)); transition: width 60ms linear; }

.strips-title { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--dim); margin: 4px 2px 8px; }
.strip { display: grid; grid-template-columns: 6px 1fr auto; gap: 0 12px; align-items: stretch; background: var(--bezel); border: 1px solid var(--rule-soft); border-radius: var(--r-md); margin-bottom: 8px; overflow: hidden; }
.strip .act { background: #0a1622; }
.strip.rx .act { background: var(--ok); box-shadow: 0 0 12px var(--ok); }
.strip.txing .act { background: var(--tx); box-shadow: 0 0 12px var(--tx); }
.strip.txsel { border-color: #6d4a12; }
.strip .body { padding: 9px 0; min-width: 0; }
.strip .freqline { display: flex; align-items: baseline; gap: 8px; }
.strip .f { font: 600 22px/1 var(--font-cond); color: var(--lcd); text-shadow: 0 0 8px var(--lcd-glow); letter-spacing: .04em; }
.strip.off .f { color: #8a7650; text-shadow: none; }
.strip .band { font-size: 12px; color: var(--dim); }
.strip .who { font-size: 12.5px; color: var(--ok); min-height: 17px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-top: 3px; }
.strip .pres { font-size: 12px; color: var(--dim); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.strip .ctrl { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 8px 10px 8px 0; align-items: flex-end; }
.strip .ctrl .row { display: flex; gap: 6px; align-items: center; }
.strip .txbtn { padding: 3px 9px; font: 600 12px var(--font-cond); border-radius: var(--r-sm); letter-spacing: .04em; }
.strip .txbtn.on { background: #24190a; border-color: #9a6a1a; color: var(--lcd); }
.strip input[type=range] { width: 84px; }
.onair .strip { grid-template-columns: 6px 1fr auto; opacity: .9; }
.alertbox { margin-top: 18px; }
.log { font: 12.5px var(--font-cond); color: var(--dim); max-height: 180px; overflow: auto; border-top: 1px solid var(--rule-soft); }
.log div { padding: 4px 2px; border-bottom: 1px solid var(--rule-soft); }
.log time { color: var(--faint); margin-right: 8px; }

/* ---------------- admin ---------------- */
.admin { display: grid; grid-template-columns: 236px minmax(0, 1fr); height: calc(100% - 52px); }
.admin nav { background: var(--console); border-right: 1px solid var(--rule); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.admin nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; color: var(--dim); border-radius: var(--r-md); text-decoration: none; cursor: pointer; }
.admin nav a:hover { background: var(--bezel); color: var(--text); }
.admin nav a.on { background: #10303f; color: var(--text); box-shadow: inset 2px 0 0 var(--scope); }
.admin nav a.on svg { color: var(--scope); }
.admin section { padding: 28px 36px 60px; overflow: auto; }
.admin h2 { margin: 0 0 6px; font: 600 26px var(--font-cond); letter-spacing: .01em; }
.admin .lede { color: var(--dim); margin: 0 0 22px; max-width: 70ch; }
.admin h3 { margin: 28px 0 12px; font-size: 15px; font-weight: 600; }
.group { background: var(--console); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 6px 18px; margin-bottom: 18px; max-width: 980px; }
.field { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule-soft); }
.field:last-child { border-bottom: 0; }
.field label { color: var(--text); }
.field label small { display: block; color: var(--dim); font-size: 12.5px; margin-top: 2px; }
.field .ctl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.field .ctl input:not([type=checkbox]), .field .ctl select { max-width: 340px; width: 100%; }
.checkset { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.checkset label { display: inline-flex; align-items: center; gap: 7px; color: var(--text); }
.savebar { position: sticky; bottom: -60px; padding: 14px 0; display: flex; gap: 10px; }
table.grid { border-collapse: separate; border-spacing: 0; width: 100%; background: var(--console); border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; }
table.grid th, table.grid td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid th { color: var(--dim); font-weight: 500; font-size: 12.5px; background: #0b1722; }
table.grid tbody tr:hover td { background: rgba(87, 211, 236, .03); }
table.grid input:not([type=checkbox]):not([type=radio]), table.grid select { width: 100%; }
table.grid select { min-width: 128px; }
.pre { background: #08131e; border: 1px solid var(--rule); border-radius: var(--r-md); padding: 12px 14px; font: 13px/1.6 var(--font-cond); white-space: pre-wrap; word-break: break-all; color: #c7d7e4; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; max-width: 980px; }
.stat { background: var(--console); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 14px 16px; }
.stat .v { font: 600 24px var(--font-cond); display: flex; align-items: center; gap: 8px; }
.stat .l { color: var(--dim); font-size: 12.5px; margin-top: 2px; }
.calib { position: relative; max-width: 100%; overflow: auto; border: 1px solid var(--rule); border-radius: var(--r-lg); max-height: 70vh; background: #050c13; }
.calib canvas { display: block; cursor: crosshair; }
.calrow { display: grid; grid-template-columns: 80px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; margin-bottom: 8px; max-width: 1100px; }
.calrow .pt { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.calrow .pt i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

@media (max-width: 1200px) {
  .main { grid-template-columns: 260px minmax(0, 1fr) 340px; }
}
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-scope { display: none; }
  .main { grid-template-columns: 1fr; grid-template-rows: 50vh auto auto; overflow: auto; }
  .panel.left { order: 2; max-height: 50vh; }
  .mapwrap { order: 1; min-height: 50vh; }
  .panel.right { order: 3; }
  .pills .pill:nth-child(n+3) { display: none; }
  .admin { grid-template-columns: 1fr; }
  .admin nav { flex-direction: row; overflow-x: auto; }
  .field { grid-template-columns: 1fr; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
