:root {
  color-scheme: dark;
  --chassis-0: #090d12;
  --chassis-1: #0d1219;
  --chassis-2: #111822;
  --chassis-3: #17202b;
  --fiber-blue: #55a7ff;
  --fiber-blue-soft: rgba(85, 167, 255, 0.12);
  --signal-ok: #48d597;
  --signal-warn: #f0b85a;
  --signal-los: #ff6b72;
  --ink-1: #f4f7fb;
  --ink-2: #b8c2cf;
  --ink-3: #7f8b99;
  --ink-4: #56616e;
  --line-soft: rgba(203, 220, 239, 0.08);
  --line: rgba(203, 220, 239, 0.13);
  --line-strong: rgba(203, 220, 239, 0.22);
  --control: #0a0f15;
  --focus: rgba(85, 167, 255, 0.42);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--chassis-0); color: var(--ink-1); }
body.settings-open { overflow: hidden; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
button:active { transform: scale(.97); }
code, table td:first-child, .metric-value, .device-summary strong { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-variant-numeric: tabular-nums; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 16px 16px; border-right: 1px solid var(--line); background: var(--chassis-0); }
.brand { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; padding: 0 8px 28px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: -.01em; }
.brand small { margin-top: 4px; color: var(--ink-3); font-size: 9px; font-weight: 600; letter-spacing: .1em; }
.brand-logo { width: 46px; height: 46px; flex: 0 0 auto; display: block; border: 1px solid var(--line); border-radius: 11px; object-fit: cover; object-position: center; }
.brand-fiber { width: 30px; height: 30px; position: relative; display: grid; place-items: center; border: 1px solid rgba(85, 167, 255, .3); border-radius: 8px; background: var(--fiber-blue-soft); }
.brand-fiber i { position: absolute; width: 12px; height: 2px; border-radius: 3px; background: var(--fiber-blue); transform-origin: 0 50%; left: 9px; }
.brand-fiber i:nth-child(1) { transform: rotate(-42deg); }
.brand-fiber i:nth-child(2) { transform: rotate(0); }
.brand-fiber i:nth-child(3) { transform: rotate(42deg); }
nav { display: grid; gap: 4px; }
.nav-link { width: 100%; border: 0; background: transparent; border-radius: var(--radius-sm); padding: 10px 10px; display: flex; align-items: center; gap: 10px; color: var(--ink-3); cursor: pointer; text-align: left; transition: background-color 140ms ease, color 140ms ease, transform 120ms var(--ease-out); }
.nav-link:hover, .nav-link.is-active { color: var(--ink-1); background: var(--chassis-2); }
.nav-link b { margin-left: auto; min-width: 20px; height: 20px; display: grid; place-items: center; font-size: 10px; border-radius: 10px; background: var(--signal-warn); color: #1b1307; }
.connection-card { margin-top: auto; border: 1px solid var(--line); background: var(--chassis-1); border-radius: var(--radius-md); padding: 13px; }
.connection-card p { font-size: 11px; line-height: 1.45; color: var(--ink-3); margin: 8px 0 12px; }
.connection-card code { display: block; overflow: hidden; color: var(--ink-4); font-size: 9px; text-overflow: ellipsis; }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.status-dot.online, .legend i.online { background: var(--signal-ok); box-shadow: 0 0 0 3px rgba(72,213,151,.1); }
.operator { margin-top: 12px; padding: 12px 0 0; border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; }
.operator-profile { min-width: 0; display: grid; grid-template-columns: 32px 1fr; gap: 9px; align-items: center; padding: 5px 7px; border: 0; border-radius: var(--radius-sm); background: transparent; color: inherit; text-align: left; cursor: pointer; }
.operator-profile:hover, .operator-profile[aria-expanded="true"] { background: var(--chassis-2); }
.operator-profile > span:first-child { width: 30px; height: 30px; display: grid; place-items: center; background: var(--chassis-3); border: 1px solid var(--line-soft); border-radius: 50%; font-weight: 700; font-size: 10px; }
.operator-profile strong, .operator-profile small { display: block; }
.operator-profile strong { font-size: 11px; }.operator-profile small { color: var(--ink-3); margin-top: 2px; font-size: 10px; }
.operator-logout { padding: 7px; border: 0; border-radius: 4px; background: transparent; color: var(--ink-3); cursor: pointer; }
.operator-logout:hover { background: var(--chassis-2); color: var(--ink-1); }

main { min-width: 0; padding: 0 32px 48px; }
.topbar { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line-soft); }
.page-context { min-width: 0; display: flex; align-items: center; gap: 10px; }
.context-back { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--chassis-1); color: var(--fiber-blue); font-size: 19px; line-height: 1; cursor: pointer; transition: background-color 140ms ease, border-color 140ms ease, transform 120ms var(--ease-out); }
.context-back:hover { border-color: rgba(85,167,255,.45); background: var(--fiber-blue-soft); }
.context-back[hidden] { display: none; }
.eyebrow { margin: 0 0 5px; color: var(--ink-3); font-size: 10px; line-height: 1; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
h1, h2, p { margin-top: 0; }
h1 { font-size: 22px; line-height: 1.2; letter-spacing: -.025em; margin-bottom: 0; }
h2 { font-size: 15px; letter-spacing: -.015em; margin-bottom: 0; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.global-search { width: min(30vw, 330px); height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 11px; background: var(--control); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink-4); }
.global-search:focus-within { border-color: rgba(85,167,255,.45); }
.global-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink-1); font-size: 12px; }
.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: var(--radius-sm); border: 1px solid var(--line); padding: 0 13px; font-size: 11px; font-weight: 700; cursor: pointer; transition: transform 120ms var(--ease-out), background-color 140ms ease, border-color 140ms ease; }
.button.secondary { background: var(--chassis-1); }.button.secondary:hover { background: var(--chassis-2); border-color: var(--line-strong); }
.button.primary { color: #06101c; background: var(--fiber-blue); border-color: var(--fiber-blue); }.button.primary:hover { background: #77b9ff; }
.sync-icon.is-spinning { display: inline-block; animation: spin 600ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { margin: 20px 0; min-height: 42px; padding: 8px 10px; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(85,167,255,.2); border-radius: var(--radius-sm); background: rgba(85,167,255,.06); }
.notice > span { width: 27px; height: 24px; display: grid; place-items: center; border-radius: 4px; background: var(--fiber-blue-soft); color: var(--fiber-blue); font: 700 9px/1 monospace; }
.notice p { margin: 0; color: var(--ink-2); font-size: 11px; }.notice p strong { color: var(--ink-1); }
.notice button { margin-left: auto; background: none; border: 0; color: var(--ink-3); font-size: 18px; cursor: pointer; }
.view { display: none; }.view.is-active { display: block; }
.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px; }
.metric { min-height: 96px; padding: 19px 20px; background: var(--chassis-1); border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }.metric-label { color: var(--ink-3); font-size: 10px; }.metric-row { display: flex; align-items: end; gap: 8px; margin-top: 10px; }.metric-value { font-weight: 700; font-size: 23px; letter-spacing: -.04em; }.metric-delta { padding-bottom: 3px; font-size: 9px; color: var(--ink-3); }.metric-delta.good { color: var(--signal-ok); }.metric-delta.warn { color: var(--signal-warn); }
.health-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--chassis-1); overflow: hidden; }
.health-item { min-width: 0; min-height: 82px; padding: 14px 15px; border-right: 1px solid var(--line-soft); }
.health-item:last-child { border-right: 0; }
.health-item span, .health-item strong, .health-item small { display: block; }
.health-item span { color: var(--ink-4); font-size: 8px; text-transform: uppercase; letter-spacing: .07em; }
.health-item strong { margin-top: 9px; color: var(--ink-1); font: 700 15px/1 monospace; }
.health-item small { overflow: hidden; margin-top: 7px; color: var(--ink-3); font-size: 8px; white-space: nowrap; text-overflow: ellipsis; }
.health-item[data-health="temperature"] strong, .health-item[data-health="fan"] strong { color: var(--signal-ok); }
.system-trends { margin-bottom: 16px; overflow: hidden; }
.trend-grid { display: grid; grid-template-columns: repeat(4,1fr); }
.trend-cell { min-width: 0; padding: 14px 16px; border-right: 1px solid var(--line-soft); }.trend-cell:last-child { border-right: 0; }
.trend-cell header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.trend-cell span { color: var(--ink-4); font-size: 8px; text-transform: uppercase; letter-spacing: .07em; }.trend-cell strong { font: 700 13px/1 monospace; }
.trend-cell svg { width: 100%; height: 48px; display: block; margin-top: 10px; }.spark-line { fill: none; stroke: var(--fiber-blue); stroke-width: 1.5; vector-effect: non-scaling-stroke; }.spark-area { fill: var(--fiber-blue-soft); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; margin-bottom: 16px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--chassis-1); }
.panel-heading { min-height: 68px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line-soft); }
.legend { display: flex; gap: 14px; color: var(--ink-3); font-size: 9px; }.legend span { display: inline-flex; align-items: center; gap: 6px; }.legend i { width: 6px; height: 6px; border-radius: 50%; }.legend i.warning { background: var(--signal-warn); }
.chassis { margin: 18px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #070a0f; padding: 8px; display: grid; grid-template-columns: 28px repeat(2, 1fr); gap: 6px; }
.chassis-labels { display: grid; align-content: space-around; color: var(--ink-4); font: 700 8px/1 monospace; text-align: center; }
.card-slot { min-width: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--chassis-2); padding: 10px; }
.card-slot header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font: 700 9px/1 monospace; color: var(--ink-2); }.card-slot header span:last-child { color: var(--signal-ok); }
.pon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.pon-port { position: relative; min-width: 0; height: 54px; padding: 6px; border: 1px solid var(--line); border-radius: 3px; background: var(--control); color: var(--ink-3); cursor: pointer; text-align: left; transition: transform 120ms var(--ease-out), border-color 140ms ease, background-color 140ms ease; }
.pon-port:hover, .pon-port.is-selected { border-color: rgba(85,167,255,.5); background: var(--fiber-blue-soft); }.pon-port.warning { border-color: rgba(240,184,90,.3); }.pon-port strong, .pon-port small { display: block; }.pon-port strong { font: 700 9px/1 monospace; color: var(--ink-1); }.pon-port small { position: absolute; left: 6px; bottom: 6px; font: 600 8px/1 monospace; }.port-led { position: absolute; top: 7px; right: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--signal-ok); }.pon-port.warning .port-led { background: var(--signal-warn); }
.count-badge { min-width: 25px; height: 25px; display: grid; place-items: center; border-radius: 13px; color: var(--signal-warn); background: rgba(240,184,90,.1); font: 700 10px/1 monospace; }
.attention-list { padding: 6px; }
.attention-item { width: 100%; display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: center; padding: 12px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; color: inherit; text-align: left; cursor: pointer; }.attention-item:last-child { border-bottom: 0; }.attention-item:hover { background: var(--chassis-2); }.attention-item > i { width: 7px; height: 7px; border-radius: 50%; background: var(--signal-warn); }.attention-item.los > i { background: var(--signal-los); }.attention-item strong, .attention-item small { display: block; }.attention-item strong { font-size: 11px; }.attention-item small { color: var(--ink-3); margin-top: 4px; font-size: 9px; }.attention-item > span { color: var(--ink-3); font: 600 9px/1 monospace; }
.attention-summary { display: grid; gap: 1px; margin-top: 4px; padding-top: 5px; border-top: 1px solid var(--line-soft); }
.attention-summary button { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 11px; border: 0; border-radius: 4px; background: transparent; color: var(--ink-3); font-size: 9px; text-align: left; cursor: pointer; }
.attention-summary button:hover { background: var(--chassis-2); color: var(--ink-2); }
.attention-summary button strong { color: var(--signal-warn); font: 700 10px/1 monospace; }
.attention-summary button > span:last-child { margin-left: auto; color: var(--fiber-blue); }
.attention-summary-label { color: inherit; }
.empty-state.compact { padding: 30px 16px 24px; }
.recent-panel, .data-panel { overflow: hidden; }
.text-button { border: 0; background: transparent; color: var(--fiber-blue); font-size: 10px; font-weight: 700; cursor: pointer; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { height: 36px; padding: 0 16px; background: rgba(255,255,255,.015); color: var(--ink-4); font-size: 8px; text-align: left; text-transform: uppercase; letter-spacing: .09em; }
td { height: 56px; padding: 8px 16px; border-top: 1px solid var(--line-soft); color: var(--ink-2); white-space: nowrap; }
td strong, td small { display: block; }td strong { color: var(--ink-1); font-family: inherit; font-size: 11px; }td small { margin-top: 4px; color: var(--ink-4); font: 9px/1 monospace; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 7px; border-radius: 4px; font-size: 9px; font-weight: 700; }
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-badge.online { color: var(--signal-ok); background: rgba(72,213,151,.08); }.status-badge.warning, .status-badge.pending { color: var(--signal-warn); background: rgba(240,184,90,.08); }.status-badge.offline { color: var(--signal-los); background: rgba(255,107,114,.08); }
.rx-good { color: var(--signal-ok); }.rx-warn { color: var(--signal-warn); }.rx-none { color: var(--signal-los); }
.toolbar { min-height: 76px; }.filters { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--control); }.filter { border: 0; border-radius: 4px; background: transparent; color: var(--ink-3); padding: 7px 10px; font-size: 9px; font-weight: 700; cursor: pointer; }.filter.is-active { background: var(--chassis-3); color: var(--ink-1); }
.row-action { border: 1px solid var(--line); background: transparent; color: var(--ink-2); border-radius: 4px; padding: 6px 8px; font-size: 9px; cursor: pointer; }.row-action:hover { background: var(--chassis-3); }
.row-action:disabled { color: var(--ink-4); cursor: not-allowed; opacity: .65; }
.section-intro { display: flex; justify-content: space-between; align-items: end; margin: 32px 0 18px; }.section-intro h2 { font-size: 21px; }.section-intro p:last-child { margin: 7px 0 0; color: var(--ink-3); font-size: 11px; }.live-indicator { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-3); font-size: 10px; }.live-indicator i { width: 6px; height: 6px; border-radius: 50%; background: var(--signal-ok); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(72,213,151,0); } 0%,100% { box-shadow: 0 0 0 0 rgba(72,213,151,.25); } }
.pending-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.profile-panel { margin-top: 20px; overflow: hidden; }.profile-workspace { display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; padding: 18px; }.profile-list { display: grid; align-content: start; gap: 6px; }.profile-chip { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 11px 12px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--control); }.profile-chip strong,.profile-chip small { display: block; }.profile-chip strong { font-size: 10px; }.profile-chip small { margin-top: 4px; color: var(--ink-4); font-size: 9px; }.profile-chip > span { color: var(--fiber-blue); font: 700 10px/1 monospace; }
.pending-card { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--chassis-1); padding: 16px; }.pending-card header { display: flex; justify-content: space-between; align-items: start; }.pending-card .device-glyph { margin-bottom: 20px; }.pending-card h3 { font: 700 12px/1.2 monospace; margin: 0 0 5px; }.pending-card p { margin: 0; color: var(--ink-3); font-size: 10px; }.pending-card dl { display: grid; grid-template-columns: 1fr 1fr; margin: 18px 0; padding: 12px 0; border-block: 1px solid var(--line-soft); }.pending-card dt { color: var(--ink-4); font-size: 8px; text-transform: uppercase; }.pending-card dd { margin: 5px 0 0; font: 600 10px/1 monospace; }.pending-card .button { width: 100%; }
.device-glyph { width: 42px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(85,167,255,.25); border-radius: 5px; background: var(--fiber-blue-soft); color: var(--fiber-blue); font: 700 8px/1 monospace; }
.audit-timeline { padding: 6px 18px 18px; }.audit-entry { display: grid; grid-template-columns: 70px 14px 1fr auto; gap: 10px; align-items: center; min-height: 58px; border-bottom: 1px solid var(--line-soft); }.audit-entry time { color: var(--ink-4); font: 9px/1 monospace; }.audit-entry > i { width: 6px; height: 6px; border-radius: 50%; background: var(--signal-ok); }.audit-entry.alerta > i { background: var(--signal-los); }.audit-entry.pendiente > i { background: var(--signal-warn); }.audit-entry strong, .audit-entry small { display: block; }.audit-entry strong { font-size: 10px; }.audit-entry small { margin-top: 4px; color: var(--ink-4); font-size: 9px; }.audit-entry > span { color: var(--ink-3); font-size: 9px; }
.empty-state { text-align: center; padding: 52px 20px; color: var(--ink-3); }.empty-state strong { display: block; color: var(--ink-1); font-size: 13px; }.empty-state p { margin: 7px 0 0; font-size: 10px; }

