:root {
  --bg: #f3f2eb;
  --bg-strong: #ebe7db;
  --surface: #fffdf7;
  --surface-alt: #f8f3e6;
  --text: #1e2724;
  --muted: #5f6d67;
  --line: #d6cfbe;
  --ok: #2f7d48;
  --warn: #d98424;
  --critical: #c13f2f;
  --accent: #0b6e69;
  --shadow: 0 18px 40px rgba(34, 47, 42, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(11, 110, 105, 0.12), transparent 22%),
    linear-gradient(180deg, #f9f6ef 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Segoe UI Variable", "Segoe UI", "Trebuchet MS", sans-serif;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(440px, 94vw);
  border: 1px solid rgba(191, 204, 218, 0.92);
  border-radius: 20px;
  background:
    radial-gradient(circle at 85% 10%, rgba(11, 110, 105, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 253, 0.95));
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.1);
  padding: 24px;
  display: grid;
  gap: 12px;
}

.auth-card h1 {
  margin: 2px 0 0;
  color: #10233a;
  font-size: 1.4rem;
}

.auth-logo {
  height: 38px;
  width: auto;
}

.page-shell {
  max-width: 1360px;
  margin: 0 auto;
  padding: 20px 18px 60px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(191, 204, 218, 0.92);
  background:
    radial-gradient(circle at 88% 16%, rgba(11, 110, 105, 0.14), transparent 22%),
    linear-gradient(135deg, rgba(251, 253, 255, 0.98), rgba(239, 246, 250, 0.96));
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.42), transparent 68%);
  mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.42), transparent 68%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, #0b6e69, #2a8f87, #64b5b0);
}

.hero-main {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.hero-brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.75);
}

.hero-suite-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #32475b;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-suite-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hero-syncbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border: 1px solid rgba(191, 204, 218, 0.78);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
}

.hero-sync-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.hero-mode-pill.hero-mode-pill-light {
  background: rgba(11, 110, 105, 0.16);
  border-color: rgba(11, 110, 105, 0.34);
  color: #0f2f3c;
  font-weight: 800;
}

.hero-sync-status {
  margin: 0;
  color: #466277;
  font-size: 0.79rem;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.hero-sync-inline {
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(11, 110, 105, 0.24);
}

.hero-user-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(11, 110, 105, 0.1);
  border: 1px solid rgba(11, 110, 105, 0.28);
  color: #1f4e4a;
  font-size: 0.69rem;
  font-weight: 700;
}

.hero-logout {
  padding: 7px 10px;
  border-radius: 10px;
}

.hero-heading {
  min-width: 0;
}

.brand-logo {
  display: block;
  height: 34px;
  width: auto;
  flex: 0 0 auto;
}

.hero-copyblock {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.hero-kicker {
  margin: 0;
  color: #466277;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  color: #10233a;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  max-width: 420px;
}

.hero-copy,
.muted {
  color: var(--muted);
}

.hero-copy {
  margin: 0;
  max-width: 620px;
  color: #5a6f84;
  font-size: 0.94rem;
  line-height: 1.5;
}

.hero-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-capability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(191, 204, 218, 0.88);
  background: rgba(255, 255, 255, 0.86);
  color: #334e68;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-capability::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0b6e69, #48a59e);
  box-shadow: 0 0 0 4px rgba(72, 165, 158, 0.12);
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(118px, 1fr));
  gap: 10px;
  max-width: 840px;
}

.hero-highlight {
  display: grid;
  gap: 7px;
  padding: 14px 14px 13px;
  border: 1px solid rgba(208, 218, 229, 0.92);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 253, 0.92));
  border-radius: 18px;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.04);
  position: relative;
  overflow: hidden;
}

.hero-highlight::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, rgba(11, 110, 105, 0.82), rgba(72, 165, 158, 0.28));
}

.hero-highlight-label {
  color: #5f7083;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.hero-highlight strong {
  color: #10233a;
  font-size: 1.3rem;
  line-height: 1;
}

.hero-highlight small {
  color: #708297;
  font-size: 0.76rem;
  line-height: 1.35;
}

.hero-actions {
  width: 100%;
  min-width: 0;
  display: grid;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.hero-control-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 28%),
    linear-gradient(180deg, #10233a 0%, #132b45 100%);
  border: 1px solid rgba(51, 65, 85, 0.8);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.2);
}

