/* =====================================================
   OLT Manager - styles
   Colors: yellow = single-mode fiber jacket, green = APC connector
   ===================================================== */
:root {
  --bg: #0E1628; --panel: #141F36; --panel2: #1B2844; --line: #26365B;
  --text: #E7ECF6; --muted: #8E9BB9;
  --fiber: #F4C430; --ok: #2FCB7E; --bad: #F0506E; --warn: #F5A524;
  --huawei: #FF7A7A; --nokia: #7FB1FF; --vsol: #4FD1C5;
  --r-lg: 14px; --r: 10px; --r-sm: 7px;
  --shadow: 0 10px 30px rgba(3, 8, 20, .28);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #F1F3F8; --panel: #FFFFFF; --panel2: #F5F7FB; --line: #E1E6EF;
  --text: #16203A; --muted: #5B6882;
  --fiber: #F2BB16; --ok: #14995A; --bad: #D33452; --warn: #B96F00;
  --huawei: #C8283A; --nokia: #1F5FD1; --vsol: #0E8A80;
  --shadow: 0 1px 2px rgba(20, 32, 58, .05), 0 8px 24px rgba(20, 32, 58, .06);
  color-scheme: light;
}
[data-theme="dark"] .i-moon, [data-theme="light"] .i-sun { display: none; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { letter-spacing: -.02em; }
.mono { font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.pad { padding: 18px 20px; margin: 0; }
.inline { display: inline; }
.push { margin-left: auto; }
:focus-visible { outline: 2px solid var(--fiber); outline-offset: 2px; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 20px 14px;
  background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 22px; font-weight: 800; font-size: 16px; letter-spacing: -.02em; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--fiber); color: #1B1600; display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 20px; height: 20px; stroke-width: 2.2; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r); color: var(--muted); font-weight: 600; }
.nav a:hover { background: var(--panel2); color: var(--text); }
.nav a.on { background: var(--panel2); color: var(--text); box-shadow: inset 3px 0 0 var(--fiber); }
.nav svg { width: 18px; height: 18px; flex: none; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.who { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; font-weight: 700; font-size: 13px; overflow: hidden; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--panel2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; flex: none; }

.main { min-width: 0; padding: 26px 32px 56px; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.top h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.top .sub { color: var(--muted); margin-top: 3px; }
.top .sub a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  font: inherit; font-weight: 700; font-size: 13.5px; white-space: nowrap; cursor: pointer;
  transition: border-color .15s, background .15s, filter .15s;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--fiber); border-color: var(--fiber); color: #1B1600; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--panel2); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn.wide { width: 100%; height: 44px; margin-top: 6px; }
.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center; flex: none;
  border-radius: var(--r-sm); border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--panel2); color: var(--text); }
.icon-btn.danger:hover { color: var(--bad); }
.icon-btn svg { width: 17px; height: 17px; }

/* ---------- Panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 15px; font-weight: 800; }
.empty { padding: 56px 24px; text-align: center; }
.empty h3 { margin: 0 0 6px; font-size: 17px; }
.empty p { margin: 0 auto 18px; color: var(--muted); max-width: 46ch; }
.alert { padding: 12px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); margin-bottom: 18px; }
.alert.bad { border-color: color-mix(in srgb, var(--bad) 50%, transparent); background: color-mix(in srgb, var(--bad) 10%, var(--panel)); }
.alert.inset { margin: 16px 20px; }
.hint-line { margin: 4px 2px; max-width: 70ch; }

/* ---------- Tags, status, leds ---------- */
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line); font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.tag.huawei { color: var(--huawei); } .tag.nokia { color: var(--nokia); } .tag.vsol { color: var(--vsol); }
.led { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.led.ok { background: var(--ok); box-shadow: 0 0 10px color-mix(in srgb, var(--ok) 70%, transparent); }
.led.warn { background: var(--warn); box-shadow: 0 0 10px color-mix(in srgb, var(--warn) 60%, transparent); }
.led.bad { background: var(--bad); box-shadow: 0 0 10px color-mix(in srgb, var(--bad) 60%, transparent); }
.st { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.st i { width: 8px; height: 8px; border-radius: 50%; }
.st-on i { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.st-off { color: var(--muted); } .st-off i { background: var(--bad); }
.pill { display: inline-flex; height: 22px; align-items: center; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.pill.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.pill.fail { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }

/* ---------- Signal meter ---------- */
.meter { display: inline-flex; align-items: center; gap: 10px; }
.meter .track { position: relative; width: 84px; height: 6px; border-radius: 3px; }
.meter .track::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: .38;
  /* -32..-27 bad | -27..-25 weak | -25..-8 good | -8..-5 hot */
  background: linear-gradient(90deg, var(--bad) 0 18.5%, var(--warn) 18.5% 25.9%, var(--ok) 25.9% 88.9%, var(--warn) 88.9%);
}
.meter i { position: absolute; top: -3px; width: 4px; height: 12px; border-radius: 2px; background: var(--text); transform: translateX(-50%); box-shadow: 0 0 0 2px var(--panel); }
.meter b { font-weight: 800; font-size: 13px; min-width: 50px; }
.meter-good b, .lvl-good { color: var(--ok); }
.meter-warn b, .lvl-warn { color: var(--warn); }
.meter-bad b, .lvl-bad { color: var(--bad); }
.meter.lg { display: flex; margin-top: 14px; }
.meter.lg .track { flex: 1; height: 10px; border-radius: 5px; }
.meter.lg i { top: -4px; height: 18px; width: 5px; }
.meter.lg b { display: none; }
.scale { position: relative; height: 18px; margin-top: 6px; }
.scale span { position: absolute; top: 0; transform: translateX(-50%); }
.scale span:first-child { transform: none; }
.scale span:last-child { transform: translateX(-100%); }

/* ---------- Dashboard ---------- */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip > div { padding: 18px 22px; border-left: 1px solid var(--line); }
.strip > div:first-child { border-left: 0; }
.strip .v { font-size: 32px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.strip .l { color: var(--muted); font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.strip .l i { width: 8px; height: 8px; border-radius: 50%; }
.cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; }
.cols .panel { margin-bottom: 20px; }
.olt-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.olt-row:first-of-type { border-top: 0; }
.olt-row:hover { background: var(--panel2); }
.olt-name { font-weight: 800; }
.olt-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.avail { width: 190px; }
.avail .t { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.avail .t b { color: var(--text); }
.bar, .cage { height: 6px; border-radius: 3px; background: var(--panel2); overflow: hidden; }
.bar i, .cage i { display: block; height: 100%; background: var(--ok); border-radius: 3px; }
.feed { list-style: none; margin: 0; padding: 6px 0; }
.feed li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 20px; }
.feed .led { width: 8px; height: 8px; margin-top: 7px; box-shadow: none; }

/* ---------- OLT tabs ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; width: fit-content; max-width: 100%; margin-bottom: 18px; overflow-x: auto; }
.tabs a { display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 8px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.on { background: var(--panel2); color: var(--text); }

/* ---------- ONT page summary ---------- */
.summary { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.summary > div { display: flex; flex-direction: column; justify-content: flex-start; padding: 16px 22px; border-right: 1px solid var(--line); min-width: 130px; }
.summary > div.grow { flex: 1; border-right: 0; min-width: 220px; }
.summary .k { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.summary .v { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.summary .of { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.avail-line { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.avail-line .bar { flex: 1; height: 8px; border-radius: 4px; }
.avail-line b { font-size: 15px; }

/* ---------- Chassis: har board ek OLT card jaisa (dono theme me dark) ---------- */
.chassis {
  display: grid; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--line);
  background: var(--panel2);
}
.board {
  display: grid; grid-template-columns: 124px 1fr; border-radius: 10px; overflow: hidden;
  background: linear-gradient(180deg, #252F47 0%, #1A2235 100%);
  border: 1px solid #313D5C;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 2px 8px rgba(8, 14, 30, .18);
}
.board-label {
  display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 10px 14px;
  border-right: 1px solid #313D5C;
  background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255, 255, 255, .025) 6px 7px);
}
.board-label b { color: #F1F4FA; font-size: 13px; font-weight: 800; }
.board-label span { color: #8E9BB9; font-size: 11.5px; font-weight: 600; }
.board-ports { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; padding: 10px; }
.cage {
  position: relative; height: 58px; padding: 6px 7px; text-align: left; cursor: pointer;
  border-radius: 6px; border: 1px solid #2B3654; background: #0F1524; color: #E7ECF6; font: inherit;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .35);
  transition: border-color .15s, box-shadow .15s;
}
.cage:hover { border-color: #56648A; }
.cage.on { border-color: #F4C430; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .35), 0 0 0 1px #F4C430, 0 0 16px rgba(244, 196, 48, .35); }
.cage .no { font-size: 11px; color: #8E9BB9; }
.cage .led { position: absolute; top: 8px; right: 7px; width: 7px; height: 7px; }
.cage .led.ok { background: #2FCB7E; box-shadow: 0 0 8px #2FCB7E; }
.cage .led.warn { background: #F5A524; box-shadow: 0 0 8px #F5A524; }
.cage .led.bad { background: #F0506E; box-shadow: 0 0 8px rgba(240, 80, 110, .8); }
.cage .cnt { display: block; font-size: 14px; font-weight: 800; line-height: 1.2; margin-top: 3px; white-space: nowrap; }
.cage .cnt small { font-size: 10.5px; font-weight: 700; color: #8E9BB9; }
.cage::after { content: ""; position: absolute; left: 7px; right: 7px; bottom: 6px; height: 3px; border-radius: 2px; background: #243049; }
.cage .fill { position: absolute; left: 7px; bottom: 6px; height: 3px; border-radius: 2px; background: #2FCB7E; z-index: 1; }

/* Offline ONT rows thode halke, online saaf dikhe */
.t tr[data-status="offline"] td { color: var(--muted); }
.t tr[data-status="offline"] td .mono { opacity: .85; }

/* ---------- Toolbar & chips ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1 1 260px; max-width: 360px; }
.search svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--muted); }
.search input[type=text] { padding-left: 36px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  display: inline-flex; gap: 6px; align-items: center; white-space: nowrap;
}
.chip b { color: var(--text); }
.chip:hover { border-color: var(--muted); }
.chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip.on b { color: var(--bg); }
.chip svg { width: 14px; height: 14px; }
.port-chip { border-color: var(--fiber); color: var(--text); }

/* ---------- Tables ---------- */
.table-wrap { overflow: auto; }
.table-wrap.tall { max-height: calc(100vh - 150px); }
table.t { width: 100%; border-collapse: collapse; }
.t th {
  position: sticky; top: 0; z-index: 1; background: var(--panel); text-align: left;
  font-weight: 700; color: var(--muted); font-size: 12.5px; padding: 10px 14px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t th:first-child, .t td:first-child { padding-left: 20px; }
.t th:last-child, .t td:last-child { padding-right: 16px; }
.t tbody tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: color-mix(in srgb, var(--panel2) 75%, transparent); }
.t .act { text-align: right; white-space: nowrap; }
.t .act > * { vertical-align: middle; }
.t .desc { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t .wan { line-height: 1.6; }
.err-row td { color: var(--bad); font-size: 12.5px; padding-top: 0; }
.log-d { display: inline-block; margin-left: 8px; }
.log-d summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.log-d .raw { margin-top: 8px; max-width: 70vw; border-radius: var(--r-sm); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full, .check.full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); }
input[type=text], input[type=password], input[type=number], select {
  width: 100%; height: 38px; padding: 0 12px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 14px;
}
input.mono { font-size: 13px; }
input:focus, select:focus { outline: none; border-color: var(--fiber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fiber) 22%, transparent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.check input { width: 16px; height: 16px; accent-color: var(--fiber); }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin: 18px 0 0; }
legend { padding: 0 6px; font-weight: 800; font-size: 13px; }
[hidden] { display: none !important; }

/* ---------- Dialog ---------- */
dialog.dlg {
  width: min(580px, calc(100vw - 24px)); padding: 0; border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
dialog.dlg.sm { width: min(440px, calc(100vw - 24px)); }
dialog.dlg::backdrop { background: rgba(6, 10, 20, .6); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dlg header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px 16px 22px; border-bottom: 1px solid var(--line); }
.dlg header h2 { margin: 0; font-size: 17px; font-weight: 800; }
.dlg .body { padding: 20px 22px; }
.dlg .body p { margin: 12px 0 0; }
.dlg footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--panel2); }
.mini { margin: 0; display: grid; gap: 8px; }
.mini div { display: flex; justify-content: space-between; gap: 16px; }
.mini dt { color: var(--muted); } .mini dd { margin: 0; font-weight: 700; text-align: right; }

/* ---------- ONT detail ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; }
.hero .left { padding: 24px 26px; border-right: 1px solid var(--line); }
.hero .right { padding: 24px 26px; }
.hero .kv { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 6px 0; }
.panel > .kv { padding: 6px 0; }
.sn { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 24px; font-weight: 600; letter-spacing: .02em; margin: 2px 0 12px; word-break: break-all; }
.hero-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.big-db { font-size: 46px; font-weight: 800; letter-spacing: -.045em; line-height: 1.05; margin-top: 2px; }
.big-db small { font-size: 16px; font-weight: 700; margin-left: 6px; letter-spacing: 0; color: var(--muted); }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin: 0; }
.kv > div { padding: 12px 20px; }
.kv dt { font-size: 12px; color: var(--muted); font-weight: 700; }
.kv dd { margin: 2px 0 0; font-weight: 700; word-break: break-word; }
.sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 0 20px; }
.raw-box summary { padding: 14px 20px; cursor: pointer; font-weight: 800; }
.raw { margin: 0; padding: 16px 20px; background: var(--bg); color: var(--text); font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; line-height: 1.6; max-height: 520px; overflow: auto; white-space: pre; }

/* ---------- Terminal ---------- */
.term-bar { display: flex; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.term-bar select { width: 240px; }
.term-bar input { flex: 1 1 300px; }
.history { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.raw.term { min-height: 360px; max-height: 70vh; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 60; }
.toast {
  max-width: 440px; padding: 12px 16px 12px 12px; border-radius: 12px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); box-shadow: 0 14px 34px rgba(0, 0, 0, .35);
  display: flex; gap: 12px; font-weight: 600; animation: pop .2s ease-out;
}
.toast::before { content: ""; width: 4px; flex: none; border-radius: 2px; background: var(--ok); }
.toast.bad::before { background: var(--bad); }

/* ---------- Busy overlay: light running through fiber ---------- */
.busy { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(4px); }
.busy.show { display: grid; }
.busy-box { width: min(320px, 80vw); text-align: center; }
.fiberline { position: relative; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; margin-bottom: 18px; }
.fiberline i { position: absolute; top: 0; left: -35%; width: 35%; height: 100%; background: linear-gradient(90deg, transparent, var(--fiber), transparent); animation: light 1.1s linear infinite; }
@keyframes light { to { left: 100%; } }
.busy p { margin: 0 0 4px; font-weight: 800; font-size: 15px; }
.busy small { color: var(--muted); }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login-art { position: relative; overflow: hidden; background: var(--panel); border-right: 1px solid var(--line); padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art .brand { position: relative; padding: 0; }
.login-art .lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.cable { fill: none; stroke: var(--line); stroke-width: 2; }
.pulse { fill: none; stroke: var(--fiber); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 60 900; stroke-dashoffset: 960; animation: run 3.4s cubic-bezier(.5, 0, .5, 1) infinite; filter: drop-shadow(0 0 4px var(--fiber)); }
@keyframes run { to { stroke-dashoffset: 0; } }
.login-copy { position: relative; max-width: 30rem; }
.login-copy h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.04; letter-spacing: -.04em; font-weight: 800; margin: 0 0 14px; }
.login-copy p { color: var(--muted); font-size: 15px; margin: 0; max-width: 40ch; }
.login-form { display: grid; place-items: center; padding: 32px; }
.login-form form { width: min(360px, 100%); display: grid; gap: 16px; }
.login-form h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.login-form p { margin: -8px 0 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cols { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .strip > div:nth-child(3) { border-left: 0; }
  .strip > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .hero { grid-template-columns: 1fr; }
  .hero .left { border-right: 0; border-bottom: 1px solid var(--line); }
  .sections { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .board { grid-template-columns: 1fr; }
  .board-label { flex-direction: row; justify-content: space-between; border-right: 0; border-bottom: 1px solid #313D5C; }
  .summary > div { min-width: 50%; border-bottom: 1px solid var(--line); }
  .app { grid-template-columns: 1fr; }
  .side { position: sticky; z-index: 20; height: auto; flex-direction: row; align-items: center; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .brand { padding: 0 6px 0 0; }
  .brand span:last-child, .nav a span, .who { display: none; }
  .nav { flex-direction: row; }
  .nav a.on { box-shadow: inset 0 -3px 0 var(--fiber); }
  .side-foot { margin: 0 0 0 auto; padding: 0; border: 0; }
  .main { padding: 18px 14px 48px; }
  .grid2 { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .olt-row { grid-template-columns: auto 1fr; }
  .avail { grid-column: 2; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse, dialog[open], .toast { animation: none; }
  .fiberline i { animation-duration: 3s; }
}