.signal-history { margin-bottom: 16px; overflow: hidden; }
.trace-value { color: var(--signal-ok); font: 700 14px/1 monospace; }
.trace-stage { position: relative; min-height: 180px; padding: 12px 18px 18px; background: #080c11; }
.trace-stage svg { display: block; width: 100%; height: 180px; overflow: visible; }
.trace-grid { stroke: var(--line-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
.trace-threshold { stroke: rgba(240,184,90,.45); stroke-width: 1; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }
.trace-line { fill: none; stroke: var(--fiber-blue); stroke-width: 2; vector-effect: non-scaling-stroke; }
.trace-dot { fill: var(--fiber-blue); stroke: #080c11; stroke-width: 2; vector-effect: non-scaling-stroke; }
.trace-label { fill: var(--ink-4); font: 9px/1 monospace; }
.trace-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-4); font-size: 10px; }
.trace-empty[hidden] { display: none; }

.auth-pending .app-shell { visibility: hidden; }
.login-gate { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background-color: var(--chassis-0); background-image: url('/assets/noc-login-background.png'); background-position: center; background-size: cover; background-repeat: no-repeat; }
.login-gate[hidden] { display: none; }
.login-panel { width: min(410px, 100%); padding: 30px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: rgba(9,13,18,.92); backdrop-filter: blur(8px); }
.login-logo { width: 108px; height: 108px; display: block; margin: 0 auto 22px; border: 1px solid var(--line); border-radius: 24px; object-fit: cover; }
.login-panel h1 { font-size: 22px; margin-bottom: 10px; }
.login-panel > p:not(.eyebrow):not(.login-error) { margin-bottom: 24px; color: var(--ink-3); font-size: 11px; line-height: 1.55; }
.login-panel .button { width: 100%; margin-top: 4px; }
.login-error { min-height: 18px; margin: -3px 0 8px; color: var(--signal-los); font-size: 10px; }
.settings-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; }
.settings-modal-backdrop { position: fixed; z-index: 30; inset: 0; background: rgba(0,0,0,.7); opacity: 0; transition: opacity 180ms var(--ease-out); }
.settings-modal-backdrop.is-open { opacity: 1; }
.settings-modal { position: fixed; z-index: 31; inset: 24px; width: min(1040px, calc(100% - 48px)); max-height: calc(100vh - 48px); margin: auto; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--chassis-0); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(12px) scale(.99); transition: opacity 180ms var(--ease-out), transform 220ms var(--ease-out), visibility 180ms; overflow: hidden; }
.settings-modal.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
.settings-modal-header { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--chassis-1); }
.settings-account-mark { min-width: 0; display: flex; align-items: center; gap: 12px; }
.settings-account-mark > span { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(85,167,255,.25); border-radius: 50%; background: var(--fiber-blue-soft); color: var(--fiber-blue); font: 700 10px/1 monospace; }
.settings-account-mark h2 { font-size: 17px; }
.settings-account-mark small { display: block; margin-top: 4px; color: var(--ink-3); font-size: 9px; }
.settings-modal-scroll { max-height: calc(100vh - 127px); padding: 18px; overflow-y: auto; }
.settings-card { overflow: hidden; }
.settings-body { padding: 18px; }
.settings-body > p { color: var(--ink-3); font-size: 11px; line-height: 1.6; }
.settings-intro { min-height: 36px; margin: 0 0 18px; }
.section-count { min-width: 32px; height: 24px; display: inline-grid; place-items: center; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--control); color: var(--ink-2); font: 700 9px/1 monospace; }
.safety-card { grid-column: 1 / -1; }
.compact-list { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); overflow: hidden; }
.compact-row { min-height: 46px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); }
.compact-row:last-child { border-bottom: 0; }
.compact-row strong, .compact-row small { display: block; }
.compact-row strong { font-size: 10px; }.compact-row small { margin-top: 4px; color: var(--ink-4); font-size: 9px; }
.user-directory { max-height: 318px; overflow-y: auto; background: var(--control); }
.user-directory .compact-row { min-height: 56px; background: var(--chassis-1); }
.user-directory .compact-row:hover { background: var(--chassis-2); }
.user-row { width: 100%; border: 0; color: inherit; text-align: left; cursor: pointer; }
.user-row.is-selected { background: var(--fiber-blue-soft); box-shadow: inset 2px 0 0 var(--fiber-blue); }
.user-row > span:first-child { min-width: 0; }
.settings-form { display: grid; align-content: start; }
.settings-form .button { justify-self: start; margin-top: 2px; }
.user-edit-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.user-edit-actions { display: flex; justify-content: flex-end; gap: 8px; }
.user-edit-actions .button { margin: 0; }
.settings-form label small { color: var(--ink-4); font-size: 8px; font-weight: 400; }
.channel-line { display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line-soft); }
.channel-line i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); }.channel-line.is-on i { background: var(--signal-ok); }
.channel-line strong { font-size: 10px; }.channel-line span { color: var(--ink-4); font-size: 9px; }

