:root{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#eaf2fb;background:#06101c;--panel:#0b1928;--line:#1d3449;--muted:#7890a7;--blue:#4aa7ff;--green:#42d392;--yellow:#f1cf55;--orange:#ff9d45;--red:#ff5263}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 85% -10%,#163653 0,#081522 32%,#06101c 64%);min-height:100vh}header{height:76px;padding:0 4%;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #20364a;background:#07131fef;position:sticky;top:0;z-index:10;backdrop-filter:blur(14px)}.brand b{font-size:21px;letter-spacing:.7px}.brand b span{color:var(--blue)}.brand small{display:block;color:#70879d;margin-top:3px;font-size:10px;letter-spacing:1.2px}nav a,a{color:#8bc7ff;text-decoration:none}nav a{margin-left:28px;color:#b8c8d8;font-size:14px}nav a:hover,a:hover{color:#fff}main{width:min(1380px,92%);margin:34px auto 82px}h1{font-size:34px;margin:3px 0 8px;letter-spacing:-.7px}h2{font-size:18px;margin:4px 0}.muted{color:var(--muted)}.eyebrow,.kicker{color:#5d9ed7;font-size:10px;font-weight:800;letter-spacing:1.4px}.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:25px;margin-bottom:25px}.page-head p{margin:0;max-width:730px}.data-clock{min-width:285px;display:flex;gap:11px;align-items:flex-start;background:#0a1826;border:1px solid #1d354a;border-radius:13px;padding:13px 15px}.live-dot{width:8px;height:8px;border-radius:50%;background:var(--green);box-shadow:0 0 12px #42d392;margin-top:6px}.data-clock small,.data-clock em{display:block;color:#72899f;font-size:10px;font-style:normal}.data-clock strong{display:block;margin:2px 0 4px;font-size:15px}.hero-grid{display:grid;grid-template-columns:2.2fr 1fr 1fr 1fr;gap:14px;margin-bottom:16px}.health-card,.alert-card,.panel{background:linear-gradient(145deg,#0d1c2c,#091724);border:1px solid var(--line);border-radius:16px;box-shadow:0 18px 45px #0003}.health-card{padding:19px 22px;display:flex;align-items:center;gap:22px}.health-ring{--value:0;width:108px;height:108px;flex:0 0 108px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--green) calc(var(--value)*1%),#1a3042 0);position:relative}.health-ring:after{content:"";position:absolute;inset:8px;border-radius:50%;background:#0b1928}.health-ring div{position:relative;z-index:1;text-align:center}.health-ring b{font-size:25px;display:block}.health-ring span{font-size:10px;color:#8ca1b5;text-transform:uppercase}.health-copy h2{font-size:25px}.health-copy p{color:#8399ad;font-size:12px;line-height:1.5;margin:5px 0}.alert-card{padding:20px;border-top-width:3px}.alert-card>span{font-size:10px;letter-spacing:1.2px;color:#8196aa}.alert-card>b{display:block;font-size:38px;margin:10px 0 4px}.alert-card small{color:#748ba0;line-height:1.4}.alert-card.critical{border-top-color:var(--red)}.alert-card.high{border-top-color:var(--orange)}.alert-card.trend{border-top-color:#a97cff}.two-col{display:grid;grid-template-columns:1.25fr 1fr;gap:16px}.panel{padding:22px;margin-bottom:16px}.panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;margin-bottom:18px}.panel-total{color:#718ba2;font-size:12px}.bars{display:grid;gap:14px}.bar-row{display:grid;grid-template-columns:145px 1fr 48px;align-items:center;gap:12px}.bar-row>div:first-child{display:flex;justify-content:space-between;font-size:12px}.bar-row small{text-align:right;color:#8299ae}.bar-track,.coverage-track{height:7px;border-radius:8px;background:#1a2c3d;overflow:hidden}.bar-fill,.coverage-track i{display:block;height:100%;min-width:2px;border-radius:8px}.bar-fill.normal,.coverage-track i{background:var(--green)}.bar-fill.warning{background:var(--yellow)}.bar-fill.high{background:var(--orange)}.bar-fill.critical{background:var(--red)}.coverage{font-size:29px;font-weight:800;color:var(--green)}.coverage-track{height:9px;margin-bottom:20px}.metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.metric-grid div{padding:13px;background:#0a1724;border:1px solid #182d40;border-radius:10px}.metric-grid b{display:block;font-size:20px}.metric-grid span{font-size:10px;color:#7890a7}.note{color:#70879c;font-size:11px;line-height:1.5;margin:15px 0 0}.text-link{font-size:12px}.ops-table{overflow:auto;margin:0 -4px}.ops-table table,.table table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:12px 13px;border-bottom:1px solid #172c3e;white-space:nowrap}th{font-size:10px;color:#6f879d;text-transform:uppercase;letter-spacing:.7px}td{font-size:13px}td small{display:block;color:#6f879d;margin-top:3px}.rx{font-variant-numeric:tabular-nums}.badge{display:inline-block;padding:5px 9px;border-radius:7px;background:#233449;font-size:10px;font-weight:800}.badge.critical{background:#5b2630;color:#ff9aa4}.badge.high{background:#5c3b20;color:#ffc17d}.badge.warning{background:#554e23;color:#f5df7d}.badge.normal{background:#173f35;color:#72e1b0}.bottom-grid{grid-template-columns:1.25fr 1fr}.onu-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}.onu-list a{display:flex;align-items:center;justify-content:space-between;padding:11px 12px;border:1px solid #183047;background:#091724;border-radius:10px}.onu-list b{display:block;color:#dce9f5;font-size:12px}.onu-list small{display:block;color:#70879d;font-size:10px;margin-top:3px}.onu-list strong{color:#ff7a88;font-size:13px;margin-left:10px}.trend-number{display:flex;align-items:baseline;gap:12px;padding:11px 0;border-bottom:1px solid #183044}.trend-number b{font-size:30px;color:#c69aff}.trend-number span{font-size:12px;color:#8ba0b4}.muted-number b{color:#8298ab}.table{overflow:auto;background:#0d1b2b;border:1px solid #21364b;border-radius:15px;margin-top:25px}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:26px 0}.card{background:#0d1b2b;border:1px solid #21364b;border-radius:16px;padding:22px}.card b{display:block;font-size:30px}.card span{color:#91a5b9}.stats{display:flex;gap:35px;flex-wrap:wrap;margin:18px 0}.stats b{font-size:22px;margin-right:5px}.button{display:inline-block;padding:10px 15px;border:1px solid #2f78b8;border-radius:9px}.details{display:grid;grid-template-columns:repeat(3,1fr)}.history div{display:flex;justify-content:space-between;border-bottom:1px solid #1d3043;padding:9px 0}footer{position:fixed;bottom:0;width:100%;padding:8px;text-align:center;background:#07131f;border-top:1px solid #1c3245;color:#647d93;font-size:10px;z-index:9}@media(max-width:1100px){.hero-grid{grid-template-columns:2fr 1fr 1fr}.health-card{grid-column:span 3}.two-col{grid-template-columns:1fr}.bottom-grid{grid-template-columns:1fr}}@media(max-width:700px){main{width:94%;margin-top:22px}.page-head{align-items:stretch;flex-direction:column}.data-clock{min-width:0}.hero-grid{grid-template-columns:1fr 1fr}.health-card{grid-column:span 2}.alert-card.trend{grid-column:span 2}.metric-grid{grid-template-columns:1fr 1fr}.bar-row{grid-template-columns:105px 1fr 42px}.onu-list{grid-template-columns:1fr}header{height:auto;padding:14px 3%;align-items:flex-start;gap:10px}nav a{display:block;margin:2px 0}.details{grid-template-columns:1fr}}
.noc-hero .health-card{min-height:126px}.status-strip{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-bottom:18px}.status-box{padding:14px;border:1px solid #20364a;border-radius:12px;background:#091724;border-top-width:3px}.status-box b{display:block;font-size:28px}.status-box span{font-size:10px;color:#8196aa;text-transform:uppercase;letter-spacing:.8px}.status-box.critical{border-top-color:var(--red)}.status-box.warning{border-top-color:var(--yellow)}.status-box.degrading{border-top-color:#a97cff}.status-box.watch{border-top-color:var(--blue)}.status-box.normal{border-top-color:var(--green)}.badge.degrading{background:#3d2c59;color:#d5b4ff}.badge.watch{background:#173b59;color:#91ccff}.alert-summary{display:flex;gap:12px;flex-wrap:wrap}.alert-summary>div{min-width:145px;padding:14px;background:#091724;border:1px solid #183047;border-radius:11px}.alert-summary b{display:block;font-size:27px;margin:8px 0 2px}.alert-summary small{color:#7890a7}.readiness-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.readiness-grid>div{padding:12px;border-radius:10px;background:#091724;border:1px solid #183047;font-size:12px}.readiness-grid .ready{color:#66d9a4}.readiness-grid .missing{color:#8aa0b4}.readiness-grid span{color:#b9c9d8;margin-left:6px}@media(max-width:900px){.status-strip{grid-template-columns:repeat(2,1fr)}.readiness-grid{grid-template-columns:1fr 1fr}}@media(max-width:600px){.status-strip,.readiness-grid{grid-template-columns:1fr}}

#noc-map{height:520px;border-radius:14px;border:1px solid #20364a;background:#0a1724;overflow:hidden}.map-filters{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.map-filter{border:1px solid #294258;background:#0a1724;color:#9db0c1;border-radius:8px;padding:7px 9px;cursor:pointer;font-size:11px}.map-filter b{color:#fff;margin-left:4px}.map-filter.active,.map-filter:hover{border-color:#4aa7ff;color:#fff;background:#10263a}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#0b1928;color:#eaf2fb}.leaflet-popup-content{margin:13px 15px;min-width:260px}.map-device{padding:10px 0;border-top:1px solid #20364a}.map-device strong{font-size:14px}.map-device small{display:block;color:#7890a7;margin-top:3px}.map-device p{font-size:11px;margin:7px 0;color:#a9bbca}.map-mini{font-size:10px;color:#8299ae;margin-bottom:7px}.map-status{font-size:9px;font-weight:800;padding:3px 5px;border-radius:5px;margin-left:5px}.map-status.critical{background:#5b2630;color:#ff9aa4}.map-status.warning{background:#554e23;color:#f5df7d}.map-status.degrading{background:#5c3b20;color:#ffc17d}.map-status.watch{background:#173b59;color:#91ccff}.map-status.normal{background:#173f35;color:#72e1b0}.badge.big{font-size:13px;padding:9px 13px}.device-facts{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.device-facts>div{padding:13px;background:#091724;border:1px solid #183047;border-radius:10px}.device-facts small{display:block;color:#7890a7;margin-bottom:5px}.device-facts b{font-size:13px}@media(max-width:800px){#noc-map{height:420px}.map-filters{justify-content:flex-start}.device-facts{grid-template-columns:1fr 1fr}}@media(max-width:520px){.device-facts{grid-template-columns:1fr}}.command-grid{display:grid;grid-template-columns:2.2fr repeat(4,1fr);gap:12px;margin-bottom:16px}.command-main,.command-stat{background:linear-gradient(145deg,#0d1c2c,#091724);border:1px solid var(--line);border-radius:16px;padding:18px 20px}.command-main{display:grid;grid-template-columns:auto 1fr;column-gap:14px;align-items:end}.command-main .kicker,.command-main p{grid-column:1/-1}.command-main>b{font-size:46px;line-height:.9;color:#fff}.command-main h2{margin:0 0 3px}.command-main p{margin:11px 0 0;color:#7890a7;font-size:11px}.command-stat{border-top-width:3px}.command-stat>b{display:block;font-size:34px}.command-stat>span{display:block;font-size:12px;font-weight:800;margin:4px 0}.command-stat small{color:#71879b;font-size:10px}.command-stat.critical{border-top-color:var(--red)}.command-stat.warning{border-top-color:var(--yellow)}.command-stat.degrading{border-top-color:#a97cff}.command-stat.watch{border-top-color:var(--blue)}.problem-list{display:grid;gap:9px}.problem-item{display:grid;grid-template-columns:10px 1fr auto;gap:14px;align-items:center;padding:14px 15px;background:#091724;border:1px solid #183047;border-radius:12px;color:#dce9f5}.problem-item:hover{border-color:#315b7e;background:#0b1b2a}.problem-dot{width:9px;height:9px;border-radius:50%;background:#7890a7;box-shadow:0 0 12px #7890a755}.problem-item.critical .problem-dot{background:var(--red);box-shadow:0 0 12px #ff526388}.problem-item.warning .problem-dot{background:var(--yellow)}.problem-item.degrading .problem-dot{background:#a97cff}.problem-item.watch .problem-dot{background:var(--blue)}.problem-copy>div{display:flex;gap:9px;align-items:center}.problem-copy p{margin:5px 0;color:#a8bac9;font-size:12px}.problem-copy small{color:#667f95}.problem-facts{display:flex;gap:16px;align-items:center}.problem-facts span{font-size:10px;color:#7890a7;text-align:center}.problem-facts span b{display:block;color:#eaf2fb;font-size:18px}.problem-facts em{font-size:11px;font-style:normal;color:#8bc7ff}.simple-status{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.simple-status div{padding:16px;background:#091724;border:1px solid #183047;border-radius:11px}.simple-status b{display:block;font-size:28px}.simple-status span{font-size:10px;color:#7890a7}.async-block{min-height:76px}.loading-line,.empty-state{padding:18px;border:1px dashed #274258;border-radius:10px;color:#7890a7;font-size:12px}.event-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px}.event-card{padding:16px;border:1px solid #183047;background:#091724;border-radius:11px}.event-card b{font-size:28px;display:block}.event-card span{font-size:11px;color:#a8bac9}.event-card small{display:block;color:#70879d;margin-top:4px}.shared-list{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.shared-card{padding:13px;border:1px solid #183047;background:#091724;border-radius:11px;color:#dce9f5}.shared-card b{display:block}.shared-card small{display:block;color:#7890a7;margin:5px 0}.shared-card strong{font-size:13px}.quality-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.quality-grid div{padding:14px;background:#091724;border:1px solid #183047;border-radius:10px}.quality-grid b{display:block;font-size:22px}.quality-grid span{font-size:10px;color:#7890a7}@media(max-width:1100px){.command-grid{grid-template-columns:repeat(4,1fr)}.command-main{grid-column:1/-1}.shared-list{grid-template-columns:repeat(3,1fr)}}@media(max-width:700px){.command-grid{grid-template-columns:1fr 1fr}.command-main{grid-column:1/-1}.problem-item{grid-template-columns:10px 1fr}.problem-facts{grid-column:2;justify-content:flex-start}.shared-list{grid-template-columns:1fr}.event-cards{grid-template-columns:1fr}}
/* V4.2 operator-first additions */
.demo-pill,.coming{font-size:10px;font-weight:900;letter-spacing:.7px;padding:7px 10px;border-radius:999px;border:1px solid #31506a;color:#9fc6e8;background:#0a1a29}.prediction-list{display:grid;gap:9px}.prediction-item,.sensor-problem{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:center;padding:14px 16px;border:1px solid #1c3449;border-radius:12px;background:#091724;color:#dce9f5}.prediction-item:hover,.sensor-problem:hover{border-color:#396887}.prediction-item p,.sensor-problem p{margin:5px 0 0;color:#9db0c1;font-size:12px}.prediction-item small,.sensor-problem small{color:#6f879d}.prediction-metric{text-align:right}.prediction-metric b{display:block;font-size:18px}.prediction-metric span{font-size:10px;color:#7890a7}.onu-health-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}.onu-health-grid a,.onu-health-grid div{padding:15px 12px;border:1px solid #1b3449;background:#091724;border-radius:11px;color:#dce9f5}.onu-health-grid b{display:block;font-size:25px}.onu-health-grid span{font-size:10px;color:#7890a7}.onu-health-grid .critical b{color:#ff7a88}.onu-health-grid .high b{color:#ffb36a}.onu-health-grid .warning b{color:#f5df7d}.onu-health-grid .degrading b{color:#c69aff}.syslog-next{display:flex;justify-content:space-between;align-items:center;border-style:dashed}.syslog-next h2{margin-bottom:5px}.syslog-next p{margin:0;color:#8097aa;font-size:12px;max-width:900px}.back-link{display:inline-block;margin-bottom:15px;color:#8bc7ff}.device-summary{margin-bottom:15px}.device-facts .wide{grid-column:span 2}.diag-section{margin-top:15px}.diag-tabs{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:12px}.diag-tab{border:1px solid #294258;background:#0a1724;color:#9db0c1;border-radius:8px;padding:8px 10px;cursor:pointer}.diag-tab.active{border-color:#4aa7ff;color:#fff}.diag-pane{display:none}.diag-pane.active{display:block}.issue-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:14px}.issue-strip div{padding:13px;background:#091724;border:1px solid #183047;border-radius:10px}.issue-strip b{display:block;font-size:22px}.issue-strip span{font-size:10px;color:#7890a7}@media(max-width:1000px){.onu-health-grid{grid-template-columns:repeat(4,1fr)}}@media(max-width:650px){.onu-health-grid{grid-template-columns:repeat(2,1fr)}.prediction-item,.sensor-problem{grid-template-columns:1fr}.prediction-metric{text-align:left}.device-facts .wide{grid-column:auto}.issue-strip{grid-template-columns:1fr 1fr}}
/* V4.3 Fast NOC */
.bg-clock{margin-left:auto;min-width:255px;text-align:right}.bg-clock strong{display:block;font-size:20px;letter-spacing:.5px}.bg-clock>small{display:block;color:#7f95a8;font-size:10px}.refresh-caption{display:flex;justify-content:flex-end;gap:10px;margin-top:5px;font-size:9px;color:#7890a7}.refresh-track{height:4px;margin-top:4px;background:#172b3d;border-radius:4px;overflow:hidden}.refresh-track i{display:block;height:100%;width:0;background:#42d392;transition:width 1s linear}.refresh-track.stale i{background:#ff9d45}.layer-controls{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.layer-controls label{border:1px solid #294258;background:#0a1724;color:#a7bacb;border-radius:8px;padding:7px 9px;font-size:11px;cursor:pointer}.layer-controls input{accent-color:#4aa7ff;vertical-align:-1px}.map-help{margin:4px 0 0;font-size:10px}.map-legend{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin-top:10px;color:#7890a7;font-size:10px}.legend-dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:5px}.legend-dot.olt{background:#4aa7ff}.legend-dot.splitter{background:#f1cf55;border-radius:2px}.legend-dot.onu{background:#42d392}.topology-note{margin-left:auto}.leaflet-tooltip.noc-label{background:#0b1928;color:#eaf2fb;border:1px solid #294258;box-shadow:none;font-size:10px}.map-count-badge{background:#0b1928;color:#eaf2fb;border:1px solid #294258;border-radius:999px;padding:3px 7px;font-size:9px}@media(max-width:900px){header{flex-wrap:wrap}.bg-clock{width:100%;text-align:left}.refresh-caption{justify-content:flex-start}.topology-note{margin-left:0}.layer-controls{justify-content:flex-start}}
.refresh-track.refreshing i{width:100%!important;background:#4aa7ff;animation:nocPulse 1s ease-in-out infinite alternate}.refresh-track.stale i{background:#ff9d45}@keyframes nocPulse{from{opacity:.35}to{opacity:1}}

/* V4.3.2 Switch map layer */
.legend-dot.switch{
  background:#a97cff;
  box-shadow:0 0 8px #a97cff66;
}

.map-status.up{
  background:#173f35;
  color:#72e1b0;
}

.map-status.down{
  background:#5b2630;
  color:#ff9aa4;
}

.map-status.unmonitored,
.map-status.unknown{
  background:#263747;
  color:#a9bbca;
}

.switch-popup{
  min-width:300px;
}

.switch-popup-item{
  padding:8px 0;
}

.switch-popup-item p{
  margin:6px 0;
  color:#a9bbca;
  font-size:11px;
  line-height:1.45;
}

.switch-popup-item small{
  color:#7890a7;
  line-height:1.45;
}

.switch-popup hr{
  border:0;
  border-top:1px solid #20364a;
  margin:10px 0;
}

.switch-paths{
  margin-top:9px;
  padding:9px 10px;
  background:#091724;
  border:1px solid #183047;
  border-radius:8px;
}

.switch-paths ul{
  margin:7px 0;
  padding-left:18px;
}

.switch-paths li{
  margin:4px 0;
  color:#a9bbca;
  font-size:10px;
  line-height:1.4;
}

@media(max-width:600px){
  .switch-popup{
    min-width:240px;
  }
}

/* V4.3.2 Switch popup refinements */
.switch-popup-item > small{
  display:block;
  margin-top:6px;
}

.switch-paths small{
  display:block;
}

.switch-popup-item > b{
  line-height:1.45;
}

/* Switch legend: purple outline = switch, inner color = operational status */
.legend-dot.switch{
  width:11px;
  height:11px;
  background:#42d392;
  border:2px solid #a97cff;
  box-shadow:0 0 8px #a97cff66;
}

.legend-dot.switch{
  background:#a97cff;
  border:0;
  box-shadow:0 0 8px #a97cff66;
}

/* Switch device status */
.badge.up{
  background:#3d2c59;
  color:#d5b4ff;
}

.badge.down{
  background:#5b2630;
  color:#ff9aa4;
}

.badge.unmonitored{
  background:#5c3b20;
  color:#ffc17d;
}

/* V4.4 realtime / delta refresh */
.refresh-sources-panel{border-color:#24425a;background:linear-gradient(145deg,#0c1b2a,#091724)}
.live-mode-pill{display:inline-flex;align-items:center;gap:7px;font-size:10px;font-weight:900;letter-spacing:.6px;color:#8ff0c4;border:1px solid #245c49;background:#0b251d;padding:7px 10px;border-radius:999px}
.live-mode-pill i,.source-state-dot.live{width:7px;height:7px;border-radius:50%;background:#42d392;box-shadow:0 0 10px #42d39288;animation:nocPulse 1s ease-in-out infinite alternate}
.source-refresh-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.source-refresh-card{padding:14px 15px;border:1px solid #1d364b;background:#081622;border-radius:12px;min-width:0}
.source-refresh-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.source-refresh-head b{display:block;font-size:13px}.source-refresh-head span{display:block;margin-top:3px;color:#79a7c8;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.5px}
.source-state-dot{display:block;width:7px;height:7px;border-radius:50%;background:#4aa7ff;box-shadow:0 0 8px #4aa7ff66;margin-top:4px}
.source-refresh-times{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0 9px}.source-refresh-times span{font-size:9px;color:#668198}.source-refresh-times strong{display:block;color:#d9e8f5;margin-top:2px;font-size:10px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.source-progress{height:5px;background:#142a3d;border-radius:999px;overflow:hidden}.source-progress i{display:block;height:100%;width:0;background:#42d392;transition:width 1s linear}.source-progress.event-driven i{background:#4aa7ff;opacity:.75}
.source-refresh-foot{display:flex;justify-content:space-between;gap:10px;margin-top:8px}.source-refresh-foot small{color:#667f95;font-size:9px;line-height:1.35;max-width:65%}.source-refresh-foot em{color:#9db0c1;font-style:normal;font-size:9px;text-align:right}
.live-incidents-panel{border-color:#294a63}.live-incidents-meta{text-align:right;min-width:145px}.live-incidents-meta b{font-size:27px;display:block}.live-incidents-meta span,.live-incidents-meta small{display:block;color:#7890a7;font-size:9px;margin-top:2px}
.live-incidents-list{display:grid;gap:9px}.live-incident{position:relative;display:grid;grid-template-columns:7px 1fr auto;gap:14px;align-items:center;padding:14px 16px 14px 10px;background:#081622;border:1px solid #1b3449;border-radius:12px;overflow:hidden}.live-incident:hover{border-color:#315b7e}.incident-stripe{height:100%;min-height:66px;border-radius:4px;background:#7890a7}.live-incident.critical .incident-stripe{background:#ff5263;box-shadow:0 0 14px #ff526355}.live-incident.high .incident-stripe{background:#ff9d45}.live-incident.medium .incident-stripe{background:#f1cf55}.incident-title{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.incident-title>b{font-size:13px}.incident-status{font-size:9px;color:#8ba5ba;padding:3px 6px;border:1px solid #274258;border-radius:999px}.incident-main h3{font-size:14px;margin:6px 0 3px;color:#eaf2fb}.incident-main p{margin:0;color:#9db0c1;font-size:11px}.incident-main small{display:block;margin-top:5px;color:#6f879d}.incident-action{text-align:right;min-width:170px}.incident-action b{display:block;font-size:10px;color:#72e1b0}.incident-action.review b{color:#ffc17d}.incident-action span{display:block;color:#678198;font-size:9px;margin-top:5px}
.realtime-ready{border-color:#245c49}.coming.ready{border-color:#245c49;color:#8ff0c4;background:#0b251d}
@media(max-width:1050px){.source-refresh-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.source-refresh-grid{grid-template-columns:1fr}.source-refresh-foot{display:block}.source-refresh-foot small{max-width:none}.source-refresh-foot em{display:block;text-align:left;margin-top:5px}.live-incident{grid-template-columns:7px 1fr}.incident-action{grid-column:2;text-align:left;min-width:0}}

/* -------------------------------------------------------------------------
   V5 HUMAN NOC PREVIEW
   Human-first presentation: state -> incident domain -> probable zone -> action.
   Technical evidence remains available in collapsed details.
   ------------------------------------------------------------------------- */
.v5-page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:18px}.v5-page-head h1{font-size:38px;margin:3px 0 7px}.v5-page-head p{max-width:760px;margin:0}.v5-data-clock{min-width:285px}
.v5-health-hero{display:grid;grid-template-columns:2.1fr repeat(4,1fr);gap:10px;margin-bottom:16px}.v5-health-main,.v5-kpi{border:1px solid #1d3449;background:linear-gradient(145deg,#0d1c2c,#091724);border-radius:15px;padding:17px 18px}.v5-health-main{border-color:#29516e}.v5-health-line{display:flex;align-items:center;gap:10px;margin:7px 0 5px}.v5-health-line i{width:11px;height:11px;border-radius:50%;background:#7890a7;box-shadow:0 0 14px #7890a755}.v5-health-line i.ok{background:#42d392;box-shadow:0 0 14px #42d39266}.v5-health-line i.warn{background:#f1cf55;box-shadow:0 0 14px #f1cf5566}.v5-health-line i.bad{background:#ff5263;box-shadow:0 0 14px #ff526366}.v5-health-main h2{font-size:23px;margin:0}.v5-health-main p{font-size:11px;color:#8198ab;margin:0}.v5-kpi b{display:block;font-size:30px;line-height:1}.v5-kpi span{display:block;margin-top:8px;font-size:11px;font-weight:800}.v5-kpi small{display:block;margin-top:4px;color:#6f879d;font-size:9px}.v5-kpi.backbone b{color:#ff8d98}.v5-kpi.access b{color:#65b9ff}.v5-kpi.risk b{color:#f1cf55}.v5-kpi.affected b{color:#c69aff}
.v5-section{padding:18px;margin-bottom:14px}.v5-section-title{margin-bottom:13px}.v5-section-title p{margin:4px 0 0}.v5-incident-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px}.v5-incident-column{background:#081622;border:1px solid #1b3449;border-radius:14px;padding:14px}.v5-column-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:11px}.v5-column-head h3{font-size:16px;margin:7px 0 0}.v5-column-head>span{font-size:10px;color:#7890a7}.v5-domain-pill{display:inline-flex;padding:4px 7px;border-radius:999px;font-size:8px;font-weight:900;letter-spacing:.7px}.v5-domain-pill.backbone{background:#3b2028;color:#ff9aa4;border:1px solid #6a313d}.v5-domain-pill.access{background:#152f48;color:#8bc7ff;border:1px solid #28577d}.v5-mini-meta{text-align:right}.v5-mini-meta b{display:block;font-size:24px}.v5-mini-meta small{display:block;color:#7890a7;font-size:8px}.v5-human-list{display:grid;gap:8px}.v5-human-card{border:1px solid #20384c;background:#0a1825;border-radius:11px;padding:13px 14px}.v5-human-card.active{border-left:4px solid #ff5263}.v5-human-card.high{border-left-color:#ff9d45}.v5-human-card.warning{border-left-color:#f1cf55}.v5-human-card-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.v5-human-card-head b{font-size:13px}.v5-human-card-head time{color:#6f879d;font-size:9px}.v5-human-card h4{margin:8px 0 5px;font-size:14px}.v5-human-card p{margin:0;color:#9db0c1;font-size:11px;line-height:1.5}.v5-human-card .v5-zone{margin-top:8px;padding:8px 10px;border-radius:8px;background:#0d2030;border:1px solid #1d3a50;font-size:10px;color:#bfd1df}.v5-human-card .v5-zone b{color:#fff}.v5-human-card footer{display:flex;justify-content:space-between;gap:10px;margin-top:9px;padding:0;background:none;border:0;color:#71899f;font-size:9px}.v5-human-card footer strong{color:#a9bfd1}.v5-empty{padding:18px;border:1px dashed #294258;border-radius:10px;text-align:center;color:#7890a7;font-size:11px}.v5-recent{margin-top:10px;border-top:1px solid #1c3347;padding-top:9px}.v5-recent summary{cursor:pointer;color:#8ea6ba;font-size:10px}.v5-recent-list{display:grid;gap:6px;margin-top:9px}.v5-recent-item{display:flex;justify-content:space-between;gap:10px;padding:9px 10px;background:#091724;border:1px solid #193247;border-radius:8px}.v5-recent-item b{font-size:10px}.v5-recent-item small{color:#71899f;font-size:9px;text-align:right}.v5-risk-section{border-color:#4c4727}.v5-risk-list{display:grid;gap:8px}.v5-risk-card{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:12px 13px;border:1px solid #4a4325;background:#17180f;border-radius:10px}.v5-risk-icon{width:9px;height:9px;border-radius:50%;background:#f1cf55;box-shadow:0 0 10px #f1cf5555}.v5-risk-card b{font-size:12px}.v5-risk-card p{margin:3px 0 0;color:#a9a98d;font-size:10px}.v5-risk-card small{color:#8e8b62;font-size:9px;text-align:right}.v5-map-panel{padding:18px;margin-bottom:14px}.v5-map-panel #noc-map{height:460px}.v5-tech-details{padding:0;margin-top:14px;overflow:hidden}.v5-tech-details>summary{cursor:pointer;list-style:none;padding:17px 19px;display:flex;align-items:center}.v5-tech-details>summary::-webkit-details-marker{display:none}.v5-tech-details>summary b{display:block;font-size:13px}.v5-tech-details>summary small{display:block;color:#71899f;margin-top:3px;font-size:9px}.v5-tech-details>summary:after{content:'＋';margin-left:auto;color:#8bc7ff;font-size:20px}.v5-tech-details[open]>summary:after{content:'−'}.v5-tech-body{border-top:1px solid #1d3449;padding:16px}.v5-tech-body .refresh-sources-panel{padding:0;border:0;background:none}.v5-tech-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:18px}.v5-tech-grid>div{min-width:0}.v5-hidden-counts{display:none}
@media(max-width:1150px){.v5-health-hero{grid-template-columns:2fr repeat(2,1fr)}.v5-health-main{grid-row:span 2}.v5-incident-columns{grid-template-columns:1fr}}
@media(max-width:720px){.v5-page-head{display:block}.v5-data-clock{margin-top:12px}.v5-health-hero{grid-template-columns:1fr 1fr}.v5-health-main{grid-column:1/-1;grid-row:auto}.v5-tech-grid{grid-template-columns:1fr}.v5-risk-card{grid-template-columns:auto 1fr}.v5-risk-card small{grid-column:2;text-align:left}.v5-map-panel #noc-map{height:360px}}

/* -------------------------------------------------------------------------
   V5.1 EFFICIENT HUMAN NOC
   Lightweight source pulse, incident-first UI, lazy map and detail drawer.
   ------------------------------------------------------------------------- */
.monitor-head{margin-left:auto;display:flex;align-items:center;gap:10px;min-width:270px;justify-content:flex-end;text-align:right}.monitor-head>i{width:9px;height:9px;border-radius:50%;background:#42d392;box-shadow:0 0 12px #42d39277;flex:0 0 auto}.monitor-head>i.error{background:#ff5263;box-shadow:0 0 12px #ff526377}.monitor-head strong{display:block;font-size:12px}.monitor-head small{display:block;color:#71899f;font-size:9px;margin-top:3px}
.v51-page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:18px}.v51-page-head h1{font-size:38px;margin:3px 0 7px}.v51-page-head p{max-width:780px;margin:0}.v51-pulse-box{min-width:310px;display:flex;align-items:center;gap:11px;background:#0a1826;border:1px solid #1d354a;border-radius:13px;padding:13px 15px}.v51-pulse-box strong{display:block;font-size:12px}.v51-pulse-box small{display:block;color:#71899f;font-size:9px;margin-top:4px}.v51-live-dot{width:9px;height:9px;border-radius:50%;background:#42d392;box-shadow:0 0 12px #42d39277;flex:0 0 auto}.v51-live-dot.error{background:#ff5263;box-shadow:0 0 12px #ff526377}
.v51-card-actions{display:flex;gap:7px;margin-top:10px}.v51-link-btn{appearance:none;border:1px solid #2d5674;background:#10243a;color:#9fd0ff;border-radius:8px;padding:7px 10px;font-size:10px;font-weight:800;cursor:pointer}.v51-link-btn:hover{border-color:#4aa7ff;color:#fff}.v51-link-btn.map{border-color:#3e4e2a;background:#151c10;color:#d7df8a}
.v51-map-panel{padding:18px;margin-bottom:14px;border-color:#31506a}.v51-map-panel[hidden]{display:none}.v51-map-panel #noc-map{height:430px;border-radius:12px;overflow:hidden;background:#081622}.v51-map-caption{margin-top:10px;padding:10px 12px;border:1px solid #20394d;background:#091724;border-radius:9px;color:#8fa5b8;font-size:10px;line-height:1.5}
.v51-btn{appearance:none;border:1px solid #2f78b8;background:#153758;color:#d8edff;border-radius:9px;padding:10px 13px;font-size:11px;font-weight:800;cursor:pointer}.v51-btn:hover{border-color:#5aaeff;color:#fff}.v51-btn.secondary{background:#0b1928;border-color:#294258;color:#9fb2c3}.v51-btn:disabled{opacity:.4;cursor:not-allowed}
.v51-drawer-backdrop{position:fixed;inset:0;background:#0008;z-index:50;backdrop-filter:blur(2px)}.v51-drawer-backdrop[hidden]{display:none}.v51-drawer{position:fixed;top:0;right:0;width:min(520px,94vw);height:100vh;background:#081522;border-left:1px solid #294258;z-index:51;transform:translateX(102%);transition:transform .22s ease;box-shadow:-30px 0 70px #0008;display:flex;flex-direction:column}.v51-drawer.open{transform:translateX(0)}.v51-drawer-head{padding:22px 22px 17px;display:flex;justify-content:space-between;align-items:flex-start;gap:15px;border-bottom:1px solid #1d3449}.v51-drawer-head h2{font-size:22px;margin:5px 0 0}.v51-icon-btn{appearance:none;border:1px solid #294258;background:#0b1928;color:#b7cadb;border-radius:9px;width:36px;height:36px;font-size:24px;line-height:1;cursor:pointer}.v51-drawer-body{padding:20px 22px;overflow:auto;flex:1}.v51-drawer-actions{padding:15px 22px;border-top:1px solid #1d3449;display:flex;gap:9px}.v51-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.v51-detail-grid>div{padding:12px;border:1px solid #1d3449;background:#0a1826;border-radius:10px}.v51-detail-grid span,.v51-diagnosis>span,.v51-evidence>span{display:block;color:#6f879d;font-size:9px;text-transform:uppercase;letter-spacing:.7px}.v51-detail-grid b{display:block;margin-top:5px;font-size:12px;color:#e7f1fa}.v51-diagnosis{margin-top:14px;padding:15px;border:1px solid #274760;background:#0b1c2a;border-radius:11px}.v51-diagnosis h3{margin:7px 0 6px;font-size:16px}.v51-diagnosis p{margin:0;color:#94a9bb;font-size:11px;line-height:1.5}.v51-evidence{margin-top:14px}.v51-evidence>div{margin-top:7px;padding:9px 11px;background:#0a1826;border:1px solid #1c3448;border-radius:8px;color:#b9cbd9;font-size:11px}.v51-map-note{margin-top:14px;padding:11px 12px;border-left:3px solid #f1cf55;background:#17180f;color:#b8b58e;font-size:10px;line-height:1.5}
.v5-risk-card strong{color:#f3df83}.v5-human-card footer+ .v51-card-actions{margin-top:9px}.v5-human-card .v51-card-actions{border-top:1px solid #193247;padding-top:9px}.v5-risk-card .v51-card-actions{margin-top:8px}
@media(max-width:900px){.monitor-head{width:100%;justify-content:flex-start;text-align:left;min-width:0}.v51-page-head{display:block}.v51-pulse-box{min-width:0;margin-top:12px}.v51-map-panel #noc-map{height:360px}}
@media(max-width:620px){.v51-detail-grid{grid-template-columns:1fr}.v51-drawer-actions{flex-wrap:wrap}.v51-btn{flex:1}.v51-page-head h1{font-size:32px}}

/* -------------------------------------------------------------------------
   V5.2 INCIDENT TOPOLOGY VIEW
   On-demand topology around the selected incident; never loads the full map.
   ------------------------------------------------------------------------- */
.v52-topology-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(320px,.8fr);gap:14px;align-items:stretch}.v52-map-wrap{position:relative;min-width:0}.v52-map-wrap #noc-map{height:520px!important}.v52-topology-summary{border:1px solid #20394d;background:#081622;border-radius:12px;padding:14px;max-height:520px;overflow:auto}.v52-map-legend{position:absolute;left:12px;bottom:12px;z-index:500;background:#07131fe8;border:1px solid #294258;border-radius:9px;padding:8px 10px;display:grid;gap:5px;font-size:9px;color:#9db0c1;box-shadow:0 8px 25px #0005}.v52-map-legend span{display:flex;align-items:center;gap:7px}.v52-map-legend i{width:9px;height:9px;border-radius:50%;display:inline-block;border:1px solid #07131f}.v52-map-legend i.olt{background:#65b9ff}.v52-map-legend i.splitter{background:#f1cf55}.v52-map-legend i.affected{background:#ff5263}.v52-map-legend i.other{background:#7890a7}
.v52-topo-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-bottom:10px}.v52-topo-summary>div{padding:10px;border:1px solid #1d3449;background:#0a1826;border-radius:9px}.v52-topo-summary b{display:block;font-size:18px;color:#e8f3fb}.v52-topo-summary span{display:block;margin-top:4px;color:#7890a7;font-size:8px;line-height:1.3}.v52-common-point{padding:12px;border:1px solid #3f4b27;background:#16190f;border-radius:10px;margin-bottom:11px}.v52-common-point>span{display:block;color:#aaa56d;font-size:8px;text-transform:uppercase;letter-spacing:.6px}.v52-common-point>b{display:block;color:#f2e58e;font-size:12px;margin-top:5px;line-height:1.35}.v52-common-point p{margin:6px 0 0;color:#abae93;font-size:9px;line-height:1.45}.v52-common-point small{display:block;margin-top:7px;color:#807c58;font-size:8px}
.v52-tree{display:grid;gap:9px}.v52-tree-node{position:relative;padding:10px 11px 10px 14px;border:1px solid #244158;background:#0b1a28;border-radius:9px}.v52-tree-node:before{content:'';position:absolute;left:5px;top:10px;bottom:10px;width:3px;border-radius:3px;background:#65b9ff}.v52-tree-node.splitter:before{background:#f1cf55}.v52-tree-node b{display:block;font-size:11px}.v52-tree-node small{display:block;color:#7890a7;font-size:8px;margin-top:4px}.v52-tree-splitter{padding-left:13px;border-left:1px dashed #355069}.v52-onu-row{display:flex;flex-wrap:wrap;gap:5px;padding:8px 0 2px 7px}.v52-onu-chip{display:inline-flex;padding:4px 6px;border-radius:999px;font-size:8px;border:1px solid #31495e;background:#0a1723;color:#9db0c1}.v52-onu-chip.affected{border-color:#75323b;background:#2a151b;color:#ff9ca5}.v52-onu-chip.other{border-color:#334b5d;color:#91a7b9}.v52-onu-row em{font-size:8px;color:#6f879d;padding:4px}.v52-semantic-note{margin-top:10px;padding:9px 10px;border-left:3px solid #55758e;background:#0a1826;color:#8198ab;font-size:8px;line-height:1.45}.v52-link-row{display:grid;grid-template-columns:minmax(80px,.45fr) 1fr;gap:8px;padding:9px 10px;margin-top:6px;border:1px solid #1d3449;background:#0a1826;border-radius:8px}.v52-link-row b{font-size:9px}.v52-link-row span{font-size:9px;color:#91a6b8}.v52-empty-topology{padding:14px;border:1px dashed #2b4559;border-radius:9px;color:#8399ab;font-size:9px;line-height:1.5}
@media(max-width:1050px){.v52-topology-layout{grid-template-columns:1fr}.v52-topology-summary{max-height:none}.v52-map-wrap #noc-map{height:430px!important}}@media(max-width:620px){.v52-topo-summary{grid-template-columns:1fr}.v52-map-wrap #noc-map{height:360px!important}.v52-map-legend{position:static;margin-top:7px}}

/* -------------------------------------------------------------------------
   V5.3 ACCESS INCIDENT DIAGNOSIS
   Separate observed incident evidence, documented UserSide topology and
   rule-based geographic/inferred hints.
   ------------------------------------------------------------------------- */
.v53-topo-summary{grid-template-columns:repeat(4,1fr)}
.v53-evidence-block{margin-top:10px;padding:12px;border:1px solid #20394d;background:#0a1826;border-radius:10px}
.v53-evidence-block>span{display:block;color:#6f879d;font-size:8px;font-weight:800;letter-spacing:.7px;text-transform:uppercase;margin-bottom:5px}
.v53-evidence-block>b{display:block;font-size:12px;color:#e7f1fa;line-height:1.4}
.v53-evidence-block>p{margin:6px 0 0;color:#93a9bb;font-size:9px;line-height:1.5}
.v53-evidence-block>small{display:block;margin-top:8px;color:#6f879d;font-size:8px;line-height:1.5}
.v53-evidence-block.geographic{border-color:#294d68;background:#0a1928}
.v53-evidence-block.geographic>b{color:#9ed2ff}
.v53-evidence-block.documented{border-color:#245445;background:#0a1a17}
.v53-evidence-block.documented>span{color:#71ba9f}
.v53-evidence-block.inferred{border-color:#514b29;background:#17180f}
.v53-evidence-block.inferred>span{color:#c7bd70}
.v53-evidence-block.inferred>b{color:#eee29a}
.v53-pon-row{display:grid;grid-template-columns:105px 1fr;gap:8px;padding:8px 9px;margin-top:6px;border:1px solid #1d3449;background:#081622;border-radius:8px}
.v53-pon-row b{font-size:9px;color:#dbeaf6}.v53-pon-row span{font-size:9px;color:#8fa5b8;line-height:1.4}
@media(max-width:620px){.v53-topo-summary{grid-template-columns:1fr 1fr}.v53-pon-row{grid-template-columns:1fr}}


/* V5.3.2 — state-first incident UI */
.v532-card-tags{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.v532-state{display:inline-flex;align-items:center;gap:5px;padding:3px 7px;border-radius:999px;font-size:8px;font-weight:900;letter-spacing:.55px;border:1px solid #35516a;background:#102233;color:#9fb5c8}
.v532-state.active{border-color:#6e3540;background:#301a20;color:#ff9aa4}
.v532-state.residual{border-color:#665725;background:#2a2613;color:#f0d777}
.v532-residual{border-left-color:#f1cf55!important;background:linear-gradient(90deg,#17180f 0,#0a1825 22%)}
.v532-ok-empty{display:flex;flex-direction:column;gap:5px;background:#091a18;border-color:#21493f;color:#7fa99d}
.v532-ok-empty b{color:#a6d4c4;font-size:12px}
.v532-ok-empty span{font-size:9px}
.v5-human-card{transition:border-color .15s ease,transform .15s ease}
.v5-human-card:hover{border-color:#315b7e;transform:translateY(-1px)}
.v5-human-card-head time{white-space:nowrap}
.v5-human-card .v5-zone{line-height:1.5}
.v5-recent-item small{line-height:1.45}
@media(max-width:900px){.v532-card-tags{gap:4px}.v532-state{font-size:7px;padding:3px 6px}}

/* V5.3.3 — passive shadow prediction validation */
.shadow-validation-section{border:1px solid rgba(104,178,255,.18);background:linear-gradient(180deg,rgba(9,24,38,.97),rgba(7,18,29,.97))}
.shadow-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0 10px}
.shadow-kpis>div{padding:14px 16px;border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(255,255,255,.025)}
.shadow-kpis b{display:block;font-size:24px;line-height:1.1}.shadow-kpis span{display:block;margin-top:5px;color:var(--muted,#91a2b2);font-size:12px}
.shadow-legend{display:flex;gap:16px;flex-wrap:wrap;padding:10px 0 14px;color:var(--muted,#91a2b2);font-size:12px}
.shadow-legend span{display:flex;align-items:center;gap:7px}.shadow-legend i{width:9px;height:9px;border-radius:50%;display:inline-block}.shadow-legend i.predicted{background:#50d890}.shadow-legend i.precursor{background:#f1cf55}.shadow-legend i.sudden{background:#ff7180}
.shadow-list{display:grid;gap:10px}.shadow-card{border:1px solid rgba(255,255,255,.08);border-left-width:4px;border-radius:14px;padding:13px 15px;background:rgba(255,255,255,.025)}
.shadow-card.predicted{border-left-color:#50d890}.shadow-card.precursor{border-left-color:#f1cf55}.shadow-card.sudden{border-left-color:#ff7180}
.shadow-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.shadow-card-head>div{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.shadow-card-head time{font-size:12px;color:var(--muted,#91a2b2)}
.shadow-class{font-size:10px;font-weight:800;letter-spacing:.08em;padding:5px 8px;border-radius:999px}.shadow-class.predicted{background:rgba(80,216,144,.12);color:#79e9ab}.shadow-class.precursor{background:rgba(241,207,85,.12);color:#f6dc79}.shadow-class.sudden{background:rgba(255,113,128,.12);color:#ff91a0}
.shadow-card h4{margin:9px 0 5px}.shadow-card p{margin:0;color:#d6e0e8}.shadow-evidence{margin-top:9px;padding:9px 11px;border-radius:10px;background:rgba(255,255,255,.035);font-size:12px;color:#b9c7d2}.shadow-card footer{display:flex;justify-content:space-between;gap:12px;margin-top:10px;color:var(--muted,#91a2b2);font-size:11px}
@media(max-width:850px){.shadow-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.shadow-card-head{align-items:flex-start;flex-direction:column}.shadow-card footer{flex-direction:column;gap:4px}}

/* -------------------------------------------------------------------------
   V5.3.3 professional operations UI polish
   State-first language, explicit time semantics, executive validation panel.
   ------------------------------------------------------------------------- */
.v51-page-head p{line-height:1.55}.v5-section-title h2{font-size:21px;letter-spacing:-.2px}.v5-section-title p{max-width:920px;line-height:1.55}.v5-column-head h3{font-size:15px;letter-spacing:-.1px}.v5-kpi span{line-height:1.25}
.v533-card-time{display:flex;flex-direction:column;align-items:flex-end;gap:2px;min-width:118px}.v533-card-time span{font-size:7px;font-weight:850;letter-spacing:.75px;text-transform:uppercase;color:#6f879d}.v533-card-time time{font-size:9px!important;font-weight:700;color:#a8bac9;font-variant-numeric:tabular-nums;white-space:nowrap}
.v533-state-confirm{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:7px 0 9px;padding:8px 10px;border-radius:8px;border:1px solid #26465f;background:#0a1a28}.v533-state-confirm b{font-size:9px;line-height:1.3;letter-spacing:.05px}.v533-state-confirm span{font-size:8px;color:#7890a7;white-space:nowrap;font-variant-numeric:tabular-nums}.v533-state-confirm.active{border-color:#5e3039;background:#23171c}.v533-state-confirm.active b{color:#ff9da6}.v533-state-confirm.residual{border-color:#605526;background:#211f13}.v533-state-confirm.residual b{color:#efd978}
.v5-human-card-head{align-items:flex-start}.v5-human-card h4{font-size:14px;margin:9px 0 5px}.v5-human-card>p{line-height:1.45}.v5-human-card footer{align-items:flex-start}.v5-human-card footer strong{line-height:1.35}.v5-human-card footer span{line-height:1.35}
.shadow-validation-section{border-color:#284e6a;background:linear-gradient(180deg,rgba(10,28,44,.98),rgba(7,18,29,.98));box-shadow:inset 0 1px 0 rgba(122,190,255,.04)}.shadow-validation-section .demo-pill{background:#102b40;border-color:#315c7a;color:#9dcff5}.shadow-kpis>div{background:#091a28;border-color:#1d3a50}.shadow-kpis b{font-variant-numeric:tabular-nums}.shadow-legend{border-top:1px solid rgba(255,255,255,.05);margin-top:4px;padding-top:13px}.shadow-legend b{font-size:10px;letter-spacing:.03em}.shadow-card-head .v533-card-time{min-width:142px}
.v5-risk-section .demo-pill{background:#182214;border-color:#3f552d;color:#d5e397}.v5-risk-card p{line-height:1.5}
.v5-mini-meta small{font-variant-numeric:tabular-nums}.v5-recent-item small b{color:#91a8bb;font-weight:700}.monitor-head small,.v51-pulse-box small{font-variant-numeric:tabular-nums}
@media(max-width:700px){.v533-card-time{align-items:flex-start;min-width:0}.v5-human-card-head{flex-direction:column;gap:7px}.v533-state-confirm{align-items:flex-start;flex-direction:column;gap:4px}.shadow-card-head .v533-card-time{min-width:0}.shadow-card-head{align-items:flex-start}}

/* -------------------------------------------------------------------------
   V5.4.0 — unified NOC Monitoring operational queue
   ------------------------------------------------------------------------- */
.v54-health-hero{grid-template-columns:2fr repeat(6,minmax(100px,1fr))}
.v5-kpi.attention b{color:#86c8ff}.v5-kpi.critical b{color:#ff6d79}.v5-kpi.major b{color:#ffad62}.v5-kpi.warning b{color:#f1cf55}.v5-kpi.shared b{color:#c69aff}.v5-kpi.chronic b{color:#8de0c0}
.v54-semantics{display:block;margin-top:6px;max-width:560px;color:#667f93;font-size:8px;line-height:1.45}
.v54-noc-card{position:relative}.v54-noc-card.critical{border-left:4px solid #ff5263}.v54-noc-card.major{border-left:4px solid #ff9d45}.v54-noc-card.warning{border-left:4px solid #f1cf55}.v54-noc-card.info{border-left:4px solid #5f7e98}
.v54-severity{display:inline-flex;align-items:center;padding:3px 7px;border-radius:999px;font-size:8px;font-weight:900;letter-spacing:.55px;border:1px solid #35516a}.v54-severity.critical{background:#301a20;border-color:#6e3540;color:#ff9aa4}.v54-severity.major{background:#302218;border-color:#76502d;color:#ffc184}.v54-severity.warning{background:#2a2613;border-color:#665725;color:#f0d777}.v54-severity.info{background:#122332;border-color:#31506a;color:#9db4c8}
.v532-state.chronic{border-color:#375c50;background:#10241e;color:#93ddc0}.v532-state.recent{border-color:#315d7a;background:#102638;color:#9ed2ff}.v532-state.watch{border-color:#46505a;background:#18202a;color:#abb8c4}
.v533-state-confirm.chronic{border-color:#2d5548;background:#0d211b}.v533-state-confirm.chronic b{color:#91d8bc}.v533-state-confirm.recent{border-color:#315a76;background:#0c2232}.v533-state-confirm.recent b{color:#9ed2ff}.v533-state-confirm.watch{border-color:#394958;background:#111d27}.v533-state-confirm.watch b{color:#aebdca}
.v54-metrics{margin-top:8px;padding:7px 9px;border-radius:8px;background:#091522;border:1px solid #1b3449;color:#8fa8bb;font-size:9px;font-variant-numeric:tabular-nums}
@media(max-width:1380px){.v54-health-hero{grid-template-columns:2fr repeat(3,1fr)}.v54-health-hero .v5-health-main{grid-row:span 2}}
@media(max-width:760px){.v54-health-hero{grid-template-columns:1fr 1fr}.v54-health-hero .v5-health-main{grid-column:1/-1;grid-row:auto}}

/* -------------------------------------------------------------------------
   V5.4.1 — по-ясен български интерфейс и адаптивен оперативен списък
   ------------------------------------------------------------------------- */
.v541-helper{display:block;margin-top:6px;max-width:520px;color:#667f93;font-size:8px;line-height:1.45}
.v541-backbone-history{margin-top:12px;padding:12px 14px;border:1px solid #1b3449;border-radius:12px;background:#081622}
.v541-backbone-history summary{font-size:10px;font-weight:750;color:#92a9bc}
.v5-incident-columns.v541-access-only{grid-template-columns:1fr}
.v5-incident-columns.v541-access-only .access-column{width:100%}
.v5-incident-columns.v541-access-only #live-incidents{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start}
.v5-incident-columns.v541-access-only .v54-noc-card.critical,
.v5-incident-columns.v541-access-only .v54-noc-card.shared-incident{grid-column:1/-1}
.v5-incident-columns.v541-access-only .v54-noc-card{height:100%}
.v5-incident-columns.v541-access-only .v54-noc-card .v5-zone{min-height:58px}
.v54-semantics{font-size:9px;max-width:720px;color:#7890a7}
.v54-health-hero .v5-kpi span{font-size:10px}
.v54-health-hero .v5-kpi small{line-height:1.35}
@media(max-width:1050px){.v5-incident-columns.v541-access-only #live-incidents{grid-template-columns:1fr}.v5-incident-columns.v541-access-only .v54-noc-card.critical,.v5-incident-columns.v541-access-only .v54-noc-card.shared-incident{grid-column:auto}}

/* -------------------------------------------------------------------------
   V5.4.2 — Field Service inspired NOC UI
   Светла работна зона, тъмно ляво меню, ниска информационна плътност.
   ------------------------------------------------------------------------- */
:root{
  color:#182234;
  background:#f3f6fa;
  --tk-bg:#f3f6fa;
  --tk-card:#ffffff;
  --tk-text:#182234;
  --tk-muted:#748198;
  --tk-line:#e3e8ef;
  --tk-side:#111b2d;
  --tk-side-soft:#1a2740;
  --tk-blue:#2f6fed;
}
html,body{background:var(--tk-bg)!important;color:var(--tk-text)!important}
body.tk-app{display:flex;min-height:100vh;margin:0;background:var(--tk-bg)!important}
a{color:var(--tk-blue)}

.tk-sidebar{position:fixed;inset:0 auto 0 0;width:248px;background:var(--tk-side);color:#fff;padding:28px 16px 20px;display:flex;flex-direction:column;z-index:40;box-shadow:12px 0 36px rgba(15,23,42,.06)}
.tk-side-brand{display:flex;align-items:center;gap:12px;padding:0 10px 26px;border-bottom:1px solid rgba(255,255,255,.08)}
.tk-side-logo{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#2f6fed;color:#fff;font-weight:900;letter-spacing:.4px}
.tk-side-brand b{display:block;font-size:17px;line-height:1.15}.tk-side-brand span{display:block;margin-top:4px;color:#9cabbe;font-size:11px}
.tk-side-nav{display:grid;gap:6px;margin-top:24px}.tk-side-nav small{padding:0 10px 8px;color:#687790;font-size:10px;font-weight:800;letter-spacing:1.2px}
.tk-side-nav a{margin:0!important;padding:12px 12px;border-radius:10px;display:flex;align-items:center;gap:11px;color:#d5ddea!important;font-size:14px;text-decoration:none;transition:.15s ease}
.tk-side-nav a i{font-style:normal;font-size:8px;color:#66768f}.tk-side-nav a:hover{background:#16243b;color:#fff!important}.tk-side-nav a.active{background:#1d3153;color:#fff!important;box-shadow:inset 3px 0 0 #5ba1ff}.tk-side-nav a.active i{color:#68acff}
.tk-side-note{margin-top:auto;padding:16px 10px 2px;border-top:1px solid rgba(255,255,255,.08)}.tk-side-note b{display:block;font-size:12px}.tk-side-note span{display:block;margin-top:4px;color:#7888a0;font-size:10px;line-height:1.4}
.tk-shell{margin-left:248px;min-width:0;flex:1;background:var(--tk-bg)}
.tk-topbar{height:74px;background:#fff;border-bottom:1px solid var(--tk-line);display:flex;align-items:center;justify-content:space-between;padding:0 30px;position:sticky;top:0;z-index:30}
.tk-topbar-title b{display:block;font-size:16px}.tk-topbar-title span{display:block;margin-top:3px;color:var(--tk-muted);font-size:11px}
.tk-monitor-status{display:flex;align-items:center;gap:10px;text-align:right}.tk-monitor-status>i{width:8px;height:8px;border-radius:50%;background:#19b76b;box-shadow:0 0 0 4px rgba(25,183,107,.08)}.tk-monitor-status>i.error{background:#ef4657;box-shadow:0 0 0 4px rgba(239,70,87,.08)}.tk-monitor-status strong{display:block;font-size:12px}.tk-monitor-status small{display:block;margin-top:2px;color:#8b97a8;font-size:9px}
.tk-shell main{width:auto!important;max-width:none!important;margin:0!important;padding:30px 30px 72px!important}.tk-shell>footer{position:static!important;width:auto!important;background:transparent!important;border:0!important;color:#9aa5b5!important;padding:0 30px 22px!important;text-align:center;font-size:9px}

.tk-page-head{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:22px}.tk-page-head h1{margin:5px 0 4px;font-size:34px;line-height:1.08;letter-spacing:-1px;color:#162033}.tk-page-head p{margin:0;color:var(--tk-muted);font-size:14px}.tk-eyebrow{color:#60708a;font-size:10px;font-weight:850;letter-spacing:1.25px}

.tk-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin-bottom:18px}.tk-kpi-card{min-height:126px;background:#fff;border:1px solid var(--tk-line);border-radius:18px;padding:20px;display:flex;align-items:center;gap:14px;box-shadow:0 8px 22px rgba(15,23,42,.035)}.tk-kpi-icon{width:43px;height:43px;border-radius:12px;display:grid;place-items:center;flex:0 0 43px;background:#eef4ff;color:#2f6fed;font-size:20px;font-weight:900}.tk-kpi-card>div:last-child{min-width:0}.tk-kpi-card span{display:block;color:#1d2737;font-size:13px;font-weight:750}.tk-kpi-card b{display:block;margin:3px 0 2px;font-size:32px;line-height:1;color:#172033;font-variant-numeric:tabular-nums}.tk-kpi-card small{display:block;color:#8b97a8;font-size:10px;line-height:1.25}.tk-kpi-card.critical .tk-kpi-icon{background:#fff0f2;color:#ef4657}.tk-kpi-card.major .tk-kpi-icon{background:#fff5e9;color:#e78224}.tk-kpi-card.warning .tk-kpi-icon{background:#fff8df;color:#c99400}.tk-kpi-card.shared .tk-kpi-icon{background:#f3efff;color:#7651c8}

.panel{background:#fff!important;border:1px solid var(--tk-line)!important;border-radius:18px!important;box-shadow:0 8px 24px rgba(15,23,42,.035)!important;color:var(--tk-text)!important}
.tk-queue-panel{padding:22px!important;margin-bottom:16px}.tk-section-head,.tk-subsection-head{display:flex;align-items:center;justify-content:space-between;gap:18px}.tk-section-head{padding-bottom:18px;border-bottom:1px solid #edf0f4}.tk-section-head h2{margin:4px 0 0;font-size:21px;color:#172033}.tk-section-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.tk-chip{padding:8px 10px;border-radius:9px;background:#f3f6fa;color:#627087;font-size:10px}.tk-chip b{color:#1c2737}.tk-check{color:#9aa4b2;font-size:9px}
.tk-incident-stack{display:grid;gap:18px;margin-top:18px}.tk-backbone-block{padding:16px;border:1px solid #f0d9dd;border-radius:14px;background:#fffafb}.tk-backbone-block[hidden]{display:none!important}.tk-subsection-head{margin-bottom:12px}.tk-subsection-head h3{margin:0;font-size:15px;color:#202a39}.tk-subsection-head small{display:block;margin-top:3px;color:#8995a6;font-size:10px}.tk-subsection-head>span{color:#8b97a8;font-size:10px}.tk-count-box{text-align:right}.tk-count-box b{display:block;font-size:24px;line-height:1;color:#172033}.tk-count-box span{font-size:9px;color:#97a2b0}
.tk-access-head{padding:2px 2px 0}.tk-issue-list{display:grid;gap:10px}

.tk-issue-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px;align-items:center;padding:18px 18px 18px 20px;background:#fff;border:1px solid #e5e9ef;border-left:4px solid #91a0b2;border-radius:14px;box-shadow:0 4px 12px rgba(15,23,42,.025);transition:.15s ease}.tk-issue-card:hover{border-color:#d5dbe4;box-shadow:0 8px 20px rgba(15,23,42,.055);transform:translateY(-1px)}.tk-issue-card.critical{border-left-color:#ef4657}.tk-issue-card.major{border-left-color:#e78a2f}.tk-issue-card.warning{border-left-color:#d0a217}.tk-issue-card.info{border-left-color:#7c8da3}
.tk-issue-content{min-width:0}.tk-issue-tags{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:8px}.tk-severity,.tk-state,.tk-kind{display:inline-flex;align-items:center;min-height:22px;padding:3px 8px;border-radius:999px;font-size:8px;font-weight:850;letter-spacing:.35px}.tk-severity{background:#f2f4f7;color:#536177}.tk-severity.critical{background:#fff0f2;color:#d93346}.tk-severity.major{background:#fff4e8;color:#c76d17}.tk-severity.warning{background:#fff8df;color:#997500}.tk-severity.info{background:#f2f5f8;color:#65748a}.tk-state{background:#eef7f2;color:#2e7f5b}.tk-state.residual{background:#fff8df;color:#907000}.tk-state.recent{background:#edf5ff;color:#3972ae}.tk-state.watch{background:#f3f5f7;color:#6f7d8f}.tk-kind{background:#f3f6fa;color:#657287}
.tk-issue-card h3{margin:0 0 5px;color:#172033;font-size:16px;line-height:1.25}.tk-issue-location{color:#7c899b;font-size:11px;line-height:1.4;white-space:normal}.tk-metric-row{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.tk-metric-row span{padding:6px 8px;border-radius:8px;background:#f6f8fb;border:1px solid #e9edf2;color:#5c697c;font-size:9px;font-variant-numeric:tabular-nums}.tk-short-cause{margin:10px 0 0!important;color:#576579!important;font-size:11px!important;line-height:1.4!important}.tk-short-cause b{color:#2d3949}
.tk-issue-side{min-width:170px;display:flex;flex-direction:column;align-items:flex-end;gap:12px}.tk-issue-side time{color:#69778b;font-size:10px;text-align:right;font-variant-numeric:tabular-nums}.tk-issue-side time span{display:block;color:#a0a9b6;font-size:8px;text-transform:uppercase;letter-spacing:.55px;margin-bottom:2px}
.tk-issue-card .v51-card-actions{margin:0!important;padding:0!important;border:0!important;display:flex;gap:7px;justify-content:flex-end}.v51-link-btn{border:1px solid #d6dde7!important;background:#fff!important;color:#385777!important;border-radius:9px!important;padding:8px 10px!important;font-size:9px!important}.v51-link-btn:hover{border-color:#9cb8d7!important;color:#1e4e7f!important}.v51-link-btn.map{background:#f5f7fa!important;border-color:#dde3ea!important;color:#59687b!important}

.tk-history{margin-top:12px;border-top:1px solid #edf0f4;padding-top:11px}.tk-history summary{cursor:pointer;color:#68768a;font-size:10px;font-weight:650}.v5-recent-list{margin-top:9px}.v5-recent-item{background:#f8fafc!important;border:1px solid #e7ebf0!important;color:#263244!important}.v5-recent-item small{color:#7e8a9c!important}
.v5-empty,.empty-state{background:#fafbfd!important;border-color:#dfe5ec!important;color:#7a8798!important}.loading-line{color:#8d98a7!important}

.tk-collapsible{padding:0!important;overflow:hidden;margin-bottom:16px}.tk-collapsible>summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:17px 20px}.tk-collapsible>summary::-webkit-details-marker{display:none}.tk-collapsible>summary b{display:block;font-size:13px;color:#243042}.tk-collapsible>summary small{display:block;margin-top:3px;color:#8e99a9;font-size:9px}.tk-collapsible>summary em{font-style:normal;color:#7c889a;font-size:9px}.tk-collapsible>summary:after{content:'＋';color:#728199;font-size:18px}.tk-collapsible[open]>summary:after{content:'−'}.tk-collapsible-body,.tk-collapsible .v5-tech-body{border-top:1px solid #edf0f4;padding:16px 20px}
.v5-risk-card{background:#fffaf0!important;border-color:#f0e3bf!important;color:#3d4654!important}.v5-risk-card p{color:#6d7480!important}.v5-risk-card strong{color:#8a6b00!important}

/* Drawer: detail stays detailed, but remains readable. */
.v51-drawer{background:#fff!important;border-left:1px solid #dde3ea!important;box-shadow:-24px 0 60px rgba(15,23,42,.18)!important;color:#1f2937!important}.v51-drawer-backdrop{background:rgba(15,23,42,.34)!important}.v51-drawer-head{border-bottom-color:#e8ecf1!important}.v51-drawer-head h2{color:#172033!important}.v51-icon-btn{background:#f5f7fa!important;border-color:#dde3ea!important;color:#59687b!important}.v51-drawer-actions{border-top-color:#e8ecf1!important;background:#fff}.v51-detail-grid>div{background:#f8fafc!important;border-color:#e5e9ef!important}.v51-detail-grid span,.v51-diagnosis>span,.v51-evidence>span{color:#8994a4!important}.v51-detail-grid b{color:#273244!important}.v51-diagnosis{background:#f7faff!important;border-color:#dce6f2!important}.v51-diagnosis h3{color:#243042!important}.v51-diagnosis p{color:#637084!important}.v51-evidence>div{background:#f8fafc!important;border-color:#e5e9ef!important;color:#566477!important}.v51-map-note{background:#fff9e9!important;color:#78672d!important}
.v51-btn{background:#2f6fed!important;border-color:#2f6fed!important;color:#fff!important}.v51-btn.secondary{background:#fff!important;border-color:#d8dee7!important;color:#59687b!important}

/* Light styling for existing non-overview pages that inherit base.html. */
.table,.card,.health-card,.alert-card,.metric-grid div,.source-refresh-card,.refresh-sources-panel,.async-block,.sensor-problem,.shared-card{background:#fff!important;border-color:#e2e7ee!important;color:#273244!important;box-shadow:none!important}.table th,.table td,.ops-table th,.ops-table td{border-bottom-color:#edf0f4!important}.table th,.ops-table th{color:#7f8a9b!important}.table td,.ops-table td{color:#293444!important}.muted,.note{color:#7c899b!important}.kicker,.eyebrow{color:#65758b!important}

@media(max-width:1250px){.tk-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.tk-sidebar{width:210px}.tk-shell{margin-left:210px}.tk-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tk-issue-card{grid-template-columns:1fr}.tk-issue-side{min-width:0;align-items:flex-start;flex-direction:row;justify-content:space-between}.tk-issue-side time{text-align:left}.tk-issue-card .v51-card-actions{justify-content:flex-start}}
@media(max-width:720px){.tk-sidebar{position:static;width:100%;height:auto;padding:14px}.tk-app{display:block}.tk-shell{margin-left:0}.tk-side-brand{padding-bottom:12px}.tk-side-nav{display:flex;overflow:auto;margin-top:12px}.tk-side-nav small,.tk-side-note{display:none}.tk-side-nav a{white-space:nowrap;padding:9px 11px!important}.tk-topbar{padding:0 16px;height:66px}.tk-monitor-status small{display:none}.tk-shell main{padding:20px 14px 56px!important}.tk-page-head h1{font-size:29px}.tk-kpi-grid{grid-template-columns:1fr 1fr;gap:10px}.tk-kpi-card{min-height:104px;padding:14px}.tk-kpi-icon{width:36px;height:36px;flex-basis:36px}.tk-kpi-card b{font-size:27px}.tk-section-head,.tk-subsection-head{align-items:flex-start;flex-direction:column}.tk-section-meta{justify-content:flex-start}.tk-queue-panel{padding:16px!important}.tk-issue-card{padding:15px}.tk-issue-side{flex-direction:column;align-items:flex-start}.tk-kpi-grid .tk-kpi-card.shared{grid-column:1/-1}}


/* V5.5 CURRENT RESPONSIVE */

.tk-mobile-menu{
  display:none;
}

.tk-sidebar-backdrop{
  display:none;
}

.tk-live-strip{
  display:grid;
  grid-template-columns:
    repeat(4,minmax(0,1fr));
  gap:8px;
  margin:0 0 14px;
}

.tk-live-strip>div{
  min-width:0;
  padding:9px 11px;
  border:1px solid #20394d;
  background:#081622;
  border-radius:10px;
}

.tk-live-strip span,
.tk-live-strip b,
.tk-live-strip small{
  display:block;
}

.tk-live-strip span{
  color:#7890a7;
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.4px;
}

.tk-live-strip b{
  margin-top:3px;
  font-size:11px;
}

.tk-live-strip small{
  margin-top:2px;
  color:#6f879d;
  font-size:8px;
}

.splitter-mobile-location{
  display:none!important;
}

.device-table small,
.splitter-table small{
  display:block;
  margin-top:3px;
  color:#7890a7;
  font-size:9px;
}

@media(max-width:860px){

  .tk-mobile-menu{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:38px;
    height:38px;
    border:1px solid #294258;
    background:#0a1724;
    color:#eaf2fb;
    border-radius:9px;
    font-size:20px;
  }

  .tk-sidebar{
    position:fixed!important;
    top:0!important;
    bottom:0!important;
    left:0!important;
    z-index:1200!important;
    transform:translateX(-105%);
    transition:transform .2s ease;
  }

  body.tk-menu-open
  .tk-sidebar{
    transform:translateX(0);
  }

  .tk-sidebar-backdrop{
    position:fixed;
    inset:0;
    z-index:1190;
    background:#02070dbd;
  }

  body.tk-menu-open
  .tk-sidebar-backdrop{
    display:block;
  }

  body.tk-menu-open{
    overflow:hidden;
  }

  .tk-shell{
    margin-left:0!important;
    width:100%!important;
  }

  .tk-kpi-grid{
    grid-template-columns:
      repeat(2,minmax(0,1fr))!important;
  }

  .tk-live-strip{
    grid-template-columns:
      repeat(2,minmax(0,1fr));
  }

  .device-table,
  .splitter-table{
    overflow:visible!important;
    border:0!important;
  }

  .device-table table,
  .device-table tbody,
  .device-table tr,
  .device-table td,
  .splitter-table table,
  .splitter-table tbody,
  .splitter-table tr,
  .splitter-table td{
    display:block;
    width:100%;
  }

  .device-table thead,
  .splitter-table thead{
    display:none;
  }

  .device-table tr,
  .splitter-table tr{
    margin-bottom:10px;
    padding:12px;
    border:1px solid #20394d;
    background:#081622;
    border-radius:12px;
  }

  .device-table td,
  .splitter-table td{
    border:0!important;
    padding:5px 0!important;
    display:grid!important;
    grid-template-columns:
      100px minmax(0,1fr);
    gap:8px;
  }

  .device-table td:before,
  .splitter-table td:before{
    content:attr(data-label);
    color:#71889b;
    font-size:9px;
    text-transform:uppercase;
  }

  .sp-location-column{
    display:none!important;
  }

  .splitter-mobile-location{
    display:block!important;
    margin-top:5px!important;
    color:#91a7b9!important;
    line-height:1.4;
  }

  .v52-topology-layout{
    grid-template-columns:1fr!important;
  }

  .v52-map-wrap #noc-map{
    height:360px!important;
  }
}

@media(max-width:520px){

  .tk-topbar-title span{
    display:none;
  }

  .tk-live-strip{
    grid-template-columns:
      1fr 1fr;
  }

  .device-table td,
  .splitter-table td{
    grid-template-columns:
      88px minmax(0,1fr);
  }
}


/* V5.5.1 READABILITY */

html{
  font-size:16px;
}

body{
  font-size:16px;
  line-height:1.5;
}

/* Sidebar */

.tk-sidebar nav a,
.tk-side-nav a{
  font-size:15px!important;
  font-weight:600!important;
  line-height:1.35!important;
}

.tk-sidebar small{
  font-size:12px!important;
  line-height:1.4!important;
}

/* Header */

.tk-topbar-title,
.tk-topbar-title b{
  font-size:18px!important;
}

.tk-topbar-title small{
  font-size:13px!important;
}

#monitor-headline{
  font-size:14px!important;
  font-weight:700!important;
}

#monitor-last-check{
  font-size:12px!important;
  color:#71869a!important;
}

/* Page titles */

.tk-page-head h1,
.page-head h1{
  font-size:38px!important;
  line-height:1.08!important;
  letter-spacing:-1px!important;
}

.tk-page-head p,
.page-head p,
.muted{
  font-size:15px!important;
  line-height:1.5!important;
  color:#65798e!important;
}

.tk-eyebrow,
.eyebrow,
.kicker{
  font-size:12px!important;
  font-weight:800!important;
  letter-spacing:1.4px!important;
}

/* Freshness strip */

.tk-live-strip{
  gap:10px!important;
  margin-bottom:20px!important;
}

.tk-live-strip>div{
  min-height:74px;
  padding:12px 14px!important;
}

.tk-live-strip span{
  font-size:11px!important;
  line-height:1.25!important;
  color:#90a7bb!important;
}

.tk-live-strip b{
  margin-top:5px!important;
  font-size:14px!important;
  line-height:1.3!important;
  color:#e8f0f7!important;
  font-weight:700!important;
}

.tk-live-strip small{
  margin-top:4px!important;
  font-size:12px!important;
  line-height:1.3!important;
  color:#9fb1c1!important;
}

/* KPI cards */

.tk-kpi-card{
  min-height:126px!important;
  padding:20px 22px!important;
}

.tk-kpi-card>div:last-child>span{
  font-size:16px!important;
  font-weight:750!important;
}

.tk-kpi-card>div:last-child>b{
  font-size:38px!important;
  line-height:1!important;
  font-weight:800!important;
}

.tk-kpi-card small{
  margin-top:6px!important;
  font-size:13px!important;
  line-height:1.35!important;
  color:#65798b!important;
}

.tk-kpi-icon{
  font-size:22px!important;
}

/* Section headings */

.tk-section-head h2,
.panel-head h2{
  font-size:24px!important;
  line-height:1.2!important;
}

.tk-section-meta,
.tk-chip,
.tk-check{
  font-size:13px!important;
}

/* Incident cards */

.tk-issue-card h3{
  font-size:19px!important;
  line-height:1.3!important;
}

.tk-issue-location{
  font-size:14px!important;
  line-height:1.45!important;
  color:#687c91!important;
}

.tk-short-cause{
  font-size:14px!important;
  line-height:1.55!important;
}

.tk-issue-side time{
  font-size:14px!important;
  line-height:1.35!important;
}

.tk-issue-side time span{
  font-size:11px!important;
}

.tk-severity,
.tk-state,
.tk-kind{
  font-size:11px!important;
  line-height:1.2!important;
  padding:5px 8px!important;
}

.tk-metric-row{
  font-size:13px!important;
}

/* Buttons */

.v51-btn,
.tk-issue-card button,
.tk-issue-card a{
  font-size:13px!important;
  font-weight:650!important;
}

/* Tables */

.table table{
  font-size:15px!important;
}

.table thead th,
.ops-table th{
  font-size:12px!important;
  line-height:1.3!important;
  font-weight:800!important;
  color:#62778b!important;
  letter-spacing:.5px!important;
}

.table tbody td,
.ops-table td{
  font-size:14px!important;
  line-height:1.45!important;
}

.device-table tbody td{
  font-size:14px!important;
}

.device-table tbody td b{
  font-size:15px!important;
}

.device-table small,
.splitter-table small,
.table td small{
  font-size:12px!important;
  line-height:1.4!important;
  color:#6b8298!important;
}

.badge{
  font-size:11px!important;
  font-weight:800!important;
  padding:6px 9px!important;
}

/* Details drawer */

.v51-drawer-head h2{
  font-size:24px!important;
}

.v51-detail-grid span,
.v51-diagnosis>span,
.v51-evidence>span{
  font-size:12px!important;
}

.v51-detail-grid b{
  font-size:14px!important;
}

.v51-diagnosis h3{
  font-size:18px!important;
  line-height:1.4!important;
}

.v51-diagnosis p,
.v51-evidence div,
.v51-map-note{
  font-size:13px!important;
  line-height:1.55!important;
}

/* Map / topology */

#incident-map-panel:not([hidden]){
  display:block!important;
}

#incident-map-panel{
  scroll-margin-top:120px;
}

.v52-map-wrap #noc-map{
  min-height:520px!important;
  background:#dfe7ed!important;
  border-radius:12px!important;
  overflow:hidden!important;
}

.v52-map-legend{
  font-size:12px!important;
  line-height:1.35!important;
}

.v52-topology-summary{
  font-size:13px!important;
}

.v52-tree-node b{
  font-size:14px!important;
}

.v52-tree-node small{
  font-size:12px!important;
  line-height:1.4!important;
  color:#9aafc0!important;
}

.v52-onu-chip{
  font-size:11px!important;
  padding:5px 8px!important;
}

.v52-link-row b,
.v52-link-row span{
  font-size:12px!important;
  line-height:1.4!important;
}

.v52-semantic-note,
.v52-empty-topology{
  font-size:12px!important;
  line-height:1.55!important;
}

.v52-common-point span,
.v53-evidence-block>span{
  font-size:11px!important;
}

.v52-common-point b,
.v53-evidence-block>b{
  font-size:14px!important;
}

.v52-common-point p,
.v53-evidence-block p,
.v53-evidence-block small{
  font-size:12px!important;
  line-height:1.5!important;
}

.leaflet-popup-content{
  font-size:13px!important;
  line-height:1.45!important;
}

/* Mobile */

@media(max-width:860px){

  .tk-page-head h1,
  .page-head h1{
    font-size:31px!important;
  }

  .tk-page-head p,
  .page-head p,
  .muted{
    font-size:14px!important;
  }

  .tk-live-strip span{
    font-size:10px!important;
  }

  .tk-live-strip b{
    font-size:13px!important;
  }

  .tk-live-strip small{
    font-size:11px!important;
  }

  .tk-kpi-card{
    min-height:112px!important;
    padding:16px!important;
  }

  .tk-kpi-card>div:last-child>span{
    font-size:14px!important;
  }

  .tk-kpi-card>div:last-child>b{
    font-size:32px!important;
  }

  .tk-kpi-card small{
    font-size:12px!important;
  }

  .device-table td,
  .splitter-table td{
    font-size:14px!important;
    grid-template-columns:105px minmax(0,1fr)!important;
  }

  .device-table td:before,
  .splitter-table td:before{
    font-size:11px!important;
  }

  .v52-map-wrap #noc-map{
    min-height:420px!important;
    height:420px!important;
  }

  .v52-topology-layout{
    grid-template-columns:1fr!important;
  }
}

@media(max-width:520px){

  .tk-page-head h1,
  .page-head h1{
    font-size:28px!important;
  }

  .tk-kpi-grid{
    grid-template-columns:
      repeat(2,minmax(0,1fr))!important;
  }

  .tk-kpi-card{
    min-height:104px!important;
  }

  .tk-kpi-card>div:last-child>b{
    font-size:29px!important;
  }

  .v52-map-wrap #noc-map{
    min-height:360px!important;
    height:360px!important;
  }
}


/* V5.5.4 FAULT MAP */

.v52-topology-layout{
  grid-template-columns:
    minmax(0,1.35fr)
    minmax(420px,.95fr)!important;
  gap:14px!important;
}

.v52-topology-summary{
  padding:14px!important;
  max-height:520px!important;
  overflow:auto!important;
}

.v552-zone-card{
  padding:16px;
  margin-bottom:12px;
  border:1px solid #2c6f66;
  background:#071d1a;
  border-radius:12px;
}

.v552-zone-card>span{
  display:block;
  margin-bottom:7px;
  color:#78d7c2;
  font-size:11px;
  font-weight:800;
  letter-spacing:1.1px;
}

.v552-zone-card>b{
  display:block;
  color:#f1f7fa;
  font-size:17px;
  line-height:1.4;
}

.v552-zone-card>p{
  margin:9px 0 0;
  color:#b7c7d2;
  font-size:13px;
  line-height:1.55;
}

.v552-route{
  margin-bottom:12px;
  padding:12px;
  background:#07131f;
  border:1px solid #20394d;
  border-radius:12px;
}

.v552-route-node{
  padding:10px 12px;
  border:1px solid #294258;
  background:#0c1b29;
  border-radius:9px;
}

.v552-route-node>span{
  display:block;
  color:#7890a7;
  font-size:10px;
  font-weight:800;
  letter-spacing:1px;
}

.v552-route-node>b{
  display:block;
  margin-top:3px;
  color:#eef5fa;
  font-size:14px;
}

.v552-route-node>small{
  display:block;
  margin-top:4px;
  color:#9db0c1;
  font-size:12px;
}

.v552-route-node.olt{
  border-left:4px solid #65b9ff;
}

.v552-route-node.splitter{
  border-left:4px solid #f1cf55;
}

.v552-route-node.onu{
  border-left:4px solid #ff5263;
}

.v552-route-link{
  position:relative;
  height:42px;
  display:flex;
  align-items:center;
  padding-left:30px;
}

.v552-route-link i{
  position:absolute;
  left:16px;
  top:0;
  bottom:0;
  border-left:2px dashed #55758e;
}

.v552-route-link span{
  padding:4px 8px;
  color:#9db0c1;
  background:#07131f;
  font-size:11px;
  z-index:1;
}

.v552-route-link.documented i{
  border-color:#65b9ff;
}

.v552-route-link.inferred i{
  border-color:#f1cf55;
}

.v552-route-link.unknown i{
  border-color:#6c7882;
}

.v552-route-link.unknown span{
  color:#a2aeb8;
}

.v552-mini-stats{
  display:grid;
  grid-template-columns:
    repeat(3,minmax(0,1fr));
  gap:7px;
  margin-bottom:12px;
}

.v552-mini-stats>div{
  padding:9px;
  border:1px solid #20394d;
  background:#091826;
  border-radius:9px;
}

.v552-mini-stats b{
  display:block;
  color:#edf5fa;
  font-size:18px;
}

.v552-mini-stats span{
  display:block;
  margin-top:2px;
  color:#8399ab;
  font-size:10px;
}

.v552-topo-details{
  margin-top:8px;
  border:1px solid #20394d;
  background:#091826;
  border-radius:9px;
  overflow:hidden;
}

.v552-topo-details summary{
  cursor:pointer;
  padding:11px 12px;
  color:#d4e0e8;
  font-size:13px;
  font-weight:700;
}

.v552-topo-details>div{
  padding:0 11px 11px;
}

.v552-topo-details .v53-pon-row,
.v552-topo-details .v52-link-row{
  margin-top:6px;
}

@media(max-width:1050px){

  .v52-topology-layout{
    grid-template-columns:1fr!important;
  }

  .v52-topology-summary{
    max-height:none!important;
  }
}


/* V5.5.5 CONTRAST HOTFIX */

/* Source / freshness cards */
.source-refresh-card {
  color: #eaf2fb !important;
}

.source-refresh-head b,
.source-refresh-times strong {
  color: #ffffff !important;
}

.source-refresh-head span,
.source-refresh-times span,
.source-refresh-foot small,
.source-refresh-foot em {
  color: #a9bccd !important;
}

/* Device summary dark cards */
.device-facts > div {
  color: #eaf2fb !important;
}

.device-facts > div b,
.device-facts > div strong {
  color: #ffffff !important;
}

.device-facts > div small {
  color: #9fb4c7 !important;
}

/* Diagnostic counters */
.issue-strip > div {
  color: #eaf2fb !important;
}

.issue-strip > div b {
  color: #ffffff !important;
}

.issue-strip > div span {
  color: #a9bccd !important;
}

/* Diagnostic tabs */
#device-diagnostics .diag-tab {
  color: #dce8f3 !important;
}

#device-diagnostics .diag-tab.active {
  color: #ffffff !important;
}

/* Tables inside diagnostics */
#device-diagnostics .ops-table th {
  color: #52677a !important;
}

#device-diagnostics .ops-table td {
  color: #172a3b !important;
}

/* Empty diagnostic state is on a light background */
#device-diagnostics .empty-state {
  color: #62778a !important;
}

/* Explicit dark-card typography safety */
.source-refresh-card b,
.source-refresh-card strong,
.device-facts b,
.issue-strip b {
  opacity: 1 !important;
}


/* V5.5.8 OPERATIONAL POLISH */

.tk-kpi-card.affected .tk-kpi-icon{
  background:#eef8ff;
  color:#2772a8;
  font-size:11px;
}

.tk-kpi-card.recovering .tk-kpi-icon{
  background:#edf9f2;
  color:#21875c;
}

.tk-kpi-card.backbone .tk-kpi-icon{
  background:#f2f1ff;
  color:#6552b8;
}

.tk-recovery-mini{
  margin-top:11px;
  padding:10px 11px;
  border:1px solid #dfe8e3;
  background:#f7fbf8;
  border-radius:10px;
}

.tk-recovery-mini-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:7px;
  font-size:10px;
}

.tk-recovery-mini-head b{
  color:#315844;
}

.tk-recovery-mini-head span{
  color:#21875c;
  font-weight:850;
}

.tk-recovery-track{
  height:8px;
  overflow:hidden;
  border-radius:999px;
  background:#e5ece8;
}

.tk-recovery-track i{
  display:block;
  height:100%;
  border-radius:999px;
  background:#27a66d;
}

.tk-recovery-mini small{
  display:block;
  margin-top:6px;
  color:#718478;
  font-size:9px;
  line-height:1.4;
}

.tk-issue-side time b{
  display:block;
  color:#374559;
  font-size:10px;
  font-weight:800;
}

.tk-issue-side time small{
  display:block;
  margin-top:2px;
  color:#9aa4b1;
  font-size:8px;
}

.tk-live-strip>div.source-ok{
  box-shadow:inset 0 3px 0 #22a968;
}

.tk-live-strip>div.source-warn{
  box-shadow:inset 0 3px 0 #d3a21e;
  background:#fffdf5;
}

.tk-live-strip>div.source-stale{
  box-shadow:inset 0 3px 0 #df4b5c;
  background:#fff8f8;
}

.tk-live-strip>div.source-live{
  box-shadow:inset 0 3px 0 #22a968;
}



/* V5.5.10 — responsive device inventory */

.device-filter-bar{
  display:flex;
  gap:10px;
  align-items:center;
  margin:0 0 16px;
  flex-wrap:wrap;
}

.device-table-wrap{
  width:100%;
  overflow:hidden;
}

.devices-table{
  width:100%;
  table-layout:fixed;
}

.devices-table th,
.devices-table td{
  white-space:normal;
  vertical-align:top;
  overflow-wrap:anywhere;
}

.devices-table th:nth-child(1),
.devices-table td:nth-child(1){width:8%}

.devices-table th:nth-child(2),
.devices-table td:nth-child(2){width:18%}

.devices-table th:nth-child(3),
.devices-table td:nth-child(3){width:20%}

.devices-table th:nth-child(4),
.devices-table td:nth-child(4){width:11%}

.devices-table th:nth-child(5),
.devices-table td:nth-child(5){width:22%}

.devices-table th:nth-child(6),
.devices-table td:nth-child(6){width:13%}

.devices-table th:nth-child(7),
.devices-table td:nth-child(7){width:8%}

.devices-table .device-cell b,
.devices-table .inventory-cell b,
.devices-table .ports-cell b,
.devices-table .sensor-cell strong{
  display:block;
}

.devices-table .reason-cell{
  line-height:1.45;
  font-size:12px;
}

.devices-table .action-cell{
  white-space:nowrap;
}

@media(max-width:1180px){
  .devices-table th,
  .devices-table td{
    padding:10px 9px;
    font-size:12px;
  }

  .devices-table th:nth-child(1),
  .devices-table td:nth-child(1){width:9%}

  .devices-table th:nth-child(2),
  .devices-table td:nth-child(2){width:18%}

  .devices-table th:nth-child(3),
  .devices-table td:nth-child(3){width:20%}

  .devices-table th:nth-child(4),
  .devices-table td:nth-child(4){width:10%}

  .devices-table th:nth-child(5),
  .devices-table td:nth-child(5){width:23%}

  .devices-table th:nth-child(6),
  .devices-table td:nth-child(6){width:12%}

  .devices-table th:nth-child(7),
  .devices-table td:nth-child(7){width:8%}
}

@media(max-width:900px){
  .device-table-wrap{
    border:0!important;
    background:transparent!important;
    overflow:visible;
  }

  .devices-table,
  .devices-table tbody{
    display:block;
    width:100%;
  }

  .devices-table thead{
    display:none;
  }

  .devices-table tr{
    display:grid;
    grid-template-columns:1fr 1fr;
    width:100%;
    margin-bottom:12px;
    background:var(--tk-card,#fff);
    border:1px solid var(--tk-line,#e3e8ef);
    border-radius:14px;
    overflow:hidden;
    box-shadow:0 5px 16px rgba(15,23,42,.04);
  }

  .devices-table tr[hidden]{
    display:none;
  }

  .devices-table td{
    display:block;
    width:auto!important;
    min-width:0;
    padding:12px 14px;
    border-bottom:1px solid var(--tk-line,#e3e8ef);
    white-space:normal;
  }

  .devices-table td::before{
    content:attr(data-label);
    display:block;
    margin-bottom:5px;
    color:var(--tk-muted,#748198);
    font-size:9px;
    line-height:1;
    font-weight:800;
    letter-spacing:.7px;
    text-transform:uppercase;
  }

  .devices-table .status-cell,
  .devices-table .ports-cell,
  .devices-table .sensor-cell,
  .devices-table .reason-cell,
  .devices-table .action-cell{
    grid-column:1 / -1;
  }

  .devices-table .action-cell{
    border-bottom:0;
  }
}

@media(max-width:600px){
  .device-filter-bar{
    align-items:stretch;
  }

  .device-filter-bar label,
  .device-filter-bar select,
  .device-filter-bar #device-filter-count{
    width:100%;
  }

  .device-filter-bar select{
    min-height:40px;
  }

  .devices-table tr{
    grid-template-columns:1fr;
  }

  .devices-table td{
    grid-column:1!important;
  }
}


/* NOC live technical cleanup */
.tech-note{
  display:block;
  margin:4px 0 10px;
  color:#7890a7;
  font-size:11px;
  font-weight:500;
  line-height:1.4;
}

.quality-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}

.quality-grid>div{
  padding:13px 12px;
  border:1px solid #1b3449;
  background:#091724;
  border-radius:11px;
}

.quality-grid b{
  display:block;
  font-size:22px;
  margin-bottom:4px;
}

.quality-grid span{
  color:#7890a7;
  font-size:10px;
}

@media(max-width:900px){
  .quality-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}


/* Device inventory • operational clean view */
.device-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:0 0 18px;
}

.device-kpi{
  padding:17px 18px;
  background:linear-gradient(145deg,#0d1c2c,#091724);
  border:1px solid #1d3449;
  border-top:3px solid #4aa7ff;
  border-radius:14px;
}

.device-kpi span{
  display:block;
  color:#91a5b9;
  font-size:11px;
}

.device-kpi b{
  display:block;
  margin:5px 0 2px;
  font-size:31px;
}

.device-kpi small{
  color:#71899f;
  font-size:10px;
}

.device-kpi.problem{border-top-color:#ff9d45}
.device-kpi.critical{border-top-color:#ff5263}
.device-kpi.warning{border-top-color:#f1cf55}

.devices-table th:nth-child(1),
.devices-table td:nth-child(1){width:11%}

.devices-table th:nth-child(2),
.devices-table td:nth-child(2){width:23%}

.devices-table th:nth-child(3),
.devices-table td:nth-child(3){width:29%}

.devices-table th:nth-child(4),
.devices-table td:nth-child(4){width:14%}

.devices-table th:nth-child(5),
.devices-table td:nth-child(5){width:15%}

.devices-table th:nth-child(6),
.devices-table td:nth-child(6){width:8%}

.devices-table .problem-cell strong{
  display:block;
  font-size:12px;
}

.devices-table .problem-cell small,
.devices-table .last-data-cell small{
  display:block;
  color:#7890a7;
  margin-top:4px;
  font-size:10px;
}

.device-ok{
  color:#72e1b0;
  font-size:12px;
}

.last-data-cell b{
  font-size:12px;
  font-variant-numeric:tabular-nums;
}

@media(max-width:800px){

  .device-kpi-grid{
    grid-template-columns:1fr 1fr;
  }

  .device-table-wrap{
    background:transparent;
    border:0;
    overflow:visible;
  }

  .devices-table,
  .devices-table tbody{
    display:block;
    width:100%;
  }

  .devices-table thead{
    display:none;
  }

  .devices-table tr{
    display:grid !important;
    grid-template-columns:1fr 1fr;
    gap:0;
    margin-bottom:12px;
    padding:8px;
    border:1px solid #1d3449;
    border-radius:13px;
    background:#091724;
  }

  .devices-table tr[hidden]{
    display:none !important;
  }

  .devices-table td{
    display:block !important;
    width:auto !important;
    padding:10px !important;
    border-bottom:1px solid #172c3e;
    white-space:normal;
  }

  .devices-table td::before{
    content:attr(data-label);
    display:block;
    margin-bottom:5px;
    color:#6f879d;
    font-size:9px;
    text-transform:uppercase;
    letter-spacing:.6px;
  }

  .devices-table .device-cell,
  .devices-table .problem-cell{
    grid-column:1/-1;
  }

  .devices-table .action-cell{
    grid-column:1/-1;
    border-bottom:0;
  }
}

@media(max-width:520px){
  .device-kpi-grid{
    grid-template-columns:1fr 1fr;
  }

  .devices-table tr{
    grid-template-columns:1fr;
  }

  .devices-table .device-cell,
  .devices-table .problem-cell,
  .devices-table .action-cell{
    grid-column:auto;
  }
}


/* =========================================================
   TELEKABEL NOC • FINAL GLOBAL RESPONSIVE LAYER
   ========================================================= */

/* ---------- Global safety ---------- */

html,
body{
  max-width:100%;
  overflow-x:hidden;
}

.tk-app,
.tk-shell,
.tk-shell main,
.panel,
.table,
.ops-table,
.device-table-wrap,
.v52-map-wrap,
.v52-topology-layout{
  min-width:0;
  max-width:100%;
}

img,
svg,
canvas,
video{
  max-width:100%;
  height:auto;
}

.table,
.ops-table,
.device-table-wrap{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}


/* ---------- Main shell ---------- */

.tk-shell main{
  padding:
    clamp(18px,2.2vw,30px)
    clamp(18px,2.4vw,32px)
    72px !important;
}

.tk-page-head,
.page-head{
  min-width:0;
}

.tk-page-head > *,
.page-head > *{
  min-width:0;
}


/* ---------- Adaptive grids ---------- */

.tk-kpi-grid{
  grid-template-columns:
    repeat(auto-fit,minmax(185px,1fr)) !important;
}

.device-kpi-grid{
  grid-template-columns:
    repeat(auto-fit,minmax(190px,1fr)) !important;
}

.cards,
.metric-grid,
.status-strip,
.readiness-grid,
.issue-strip{
  grid-template-columns:
    repeat(auto-fit,minmax(170px,1fr)) !important;
}

.onu-health-grid{
  grid-template-columns:
    repeat(auto-fit,minmax(135px,1fr)) !important;
}


/* ---------- Cards ---------- */

.tk-kpi-card,
.device-kpi,
.card,
.panel{
  min-width:0;
}

.tk-kpi-card{
  overflow:hidden;
}

.tk-kpi-card > div:last-child{
  min-width:0;
}

.tk-kpi-card span,
.tk-kpi-card small,
.device-kpi span,
.device-kpi small{
  overflow-wrap:anywhere;
}


/* ---------- Headers ---------- */

.tk-section-head,
.tk-subsection-head,
.panel-head{
  min-width:0;
}

.tk-section-head > *,
.tk-subsection-head > *,
.panel-head > *{
  min-width:0;
}


/* ---------- Tables ---------- */

table{
  max-width:100%;
}

th,
td{
  max-width:420px;
}

td{
  overflow-wrap:anywhere;
}


/* ---------- Map / topology ---------- */

#noc-map,
.v52-map-wrap #noc-map{
  width:100% !important;
  max-width:100% !important;
}

.leaflet-popup-content{
  min-width:0 !important;
  max-width:calc(100vw - 56px) !important;
}


/* =========================================================
   SMALL DESKTOP / LAPTOP
   ========================================================= */

@media (max-width:1180px){

  .tk-sidebar{
    width:220px !important;
  }

  .tk-shell{
    margin-left:220px !important;
  }

  .tk-shell main{
    padding-left:22px !important;
    padding-right:22px !important;
  }

  .tk-kpi-grid{
    grid-template-columns:
      repeat(auto-fit,minmax(190px,1fr)) !important;
  }

  .v52-topology-layout{
    grid-template-columns:1fr !important;
  }

  .v52-topology-summary{
    max-height:none !important;
  }

  .two-col,
  .bottom-grid,
  .v5-incident-columns{
    grid-template-columns:1fr !important;
  }
}


/* =========================================================
   TABLET / MOBILE SIDEBAR
   ========================================================= */

@media (max-width:860px){

  /*
    Important:
    this overrides the old <=720px static sidebar rule.
    Existing menu open/close JS remains untouched.
  */

  .tk-sidebar{
    position:fixed !important;
    top:0 !important;
    left:0 !important;
    bottom:0 !important;

    width:min(300px,86vw) !important;
    height:100dvh !important;

    padding:22px 16px !important;
    z-index:1000 !important;

    overflow-y:auto;
  }

  .tk-shell{
    margin-left:0 !important;
    width:100% !important;
  }

  .tk-side-nav{
    display:flex !important;
    flex-direction:column !important;
    overflow:visible !important;
    width:100%;
  }

  .tk-side-nav a{
    display:flex !important;
    width:100%;
    white-space:normal !important;
    margin-left:0 !important;
  }

  .tk-side-nav small{
    display:block;
  }

  .tk-mobile-menu{
    flex:0 0 auto;
  }


  /* Topbar */

  .tk-topbar{
    min-height:64px;
    height:auto !important;
    padding:10px 16px !important;

    display:flex;
    align-items:center;
    gap:12px;
  }

  .tk-topbar-title{
    min-width:0;
    flex:1;
  }

  .tk-topbar-title b,
  .tk-topbar-title span{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .tk-monitor-status{
    min-width:0;
    flex:0 1 auto;
  }


  /* Main content */

  .tk-shell main{
    padding:20px 16px 58px !important;
  }

  .tk-page-head,
  .page-head{
    align-items:flex-start !important;
    flex-direction:column !important;
    gap:12px !important;
  }

  .tk-page-head h1,
  .page-head h1{
    font-size:clamp(27px,6vw,32px) !important;
  }


  /* KPI */

  .tk-kpi-grid{
    grid-template-columns:
      repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
  }

  .tk-kpi-card{
    min-height:105px !important;
    padding:14px !important;
    gap:10px !important;
  }

  .tk-kpi-icon{
    width:36px !important;
    height:36px !important;
    flex-basis:36px !important;
  }


  /* Sections */

  .tk-section-head,
  .tk-subsection-head{
    align-items:flex-start !important;
    flex-direction:column !important;
    gap:8px !important;
  }

  .tk-section-meta{
    width:100%;
    justify-content:flex-start !important;
  }

  .tk-count-box{
    text-align:left !important;
  }

  .tk-queue-panel{
    padding:16px !important;
  }


  /* Issues */

  .tk-issue-card{
    grid-template-columns:1fr !important;
  }

  .tk-issue-side{
    min-width:0 !important;
    align-items:flex-start !important;
    text-align:left !important;
  }


  /* Map */

  .v52-topology-layout{
    grid-template-columns:1fr !important;
  }

  .v52-map-wrap #noc-map,
  #noc-map{
    height:400px !important;
  }


  /* Device filter */

  .device-filter-bar{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:10px;
  }

  .device-filter-bar select{
    max-width:100%;
  }
}


/* =========================================================
   PHONE
   ========================================================= */

@media (max-width:600px){

  .tk-shell main{
    padding:16px 12px 52px !important;
  }


  /* Top bar */

  .tk-topbar{
    gap:9px;
    padding:9px 12px !important;
  }

  .tk-topbar-title span,
  .tk-monitor-status small{
    display:none !important;
  }

  .tk-monitor-status strong{
    display:block;
    max-width:120px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }


  /* Live strip stays compact instead of becoming huge vertically */

  .tk-live-strip{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }

  .tk-live-strip > div{
    min-width:0;
    padding-left:8px !important;
    padding-right:8px !important;
  }

  .tk-live-strip span{
    font-size:8px !important;
  }

  .tk-live-strip b{
    font-size:11px !important;
    overflow-wrap:anywhere;
  }

  .tk-live-strip small{
    display:none !important;
  }


  /* KPI */

  .tk-kpi-grid,
  .device-kpi-grid{
    grid-template-columns:
      repeat(2,minmax(0,1fr)) !important;
  }

  .tk-kpi-card{
    min-height:96px !important;
    padding:12px !important;
  }

  .tk-kpi-card b{
    font-size:25px !important;
  }

  .tk-kpi-card span{
    font-size:11px !important;
  }

  .tk-kpi-card small{
    font-size:9px !important;
  }


  /* General grids */

  .cards,
  .metric-grid,
  .status-strip,
  .readiness-grid,
  .issue-strip{
    grid-template-columns:
      repeat(2,minmax(0,1fr)) !important;
  }


  /* Panels */

  .panel{
    padding:14px !important;
    border-radius:13px;
  }

  .tk-section-head h2{
    font-size:18px !important;
  }


  /* Drawer */

  .v51-drawer{
    width:100vw !important;
    max-width:100vw !important;
    height:100dvh !important;
  }

  .v51-drawer-head{
    padding:16px !important;
  }

  .v51-drawer-body{
    padding:16px !important;
  }

  .v51-drawer-actions{
    padding:12px 16px !important;
    flex-wrap:wrap;
  }

  .v51-drawer-actions .v51-btn{
    flex:1 1 140px;
  }

  .v51-detail-grid{
    grid-template-columns:1fr !important;
  }


  /* Map */

  .v52-map-wrap #noc-map,
  #noc-map{
    height:330px !important;
  }

  .v52-map-legend{
    position:static !important;
    margin-top:8px !important;
  }


  /* Tables */

  .table,
  .ops-table,
  .device-table-wrap{
    margin-left:0 !important;
    margin-right:0 !important;
  }
}


/* =========================================================
   VERY SMALL PHONE
   ========================================================= */

@media (max-width:390px){

  .tk-kpi-grid,
  .device-kpi-grid,
  .cards,
  .metric-grid,
  .status-strip,
  .readiness-grid,
  .issue-strip{
    grid-template-columns:1fr !important;
  }

  .onu-health-grid{
    grid-template-columns:
      repeat(2,minmax(0,1fr)) !important;
  }

  .tk-monitor-status strong{
    max-width:95px;
  }
}



/* DASHBOARD TOP POLISH V2 */

.tk-live-strip{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}

.tk-live-strip>div{
  min-width:0;
}

/* Не режем думите по средата */
.tk-kpi-card span,
.tk-kpi-card small{
  overflow-wrap:normal!important;
  word-break:normal!important;
  hyphens:none!important;
}

/* По-компактни KPI карти */
.tk-kpi-card{
  min-height:108px!important;
  padding:15px 17px!important;
  gap:11px!important;
}

.tk-kpi-icon{
  width:39px!important;
  height:39px!important;
  flex-basis:39px!important;
}

.tk-kpi-card b{
  font-size:29px!important;
}

.tk-kpi-card span{
  line-height:1.22!important;
}

.tk-kpi-grid{
  gap:12px!important;
  margin-bottom:16px!important;
}

.tk-page-head{
  margin-bottom:18px!important;
}

@media(max-width:860px){

  .tk-live-strip{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  .tk-kpi-card{
    min-height:100px!important;
  }
}

@media(max-width:600px){

  .tk-live-strip{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  .tk-kpi-card{
    padding:12px 13px!important;
  }
}

@media(max-width:390px){

  .tk-kpi-grid{
    grid-template-columns:1fr!important;
  }
}


/* =========================================================
   NOC MOBILE DRAWER FINAL OVERRIDE
   ========================================================= */

@media (max-width:860px){

  body.tk-menu-open{
    overflow:hidden;
  }

  .tk-shell{
    margin-left:0 !important;
    width:100% !important;
  }

  .tk-mobile-menu{
    display:grid !important;
    place-items:center;
    flex:0 0 42px;
    width:42px;
    height:42px;
    padding:0;
    border:1px solid #dce3eb;
    border-radius:12px;
    background:#fff;
    color:#172033;
    font-size:22px;
    line-height:1;
    cursor:pointer;
    position:relative;
    z-index:1102;
  }

  .tk-sidebar{
    position:fixed !important;
    top:0 !important;
    left:0 !important;
    bottom:0 !important;
    right:auto !important;

    width:min(82vw,300px) !important;
    height:100dvh !important;

    padding:22px 16px 18px !important;

    display:flex !important;
    flex-direction:column !important;

    overflow-y:auto !important;
    overflow-x:hidden !important;

    transform:translateX(-105%);
    transition:transform .22s ease;

    z-index:1101 !important;

    box-shadow:18px 0 50px rgba(15,23,42,.22);
  }

  body.tk-menu-open .tk-sidebar{
    transform:translateX(0);
  }

  .tk-sidebar-backdrop{
    display:block !important;
    position:fixed !important;
    inset:0 !important;

    background:rgba(15,23,42,.42);

    opacity:0;
    visibility:hidden;
    pointer-events:none;

    transition:
      opacity .22s ease,
      visibility .22s ease;

    z-index:1100 !important;
  }

  body.tk-menu-open .tk-sidebar-backdrop{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }

  .tk-side-brand{
    padding-bottom:18px !important;
  }

  .tk-side-nav{
    display:grid !important;
    grid-template-columns:1fr !important;

    gap:6px !important;

    overflow:visible !important;
    margin-top:12px !important;
  }

  .tk-side-nav small{
    display:block !important;
    margin:4px 10px 8px;
  }

  .tk-side-nav a{
    display:flex !important;
    align-items:center;
    width:100%;

    white-space:normal !important;

    padding:12px 13px !important;
    border-radius:10px;
  }

  .tk-side-note{
    display:block !important;
    margin-top:auto;
  }

  .tk-topbar{
    min-height:64px;
    height:auto !important;

    padding:10px 14px !important;

    gap:10px;
  }

  .tk-topbar-title{
    min-width:0;
  }

  .tk-topbar-title span{
    display:none;
  }

  .tk-monitor-status{
    margin-left:auto;
  }

}


/* PHONE */

@media (max-width:520px){

  .tk-sidebar{
    width:min(88vw,300px) !important;
  }

  .tk-topbar{
    padding:9px 11px !important;
  }

  .tk-mobile-menu{
    width:40px;
    height:40px;
    flex-basis:40px;
  }

}
