/* =====================================================
   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 { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.danger:hover { border-color: var(--bad); }
.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); } .tag.richerlink { color: #7C3AED; } .tag.cdata, .tag.cdata2 { color: #0891B2; }
.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.empty { opacity: .4; cursor: default; box-shadow: none; }
.cage.empty:hover { border-color: #2B3654; }
.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-select { width: auto; min-width: 190px; height: 32px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }

/* ---------- 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; }
.sn-hex { margin: -8px 0 12px; }
.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; }

/* ---------- Live details ---------- */
.live-head { display: flex; align-items: baseline; gap: 12px; margin: 6px 2px 14px; }
.live-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 20px; }
.live-list { margin: 0; padding: 4px 0; }
.live-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 20px; border-top: 1px solid var(--line); }
.live-list > div:first-child { border-top: 0; }
.live-list dt { color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.live-list dd { margin: 0; font-weight: 700; text-align: right; word-break: break-word; }
.tone-ok { color: var(--ok); }
.tone-bad { color: var(--bad); }
.raw-box .sections { padding: 0 0 8px; border-top: 1px solid var(--line); gap: 0; }
.raw-box .sections > div { border-bottom: 1px solid var(--line); }
.sec-title { margin: 0; padding: 14px 20px 6px; font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- PON page ---------- */
.pon-card-tabs { margin-bottom: 18px; }
.t td.off { color: var(--muted); }
.tone-warn { color: var(--warn); }
.pon-off-row td { background: color-mix(in srgb, var(--bad) 6%, transparent); }
.confirm-input { margin-top: 14px; }

/* ---------- OLT page ---------- */
.olt-link { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.olt-link:hover { text-decoration-color: var(--fiber); }
.olt-tabs { margin-bottom: 18px; }
.overview-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
.overview-cols .t td { white-space: nowrap; }
.olt-tabs a { padding: 8px 16px; }
.mini-bar { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: var(--panel2); overflow: hidden; vertical-align: middle; margin-right: 6px; }
.mini-bar i { display: block; height: 100%; background: var(--ok); }
.mini-bar.tone-warn i { background: var(--warn); }
.mini-bar.tone-bad i { background: var(--bad); }
.vlan-cell { max-width: 520px; }
.vlan-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; margin: 2px 4px 2px 0; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.vlan-chip button { display: inline-grid; place-items: center; width: 16px; height: 16px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; }
.vlan-chip button:hover { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.vlan-chip button svg { width: 12px; height: 12px; }
.vlan-add { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; padding: 18px 20px; }
.vlan-add .field { min-width: 150px; }
.vlan-add .field:nth-child(4) { min-width: 240px; }

/* ---------- ONT profiles ---------- */
dialog.dlg.wide { width: min(760px, calc(100vw - 24px)); }
.vlan-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.vlan-head span { font-size: 12px; font-weight: 700; color: var(--muted); }
.vlan-row input { height: 34px; }
fieldset.full { grid-column: 1 / -1; margin-top: 4px; }
[data-profile-info] { display: block; margin-top: 4px; }

/* ---------- ONT description fields + offline reason ---------- */
.desc-parts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.desc-parts .full, .grid2 > .full { grid-column: 1 / -1; }
.desc-preview { padding: 10px 12px; border-radius: var(--r); background: var(--panel2); border: 1px dashed var(--line); word-break: break-all; }
.desc-preview code { font-size: 12.5px; font-weight: 600; }
.t .desc { white-space: normal; max-width: 280px; }
.t .desc .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cause { margin-top: 2px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.cause.tone-bad { color: var(--bad); }
.t td:first-child { white-space: nowrap; }
.cause-tag { font-size: 12.5px; font-weight: 700; color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); padding: 2px 8px; border-radius: 6px; }

/* ---------- Map ---------- */
.map-panel { display: flex; flex-direction: column; }
#map { height: calc(100vh - 210px); min-height: 460px; }
.map-wrap { position: relative; }
.tools-dd { position: relative; }
.tools-dd summary { list-style: none; }
.tools-dd summary::-webkit-details-marker { display: none; }
.tools-dd summary svg { width: 14px; height: 14px; }
.tools-dd .chev { display: grid; transition: transform .15s; }
.tools-dd[open] .chev { transform: rotate(90deg); }
.tools-dd[open] summary { border-color: var(--fiber); color: var(--text); }
.map-tools { position: absolute; top: calc(100% + 6px); left: 0; z-index: 900; width: 190px; padding: 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 14px 34px rgba(0,0,0,.25); display: grid; gap: 4px; }
.mt-title { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 4px 2px 2px; }
.map-tools button { display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-align: left; }
.map-tools button:hover { background: var(--panel2); }
.map-tools button.on { background: var(--fiber); color: #1B1600; }
.map-tools label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 3px 4px; cursor: pointer; }
.map-tools input { accent-color: var(--fiber); }
.ico-pon, .mk-pon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #16203A; color: #F4C430; font-size: 12px; font-weight: 800; border: 2px solid #F4C430; }
.ico-spl, .mk-spl { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 3px; border-radius: 11px; background: #fff; color: #16203A; font-size: 9px; font-weight: 800; border: 2px solid #8B5CF6; }
.ico-fib { width: 22px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #1F5FD1, #8B5CF6, #F97316); }
.mk-pon { width: 28px; height: 28px; font-size: 14px; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.mk-spl { min-width: 28px; height: 28px; font-size: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.mk-moving { filter: drop-shadow(0 0 8px #F4C430); cursor: grab; }
.ico-jb, .mk-jb { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #0F766E; color: #fff; font-size: 11px; font-weight: 800; border: 2px solid #fff; box-shadow: 0 0 0 2px #0F766E; }
.mk-jb { width: 24px; height: 24px; margin: 3px; }
.mk-spl { position: relative; }
.mk-spl i { position: absolute; top: -8px; right: -8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #16A34A; color: #fff; font-style: normal; font-size: 9px; display: grid; place-items: center; }
/* fiber core chip: TIA color */
.core { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 11px; background: var(--c); color: #fff; font-size: 11px; font-weight: 800; border: 1px solid rgba(0,0,0,.15); text-shadow: 0 1px 1px rgba(0,0,0,.35); vertical-align: middle; }
.core[style*="#F8FAFC"], .core[style*="#EAB308"], .core[style*="#22D3EE"] { color: #16203A; text-shadow: none; }
/* splitter ports */
.port-in-btn { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; margin: 6px 0 10px; border-radius: var(--r); border: 1px dashed var(--line); background: var(--panel2); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; text-align: left; flex-wrap: wrap; }
.port-in-btn:hover { border-color: var(--fiber); }
.port-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.port-grid .port { position: relative; display: flex; align-items: center; gap: 8px; width: auto; height: auto; padding: 7px 26px 7px 8px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: left; box-shadow: none; }
.port-grid .port span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.port-grid .port:hover { border-color: var(--fiber); }
.port-grid .port.used { color: var(--text); background: color-mix(in srgb, var(--ok) 8%, var(--panel)); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); cursor: default; }
.port-grid .x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 15px; color: var(--muted); cursor: pointer; }
.port-grid .x:hover { color: var(--bad); }
.core-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.core-pick button { padding: 2px; border-radius: 14px; border: 2px solid transparent; background: none; cursor: pointer; }
.core-pick button.on { border-color: var(--fiber); }
/* joint box splices */
.splice-pick { display: grid; grid-template-columns: 1fr 90px 1fr; gap: 10px; }
.splice-board { display: grid; grid-template-columns: 1fr 90px 1fr; margin: 12px 0; max-height: 46vh; overflow: auto; }
.sp-col { display: grid; gap: 4px; align-content: start; }
.sp-lines { width: 100%; height: 100%; overflow: visible; }
.sp-core { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.sp-core:hover { border-color: var(--fiber); }
.sp-core.on { border-color: var(--fiber); box-shadow: 0 0 0 2px color-mix(in srgb, var(--fiber) 40%, transparent); }
.sp-core.used { opacity: .55; cursor: default; }
#sp-col-b .sp-core { flex-direction: row-reverse; justify-content: flex-end; }
.sp-list { display: grid; gap: 4px; }
.sp-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--panel2); font-size: 13px; }
.sp-row .icon-btn { margin-left: auto; width: 26px; height: 26px; }
.map-hint { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 500; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-radius: 12px; background: #16203A; color: #fff; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.35); max-width: calc(100% - 40px); }
#map.drawing { cursor: crosshair; }
#map.drawing .leaflet-interactive { cursor: crosshair; }
.mp-del { color: #D33452 !important; }
.mt-legend { display: grid; gap: 3px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); font-weight: 600; }
.mt-legend span { display: flex; align-items: center; gap: 8px; }
.mt-legend i { width: 18px; height: 4px; border-radius: 2px; }
@media (max-width: 860px) { .map-tools { right: 0; left: auto; } }
[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.6); }
.leaflet-container { font: inherit; background: var(--panel2); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.dot.online { background: #2FCB7E; } .dot.offline { background: #F0506E; } .dot.weak { background: #F5A524; }
.map-pop { min-width: 210px; font-size: 13px; }
.map-pop b { font-size: 14px; }
.mp-meta { color: #5B6882; font-size: 12px; margin-top: 1px; }
.mp-st { display: flex; align-items: center; gap: 6px; margin: 6px 0; font-weight: 700; }
.mp-st i { width: 8px; height: 8px; border-radius: 50%; }
.mp-st.st-online i { background: #2FCB7E; } .mp-st.st-offline { color: #D33452; } .mp-st.st-offline i { background: #F0506E; } .mp-st.st-weak i { background: #F5A524; }
.map-pop table { border-collapse: collapse; margin-bottom: 6px; }
.map-pop td { padding: 2px 10px 2px 0; } .map-pop td:first-child { color: #5B6882; }
.map-pop a { font-weight: 700; color: #1F5FD1; }
.mp-links { display: flex; gap: 14px; }
.mp-ok { color: #14995A; font-weight: 700; } .mp-bad { color: #D33452; font-weight: 700; } .mp-warn { color: #B96F00; font-weight: 700; }
.loc-row { display: flex; gap: 10px; align-items: flex-end; }
.loc-row > .field, .loc-row > input { flex: 1; }
.pick-map { height: 320px; border-radius: var(--r); border: 1px solid var(--line); margin-top: 10px; }

/* ---------- Settings ---------- */
.set-panel { max-width: 820px; }
.set-body { padding: 18px 20px; display: grid; gap: 14px; }
.set-body.grid3 { grid-template-columns: repeat(3, 1fr); }
.set-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--panel2); }
.user-add { grid-template-columns: 1fr 1fr auto; align-items: end; border-top: 1px solid var(--line); }
.alert.ok-alert { border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: color-mix(in srgb, var(--ok) 10%, var(--panel)); }
@media (max-width: 860px) { .set-body.grid3, .user-add { grid-template-columns: 1fr; } }

/* ---------- RADIUS users ---------- */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); }
.pager .muted { margin-right: auto; }
.user-detail { max-height: 65vh; overflow: auto; }
.users-t { table-layout: auto; }
.users-t td { white-space: nowrap; }
.users-t th.grow, .users-t td.grow { width: 100%; }
.ont-match { display: flex; gap: 10px; align-items: baseline; margin-top: 3px; }
textarea { width: 100%; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 13px; resize: vertical; }
textarea:focus { outline: none; border-color: var(--fiber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fiber) 22%, transparent); }
.users-t .st { font-size: 12px; }
.site-select { height: 38px; min-width: 200px; border-radius: var(--r); font-weight: 700; }
.user-detail dd { max-width: 60%; }

/* ---------- Sidebar dropdown ---------- */
.nav-group summary { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r); color: var(--muted); font-weight: 600; cursor: pointer; list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary:hover { background: var(--panel2); color: var(--text); }
.nav-group summary.on { color: var(--text); }
.nav-group summary svg { width: 18px; height: 18px; flex: none; }
.nav-group .chev { margin-left: auto; display: grid; transition: transform .15s; }
.nav-group .chev svg { width: 14px; height: 14px; }
.nav-group[open] .chev { transform: rotate(90deg); }
.nav-sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 4px; }
.nav-sub a { padding: 7px 12px 7px 41px; font-size: 13.5px; }
.who small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }

/* ---------- Complaints ---------- */
.c-status, .pri, .role { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.s-open { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.s-progress { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.s-resolved { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.p-high { color: #fff; background: var(--bad); } .p-medium { color: var(--text); background: var(--panel2); border: 1px solid var(--line); } .p-low { color: var(--muted); background: var(--panel2); }
.r-admin { color: #1B1600; background: var(--fiber); } .r-manager { color: var(--nokia); background: color-mix(in srgb, var(--nokia) 14%, transparent); } .r-staff { color: var(--muted); background: var(--panel2); border: 1px solid var(--line); }
.c-head { padding: 18px 20px; display: grid; gap: 8px; }
.c-head > div:first-child { display: flex; gap: 8px; }
.c-desc { margin: 4px 0 0; font-size: 15px; }
.c-cols { grid-template-columns: 1fr 1fr; }
.c-ont-btn { padding: 0 20px 16px; }
.c-act { padding: 16px 20px; display: grid; gap: 10px; }
.c-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.c-assign { display: flex; gap: 10px; align-items: center; padding: 0 20px 16px; }
.c-assign select { max-width: 280px; }
.c-search { margin-bottom: 20px; }
.c-table tr.click { cursor: pointer; }
.timeline { list-style: none; margin: 0; padding: 8px 20px 16px; }
.timeline li { position: relative; padding: 10px 0 10px 22px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 14px; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--muted); }
.timeline li.k-resolved::before { border-color: var(--ok); background: var(--ok); }
.timeline li.k-status::before { border-color: var(--warn); }
.timeline li.k-assign::before { border-color: var(--nokia); }
.t-text { margin-top: 2px; }
.find-list { display: grid; gap: 4px; margin-top: 6px; max-height: 260px; overflow: auto; }
.find-item { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; text-align: left; padding: 9px 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel2); color: var(--text); font: inherit; cursor: pointer; }
.find-item:hover { border-color: var(--fiber); }
.find-ont { color: var(--ok); }
.find-picked { margin-top: 8px; padding: 8px 12px; border-radius: var(--r); background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); font-weight: 700; }
.pad-s { padding: 6px 2px; }
.field .search { flex: none; max-width: none; }
.field .search svg { color: var(--muted); }
@media (max-width: 860px) {
  .c-cols { grid-template-columns: 1fr; }
  .nav-group summary span, .nav-group .chev { display: none; }
  .nav-sub { flex-direction: row; }
  .nav-sub a { padding: 7px 10px; }
}

/* ---------- Dashboard: pulse ---------- */
.noc-pulse { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: stretch; margin-bottom: 20px; padding: 22px 24px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.pulse-lead { display: flex; flex-direction: column; justify-content: center; }
.pulse-pct { font-size: 64px; font-weight: 800; letter-spacing: -.055em; line-height: .95; }
.pulse-pct small { font-size: 26px; letter-spacing: 0; margin-left: 2px; color: var(--muted); }
.pulse-line { margin: 8px 0 16px; color: var(--muted); }
.pulse-line b { color: var(--text); }
.pulse-facts { display: grid; gap: 6px; margin: 0; padding-top: 14px; border-top: 1px solid var(--line); }
.pulse-facts div { display: flex; justify-content: space-between; align-items: baseline; }
.pulse-facts dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.pulse-facts dd { margin: 0; font-weight: 800; font-size: 16px; }
.pulse-band { display: flex; gap: 22px; min-width: 0; padding: 14px 16px 10px; border-radius: 10px;
  background: repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), color-mix(in srgb, var(--line) 70%, transparent) calc(25% - 1px) 25%), var(--panel2); }
.pb-olt { display: flex; flex-direction: column; min-width: 0; flex-basis: 0; }
.pb-bars { flex: 1; min-height: 170px; display: flex; align-items: flex-end; gap: 3px; }
.pb-bar { position: relative; flex: 1 1 0; min-width: 4px; max-width: 26px; height: var(--h); border-radius: 3px 3px 1px 1px; overflow: hidden;
  background: color-mix(in srgb, var(--bad) 55%, transparent); transform-origin: bottom; animation: pb-grow .7s cubic-bezier(.2, .8, .2, 1) var(--d) both; }
.pb-bar i { position: absolute; left: 0; right: 0; bottom: 0; height: var(--fill); background: var(--ok); }
.pb-bar:hover, .pb-bar:focus-visible { outline: 2px solid var(--fiber); outline-offset: 1px; }
@keyframes pb-grow { from { transform: scaleY(0); } }
.pb-name { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 13px; white-space: nowrap; overflow: hidden; }
.pb-name .led { width: 8px; height: 8px; }
.pb-name .muted { font-size: 12px; }

/* ---------- Dashboard: SmartOLT style tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.tile { position: relative; display: grid; gap: 4px; padding: 16px 18px 14px; border-radius: 12px; color: #fff; overflow: hidden; box-shadow: var(--shadow); }
.tile::after { content: ""; position: absolute; right: -18px; bottom: -30px; width: 110px; height: 110px; border-radius: 50%; border: 14px solid rgba(255,255,255,.1); }
.tile:hover { filter: brightness(1.06); }
.tile-label { font-size: 13.5px; font-weight: 700; opacity: .92; }
.tile-num { font-size: 38px; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; }
.tile-sub { font-size: 12.5px; opacity: .85; }
.tile-split { display: flex; gap: 14px; font-size: 12.5px; opacity: .92; }
.tile-split b { font-size: 14px; margin-right: 3px; }
.t-blue { background: #2563EB; } .t-green { background: #15965A; } .t-slate { background: #475569; } .t-orange { background: #E07B0B; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Dashboard: graph ---------- */
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--panel2); }
.seg a { padding: 5px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.seg a.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.chart { position: relative; padding: 14px 16px 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .area-on { fill: color-mix(in srgb, var(--ok) 16%, transparent); }
.chart .line-on { fill: none; stroke: var(--ok); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.chart .line-off { fill: none; stroke: var(--bad); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart .cursor { stroke: var(--muted); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.chart-tip { position: absolute; top: 18px; padding: 8px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 8px 20px rgba(0,0,0,.2); font-size: 12.5px; pointer-events: none; white-space: nowrap; }
.chart-tip b { display: block; margin-bottom: 2px; }
.chart-legend { display: flex; gap: 16px; padding: 6px 20px 14px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-legend i { width: 14px; height: 3px; border-radius: 2px; }
.lg-on { background: var(--ok); } .lg-off { background: var(--bad); } .lg-rad { background: #2563EB; }
.chart .line-rad { fill: none; stroke: #2563EB; stroke-width: 2.2; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
/* RADIUS strip */
.rad-row { display: grid; grid-template-columns: auto repeat(5, minmax(0, 1fr)); align-items: stretch; margin: -4px 0 20px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.rad-title { display: grid; align-content: center; padding: 0 18px; font-weight: 800; font-size: 13px; letter-spacing: .02em; background: var(--panel2); border-right: 1px solid var(--line); }
.rad-title small { font-weight: 600; font-size: 11.5px; color: var(--muted); letter-spacing: 0; }
.rad { display: grid; gap: 1px; padding: 12px 16px; border-left: 3px solid transparent; }
.rad + .rad { box-shadow: inset 1px 0 0 var(--line); }
.rad:hover { background: var(--panel2); }
.rad b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.rad span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.r-on b { color: #2563EB; } .r-warn b { color: var(--warn); } .r-soon b { color: #B45309; } .r-bad b { color: var(--bad); } .r-mute b { color: var(--muted); }
.rad-err { grid-column: 1 / -1; padding: 12px 18px; color: var(--bad); font-weight: 600; }
@media (max-width: 1100px) { .rad-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } .rad-title { grid-column: 1 / -1; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); } }
.ports-panel .pulse-band { margin: 14px 18px 18px; }
.pulse-band.compact .pb-bars { min-height: 110px; }

/* ---------- Dashboard: rows ---------- */
.dash-row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; }
.dash-row.wide-left { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.dash-side { display: grid; align-content: start; }
.attn-list { list-style: none; margin: 0; padding: 6px 0; }
.attn-list a { display: grid; gap: 2px; padding: 11px 20px 11px 17px; border-left: 3px solid transparent; }
.attn-list a:hover { background: var(--panel2); }
.attn-list .sev-1 a { border-left-color: var(--bad); }
.attn-list .sev-2 a { border-left-color: var(--warn); }
.attn-list span { color: var(--muted); font-size: 13px; }
.attn-clear { margin: 0; padding: 22px 20px; color: var(--ok); font-weight: 700; }
.why-bars { display: grid; gap: 12px; padding: 18px 20px 8px; }
.wb { display: grid; grid-template-columns: minmax(0, 190px) 1fr 44px; gap: 12px; align-items: center; }
.wb-label { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-track { height: 10px; border-radius: 5px; background: var(--panel2); overflow: hidden; }
.wb-track i { display: block; height: 100%; border-radius: 5px; }
.wb b { text-align: right; }
.wb-los { background: var(--bad); } .wb-pwr { background: #64748B; } .wb-oth { background: var(--warn); }
.why-note { margin: 4px 20px 16px; max-width: 60ch; }
.olt-t td { vertical-align: top; }
.olt-t td:nth-child(2), .olt-t td:last-child { white-space: nowrap; }
.olt-t .led { margin-right: 6px; }
.split { display: flex; gap: 2px; width: 150px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--panel2); margin-top: 6px; }
.split i { display: block; min-width: 0; }
.cmp-nums { display: grid; grid-template-columns: repeat(3, 1fr); }
.cmp-nums a { display: grid; gap: 2px; padding: 16px 20px; border-left: 1px solid var(--line); }
.cmp-nums a:first-child { border-left: 0; }
.cmp-nums a:hover { background: var(--panel2); }
.cmp-nums b { font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.cmp-nums span { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.t tr.click { cursor: pointer; }
@media (max-width: 1100px) { .dash-row, .dash-row.wide-left { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .noc-pulse { grid-template-columns: 1fr; } .pulse-band { overflow-x: auto; } .pb-olt { min-width: 220px; } }
@media (prefers-reduced-motion: reduce) { .pb-bar { animation: none; } }

/* ---------- Nokia ONT profile template ---------- */
.tpl-box { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; white-space: pre; overflow-x: auto; }
.tpl-preview { max-height: 220px; margin: 0; white-space: pre-wrap; word-break: break-all; }

/* ---------- API ---------- */
.key-once { padding: 16px 20px; margin-bottom: 20px; border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); background: color-mix(in srgb, var(--ok) 8%, var(--panel)); }
.key-row { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.key-row code { padding: 8px 12px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); font-size: 13.5px; word-break: break-all; }
.danger-text { color: var(--bad); }
.nginx-box summary { padding: 14px 20px; cursor: pointer; font-weight: 700; }
.pad-doc { padding: 16px 20px; }
.pad-doc p { margin: 0 0 10px; max-width: 80ch; }
.doc-intro { display: grid; grid-template-columns: minmax(0, 1fr) 260px; }
.doc-toc { display: grid; align-content: start; gap: 2px; padding: 14px; border-left: 1px solid var(--line); }
.doc-toc a { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 7px; font-size: 13px; font-family: var(--mono); }
.doc-toc a:hover { background: var(--panel2); }
.m { display: inline-grid; place-items: center; min-width: 42px; height: 20px; padding: 0 6px; border-radius: 5px; font-size: 10.5px; font-weight: 800; font-family: var(--mono); color: #fff; }
.m-get { background: #15965A; } .m-post { background: #2563EB; }
.doc-ep h2 { display: flex; align-items: center; gap: 8px; }
.doc-params { margin: 6px 0 14px; }
.doc-ex { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.doc-ex pre { margin: 4px 0 0; white-space: pre-wrap; word-break: break-all; }
@media (max-width: 900px) { .doc-intro, .doc-ex { grid-template-columns: 1fr; } .doc-toc { border-left: 0; border-top: 1px solid var(--line); } }

/* ---------- 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; }
}

/* =====================================================
   ZETRIK THEME (ISP Radius panel jaisa) - poora look yahin se
   Apple System Settings jaisa: halka sidebar, rangeen icon tiles, blue primary,
   Inter font (local), gol buttons, Title Case, ALL-CAPS nahi
   ===================================================== */
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('fonts/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 800; font-display: swap; src: url('fonts/inter-latin-800-normal.woff2') format('woff2'); }

[data-theme="light"] {
  --bg: #F3F5F9; --panel: #FFFFFF; --panel2: #F4F5F8; --line: #E2E5EB;
  --text: #1C1C1E; --muted: #5A616E;          /* dono white pe 4.5:1 se upar - aankhon pe aasaan */
  --fiber: #007AFF;                           /* primary blue */
  --blue: #007AFF; --ok: #15803D; --bad: #C8102E; --warn: #B45309; --grey: #6B7280;
  --switch: #34C759;
  --huawei: #C8283A; --nokia: #1F5FD1; --vsol: #0E7C73;
  --r-lg: 16px; --r: 12px; --r-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
}

/* ---------- Ek hi font ---------- */
body, button, input, select, textarea { font-family: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif; }
body { font-size: 14.5px; letter-spacing: -.005em; }
.mono, code, pre, .raw, .tpl-box, .term-out { font-family: 'Inter', -apple-system, system-ui, sans-serif; font-variant-numeric: tabular-nums slashed-zero; letter-spacing: 0; }

/* ---------- Title Case (sirf UI ke naam / buttons / headings, data nahi) ---------- */
h1, h2, h3, .btn, .t th, .nav a span, .nav-group summary span, .nav-sub a, .tabs a, .olt-tabs a, .chip, .field > label, legend,
.tile-label, .rad span, .rad-title, .pulse-facts dt, .seg a, .st, .tag, .c-status, .pri, .role, .mt-title, .sec-title,
dt, .panel-head .muted, .chart-legend span, .mt-legend span, .map-tools button, .map-tools label, .check, .find-item .tag,
.doc-toc a, .cmp-nums span, .wb-label, .k, .strip .l, .attn-list b, .live-list dt, .live-head h2 { text-transform: capitalize; }
.sec-title, .mt-title { text-transform: capitalize; letter-spacing: 0; font-size: 12.5px; }

/* ---------- Sidebar: halka, rangeen icon tile, active solid blue ---------- */
.side { background: #FAFBFC; border-right: 1px solid var(--line); padding: 18px 12px; }
.brand-mark { background: var(--blue); color: #fff; border-radius: 10px; }
.nav { gap: 2px; }
.nav a, .nav-group summary { gap: 11px; padding: 6px 10px; border-radius: 10px; color: var(--text); font-weight: 500; }
.nav a:hover, .nav-group summary:hover { background: #EDEFF3; color: var(--text); }
.nav a.on { background: var(--blue); color: #fff; box-shadow: none; }
.nav-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--tile, #8E8E93); color: #fff; flex: none; }
.nav-ico svg { width: 15px !important; height: 15px !important; stroke-width: 2; }
.nav a.on .nav-ico { box-shadow: 0 0 0 1.5px rgba(255,255,255,.7); }
.nav-group summary.on { color: var(--text); font-weight: 600; }
.nav-sub a { padding: 6px 10px 6px 47px; color: var(--muted); font-weight: 500; }
.nav-sub a.on { background: var(--blue); color: #fff; }
.side-foot { border-top: 1px solid var(--line); }
.avatar { background: var(--blue); color: #fff; border: 0; font-weight: 700; }

/* ---------- Page ---------- */
.main { padding: 28px 34px 56px; }
.top h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }

/* ---------- Gol buttons ---------- */
.btn { height: 36px; padding: 0 16px; border-radius: 999px; font-weight: 600; background: #fff; border: 1px solid var(--line); }
.btn:hover { background: #F4F5F8; border-color: #D5D9E0; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { filter: none; background: #0069DB; }
.btn.sm { height: 30px; padding: 0 12px; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: #EDEFF3; }
.icon-btn { border-radius: 999px; }
.danger-text, .btn.danger { color: var(--bad); }

/* ---------- Cards / grouped tables ---------- */
.panel { border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
.panel-head { padding: 14px 20px; }
.panel-head h2 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.t th { background: #FAFBFC; color: var(--muted); font-weight: 600; font-size: 12.5px; letter-spacing: 0; }
.t td { border-color: #EEF0F4; }
.t tbody tr:hover td { background: #FAFBFD; }
.name-link { color: var(--blue); font-weight: 600; }
.name-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Form: gol input, gol dropdown ---------- */
input[type=text], input[type=number], input[type=password], input[type=email], input[type=search], select, textarea {
  border-radius: 10px !important; border: 1px solid #D5D9E0 !important; background: #fff !important; color: var(--text);
}
input:focus, select:focus, textarea:focus { border-color: var(--blue) !important; box-shadow: 0 0 0 3px rgba(0, 122, 255, .18) !important; outline: none; }
.search { border-radius: 999px; }
.search input { border-radius: 999px !important; }
.field > label { color: var(--text); font-weight: 600; font-size: 13px; }
.hint { color: var(--muted); }

/* ---------- Apple-green switch (checkbox wale labels) ---------- */
.check input[type=checkbox] {
  appearance: none; -webkit-appearance: none; position: relative; width: 38px; height: 22px; margin: 0; flex: none;
  border-radius: 999px; background: #D1D5DB; cursor: pointer; transition: background .15s;
}
.check input[type=checkbox]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.check input[type=checkbox]:checked { background: var(--switch); }
.check input[type=checkbox]:checked::after { transform: translateX(16px); }
.check { display: inline-flex; align-items: center; gap: 10px; }

/* ---------- Gol modal ---------- */
.dlg { border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(16, 24, 40, .22); }
.dlg header, .dlg footer { background: #fff; }
.dlg footer { background: #FAFBFC; }
.dlg::backdrop { background: rgba(28, 28, 30, .32); backdrop-filter: blur(2px); }

/* ---------- Tabs / chips / segmented (Apple style) ---------- */
.tabs, .olt-tabs { background: #E9EBEF; border: 0; border-radius: 12px; padding: 3px; }
.tabs a, .olt-tabs a { border-radius: 9px; font-weight: 600; color: var(--muted); }
.tabs a.on, .olt-tabs a.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.chip { border-radius: 999px; font-weight: 600; }
.chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.seg { background: #E9EBEF; }

/* ---------- Status: rang hamesha label ke saath ---------- */
.st-on { color: var(--ok); } .st-off { color: var(--bad); }
.tag { border-radius: 999px; font-weight: 600; }
.alert { border-radius: 12px; }

/* ---------- Dashboard tiles: Apple system colors ---------- */
.t-blue { background: #007AFF; } .t-green { background: #1F9D55; } .t-slate { background: #4B5563; } .t-orange { background: #E8710A; }
.tile { border-radius: 16px; }
.rad-row { border-radius: 16px; }
.r-on b { color: var(--blue); }
.chart .line-rad { stroke: var(--blue); }
.lg-rad { background: var(--blue); }

/* ---------- Login ---------- */
.login-card { border-radius: 20px; }

/* Chhote fix: hover line sirf hover pe, number wale cells ek line me */
.chart .cursor { opacity: 0; }
.chart:hover .cursor { opacity: 1; }
.t td.num { white-space: nowrap; }

/* OLT page: tabs + "Updated 5 min ago" + updating pill */
.olt-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.olt-bar .olt-tabs { margin-bottom: 0; }
.olt-upd { display: flex; align-items: center; gap: 10px; }
.upd-pill { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; background: #E8F1FF; color: #0059C7; font-size: 12.5px; font-weight: 600; }
.upd-pill.ok { background: #E7F6EC; color: var(--ok); }
.upd-pill.bad { background: #FDECEE; color: var(--bad); }
.upd-pill .btn.sm { height: 24px; }

/* Master / license banner */
.co-banner { display: flex; align-items: center; gap: 12px; margin: -6px 0 18px; padding: 10px 16px; border-radius: 12px; background: #E8F1FF; color: #0059C7; font-weight: 600; }
.co-banner.warn { background: #FFF4E5; color: #B45309; }
.co-banner .btn { margin-left: auto; }

/* Dashboard: license card */
.lic { margin-bottom: 20px; }
.lic-body { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr) 1.3fr; gap: 0; }
.lic-body > div { padding: 14px 20px; border-left: 1px solid var(--line); display: grid; gap: 4px; align-content: start; }
.lic-body > div:first-child { border-left: 0; }
.lic-body b { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.lic-body b .muted { font-size: 14px; font-weight: 600; }
.lic-bar { background: var(--ok); }
.lic-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.lic-chip { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.lic-chip.off { background: var(--panel2); color: var(--muted); text-decoration: line-through; }
@media (max-width: 1100px) { .lic-body { grid-template-columns: 1fr 1fr; } .lic-body > div:nth-child(odd) { border-left: 0; } }

/* Logic Map */
.lm-bar { margin-bottom: 10px; align-items: center; }
.lm-facts { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; color: var(--muted); font-size: 13.5px; }
.lm-facts b { color: var(--text); }
.lm-note { margin: 0 0 14px; }
.lm-panel { overflow: hidden; }
.lm-scroll { overflow-x: auto; padding: 8px 6px; }
.lm-svg { display: block; font-family: inherit; }
.lm-axis { stroke: var(--line); stroke-width: 1.5; }
.lm-tick { fill: var(--muted); font-size: 11px; }
.lm-olt { fill: #5E5CE6; }
.lm-olt-t { fill: #fff; font-size: 12px; font-weight: 700; }
.lm-olt-s { fill: #E0E0FF; font-size: 11px; }
.lm-feed { stroke: #1F5FD1; stroke-width: 4; }
.lm-s1 { fill: #fff; stroke: #1F5FD1; stroke-width: 3; }
.lm-s2 { fill: #fff; stroke-width: 2.5; }
.lm-leg { fill: none; stroke-width: 2; opacity: .85; }
.lm-drop { fill: none; stroke: #C9CED8; stroke-width: 1.2; }
.lm-lbl { fill: var(--muted); font-size: 11.5px; font-weight: 600; }
.lm-db { font-size: 11px; font-weight: 700; }
.lm-svg a circle { cursor: pointer; }
.lm-legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 10px 20px 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); font-weight: 600; }
.lm-legend span { display: flex; align-items: center; gap: 6px; }
.lm-legend i { width: 10px; height: 10px; border-radius: 50%; }
.lm-legend i.leg-red { width: 18px; height: 3px; border-radius: 2px; background: #C8102E; }

.lm-out { fill: #E8710A; color: #C25E00; font-size: 11px; font-weight: 700; }
td.lm-out { color: #C25E00; }
.lm-name { fill: var(--text); font-weight: 600; }
.lm-loss { fill: #C8102E; font-weight: 700; }
.lm-legloss { fill: #C8102E; font-size: 11px; font-weight: 700; }

.lm-m { fill: var(--muted); font-weight: 600; }
.lm-sep { fill: #C3C8D2; }
.lm-sn { fill: var(--muted); font-weight: 500; }

/* Pager: 1 2 3 … */
.pg { display: inline-grid; place-items: center; min-width: 32px; height: 30px; padding: 0 8px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text); }
.pg:hover { background: #EDEFF3; }
.pg.on { background: var(--blue); color: #fff; }
.pg-gap { color: var(--muted); padding: 0 2px; }

/* =====================================================
   MOBILE (900px se chhoti screen) - poora mobile look yahin se
   ===================================================== */
.mtop, .nav-scrim { display: none; }
@media (max-width: 900px) {
  .app { display: block; }
  .mtop { display: flex; position: sticky; top: 0; z-index: 900; height: 56px; align-items: center; gap: 8px; padding: 0 10px;
          background: rgba(250, 251, 252, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
  .mtop .brand { flex: 1; padding: 0; min-width: 0; }
  .mtop .brand span:last-child { display: inline; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mtop-menu { width: 40px; height: 40px; }

  /* Sidebar = baayein se khulne wala drawer */
  .side { position: fixed; top: 0; left: 0; bottom: 0; height: 100vh; width: 280px; max-width: 86vw; z-index: 1000;
          display: flex; flex-direction: column; align-items: stretch; padding: 18px 12px; overflow-y: auto; overflow-x: hidden;
          border-right: 1px solid var(--line); border-bottom: 0; transform: translateX(-105%); transition: transform .22s ease; }
  body.nav-open .side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .18); }
  .nav-scrim { display: block; position: fixed; inset: 0; z-index: 999; background: rgba(0, 0, 0, .32); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  .side .brand span:last-child, .nav a span, .nav-group summary span { display: inline; }
  .who { display: flex; }
  .nav { flex-direction: column; }
  .nav a, .nav-group summary { padding: 9px 10px; }
  .nav a.on { box-shadow: none; }
  .nav-group .chev { display: grid; }
  .nav-sub { flex-direction: column; }
  .nav-sub a { padding: 8px 10px 8px 47px; }
  .side-foot { margin: auto 0 0; padding-top: 12px; border-top: 1px solid var(--line); }

  /* Page */
  .main { padding: 16px 14px 48px; }
  .top { align-items: flex-start; gap: 12px; margin-bottom: 16px; }
  .top h1 { font-size: 22px; }
  .top > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
  .co-banner { flex-wrap: wrap; }

  /* Tables: apne box me side-scroll, page nahi hile */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .panel:has(> table.t), .panel:has(> .t) { overflow-x: auto; }
  .t { min-width: 560px; }
  .t th, .t td { padding-left: 12px; padding-right: 12px; }

  /* Tabs aur toolbars */
  .tabs, .olt-tabs { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tabs::-webkit-scrollbar, .olt-tabs::-webkit-scrollbar { display: none; }
  .tabs a, .olt-tabs a { white-space: nowrap; flex: none; }
  .olt-bar { flex-direction: column; align-items: stretch; }
  .toolbar { flex-wrap: wrap; gap: 8px; }
  .toolbar .search { flex: 1 1 100%; max-width: none; }
  .toolbar select, .toolbar .port-select, .site-select { flex: 1 1 140px; min-width: 0; }
  .chips { flex-wrap: wrap; }
  .pager { flex-wrap: wrap; justify-content: center; }
  .pager .muted { width: 100%; text-align: center; margin-right: 0; }

  /* Cards / grids ek column */
  .cols, .dash-row, .dash-row.wide-left, .c-cols, .grid2, .grid3 { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { padding: 14px; }
  .tile-num { font-size: 30px; }
  .tile-split { flex-wrap: wrap; gap: 8px; }
  .rad-row { grid-template-columns: 1fr 1fr; }
  .rad-title { grid-column: 1 / -1; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .lic-body { grid-template-columns: 1fr 1fr; }
  .cmp-nums b { font-size: 24px; }

  /* Dialogs poori chaudai */
  .dlg, .dlg.wide { width: calc(100vw - 16px); max-width: none; max-height: 92vh; }
  .dlg .body { padding: 16px; }
  .splice-pick, .splice-board { grid-template-columns: 1fr 50px 1fr; }

  /* Map / Logic Map */
  #map { height: calc(100vh - 230px); min-height: 380px; }
  .lm-facts { margin-left: 0; gap: 12px; }
  .map-hint { flex-wrap: wrap; left: 10px; right: 10px; transform: none; max-width: none; }

  /* Login */
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
}
@media (max-width: 420px) {
  .tiles, .rad-row, .lic-body { grid-template-columns: 1fr 1fr; }
  .top .btn { height: 34px; padding: 0 12px; font-size: 13px; }
}

/* Complaint: Update Location */
.c-loc { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 20px; margin-bottom: 20px; flex-wrap: wrap; }

/* Settings: site names */
.site-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; max-height: 360px; overflow: auto; padding: 2px; }
.sn-row { display: flex; align-items: center; gap: 8px; }
.sn-id { min-width: 44px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.sn-row input { flex: 1; min-width: 0; }
.sn-miss input { border-color: #F5B461 !important; background: #FFF8EE !important; }

/* Update Location dialog */
.gps-box { display: grid; gap: 4px; padding: 14px 16px; border-radius: 12px; background: var(--panel2); margin-bottom: 10px; text-align: center; }
.gps-state { font-weight: 600; }
.gps-pos { font-size: 16px; font-weight: 700; }
.gps-acc { font-weight: 700; }
.gps-acc.good { color: var(--ok); } .gps-acc.ok { color: var(--warn); } .gps-acc.poor { color: var(--bad); }

/* ONTs: RADIUS user naam (WAN MAC ke saath) */
.ru-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; padding: 0; border: 0; background: none; color: var(--blue); font: inherit; font-family: 'Inter', sans-serif; font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: left; }
.ru-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ru-link i { width: 7px; height: 7px; border-radius: 50%; background: var(--bad); flex: none; }
.ru-link i.on { background: var(--ok); }
td.wan { white-space: nowrap; }

/* ONT: Check All SNMP */
.snmp-all { margin-top: 20px; }
.snmp-all .toolbar { padding: 12px 20px; border-bottom: 1px solid var(--line); }
.snmp-grp td { background: var(--panel2); font-weight: 700; font-size: 12.5px; color: var(--muted); }
.snmp-val { font-weight: 600; word-break: break-all; }

/* ONTs: OLT dropdown */
.olt-pick { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.olt-pick label { font-weight: 600; color: var(--muted); }
.olt-pick select { min-width: 280px; max-width: 100%; height: 40px; font-weight: 600; }
@media (max-width: 900px) { .olt-pick select { flex: 1; min-width: 0; } }

/* ONTs: compact header + summary */
.olt-pick-top { height: 36px; min-width: 220px; max-width: 320px; font-weight: 600; }
[data-ont-table] .summary > div { padding: 9px 16px; min-width: 110px; }
[data-ont-table] .summary .k { font-size: 12px; }
[data-ont-table] .summary .v { font-size: 20px; line-height: 1.2; }
[data-ont-table] .summary .of { font-size: 11.5px; }
[data-ont-table] .summary > div.grow { justify-content: center; }
[data-ont-table] .toolbar { padding-top: 10px; padding-bottom: 10px; }
@media (max-width: 900px) { .olt-pick-top { flex: 1 1 100%; max-width: none; } [data-ont-table] .summary > div { min-width: 33%; } }

/* ZetrikCloud ACS */
.acs-map { display: grid; gap: 10px; }
.acs-map-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; }
.acs-map-row label { font-weight: 600; }
@media (max-width: 900px) { .acs-map-row { grid-template-columns: 1fr; } }

/* ZC-ACS: tabs, device card, templates */
.acs-tabs { margin-bottom: 16px; }
.acs-cust { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.acs-card .sec-title { margin: 16px 0 6px; }
.acs-params dt { display: grid; }
.acs-path { font-weight: 400; font-size: 11px; word-break: break-all; }
.acs-params dd { display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.acs-val { font-weight: 600; word-break: break-all; }
#acs-card footer { flex-wrap: wrap; }
#acs-card-msg { margin-right: auto; }
.tpl-rows input, .tpl-rows select { width: 100%; min-width: 0; }
.tpl-rows td:nth-child(2) { min-width: 320px; }
.pk-wrap { max-height: 420px; overflow: auto; }
.pk-row { cursor: pointer; }
.pk-row:hover td { background: #EEF4FF; }
.pk-added td { background: #E7F6EC !important; }

/* ZC-ACS card v2: hero + charts + tabs */
#acs-card .body { padding-top: 12px; }
.ac-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 16px; border-radius: 14px;
           background: linear-gradient(135deg, #F0F6FF, #F7FAFC); border: 1px solid var(--line); margin-bottom: 12px; }
.ac-who { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.ac-who b { font-size: 16px; }
.ac-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--bad); box-shadow: 0 0 0 4px rgba(200,16,46,.15); }
.ac-dot.on { background: #34C759; box-shadow: 0 0 0 4px rgba(52,199,89,.2); }
.ac-charts { display: flex; gap: 14px; }
.ac-chart { display: grid; justify-items: center; gap: 2px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ac-chart .lg { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 3px 0 6px; }
.acs-donut { width: 84px; height: 84px; }
.acs-gauge { width: 110px; height: 68px; }
.dn-big { font-size: 17px; font-weight: 800; fill: var(--text); }
.dn-sub { font-size: 8px; font-weight: 600; fill: var(--muted); }
.ac-tabs { margin-bottom: 12px; }
.ac-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #E8710A; color: #fff; font-size: 11px; }
.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ac-tile { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; border-top: 4px solid #34C759; background: #fff; }
.ac-tile.down { border-top-color: #C8102E; }
.ac-tile-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.ac-ports { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.ac-port { display: grid; justify-items: center; gap: 2px; min-width: 86px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.ac-port b { color: var(--text); }
.ac-port.up { background: #E7F6EC; border-color: #A7DDB6; color: var(--ok); }
.ac-loading { display: flex; align-items: center; gap: 10px; padding: 30px 0; justify-content: center; color: var(--muted); font-weight: 600; }
.ac-loading .spin { width: 18px; height: 18px; border: 3px solid #D5E3FF; border-top-color: var(--blue); border-radius: 50%; animation: acspin .8s linear infinite; }
@keyframes acspin { to { transform: rotate(360deg); } }
.vp-quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 8px; }
.vp-chip { height: 28px; padding: 0 10px; font-size: 12px; }
@media (max-width: 900px) { .ac-hero { grid-template-columns: 1fr; } .ac-charts { justify-content: space-between; } }

.ac-pane .ac-tpl { margin-bottom: 14px; }
.ac-pane > .sec-title:first-child { margin-top: 0; }

/* Template card (WAN / WiFi / LAN / Info) */
.ac-tpl-tile { border-top-color: var(--blue); margin-bottom: 14px; }
.ac-tpl-tile .ac-tile-h b { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.ac-tpl-tile .ac-tile-h b svg { width: 18px; height: 18px; color: var(--blue); }
.ac-tpl-tile .ac-tpl { margin: 0; }
.ac-tpl-tile .ac-tpl > div { padding: 10px 2px; }
.ac-tpl-tile .acs-val { font-size: 14.5px; }

/* ZC-ACS Provision */
.prov-tag { background: #FFF4E5; color: #B45309; border-color: #F5D0A0; }
.prov-head-btns { display: flex; gap: 4px; }
#acs-prov header { display: flex; align-items: center; justify-content: space-between; }
#acs-prov footer { flex-wrap: wrap; }
#prov-msg { margin-right: auto; }
.prov { display: grid; gap: 14px; }
.prov-dev { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: var(--panel2); }
.prov-set { border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: 14px; padding: 12px 14px; background: #FAFCFF; }
.prov-set-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.prov-set-h b { display: inline-flex; align-items: center; gap: 8px; }
.prov-set-h svg { width: 18px; height: 18px; color: var(--blue); }
.prov-map { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.prov-map label { font-weight: 600; font-size: 13px; }
.prov-set-f { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.prov-warn { margin: 0; }
.prov-step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
.prov-step > div { display: grid; gap: 8px; }
.prov-n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; }
.prov-list { display: grid; gap: 4px; max-height: 240px; overflow: auto; }
.prov-u { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 110px auto; gap: 8px; align-items: center; text-align: left; padding: 8px 12px;
          border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; font-size: 13px; }
.prov-u:hover { border-color: var(--blue); background: #F0F6FF; }
.prov-chosen { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: #E7F6EC; border: 1px solid #A7DDB6; }
.prov-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
@media (max-width: 900px) { .prov-map, .prov-grid { grid-template-columns: 1fr; } .prov-u { grid-template-columns: 1fr 1fr; } }

.prov-pass { margin-top: 8px; }
.prov-pass-in { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 8px; }
.prov-mac { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 14px; border-radius: 12px; background: #FFF8EE; border: 1px solid #F5D0A0; }
@media (max-width: 900px) { .prov-pass-in { grid-template-columns: 1fr; } }

.tag.zte { color: #0F766E; }
.tag.zte300 { color: #0F766E; }
.tag.zte600 { color: #0F766E; }

/* ONT page: tabs, graph, terminal box */
.ont-tabs-box { margin-top: 20px; padding: 0; }
.ont-tabs { padding: 12px 16px 0; }
.ont-tabs a { display: inline-flex; align-items: center; gap: 6px; }
.ont-pane { padding: 14px 16px 18px; }
.opt-graph { width: 100%; height: 260px; min-width: 620px; }
.opt-graph .g-grid { stroke: #E5E7EB; stroke-width: 1; }
.opt-graph .g-lab { font-size: 10px; fill: var(--muted); font-weight: 600; }
.opt-graph polyline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.opt-graph .g-rx { stroke: #007AFF; }
.opt-graph .g-oltrx { stroke: #E8710A; }
.opt-graph .g-tx { stroke: #34C759; }
.g-legend { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: 12.5px; font-weight: 600; color: var(--muted); padding-top: 6px; }
.g-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.g-legend .rx { background: #007AFF; } .g-legend .oltrx { background: #E8710A; } .g-legend .tx { background: #34C759; }
.term-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.term { margin: 0; padding: 14px 16px; border-radius: 12px; background: #0B1220; color: #D7E3F4; font-family: ui-monospace, Menlo, Consolas, monospace;
        font-size: 12.5px; line-height: 1.5; white-space: pre; overflow: auto; max-height: 460px; }
.tx-graph { height: 120px; }

/* ONTs list: TR-069 (ZC-ACS) badge */
.sn-line { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; min-width: 0; }
.sn-line .mono { overflow: hidden; text-overflow: ellipsis; }
button.tr069 { cursor: pointer; font-family: inherit; }
.tr069 { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 800; letter-spacing: .02em; flex: none; text-decoration: none;
         padding: 2px 6px 2px 4px; border-radius: 999px; vertical-align: middle; border: 1px solid transparent; }
.tr069 svg { width: 12px; height: 12px; }
.tr069.on:hover { filter: brightness(.95); }
.tr069.on { color: #0F7B3F; background: color-mix(in srgb, var(--ok) 14%, transparent); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.tr069.off { color: #B4233C; background: color-mix(in srgb, var(--bad) 12%, transparent); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }

/* ACS templates: panel ke apne sujhav */
#pk-sug { border-top: 1px solid var(--line); margin-top: 6px; }
.sug-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 8px; }
.sug-head h3 { margin: 0; font-size: 15px; font-weight: 800; }
.sug-head span { display: flex; gap: 8px; }
#sug-list input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--fiber); }

/* ACS card: Ping / Traceroute / Speedtest */
.diag-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.diag-box { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--panel); }
.diag-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.diag-form { display: grid; gap: 8px; margin-bottom: 10px; }
.diag-form label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.diag-form input, .diag-form select { width: 100%; }
.diag-out { min-height: 34px; }
.diag-state { font-weight: 800; margin-bottom: 6px; }
.diag-t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.diag-t td { padding: 3px 0; vertical-align: top; }
.diag-t td:first-child { color: var(--muted); font-weight: 700; width: 42%; }
.diag-t td:last-child { font-family: ui-monospace, Menlo, monospace; }

/* Graph page */
.g-wrap { padding: 8px 14px 0; }
.g-svg { width: 100%; height: 320px; display: block; }
.g-grid { stroke: var(--line); stroke-width: 1; }
.g-ylab { fill: var(--muted); font-size: 11px; text-anchor: end; }
.g-xlab { fill: var(--muted); font-size: 10px; text-anchor: middle; }
.g-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 10px 16px 14px; }
.g-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); text-decoration: none; }
.g-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.g-key b { color: var(--text); }
a.g-key:hover { color: var(--text); }
.row-gap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Up / down tag (lib/ont_log.php tag_html) ---------- */
.st-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1.5; white-space: nowrap; vertical-align: middle; }
.st-tag-on  { background: rgba(47, 203, 126, .15); color: #16A05A; }
.st-tag-off { background: rgba(240, 80, 110, .15); color: #D6334F; }
/* Map: PON marker hara / laal + neeche tag */
.mk-pon.on  { border-color: #2FCB7E; color: #2FCB7E; }
.mk-pon.off { border-color: #F0506E; color: #F0506E; }
.mk-pon { position: relative; }
.mk-pon i { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); padding: 0 5px; border-radius: 999px; font: 700 10px/1.6 system-ui, sans-serif; color: #fff; white-space: nowrap; }
.mk-pon.on i { background: #16A05A; }
.mk-pon.off i { background: #D6334F; }
/* Map / Logic Map: event ka banner */
.ev-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; margin-bottom: 12px; border-radius: var(--r-sm); background: rgba(240, 80, 110, .1); border: 1px solid rgba(240, 80, 110, .35); }
.ev-banner b { color: #D6334F; }
.ev-banner a.btn { margin-left: auto; }

/* Down cause: fiber laal, power peela (config.php cause_tone) */
.cause.tone-warn { color: var(--warn); }
.cause-tag.tone-warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.cause-tag.tone-none { color: var(--muted); background: color-mix(in srgb, var(--muted) 10%, transparent); }

/* ---------- Dashboard: 5 tile ek line me (5wa: Fiber cut 48h) ---------- */
.tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.tiles .tile { padding: 14px 16px 12px; }
.tiles .tile-num { font-size: 32px; }
.t-red { background: #D93049; }
@media (max-width: 1200px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Fiber cut list: complaint ka staff + status */
.fc-assigned { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--text); }
.fc-assigned:hover b { text-decoration: underline; }
/* Settings > user: operator ke OLT / sites tick (scroll wali list) */
.op-list { display: grid; gap: 2px; max-height: 170px; overflow-y: auto; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); }
/* Map: customer naam label (Names tick) */
.leaflet-tooltip.map-name { padding: 1px 6px; font: 600 11px/1.4 system-ui, sans-serif; color: #1f2937; background: rgba(255, 255, 255, .92);
                            border: 1px solid rgba(0, 0, 0, .12); border-radius: 6px; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.leaflet-tooltip.map-name::before { display: none; }
/* Settings > Roles: permission matrix */
.mx-wrap { margin-top: 12px; max-height: 52vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.t.mx th, .t.mx td { text-align: center; padding: 6px 10px; }
.t.mx th:first-child, .t.mx td:first-child { text-align: left; }
.t.mx thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.t.mx .check { justify-content: center; margin: 0; }