.olt-switcher { position: relative; }
.olt-switcher-trigger { min-width: 178px; height: 42px; display: grid; grid-template-columns: 8px 1fr auto; gap: 9px; align-items: center; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--chassis-1); text-align: left; cursor: pointer; }
.olt-switcher-trigger:hover { border-color: var(--line-strong); background: var(--chassis-2); }
.olt-switcher-trigger small, .olt-switcher-trigger strong { display: block; }.olt-switcher-trigger small { color: var(--ink-4); font-size: 8px; }.olt-switcher-trigger strong { max-width: 125px; overflow: hidden; margin-top: 3px; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }.olt-switcher-trigger b { color: var(--ink-3); }
.olt-switcher-menu { position: absolute; z-index: 12; top: calc(100% + 6px); left: 0; width: 270px; padding: 5px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--chassis-2); }
.olt-switcher-menu[hidden] { display: none; }
.olt-switcher-menu button { width: 100%; display: grid; grid-template-columns: 8px 1fr; gap: 9px; align-items: center; padding: 10px; border: 0; border-radius: 5px; background: transparent; text-align: left; cursor: pointer; }.olt-switcher-menu button:hover { background: var(--chassis-3); }.olt-switcher-menu .status-dot:not(.online) { border: 1px solid var(--signal-warn); }.olt-switcher-menu strong, .olt-switcher-menu small { display: block; }.olt-switcher-menu strong { font-size: 10px; }.olt-switcher-menu small { margin-top: 4px; color: var(--ink-3); font-size: 8px; }
.olt-fleet-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 28px 0 16px; }.olt-fleet-heading h2 { font-size: 21px; }.olt-fleet-heading p:last-child { max-width: 620px; margin: 7px 0 0; color: var(--ink-3); font-size: 11px; line-height: 1.55; }
.olt-fleet-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.olt-card { min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--chassis-1); }.olt-card.is-online { border-color: rgba(72,213,151,.22); }.olt-card header, .olt-card footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }.olt-vendor { color: var(--ink-4); font: 700 9px/1 monospace; letter-spacing: .08em; }.olt-card h3 { margin: 0 0 9px; font-size: 16px; }.olt-card code { color: var(--ink-3); font-size: 9px; }.olt-card footer { padding-top: 13px; border-top: 1px solid var(--line-soft); color: var(--ink-4); font-size: 8px; }.olt-card footer strong { color: var(--ink-2); font-size: 8px; }
.olt-create-panel { overflow: hidden; margin-bottom: 24px; }.olt-form { padding: 18px; }.olt-form fieldset { margin: 0 0 18px; padding: 0; border: 0; }.olt-form legend { margin-bottom: 9px; color: var(--ink-2); font-size: 10px; font-weight: 600; }
.driver-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }.driver-grid label { margin: 0; cursor: pointer; }.driver-grid input { position: absolute; width: 1px; height: 1px; opacity: 0; }.driver-grid label > span { min-height: 64px; display: grid; align-content: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--control); }.driver-grid input:checked + span { border-color: rgba(85,167,255,.5); background: var(--fiber-blue-soft); }.driver-grid input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }.driver-grid strong, .driver-grid small { display: block; }.driver-grid strong { font-size: 10px; }.driver-grid small { margin-top: 5px; color: var(--ink-4); font-size: 8px; }
.olt-form-fields { display: grid; grid-template-columns: 1.15fr 1fr .45fr .8fr 1fr; gap: 10px; }.olt-form-fields label small { color: var(--ink-4); font-weight: 400; }.olt-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 4px; }.olt-form-footer p { margin: 0; color: var(--ink-4); font-size: 9px; }
.password-control { display: grid; grid-template-columns: minmax(0,1fr) auto; }.password-control input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }.password-control button { min-width: 58px; border: 1px solid var(--line); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--chassis-2); color: var(--ink-2); font-size: 9px; cursor: pointer; }.password-control button:hover { background: var(--chassis-3); color: var(--ink-1); }