.hero-control-title {
  margin: 0;
  color: #f8fbff;
  font-size: 1.18rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hero-control-copy {
  margin: -4px 0 0;
  color: rgba(226, 232, 240, 0.8);
  font-size: 0.86rem;
  line-height: 1.5;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.primary-button {
  background: var(--accent);
  color: white;
  box-shadow: 0 8px 16px rgba(11, 110, 105, 0.24);
}

.hero-sync {
  width: 100%;
  min-width: 0;
  display: inline-flex;
  justify-content: center;
  padding: 13px 16px;
  border-radius: 14px;
  box-shadow: 0 12px 22px rgba(11, 110, 105, 0.28);
}

.hero-status-card {
  width: 100%;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.08);
  border-radius: 16px;
  padding: 14px;
}

.hero-status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hero-status-label {
  margin: 0;
  color: rgba(191, 219, 254, 0.76);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
}

.hero-mode-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #dbeafe;
  font-size: 0.72rem;
  font-weight: 700;
}

.hero-status-value {
  margin: 0;
  color: #f8fbff;
  font-size: 0.95rem;
  line-height: 1.35;
  font-weight: 700;
}

.hero-status-hint {
  margin: 0;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.83rem;
  line-height: 1.42;
}

.hero-control-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hero-control-metric {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.hero-control-metric span {
  color: rgba(191, 219, 254, 0.72);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.hero-control-metric strong {
  color: #f8fbff;
  font-size: 0.9rem;
  line-height: 1.3;
}

.secondary-button {
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--line);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(0);
}

.tabs,
.subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
  padding: 6px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid #d8d1bf;
  border-radius: 14px;
}

