
/* Athena OneWeb whole-site light/dark theme layer R1. Loaded after all legacy UI CSS. */
:root[data-theme="dark"]{color-scheme:dark}
:root[data-theme="light"]{
  color-scheme:light;
  --ao-brand:#052855;
  --ao-shell:#eef4f8;
  --ao-sidebar:#ffffff;
  --ao-sidebar-2:#eef5fa;
  --ao-canvas:#f5f8fb;
  --ao-surface:#ffffff;
  --ao-surface-2:#f9fbfd;
  --ao-surface-3:#edf4f8;
  --ao-line:#c8d7e2;
  --ao-line-soft:#dce6ed;
  --ao-text:#10283c;
  --ao-muted:#5d7486;
  --ao-faint:#7890a1;
  --ao-cyan:#0b9fc1;
  --ao-blue:#1769cf;
  --ao-green:#087d62;
  --ao-amber:#a86600;
  --ao-red:#b93845;
  --ao-purple:#6750c7;
  --ao-shadow:0 16px 42px rgba(28,63,88,.12);
}

/* Theme-aware ATHENA logo. Exact operator assets; no recolor/filter. */
.theme-brand-logo{
  display:block!important;
  flex:0 0 auto!important;
  object-fit:contain!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  filter:none!important;
  mix-blend-mode:normal!important;
  opacity:1!important;
  padding:0!important;
  margin:0!important;
}
.login-brand-logo{width:96px!important;height:56px!important;min-width:96px!important;min-height:56px!important;max-width:96px!important;max-height:56px!important}
.sidebar-brand-logo{width:76px!important;height:46px!important;min-width:76px!important;min-height:46px!important;max-width:76px!important;max-height:46px!important}

