/* Upstream Dark Glass brightness/blur are set in the renderer; DOM text stays crisp. */
html:not(.light-mode)[data-hwc-glass-preference="on"] {
  --hwc-dark-glass:rgba(8,25,44,.68);
  --hwc-dark-rim:rgba(180,221,255,.24);
}
html:not(.light-mode)[data-hwc-glass-preference="on"] body,
html:not(.light-mode)[data-hwc-glass-preference="on"] body.portal-body {
  isolation:isolate;
  background:#061421 url('../img/glass-scene-dark.svg?v=20261102_v1') center / cover fixed !important;
}
html:not(.light-mode)[data-hwc-glass-preference="on"] body :is(.portal-wrapper,.dashboard-layout,.dashboard-main) { background:transparent !important; }
html:not(.light-mode)[data-hwc-glass-preference="on"] body .dashboard-main { box-shadow:none !important; backdrop-filter:none; -webkit-backdrop-filter:none; }
html:not(.light-mode)[data-hwc-glass-preference="on"] body :is(.portal-sidebar,.sa-card,.agent-table-card,.premium-card,.hero-glass,.login-container,.card),
html:not(.light-mode)[data-hwc-glass-preference="on"] body .overview-dashboard :is(.overview-card,.overview-metric,.overview-header,.overview-progress-card) {
  background:linear-gradient(130deg,rgba(100,142,179,.12),rgba(7,21,38,.15) 55%),var(--hwc-dark-glass) !important;
  border-color:var(--hwc-dark-rim) !important;
  box-shadow:inset 0 1px 0 rgba(225,244,255,.22),inset 0 -1px 0 rgba(3,11,24,.7),0 12px 30px rgba(0,0,0,.28) !important;
  backdrop-filter:blur(18px) saturate(125%) !important;
  -webkit-backdrop-filter:blur(18px) saturate(125%) !important;
}
html:not(.light-mode)[data-hwc-glass-preference="on"] body .overview-dashboard { --overview-surface:rgba(8,25,44,.68); --overview-raised:rgba(16,40,63,.8); --overview-hover:#14344e; }
html:not(.light-mode)[data-hwc-glass-preference="on"] body .overview-dashboard .overview-metric { border-top-color:var(--metric-color) !important; }
html:not(.light-mode)[data-hwc-glass-preference="on"] body .overview-dashboard .overview-header { border-inline-start-color:var(--overview-brand) !important; }
html:not(.light-mode)[data-hwc-glass-preference="on"] body header.navbar { background:rgba(6,22,39,.72) !important; border-bottom:1px solid var(--hwc-dark-rim) !important; backdrop-filter:blur(22px) saturate(135%) !important; -webkit-backdrop-filter:blur(22px) saturate(135%) !important; }
html:not(.light-mode) body .hwc-glass-toggle { display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; min-width:40px; min-height:40px; flex:0 0 40px; padding:0; border:1px solid #476580; border-radius:50%; background:rgba(12,35,57,.8); color:#dceeff; cursor:pointer; }
html:not(.light-mode) body .hwc-glass-toggle[aria-pressed="true"] { border-color:#67c5dc; color:#a5f3fc; }
/* Menus and fields remain more opaque than display cards. */
html:not(.light-mode)[data-hwc-glass-preference="on"] body :is(.custom-modal,.agent-modal-content,.nav-dropdown-menu,.custom-select-options,.menu-panel) { background:rgba(8,25,44,.97) !important; }
@media(max-width:992px) {
  html:not(.light-mode)[data-hwc-glass-preference="on"] body { background-attachment:scroll !important; }
  html:not(.light-mode)[data-hwc-glass-preference="on"] body .overview-dashboard :is(.overview-card,.overview-metric,.overview-header,.overview-progress-card) { backdrop-filter:blur(8px) !important; -webkit-backdrop-filter:blur(8px) !important; }
}
@supports not (backdrop-filter:blur(1px)) {
  @supports not (-webkit-backdrop-filter:blur(1px)) { html:not(.light-mode)[data-hwc-glass-preference="on"] { --hwc-dark-glass:#0c213a; } }
}
@media(forced-colors:active) {
  html:not(.light-mode)[data-hwc-glass-preference="on"] body :is(.card,.hero-glass,.portal-sidebar,.sa-card,.premium-card,.login-container,.overview-card,.overview-metric,.overview-header,.overview-progress-card,.navbar) { background:Canvas !important; color:CanvasText !important; backdrop-filter:none !important; -webkit-backdrop-filter:none !important; }
}
