/* Ental Air brand (Brand guide.pdf): Petrol Teal #2D9488 signature, Graphite #333333 text,
   Steel Grey #4C5C5C secondary text, Light Gray #F5F6F7 surfaces, Royal Blue #0047AB links.
   Secondary colours (Ental Neon, System Blue, Soft Coral) are accents only - charts and the
   live indicator. Urbanist for headings, buttons and labels; Inter for body text. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Urbanist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/urbanist-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Urbanist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/urbanist-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Urbanist", "Inter", system-ui, sans-serif;

  --bg: #f5f6f7; --panel: #ffffff; --panel-2: #f0f2f3; --line: #e2e6e7;
  --text: #333333; --muted: #4c5c5c; --faint: #869393; --heading: #2d9488;
  --brand: #2d9488; --brand-text: #1e7268; --brand-soft: #e5f2f0; --on-brand: #ffffff; --link: #0047ab;
  --ok: #1e7268; --ok-soft: #e5f2f0; --warn: #b45309; --warn-soft: #fdf1e1; --bad: #c62828; --bad-soft: #fcebea;
  --info: #1565c0; --info-soft: #e7f1fd;
  --side: #ffffff; --side-text: #4c5c5c; --side-muted: #869393; --side-active: #e5f2f0; --track: #ebeeef;
  --side-strong: #1e7268; --side-hover: #f0f2f3; --side-hover-text: #333333; --side-line: #e2e6e7; --side-foot: #f5f6f7; --side-logo: #2d9488; --side-logo-bar: #333333;
  --logo-bar: #333333; --live: #00ff40;
  --shadow: 0 1px 2px rgba(51, 51, 51, .05), 0 4px 16px rgba(51, 51, 51, .05);
  --radius: 14px;
  --c1: #2d9488; --c2: #0047ab; --c3: #4c5c5c; --c4: #7c4dcc; --coral: #ff7f50;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121717; --panel: #1a2121; --panel-2: #161c1c; --line: #2a3434;
    --text: #eef2f2; --muted: #a9b6b6; --faint: #6f7e7e; --heading: #4fc4b5;
    --brand: #2d9488; --brand-text: #4fc4b5; --brand-soft: #12302c; --on-brand: #ffffff; --link: #7aa7ff;
    --ok: #4fc4b5; --ok-soft: #12302c; --warn: #f5b450; --warn-soft: #2f2511; --bad: #f47c7c; --bad-soft: #321819;
    --info: #64b5f6; --info-soft: #132a40;
    --side: #0d1212; --side-text: #c6d0d0; --side-muted: #7f8d8d; --side-active: rgba(45, 148, 136, .24); --track: #243030;
    --side-strong: #ffffff; --side-hover: rgba(255, 255, 255, .06); --side-hover-text: #ffffff; --side-line: transparent; --side-foot: rgba(255, 255, 255, .05); --side-logo: #ffffff; --side-logo-bar: #ffffff;
    --logo-bar: #eef2f2;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    --c1: #3fb8a9; --c2: #7aa7ff; --c3: #8d9d9d; --c4: #b693ff; --coral: #ff9a76;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121717; --panel: #1a2121; --panel-2: #161c1c; --line: #2a3434;
  --text: #eef2f2; --muted: #a9b6b6; --faint: #6f7e7e; --heading: #4fc4b5;
  --brand: #2d9488; --brand-text: #4fc4b5; --brand-soft: #12302c; --on-brand: #ffffff; --link: #7aa7ff;
  --ok: #4fc4b5; --ok-soft: #12302c; --warn: #f5b450; --warn-soft: #2f2511; --bad: #f47c7c; --bad-soft: #321819;
  --info: #64b5f6; --info-soft: #132a40;
  --side: #0d1212; --side-text: #c6d0d0; --side-muted: #7f8d8d; --side-active: rgba(45, 148, 136, .24); --track: #243030;
  --side-strong: #ffffff; --side-hover: rgba(255, 255, 255, .06); --side-hover-text: #ffffff; --side-line: transparent; --side-foot: rgba(255, 255, 255, .05); --side-logo: #ffffff; --side-logo-bar: #ffffff;
  --logo-bar: #eef2f2;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  --c1: #3fb8a9; --c2: #7aa7ff; --c3: #8d9d9d; --c4: #b693ff; --coral: #ff9a76;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-head); }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
/* Buttons and labels: Urbanist Medium, uppercase (brand guide) */
.label-type, .btn, .seg button, th, .nav-label, .pill, .tabs a {
  font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
}