.tab-button,
.subtab-button {
  border: 1px solid #d5cebd;
  background: rgba(255, 255, 255, 0.92);
  padding: 9px 14px;
  border-radius: 999px;
  color: #2b3734;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-button:hover,
.subtab-button:hover {
  border-color: #bfb59f;
  transform: translateY(-1px);
}

.tab-button.active,
.subtab-button.active {
  background: var(--text);
  color: white;
  border-color: var(--text);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.hidden {
  display: none !important;
}

.stats-grid,
.layout-two,
.vendor-grid,
.requests-grid,
.history-grid {
  display: grid;
  gap: 12px;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 12px;
}

.layout-two {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin-bottom: 12px;
}

.vendor-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.requests-grid {
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}

.history-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.panel,
.stat-card,
.vendor-card,
.request-card,
.alert-card,
.board-card,
.history-card,
.connection-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 8px 18px rgba(34, 47, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.panel:hover,
.stat-card:hover,
.vendor-card:hover,
.request-card:hover,
.alert-card:hover,
.board-card:hover,
.history-card:hover,
.connection-card:hover {
  transform: translateY(-1px);
  border-color: #c6beaa;
  box-shadow: 0 12px 22px rgba(31, 44, 39, 0.1);
}

.panel {
  padding: 16px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.panel-head h2,
.stat-card h3,
.request-card h3,
.board-card h3 {
  margin: 0;
}

.panel-head h2 {
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.stat-card {
  padding: 14px;
}

.stat-card h3 {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.stat-value {
  display: block;
  margin-top: 6px;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.05;
}

.chart-rows,
.stack-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.chart-row {
  display: grid;
  grid-template-columns: 120px 1fr 52px;
  gap: 12px;
  align-items: center;
}

.chart-row.double {
  grid-template-columns: 120px 1fr 1fr;
}

.bar-track {
  height: 10px;
  background: var(--bg-strong);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
}

.bar-fill.down {
  background: linear-gradient(90deg, #0b6e69, #1d9d92);
}

.bar-fill.up {
  background: linear-gradient(90deg, #db8f28, #e6c05d);
}

.bar-fill.signal {
  background: linear-gradient(90deg, #2f7d48, #8fbf5a);
}

.alert-card,
.vendor-card,
.request-card,
.board-card,
.history-card,
.connection-card {
  padding: 14px;
}

.status-pill {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.status-pill.ok {
  background: rgba(47, 125, 72, 0.12);
  color: var(--ok);
}

.status-pill.warning {
  background: rgba(217, 132, 36, 0.12);
  color: var(--warn);
}

.status-pill.critical,
.status-pill.full {
  background: rgba(193, 63, 47, 0.12);
  color: var(--critical);
}

.olt-header {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.olt-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-chip {
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
  border-radius: 16px;
}

.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.ports-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.ports-table th,
.ports-table td,
.onu-table th,
.onu-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.94rem;
  vertical-align: top;
}

.ports-table tr:last-child td,
.onu-table tr:last-child td {
  border-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #ddd6c6;
  border-radius: 12px;
  background: #fffdf8;
}

.onu-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  background: transparent;
}

.onu-table-modern {
  min-width: 0;
  table-layout: fixed;
}

.onu-table th,
.onu-table td {
  overflow-wrap: break-word;
  word-break: normal;
}

.onu-table thead th {
  background: #ece7d9;
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  color: #2b3734;
  position: sticky;
  top: 0;
  z-index: 1;
}

.onu-table tbody tr:nth-child(odd) {
  background: transparent;
}

.onu-table tbody tr:nth-child(even) {
  background: transparent;
}

.onu-table tbody tr:hover {
  filter: brightness(0.995);
}

.onu-table tbody tr {
  box-shadow: 0 12px 24px rgba(27, 41, 38, 0.08);
  border: 1px solid #e3d7c4;
  background: #fffefb;
  border-radius: 14px;
}

.onu-table tbody tr td:first-child {
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
}

.onu-table tbody tr td:last-child {
  border-top-right-radius: 14px;
  border-bottom-right-radius: 14px;
}

.onu-table tbody tr td {
  padding: 9px 12px;
  vertical-align: middle;
}

.table-row-stale {
  box-shadow: inset 4px 0 0 rgba(245, 157, 42, 0.55);
}

.onu-table tbody tr.table-row-temp-alert {
  box-shadow:
    inset 4px 0 0 rgba(193, 63, 47, 0.75),
    0 12px 24px rgba(193, 63, 47, 0.16);
  border-color: rgba(193, 63, 47, 0.38);
  background: linear-gradient(180deg, #fffaf9 0%, #fff1ee 100%);
}

.onu-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.onu-count {
  font-weight: 700;
  color: #1f3551;
}

.onu-pager {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pager-button {
  border: 1px solid #c5ced8;
  background: #eef3f8;
  color: #1f3551;
  border-radius: 6px;
  min-width: 34px;
  height: 32px;
  cursor: pointer;
}

.pager-button.active {
  background: #dbe6f2;
  border-color: #91abc9;
}

.onu-status-dot {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #bbb;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.onu-status-dot.ok {
  background: #4caf50;
}

.onu-status-dot.warning {
  background: #f59d2a;
}

.onu-status-cell {
  min-width: 0;
}

.onu-status-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.onu-status-copy {
  display: grid;
  gap: 4px;
}

.onu-status-copy strong {
  color: #1f3551;
}

.onu-status-copy small {
  color: #607285;
  line-height: 1.3;
}

.onu-status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.onu-status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.onu-status-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px 12px;
  margin-top: 8px;
}

.onu-status-facts span {
  display: block;
  color: #6a7a89;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.onu-status-facts strong {
  display: block;
  color: #1f3551;
  font-size: 0.9rem;
  font-weight: 700;
}

.onu-cell-status {
  min-width: 0;
}

.onu-cell-client {
  min-width: 0;
}

.onu-cell-view {
  min-width: 74px;
  text-align: center;
  vertical-align: middle !important;
}

.onu-cell-location {
  min-width: 0;
}

.onu-cell-signal {
  min-width: 0;
}

.onu-cell-service {
  min-width: 0;
}

.onu-cell-updated {
  min-width: 0;
}

.onu-cell-action {
  min-width: 86px;
  text-align: center;
  vertical-align: middle !important;
}

.onu-identity-cell,
.onu-location-cell,
.onu-updated-cell {
  display: grid;
  gap: 4px;
}

.onu-identity-cell strong,
.onu-location-cell strong {
  color: #16354f;
  font-size: 0.93rem;
  line-height: 1.25;
}

.onu-identity-cell small,
.onu-location-cell small,
.onu-updated-cell small {
  color: #637a8d;
  font-size: 0.78rem;
  line-height: 1.3;
}

.onu-service-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.onu-service-cell .status-pill,
.onu-service-cell .bridge-badge,
.onu-service-cell .service-badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
}

.onu-updated-cell strong {
  color: #1f3551;
  font-size: 0.86rem;
}

.onu-updated-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.onu-signal-header span {
  display: block;
}

.onu-signal-header small {
  display: block;
  margin-top: 3px;
  color: #697f90;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.view-button {
  border: 0;
  border-radius: 8px;
  background: #0b6edc;
  color: #fff;
  font-weight: 700;
  padding: 6px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.view-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.view-button.subtle {
  background: transparent;
  color: #0b6edc;
  border: 1px solid rgba(11, 110, 220, 0.25);
  padding: 6px 10px;
  box-shadow: none;
}

.view-button.subtle:hover {
  filter: none;
  background: rgba(11, 110, 220, 0.08);
}

.onu-signal-stack {
  display: grid;
  gap: 8px;
}

.onu-signal-stack.stale {
  opacity: 0.88;
}

.onu-signal-grid-modern {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.onu-cell-signal .onu-signal-grid-modern {
  grid-template-columns: 1fr;
}

.onu-signal-metric {
  border: 1px solid #cfd8e5;
  border-radius: 12px;
  padding: 8px 9px;
  background:
    linear-gradient(135deg, rgba(11, 110, 105, 0.08), transparent 46%),
    linear-gradient(180deg, #f9fbff 0%, #f1f6fb 100%);
  display: grid;
  gap: 5px;
  min-width: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 8px 14px rgba(16, 38, 54, 0.08);
}

.onu-signal-metric-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  flex-wrap: nowrap;
}

.onu-signal-metric-head span {
  color: #5f788b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.onu-signal-metric-head strong {
  color: #173850;
  font-size: 0.82rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.onu-signal-meter {
  height: 8px;
  border-radius: 999px;
  background: #dfe7ef;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.onu-signal-meter span {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
  background: #8ea0b3;
}

.onu-signal-metric.ok .onu-signal-meter span {
  background: linear-gradient(90deg, #0b7d70, #17a29f);
}

.onu-signal-metric.warning .onu-signal-meter span {
  background: linear-gradient(90deg, #d08b1f, #e8bf52);
}

.onu-signal-metric.critical .onu-signal-meter span {
  background: linear-gradient(90deg, #c14633, #df6a4b);
}

.onu-signal-metric.unknown {
  background: linear-gradient(180deg, #f3f5f8 0%, #eceff3 100%);
}

.onu-signal-metric.unknown .onu-signal-metric-head strong {
  color: #718598;
}

.onu-signal-metric.unknown .onu-signal-meter span {
  width: 0 !important;
  background: #b8c4cf;
}

.onu-signal-footnote {
  color: #5f7485;
  font-size: 0.74rem;
  line-height: 1.3;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.onu-temp-alert-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.onu-temp-alarm-pill {
  letter-spacing: 0.04em;
  animation: onu-temp-alarm-pulse 1.4s ease-in-out infinite;
}

.signal-visual {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.signal-bars {
  color: #4caf50;
  font-size: 18px;
  line-height: 1;
}

.bridge-badge,
.service-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.bridge-badge {
  background: #8fa9bf;
}

.bridge-badge.route-mode {
  background: #2d8f6f;
}

.service-badge {
  background: #4caf50;
}

.onu-notice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #0b6e69 0%, #0f8f8b 55%, #1ab3a9 100%);
  color: #f9fffe;
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 12px 22px rgba(11, 110, 105, 0.18);
}

.onu-notice-left {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.onu-notice-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0.9;
}

.onu-notice-name {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.onu-notice-meta {
  font-size: 0.82rem;
  opacity: 0.9;
}

.onu-notice-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.onu-notice-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #f7fffe;
  font-weight: 800;
  font-size: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.onu-notice-chip.ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.onu-inspect-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.05fr 1.15fr;
  gap: 10px;
  align-items: start;
  margin-bottom: 12px;
}

.onu-inspect-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fffefb 0%, #f7f3e9 100%);
  padding: 10px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.status-card {
  padding: 10px;
  gap: 8px;
}

.signal-card {
  position: relative;
  background: linear-gradient(135deg, #fdfbf4 0%, #eef7f7 100%);
  border-color: #cfe4e5;
  box-shadow: 0 16px 28px rgba(12, 64, 62, 0.14);
  overflow: hidden;
}

.signal-card::before {
  content: "";
  position: absolute;
  inset: 6px 10px auto auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(11, 110, 105, 0.16), transparent 62%);
  pointer-events: none;
}

.temp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(11, 110, 105, 0.22);
  background: rgba(11, 110, 105, 0.12);
  color: #0f3b39;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.temp-pill.critical {
  border-color: rgba(193, 63, 47, 0.36);
  background: rgba(193, 63, 47, 0.14);
  color: #8a2318;
  animation: onu-temp-alarm-pulse 1.4s ease-in-out infinite;
}

.onu-temp-status-pill {
  letter-spacing: 0.02em;
}

@keyframes onu-temp-alarm-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(193, 63, 47, 0.34);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(193, 63, 47, 0);
  }
}

.signal-card .panel-head {
  align-items: center;
  margin-bottom: 6px;
}

.signal-sparkline {
  margin-top: 8px;
  background: #f3f8fb;
  border: 1px solid #d6e2eb;
  border-radius: 10px;
  padding: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.signal-sparkline svg {
  width: 100%;
  height: 80px;
  display: block;
}

.sparkline-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 700;
  color: #173850;
  font-size: 0.86rem;
}

.sparkline-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
  color: #556b7d;
  font-size: 0.82rem;
  font-weight: 700;
}

.onu-inspect-kv {
  display: grid;
  gap: 8px;
}

.onu-inspect-kv div {
  display: grid;
  gap: 3px;
}

.onu-inspect-kv span {
  color: #607285;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.onu-inspect-kv strong {
  color: #16354f;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  word-break: break-word;
}

.onu-inspect-card .onu-status-copy {
  min-width: 0;
}

.onu-inspect-card .onu-signal-grid-modern {
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 10px;
}

.onu-inspect-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.onu-inspect-note {
  color: #5f7485;
  font-size: 0.78rem;
  line-height: 1.3;
}

.onu-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 14px;
}

.onu-detail-col {
  display: grid;
  gap: 8px;
}

.onu-detail-col div {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 10px;
  align-items: baseline;
}

.onu-signal-refresh-row .status-pill {
  justify-self: start;
  min-width: 110px;
  text-align: center;
}

.onu-quality-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdfa 0%, #f7f2e7 100%);
  padding: 12px;
  margin-bottom: 12px;
}

.onu-quality-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 8px 0 12px;
}

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

.onu-quality-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(214, 207, 190, 0.88);
  background: rgba(255, 255, 255, 0.82);
}

.onu-quality-item strong {
  color: #0f3158;
}

.onu-quality-item small {
  color: #607285;
  line-height: 1.35;
}

.onu-quality-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.onu-physical-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  margin-bottom: 12px;
}

.onu-physical-reason {
  display: grid;
  gap: 6px;
  padding: 12px;
  margin: 10px 0 12px;
  border-radius: 12px;
  border: 1px solid #d9e1ea;
  background: #fbfdff;
}

.onu-physical-reason.ok {
  border-color: rgba(76, 175, 80, 0.45);
  background: rgba(76, 175, 80, 0.06);
}

.onu-physical-reason.warning {
  border-color: rgba(245, 157, 42, 0.45);
  background: rgba(245, 157, 42, 0.08);
}

.onu-physical-reason.critical {
  border-color: rgba(216, 78, 78, 0.45);
  background: rgba(216, 78, 78, 0.08);
}

.onu-physical-reason-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.onu-physical-reason small {
  color: #607285;
  line-height: 1.35;
}

.onu-physical-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed rgba(143, 169, 191, 0.55);
}

.onu-physical-meta div {
  display: grid;
  gap: 4px;
}

.onu-physical-meta strong {
  color: #0f3158;
  font-size: 0.82rem;
}

.onu-physical-meta span {
  color: #607285;
  font-size: 0.9rem;
  line-height: 1.35;
  word-break: break-word;
}

.onu-physical-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.onu-physical-port {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid #d9e1ea;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8fb 100%);
}

.onu-physical-port.ok {
  border-color: rgba(76, 175, 80, 0.45);
}

.onu-physical-port.warning {
  border-color: rgba(245, 157, 42, 0.45);
}

.onu-physical-port.critical {
  border-color: rgba(216, 78, 78, 0.45);
}

.onu-physical-icon-wrap {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f2f6fa;
}

.onu-physical-icon-svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.onu-physical-icon-svg.ok {
  stroke: #4caf50;
}

.onu-physical-icon-svg.warning {
  stroke: #f59d2a;
}

.onu-physical-icon-svg.critical {
  stroke: #d84e4e;
}

.onu-physical-copy {
  display: grid;
  gap: 6px;
}

.onu-physical-copy strong {
  color: #0f3158;
}

.onu-physical-copy .status-pill {
  justify-self: start;
  min-width: 88px;
  text-align: center;
}

.onu-physical-copy small {
  color: #607285;
  line-height: 1.35;
}

.onu-detail-col strong {
  color: #0f3158;
}

.onu-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.onu-kpi-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.onu-kpi-card h4 {
  margin: 0 0 10px;
  color: #0f3158;
}

.onu-live-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 10px;
}

.onu-live-chart-wrap {
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: #fcfbf7;
}

.onu-live-sparkline {
  display: block;
  width: 100%;
  height: 90px;
}

.onu-live-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.onu-live-line.down {
  stroke: #0f3158;
}

.onu-live-line.up {
  stroke: #0b6e69;
}

.onu-live-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
}

.onu-live-legend .dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.onu-live-legend .dot.down {
  background: #0f3158;
}

.onu-live-legend .dot.up {
  background: #0b6e69;
}

.onu-mini-table {
  width: 100%;
  border-collapse: collapse;
}

.onu-mini-table th,
.onu-mini-table td {
  border: 1px solid #d9d9d9;
  padding: 8px;
  text-align: left;
}

.onu-mini-table th {
  background: #eef2f7;
}

.onu-service-line {
  margin-top: 10px;
  color: #1f3551;
  font-weight: 700;
}

.onu-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.command-output,
.onu-command-output {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 10px;
  --command-output-height: 220px;
}

.onu-delete-progress {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfd;
  padding: 12px;
}

.onu-delete-steps {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.onu-delete-step {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.onu-delete-step-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-top: 3px;
  background: #c6d2df;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
}

.onu-delete-step.pending .onu-delete-step-dot {
  background: #c6d2df;
}

.onu-delete-step.running .onu-delete-step-dot {
  background: #d59b2e;
}

.onu-delete-step.done .onu-delete-step-dot {
  background: #2d8d84;
}

.onu-delete-step.error .onu-delete-step-dot {
  background: #bf4c3f;
}

.command-output pre,
.onu-command-output pre {
  margin: 8px 0 0;
  min-height: var(--command-output-height);
  height: var(--command-output-height);
  max-height: var(--command-output-height);
  overflow: auto;
  scrollbar-gutter: stable both-edges;
  white-space: pre;
  word-break: normal;
  overflow-wrap: normal;
  tab-size: 2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.35;
}

.search,
.request-card input,
.request-card select {
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fffefb;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.search:focus,
.request-card input:focus,
.request-card select:focus {
  border-color: #2d8d84;
  box-shadow: 0 0 0 3px rgba(11, 110, 105, 0.14);
  background: #ffffff;
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  width: 100%;
  padding-right: 108px;
}

.toggle-password {
  position: absolute;
  right: 6px;
  padding: 8px 12px;
  border-radius: 10px;
}

.request-card form {
  display: grid;
  gap: 10px;
}

.request-field {
  display: grid;
  gap: 6px;
}

.request-mode-switch {
  display: grid;
  gap: 8px;
}

.request-mode-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.request-mode-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: #30433d;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.request-mode-option input {
  margin: 0;
}

.request-mode-option.active {
  border-color: rgba(11, 110, 105, 0.52);
  background: rgba(11, 110, 105, 0.08);
  color: #0b5b56;
}

.request-mode-option.disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.request-field-label {
  color: #5c6c65;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.inline-two {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inline-three {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.olt-template-catalog {
  display: grid;
  gap: 10px;
}

.request-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.user-permission-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.user-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-alt);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.user-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-card-head strong {
  color: #1f3551;
}

.connect-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.poll-progress-wrap {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fdf8ec, #f6f0e2);
}

.progress-track {
  height: 10px;
  width: 100%;
  background: var(--bg-strong);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.coverage-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.poll-progress-coverage {
  margin: 0 0 8px;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0b6e69, #1d9d92);
  transition: width 0.4s ease;
}

@media (max-width: 900px) {
  .onu-quality-grid,
  .onu-kpi-grid,
  .onu-physical-grid,
  .onu-detail-grid,
  .onu-physical-meta {
    grid-template-columns: 1fr;
  }
}

.table-row-active {
  background: rgba(11, 110, 105, 0.07);
}

.vlan-list {
  display: grid;
  gap: 10px;
}

.request-note {
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
}

.request-profile-summary {
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(214, 207, 190, 0.88);
  color: #435851;
  font-size: 0.88rem;
  line-height: 1.4;
}

.request-profile-pairs {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.request-profile-pair {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  display: grid;
  gap: 4px;
}

.request-profile-pair span {
  color: #5c6c65;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.request-profile-pair strong {
  color: #1f3730;
  font-size: 0.92rem;
  line-height: 1.35;
  word-break: break-word;
}

.request-advanced {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.72);
  border: 1px dashed #cfc6b2;
}

.request-advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: #27403a;
}

.request-advanced summary::-webkit-details-marker {
  display: none;
}

.request-advanced-state {
  color: #60716a;
  font-size: 0.8rem;
  font-weight: 600;
}

.collection-secondary-layout {
  margin-top: 12px;
}

.operator-step {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-alt);
  margin-bottom: 12px;
}

.operator-step:last-child {
  margin-bottom: 0;
}

.operator-step-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.operator-step-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.operator-step-index {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 110, 105, 0.12);
  color: var(--accent);
  font-weight: 800;
  flex-shrink: 0;
}

.operator-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
}

.operator-field span {
  font-size: 0.9rem;
}

.operator-field small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.operator-action-row {
  margin-top: 12px;
}

.collection-meta-grid,
.collection-note-grid,
.collection-footnote-grid {
  display: grid;
  gap: 10px;
}

.collection-meta-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 10px 0 12px;
}

.collection-meta-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(214, 207, 190, 0.88);
  background: linear-gradient(180deg, rgba(255, 253, 247, 0.95), rgba(247, 242, 231, 0.9));
  color: #24413b;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.collection-note-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 12px;
}

