:root {
  --tblr-font-monospace: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

[data-bs-theme="light"] {
  --tblr-body-bg: #f4f7fb;
  --noc-grid-dot: rgba(32, 107, 196, 0.08);
}

[data-bs-theme="dark"] {
  --noc-grid-dot: rgba(96, 165, 250, 0.07);
}

.page-body {
  background-image: radial-gradient(var(--noc-grid-dot) 1px, transparent 1px);
  background-size: 20px 20px;
}

[data-bs-theme="dark"] .navbar-vertical,
[data-bs-theme="dark"] .page-header {
  background-color: var(--tblr-bg-surface);
}

[data-bs-theme="light"] .navbar-vertical,
[data-bs-theme="light"] .page-header {
  background-color: #ffffff;
}

[data-bs-theme="dark"] .brand-logo-img {
  box-sizing: content-box;
  background-color: rgba(255, 255, 255, 0.92);
  padding: 6px 12px;
  border-radius: 10px;
}

.noc-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  user-select: none;
}

.noc-live-pill .form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
}

.noc-live-pill span {
  font-size: 0.875rem;
}

#btn-notif-bell,
.theme-toggle-btn {
  width: 38px;
  height: 38px;
}

#btn-notif-bell .ti,
.theme-toggle-btn .ti {
  font-size: 1.35rem;
}

.topbar-notif-pill {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  border: 2px solid var(--tblr-bg-surface, #ffffff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.navbar-vertical .navbar-nav .nav-link {
  overflow: visible;
  gap: 6px;
  padding-right: 1rem !important;
}

.navbar-vertical .nav-link-title {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-notif-pill {
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto !important;
  margin-right: 6px;
}

/* NOC Pulse Indicator */
.noc-pulse-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #2fb344;
  box-shadow: 0 0 0 0 rgba(47, 179, 68, 0.65);
  animation: nocPulse 2s infinite;
  flex-shrink: 0;
}

.noc-pulse-dot.is-warn {
  background-color: #f76707;
  box-shadow: 0 0 0 0 rgba(247, 103, 7, 0.65);
}

.noc-pulse-dot.is-down {
  background-color: #d63939;
  box-shadow: 0 0 0 0 rgba(214, 57, 57, 0.65);
}

@keyframes nocPulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 179, 68, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(47, 179, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 179, 68, 0); }
}

.noc-banner {
  border-left: 4px solid #2fb344;
}

.noc-banner.is-warn {
  border-left-color: #f76707;
}

.noc-banner.is-down {
  border-left-color: #d63939;
}

/* KPI left accent */
.kpi-noc { border-top: 3px solid transparent; }
.kpi-noc-blue { border-top-color: #206bc4; }
.kpi-noc-green { border-top-color: #2fb344; }
.kpi-noc-orange { border-top-color: #f76707; }
.kpi-noc-red { border-top-color: #d63939; }

/* Signal Latency Bars */
.signal-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 13px;
  margin-right: 6px;
}
.signal-bars span {
  width: 3px;
  border-radius: 1px;
  background: var(--tblr-border-color, #cbd5e1);
}
.signal-bars span:nth-child(1) { height: 4px; }
.signal-bars span:nth-child(2) { height: 7px; }
.signal-bars span:nth-child(3) { height: 10px; }
.signal-bars span:nth-child(4) { height: 13px; }
.signal-bars.sig-4 span { background: #2fb344; }
.signal-bars.sig-3 span:nth-child(-n+3) { background: #206bc4; }
.signal-bars.sig-2 span:nth-child(-n+2) { background: #f76707; }
.signal-bars.sig-1 span:nth-child(1) { background: #d63939; }

.chart-box {
  position: relative;
  height: 270px;
}

.chart-box-sm {
  position: relative;
  height: 220px;
}

.app-modal {
  display: block;
  background: rgba(24, 36, 51, 0.45);
  backdrop-filter: blur(2px);
}

.toast-floating {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1090;
  background: var(--tblr-bg-surface, #ffffff);
  color: var(--tblr-body-color, #182433);
  border: 1px solid var(--tblr-border-color, #dadfe5);
  border-left: 4px solid #206bc4;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 500;
}

.toast-floating.toast-error {
  border-left-color: #d63939;
}

@media (min-width: 992px) {
  .navbar-vertical.navbar-expand-lg .navbar-collapse {
    display: flex !important;
    flex-direction: column;
    height: 100%;
  }
}