/* ---------- logo ---------- */
.logo { display: flex; flex-direction: column; gap: 6px; padding: 6px 10px 24px; color: var(--side-logo); --logo-bar: var(--side-logo-bar); text-decoration: none; }
.logo svg { display: block; width: 168px; height: auto; }
.logo small { font-family: var(--font-head); font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--side-muted); padding-left: 2px; }
.logo-full { fill: currentColor; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-text); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--side-line); }
.nav-label { font-size: 11px; color: var(--side-muted); padding: 16px 12px 6px; }
.nav { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 12px; border-radius: 9px; color: var(--side-text); text-decoration: none; font-family: var(--font-head); font-weight: 600; font-size: 15px; }
.nav:hover { background: var(--side-hover); color: var(--side-hover-text); }
.nav.active { background: var(--side-active); color: var(--side-strong); box-shadow: inset 3px 0 0 var(--brand); }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav .count { margin-left: auto; background: #c62828; color: #fff; border-radius: 99px; font-family: var(--font-body); font-size: 11px; font-weight: 600; padding: 1px 7px; }
.side-foot { margin-top: auto; padding: 12px; border-radius: 12px; background: var(--side-foot); font-size: 12px; }
.side-foot .row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.side-foot b { color: var(--side-hover-text); font-weight: 600; }
.side-foot .faint { color: var(--side-muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--side-muted); flex: none; }
/* Ental Neon: the brand's "energy, interactive" accent - used only for the live indicator */
.dot.live { background: var(--live); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 255, 64, .55); } 70% { box-shadow: 0 0 0 7px rgba(0, 255, 64, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 255, 64, 0); } }