.collection-footnote-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 10px;
}

.request-preview {
  display: grid;
  gap: 8px;
}

.preview-warning {
  color: #9f3f35;
  font-weight: 600;
}

.mini-points {
  display: grid;
  gap: 10px;
}

.mini-point {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
  display: grid;
  gap: 6px;
}

.bar-track.slim {
  height: 10px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
}

.onu-modal.hidden {
  display: none;
}

.onu-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 18px;
  overflow-y: auto;
}

.onu-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 26, 33, 0.52);
  backdrop-filter: blur(2px);
}

.onu-modal-card {
  position: relative;
  width: min(1280px, 96vw);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 18px 34px rgba(27, 41, 38, 0.24);
  padding: 16px;
}

.onu-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.onu-modal-header h3 {
  margin: 0;
  color: #1f3551;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.onu-modal-close {
  border: 1px solid #c8beab;
  background: var(--surface-alt);
  color: #24413b;
  min-width: 34px;
  height: 34px;
  border-radius: 10px;
  padding: 0 12px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.onu-modal-close:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.onu-modal-body {
  display: grid;
  gap: 12px;
  padding-bottom: 8px;
}

@media (max-width: 760px) {
  .onu-modal {
    padding: 8px;
  }

  .onu-modal-card {
    width: 100%;
    max-height: calc(100vh - 16px);
    border-radius: 12px;
    padding: 12px;
  }

  .onu-modal-header {
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 2;
  }

  .hero {
    padding: 12px;
  }

  .hero-brandbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-logo {
    height: 40px;
  }

  .hero-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-syncbar {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-sync-meta {
    justify-content: space-between;
  }

  .hero-sync-status {
    max-width: 100%;
  }

  .hero-sync-inline {
    width: 100%;
  }

  .chart-row,
  .chart-row.double,
  .inline-two,
  .inline-three {
    grid-template-columns: 1fr;
  }

  .panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .operator-step-head,
  .operator-step-title {
    flex-direction: column;
  }

  .onu-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .onu-count {
    font-size: 0.86rem;
  }

  .command-output,
  .onu-command-output {
    --command-output-height: 170px;
  }

  .onu-table-modern {
    min-width: 0;
    width: 100%;
    table-layout: auto;
    border-spacing: 0;
  }

  .onu-table-modern thead {
    display: none;
  }

  .onu-table-modern tbody {
    display: grid;
    gap: 12px;
  }

  .onu-table-modern tbody tr {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e3d7c4;
    border-radius: 14px;
    background: #fffefb;
    box-shadow: 0 10px 18px rgba(27, 41, 38, 0.08);
  }

  .onu-table-modern tbody tr.table-row-stale {
    box-shadow:
      inset 4px 0 0 rgba(245, 157, 42, 0.55),
      0 10px 18px rgba(27, 41, 38, 0.08);
  }

  .onu-table-modern tbody tr td {
    display: block;
    padding: 0;
    border: 0;
  }

  .onu-table-modern tbody tr td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: #607285;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .onu-table-modern tbody tr td.onu-cell-status {
    padding-bottom: 10px;
    border-bottom: 1px dashed #d3dae4;
  }

  .onu-table-modern tbody tr td.onu-cell-status::before {
    display: none;
  }

  .onu-status-top {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .onu-status-main {
    width: 100%;
  }

  .onu-status-top .view-button.subtle {
    margin-left: auto;
  }

  .onu-signal-grid-modern {
    grid-template-columns: repeat(3, minmax(96px, 1fr));
  }

  .onu-inspect-grid,
  .onu-detail-grid,
  .onu-kpi-grid {
    grid-template-columns: 1fr;
  }

  .onu-physical-grid {
    grid-template-columns: 1fr;
  }

.onu-detail-col div {
    grid-template-columns: 1fr;
  }
}

/* Dashboard reorganizado */
.dashboard-primary {
  align-items: start;
}

.dashboard-wide {
  margin-bottom: 12px;
}

.dashboard-extra {
  padding: 0;
  border-style: dashed;
}

.dashboard-extra summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  margin: 0;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}

.dashboard-extra summary::-webkit-details-marker {
  display: none;
}
.dashboard-extra summary::marker {
  display: none;
}

.dashboard-extra .extra-body {
  padding: 12px 14px 16px;
  display: grid;
  gap: 12px;
}

.panel-compact {
  padding: 12px;
  box-shadow: none;
  border-style: dashed;
}

.dashboard-history-combined {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.small {
  font-size: 0.85rem;
  line-height: 1.35;
  margin: 0;
}

/* Grafico historico de ONU */
.onu-history-chart-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: var(--surface);
  box-shadow: 0 6px 14px rgba(34, 47, 42, 0.05);
}
.onu-history-chart-wrap svg {
  width: 100%;
  height: 170px;
}
.history-line {
  fill: none;
  stroke-width: 2;
}
.history-point {
  stroke-width: 1;
}
.history-grid {
  stroke: rgba(0, 0, 0, 0.06);
  stroke-width: 1;
}
.history-line.signal {
  stroke: #0b6e69;
}
.history-point.signal {
  fill: #0b6e69;
  stroke: #0b6e69;
}
.history-line.return {
  stroke: #2f7d48;
}
.history-point.return {
  fill: #2f7d48;
  stroke: #2f7d48;
}
.history-line.temp {
  stroke: #d98424;
}
.history-point.temp {
  fill: #d98424;
  stroke: #d98424;
}
.history-legend {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
}
.history-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
}
.history-legend .dot.signal {
  background: #0b6e69;
}
.history-legend .dot.return {
  background: #2f7d48;
}
.history-legend .dot.temp {
  background: #d98424;
}
.history-legend .dot.loss {
  background: var(--critical);
}
.history-legend .dot.up {
  background: var(--ok);
}
.history-tick {
  font-size: 9px;
  fill: var(--muted);
}

.onu-history-inline {
  margin-top: 12px;
}

.history-value {
  font-size: 10px;
  font-weight: 700;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3;
}
.history-value.signal {
  fill: #0b6e69;
}
.history-value.return {
  fill: #2f7d48;
}
.history-value.temp {
  fill: #d98424;
}
.history-marker-line {
  stroke-width: 1;
  stroke-dasharray: 4 4;
  opacity: 0.55;
}
.history-marker-line.loss {
  stroke: var(--critical);
}
.history-marker-line.up {
  stroke: var(--ok);
}
.history-marker.loss circle {
  fill: var(--critical);
}
.history-marker.up circle {
  fill: var(--ok);
}
.history-marker-label {
  font-size: 10px;
  font-weight: 700;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3;
}
.history-marker-label.loss {
  fill: var(--critical);
}
.history-marker-label.up {
  fill: var(--ok);
}