.drawer-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.55); opacity: 0; transition: opacity 180ms var(--ease-out); }.drawer-backdrop.is-open { opacity: 1; }
.drawer { position: fixed; z-index: 21; top: 0; right: 0; width: min(460px, 100%); height: 100vh; padding: 22px; border-left: 1px solid var(--line-strong); background: var(--chassis-1); transform: translateX(100%); transition: transform 240ms var(--ease-out); overflow-y: auto; }.drawer.is-open { transform: translateX(0); }.drawer-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }.drawer-header h2 { font-size: 18px; }.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--chassis-2); cursor: pointer; font-size: 18px; }
.device-summary { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--chassis-2); margin-bottom: 22px; }.device-summary strong, .device-summary small { display: block; }.device-summary strong { font-size: 11px; }.device-summary small { margin-top: 4px; color: var(--ink-3); font: 9px/1 monospace; }
form label { display: grid; gap: 7px; margin-bottom: 15px; color: var(--ink-2); font-size: 10px; font-weight: 600; }input, select { width: 100%; height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--control); color: var(--ink-1); font-size: 11px; }input::placeholder { color: var(--ink-4); }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.command-preview { margin-top: 22px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #070b10; }.command-preview div { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 9px; }.command-preview b { color: var(--fiber-blue); }.command-preview code { display: block; margin: 13px 0; color: var(--ink-2); font-size: 9px; line-height: 1.5; }.command-preview p { margin: 0; color: var(--ink-4); font-size: 9px; line-height: 1.5; }.drawer-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px; margin-top: 22px; }
.toast-region { position: fixed; z-index: 40; right: 18px; bottom: 18px; display: grid; gap: 8px; }.toast { width: min(330px, calc(100vw - 36px)); padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--chassis-3); color: var(--ink-1); font-size: 10px; opacity: 1; transform: translateY(0); transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out); }.toast.is-leaving { opacity: 0; transform: translateY(8px); }.toast strong { color: var(--signal-ok); margin-right: 6px; }

