/* AKTEL NCC - Network Command Centre
   Operations console theme: brand navy deepened into an ink background, fibre cyan as the only accent,
   state colours reserved for state. IBM Plex Sans for text, Plex Mono only for machine data (IPs, names). */
@font-face { font-family: "Plex Sans"; src: url("plex-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("plex-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("plex-sans-600.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("plex-mono-500.woff2") format("woff2"); font-weight: 500 700; font-display: swap; }

:root {
  --bg: #0d1829; --chrome: #091321; --panel: #12213a; --panel-2: #172a48; --sunk: #0b1628;
  --line: #233a5d; --line-soft: #1a2d4c;
  --text: #e6edf7; --text-2: #b4c3d9; --muted: #8094b3;
  --cyan: #2ec5e8; --cyan-hi: #6fdcf4; --cyan-ink: #05273a;
  --up: #34c77b; --warn: #f0b13a; --down: #f2545f; --idle: #5f7395;
  --up-bg: rgba(52,199,123,.12); --warn-bg: rgba(240,177,58,.13); --down-bg: rgba(242,84,95,.14); --cyan-bg: rgba(46,197,232,.12);
  --r: 10px; --r-s: 6px;
  --top-h: 56px; --side-w: 232px;
  --sans: "Plex Sans", "IBM Plex Sans", system-ui, sans-serif;
  --mono: "Plex Mono", "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 var(--sans); color: var(--text); background: var(--bg); min-height: 100vh;
       display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
a { color: var(--cyan-hi); text-underline-offset: 2px; }
a:hover { color: #a5ecfb; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
h1 { font-size: 22px; line-height: 1.25; margin: 0 0 6px; font-weight: 600; letter-spacing: -.01em; color: #f4f8fd; }
h2 { font-size: 16px; margin: 22px 0 8px; font-weight: 600; color: #f4f8fd; }
h3 { font-size: 15px; margin: 4px 0 8px; font-weight: 600; }
p { margin: 8px 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono, td.mono, code { font-family: var(--mono); font-size: 12.5px; letter-spacing: -.01em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- chrome: top bar, network rail, side navigation ---------- */
.navtoggle { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.top { position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 18px;
       padding: 0 18px; background: var(--chrome); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; flex: 0 0 auto; }
.brand .wordmark { height: 20px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; padding-left: 12px; border-left: 1px solid var(--line); }
.brand-text b { font-size: 15px; font-weight: 600; letter-spacing: .02em; color: #fff; }
.brand-text span { font-size: 11.5px; color: var(--muted); }
.brand:hover .brand-text b { color: var(--cyan-hi); }
.topright { margin-left: auto; display: flex; align-items: center; gap: 12px; min-width: 0; }
.topright .user { font-weight: 500; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role { font-size: 11.5px; color: var(--cyan-hi); background: var(--cyan-bg); border: 1px solid rgba(46,197,232,.35);
        padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.alertchip { background: var(--down); color: #fff; text-decoration: none; font-size: 12.5px; font-weight: 600;
             padding: 3px 11px; border-radius: 99px; white-space: nowrap; }
.alertchip:hover { color: #fff; background: #d63f4a; }

/* the network rail: one dot per device, grouped by site - the console's signature */
.rail { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; flex: 1 1 auto; }
.rail-site { display: flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: var(--r-s); text-decoration: none;
             color: var(--text-2); font-size: 12px; white-space: nowrap; border: 1px solid transparent; }
.rail-site:hover { background: var(--panel); border-color: var(--line); color: var(--text); }
.rail-site.has-down { border-color: rgba(242,84,95,.45); background: var(--down-bg); color: #ffd9dc; }
.rail-dots { display: inline-flex; flex-wrap: wrap; gap: 3px; max-width: 120px; }
.pip { width: 7px; height: 7px; border-radius: 50%; background: var(--idle); display: inline-block; }
.pip.up { background: var(--up); }
.pip.down { background: var(--down); box-shadow: 0 0 0 2px rgba(242,84,95,.35); animation: pulse 1.6s ease-in-out infinite; }
.pip.unknown { background: var(--idle); }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(242,84,95,.08); } }
@media (prefers-reduced-motion: reduce) { .pip.down { animation: none; } }

.burger { display: none; width: 40px; height: 40px; border-radius: var(--r-s); cursor: pointer; flex: 0 0 auto;
          flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.burger span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.burger:hover { background: var(--panel); }
.navtoggle:focus-visible + .top .burger { outline: 2px solid var(--cyan); outline-offset: 1px; }

.shell { flex: 1; display: flex; align-items: stretch; min-height: 0; }
.side { flex: 0 0 var(--side-w); width: var(--side-w); position: sticky; top: var(--top-h); align-self: flex-start;
        height: calc(100vh - var(--top-h)); overflow-y: auto; background: var(--chrome); border-right: 1px solid var(--line);
        display: flex; flex-direction: column; padding: 14px 10px; }
.side nav { flex: 1; }
.navgroup { margin-bottom: 14px; }
.navhead { font-size: 12px; font-weight: 500; color: var(--muted); padding: 4px 12px 6px; }
.side nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px;
              padding: 6px 12px; border-radius: var(--r-s); color: var(--text-2); text-decoration: none; font-weight: 500;
              position: relative; }
.side nav a:hover { background: var(--panel); color: var(--text); }
.side nav a.cur { background: var(--panel-2); color: #fff; }
.side nav a.cur::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--cyan); }
.navbadge { background: var(--down); color: #fff; font-size: 11.5px; font-weight: 600; min-width: 22px; text-align: center;
            border-radius: 99px; padding: 0 7px; }
.side .who { border-top: 1px solid var(--line); padding: 12px 8px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.side .who .user { font-weight: 600; width: 100%; color: var(--text); }
.side .who form { margin: 0 0 0 auto; }
.scrim { display: none; }

main { flex: 1; min-width: 0; width: 100%; max-width: 1360px; margin: 0 auto; padding: 22px 26px 0; display: flex; flex-direction: column; }
main > footer { margin-top: auto; color: var(--muted); font-size: 12px; padding: 22px 0 16px; text-align: center; }
body.plain main { max-width: 1180px; }

/* ---------- surfaces ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 22px; margin-bottom: 18px; }
.card.login { max-width: 440px; margin: 40px auto; }
.card.launch { max-width: 620px; margin: 40px auto; text-align: center; }
.cardhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.error { background: var(--down-bg); color: #ffd3d6; border: 1px solid rgba(242,84,95,.45); border-radius: var(--r-s); padding: 9px 12px; }
.ok { background: var(--up-bg); color: #c9f3dc; border: 1px solid rgba(52,199,123,.45); border-radius: var(--r-s); padding: 9px 12px; }

/* ---------- forms ---------- */
label { display: block; margin: 12px 0; font-weight: 500; font-size: 13px; color: var(--text-2); }
input, select, textarea { display: block; width: 100%; margin-top: 5px; padding: 9px 11px; font: inherit; font-size: 14px; font-weight: 400;
        border: 1px solid var(--line); border-radius: var(--r-s); background: var(--sunk); color: var(--text); }
input::placeholder { color: #5f7395; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(46,197,232,.22); }
select { margin: 5px 0 12px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text); }
label.check input { width: auto; margin: 0; accent-color: var(--cyan); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--cyan); color: var(--cyan-ink);
       border: 1px solid var(--cyan); border-radius: var(--r-s); padding: 8px 16px; font: inherit; font-weight: 600; cursor: pointer;
       text-decoration: none; min-height: 36px; }
.btn:hover { background: var(--cyan-hi); border-color: var(--cyan-hi); color: var(--cyan-ink); }
.btn.small { padding: 4px 11px; font-size: 12.5px; min-height: 30px; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { background: var(--panel-2); border-color: #35527d; color: #fff; }
.btn.danger { background: transparent; color: #ff9aa1; border-color: rgba(242,84,95,.55); }
.btn.danger:hover { background: var(--down-bg); color: #ffc5c9; }
form.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
form.grid .wide { grid-column: 1 / -1; }
form.inline { display: inline-flex; gap: 8px; align-items: center; }
form.inline input { margin: 0; width: 200px; }
#filter { width: 260px; margin: 0; }
.hint { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 5px; }

/* ---------- tables ---------- */
.tablewrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tablewrap > table { min-width: 560px; }
.tablewrap > table.facts, .tablewrap > table.mini { min-width: 0; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); padding: 8px 10px; white-space: nowrap; }
td { border-bottom: 1px solid var(--line-soft); padding: 9px 10px; vertical-align: middle; }
tbody tr:hover td { background: rgba(23,42,72,.55); }
td.name { font-weight: 600; }
td.name a { color: var(--text); text-decoration: none; }
td.name a:hover { color: var(--cyan-hi); text-decoration: underline; }
td.actions { white-space: nowrap; text-align: right; }
td.actions form { display: inline; margin: 0 0 0 6px; }
td.actions .btn { margin-left: 6px; }
td.num, th.num { text-align: right; white-space: nowrap; }
td.nowrap { white-space: nowrap; }
td.wrapv { max-width: 440px; overflow-wrap: anywhere; word-break: break-word; }
tr.off td { opacity: .5; }
tr.bad td, tr.st-down td { background: rgba(242,84,95,.07); }
tr.group td { background: transparent; color: var(--cyan-hi); font-weight: 600; font-size: 12.5px; padding-top: 16px; border-bottom-color: var(--line); }
tr.ip-free td { color: var(--muted); }
tr.ip-reserved td:nth-child(2) { color: var(--warn); font-weight: 600; }
tr.ip-device td:nth-child(2), tr.ip-dns td:nth-child(2) { color: var(--cyan-hi); font-weight: 600; }
table.facts { width: auto; margin: 8px 0 4px; }
table.facts th { font-size: 13px; font-weight: 500; border: 0; padding: 4px 18px 4px 0; vertical-align: top; color: var(--muted); }
table.facts td { border: 0; padding: 4px 0; }
table.mini { width: 100%; font-size: 12.5px; margin-top: 4px; }
table.mini td { padding: 4px 8px 4px 0; border-bottom: 1px solid var(--line-soft); }

/* ---------- badges and state ---------- */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--idle); vertical-align: middle; }
.dot.up { background: var(--up); box-shadow: 0 0 0 3px rgba(52,199,123,.15); }
.dot.down { background: var(--down); box-shadow: 0 0 0 3px rgba(242,84,95,.25); }
.dot.unknown { background: var(--idle); }
.kind { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 99px; background: var(--panel-2); color: var(--text-2);
        border: 1px solid var(--line); white-space: nowrap; font-weight: 500; }
.k-mikrotik { color: #9fd8ff; } .k-olt { color: #c8b6ff; } .k-ubiquiti { color: #9fe8bd; }
.k-server, .k-proxmox { color: #ffd38f; } .k-unknown { color: var(--muted); }
.k-customer { color: #ffc98a; border-color: rgba(240,177,58,.45); background: var(--warn-bg); }
.gpswarn { display: inline-block; margin-left: 6px; font-size: 11.5px; color: #ffd28a; background: var(--warn-bg);
           border: 1px solid rgba(240,177,58,.4); border-radius: 99px; padding: 0 7px; white-space: nowrap; font-weight: 500; }
.alertbadge { display: inline-block; margin-left: 6px; font-size: 11.5px; color: #fff; background: var(--down); border-radius: 99px; padding: 0 7px; font-weight: 600; }
.sev { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 99px; background: var(--warn-bg); color: #ffd28a; font-weight: 600; }
.sev.critical { background: var(--down); color: #fff; }
.sev.major { background: var(--down-bg); color: #ffb8be; }
span.bad, b.bad { color: #ff8d96; font-weight: 600; }
.bar { width: 120px; height: 8px; background: var(--sunk); border-radius: 99px; overflow: hidden; }
svg.nbar { width: 90px; height: 8px; vertical-align: middle; }
svg.nbar .bg { fill: var(--sunk); } svg.nbar .fg { fill: var(--cyan); } svg.nbar .fg.hi { fill: var(--down); }

/* ---------- tabs ---------- */
p.tabs a { text-decoration: none; padding: 3px 9px; border-radius: var(--r-s); color: var(--text-2); }
p.tabs a.cur { background: var(--panel-2); color: #fff; font-weight: 600; }
nav.segtabs { display: flex; flex-wrap: wrap; gap: 2px; margin: 12px 0 6px; padding: 3px; background: var(--sunk); border: 1px solid var(--line);
              border-radius: var(--r); width: fit-content; max-width: 100%; }
nav.segtabs a { text-decoration: none; color: var(--text-2); padding: 6px 14px; border-radius: 7px; font-weight: 600; font-size: 13px;
                display: inline-flex; gap: 7px; align-items: center; }
nav.segtabs a:hover { color: #fff; }
nav.segtabs a.cur { background: var(--panel-2); color: #fff; box-shadow: inset 0 0 0 1px var(--line); }
nav.segtabs .cnt { font-size: 11.5px; background: var(--panel); color: var(--text-2); border-radius: 99px; padding: 0 7px; }
nav.segtabs .cnt.bad { background: var(--down); color: #fff; }

/* ---------- monitor summary tiles ---------- */
p.tiles { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.tile { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 14px; background: var(--sunk); color: var(--text-2); text-decoration: none; }
.tile b { font-size: 20px; margin-right: 4px; color: var(--text); font-weight: 600; }
.tile.up b { color: var(--up); } .tile.down b { color: var(--down); } .tile.alerts b { color: #ff8d96; }

/* ---------- dashboard ---------- */
.dashgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 14px; }
.tile2 { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; background: var(--panel); position: relative; overflow: hidden; }
.tile2::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--up); }
.tile2.bad::before { background: var(--down); } .tile2.warn::before { background: var(--warn); }
.tile2 h2 { margin: 0 0 8px; font-size: 15px; } .tile2 h2 a { color: var(--text); text-decoration: none; }
.tile2 h2 a:hover { color: var(--cyan-hi); }
.tile2 p { margin: 5px 0; font-size: 13.5px; color: var(--text-2); } .tile2 p.big { font-size: 15px; color: var(--text); }
.tile2 b.bad, .tile2 span.bad { color: #ff8d96; }
ul.tight, ul.checks { list-style: none; padding: 0; margin: 6px 0; font-size: 13px; }
ul.tight li, ul.checks li { padding: 3px 0; }
ul.checks li.bad { color: #ffb0b6; }
ul.checks .dot { margin-right: 8px; }

/* network overview (dashboard hero) */
.overview { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 10px; margin: 6px 0 18px; }
.ov-site { display: block; text-decoration: none; color: var(--text); background: var(--panel); border: 1px solid var(--line);
           border-radius: var(--r); padding: 12px 14px; }
.ov-site:hover { border-color: #35527d; background: var(--panel-2); color: #fff; }
.ov-site.has-down { border-color: rgba(242,84,95,.55); background: linear-gradient(0deg, var(--down-bg), var(--down-bg)), var(--panel); }
.ov-site .ov-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ov-site .ov-name { font-weight: 600; }
.ov-site .ov-count { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ov-site .ov-count .bad { color: #ff8d96; }
.ov-site .rail-dots { max-width: none; margin-top: 10px; gap: 4px; }
.ov-site .pip { width: 9px; height: 9px; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.pagehead p { margin: 2px 0 0; color: var(--muted); }

/* ---------- charts ---------- */
svg.chart { width: 100%; height: auto; max-width: 900px; display: block; margin: 4px 0 8px; }
svg.chart .grid { stroke: var(--line-soft); stroke-width: 1; }
svg.chart text { font-size: 11px; fill: var(--muted); font-family: var(--sans); }
svg.chart .ylab { text-anchor: end; } svg.chart .xlab { text-anchor: middle; }
svg.chart polyline, svg.chart line.s1, svg.chart line.s2, svg.chart line.s3 { fill: none; stroke-width: 1.7; }
svg.chart .s1 { stroke: var(--cyan); fill: var(--cyan); }
svg.chart .s2 { stroke: #b28bff; fill: #b28bff; }
svg.chart .s3 { stroke: var(--down); fill: var(--down); }
svg.chart polyline.s1, svg.chart polyline.s2, svg.chart polyline.s3 { fill: none; }

/* ---------- maps ---------- */
.mapwrap { display: flex; gap: 14px; align-items: stretch; }
#topo, #geo { flex: 1 1 auto; min-height: 560px; height: 68vh; border: 1px solid var(--line); border-radius: var(--r); background: #0a1526; overflow: hidden; }
.mapinfo { flex: 0 0 270px; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: var(--panel); overflow: auto; max-height: 68vh; }
.mapinfo h3 { margin: 4px 0 8px; font-size: 15px; }
.mapinfo p { margin: 4px 0; font-size: 13px; }
.mapinfo ul { padding-left: 18px; margin: 4px 0; font-size: 13px; }
.mapinfo form.inline { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.mapinfo form.inline input { flex: 1 1 140px; min-width: 0; }
svg.topo { width: 100%; height: 100%; cursor: grab; user-select: none; }
svg.topo .lk { stroke: #4d6487; fill: none; stroke-linecap: round; }
svg.topo .lk.up { stroke: var(--up); } svg.topo .lk.up.mid { stroke: var(--warn); } svg.topo .lk.up.hi { stroke: var(--down); }
svg.topo .lk.down { stroke: var(--down); stroke-dasharray: 2 5; }
svg.topo .lk.dash { stroke-dasharray: 8 6; }
svg.topo .lkhit { stroke: transparent; stroke-width: 12; cursor: pointer; }
svg.topo .nd { cursor: pointer; }
svg.topo .nd circle { stroke: #0a1526; stroke-width: 2.5; fill: var(--idle); }
svg.topo .nd.up circle { fill: var(--up); } svg.topo .nd.down circle { fill: var(--down); }
svg.topo .nd.seen circle { fill: #22324f; stroke: #5f7395; stroke-dasharray: 3 2; }
svg.topo .nd.alerting circle { stroke: var(--down); stroke-width: 3; }
svg.topo .nd.cust circle { stroke: var(--warn); stroke-dasharray: 4 2; }
svg.topo .nd text { font-size: 12px; fill: var(--text); text-anchor: middle; paint-order: stroke; stroke: #0a1526; stroke-width: 3.5px; font-family: var(--sans); }
p.legend { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.lg { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #0a1526; vertical-align: middle; margin-right: 3px; background: var(--idle); box-shadow: 0 0 0 1px var(--line); }
.lg.up { background: var(--up); } .lg.down { background: var(--down); } .lg.seen { background: #22324f; border-style: dashed; border-color: #5f7395; }
.ll { display: inline-block; width: 22px; height: 0; border-top: 3px solid var(--up); vertical-align: middle; margin-right: 3px; }
.ll.l80 { border-color: var(--warn); } .ll.l100 { border-color: var(--down); } .ll.ldash { border-top-style: dashed; border-color: var(--muted); }
.leaflet-container { background: #0a1526; font-family: var(--sans); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.leaflet-tooltip { background: var(--panel); color: var(--text); border-color: var(--line); }

/* ---------- DNS editor ---------- */
details.edit { display: inline-block; text-align: left; }
details.edit > summary, details.addbox > summary { list-style: none; display: inline-flex; }
details.edit > summary::-webkit-details-marker, details.addbox > summary::-webkit-details-marker { display: none; }
details.edit[open] { display: block; margin-top: 6px; }
details.edit form.inline { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; justify-content: flex-end; }
details.edit form.inline input { width: auto; flex: 1 1 160px; min-width: 0; margin: 0; }
details.edit form.inline input[name=ttl] { flex: 0 0 80px; }
details.edit label.check { margin: 0; font-size: 12.5px; }
details.addbox { margin: 14px 0 6px; }
details.addbox[open] > summary { background: transparent; color: var(--cyan-hi); }
details.addbox form { margin-top: 10px; padding: 14px 16px 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunk); }
h1 .kind { font-size: 11.5px; vertical-align: middle; margin-left: 8px; }

/* ---------- sign-in ---------- */
body.loginpage { background: radial-gradient(1200px 600px at 0% 100%, rgba(46,197,232,.10), transparent 60%), var(--chrome); }
body.loginpage .top { display: none; }
body.loginpage main { max-width: 1080px; padding: 48px 20px 0; justify-content: center; }
.loginwrap { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 580px; border-radius: 16px; overflow: hidden;
             border: 1px solid var(--line); background: var(--panel); box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.loginbrand { position: relative; overflow: hidden; padding: 40px 42px; display: flex; flex-direction: column; background: #0a1526; }
.loginbrand svg.fibres { position: absolute; inset: 0; width: 100%; height: 100%; }
.fibres path { fill: none; stroke: #1c3256; stroke-width: 1.4; }
.fibres path.lit { stroke: var(--cyan); stroke-width: 1.6; stroke-dasharray: 46 400; stroke-dashoffset: 446; opacity: .9;
                   animation: light 5.5s cubic-bezier(.45,0,.2,1) infinite; }
.fibres path.lit.b { animation-delay: 1.4s; } .fibres path.lit.c { animation-delay: 2.7s; } .fibres path.lit.d { animation-delay: 3.9s; }
@keyframes light { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .fibres path.lit { animation: none; stroke-dasharray: none; opacity: .35; } }
.lb-inner { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%; }
.lb-logo { height: 26px; width: auto; display: block; align-self: flex-start; }
.lb-title { margin: auto 0 0; font-size: 46px; line-height: 1.02; font-weight: 600; letter-spacing: -.02em; color: #fff; }
.lb-sub { margin: 10px 0 0; font-size: 18px; color: var(--cyan-hi); font-weight: 500; }
.lb-text { margin: 18px 0 0; max-width: 40ch; color: var(--text-2); font-size: 14.5px; line-height: 1.6; }
.logincard { padding: 44px 44px 30px; display: flex; flex-direction: column; }
.logincard h1 { font-size: 24px; margin: 0 0 6px; }
.logincard > p.muted { margin: 0 0 6px; }
.logincard label { margin: 16px 0 0; }
.logincard input { padding: 11px 12px; font-size: 15px; }
.logincard .btn { width: 100%; margin-top: 22px; min-height: 44px; font-size: 15px; }
.logincard .error { margin: 14px 0 0; }
.loginhelp { margin-top: 18px; font-size: 13.5px; }
.loginhelp summary { cursor: pointer; color: var(--cyan-hi); font-weight: 500; }
.loginhelp p { color: var(--text-2); }
.legal { margin-top: auto; padding-top: 18px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.login-logo { display: block; width: 72px; height: auto; margin: 4px auto 14px; }

/* ---------- small screens ---------- */
@media (max-width: 1180px) { .rail { display: none; } }
@media (max-width: 1023px) {
  .burger { display: flex; }
  .side { position: fixed; z-index: 40; top: 0; left: 0; height: 100vh; height: 100dvh; width: min(84vw, 300px);
          flex-basis: auto; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 8px 0 40px rgba(0,0,0,.5); }
  .navtoggle:checked ~ .shell .side { transform: none; }
  .navtoggle:checked ~ .shell .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(3,8,16,.6); }
  .navtoggle:checked + .top .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .navtoggle:checked + .top .burger span:nth-child(2) { opacity: 0; }
  .navtoggle:checked + .top .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  main { padding: 16px 16px 0; }
  .mapwrap { flex-direction: column; } .mapinfo { flex-basis: auto; max-height: none; }
}
@media (max-width: 860px) {
  body.loginpage main { padding: 14px 12px 0; }
  .loginwrap { grid-template-columns: 1fr; min-height: 0; border-radius: 14px; }
  .loginbrand { padding: 22px 22px 24px; min-height: 170px; }
  .lb-title { font-size: 30px; margin-top: 34px; } .lb-sub { font-size: 15px; } .lb-text { display: none; }
  .logincard { padding: 24px 20px 20px; }
}
@media (max-width: 720px) { form.grid { grid-template-columns: 1fr; } #filter { width: 100%; } }
@media (max-width: 640px) {
  :root { --top-h: 52px; }
  .top { padding: 0 10px; gap: 8px; }
  .brand-text span, .topright .user, .topright .role { display: none; }
  main { padding: 12px 12px 0; }
  .card { padding: 14px; }
  h1 { font-size: 20px; }
  form.inline { display: flex; flex-wrap: wrap; width: 100%; }
  form.inline input, form.inline select { width: 100%; flex: 1 1 100%; }
  td.actions { white-space: normal; }
  p.tiles .tile { flex: 1 1 calc(50% - 10px); }
  #topo, #geo { min-height: 380px; height: 62vh; }
}
@media print { .side, .top, .scrim, .burger { display: none !important; } body { background: #fff; color: #000; } }
.tile2 table.mini td:nth-child(-n+3) { white-space: nowrap; color: var(--text-2); }
.tile2 table.mini td:last-child { overflow-wrap: anywhere; }

/* ---- built-in terminal (v0.11) */
.card.term { display: flex; flex-direction: column; gap: 10px; }
.termhead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.termhead h1 { margin: 0; flex: 1 1 auto; font-size: 1.15rem; }
.termstatus { font-size: .82rem; color: var(--muted, #8fa3bf); }
.termstatus.up { color: var(--up); }
.termstatus.down { color: var(--down); }
.termbox { height: calc(100vh - 290px); min-height: 320px; background: #091321; border: 1px solid #22385a;
  border-radius: 8px; padding: 6px; overflow: hidden; }
@media (max-width: 700px) { .termbox { height: calc(100vh - 300px); } }

/* ---- staff (v0.11) */
.pill { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid; }
.pill.up { color: #9fe6c0; border-color: rgba(52,199,123,.5); background: var(--up-bg); }
.pill.down { color: #ffb3b8; border-color: rgba(242,84,95,.5); background: var(--down-bg); }
table.staff .acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
table.staff .acts form { margin: 0; display: inline-flex; gap: 6px; align-items: center; }
table.staff .acts select { width: auto; margin: 0; padding: 4px 8px; }
p.mono.big { font-size: 22px; letter-spacing: .06em; color: var(--text); background: var(--chrome);
  border: 1px solid #22385a; border-radius: var(--r-s); padding: 10px 14px; display: inline-block; }
.qr { background: #fff; padding: 14px; border-radius: 10px; display: inline-block; line-height: 0; }
.qr svg { width: 220px; height: 220px; }

/* config backups (v0.12) */
table.devices .acts { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
table.devices .acts form { margin: 0; }
.bkwrap { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.bkhist { list-style: none; margin: 0; padding: 0; max-height: 70vh; overflow: auto; border: 1px solid var(--line-soft); border-radius: var(--r-s); }
.bkhist li { padding: 7px 10px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.bkhist li:last-child { border-bottom: 0; }
.bkhist li.cur { background: var(--panel-2); }
.bkhist li a { display: block; color: var(--text); }
pre.cfg { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; background: var(--sunk); border: 1px solid var(--line-soft);
  border-radius: var(--r-s); padding: 10px 0; overflow: auto; max-height: 72vh; margin: 0; }
pre.cfg span { display: block; padding: 0 12px; white-space: pre; }
pre.cfg span.add { background: var(--up-bg); color: #b8f0cf; }
pre.cfg span.del { background: var(--down-bg); color: #ffc2c6; }
pre.cfg span.hunk { color: var(--cyan); background: var(--cyan-bg); margin-top: 6px; }
@media (max-width: 760px) { .bkwrap { grid-template-columns: minmax(0, 1fr); } .bkhist { max-height: 30vh; } }
span.good { color: var(--up); font-weight: 600; }
.k-aktel { color: var(--cyan); border-color: rgba(84,200,232,.35); background: var(--cyan-bg); }

/* ---- website leads (v0.12.2) */
.navbadge.lead { background: #f5a623; color: #0e1f4d; }
table.leads td { vertical-align: top; }
table.leads tr.lead-new td:first-child { box-shadow: inset 3px 0 0 #f5a623; }
form.leadform { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
form.leadform select { width: auto; margin: 0; padding: 4px 8px; }
form.leadform input { width: 170px; margin: 0; padding: 4px 8px; }
table.leads a[href^="tel:"] { white-space: nowrap; }
@media (max-width: 700px) {
  table.leads thead { display: none; }
  table.leads, table.leads tbody, table.leads tr, table.leads td { display: block; width: 100%; }
  table.leads tr { padding: 12px 0 12px 14px; border-bottom: 1px solid #22385a; }
  table.leads td { padding: 2px 0; border: 0; }
  table.leads td.det { margin: 4px 0 8px; }
  table.leads tr.lead-new td:first-child { box-shadow: none; }
  table.leads tr.lead-new { box-shadow: inset 3px 0 0 #f5a623; }
  table.leads td:first-child { color: var(--muted); font-size: 13px; }
  form.leadform input { width: 100%; box-sizing: border-box; }
}

/* ---------- 0.13: AKTEL sign-in, My VPN, Claude access ---------- */
.logincard .btn.sso-btn { margin-top: 14px; }
.loginalt { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: 13.5px; }
.loginalt > summary { cursor: pointer; color: var(--cyan-hi); font-weight: 500; }
.loginalt[open] > summary { margin-bottom: 4px; }
.loginalt .btn { margin-top: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.actions form { margin: 0; }
fieldset.switch { border: 0; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; }
fieldset.switch legend { width: 100%; padding: 0; margin-bottom: 4px; font-weight: 500; font-size: 13px; color: var(--text-2); }
fieldset.switch label.check { margin: 0; }
ol { padding-left: 20px; }
ol li { margin: 4px 0; }
.card > h2:first-child { margin-top: 0; }
.narrow { max-width: 440px; }

/* 0.15: pop-up forms, same-size dashboard tiles with show all / show less, header buttons */
.cardhead .headbtns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
dialog.popup { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--text);
  padding: 18px 22px; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; }
dialog.popup::backdrop { background: rgba(4, 12, 28, .66); }
dialog.popup .pophead { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
dialog.popup .pophead h2 { margin: 0; border: 0; padding: 0; }
.dashgrid { grid-auto-rows: 1fr; }
.tile2 { display: flex; flex-direction: column; min-height: 15rem; }
.tile2 > h2 { border: 0; padding-bottom: 0; }
.tile2 > .tb { max-height: 11.5rem; overflow: hidden; position: relative; flex: 1; }
.tile2 > .tgl { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tile2 > .tgl:checked ~ .tb { max-height: none; }
.tile2 > .more { align-self: flex-start; margin-top: 6px; font-size: 12.5px; color: var(--cyan-hi); cursor: pointer; }
.tile2 > .more .m2, .tile2 > .tgl:checked ~ .more .m1 { display: none; }
.tile2 > .tgl:checked ~ .more .m2 { display: inline; }
.tile2 > .tgl:focus-visible ~ .more { outline: 2px solid var(--cyan-hi); outline-offset: 2px; }
.tile2 table.mini tr:first-child td { border-top: 0; }
.tile2 > .tb.cut::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2.2rem; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--panel)); }
.tile2 > .tgl:checked ~ .tb.cut::after { display: none; }
/* 0.16: router baseline matrix */
table.baseline td.bl-ok { color: var(--up); text-align: center; }
table.baseline td.bl-bad { color: #ff8d96; font-weight: 600; text-align: center; }
table.baseline td.bl-warn { color: var(--warn); text-align: center; }
table.baseline td.bl-na { color: var(--text-2); text-align: center; }
table.baseline th { white-space: nowrap; font-size: 12px; }
pre.wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
form.resblock { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
form.resblock select, form.resblock input { width: auto; min-width: 10rem; }
svg.topo .lk.virt { stroke-dasharray: 3 4; stroke-width: 1.4; }
/* 0.19: folding menu groups, phone QR */
details.navgroup { margin-bottom: 4px; }
details.navgroup > summary.navhead { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  min-height: 34px; padding: 4px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
details.navgroup > summary.navhead::-webkit-details-marker { display: none; }
details.navgroup > summary.navhead::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; opacity: .7; }
details.navgroup[open] > summary.navhead::after { transform: rotate(45deg); }
details.navgroup > summary.navhead:hover { color: var(--text); background: var(--panel); }
details.navgroup > summary.navhead:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
details.navgroup .navsub { padding: 2px 0 8px 8px; }
.navgroup.single { margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) { details.navgroup > summary.navhead::after { transition: none; } }
.qr { background: #fff; display: inline-block; padding: 10px; border-radius: 10px; line-height: 0; }
.qr svg { width: min(72vw, 300px); height: auto; }

/* 0.20: responsive pass (Anurag 16.11). Long codes wrap instead of widening the page; below 640 px wide tables become
   one card per row with the column name beside each value (labels set by app.js). */
.mono, code { overflow-wrap: anywhere; }
table.facts td { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .tablewrap > table.stack { min-width: 0; }
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack { margin-top: 8px; }
  table.stack tr { border: 1px solid var(--line-soft); border-radius: 10px; padding: 6px 12px; margin: 10px 0; }
  table.stack td { border: 0; padding: 5px 0; display: grid; grid-template-columns: minmax(88px, 36%) minmax(0, 1fr);
                   gap: 10px; align-items: start; justify-items: start; text-align: left; overflow-wrap: anywhere; }
  table.stack td::before { content: attr(data-label); color: var(--muted); font-size: 12px; line-height: 1.6; }
  table.stack td[data-label=""], table.stack td[colspan] { grid-template-columns: minmax(0, 1fr); }
  table.stack td[data-label=""]::before, table.stack td[colspan]::before { display: none; }
  table.stack td:empty { display: none; }
  table.stack .acts { justify-content: flex-start; flex-wrap: wrap; }
}
/* 0.20.0: worked figures in filing drafts; long labels wrap, amounts stay on one line */
table.facts th { white-space: normal; min-width: 7em; }
table.fig td { white-space: nowrap; overflow-wrap: normal; text-align: right; padding-left: 12px; }

/* 0.20.3: light and dark mode (Anurag 16.11 09:23). Dark stays the default look; "Auto" follows the device setting;
   the header switch (Auto / Light / Dark) is remembered on each device. The login page keeps its dark brand panel. */
.themebtn { background: transparent; border: 1px solid var(--line); color: var(--text-2); border-radius: 99px; font: inherit;
            font-size: 12px; padding: 3px 10px; cursor: pointer; }
.themebtn:hover { color: var(--text); border-color: var(--cyan); }
html[data-theme="light"] { --bg: #f3f6fa; --chrome: #ffffff; --panel: #ffffff; --panel-2: #e8eef6; --sunk: #f6f8fb;
  --line: #d3dce8; --line-soft: #e2e8f1; --text: #0f1f38; --text-2: #34486a; --muted: #5d6f8e;
  --cyan: #0a7ea2; --cyan-hi: #08698a; --cyan-ink: #ffffff; --up: #1c8550; --warn: #96620a; --down: #c42f3b; --idle: #7586a3;
  --up-bg: rgba(28,133,80,.10); --warn-bg: rgba(200,140,20,.13); --down-bg: rgba(196,47,59,.10); --cyan-bg: rgba(10,126,162,.10);
  color-scheme: light; }
html[data-theme="light"] a:hover { color: #054f68; }
html[data-theme="light"] h1, html[data-theme="light"] h2, html[data-theme="light"] .brand-text b, html[data-theme="light"] .lb-none { color: #0b1a30; }
html[data-theme="light"] .side nav a.cur, html[data-theme="light"] p.tabs a.cur, html[data-theme="light"] nav.segtabs a.cur, html[data-theme="light"] nav.segtabs a:hover, html[data-theme="light"] .btn.ghost:hover, html[data-theme="light"] .ov-site:hover { color: var(--text); }
html[data-theme="light"] .error, html[data-theme="light"] .rail-site.has-down, html[data-theme="light"] .pill.down, html[data-theme="light"] pre.cfg span.del { color: #8a1c25; }
html[data-theme="light"] .ok, html[data-theme="light"] .pill.up, html[data-theme="light"] pre.cfg span.add { color: #14532d; }
html[data-theme="light"] input::placeholder { color: #8494ab; }
html[data-theme="light"] .btn.danger { color: #b4232f; }
html[data-theme="light"] .btn.danger:hover { color: #8a1c25; }
html[data-theme="light"] .k-mikrotik { color: #0b5f8a; }
html[data-theme="light"] .k-server, html[data-theme="light"] .k-proxmox { color: #85570a; }
html[data-theme="light"] .k-customer, html[data-theme="light"] .gpswarn, html[data-theme="light"] .sev { color: #7a4d00; }
html[data-theme="light"] .sev.major { color: #9a1d27; }
html[data-theme="light"] span.bad, html[data-theme="light"] b.bad, html[data-theme="light"] .tile2 b.bad, html[data-theme="light"] .tile2 span.bad, html[data-theme="light"] .ov-site .ov-count .bad, html[data-theme="light"] table.baseline td.bl-bad, html[data-theme="light"] ul.checks li.bad { color: #b8232f; }
html[data-theme="light"] #topo, html[data-theme="light"] #geo, html[data-theme="light"] .leaflet-container { background: #eef3f9; }
html[data-theme="light"] svg.topo .nd circle, html[data-theme="light"] .lg { stroke: #eef3f9; }
html[data-theme="light"] svg.topo .nd text { stroke: #eef3f9; }
html[data-theme="light"] svg.topo .lk { stroke: #9aaac2; }
html[data-theme="light"] svg.topo .nd.seen circle { fill: #dfe6f1; stroke: #7586a3; }
html[data-theme="light"] table.leads tr { border-bottom-color: var(--line); }
html[data-theme="light"] .brand .wordmark { content: url(/static/ncc/logo-wordmark.png); }
@media (prefers-color-scheme: light) {
html:not([data-theme="dark"]) { --bg: #f3f6fa; --chrome: #ffffff; --panel: #ffffff; --panel-2: #e8eef6; --sunk: #f6f8fb;
  --line: #d3dce8; --line-soft: #e2e8f1; --text: #0f1f38; --text-2: #34486a; --muted: #5d6f8e;
  --cyan: #0a7ea2; --cyan-hi: #08698a; --cyan-ink: #ffffff; --up: #1c8550; --warn: #96620a; --down: #c42f3b; --idle: #7586a3;
  --up-bg: rgba(28,133,80,.10); --warn-bg: rgba(200,140,20,.13); --down-bg: rgba(196,47,59,.10); --cyan-bg: rgba(10,126,162,.10);
  color-scheme: light; }
html:not([data-theme="dark"]) a:hover { color: #054f68; }
html:not([data-theme="dark"]) h1, html:not([data-theme="dark"]) h2, html:not([data-theme="dark"]) .brand-text b, html:not([data-theme="dark"]) .lb-none { color: #0b1a30; }
html:not([data-theme="dark"]) .side nav a.cur, html:not([data-theme="dark"]) p.tabs a.cur, html:not([data-theme="dark"]) nav.segtabs a.cur, html:not([data-theme="dark"]) nav.segtabs a:hover, html:not([data-theme="dark"]) .btn.ghost:hover, html:not([data-theme="dark"]) .ov-site:hover { color: var(--text); }
html:not([data-theme="dark"]) .error, html:not([data-theme="dark"]) .rail-site.has-down, html:not([data-theme="dark"]) .pill.down, html:not([data-theme="dark"]) pre.cfg span.del { color: #8a1c25; }
html:not([data-theme="dark"]) .ok, html:not([data-theme="dark"]) .pill.up, html:not([data-theme="dark"]) pre.cfg span.add { color: #14532d; }
html:not([data-theme="dark"]) input::placeholder { color: #8494ab; }
html:not([data-theme="dark"]) .btn.danger { color: #b4232f; }
html:not([data-theme="dark"]) .btn.danger:hover { color: #8a1c25; }
html:not([data-theme="dark"]) .k-mikrotik { color: #0b5f8a; }
html:not([data-theme="dark"]) .k-server, html:not([data-theme="dark"]) .k-proxmox { color: #85570a; }
html:not([data-theme="dark"]) .k-customer, html:not([data-theme="dark"]) .gpswarn, html:not([data-theme="dark"]) .sev { color: #7a4d00; }
html:not([data-theme="dark"]) .sev.major { color: #9a1d27; }
html:not([data-theme="dark"]) span.bad, html:not([data-theme="dark"]) b.bad, html:not([data-theme="dark"]) .tile2 b.bad, html:not([data-theme="dark"]) .tile2 span.bad, html:not([data-theme="dark"]) .ov-site .ov-count .bad, html:not([data-theme="dark"]) table.baseline td.bl-bad, html:not([data-theme="dark"]) ul.checks li.bad { color: #b8232f; }
html:not([data-theme="dark"]) #topo, html:not([data-theme="dark"]) #geo, html:not([data-theme="dark"]) .leaflet-container { background: #eef3f9; }
html:not([data-theme="dark"]) svg.topo .nd circle, html:not([data-theme="dark"]) .lg { stroke: #eef3f9; }
html:not([data-theme="dark"]) svg.topo .nd text { stroke: #eef3f9; }
html:not([data-theme="dark"]) svg.topo .lk { stroke: #9aaac2; }
html:not([data-theme="dark"]) svg.topo .nd.seen circle { fill: #dfe6f1; stroke: #7586a3; }
html:not([data-theme="dark"]) table.leads tr { border-bottom-color: var(--line); }
html:not([data-theme="dark"]) .brand .wordmark { content: url(/static/ncc/logo-wordmark.png); }
}
.loginbrand { --text: #e6edf7; --text-2: #b4c3d9; --muted: #8094b3; --line: #233a5d; --cyan: #2ec5e8; --cyan-hi: #6fdcf4; }

/* Design 21 step 2a: level colours for the Alerts page (Alerts and UI chat, 19.11.2026). Append at the END of static/aktel.css.
   Solid backgrounds, contrast checked: white on #c62828 about 5.6:1, #1a1200 on #f5a623 about 9:1, white on #0e6f8a about 5.7:1.
   The long selectors beat the theme rules for .sev and .sev.major (same specificity, later wins). The word and the shape
   (triangle, square, circle) carry the level, the colour is an addition. */
.sev.lvl-warning, html[data-theme="light"] .sev.lvl-warning, html[data-theme="dark"] .sev.lvl-warning, html:not([data-theme="dark"]) .sev.lvl-warning { background: #c62828; color: #fff; }
.sev.lvl-caution, html[data-theme="light"] .sev.lvl-caution, html[data-theme="dark"] .sev.lvl-caution, html:not([data-theme="dark"]) .sev.lvl-caution { background: #f5a623; color: #1a1200; }
.sev.lvl-advisory, html[data-theme="light"] .sev.lvl-advisory, html[data-theme="dark"] .sev.lvl-advisory, html:not([data-theme="dark"]) .sev.lvl-advisory { background: #0e6f8a; color: #fff; }


/* Design 21 step 2b: master lights in the header and the Alerts list (Alerts and UI chat, 19.11.2026). Append at the END of
   static/aktel.css (after the step 2a rules). No url(), no @import, no inline style needed.
   Contrast (WCAG): lit red = white on #c62828 5.62:1; lit amber = #1a1200 on #f5a623 9.17:1; dark light = #8094b3 on #0b1628 5.87:1
   (dark theme) and #5d6f8e on #f6f8fb 4.78:1 (light theme). A lit light also has a 2px border (dark theme: #ff8a8a / #ffd27a against
   the header, 8.2 / 13.1:1; light theme: #8a1c25 / #7a4d00 against the white header, above 6:1), so the shape is visible in
   both themes, and the triangle / square and the count carry the meaning, not the colour alone. Steady light, no blinking. */
.masters { display: inline-flex; align-items: center; gap: 6px; }
.master { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-s); border: 2px solid var(--line);
          background: var(--sunk); color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; line-height: 1.3;
          text-decoration: none; white-space: nowrap; }
.master:hover { color: var(--text); border-color: var(--text-2); }
.master:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.master .mshape { font-size: 10px; }
.master .mcnt { min-width: 18px; padding: 0 5px; border-radius: 99px; background: rgba(0,0,0,.22); text-align: center; }
.master.mw.lit { background: #c62828; border-color: #ff8a8a; color: #fff; }
.master.mc.lit { background: #f5a623; border-color: #ffd27a; color: #1a1200; }
.master.mc.lit .mcnt { background: rgba(26,18,0,.16); }
html[data-theme="light"] .master.mw.lit, html:not([data-theme="dark"]) .master.mw.lit { border-color: #8a1c25; color: #fff; }
html[data-theme="light"] .master.mc.lit, html:not([data-theme="dark"]) .master.mc.lit { border-color: #7a4d00; color: #1a1200; }
html[data-theme="dark"] .master.mw.lit { border-color: #ff8a8a; }
html[data-theme="dark"] .master.mc.lit { border-color: #ffd27a; }
.calmpanel { background: var(--sunk); border: 1px solid var(--line-soft); border-radius: var(--r-s); padding: 4px 16px; margin: 8px 0; }
.recall { margin: 8px 0; }
nav.segtabs.levels { margin-top: 4px; }
@media (max-width: 900px) { .master .mword { display: none; } .master { padding: 3px 8px; } }


/* Design 21 step 2b part (ii): the sound button and the Test button next to the master lights (Alerts and UI chat, 19.11.2026).
   Append at the END of static/aktel.css, after the master-light rules (proposal-aktel-master.css). No url(), no @import.
   Text #b4c3d9 on the dark header #091321 is above 10:1, #34486a on the white header above 9:1 (the theme variables). */
.masters .mtone { background: transparent; border: 1px solid var(--line); border-radius: var(--r-s); color: var(--text-2); font: inherit;
                  font-size: 11.5px; font-weight: 600; padding: 3px 9px; cursor: pointer; white-space: nowrap; }
.masters .mtone:hover { color: var(--text); border-color: var(--text-2); }
.masters .mtone[aria-pressed="true"] { color: var(--text); border-color: var(--cyan); }
.masters .mtone:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.masters .mtone[hidden] { display: none; }
@media (max-width: 900px) { .masters .mtest { display: none; } }


/* Design 21 step 3: secondary lines under their root cause on the Alerts page (Alerts and UI chat, 19.11.2026). Append at the END of
   static/aktel.css, after the master-light and tone rules. No url(), no @import. --muted on --sunk is 5.9:1 (dark) and 4.8:1 (light). */
tr.secondary td { background: var(--sunk); }
tr.secondary td:first-child { padding-left: 24px; }
tr.secondary .secmark { color: var(--muted); font-size: 11.5px; font-weight: 600; margin-right: 4px; }
/* design 35: owner task desk (NCC release chat 19.11.2026) */
.pre { white-space: pre-wrap; }
section.card.crit { border-left: 4px solid var(--down); }

/* Design 21 step 4: the procedure (checklist) opened from an alert row on the Alerts page. Append at the END of aktel.css after the master, tone and secondary CSS. */
details.proc { margin-top: 6px; }
details.proc > summary { cursor: pointer; color: var(--cyan); font-size: 12px; font-weight: 600; list-style: none; }
details.proc > summary::-webkit-details-marker { display: none; }
details.proc > summary::before { content: "\25B8\00a0"; }
details.proc[open] > summary::before { content: "\25BE\00a0"; }
details.proc > summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 3px; }
ol.proclist { margin: 6px 0 2px; padding-left: 22px; font-size: 12.5px; line-height: 1.55; color: var(--text-2); }
ol.proclist li { margin: 2px 0; }
.prole { display: inline-block; min-width: 38px; text-align: center; padding: 0 6px; margin-right: 6px; border-radius: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; background: var(--cyan-bg); color: var(--cyan); }
.prole-ncc { background: var(--line-soft); color: var(--muted); }
.prole-stop { background: var(--down-bg); color: var(--down); }
.prole-ow { background: var(--warn-bg); color: var(--warn); }

/* Design 21 step 4b: ticks on the procedure lines (Alerts and UI chat). Append at the END of static/aktel.css, after the procedure CSS. */
.ticked { color: var(--up); font-size: 11.5px; margin-left: 4px; }
.tickcount { color: var(--muted); font-weight: 400; font-size: 11.5px; margin-left: 4px; }
ol.proclist li form.inline { display: inline; margin-left: 6px; }
ol.proclist li form.inline .btn.small { padding: 0 8px; font-size: 11px; line-height: 1.6; }
