/* Pipeline Tracking System - control-room interface.
   Dark, dense, readable. Status colours always carry a text label as well. */

:root {
  --bg: #091017;
  --panel: #0f1923;
  --panel-2: #132330;
  --line: #213444;
  --line-2: #2c4558;
  --text: #d8e4ec;
  --muted: #8097a8;
  --accent: #46b4ea;
  --ok: #2fc27a;
  --warn: #e9b52e;
  --bad: #ef5350;
  --sim: #c9a0ff;
  --radius: 6px;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; font-weight: 600; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.08rem; }
h3 { font-size: .98rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
code { font-family: var(--mono); background: var(--panel-2); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.right { text-align: right; }
.lead { color: var(--muted); margin: 0; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #031018; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1rem; height: 52px; padding: 0 1rem;
  background: #0b1520; border-bottom: 1px solid var(--line);
}
.brand { color: var(--text); font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand-logo { height: 34px; width: auto; display: block; border-radius: 3px; }
.login-logo { display: block; width: 100%; max-width: 260px; height: auto; margin: 0 auto 1rem; border-radius: 4px; }
@media (max-width: 1100px) { .brand-name { display: none; } }
.search { flex: 1; max-width: 380px; }
.search input { width: 100%; }
.topright { margin-left: auto; display: flex; align-items: center; gap: 1rem; font-size: .88rem; white-space: nowrap; }
.clock { color: var(--muted); }
.bell b { background: var(--bad); color: #fff; border-radius: 9px; padding: 0 .4rem; font-size: .75rem; }
.linkbtn { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.linkbtn:hover { text-decoration: underline; }
.inline { display: inline; margin: 0; }
.navtoggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: var(--radius); width: 38px; height: 34px; padding: 6px 7px; cursor: pointer; flex-direction: column; justify-content: space-between; }
.navtoggle span { display: block; height: 2px; background: var(--text); }

/* Data source banner */
.databanner { display: flex; gap: .75rem; flex-wrap: wrap; align-items: baseline; padding: .4rem 1rem; font-size: .85rem; border-bottom: 1px solid var(--line); }
.databanner strong { letter-spacing: .02em; }
.db-sim { background: #241a35; color: #e2ccff; border-bottom-color: #46316b; }
.db-ok { background: #0f2a1e; color: #a6ecc8; border-bottom-color: #1d5a3f; }
.db-warn { background: #33270a; color: #ffe29a; border-bottom-color: #6a5114; }

/* Shell */
.shell { display: flex; min-height: calc(100vh - 52px); }
.sidenav { width: 190px; flex: none; background: #0b1520; border-right: 1px solid var(--line); padding: .75rem 0; display: flex; flex-direction: column; }
.sidenav a { display: flex; justify-content: space-between; align-items: center; color: var(--muted); padding: .55rem 1rem; border-left: 3px solid transparent; }
.sidenav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.sidenav a.active { color: var(--text); background: var(--panel); border-left-color: var(--accent); }
.count { background: var(--bad); color: #fff; border-radius: 9px; padding: 0 .45rem; font-size: .75rem; }
.navfoot { margin-top: auto; padding: 1rem; font-size: .78rem; color: var(--muted); }
.main { flex: 1; min-width: 0; padding: 1.25rem 1.5rem 3rem; }
.login-body .main { padding: 0; }

/* Flash */
.flash { padding: .65rem .9rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid var(--line-2); background: var(--panel-2); }
.flash-ok { border-color: #1d5a3f; background: #0f2a1e; color: #bff3d8; }
.flash-error { border-color: #7d2a29; background: #321415; color: #ffc9c8; }
.flash-warn { border-color: #6a5114; background: #33270a; color: #ffe29a; }

/* Cards, headings */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.card.narrow { max-width: 520px; margin: 3rem auto; }
.card.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.headrow { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.headrow h1, .headrow h2 { margin: 0; }
.sectionhead { margin: 1.25rem 0 .6rem; }
.grouphead { margin: 1.4rem 0 .6rem; padding-bottom: .35rem; border-bottom: 1px solid var(--line); }
.subhead { margin: .8rem 0 .3rem; color: var(--muted); font-weight: 500; }
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .85rem; color: var(--muted); margin-bottom: .6rem; }
.crumbs span + span::before, .crumbs a + span::before { content: "/"; margin-right: .4rem; color: var(--line-2); }

/* Buttons and forms */
.btn {
  display: inline-block; background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: .45rem .85rem; font: inherit; cursor: pointer; line-height: 1.3;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); color: #031018; border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { background: #6cc6f2; }
.btn.danger { border-color: #7d2a29; color: #ffb4b3; }
.btn.danger:hover { background: #321415; }
.btn.small { padding: .25rem .6rem; font-size: .85rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
input, select, textarea {
  background: #0a141d; color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius); padding: .45rem .6rem; font: inherit; max-width: 100%;
}
input[type=checkbox] { width: 1.05rem; height: 1.05rem; padding: 0; accent-color: var(--accent); }
input[type=color] { padding: 2px; height: 2.1rem; width: 4rem; }
textarea { width: 100%; }
label.field { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .8rem; }
label.field > span { font-size: .85rem; color: var(--muted); }
label.field input, label.field select, label.field textarea { width: 100%; }
label.check, label.field.check { flex-direction: row; align-items: center; gap: .5rem; flex-wrap: wrap; }
label.field.check > span { color: var(--text); font-size: .95rem; }
small.muted { font-size: .78rem; }
.form .actions, .actions { display: flex; gap: .6rem; margin-top: .5rem; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid2.split { gap: 1rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 1rem; padding: .75rem 1rem .25rem; }
legend { padding: 0 .4rem; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.filters label { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .88rem; }
.inlineform { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; margin-top: 1rem; }
.inlineform label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; color: var(--muted); }

/* Tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; }
.card .tablewrap { margin-bottom: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-weight: 500; color: var(--muted); padding: .55rem .7rem; border-bottom: 1px solid var(--line-2); background: #0c1822; white-space: nowrap; }
.table td { padding: .5rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:hover { background: #111f2b; }
.table th.right, .table td.right { text-align: right; }
.card > .table { margin-top: .25rem; }
.pager { display: flex; gap: .3rem; flex-wrap: wrap; margin: 1rem 0; }
.pager a, .pager span { padding: .25rem .6rem; border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--text); }
.pager a.active { background: var(--accent); color: #031018; border-color: var(--accent); }
.swatch { display: inline-block; width: .9rem; height: .9rem; border-radius: 3px; vertical-align: -2px; border: 1px solid var(--line-2); }

/* Status pills and data source badges */
.pill { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; padding: .1rem .55rem .1rem .4rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 14%, transparent); white-space: nowrap; }
.pill i { width: .6rem; height: .6rem; border-radius: 50%; background: var(--c); display: inline-block; }
.src { display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .04em; padding: .05rem .4rem; border-radius: 3px; border: 1px solid; vertical-align: 1px; white-space: nowrap; }
.src-live { color: #7be3ad; border-color: #1d6e49; background: #0e2c1f; }
.src-sim { color: var(--sim); border-color: #5a3d86; background: #251a38; }
.src-cfg { color: #8fc6ea; border-color: #2c5b7d; background: #0f2535; }
.src-his { color: #b4c0ca; border-color: #44566a; background: #17222c; }

/* KPI cards */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; display: flex; flex-direction: column; gap: .15rem; border-top: 3px solid var(--line-2); }
.kpi-l { color: var(--muted); font-size: .82rem; order: 1; }
.kpi-v { font-size: 1.7rem; font-weight: 600; line-height: 1.15; order: 0; }
.kpi-s { color: var(--muted); font-size: .8rem; order: 2; }
.kpi.lvl-ok { border-top-color: var(--ok); }
.kpi.lvl-warning { border-top-color: var(--warn); }
.kpi.lvl-alarm { border-top-color: var(--bad); }
.kpi.skeleton .kpi-v { color: var(--line-2); }

/* Map and schematic */
.seg-toggle { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.seg-toggle button { background: none; color: var(--muted); border: 0; padding: .35rem .8rem; cursor: pointer; font: inherit; font-size: .88rem; }
.seg-toggle button.active { background: var(--accent); color: #031018; font-weight: 600; }
.map-schematic { background: #08121b; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.map-schematic svg { display: block; width: 100%; height: auto; min-width: 640px; }
.map-schematic.vertical svg { min-width: 0; max-width: 520px; margin: 0 auto; }
.map-geo { height: 520px; border: 1px solid var(--line); border-radius: var(--radius); background: #08121b; }
.sch-label { fill: var(--text); font-size: 12px; }
.sch-sub { fill: var(--muted); font-size: 10.5px; }
.sch-seg { fill: var(--muted); font-size: 11px; }
.sch-tag { fill: var(--warn); font-size: 10px; }
.sch-pipe { stroke-linecap: round; fill: none; }
.sch-flow { stroke-linecap: round; fill: none; stroke: #e8f6ff; stroke-opacity: .8; stroke-width: 2; stroke-dasharray: 2 14; animation: flowmove 1.4s linear infinite; }
.sch-node { cursor: pointer; }
.sch-node:hover .sch-ring, .sch-node:focus-visible .sch-ring { stroke: var(--accent); stroke-width: 3; }
.sch-node.selected .sch-ring { stroke: #fff; stroke-width: 3; }
@keyframes flowmove { to { stroke-dashoffset: -32; } }
@media (prefers-reduced-motion: reduce) { .sch-flow { animation: none; } }
.leaflet-container { font-family: var(--font); background: #08121b; }
.leaflet-tile-pane { filter: invert(1) hue-rotate(190deg) brightness(.82) contrast(.9) saturate(.5); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--text); }
.geo-flow { stroke-dasharray: 2 14; animation: flowmove 1.4s linear infinite; }
.nodemarker { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #0b1520; box-shadow: 0 0 0 2px var(--mc, #5a6b78); background: var(--mc, #5a6b78); }
.nodemarker.hollow { background: transparent; }
.nodemarker.interp { border-style: dashed; }

/* Segment cards */
.segcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .75rem; }
.segcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; border-left: 4px solid var(--c, var(--line-2)); }
.segcard h3 { display: flex; justify-content: space-between; gap: .5rem; align-items: center; margin-bottom: .25rem; }
.segcard dl { margin: .5rem 0 0; display: grid; grid-template-columns: auto 1fr; gap: .15rem .75rem; font-size: .85rem; }
.segcard dt { color: var(--muted); }
.segcard dd { margin: 0; text-align: right; }

/* Telemetry table extras */
.telem td { vertical-align: middle; }
.telem tr.sel { background: #14283a; }
.telem .nodelink { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; text-align: left; }
.telem .nodelink:hover { text-decoration: underline; }
.telem .stale { color: var(--warn); }

/* Valves */
.valve { display: inline-block; font-size: .75rem; padding: .05rem .45rem; border-radius: 4px; border: 1px solid var(--line-2); margin: 0 .25rem .25rem 0; white-space: nowrap; }
.vs-open { color: #9deac2; border-color: #1d6e49; }
.vs-closed { color: #b4c0ca; border-color: #44566a; }
.vs-opening, .vs-closing { color: #ffe29a; border-color: #6a5114; }
.vs-fault { color: #ffb4b3; border-color: #7d2a29; background: #321415; }
.valvelist { margin: .6rem 0 0; }

/* Node card and readouts */
.nodecard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.nodecard header { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.nodecard header h2 { margin: 0; }
.nodecard footer { margin-top: .75rem; font-size: .85rem; color: var(--muted); }
.readouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin: 0; }
.readouts > div { background: #0a141d; border: 1px solid var(--line); border-radius: var(--radius); padding: .55rem .75rem; }
.readouts dt { color: var(--muted); font-size: .78rem; }
.readouts dd { margin: 0; font-size: 1.45rem; font-weight: 600; }
.readouts small { font-size: .75rem; color: var(--muted); font-weight: 400; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .6rem 1.2rem; margin: .5rem 0 1rem; }
.facts dt { color: var(--muted); font-size: .8rem; }
.facts dd { margin: 0; }

/* Tabs and ranges */
.tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--line); margin: 1rem 0; }
.tabs a { padding: .5rem .85rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); }
.rangebar { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.rangebar a { padding: .25rem .65rem; color: var(--muted); font-size: .85rem; }
.rangebar a.active { background: var(--accent); color: #031018; }
.rangebar a:hover { text-decoration: none; }

/* Charts */
.chartbox { margin-bottom: 1rem; }
.chartnote { margin-bottom: .35rem; font-size: .9rem; }
.chart { width: 100%; min-height: 240px; position: relative; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .ax { stroke: var(--line-2); }
.chart .gr { stroke: var(--line); }
.chart text { fill: var(--muted); font-size: 11px; }
.chart .legend text { fill: var(--text); }
.chart-tip { position: absolute; pointer-events: none; background: #0c1822; border: 1px solid var(--line-2); border-radius: 4px; padding: .3rem .5rem; font-size: .8rem; transform: translate(-50%, -120%); white-space: nowrap; z-index: 5; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line-2); }
.timeline li { position: relative; padding: 0 0 .9rem 1.1rem; display: grid; grid-template-columns: 8.5rem 1fr; gap: .75rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.timeline li.tl-alarm::before { background: var(--bad); }
.timeline li.tl-alarm_cleared::before { background: var(--ok); }
.timeline li.tl-administrative::before { background: var(--muted); }
.timeline li.tl-movement::before { background: var(--accent); }
.timeline time { color: var(--muted); font-size: .8rem; }
.timeline.compact li { grid-template-columns: 1fr; gap: .1rem; padding-bottom: .65rem; }
.timeline.compact time { order: 2; }

/* Corridor progress bar */
.routeprog { display: flex; gap: 2rem; flex-wrap: wrap; margin-bottom: .5rem; }
.routeprog .big { font-size: 1.7rem; font-weight: 600; }
.corbar { position: relative; display: flex; height: 14px; border-radius: 7px; overflow: visible; background: var(--panel-2); margin-top: .5rem; }
.corseg { background: color-mix(in srgb, var(--c) 55%, #0b1520); height: 100%; }
.corseg:first-child { border-radius: 7px 0 0 7px; }
.corseg:last-of-type { border-radius: 0 7px 7px 0; }
.cortick { position: absolute; top: -3px; width: 2px; height: 20px; background: var(--line-2); }
.cormark { position: absolute; top: -6px; width: 6px; height: 26px; margin-left: -3px; background: #fff; border-radius: 3px; }
.corlabels { display: flex; font-size: .72rem; color: var(--muted); margin: .45rem 0 1rem; }
.corlabels span { text-align: right; overflow: hidden; text-overflow: ellipsis; }
.mini { display: inline-block; width: 70px; height: 6px; background: var(--panel-2); border-radius: 3px; vertical-align: middle; overflow: hidden; }
.mini span { display: block; height: 100%; background: var(--accent); }

/* Admin layout */
.admin-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.subnav { position: sticky; top: 70px; display: flex; flex-direction: column; gap: .8rem; }
.subgroup { display: flex; flex-direction: column; }
.subgroup span { color: var(--muted); font-size: .78rem; margin-bottom: .2rem; }
.subgroup a { color: var(--text); padding: .25rem .5rem; border-radius: 4px; font-size: .92rem; }
.subgroup a.active { background: var(--panel-2); color: var(--accent); }
.subgroup a:hover { text-decoration: none; background: var(--panel); }
.actions-card summary { cursor: pointer; font-weight: 600; }
.actiongrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin-top: 1rem; }

/* Lists */
.alertlist, .notices { list-style: none; margin: 0; padding: 0; }
.alertlist li { padding: .55rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; }
.alertlist li:last-child { border-bottom: 0; }
.notices li { padding: .6rem 0 .6rem .8rem; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
.notices li.unread { border-left-color: var(--accent); }
.doc h3 { margin-bottom: .2rem; }
.vlist { margin: 0 0 1rem; padding-left: 1.2rem; }
.note { border-bottom: 1px solid var(--line); margin-bottom: .6rem; }

/* Supply mix donut */
.donutwrap { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; }
.donut { width: 190px; height: 190px; flex: none; }
.mixlist { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 190px; }
.mixlist li { display: flex; justify-content: space-between; gap: .75rem; padding: .25rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.mixlist i { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; margin-right: .5rem; }

/* Drawer */
.drawer { position: fixed; right: 0; top: 52px; bottom: 0; width: min(460px, 100%); background: var(--panel); border-left: 1px solid var(--line-2); z-index: 25; padding: 1rem 1.1rem 2rem; overflow-y: auto; box-shadow: -12px 0 30px rgba(0, 0, 0, .35); }
.drawer[hidden] { display: none; }
.drawer-close { float: right; background: none; border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--text); padding: .25rem .6rem; cursor: pointer; }
.drawer .nodecard { border: 0; padding: 0; background: none; }

/* Login and installer */
.login { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.login-card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1.8rem; }
.login.wide .login-card { max-width: 760px; }
.login-card h1 { font-size: 1.4rem; margin-bottom: .6rem; }
.login-card label { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .9rem; font-size: .88rem; color: var(--muted); }
.login-card input { width: 100%; }
.login-card .check { flex-direction: row; color: var(--text); }
.login-card .btn { width: 100%; margin-top: .3rem; padding: .6rem; }
.login-card textarea { font-family: var(--mono); font-size: .85rem; }

/* Responsive */
@media (max-width: 1000px) {
  .grid3 { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .subnav { position: static; flex-direction: row; flex-wrap: wrap; gap: 1rem; }
}
@media (max-width: 860px) {
  .navtoggle { display: flex; }
  .sidenav { position: fixed; z-index: 28; top: 52px; bottom: 0; left: 0; transform: translateX(-100%); transition: transform .18s ease; width: 230px; }
  body.navopen .sidenav { transform: none; }
  .main { padding: 1rem .8rem 3rem; }
  .grid2, .grid2.split { grid-template-columns: 1fr; }
  .clock { display: none; }
  .search { max-width: none; }
  .topright .linkbtn { max-width: 8rem; overflow: hidden; text-overflow: ellipsis; }
  .timeline li { grid-template-columns: 1fr; gap: .1rem; }
  .map-geo { height: 420px; }
}
@media (max-width: 560px) {
  .brand-logo { height: 28px; }
  .bell { font-size: 0; }
  .bell b { font-size: .75rem; }
  .bell::before { content: "Notices"; font-size: .88rem; }
}
@media print {
  .topbar, .sidenav, .databanner, .filters, .btn, .tabs { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .tablewrap { border-color: #999; background: #fff; }
  .table th { background: #eee; color: #000; }
}
