/*
 * Grafo Hospital · complete light-theme layer
 *
 * This stylesheet is intentionally scoped to `body.light-theme`. Load it after
 * the feature stylesheets so late dark-mode compatibility rules cannot leak
 * into the light experience.
 */

body.light-theme {
  --light-canvas: #dfe9ed;
  --light-canvas-deep: #c9d9df;
  --light-surface-1: rgba(252, 253, 253, .97);
  --light-surface-2: #f3f8f9;
  --light-surface-3: #e6f0f2;
  --light-surface-4: #d8e8eb;
  --light-ink: #153542;
  --light-copy: #294a59;
  --light-muted: #536d79;
  --light-dim: #6a808a;
  --light-line: rgba(43, 77, 94, .18);
  --light-line-strong: rgba(43, 77, 94, .29);
  --light-cyan: #087c8e;
  --light-cyan-soft: #d4ecef;
  --light-green: #13774f;
  --light-gold: #80620e;
  --light-red: #b83b35;
  --light-orange: #a85122;
  --light-purple: #6543ac;
  --light-shadow: 0 18px 48px rgba(31, 59, 72, .16);
  --ops-cyan: var(--light-cyan);
  --ops-gold: var(--light-gold);
  --ops-alert: var(--light-red);
  color-scheme: light;
}

/* Canvas, shell and floating chrome -------------------------------------- */
body.light-theme .map-stage {
  background:
    radial-gradient(circle at 57% 43%, #eef4f6 0, #dce8eb 48%, #bfd2d8 100%);
}

body.light-theme #mapCanvas {
  filter: brightness(.99) saturate(.98) contrast(1.07);
}

body.light-theme.buhara-mode #mapCanvas,
body.light-theme.exterior-mode #mapCanvas {
  filter: brightness(.98) saturate(1.02) contrast(1.09);
}

body.light-theme .map-wash {
  background:
    linear-gradient(90deg, rgba(209, 222, 227, .23), transparent 28%, transparent 72%, rgba(209, 222, 227, .23)),
    radial-gradient(circle at 55% 46%, transparent 38%, rgba(120, 151, 164, .16) 100%);
}

body.light-theme .map-title,
body.light-theme .map-trust,
body.light-theme .facility-kpis > div,
body.light-theme .map-compass,
body.light-theme .block-tabs,
body.light-theme .view-modes,
body.light-theme .floor-picker,
body.light-theme .map-controls,
body.light-theme .right-rail {
  border-color: var(--light-line);
  background: var(--light-surface-1);
  box-shadow: var(--light-shadow);
  color: var(--light-copy);
}

body.light-theme .map-title {
  border-left-color: var(--light-cyan);
  background: rgba(248, 252, 252, .84);
  box-shadow: 0 10px 28px rgba(31, 59, 72, .1);
}

body.light-theme .map-title h1 {
  color: var(--light-ink);
  text-shadow: 0 1px 0 #fff;
}

body.light-theme .map-title .eyebrow,
body.light-theme .map-trust b {
  color: var(--light-cyan);
}

body.light-theme .map-trust,
body.light-theme .map-title p,
body.light-theme .facility-kpis span,
body.light-theme .facility-kpis small,
body.light-theme .cursor-status,
body.light-theme .map-source {
  color: var(--light-muted);
}

body.light-theme .facility-kpis b {
  color: var(--light-gold);
}

body.light-theme :is(.block-tabs, .view-modes, .floor-picker) button {
  color: var(--light-muted);
}

body.light-theme :is(.block-tabs, .view-modes, .floor-picker) button:hover {
  background: #e3eff1;
  color: var(--light-cyan);
}

body.light-theme :is(.block-tabs, .view-modes, .floor-picker) button.active {
  border-color: rgba(8, 124, 142, .3);
  background: var(--light-cyan-soft);
  color: var(--light-cyan);
  box-shadow: inset 0 0 0 1px rgba(8, 124, 142, .11);
}