main { min-width: 0; }
.top { display: flex; align-items: center; gap: 14px; padding: 16px 28px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 5; }
.crumbs { font-size: 13px; color: var(--muted); min-width: 0; }
.crumbs b { color: var(--heading); font-family: var(--font-head); font-size: 24px; line-height: 1.2; display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search { margin-left: auto; display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; width: 280px; color: var(--muted); }
.search input { border: 0; outline: 0; background: none; width: 100%; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); flex: none; }
.icon-btn svg { width: 18px; height: 18px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; flex: none; background: var(--brand); color: var(--on-brand); font-size: 13px; text-decoration: none; }
.content { padding: 24px 28px 48px; max-width: 1480px; }
.view { animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

/* ---------- building blocks ---------- */
.grid { display: grid; gap: 18px; }
.mt { margin-top: 18px; }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.half { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; min-width: 0; }
.card h3 { font-size: 17px; font-weight: 650; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head .sub { color: var(--muted); font-size: 12.5px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.kpi .value { font-family: var(--font-head); font-size: 32px; font-weight: 700; letter-spacing: -.5px; margin: 6px 0 2px; }
.kpi .value small { font-size: 15px; color: var(--muted); font-weight: 600; margin-left: 3px; }
.kpi .delta { font-size: 12px; color: var(--muted); }
.kpi-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); }
.kpi-icon svg { width: 16px; height: 16px; }
.kpi-icon.info { background: var(--info-soft); color: var(--info); }
.kpi-icon.warn { background: var(--warn-soft); color: var(--warn); }
.kpi-icon.bad { background: var(--bad-soft); color: var(--bad); }
.kpi-icon.ok { background: var(--ok-soft); color: var(--ok); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-size: 11px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.off { background: var(--panel-2); color: var(--faint); border: 1px solid var(--line); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); font-weight: 500; }

.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 5px 9px; border-radius: 7px; font-size: 11.5px; color: var(--muted); }
.seg button.on { background: var(--panel); color: var(--brand-text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg button:disabled { cursor: default; opacity: .5; }
.btn { border: 1px solid var(--line); background: var(--panel); padding: 8px 14px; border-radius: 9px; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none; }
.btn:hover:not(:disabled) { border-color: var(--faint); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.primary:hover:not(:disabled) { background: #26807a; border-color: #26807a; }
.btn.danger { color: var(--bad); }
.btn.small { padding: 5px 10px; font-size: 11.5px; }
.btn.wide { width: 100%; }
.btn svg { width: 15px; height: 15px; }
.link { border: 0; background: none; padding: 0; color: var(--link); font-weight: 600; }
/* Plain links (no class) in content, e.g. device names in the alarm list: Royal Blue */
.content a:not([class]) { color: var(--link); text-decoration: none; }
.content a:not([class]):hover { text-decoration: underline; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; color: var(--faint); padding: 0 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; transition: background .15s; }
tbody tr.click:hover { background: var(--panel-2); }
.dev-name b { display: block; font-weight: 600; }
.dev-name span { color: var(--muted); font-size: 12.5px; }
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }

.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .axis { fill: var(--faint); font-size: 11px; font-family: var(--font-body); }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart-empty { height: 200px; display: grid; place-items: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
.tip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 12px; box-shadow: var(--shadow); white-space: nowrap; opacity: 0; transition: opacity .12s; z-index: 2; }
.tip .t { color: var(--muted); margin-bottom: 4px; }
.tip .r { display: flex; align-items: center; gap: 6px; }
.tip .r i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.chart-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 10px; margin-top: 12px; }
.chart-legend button { display: flex; align-items: center; gap: 8px; border: 1px solid transparent; background: none; padding: 6px 9px; border-radius: 8px; font-size: 12.5px; text-align: left; min-width: 0; transition: background .15s, opacity .15s; }
.chart-legend button:hover { background: var(--panel-2); border-color: var(--line); }
.chart-legend button span { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-legend button b { margin-left: auto; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart-legend i { width: 14px; height: 3px; border-radius: 2px; flex: none; background: var(--c); }
.chart-legend i.dash { background: repeating-linear-gradient(90deg, var(--c) 0 4px, transparent 4px 7px); }
.chart-legend i.area { height: 10px; background: color-mix(in srgb, var(--c) 35%, transparent); border-top: 2px solid var(--c); border-radius: 2px; }
.chart-legend button.off { opacity: .45; }
.chart-legend button.off span { text-decoration: line-through; }
.chart-legend button.off i { background: var(--line); border-color: var(--line); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }

.list-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.list-item:last-child { border-bottom: 0; padding-bottom: 0; }
a.list-item { text-decoration: none; }
a.list-item:hover b { color: var(--brand-text); }
.sev { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.sev svg { width: 16px; height: 16px; }
.sev.bad { background: var(--bad-soft); color: var(--bad); }
.sev.warn { background: var(--warn-soft); color: var(--warn); }
.sev.info { background: var(--info-soft); color: var(--info); }
.sev.ok { background: var(--ok-soft); color: var(--ok); }
.li-main { min-width: 0; flex: 1; }
.li-main b { font-weight: 600; display: block; }
.li-main span { color: var(--muted); font-size: 12.5px; }
.li-time { color: var(--faint); font-size: 12px; white-space: nowrap; }
.empty { color: var(--muted); text-align: center; padding: 28px; }

.progress { height: 8px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.progress > div { height: 100%; border-radius: 99px; background: var(--brand); transition: width .6s ease; }

.back { color: var(--muted); display: inline-flex; gap: 6px; align-items: center; margin-bottom: 14px; font-family: var(--font-head); font-weight: 600; text-decoration: none; }
.back:hover { color: var(--brand-text); }
.hero { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.hero-img { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; flex: none; background: var(--brand-soft); border: 1px solid var(--line); color: var(--brand-text); }
.hero-img svg { width: 34px; height: 34px; }
.hero h2 { font-size: 26px; font-weight: 700; letter-spacing: -.2px; }
.hero .meta { color: var(--muted); font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; align-items: center; }
.hero .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.gauges { grid-template-columns: repeat(6, minmax(0, 1fr)); }
/* Instrument dials: --g is the dial's colour, set per card */
.gauge { text-align: center; padding: 14px 10px 16px; position: relative; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--g) 13%, transparent), transparent 62%), var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 color-mix(in srgb, var(--g) 45%, transparent); }
.gauge svg { width: 118px; height: 118px; display: block; margin: 0 auto; overflow: visible; }
.gauge line { stroke-width: 3; stroke-linecap: round; }
.gauge line.g-on { stroke: var(--g); }
.gauge .g-segs { filter: url(#gGlow); }
.gauge .g-ring { stroke: var(--g); opacity: .55; }
.gauge .g-dot { fill: var(--g); filter: url(#gGlow); }
.gauge line.g-mark { stroke: var(--text); stroke-width: 2.2; }
.gauge .g-val { font-family: var(--font-head); font-size: 25px; font-weight: 700; fill: var(--text); letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.gauge .g-unit { font-family: var(--font-head); font-size: 9.5px; font-weight: 600; fill: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.gauge .g-label { font-family: var(--font-head); color: var(--text); font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }
.gauge .g-sub { font-size: 11.5px; color: var(--faint); min-height: 1.5em; }
/* On opening the page the lit segments switch on one after another (not on live refreshes) */
.gauges.boot line.g-on { animation: seg-on .35s ease-out both; animation-delay: calc(var(--i) * 22ms); }
@keyframes seg-on { from { opacity: 0; stroke: var(--track); } }
@media (prefers-reduced-motion: reduce) { .gauges.boot line.g-on { animation: none; } }
.track { stroke: var(--track); }

.control-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.control-row:last-of-type { border-bottom: 0; }
.control-row .lbl b { display: block; font-weight: 600; }
.control-row .lbl span { color: var(--muted); font-size: 12.5px; }
.control-row.changed .lbl b::after { content: " •"; color: var(--brand-text); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.stepper button { width: 36px; height: 36px; border: 0; background: none; font-size: 18px; color: var(--muted); }
.stepper button:hover:not(:disabled) { background: var(--panel); color: var(--brand-text); }
.stepper output { min-width: 92px; text-align: center; font-family: var(--font-head); font-weight: 700; font-size: 17px; }
select.input, .input { border: 1px solid var(--line); background: var(--panel-2); border-radius: 9px; padding: 8px 10px; min-width: 0; }
.input:focus, .field input:focus, .field select:focus { outline: 2px solid color-mix(in srgb, var(--brand) 50%, transparent); outline-offset: 1px; }

.switch { width: 40px; height: 23px; border-radius: 99px; background: var(--line); border: 0; position: relative; transition: background .2s; padding: 0; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch.on { background: var(--brand); }
.switch.on::after { transform: translateX(17px); }

.release { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 12px; background: var(--panel-2); }
.release + .release { margin-top: 12px; }
.release.retired { opacity: .7; }
.release-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.release-head b { font-family: var(--font-head); font-size: 17px; font-weight: 700; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-text); font-size: 12.5px; font-weight: 600; }
.chip button { border: 0; background: none; color: inherit; width: 20px; height: 20px; border-radius: 50%; line-height: 1; font-size: 15px; }
.chip button:hover { background: color-mix(in srgb, var(--brand) 20%, transparent); }
details summary { font-size: 13px; }

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; font-size: 12.5px; flex-wrap: wrap; }
.pager .muted { margin-right: auto; }
.version-row { display: block; text-decoration: none; padding: 8px 10px; margin: 0 -10px 6px; border-radius: 10px; }
.version-row:hover { background: var(--panel-2); }

.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); }
.lang-switch button { border: 0; background: none; padding: 4px 10px; border-radius: 7px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.lang-switch button.on { background: var(--panel); color: var(--brand-text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.login-card .lang-switch { display: flex; width: max-content; margin: 18px auto 0; }

.card-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 13px; }
.login-card a, .login-card .link { color: var(--link); text-decoration: none; font-weight: 600; }
.login-card a:hover { text-decoration: underline; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 550; text-align: right; overflow-wrap: anywhere; }

.toast { position: fixed; bottom: 24px; right: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.18); display: flex; gap: 10px; align-items: center; transform: translateY(20px); opacity: 0; transition: all .25s; z-index: 60; max-width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast.show { transform: none; opacity: 1; }
.toast .sev { width: 28px; height: 28px; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; font-size: 12.5px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--brand-text); border-bottom-color: var(--brand); }

/* ---------- forms, modal, login ---------- */
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.field input, .field select { border: 1px solid var(--line); background: var(--panel-2); border-radius: 9px; padding: 10px 12px; font-weight: 400; width: 100%; }
.field small { color: var(--muted); font-weight: 400; }
.form-error { background: var(--bad-soft); color: var(--bad); border-radius: 9px; padding: 9px 12px; font-size: 13px; margin-bottom: 14px; }
.notice { background: var(--brand-soft); border-radius: 12px; padding: 14px; font-size: 13px; }
.notice.warn { background: var(--warn-soft); }
.secret { font-family: ui-monospace, Consolas, monospace; font-size: 16px; letter-spacing: .06em; padding: 12px; border-radius: 9px; background: var(--panel-2); border: 1px dashed var(--faint); word-break: break-all; text-align: center; user-select: all; }
.modal-back { position: fixed; inset: 0; background: rgba(18, 23, 23, .6); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .15s; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.35); width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px; }
.modal.wide { width: min(760px, 100%); }
.modal h2 { font-size: 21px; font-weight: 700; color: var(--heading); margin-bottom: 14px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.terminal { background: #0d1212; color: #c9efe9; border-radius: 10px; padding: 12px; height: 320px; overflow: auto; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; white-space: pre-wrap; }
.terminal .cmd { color: #4fc4b5; }
.terminal .err { color: #f9a8a8; }
.term-input { display: flex; gap: 8px; margin-top: 10px; }
.term-input input { flex: 1; font-family: ui-monospace, Consolas, monospace; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(1100px 560px at 15% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent), var(--bg); }
.login-card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 30px 28px 28px; }
.login-logo { color: var(--brand); --logo-bar: var(--logo-bar); margin-bottom: 26px; display: block; }
.login-logo svg { width: 190px; height: auto; display: block; }
.login h1 { font-size: 26px; font-weight: 700; color: var(--heading); margin-bottom: 4px; }
.login .tagline { color: var(--muted); font-size: 13px; margin: 0 0 20px; }

@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gauges { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; overflow-x: auto; padding: 10px 12px; gap: 4px; align-items: center; min-width: 0; border-right: 0; border-bottom: 1px solid var(--side-line); }
  .logo { padding: 0 10px 0 2px; flex: none; }
  .logo svg { width: 104px; }
  .logo small, .nav-label, .side-foot { display: none; }
  .nav { width: auto; white-space: nowrap; padding: 8px 10px; }
  .nav.active { box-shadow: inset 0 -2px 0 var(--brand); }
  .top { padding: 12px 16px; position: static; flex-wrap: wrap; }
  .search { order: 3; width: 100%; margin-left: 0; }
  .top .icon-btn { margin-left: auto; }
  .content { padding: 16px; }
  .half { grid-template-columns: minmax(0, 1fr); }
  .gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero .actions { margin-left: 0; width: 100%; }
  .crumbs b { font-size: 21px; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none; }
  .toast { right: 16px; bottom: 16px; }
}
