/* Theme colors only: the shared stylesheet owns spacing and responsive layout. */
[data-theme="dark"] .pd-summary > div,
[data-theme="dark"] .incident-pagerduty > summary {
  background: var(--surface-soft);
}
[data-theme="dark"] .pd-review {
  background: var(--caution-bg);
}
[data-theme="dark"] .response-bank,
[data-theme="dark"] .response-latest {
  background: var(--surface-soft);
}
[data-theme="dark"] .response-actions {
  background: var(--paper);
}
[data-theme="dark"] .critical-evidence {
  background: var(--critical-bg);
  color: var(--critical-ink);
}
[data-theme="dark"] .critical-evidence.compact {
  background: transparent;
}
[data-theme="dark"] .critical-outside {
  background: var(--caution-bg);
  color: var(--caution-ink);
}
[data-theme="dark"] .power-blocked {
  color: var(--critical-ink);
}
:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e5eee8;
  --muted: #afc0b6;
  --line: #34483d;
  --paper: #17251e;
  --back: #0c1511;
  --nav: #09120e;
  --yellow: #f0c16c;
  --red: #ffac9b;
  --green: #a4d7b4;
  --gold: #ebc277;
  --shadow: 0 3px 16px #0000001a;
  --surface-raised: #203128;
  --surface-soft: #1c2d23;
  --positive-bg: #20392a;
  --positive-ink: #b2e4c1;
  --caution-bg: #3c321f;
  --caution-ink: #f5d18a;
  --critical-bg: #402722;
  --critical-ink: #ffb5a5;
}

.theme-toggle {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}

[data-theme="dark"] body {
  color: var(--ink);
  background: var(--back);
}

[data-theme="dark"] .topbar,
[data-theme="dark"] .modal-head {
  background: #142119;
}

[data-theme="dark"] .button {
  background: #c9dfc8;
  color: #132519;
}

[data-theme="dark"] .button.secondary,
[data-theme="dark"] .storm-card .button,
[data-theme="dark"] .account-option,
[data-theme="dark"] .solar-tab,
[data-theme="dark"] .solar-site-option,
[data-theme="dark"] .startup-error,
[data-theme="dark"] .fleet-overview,
[data-theme="dark"] .metric,
[data-theme="dark"] .solar-page .metric,
[data-theme="dark"] .search {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}

[data-theme="dark"] .button.ghost {
  background: transparent;
  color: var(--ink);
}

[data-theme="dark"] .button.danger {
  background: #a5453b;
  color: #fff7f4;
}

[data-theme="dark"] .badge.good {
  background: var(--positive-bg);
  color: var(--positive-ink);
}

[data-theme="dark"] .badge.check {
  background: var(--caution-bg);
  color: var(--caution-ink);
}

[data-theme="dark"] .badge.urgent {
  background: var(--critical-bg);
  color: var(--critical-ink);
}

[data-theme="dark"] .badge.neutral,
[data-theme="dark"] .section-count,
[data-theme="dark"] .avatar,
[data-theme="dark"] .close-button,
[data-theme="dark"] .site-icon,
[data-theme="dark"] .summary-icon {
  background: var(--surface-raised);
  color: #c4d7c6;
}

[data-theme="dark"] .notice,
[data-theme="dark"] .recovery-note,
[data-theme="dark"] .storm-triage-banner {
  background: var(--caution-bg);
  color: var(--caution-ink);
  border-color: #655331;
}

[data-theme="dark"] .notice.info,
[data-theme="dark"] .inventory-explainer,
[data-theme="dark"] .save-status,
[data-theme="dark"] .individual-health {
  background: var(--surface-soft);
  color: #c0d4b9;
  border-color: var(--line);
}

[data-theme="dark"] .demo-strip {
  background: #2b291d;
  color: #e1c795;
}

[data-theme="dark"] .demo-strip select {
  color: #e1c795;
}

[data-theme="dark"] .demo-strip option {
  color: var(--ink);
  background: var(--paper);
}

[data-theme="dark"] .filter {
  color: #bfd0bf;
}

[data-theme="dark"] .filter.selected,
[data-theme="dark"] .solar-site-option.selected,
[data-theme="dark"] .solar-tab.active {
  background: #2d4533;
  color: #e1f0d9;
  border-color: #8eaf7f;
  box-shadow: inset 0 0 0 1px #78976b;
}

[data-theme="dark"] .user-button,
[data-theme="dark"] .account-option {
  color: var(--ink);
}

[data-theme="dark"] .user-button:hover,
[data-theme="dark"] .account-option:hover,
[data-theme="dark"] .incident-row:hover,
[data-theme="dark"] .incident-row:focus-within,
[data-theme="dark"] .triage-layout .card-head > a[aria-label]:hover {
  background: #21372a;
}

[data-theme="dark"] .incident-marker,
[data-theme="dark"] .summary-card.urgent .summary-icon {
  background: var(--critical-bg);
  color: var(--critical-ink);
}

[data-theme="dark"] .incident-marker.check,
[data-theme="dark"] .summary-card.check .summary-icon {
  background: var(--caution-bg);
  color: var(--caution-ink);
}

[data-theme="dark"] .summary-card.good .summary-icon {
  background: var(--positive-bg);
  color: var(--positive-ink);
}

[data-theme="dark"] .bar,
[data-theme="dark"] .energy-track {
  background: #354a3b;
}

[data-theme="dark"] .bar > span,
[data-theme="dark"] .legend-line.green {
  background: #8fc79e;
}

[data-theme="dark"] .bar.urgent > span {
  background: #e9947f;
}