@media (max-width: 1240px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  main { padding-inline: 24px; }
  .topbar { align-items: flex-start; padding-block: 18px; }
  .top-actions { justify-content: flex-end; flex-wrap: wrap; }
  .global-search { width: min(34vw, 310px); }
  .overview-grid { grid-template-columns: minmax(0, 1fr) 280px; }
  .olt-form-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1040px) {
  .overview-grid, .settings-grid { grid-template-columns: 1fr; }
  .safety-card { grid-column: auto; }
  .pending-grid, .olt-fleet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-strip, .trend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trend-cell:nth-child(-n+2), .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .metric:nth-child(2) { border-right: 0; }
  .health-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .health-item:nth-child(3) { border-right: 0; }
  .health-item:nth-child(-n+3) { border-bottom: 1px solid var(--line-soft); }
  .driver-grid, .olt-form-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { flex-direction: column; }
  .top-actions, .global-search { width: 100%; }
  .olt-switcher { flex: 1 1 190px; }
  .olt-switcher-trigger { width: 100%; }
  .global-search { flex: 3 1 280px; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 12px 14px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 4px 10px; }
  .brand-logo { width: 42px; height: 42px; }
  .sidebar nav { display: flex; gap: 4px; margin-inline: -14px; padding: 4px 14px 8px; overflow-x: auto; scrollbar-width: thin; scroll-snap-type: x proximity; }
  .nav-link { width: auto; min-height: 42px; flex: 0 0 auto; padding-inline: 12px; white-space: nowrap; scroll-snap-align: start; }
  .connection-card { display: none; }
  .operator { margin-top: 4px; padding-top: 8px; }
  .operator-profile { max-width: calc(100% - 54px); }

  main { padding: 0 14px calc(32px + env(safe-area-inset-bottom)); }
  .topbar { min-height: 0; gap: 16px; padding: 18px 0; }
  .page-context { width: 100%; }
  .page-context > div { min-width: 0; }
  .page-context h1 { overflow-wrap: anywhere; }
  .top-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .olt-switcher { grid-column: 1 / -1; width: 100%; }
  .olt-switcher-menu { width: 100%; }
  .global-search { min-width: 0; width: 100%; }
  .top-actions > .button { min-width: 44px; padding-inline: 12px; }
  .notice { align-items: flex-start; margin: 14px 0; }
  .notice p { line-height: 1.5; }

  .overview-grid, .profile-workspace { grid-template-columns: 1fr; }
  .pending-grid, .olt-fleet-grid, .driver-grid, .olt-form-fields, .user-edit-fields { grid-template-columns: 1fr; }
  .metric, .health-item { padding: 14px; }
  .health-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .health-item:nth-child(3) { border-right: 1px solid var(--line-soft); }
  .health-item:nth-child(even) { border-right: 0; }
  .health-item:nth-child(-n+4) { border-bottom: 1px solid var(--line-soft); }
  .panel-heading { min-height: 62px; padding: 14px; }
  .panel-heading, .olt-fleet-heading, .section-intro { align-items: flex-start; }
  .section-intro, .olt-fleet-heading { flex-direction: column; }
  .legend { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
  .chassis { margin: 12px; grid-template-columns: 20px minmax(0, 1fr); }
  .card-slot { grid-column: 2; }
  .pon-grid { gap: 4px; }
  .pon-port { height: 52px; }
  .attention-item { padding-inline: 8px; }
  .profile-workspace, .olt-form, .settings-body { padding: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .filters { max-width: 100%; overflow-x: auto; }
  .filter { flex: 1 0 auto; }
  .olt-form-footer { align-items: stretch; flex-direction: column; }
  .olt-form-footer .button { width: 100%; }
  .audit-timeline { padding-inline: 12px; }
  .audit-entry { grid-template-columns: 58px 10px minmax(0, 1fr); padding-block: 9px; }
  .audit-entry > span { grid-column: 3; }

  .responsive-table thead { display: none; }
  .responsive-table, .responsive-table tbody { display: block; width: 100%; }
  .responsive-table tbody { padding: 8px; }
  .responsive-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--control); overflow: hidden; }
  .responsive-table tr:last-child { margin-bottom: 0; }
  .responsive-table td { min-width: 0; height: auto; min-height: 58px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; padding: 10px 12px; border-top: 0; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); white-space: normal; overflow-wrap: anywhere; }
  .responsive-table td:nth-child(even) { border-right: 0; }
  .responsive-table td::before { content: attr(data-label); color: var(--ink-4); font: 700 8px/1 monospace; letter-spacing: .06em; text-transform: uppercase; }
  .responsive-table td:nth-last-child(-n+2) { border-bottom: 0; }
  .responsive-table .row-action { width: 100%; min-height: 32px; }
  .recent-table td:last-child { border-bottom: 0; }

  .settings-modal { inset: 0; width: 100%; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
  .settings-modal-header { min-height: 72px; padding: 12px 14px; }
  .settings-modal-scroll { max-height: calc(100dvh - 72px); padding: 10px; }
  .settings-account-mark small { max-width: 210px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .settings-form .button, .user-edit-actions .button, .safety-card .button { width: 100%; justify-self: stretch; }
  .user-edit-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .drawer { width: 100%; padding: 18px 14px calc(20px + env(safe-area-inset-bottom)); }
  .trace-stage { padding-inline: 8px; }
  .trace-stage svg { height: 150px; }
  .toast-region { right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); left: 10px; }
  .toast { width: 100%; }
}