/* Accessible switch shared by Login and authenticated chrome. */
.theme-toggle{
  display:inline-flex!important;align-items:center!important;gap:8px!important;
  min-height:34px;padding:6px 9px!important;border:1px solid #24475e!important;border-radius:999px!important;
  background:#0d2233!important;color:#c9dce7!important;box-shadow:none!important;cursor:pointer!important;
  font-size:9px!important;font-weight:800!important;letter-spacing:.03em!important;white-space:nowrap!important;
}
.theme-toggle:hover{border-color:#2c87ae!important;background:#113049!important;color:#fff!important}
.theme-toggle:focus-visible{outline:2px solid var(--ao-cyan)!important;outline-offset:2px!important}
.theme-toggle-track{position:relative;display:inline-block;width:30px;height:16px;border-radius:999px;background:#173c55!important;box-shadow:inset 0 0 0 1px #2a5874!important}
.theme-toggle-thumb{position:absolute;top:3px;left:3px;width:10px;height:10px;border-radius:50%;background:#f3fbff!important;box-shadow:0 1px 4px #0008;transition:transform .18s ease}
.theme-toggle[data-theme-state="light"] .theme-toggle-thumb{transform:translateX(14px)}
.theme-toggle-login{position:absolute!important;top:16px!important;right:16px!important;z-index:5!important}

/* Light theme: global document and shell. */
:root[data-theme="light"] html,
:root[data-theme="light"] body{background:#f5f8fb!important;color:#10283c!important}
:root[data-theme="light"] body{color:var(--ao-text)!important}
:root[data-theme="light"] .app-shell{background:linear-gradient(180deg,#f7fafc,#eef4f8 75%)!important}
:root[data-theme="light"] .sidebar{background:linear-gradient(180deg,#ffffff,#f6f9fb 72%,#edf4f8)!important;border-right-color:#d1dee7!important;box-shadow:12px 0 34px rgba(39,73,96,.09)!important}
:root[data-theme="light"] .brand{border-bottom-color:#d8e4ec!important}
:root[data-theme="light"] .brand strong{color:#052855!important}
:root[data-theme="light"] .brand small{color:#6a8090!important}
:root[data-theme="light"] .nav-group{color:#738a9a!important}
:root[data-theme="light"] .nav-item{color:#415f74!important}
:root[data-theme="light"] .nav-item span{background:#e9f2f8!important;color:#176b9c!important}
:root[data-theme="light"] .nav-item:hover{background:#edf5fa!important;color:#052855!important;border-color:#c7dbe7!important}
:root[data-theme="light"] .nav-item.active{background:linear-gradient(90deg,#e0f1f8,#eef7fb)!important;color:#052855!important;border-color:#8fbdd2!important;box-shadow:inset 3px 0 #0b9fc1,0 7px 18px rgba(42,87,116,.10)!important}
:root[data-theme="light"] .nav-item.active span{background:#d8eef7!important;color:#087c9d!important}
:root[data-theme="light"] .user-card{border-color:#cbdbe5!important;background:#f7fafc!important;color:#163348!important}
:root[data-theme="light"] .user-card small{color:#6f8797!important}
:root[data-theme="light"] main{background:transparent!important}
:root[data-theme="light"] .topbar{border-bottom-color:#d9e4eb!important}
:root[data-theme="light"] .topbar h1{color:#0b263b!important}
:root[data-theme="light"] .eyebrow{color:#537d97!important}
:root[data-theme="light"] .live,
:root[data-theme="light"] .timestamp,
:root[data-theme="light"] .safety-pill{background:#ffffff!important;border-color:#ccdae4!important;color:#557084!important}
:root[data-theme="light"] .live{color:#087d62!important}
:root[data-theme="light"] .safety-pill{color:#5d4cb1!important;border-color:#c7bff0!important;background:#f5f2ff!important}
:root[data-theme="light"] .refresh,
:root[data-theme="light"] .secondary{border-color:#bcd0dd!important;background:#ffffff!important;color:#21465e!important}
:root[data-theme="light"] .refresh:hover,
:root[data-theme="light"] .secondary:hover{border-color:#66a9c6!important;background:#edf6fb!important;color:#052855!important}
:root[data-theme="light"] .theme-toggle{border-color:#bcd0dd!important;background:#ffffff!important;color:#21465e!important}
:root[data-theme="light"] .theme-toggle:hover{border-color:#66a9c6!important;background:#edf6fb!important;color:#052855!important}
:root[data-theme="light"] .theme-toggle-track{background:#cfe4ef!important;box-shadow:inset 0 0 0 1px #9fc5d7!important}
:root[data-theme="light"] .theme-toggle-thumb{background:#052855!important;box-shadow:0 1px 4px #5678a055!important}

/* Light theme: cards, panels, notices, summaries. */
:root[data-theme="light"] .metrics article,
:root[data-theme="light"] .panel,
:root[data-theme="light"] .detail-card,
:root[data-theme="light"] .subpanel,
:root[data-theme="light"] .advanced{background:#ffffff!important;border-color:#ccdae4!important;color:#10283c!important;box-shadow:var(--ao-shadow)!important}
:root[data-theme="light"] .metrics article:after{background:radial-gradient(circle,#0b9fc114,transparent 68%)!important}
:root[data-theme="light"] .metrics small,
:root[data-theme="light"] .detail-card small{color:#617c8e!important}
:root[data-theme="light"] .metrics strong,
:root[data-theme="light"] .detail-card strong{color:#10283c!important}
:root[data-theme="light"] .metrics p,
:root[data-theme="light"] .detail-card p,
:root[data-theme="light"] .panel-head p,
:root[data-theme="light"] .sub,
:root[data-theme="light"] .panel-foot{color:#657d8d!important}
:root[data-theme="light"] .panel-foot{border-color:#d8e4eb!important;background:#f7fafc!important}
:root[data-theme="light"] .metric-icon{background:#edf5fa!important}
:root[data-theme="light"] .notice{border-color:#b7d6e4!important;background:#eef8fc!important;color:#42667d!important}
:root[data-theme="light"] .notice span{background:#d8eef7!important;color:#087c9d!important}
:root[data-theme="light"] .notice p{color:#4e6c7e!important}
:root[data-theme="light"] .notice p strong{color:#173b52!important}
:root[data-theme="light"] .panel-head,
:root[data-theme="light"] .subpanel-head{background:linear-gradient(180deg,#f9fbfd,#f2f7fa)!important;border-color:#dbe6ed!important}
:root[data-theme="light"] .panel-head h2,
:root[data-theme="light"] .subpanel h3,
:root[data-theme="light"] .detail-card h3{color:#10283c!important}
:root[data-theme="light"] .subpanel-head span{color:#6e8493!important}
:root[data-theme="light"] .advanced summary{color:#365d75!important}
:root[data-theme="light"] .advanced[open] summary{border-bottom-color:#d2dfe7!important}
:root[data-theme="light"] .empty{color:#6f8797!important}
:root[data-theme="light"] .danger-note{border-color:#e4b7bc!important;background:#fff3f4!important;color:#9b3440!important}
:root[data-theme="light"] .editor-status{background:#edf5f9!important;color:#4a7188!important}
:root[data-theme="light"] .control-progress{background:#f3f7fa!important;color:#315a72!important;border-color:#c9dbe5!important}

/* Light theme: forms and controls. */
:root[data-theme="light"] .filters label,
:root[data-theme="light"] .filters>input,
:root[data-theme="light"] .filters select,
:root[data-theme="light"] .history-controls input,
:root[data-theme="light"] .history-controls select,
:root[data-theme="light"] .form-grid input,
:root[data-theme="light"] .form-grid select,
:root[data-theme="light"] .form-grid textarea,
:root[data-theme="light"] .login-card input{border-color:#bdcfdb!important;background:#ffffff!important;color:#153349!important;box-shadow:inset 0 1px 0 #ffffff!important}
:root[data-theme="light"] input::placeholder,
:root[data-theme="light"] textarea::placeholder{color:#879aa8!important}
:root[data-theme="light"] .filters label:focus-within,
:root[data-theme="light"] .history-controls input:focus,
:root[data-theme="light"] .history-controls select:focus,
:root[data-theme="light"] .form-grid input:focus,
:root[data-theme="light"] .form-grid select:focus,
:root[data-theme="light"] .form-grid textarea:focus{border-color:#2995bd!important;box-shadow:0 0 0 3px #2995bd20!important}
:root[data-theme="light"] .form-grid label,
:root[data-theme="light"] .history-controls label{color:#5e7788!important}
:root[data-theme="light"] .range-buttons{border-color:#c9dae4!important;background:#f4f8fb!important}
:root[data-theme="light"] .range-buttons .active{background:linear-gradient(135deg,#137da8,#1765d2)!important;color:#fff!important;box-shadow:0 5px 14px #4e789330!important}

/* Light theme: tables and fleet usage bars. */
:root[data-theme="light"] .table-wrap{border-color:#d4e0e8!important;background:#ffffff!important;scrollbar-color:#a9c2d0 #eef4f8!important}
:root[data-theme="light"] table{background:#ffffff!important;color:#153349!important}
:root[data-theme="light"] th{background:#eef4f8!important;color:#577387!important;border-color:#d5e1e9!important}
:root[data-theme="light"] td{background:#ffffff!important;color:#28495e!important;border-color:#dce5eb!important}
:root[data-theme="light"] tbody tr:nth-child(even) td{background:#f8fafc!important}
:root[data-theme="light"] tbody tr:hover td{background:#edf6fb!important;color:#10283c!important}
:root[data-theme="light"] .fleet-row:hover td,
:root[data-theme="light"] .fleet-row.selected td{background:#e6f3f9!important}
:root[data-theme="light"] .fleet-row:hover strong,
:root[data-theme="light"] .fleet-row.selected strong{color:#0b263b!important}
:root[data-theme="light"] .fleet-row:hover .sub,
:root[data-theme="light"] .fleet-row.selected .sub{color:#5d7788!important}
:root[data-theme="light"] .link-button{color:#087ba2!important}
:root[data-theme="light"] .badge.muted{color:#627989!important}
:root[data-theme="light"] .usage>span{background:#dce8ef!important}
:root[data-theme="light"] .usage>span i{background:linear-gradient(90deg,#167fe0,#0b9fc1)!important}
:root[data-theme="light"] .usage>span.warn i{background:linear-gradient(90deg,#f0a51f,#ec6d50)!important}

/* Light theme: charts and diagnostics. */
:root[data-theme="light"] .history-chart,
:root[data-theme="light"] .stats-chart-shell{border-color:#c9dbe5!important;background:linear-gradient(180deg,#ffffff,#f6f9fb)!important}
:root[data-theme="light"] .chart-axis{stroke:#b6c9d5!important}
:root[data-theme="light"] .chart-point{stroke:#ffffff!important}
:root[data-theme="light"] .chart-legend{color:#4f6c7f!important}
:root[data-theme="light"] .chart-detail{border-color:#c7d9e3!important;background:#f4f8fa!important;color:#486a7e!important}
:root[data-theme="light"] .chart-empty{color:#6d8494!important}
:root[data-theme="light"] .stats-chart{border-color:#c7dae4!important}
:root[data-theme="light"] .stats-chart:before{background:linear-gradient(90deg,#d9e5ec 1px,transparent 1px)!important}
:root[data-theme="light"] .stats-bar-unavailable{fill:#aebdca!important}
:root[data-theme="light"] .stats-point small{color:#627d8f!important}
:root[data-theme="light"] .history-chart text,
:root[data-theme="light"] .stats-chart-shell text{fill:#536f82!important}

/* Light theme: maps and Leaflet chrome. */
:root[data-theme="light"] .world-map{border-color:#b7d3df!important;background:radial-gradient(circle at 50% 40%,#e6f2f5,#dbe9ee 72%)!important;box-shadow:inset 0 0 46px #9ebac726!important}
:root[data-theme="light"] .world-land{fill:#c8dcdb!important;stroke:#9bbec0!important}
:root[data-theme="light"] .map-fallback{fill:#d6e6eb!important}
:root[data-theme="light"] .map-toolbar button{border-color:#b2cedb!important;background:#ffffff!important;color:#214d66!important;box-shadow:0 7px 18px #6e91a126!important}
:root[data-theme="light"] .map-detail{border-color:#c4d8e3!important;background:#f6f9fb!important;color:#587588!important}
:root[data-theme="light"] .leaflet-map{background:#dfecef!important}
:root[data-theme="light"] .leaflet-control-zoom a,
:root[data-theme="light"] .athena-fit-control{background:#ffffff!important;color:#214d66!important}
:root[data-theme="light"] .leaflet-control-attribution{background:#fffffff0!important;color:#647d8d!important}
:root[data-theme="light"] .leaflet-control-attribution a{color:#087ba2!important}
:root[data-theme="light"] .leaflet-popup-content-wrapper,
:root[data-theme="light"] .leaflet-popup-tip{background:#ffffff!important;color:#18384d!important}
:root[data-theme="light"] .leaflet-popup-content-wrapper{border-color:#b7cfdb!important;box-shadow:0 14px 38px #466b7e30!important}
:root[data-theme="light"] .athena-map-popup strong{color:#17384e!important}
:root[data-theme="light"] .athena-map-popup dt{color:#668092!important}
:root[data-theme="light"] .athena-map-popup dd{color:#294b60!important}
:root[data-theme="light"] .athena-map-marker i{background:#ffffff!important}

/* Light theme: device/workflow and customer profile surfaces. */
:root[data-theme="light"] .device-kpi,
:root[data-theme="light"] .device-tile{border-color:#cadbe5!important;background:#ffffff!important;color:#17364b!important;box-shadow:0 10px 26px #5c7d8e20!important}
:root[data-theme="light"] .device-kpi small{color:#668092!important}
:root[data-theme="light"] .device-kpi strong{color:#17364b!important}
:root[data-theme="light"] .device-kpi.attention{border-color:#e0b9bd!important;background:#fff3f4!important}
:root[data-theme="light"] .device-tile:hover{border-color:#73aec6!important;background:#eef7fb!important}
:root[data-theme="light"] .device-tile p{color:#647d8e!important}
:root[data-theme="light"] .device-group{border-color:#c6d8e3!important;background:#f4f8fa!important;color:#526f82!important}
:root[data-theme="light"] .status-timeline{background:#f2f6f8!important}
:root[data-theme="light"] .timeline-segment{background:#dfe7ec!important;color:#536a79!important}
:root[data-theme="light"] .timeline-segment.online{background:#d9f1e9!important;color:#087258!important}
:root[data-theme="light"] .timeline-segment.offline{background:#f9e1e4!important;color:#a33d48!important}
:root[data-theme="light"] .terminate-step{background:#eaf1f5!important;color:#647b8b!important}
:root[data-theme="light"] .terminate-step.done,
:root[data-theme="light"] .terminate-step.active{background:#dceffa!important;color:#155071!important}
:root[data-theme="light"] .control-confirm{background:#ffffff!important;border-color:#bfd3df!important;color:#17384d!important}
:root[data-theme="light"] .profile-source-note,
:root[data-theme="light"] .profile-save-note,
:root[data-theme="light"] .profile-audit{border-color:#c7d8e2!important;background:#f5f9fb!important;color:#506d80!important;box-shadow:none!important}
:root[data-theme="light"] .profile-source-note strong,
:root[data-theme="light"] .profile-save-note strong,
:root[data-theme="light"] .profile-audit strong{color:#17384d!important}

/* Light theme: login is truly light while preserving the existing hero artwork. */
:root[data-theme="light"] .login-screen{background:#f5f8fb!important}
:root[data-theme="light"] .login-visual{background:#03101e url('/ops/assets/athen-oneweb-ui-login-r1.png?v=2b0d487a6af29307') center center/contain no-repeat!important}
:root[data-theme="light"] .login-visual:before{content:none!important;display:none!important;background:none!important}
:root[data-theme="light"] .login-visual:after{content:none!important;display:none!important;background:none!important}
:root[data-theme="light"] .login-visual-copy span{color:#087ba2!important}
:root[data-theme="light"] .login-visual-copy h2{color:#052855!important}
:root[data-theme="light"] .login-visual-copy p{color:#496c82!important}
:root[data-theme="light"] .athena-hero-wordmark-r7{filter:brightness(.48) saturate(.85)!important}
:root[data-theme="light"] .login-card{border-color:#c7d9e4!important;background:rgba(255,255,255,.96)!important;color:#17384d!important;box-shadow:0 28px 76px #5d809130!important}
:root[data-theme="light"] .login-card h1{color:#052855!important}
:root[data-theme="light"] .login-copy,
:root[data-theme="light"] .login-card label,
:root[data-theme="light"] .lock-note{color:#5d7687!important}
:root[data-theme="light"] .official-owner{border-color:#c5dae5!important;background:#eff7fa!important;color:#567286!important}
:root[data-theme="light"] .official-owner strong{color:#18394e!important}
:root[data-theme="light"] .official-owner a,
:root[data-theme="light"] .public-footer a{color:#087ba2!important}
:root[data-theme="light"] .public-footer{color:#6a8292!important}
:root[data-theme="light"] .form-error{color:#a53541!important}
:root[data-theme="light"] .toast{background:#ffffff!important;color:#17384d!important;border-color:#c6d9e4!important;box-shadow:0 16px 42px #55798c2a!important}

@media(max-width:620px){
  .theme-toggle-header .theme-toggle-text{display:none}
  .theme-toggle-login{top:10px!important;right:10px!important}
}

/* R8.7.11.4.2.1 Login exact supplied PNG corrective.
 * The operator-supplied PNG is the complete Login hero artwork.
 * No extra owl/logo, ATHENA wordmark, text copy, gradient, fade or recolor is layered over it. */
.login-visual{
  position:relative!important;
  isolation:isolate!important;
  overflow:hidden!important;
  padding:0!important;
  background-color:#03101e!important;
  background-image:url('/ops/assets/athen-oneweb-ui-login-r1.png?v=2b0d487a6af29307')!important;
  background-repeat:no-repeat!important;
  background-position:center center!important;
  background-size:contain!important;
}
:root[data-theme="dark"] .login-visual,
:root[data-theme="light"] .login-visual{
  background-color:#03101e!important;
  background-image:url('/ops/assets/athen-oneweb-ui-login-r1.png?v=2b0d487a6af29307')!important;
  background-repeat:no-repeat!important;
  background-position:center center!important;
  background-size:contain!important;
}
.login-visual:before,
.login-visual:after,
:root[data-theme="dark"] .login-visual:before,
:root[data-theme="dark"] .login-visual:after,
:root[data-theme="light"] .login-visual:before,
:root[data-theme="light"] .login-visual:after{
  content:none!important;
  display:none!important;
  background:none!important;
}
.athena-hero-wordmark-r7,
.login-visual-copy,
.login-hero-owl-r1,
.login-hero-full-png-r1{display:none!important}
@media(max-width:760px){
  .login-visual{min-height:36vh!important;background-size:contain!important;background-position:center center!important}
}