body.light-theme .map-controls button {
  background: transparent;
  color: var(--light-copy);
}

body.light-theme .map-controls button:hover,
body.light-theme .right-rail button:hover,
body.light-theme .right-rail button.active {
  background: #dcebed;
  color: var(--light-cyan);
}

body.light-theme .map-controls span {
  background: var(--light-line);
}

body.light-theme .brand-mark {
  color: #392e14;
}

body.light-theme .module-nav button:hover,
body.light-theme .header-actions .icon-button:hover,
body.light-theme .theme-toggle:hover {
  border-color: rgba(8, 124, 142, .28);
  background: #e3eff1;
  color: var(--light-cyan);
}

body.light-theme .system-stats {
  border-color: var(--light-line);
  color: var(--light-muted);
}

body.light-theme .system-stats b {
  color: var(--light-gold);
}

body.light-theme .ops-ticker {
  border-color: var(--light-line);
  background: #e4edef;
  color: var(--light-muted);
}

body.light-theme .ops-ticker b {
  color: var(--light-gold);
}

/* Route, search, device and layer panels --------------------------------- */
body.light-theme .search-results {
  border-color: var(--light-line);
  background: rgba(250, 253, 253, .99);
  box-shadow: 0 16px 38px rgba(31, 59, 72, .17);
}

body.light-theme .search-result {
  color: var(--light-copy);
}

body.light-theme .search-result:hover,
body.light-theme .search-result:focus {
  background: #dcebed;
  color: var(--light-ink);
}

body.light-theme .search-result small {
  color: var(--light-cyan);
}

body.light-theme .search-empty {
  color: var(--light-muted);
}

body.light-theme .route-profiles,
body.light-theme .route-conditions button,
body.light-theme .safety-actions button {
  border-color: var(--light-line);
  background: var(--light-surface-2);
  color: var(--light-muted);
}

body.light-theme .route-profiles button {
  color: var(--light-muted);
}

body.light-theme .route-profiles button:hover,
body.light-theme .route-profiles button.active {
  background: var(--light-cyan-soft);
  color: var(--light-cyan);
  box-shadow: inset 0 0 0 1px rgba(8, 124, 142, .16);
}

body.light-theme .route-conditions button:hover,
body.light-theme .safety-actions button:hover {
  border-color: rgba(8, 124, 142, .25);
  background: #e0edef;
  color: var(--light-copy);
}

body.light-theme .route-conditions button.active {
  border-color: rgba(165, 89, 24, .3);
  background: #f6ead8;
  color: #8b541f;
}

body.light-theme .safety-actions b,
body.light-theme .notice p,
body.light-theme .steps-head h3 {
  color: var(--light-copy);
}

body.light-theme .safety-actions small,
body.light-theme .route-summary span,
body.light-theme .steps p,
body.light-theme .steps small,
body.light-theme .location-card span,
body.light-theme .disclaimer {
  color: var(--light-muted);
}

body.light-theme .notice {
  border-color: rgba(8, 124, 142, .17);
  background: #e8f4f3;
}

body.light-theme .layer-panel label {
  border-color: rgba(43, 77, 94, .09);
  color: var(--light-muted);
}

body.light-theme .layer-panel label:hover {
  background: #e4eff1;
  color: var(--light-copy);
}

body.light-theme .layer-panel strong,
body.light-theme .device-card dd,
body.light-theme .device-signal,
body.light-theme .iot-stream span,
body.light-theme .iot-stream small {
  color: var(--light-copy);
}

body.light-theme .device-card dt,
body.light-theme .telemetry-card span,
body.light-theme .telemetry-card small {
  color: var(--light-muted);
}

body.light-theme .device-route {
  border-color: rgba(8, 124, 142, .28);
  background: var(--light-cyan-soft);
  color: var(--light-cyan);
}

body.light-theme .device-route:hover {
  background: #c7e3e7;
}

