/* Night theme: neutral surfaces keep the network and its state in focus.
   Loaded last; light mode and existing dashboard structure stay intact. */
body[data-theme="dark"] {
  --night-bg:#15171b; --night-panel:#202329; --night-raised:#292d34;
  --night-line:#363b44; --night-text:#edf0f4; --night-muted:#a9b1bd;
  --night-accent:#83cbd1;
  --page-bg:var(--night-bg); --nav:#1a1d22; --card-head:var(--night-panel);
  --line:var(--night-line); --text:var(--night-text); --muted:var(--night-muted);
  --cyan:var(--night-accent); --nav-muted:var(--night-muted);
  --family-surface:var(--night-panel); --family-ink:var(--night-text);
  --family-muted:var(--night-muted); --family-border:var(--night-line); --family-accent:var(--night-accent);
}
body[data-theme="dark"] :is(.admin-frame,.admin-body,.main,.router-home,.content-area,.minimal-home) { background:var(--night-bg); }
body[data-theme="dark"] :is(.admin-topbar,.sidebar) { background:#1a1d22; border-color:#30343c; }
body[data-theme="dark"] :is(.card,.home-summary,.home-status-grid,.family-shortcuts,.home-shortcuts,.travel-setting,.travel-links button,.travel-detail-panel,.travel-detail-head) { background:var(--night-panel); border-color:var(--night-line); box-shadow:none; }
body[data-theme="dark"] :is(.card-head,.section-head) { background:transparent; border-color:var(--night-line); }
body[data-theme="dark"] .home-status-card { background:transparent; box-shadow:none; }
body[data-theme="dark"] :is(.gl-logo,.panel-title,.card h2,.card h3,.router-node strong,.vpn-home-state strong,.travel-device h2,.travel-setting h2,.travel-links strong,.travel-device-metrics dd) { color:var(--night-text); }
body[data-theme="dark"] :is(.card p,.card small,.router-node small,.travel-caption,.travel-device p,.travel-setting p,.travel-links small,.travel-footer,.travel-device-metrics dt) { color:var(--night-muted); }
body[data-theme="dark"] .home-status-card.attention strong { color:#e0b575; }
body[data-theme="dark"] .menu-item { color:#a9b1bd; font-weight:500; }
body[data-theme="dark"] .menu-item.active { background:#2c363d; color:#a3dce0; box-shadow:inset 3px 0 #83cbd1; }
body[data-theme="dark"] .menu-item:hover { background:#282d34; color:#edf0f4; }
body[data-theme="dark"] .dynamic-topology[data-topology-panel="single"] { background:#202329; }
body[data-theme="dark"] :is(.topology-uplink-list > div,.topology-uplink-list > button,.router-node,.client-summary-node.wifi,.client-summary-node.lan,.vpn-home-metrics span) { background:#272b32; border-color:#3b424d; box-shadow:none; }
body[data-theme="dark"] .topology-uplink-list > div.is-active { background:#293335; border-color:#577578; }
body[data-theme="dark"] .topology-uplink-list strong { color:#d6dce4; }
body[data-theme="dark"] .topology-uplink-list small { color:#a9b1bd; }
body[data-theme="dark"] :is(.topology-uplink-list i,.topology-uplink-list .is-active i,.vpn-home-icon,.quick-icon,.travel-setting-icon,.travel-link-icon) { color:#a0cdd2; background:#303942; border:0; border-radius:8px; }
body[data-theme="dark"] :is(.client-summary-node.wifi strong,.client-summary-node.lan strong,.topology-live-rate b,.vpn-home-metrics strong) { color:#dce7ec; }
body[data-theme="dark"] .client-summary-node span { color:#b6c0cb; }
body[data-theme="dark"] :is(.router-node-label,.vpn-home-state b,.panel-title small,.travel-bands span) { color:#a7d8df; background:#303b45; border-color:#414e5a; }
body[data-theme="dark"] .router-node img { mix-blend-mode:normal; filter:none; background:#e4e7ea; border-radius:8px; padding:8px; }
body[data-theme="dark"] .travel-device { background:#23282f; border-color:#3a434e; }
body[data-theme="dark"] .travel-device img { mix-blend-mode:normal; filter:none; border-radius:12px; background:#fff; }
body[data-theme="dark"] :is(.travel-device-metrics,.travel-device-metrics div,.router-node .topology-live-rate) { border-color:#424952; }
body[data-theme="dark"] :is(.home-shortcuts button,.backup-wan-body button,.family-dismiss,.secondary-action) { color:#d2d9e2; background:#2a3038; border-color:#46515e; }
body[data-theme="dark"] :is(.home-shortcuts button,.backup-wan-body button,.family-dismiss,.secondary-action):hover { background:#363f49; border-color:#8399aa; }
body[data-theme="dark"] :is(.card-head button:not(.active),.family-activity button,.travel-footer button,.travel-setting button) { color:#a0d5dd; }
body[data-theme="dark"] .family-primary { color:#172125; background:#95ced3; border-color:#95ced3; font-weight:600; }
body[data-theme="dark"] .family-primary:hover { background:#b0dfe3; }
body[data-theme="dark"] :is(.topology-switch,.experience-switch) { background:#171b20; border-color:#3b424c; }
body[data-theme="dark"] :is(.topology-switch button.active,.experience-switch button.active) { background:#35424c; color:#c5e7eb; }
body[data-theme="dark"] :is(button,a,input,select):focus-visible { outline:2px solid #a0d5dd; outline-offset:3px; }
body[data-theme="dark"] .topology-line.online { background:#659498; }
body[data-theme="dark"] .topology-line.online::after { animation:none; }
body[data-theme="dark"] .theme-toggle { background:#303b45; border-color:#46515e; }
body[data-theme="dark"] .tool.palette::before { background:#303b45; }
body[data-theme="dark"][data-experience="minimal"][data-travel-nav]:not([data-travel-advanced="true"]) .minimal-nav { background:#1a1d22; border-color:#363b44; }
body[data-theme="dark"][data-experience="minimal"][data-travel-nav]:not([data-travel-advanced="true"]) .minimal-nav button { color:#a9b1bd; }
body[data-theme="dark"][data-experience="minimal"][data-travel-nav]:not([data-travel-advanced="true"]) .minimal-nav button.active { background:#303b45; color:#b4dde3; }
