@media screen {
  html[data-billing-theme="dark"] {
    --billing-bg: #0c101e;
    --billing-panel: #101526;
    --billing-raised: #151c31;
    --billing-input: #0d1425;
    --billing-border: #293653;
    --billing-text: #edf2ff;
    --billing-muted: #aab8d1;
    --billing-link: #96b3ff;
  }

  html[data-billing-theme="dark"] body,
  html[data-billing-theme="dark"] body #app-workspace {
    --glass-panel: #101526;
    --glass-raised: #151c31;
    --glass-dialog: #12192c;
    --glass-border: #293653;
    --glass-shadow: 0 6px 20px #04071438;
  }

  html[data-billing-theme="dark"] body #app-workspace {
    --dash-header-control: #151c31;
    --dash-header-edge: #293653;
    --dash-header-meter: #0d1425;
  }

  html[data-billing-theme="dark"] body #app-workspace:has(> header.app-dashboard-header) {
    background: radial-gradient(ellipse at 84% 0%, #1c2750 0, transparent 46%), #0c101e !important;
  }

  html[data-billing-theme="dark"] body #app-workspace:has(> header.app-dashboard-header)::before {
    background:
      radial-gradient(circle, #678fff55 1px, transparent 2px) 0 0 / 118px 118px,
      repeating-linear-gradient(155deg, transparent 0 88px, #678fff11 89px 90px, transparent 91px 176px),
      repeating-linear-gradient(28deg, transparent 0 132px, #678fff10 133px 134px, transparent 135px 268px);
  }

  html[data-billing-theme="dark"] body :is(#app-sidebar, #app-sidebar .app-sidebar-head) {
    background: #0f1424 !important;
    border-color: #293653 !important;
  }

  html[data-billing-theme="dark"] body #app-sidebar .app-nav-link:is(.active, [aria-current="page"]) {
    background: #1d294c !important;
    color: #eef3ff !important;
    box-shadow: inset 3px 0 #7399ff;
  }

  html[data-billing-theme="dark"] body #app-workspace :is(.app-workspace-header,.dp-overview) {
    box-shadow: 0 6px 20px #04071438;
  }
}

@media screen {
  html[data-billing-theme="dark"] body #app-workspace {
    background:
      radial-gradient(ellipse at 84% 0%, #1b2850 0, transparent 42rem),
      #0c101e;
    --glass-banner: #152348;
  }

  html[data-billing-theme="dark"] body #app-sidebar .app-nav-group .app-nav-link {
    color: #becbe2;
    border-color: transparent;
  }

  html[data-billing-theme="dark"] body #app-sidebar .app-nav-group .app-nav-link:hover {
    background: #17223c !important;
    color: #edf2ff !important;
  }

  html[data-billing-theme="dark"] body #app-sidebar .app-nav-group .app-nav-link[aria-current="page"] {
    background: #1b2748 !important;
    color: #edf2ff !important;
    border-color: #344973 !important;
  }

  html[data-billing-theme="dark"] body #app-workspace :is(
    .app-workspace-header, .dp-box, .panel, .iv-panel, .map-topology-tree
  ) {
    border-radius: 12px;
  }

  html[data-billing-theme="dark"] body #app-workspace :is(th, thead) {
    background: #172039 !important;
    color: #d5e1fb !important;
  }

  html[data-billing-theme="dark"] body #app-workspace tbody tr:hover > td {
    background-color: #19243c;
  }

  html[data-billing-theme="dark"] body #app-workspace :is(
    .dp-btn, .iv-btn, .cm-btn, .pm-btn, .nm-button, .um-btn
  ).primary {
    background: #334eb5 !important;
    border-color: #5874d5 !important;
    color: #fff !important;
  }

  html[data-billing-theme="dark"] body #app-workspace :is(
    a, button, input, select, textarea, summary, [tabindex]
  ):focus-visible {
    outline: 2px solid #87a9ff;
    outline-offset: 2px;
  }

  html[data-billing-theme="dark"] body #app-workspace dialog::backdrop {
    background: #050815c9;
  }
}

@media screen {
  html[data-billing-theme="dark"] body #app-workspace .dp-summary .dp-stat {
    --kpi-accent: #6ee7ff;
    --kpi-rgb: 61 206 238;
    background: linear-gradient(rgb(var(--kpi-rgb) / .10), rgb(var(--kpi-rgb) / .04)), #0e1626 !important;
    border: 1px solid rgb(var(--kpi-rgb) / .30) !important;
    border-radius: 12px;
    transition: border-color .15s ease;
  }
  html[data-billing-theme="dark"] body #app-workspace .dp-summary .dp-stat.green { --kpi-accent: #8aefba; --kpi-rgb: 96 225 155; }
  html[data-billing-theme="dark"] body #app-workspace .dp-summary .dp-stat.amber { --kpi-accent: #ffd268; --kpi-rgb: 239 174 54; }
  html[data-billing-theme="dark"] body #app-workspace .dp-summary .dp-stat:is(.red, [data-ppp-kpi="offline"]) { --kpi-accent: #ff9da8; --kpi-rgb: 247 108 127; }
  html[data-billing-theme="dark"] body #app-workspace .dp-summary .dp-stat:hover {
    border-color: rgb(var(--kpi-rgb) / .65) !important;
  }
  html[data-billing-theme="dark"] body #app-workspace .dp-summary .dp-stat :is(strong, small:first-child) {
    color: var(--kpi-accent) !important;
  }
  html[data-billing-theme="dark"] body #app-workspace .dp-summary .dp-stat strong {
    font-variant-numeric: tabular-nums;
  }
  @media (prefers-reduced-motion: reduce) {
    html[data-billing-theme="dark"] body #app-workspace .dp-summary .dp-stat { transition: none; }
  }
}


@media screen {
  html[data-billing-theme="dark"] body #app-workspace .dp-summary .dp-strip .dp-stat {
    background: rgb(var(--kpi-rgb) / .09) !important;
    border-color: rgb(var(--kpi-rgb) / .30) !important;
  }

  html[data-billing-theme="dark"] body #app-workspace .dp-summary .dp-strip .dp-stat > div > small {
    color: var(--kpi-accent) !important;
    font-weight: 650;
  }

  html[data-billing-theme="dark"] body #app-workspace .dp-summary .dp-strip .dp-stat > div > strong {
    color: #f0f5ff !important;
    font-weight: 750;
  }
}

