@keyframes wifi-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes wifi-count {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

body[data-active='wifi'] .content {
  background:
    radial-gradient(circle at 18% 0%, rgba(31, 129, 255, 0.08), transparent 28rem),
    linear-gradient(180deg, #f6f9fc 0%, #eef3f8 100%);
}

body[data-active='wifi'] .report-topbar {
  min-height: 58px;
}

body[data-active='wifi'] .report-status,
body[data-active='wifi'] .report-host {
  align-items: center;
  border: 1px solid #d8e1ec;
  border-radius: 999px;
  color: #42526b;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  text-decoration: none;
}

body[data-active='wifi'] .report-status span {
  background: #18b26b;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(24, 178, 107, 0.14);
  height: 8px;
  width: 8px;
}

body[data-active='wifi'] .report-host {
  background: #f8fafc;
}

body[data-active='wifi'] .avatar {
  background: linear-gradient(135deg, #1463ff, #20b486);
}

.wifi-dashboard {
  --bg: #f6f9fc;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-solid: #ffffff;
  --surface-soft: #f3f7fb;
  --border: #d8e1ec;
  --border-strong: #bdcbe0;
  --text: #152033;
  --muted: #627086;
  --blue: #1769e0;
  --navy: #132a8a;
  --green: #17b96c;
  --orange: #ec7a45;
  --yellow: #d8b31f;
  --purple: #6e56cf;
  --red: #d94c61;
  --teal: #139a8f;
  --shadow: 0 16px 44px rgba(32, 47, 71, 0.08), 0 1px 2px rgba(32, 47, 71, 0.08);
  color: var(--text);
  display: grid;
  gap: 14px;
}

.wifi-dashboard * {
  box-sizing: border-box;
}

.wifi-dashboard .wifi-hero,
.wifi-dashboard .page-nav,
.wifi-dashboard .panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.wifi-dashboard .wifi-hero {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(280px, 0.9fr) minmax(520px, 1.1fr);
  overflow: hidden;
  padding: 10px 16px;
  position: relative;
}

.wifi-dashboard .wifi-hero::before {
  background: linear-gradient(180deg, #1769e0, #16a385);
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 4px;
}

.wifi-dashboard .hero-copy {
  min-width: 0;
}

.wifi-dashboard .report-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 0;
}

.wifi-dashboard h1 {
  color: var(--navy);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
}

.wifi-dashboard .meta-line {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin-top: 4px;
}

.wifi-dashboard .hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.wifi-dashboard .hero-chip {
  align-items: center;
  background: #edf2f9;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #2d3e56;
  display: inline-flex;
  font-size: 11.5px;
  font-weight: 800;
  gap: 5px;
  padding: 4px 10px 4px 8px;
}

.wifi-dashboard .hero-chip svg {
  flex-shrink: 0;
  height: 14px;
  width: 14px;
}

.wifi-dashboard .hero-chip.warn {
  background: #fff4ec;
  border-color: #f5c69e;
  color: #7e3e12;
}

.wifi-dashboard .hero-chip.ok {
  background: #ecfbf3;
  border-color: #a3e4c4;
  color: #0f5132;
}

.wifi-dashboard .filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.wifi-dashboard .filters > div,
.wifi-dashboard .filter-group {
  min-width: 0;
}

.wifi-dashboard .filter-group {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 48px minmax(0, 1fr);
}

.wifi-dashboard .filter-group-year {
  grid-template-columns: 48px auto minmax(110px, 1fr);
}

.wifi-dashboard .clear-filter-button {
  background: transparent;
  border: 1px solid #c5d1e1;
  border-radius: 6px;
  color: #475569;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  height: 32px;
  justify-self: end;
  letter-spacing: 0;
  padding: 0 11px;
}

.wifi-dashboard .clear-filter-button:hover:not(:disabled),
.wifi-dashboard .clear-filter-button:focus-visible {
  background: #edf3fa;
  border-color: #8fa5c6;
  color: #152033;
  outline: none;
}

.wifi-dashboard .clear-filter-button:disabled {
  cursor: default;
  opacity: 0.42;
}

.wifi-dashboard label {
  color: #2d3748;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.07em;
  line-height: 1;
  margin-bottom: 0;
}

.wifi-dashboard .segmented,
.wifi-dashboard .week-grid {
  display: flex;
  gap: 6px;
  overflow: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.wifi-dashboard .segmented {
  flex-wrap: wrap;
}

.wifi-dashboard .week-grid {
  flex-wrap: nowrap;
}

.wifi-dashboard .filter-button,
.wifi-dashboard .page-button {
  appearance: none;
  cursor: pointer;
  font: inherit;
  letter-spacing: 0;
}

.wifi-dashboard .filter-button {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: #263244;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  height: 34px;
  min-width: 68px;
  padding: 0 10px;
}

.wifi-dashboard .filter-button:hover {
  border-color: #8fa5c6;
}

.wifi-dashboard .filter-button.active {
  background: #152033;
  border-color: #152033;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(21, 32, 51, 0.18);
}

.wifi-dashboard .week-grid .filter-button {
  align-items: center;
  display: inline-flex;
  flex-direction: column;
  height: 48px;
  justify-content: center;
  line-height: 1.1;
  min-width: 116px;
  padding: 4px 10px;
}

.wifi-dashboard .week-code {
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.wifi-dashboard .week-date {
  color: #6b7890;
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  margin-top: 3px;
  white-space: nowrap;
}

.wifi-dashboard .filter-button.active .week-date {
  color: rgba(255, 255, 255, 0.76);
}

.wifi-dashboard .week-grid .filter-button.active {
  left: 0;
  position: sticky;
  z-index: 2;
}

.wifi-dashboard .page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  position: sticky;
  top: 68px;
  z-index: 6;
}

.wifi-dashboard .page-button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #415066;
  font-size: 12.5px;
  font-weight: 800;
  min-height: 34px;
  padding: 7px 11px;
  position: relative;
  transition: background 150ms ease, color 150ms ease;
}

.wifi-dashboard .page-button:hover {
  background: #f1f7fb;
  color: #172338;
}

.wifi-dashboard .page-button.active {
  background: #e8f7f3;
  border-color: #bce5d9;
  color: #0e5f55;
}

.wifi-dashboard .page-button.active::after {
  background: #17b96c;
  border-radius: 2px;
  bottom: 2px;
  content: "";
  height: 3px;
  left: 8px;
  position: absolute;
  right: 8px;
}

.wifi-dashboard .wifi-content {
  display: grid;
  gap: 18px;
}

.wifi-dashboard .grid {
  display: grid;
  gap: 18px;
}

.wifi-dashboard .grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wifi-dashboard .grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wifi-dashboard .grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wifi-dashboard .panel {
  animation: wifi-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  min-width: 0;
  padding: 16px;
}

.wifi-dashboard .grid .panel:nth-child(2) { animation-delay: 80ms; }

.wifi-dashboard .panel-header {
  align-items: baseline;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.wifi-dashboard .panel-title {
  color: #263244;
  font-size: 17px;
  font-weight: 900;
  margin: 0;
}

.wifi-dashboard .panel-subtitle {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.wifi-dashboard .kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.wifi-dashboard .kpi-card {
  --accent: var(--blue);
  --accent-soft: #eaf3ff;
  animation: wifi-rise 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  background:
    linear-gradient(135deg, var(--accent-soft), #ffffff 72%),
    #ffffff;
  border: 1px solid rgba(135, 153, 180, 0.28);
  border-left: 5px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(32, 47, 71, 0.08);
  color: var(--text);
  container-type: inline-size;
  display: grid;
  gap: 2px;
  min-height: 116px;
  overflow: hidden;
  padding: 13px 16px 12px;
  position: relative;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.wifi-dashboard .kpi-card:nth-child(2) { animation-delay: 60ms; }
.wifi-dashboard .kpi-card:nth-child(3) { animation-delay: 120ms; }
.wifi-dashboard .kpi-card:nth-child(4) { animation-delay: 180ms; }

.wifi-dashboard .kpi-card:hover {
  box-shadow: 0 14px 34px rgba(32, 47, 71, 0.15);
  transform: translateY(-2px);
}

.wifi-dashboard .kpi-card.green {
  --accent: #16a85c;
  --accent-soft: #e8fbef;
}

.wifi-dashboard .kpi-card.orange {
  --accent: #e46f3d;
  --accent-soft: #fff0e7;
}

.wifi-dashboard .kpi-card.yellow {
  --accent: #c7a000;
  --accent-soft: #fff8d7;
}

.wifi-dashboard .kpi-card.blue {
  --accent: #1769e0;
  --accent-soft: #eaf3ff;
}

.wifi-dashboard .kpi-card.purple {
  --accent: #6e56cf;
  --accent-soft: #f1edff;
}

.wifi-dashboard .kpi-card.red {
  --accent: #d94c61;
  --accent-soft: #fff0f2;
}

.wifi-dashboard .kpi-name {
  color: #203047;
  font-size: clamp(13px, 6cqw, 16px);
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.wifi-dashboard .kpi-value {
  animation: wifi-count 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
  color: #162236;
  font-size: clamp(30px, 15cqw, 44px);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  margin: 5px 0 4px;
}

.wifi-dashboard .kpi-foot {
  align-items: center;
  color: #526178;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  justify-content: space-between;
}

.wifi-dashboard .kpi-foot span:last-child {
  color: #1d2b42;
}

.wifi-dashboard .kpi-delta {
  align-items: center;
  border-radius: 4px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 2px;
  padding: 1px 6px;
}

.wifi-dashboard .kpi-delta.up {
  background: #fef2f2;
  color: #b91c1c;
}

.wifi-dashboard .kpi-delta.down {
  background: #ecfdf5;
  color: #047857;
}

.wifi-dashboard .kpi-delta.flat {
  background: #f5f7fa;
  color: #64748b;
}

.wifi-dashboard .kpi-sparkline {
  display: block;
  height: 28px;
  margin-top: 4px;
  opacity: 0.5;
  width: 100%;
}

.wifi-dashboard .kpi-card:hover .kpi-sparkline {
  opacity: 0.85;
}

.wifi-dashboard .util-meter {
  background: rgba(32, 47, 71, 0.1);
  border-radius: 999px;
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  position: relative;
}

.wifi-dashboard .util-meter span {
  border-radius: 999px;
  display: block;
  height: 100%;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.wifi-dashboard .util-meter .meter-ok { background: #22c55e; }
.wifi-dashboard .util-meter .meter-warn { background: #eab308; }
.wifi-dashboard .util-meter .meter-crit { background: #ef4444; }

.wifi-dashboard .table-wrap {
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 430px;
  overflow: auto;
}

.wifi-dashboard table {
  border-collapse: collapse;
  font-size: 12px;
  min-width: 760px;
  width: 100%;
}

.wifi-dashboard table.compact-table {
  min-width: 360px;
}

.wifi-dashboard .fit-table-wrap {
  overflow-x: hidden;
  overflow-y: auto;
}

.wifi-dashboard table.fit-table {
  min-width: 0;
  table-layout: fixed;
}

.wifi-dashboard table.bras-interface-table th,
.wifi-dashboard table.bras-interface-table td {
  padding: 8px 8px;
}

.wifi-dashboard table.bras-interface-table th:nth-child(1),
.wifi-dashboard table.bras-interface-table td:nth-child(1) {
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 36%;
}

.wifi-dashboard table.bras-interface-table th:nth-child(2),
.wifi-dashboard table.bras-interface-table td:nth-child(2) {
  width: 18%;
}

.wifi-dashboard table.bras-interface-table th:nth-child(3),
.wifi-dashboard table.bras-interface-table td:nth-child(3) {
  width: 16%;
}

.wifi-dashboard table.bras-interface-table th:nth-child(4),
.wifi-dashboard table.bras-interface-table td:nth-child(4) {
  width: 30%;
}

.wifi-dashboard th {
  background: #eef4fb;
  color: #2d3748;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.01em;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  z-index: 1;
}

.wifi-dashboard th,
.wifi-dashboard td {
  border-bottom: 1px solid #e5edf5;
  padding: 9px 10px;
  text-align: left;
  white-space: nowrap;
}

.wifi-dashboard td {
  color: #263244;
}

.wifi-dashboard td.numeric,
.wifi-dashboard th.numeric {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.wifi-dashboard tr:nth-child(even) td {
  background: #fafcff;
}

.wifi-dashboard tr:hover td {
  background: #f0f5fb;
}

.wifi-dashboard .util-cell {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.wifi-dashboard table.bras-interface-table .util-cell {
  gap: 6px;
}

.wifi-dashboard .util-cell-bar {
  background: #e8eef6;
  border-radius: 3px;
  flex: 0 0 60px;
  height: 8px;
  overflow: hidden;
}

.wifi-dashboard table.bras-interface-table .util-cell-bar {
  flex: 0 0 46px;
}

.wifi-dashboard .util-cell-bar span {
  border-radius: 3px;
  display: block;
  height: 100%;
}

.wifi-dashboard .util-ok { background: #22c55e; }
.wifi-dashboard .util-warn { background: #eab308; }
.wifi-dashboard .util-crit { background: #ef4444; }

.wifi-dashboard .chart {
  min-height: 340px;
  position: relative;
  width: 100%;
}

.wifi-dashboard .chart-expandable {
  border-radius: 6px;
  cursor: zoom-in;
  outline: none;
  transition: background 150ms ease, box-shadow 150ms ease;
}

.wifi-dashboard .chart-expandable:hover {
  background: rgba(23, 105, 224, 0.025);
}

.wifi-dashboard .chart-expandable:focus-visible {
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.2);
}

.wifi-dashboard .chart svg {
  display: block;
  height: auto;
  width: 100%;
}

body.chart-modal-open {
  overflow: hidden;
}

.chart-modal {
  align-items: center;
  display: none;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 1200;
}

.chart-modal.is-open {
  display: flex;
}

.chart-modal-backdrop {
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(4px);
  inset: 0;
  position: absolute;
}

.chart-modal-dialog {
  background: #ffffff;
  border: 1px solid #cbd7e7;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.34);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
  max-width: 1500px;
  overflow: hidden;
  position: relative;
  width: min(94vw, 1500px);
  z-index: 1;
}

.chart-modal-header {
  align-items: center;
  border-bottom: 1px solid #dce5f0;
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between;
  min-height: 58px;
  padding: 12px 16px 12px 22px;
}

.chart-modal-header h2 {
  color: #152033;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
}

.chart-modal-close {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  font-size: 32px;
  height: 38px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 38px;
}

.chart-modal-close:hover,
.chart-modal-close:focus-visible {
  background: #eef3f8;
  color: #152033;
  outline: none;
}

.chart-modal-body {
  min-height: 0;
  overflow: auto;
  padding: 16px 22px 22px;
}

.chart-modal-chart {
  min-height: min(72vh, 760px);
  position: relative;
  width: 100%;
}

.chart-modal-chart svg {
  display: block;
  height: min(72vh, 760px);
  width: 100%;
}

html[data-theme='dark'] .chart-modal-dialog {
  background: #111827;
  border-color: #334155;
}

html[data-theme='dark'] .chart-modal-header {
  border-color: #334155;
}

html[data-theme='dark'] .chart-modal-header h2,
html[data-theme='dark'] .chart-modal-close {
  color: #e2e8f0;
}

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

  .chart-modal-dialog {
    max-height: calc(100vh - 16px);
    width: calc(100vw - 16px);
  }

  .chart-modal-header {
    min-height: 50px;
    padding: 8px 10px 8px 14px;
  }

  .chart-modal-header h2 {
    font-size: 16px;
  }

  .chart-modal-body {
    padding: 10px;
  }
}

.wifi-dashboard .axis {
  fill: #64748b;
  font-size: 12px;
}

.wifi-dashboard .grid-line {
  stroke: #dce5f0;
  stroke-dasharray: 1 6;
}

.wifi-dashboard .series-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.wifi-dashboard .series-area {
  opacity: 0.12;
}

.wifi-dashboard .series-dot {
  stroke: #ffffff;
  stroke-width: 1.5;
  transition: r 100ms ease, stroke-width 100ms ease;
}

.wifi-dashboard .series-hit {
  cursor: crosshair;
  fill: transparent;
  outline: none;
  pointer-events: all;
}

.wifi-dashboard .series-dot:has(+ .series-hit.is-active) {
  r: 7;
  stroke-width: 2.5;
}

.wifi-dashboard .hover-line {
  opacity: 0;
  pointer-events: none;
  stroke: #1e293b;
  stroke-dasharray: 4 5;
  stroke-width: 1;
}

.wifi-dashboard .hover-line.is-active {
  opacity: 0.28;
}

.wifi-dashboard .peak-label {
  fill: #1e293b;
  font-size: 10px;
  font-weight: 800;
}

html[data-theme='dark'] .wifi-dashboard .peak-label {
  fill: #e2e8f0;
}

.wifi-dashboard .peak-ring {
  fill: none;
  stroke-dasharray: 3 2;
  stroke-width: 1.5;
}

.wifi-dashboard .chart-tooltip {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #cfd9e8;
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(17, 24, 39, 0.2);
  color: #253044;
  font-size: 12px;
  left: 0;
  opacity: 0;
  padding: 10px 12px;
  pointer-events: none;
  position: absolute;
  top: 0;
  transition: opacity 90ms ease;
  z-index: 3;
}

.wifi-dashboard .chart-tooltip.is-visible {
  opacity: 1;
}

.wifi-dashboard .tooltip-week {
  color: var(--navy);
  font-weight: 900;
  margin-bottom: 8px;
}

.wifi-dashboard .tooltip-row {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  line-height: 1.45;
}

.wifi-dashboard .tooltip-row span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wifi-dashboard .tooltip-row strong {
  font-variant-numeric: tabular-nums;
}

.wifi-dashboard .tooltip-dot {
  border-radius: 999px;
  height: 9px;
  width: 9px;
}

.wifi-dashboard .legend {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 700;
  gap: 12px;
  margin-bottom: 10px;
}

.wifi-dashboard .legend-item {
  align-items: center;
  display: flex;
  gap: 6px;
}

.wifi-dashboard .legend-dot {
  border-radius: 999px;
  height: 10px;
  width: 10px;
}

.wifi-dashboard .bar-row {
  align-items: center;
  color: #3a4658;
  display: grid;
  font-size: 13px;
  gap: 12px;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr) 64px;
  margin: 10px 0;
}

.wifi-dashboard .bar-track {
  background: #eef4fb;
  border-radius: 5px;
  height: 24px;
  overflow: hidden;
}

.wifi-dashboard .bar-fill {
  border-radius: 5px 0 0 5px;
  height: 100%;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.wifi-dashboard .bar-label {
  color: #4b5c73;
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wifi-dashboard .bar-track-wrap {
  position: relative;
}

.wifi-dashboard .bar-threshold {
  border-left: 2px dashed #ef4444;
  height: 100%;
  position: absolute;
  top: 0;
  z-index: 1;
}

.wifi-dashboard .bar-threshold-label {
  color: #ef4444;
  font-size: 9px;
  font-weight: 800;
  position: absolute;
  top: -14px;
}

.wifi-dashboard .empty {
  background: #fbfdff;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  padding: 28px;
}

html[data-theme='dark'] body[data-active='wifi'] .content {
  background:
    radial-gradient(circle at 18% 0%, rgba(59, 130, 246, 0.12), transparent 28rem),
    linear-gradient(180deg, #0e1624 0%, #101826 100%);
}

html[data-theme='dark'] body[data-active='wifi'] .report-status,
html[data-theme='dark'] body[data-active='wifi'] .report-host {
  background: #151f31;
  border-color: #2d3a51;
  color: #cbd5e1;
}

html[data-theme='dark'] .wifi-dashboard {
  --surface: rgba(18, 27, 43, 0.94);
  --surface-solid: #121b2b;
  --surface-soft: #1c283b;
  --border: #29364b;
  --border-strong: #43526a;
  --text: #e5eaf2;
  --muted: #a2afc2;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

html[data-theme='dark'] .wifi-dashboard h1 {
  color: #9db6ff;
}

html[data-theme='dark'] .wifi-dashboard .summary-item,
html[data-theme='dark'] .wifi-dashboard .filter-button,
html[data-theme='dark'] .wifi-dashboard .kpi-card,
html[data-theme='dark'] .wifi-dashboard .empty {
  background: #151f31;
  border-color: #29364b;
}

html[data-theme='dark'] .wifi-dashboard .kpi-card.green {
  background: linear-gradient(135deg, rgba(22, 168, 92, 0.22), #151f31 68%);
  border-left-color: #22c55e;
}

html[data-theme='dark'] .wifi-dashboard .kpi-card.orange {
  background: linear-gradient(135deg, rgba(228, 111, 61, 0.24), #151f31 68%);
  border-left-color: #f97316;
}

html[data-theme='dark'] .wifi-dashboard .kpi-card.yellow {
  background: linear-gradient(135deg, rgba(199, 160, 0, 0.22), #151f31 68%);
  border-left-color: #eab308;
}

html[data-theme='dark'] .wifi-dashboard .kpi-card.blue {
  background: linear-gradient(135deg, rgba(23, 105, 224, 0.22), #151f31 68%);
  border-left-color: #3b82f6;
}

html[data-theme='dark'] .wifi-dashboard .kpi-card.purple {
  background: linear-gradient(135deg, rgba(110, 86, 207, 0.22), #151f31 68%);
  border-left-color: #8b5cf6;
}

html[data-theme='dark'] .wifi-dashboard .kpi-card.red {
  background: linear-gradient(135deg, rgba(217, 76, 97, 0.24), #151f31 68%);
  border-left-color: #ef4444;
}

html[data-theme='dark'] .wifi-dashboard .hero-chip {
  background: #1c283b;
  border-color: #29364b;
  color: #cbd5e1;
}

html[data-theme='dark'] .wifi-dashboard .hero-chip.warn {
  background: rgba(249, 115, 22, 0.15);
  border-color: rgba(249, 115, 22, 0.3);
  color: #fdba74;
}

html[data-theme='dark'] .wifi-dashboard .hero-chip.ok {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.25);
  color: #86efac;
}

html[data-theme='dark'] .wifi-dashboard .kpi-delta.up {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

html[data-theme='dark'] .wifi-dashboard .kpi-delta.down {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

html[data-theme='dark'] .wifi-dashboard .kpi-delta.flat {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
}

html[data-theme='dark'] .wifi-dashboard tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme='dark'] .wifi-dashboard .util-cell-bar {
  background: #29364b;
}

html[data-theme='dark'] .wifi-dashboard .bar-track {
  background: #1c283b;
}

html[data-theme='dark'] .wifi-dashboard label,
html[data-theme='dark'] .wifi-dashboard .summary-item strong,
html[data-theme='dark'] .wifi-dashboard .panel-title,
html[data-theme='dark'] .wifi-dashboard .kpi-name,
html[data-theme='dark'] .wifi-dashboard .kpi-value,
html[data-theme='dark'] .wifi-dashboard .kpi-foot span:last-child,
html[data-theme='dark'] .wifi-dashboard th,
html[data-theme='dark'] .wifi-dashboard td {
  color: var(--text);
}

html[data-theme='dark'] .wifi-dashboard .page-button {
  color: #d7deea;
}

html[data-theme='dark'] .wifi-dashboard .page-button:hover {
  background: #223047;
}

html[data-theme='dark'] .wifi-dashboard .page-button.active {
  background: #dff5ee;
  border-color: #b9ead9;
  color: #123b37;
}

html[data-theme='dark'] .wifi-dashboard th,
html[data-theme='dark'] .wifi-dashboard tr:nth-child(even) td {
  background: var(--surface-soft);
}

html[data-theme='dark'] .wifi-dashboard .table-wrap,
html[data-theme='dark'] .wifi-dashboard th,
html[data-theme='dark'] .wifi-dashboard td {
  border-color: #29364b;
}

html[data-theme='dark'] .wifi-dashboard .clear-filter-button {
  border-color: #43526a;
  color: #cbd5e1;
}

@media (max-width: 1200px) {
  .wifi-dashboard .wifi-hero,
  .wifi-dashboard .filters {
    grid-template-columns: 1fr;
  }

  .wifi-dashboard .kpi-grid,
  .wifi-dashboard .grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wifi-dashboard .grid.two,
  .wifi-dashboard .grid.three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body[data-active='wifi'] .report-status,
  body[data-active='wifi'] .report-host {
    display: none;
  }

  .wifi-dashboard h1 {
    font-size: 24px;
  }

  .wifi-dashboard .wifi-hero,
  .wifi-dashboard .panel,
  .wifi-dashboard .page-nav {
    padding: 14px;
  }

  .wifi-dashboard .report-summary,
  .wifi-dashboard .kpi-grid,
  .wifi-dashboard .grid.four {
    grid-template-columns: 1fr;
  }

  .wifi-dashboard .page-nav {
    top: 60px;
  }

  .wifi-dashboard .filter-group-year {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .wifi-dashboard .clear-filter-button {
    grid-column: 2;
    justify-self: start;
  }
}