@media (max-width: 480px) {
  .login-gate { padding: 10px; }
  .login-panel { padding: 22px 18px; }
  .login-logo { width: 88px; height: 88px; margin-bottom: 18px; border-radius: 20px; }
  .metric-strip { grid-template-columns: 1fr; }
  .metric { min-height: 82px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .metric:last-child { border-bottom: 0; }
  .trend-grid { grid-template-columns: 1fr; }
  .trend-cell { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .trend-cell:last-child { border-bottom: 0; }
  .panel-heading { gap: 10px; }
  .panel-heading .status-badge { flex: 0 0 auto; }
  .legend { display: none; }
  .pon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .responsive-table tr { grid-template-columns: 1fr; }
  .responsive-table td { min-height: 0; border-right: 0; }
  .responsive-table td:nth-last-child(2) { border-bottom: 1px solid var(--line-soft); }
  .responsive-table td:last-child { border-bottom: 0; }
  .device-summary { grid-template-columns: 44px minmax(0, 1fr); }
  .device-summary .status-badge { grid-column: 1 / -1; justify-self: start; }
  .drawer-actions, .user-edit-actions { grid-template-columns: 1fr; }
  .olt-card footer { align-items: flex-start; flex-direction: column; }
  .password-control { grid-template-columns: minmax(0, 1fr) 64px; }
  .settings-account-mark > span { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