[data-theme="dark"] .bar.check > span,
[data-theme="dark"] .energy-track > span {
  background: #dfb86a;
}

[data-theme="dark"] .storm-card,
[data-theme="dark"] .solar-brief,
[data-theme="dark"] .preparation-card {
  background: #213526;
  border-color: #425c3c;
}

[data-theme="dark"] .storm-card p,
[data-theme="dark"] .solar-brief p,
[data-theme="dark"] .solar-brief .eyebrow,
[data-theme="dark"] .brief-status > span:last-child,
[data-theme="dark"] .preparation-list p {
  color: #bed2b4;
}

[data-theme="dark"] .hint-line,
[data-theme="dark"] th,
[data-theme="dark"] .forecast-coverage,
[data-theme="dark"] .source-caption,
[data-theme="dark"] .forecast-method,
[data-theme="dark"] .outlook-row.unavailable {
  background: #132119;
  color: var(--muted);
  border-color: var(--line);
}

[data-theme="dark"] .summary-top,
[data-theme="dark"] .activity-item strong,
[data-theme="dark"] .footer-note,
[data-theme="dark"] .incident-power,
[data-theme="dark"] .fleet-overview > div,
[data-theme="dark"] .fleet-total,
[data-theme="dark"] .bank-alarm-counts,
[data-theme="dark"] .solar-site-option small,
[data-theme="dark"] .solar-page .metric > small,
[data-theme="dark"] .solar-page .caption,
[data-theme="dark"] .solar-page .metric .unit,
[data-theme="dark"] .section-description,
[data-theme="dark"] .outlook-columns,
[data-theme="dark"] .day-stamp span,
[data-theme="dark"] .outlook-date > div:last-child > span,
[data-theme="dark"] .outlook-weather,
[data-theme="dark"] .unavailable-label,
[data-theme="dark"] .forecast-footnote,
[data-theme="dark"] .solar-page .chart-legend,
[data-theme="dark"] .weather-temperature > span,
[data-theme="dark"] .weather-current > span,
[data-theme="dark"] .conditions-list dt,
[data-theme="dark"] .runtime-detail,
[data-theme="dark"] .energy-pair {
  color: var(--muted);
}

[data-theme="dark"] .energy-pair b {
  color: var(--ink);
}

[data-theme="dark"] .energy-result,
[data-theme="dark"] .empty h3 {
  color: #b2d8a4;
}

[data-theme="dark"] .energy-result.deficit {
  color: #f1cd8d;
}

[data-theme="dark"] .horizon-control {
  background: #0e1c13;
}

[data-theme="dark"] .horizon-control button {
  color: #bbcfb3;
}

[data-theme="dark"] .horizon-control button.selected,
[data-theme="dark"] .estimate-label,
[data-theme="dark"] .prep-number {
  color: #d1e6bf;
  background: #30472e;
  box-shadow: none;
}

[data-theme="dark"] .timeline-step.done {
  color: #b2d8a4;
  border-color: #8eb280;
}

[data-theme="dark"] .timeline-step.active {
  color: #f1cd8d;
  border-color: #d9b66c;
}

[data-theme="dark"] .chart-label {
  fill: #c1d1bb;
}

[data-theme="dark"] .chart-grid {
  stroke: #40523f;
}

[data-theme="dark"] .chart polyline[stroke="#527b5c"] {
  stroke: #a5d4a2;
}

[data-theme="dark"] .chart polyline[stroke="#caa25a"] {
  stroke: #e8c47d;
}

[data-theme="dark"] .login-art p {
  color: #b8cabc;
}

[data-theme="dark"] dialog {
  color: var(--ink);
  background: var(--paper);
  border-color: #52705b;
  box-shadow: 0 25px 90px #0008;
}

[data-theme="dark"] dialog::backdrop {
  background: #030a06c9;
}

[data-theme="dark"] textarea,
[data-theme="dark"] input.form-input,
[data-theme="dark"] select.form-input {
  color: var(--ink);
  background: #0f1e15;
  border-color: #657d62;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: #a9bba5;
  opacity: 1;
}

[data-theme="dark"] .search:focus-within {
  border-color: #a0c68e;
  box-shadow: 0 0 0 2px #769e63;
}

[data-theme="dark"] .skip-link {
  color: var(--ink);
  background: var(--paper);
}

[data-theme="dark"] #toast {
  color: #e9f4e5;
  background: #30462d;
  border: 1px solid #8daa7d;
}

[data-theme="dark"] button:focus-visible,
[data-theme="dark"] a:focus-visible,
[data-theme="dark"] input:focus-visible,
[data-theme="dark"] select:focus-visible,
[data-theme="dark"] textarea:focus-visible {
  outline-color: #f2c97d;
}

[data-theme="dark"] .conditions-list > div,
[data-theme="dark"] .incident-row,
[data-theme="dark"] .activity-item,
[data-theme="dark"] td,
[data-theme="dark"] .demo-strip,
[data-theme="dark"] .outlook-row,
[data-theme="dark"] .forecast-footnote,
[data-theme="dark"] .inventory-lifecycle-actions,
[data-theme="dark"] .assignee-control,
[data-theme="dark"] .bank-alarm-counts {
  border-color: var(--line);
}

[data-theme="dark"] .timeline-step:not(.done):not(.active) {
  border-color: var(--line);
}
:root[data-theme="dark"] .storm-triage-banner {
  background: #342e1f;
  border-color: #685737;
  color: #f1d49a;
}
:root[data-theme="dark"] .expected-soc strong {
  color: var(--ink);
}
:root[data-theme="dark"] .guide-card {
  background: var(--paper);
}