body.light-theme .location-card.is-selecting {
  border-color: rgba(8, 124, 142, .5);
  background: #e1f0f2;
  box-shadow: 0 0 0 2px rgba(8, 124, 142, .09);
}

/* QR keeps the camera viewport dark but gives controls a light shell. */
body.light-theme .qr-dialog {
  border-color: rgba(8, 124, 142, .24);
  background: #f7fbfb;
  color: var(--light-ink);
  box-shadow: 0 30px 90px rgba(21, 52, 64, .28);
}

body.light-theme .qr-dialog::backdrop {
  background: rgba(30, 55, 66, .38);
}

body.light-theme .qr-dialog p,
body.light-theme .qr-dialog label {
  color: var(--light-muted);
}

body.light-theme .qr-close {
  color: var(--light-muted);
}

body.light-theme .qr-dialog input {
  border-color: var(--light-line);
  background: #fff;
  color: var(--light-ink);
}

body.light-theme .qr-apply {
  border-color: rgba(8, 124, 142, .28);
  background: var(--light-cyan-soft);
  color: var(--light-cyan);
}

body.light-theme .qr-camera > span {
  background: rgba(5, 12, 20, .86);
  color: #eef7f8;
}

body.light-theme.emergency-mode .map-stage {
  background: radial-gradient(circle at 58% 44%, #fff8f6 0, #f4e6e3 50%, #dfcecd 100%);
}

body.light-theme.emergency-mode .map-title h1 {
  color: #7e2926;
}

body.light-theme.emergency-mode #emergencyRoute,
body.light-theme .start-button.is-navigating {
  border-color: rgba(184, 59, 53, .3);
  background: #f4dfdc;
  color: var(--light-red);
}

/* Buhara --------------------------------------------------------------- */
body.light-theme .scheme-notice {
  border-color: rgba(165, 89, 24, .3);
  background: rgba(255, 246, 229, .96);
  color: #89501a;
  box-shadow: 0 10px 28px rgba(77, 54, 31, .12);
}

body.light-theme .buhara-panel,
body.light-theme .buhara-stack,
body.light-theme .active-floor-hud,
body.light-theme .buhara-panel-open {
  border-color: var(--light-line);
  background: var(--light-surface-1);
  box-shadow: var(--light-shadow);
}

body.light-theme .buhara-panel-head > b,
body.light-theme .buhara-panel-actions > b {
  border-color: rgba(8, 124, 142, .22);
  background: var(--light-cyan-soft);
  color: var(--light-cyan);
}

body.light-theme .buhara-panel-head p,
body.light-theme .buhara-panel > p,
body.light-theme .buhara-section-label small,
body.light-theme .buhara-help,
body.light-theme .buhara-legend,
body.light-theme .buhara-stack small,
body.light-theme .explode-control,
body.light-theme .explode-control small,
body.light-theme .room-detail span,
body.light-theme .room-detail small,
body.light-theme .room-detail dt,
body.light-theme .active-floor-hud small,
body.light-theme .buhara-iot-head small,
body.light-theme .buhara-iot-metrics span,
body.light-theme .buhara-equipment-control small {
  color: var(--light-muted);
}

body.light-theme .explode-control b,
body.light-theme .room-detail dd,
body.light-theme .buhara-iot-metrics b,
body.light-theme .buhara-equipment-control b,
body.light-theme .buhara-stack button {
  color: var(--light-copy);
}

body.light-theme .buhara-floors button:hover,
body.light-theme .buhara-floors button.active,
body.light-theme .buhara-categories button:hover,
body.light-theme .buhara-categories button.active,
body.light-theme .buhara-stack button:hover,
body.light-theme .buhara-stack button.active {
  border-color: rgba(8, 124, 142, .26);
  background: var(--light-cyan-soft);
  color: var(--light-cyan);
}

body.light-theme .buhara-iot {
  border-color: rgba(8, 124, 142, .2);
  background: linear-gradient(135deg, #e2f1f2, #f3f8f9);
}

body.light-theme .buhara-equipment-control {
  border-color: rgba(128, 98, 14, .2);
  background: linear-gradient(135deg, #f5edd8, #f7f9f7);
}

body.light-theme .buhara-iot button,
body.light-theme .buhara-equipment-control button {
  border-color: rgba(8, 124, 142, .24);
  background: #dcecef;
  color: var(--light-cyan);
}

body.light-theme .buhara-equipment-control button {
  border-color: rgba(128, 98, 14, .22);
  background: #f2e8ca;
  color: var(--light-gold);
}

body.light-theme .buhara-iot button.off,
body.light-theme .buhara-equipment-control button.off {
  border-color: var(--light-line);
  background: #e6eef0;
  color: var(--light-muted);
}

body.light-theme .buhara-kpis b {
  color: var(--light-gold);
}

body.light-theme .buhara-kpis span {
  color: var(--light-muted);
}

body.light-theme .room-detail em {
  color: var(--light-orange);
}

/* Operations console, object list and export ----------------------------- */
body.light-theme .ops-console {
  --ops-panel: #f4f8f9;
  --ops-panel-2: #eaf2f4;
  --ops-panel-3: #dfecee;
  --ops-border: var(--light-line);
  --ops-muted: var(--light-muted);
  --ops-copy: var(--light-ink);
  --ops-cyan: var(--light-cyan);
  --ops-green: var(--light-green);
  --ops-gold: var(--light-gold);
  --ops-red: var(--light-red);
}

body.light-theme .ops-live-pill,
body.light-theme .ops-sync-time,
body.light-theme .ops-tab b,
body.light-theme .ops-secondary-action,
body.light-theme .ops-ack-button,
body.light-theme .ops-event {
  border-color: var(--light-line);
  background: #e7f0f2;
  color: var(--light-copy);
}

body.light-theme .ops-tab {
  color: var(--light-muted);
}

body.light-theme .ops-tab:hover,
body.light-theme .ops-tab.active {
  border-color: rgba(8, 124, 142, .2);
  background: rgba(8, 124, 142, .08);
  color: var(--light-cyan);
}

body.light-theme .ops-tab.active b {
  background: rgba(8, 124, 142, .12);
  color: var(--light-cyan);
}

body.light-theme .ops-detail-field dd,
body.light-theme .ops-section-head b,
body.light-theme .ops-device-copy span,
body.light-theme .ops-alarm-copy span,
body.light-theme .ops-category-bar,
body.light-theme .ops-category-bar b,
body.light-theme .ops-event b,
body.light-theme .ops-empty b,
body.light-theme .ops-network-ring b {
  color: var(--light-copy);
}

body.light-theme .ops-detail-field dt,
body.light-theme .ops-section-head span,
body.light-theme .ops-meter-head span,
body.light-theme .ops-device-copy small,
body.light-theme .ops-alarm-copy small,
body.light-theme .ops-event,
body.light-theme .ops-event time,
body.light-theme .ops-console-footnote,
body.light-theme .ops-console-footnote b {
  color: var(--light-muted);
}

body.light-theme .ops-network-ring div {
  background: conic-gradient(var(--ops-green) var(--health), #cfdee2 0);
}

body.light-theme .ops-network-ring div::before {
  background: #f7fbfb;
}

body.light-theme .ops-ack-button:hover,
body.light-theme .ops-secondary-action:hover {
  border-color: rgba(8, 124, 142, .25);
  background: #d8e9ec;
  color: var(--light-cyan);
}

body.light-theme .ops-ack-button.done {
  border-color: var(--light-line);
  background: #e6eef0;
  color: var(--light-muted);
}

body.light-theme .ops-primary-action {
  border-color: rgba(8, 124, 142, .3);
  background: linear-gradient(135deg, #d1eaed, #e7f3f4);
  color: var(--light-cyan);
}

body.light-theme .ops-kpi b {
  color: var(--kpi-color, var(--ops-cyan));
}

body.light-theme .ops-badge.danger {
  border-color: rgba(184, 59, 53, .24);
  background: rgba(184, 59, 53, .08);
  color: var(--light-red);
}

body.light-theme .ops-badge.warn {
  border-color: rgba(128, 98, 14, .24);
  background: rgba(128, 98, 14, .08);
  color: var(--light-gold);
}

body.light-theme .ops-export-dialog::backdrop {
  background: rgba(18, 44, 55, .38);
}

body.light-theme .ops-export-option:hover,
body.light-theme .ops-export-option:focus-visible {
  border-color: rgba(8, 124, 142, .3);
  background: #dcebed;
  color: var(--light-ink);
}

body.light-theme .ops-export-hint,
body.light-theme .ops-export-format-copy small,
body.light-theme .ops-export-dialog-foot span,
body.light-theme .ops-export-dialog-foot small {
  color: var(--light-muted);
}

body.light-theme .ops-mobile-grabber,
body.light-theme .ops-export-dialog-head::before,
body.light-theme .ops-list-config-head::before {
  background: #9eb2ba;
}

body.light-theme .ops-list-config-dialog,
body.light-theme .ops-export-dialog {
  --ops-cyan: var(--light-cyan);
  --ops-green: var(--light-green);
  --ops-gold: var(--light-gold);
  --ops-red: var(--light-red);
}

body.light-theme .ops-table-action-head,
body.light-theme .ops-table-action {
  background: #dcebed;
}

body.light-theme .ops-config-status.error,
body.light-theme .ops-rule-chip button:hover,
body.light-theme .ops-rule-chip button:focus-visible {
  color: var(--light-red);
}

/* Scheduled jobs --------------------------------------------------------- */
body.light-theme .ops-schedule-dialog {
  --schedule-bg: #f3f7f8;
  --schedule-surface: #edf4f5;
  --schedule-surface-2: #e4eef0;
  --schedule-surface-3: #dce9eb;
  --schedule-line: var(--light-line);
  --schedule-line-strong: var(--light-line-strong);
  --schedule-copy: var(--light-ink);
  --schedule-muted: var(--light-muted);
  --schedule-dim: var(--light-dim);
  --schedule-cyan: var(--light-cyan);
  --schedule-green: var(--light-green);
  --schedule-gold: var(--light-gold);
  --schedule-red: var(--light-red);
}

body.light-theme .ops-schedule-simulation,
body.light-theme .ops-schedule-enabled,
body.light-theme .ops-schedule-sentence,
body.light-theme .ops-schedule-list-head,
body.light-theme .ops-schedule-list-head b,
body.light-theme .ops-schedule-helper,
body.light-theme .ops-schedule-form > header p,
body.light-theme .ops-schedule-card-main > p,
body.light-theme .ops-schedule-card-main > small,
body.light-theme .ops-schedule-empty,
body.light-theme .ops-schedule-detail-empty {
  color: var(--light-muted);
}

body.light-theme .ops-schedule-simulation {
  border-color: rgba(19, 119, 79, .2);
  background: rgba(19, 119, 79, .07);
  color: #386b58;
}

body.light-theme .ops-schedule-switch::before,
body.light-theme .ops-schedule-enabled > span::before,
body.light-theme .ops-schedule-check i {
  border-color: var(--light-line-strong);
  background: #d7e5e8;
}

body.light-theme .ops-schedule-detail-actions button:hover,
body.light-theme .ops-schedule-record-actions button:hover,
body.light-theme .ops-schedule-form-actions button:hover {
  border-color: rgba(8, 124, 142, .28);
  background: #dcebed;
  color: var(--light-cyan);
}

body.light-theme .ops-schedule-errors {
  border-color: rgba(184, 59, 53, .24);
  background: rgba(184, 59, 53, .07);
  color: var(--light-red);
}

body.light-theme :is(.ops-schedule-record-actions, .ops-schedule-form-actions) .danger {
  border-color: rgba(184, 59, 53, .24);
  background: rgba(184, 59, 53, .07);
  color: var(--light-red);
}

/* Complex event processing / state-machine designer ---------------------- */
body.light-theme .cep-dialog {
  --cep-bg: #edf4f5;
  --cep-panel: #f5f9fa;
  --cep-panel-2: #e7f1f3;
  --cep-panel-3: #dfecee;
  --cep-canvas: #e7eff1;
  --cep-line: var(--light-line);
  --cep-line-strong: var(--light-line-strong);
  --cep-text: var(--light-copy);
  --cep-text-strong: var(--light-ink);
  --cep-muted: var(--light-muted);
  --cep-dim: var(--light-dim);
  --cep-cyan: var(--light-cyan);
  --cep-cyan-rgb: 8, 124, 142;
  --cep-gold: var(--light-gold);
  --cep-gold-rgb: 128, 98, 14;
  --cep-green: var(--light-green);
  --cep-red: var(--light-red);
  --cep-purple: var(--light-purple);
  --cep-orange: var(--light-orange);
}

body.light-theme .cep-mobile-builder-tabs,
body.light-theme .cep-launch > b,
body.light-theme .cep-launch > small,
body.light-theme .cep-stage-strip button > i,
body.light-theme .cep-switch > i,
body.light-theme .cep-live-edit > i,
body.light-theme .cep-mock > i {
  border-color: var(--light-line);
  background: #dce9ec;
  color: var(--light-muted);
}

body.light-theme .cep-mobile-builder-tabs button {
  color: var(--light-muted);
}

body.light-theme .cep-mobile-builder-tabs button:hover,
body.light-theme .cep-mobile-builder-tabs button.active,
body.light-theme .cep-mobile-builder-tabs button[aria-selected="true"] {
  border-color: rgba(8, 124, 142, .22);
  background: var(--light-cyan-soft);
  color: var(--light-cyan);
}

body.light-theme .cep-source-row b,
body.light-theme .cep-action-row b,
body.light-theme .cep-condition-row b,
body.light-theme .cep-builder-grid > .cep-inspector > header > b,
body.light-theme .cep-canvas-toolbar > div > b,
body.light-theme .cep-empty > b,
body.light-theme .cep-inspector-empty b,
body.light-theme .cep-scenario-section > header b,
body.light-theme .cep-section-head b,
body.light-theme .cep-flow-preview > header b,
body.light-theme .cep-sources > header b,
body.light-theme .cep-sim-panel > header b,
body.light-theme .cep-sources > div > span > b,
body.light-theme .cep-action-editor b {
  color: var(--light-copy);
}

body.light-theme .cep-scenario-card-copy span,
body.light-theme .cep-check,
body.light-theme .cep-builder-grid > .cep-palette > header,
body.light-theme .cep-builder-grid > .cep-inspector > header,
body.light-theme .cep-sim-panel > header small,
body.light-theme .cep-foot > span,
body.light-theme .cep-foot > small {
  color: var(--light-muted);
}

body.light-theme .cep-sim-progress {
  background: #cadbdf;
}

body.light-theme .cep-btn:hover,
body.light-theme .cep-icon-btn:hover,
body.light-theme .cep-head-actions > button:hover,
body.light-theme .cep-close:hover {
  border-color: rgba(8, 124, 142, .28);
  background: #dcebed;
  color: var(--light-cyan);
}

body.light-theme .cep-badge.info {
  border-color: rgba(8, 124, 142, .23);
  background: rgba(8, 124, 142, .08);
  color: var(--light-cyan);
}

body.light-theme .cep-badge.warn {
  border-color: rgba(128, 98, 14, .24);
  background: rgba(128, 98, 14, .08);
  color: var(--light-gold);
}

body.light-theme .cep-badge.danger {
  border-color: rgba(184, 59, 53, .24);
  background: rgba(184, 59, 53, .08);
  color: var(--light-red);
}

body.light-theme .cep-validation.error,
body.light-theme .cep-foot > span[data-tone="error"],
body.light-theme .cep-toast.error {
  border-color: rgba(184, 59, 53, .24);
  background: rgba(184, 59, 53, .07);
  color: var(--light-red);
}

body.light-theme .cep-toast.success,
body.light-theme .cep-foot > span[data-tone="success"] {
  color: var(--light-green);
}

body.light-theme .cep-builder-grid > .cep-inspector > header > button:hover,
body.light-theme .cep-action-editor > header > button:hover,
body.light-theme .cep-sources > div > span > button:hover {
  border-color: rgba(184, 59, 53, .22);
  background: rgba(184, 59, 53, .07);
  color: var(--light-red);
}

/* Device clustering ------------------------------------------------------ */
body.light-theme .device-cluster.has-alert > span {
  border-color: rgba(184, 59, 53, .25);
  background: rgba(184, 59, 53, .09);
  color: var(--light-red);
}

body.light-theme .device-cluster.has-alert > small {
  color: var(--light-red);
}

body.light-theme .device-focus:hover,
body.light-theme .device-focus:focus-visible {
  border-color: rgba(8, 124, 142, .3);
  background: #dcebed;
  color: var(--light-cyan);
}

/* Mobile and combined UI states ----------------------------------------- */
body.light-theme.mobile-drawer-open .map-wash {
  background: rgba(69, 91, 102, .19);
}

body.light-theme.buhara-panel-collapsed .map-wash {
  background: radial-gradient(circle at 50% 44%, transparent 50%, rgba(89, 118, 130, .16) 100%);
}

body.light-theme .route-panel,
body.light-theme .layer-panel,
body.light-theme .buhara-panel {
  scrollbar-color: #aac1c8 transparent;
}

@media (max-width: 760px) {
  body.light-theme .left-rail {
    border-color: rgba(128, 98, 14, .2);
    background: linear-gradient(145deg, rgba(252, 253, 253, .98), rgba(228, 238, 241, .97));
    box-shadow: inset 0 1px #fff, 0 18px 46px rgba(31, 59, 72, .2);
  }

  body.light-theme .left-rail button {
    border-color: transparent;
    background: transparent;
    color: var(--light-muted);
  }

  body.light-theme .left-rail button:hover,
  body.light-theme .left-rail button.active {
    border-color: rgba(8, 124, 142, .12);
    background: linear-gradient(180deg, rgba(192, 229, 233, .76), rgba(220, 239, 241, .56));
    color: var(--light-cyan);
    box-shadow: inset 0 -2px var(--light-cyan);
  }

  body.light-theme .route-panel,
  body.light-theme .layer-panel,
  body.light-theme .buhara-panel {
    border-color: rgba(128, 98, 14, .18);
    background: rgba(249, 252, 252, .98);
    box-shadow: 0 -18px 60px rgba(31, 59, 72, .22);
  }

  body.light-theme .buhara-panel-open {
    background: rgba(247, 251, 252, .98);
    color: var(--light-cyan);
  }

  body.light-theme .ops-console,
  body.light-theme .ops-schedule-dialog,
  body.light-theme .cep-dialog {
    box-shadow: 0 18px 64px rgba(31, 59, 72, .28);
  }
}

@media (prefers-contrast: more) {
  body.light-theme {
    --light-muted: #3f5965;
    --light-dim: #536a74;
    --light-line: rgba(35, 65, 78, .3);
    --light-line-strong: rgba(35, 65, 78, .46);
  }

  body.light-theme :is(button, input, select, textarea):focus-visible {
    outline: 3px solid rgba(8, 124, 142, .52);
    outline-offset: 2px;
  }
}
