/* Bullshit Budget — optional light palette. Dark theme remains the original design. */
:root[data-theme="dark"] {
  color-scheme: dark;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7f0;
  --panel: #ffffff;
  --panel2: #ecf2e7;
  --line: #d1ddd0;
  --mute: #536655;
  --lime: #426d22;
  --black: #17241a;
  --text: #17241a;
  --muted: #536655;
  color: #17241a;
  background: var(--bg);
}

/* Theme chooser matches the existing Settings styles, without a form submit. */
.theme-settings {
  min-width: 0;
}
.theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.theme-option {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid #415044;
  background: #141c16;
  color: #cbd7ca;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  position: relative;
}
.theme-option input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.theme-option:has(input:checked) {
  border-color: #b6d979;
  background: #33432d;
  color: #eef8e6;
}
.theme-option:has(input:focus-visible) {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

/* Dashboard and bottom sheets */
:root[data-theme="light"] .app-header {
  border-color: var(--line);
}
:root[data-theme="light"] .brand-caption,
:root[data-theme="light"] .eyebrow,
:root[data-theme="light"] .period-caption,
:root[data-theme="light"] .stat-top,
:root[data-theme="light"] .field-label,
:root[data-theme="light"] .helper,
:root[data-theme="light"] .backup-status,
:root[data-theme="light"] .privacy-note,
:root[data-theme="light"] .stat-foot,
:root[data-theme="light"] .transaction-meta,
:root[data-theme="light"] .footer-note,
:root[data-theme="light"] .category-filter-wrap label,
:root[data-theme="light"] .category-total-label {
  color: #526454;
}
:root[data-theme="light"] .icon-button,
:root[data-theme="light"] .period-picker,
:root[data-theme="light"] .filter-group {
  background: #eaf0e7;
  border-color: #d1ddd0;
  color: #1e3423;
}
:root[data-theme="light"] .period-arrow,
:root[data-theme="light"] .close-button,
:root[data-theme="light"] .edit-button,
:root[data-theme="light"] .count-chip {
  background: #dce8d9;
  border-color: #c5d4c4;
  color: #29452c;
}
:root[data-theme="light"] .period-arrow:hover,
:root[data-theme="light"] .icon-button:hover,
:root[data-theme="light"] .close-button:hover,
:root[data-theme="light"] .edit-button:hover {
  background: #cadcca;
}
:root[data-theme="light"] .privacy-pill {
  border-color: #abc7a0;
  color: #35552f;
}
:root[data-theme="light"] .stat,
:root[data-theme="light"] .category-breakdown {
  background: #fff;
  border-color: #d4dfd2;
}
:root[data-theme="light"] .balance-card {
  background: linear-gradient(135deg, #d5f3a1 0%, #bee782 75%, #b0d979 100%);
}
:root[data-theme="light"] .add-button {
  background: #254b30;
  color: #fff;
}
:root[data-theme="light"] .add-button-arrow {
  color: #d0e7d0;
}
:root[data-theme="light"] .filter {
  color: #526655;
}
:root[data-theme="light"] .filter.active {
  background: #cae2c4;
  color: #1f3c26;
}
:root[data-theme="light"] .transaction-row {
  border-color: #e0e8df;
}
:root[data-theme="light"] .transaction-avatar {
  background: #e8f0e5;
  color: #365c38;
}
:root[data-theme="light"] .transaction-avatar.card {
  background: #f6ecd3;
  color: #755b2d;
}
:root[data-theme="light"] .status-button {
  color: #446346;
}
:root[data-theme="light"] .status-button.paid {
  color: #296239;
}
:root[data-theme="light"] .status-button:not(.paid) {
  color: #87561c;
}
:root[data-theme="light"] .empty-state {
  color: #647766;
  border-color: #b8c9b7;
}
:root[data-theme="light"] .empty-state strong {
  color: #243a29;
}
:root[data-theme="light"] .empty-icon {
  color: #59775b;
}
:root[data-theme="light"] .link-button {
  color: #315e2b;
}
:root[data-theme="light"] .dialog {
  background: #fff;
  border-color: #d7e2d4;
  box-shadow: 0 30px 80px #0004;
}
:root[data-theme="light"] .dialog-grabber {
  background: #b7c8b6;
}
:root[data-theme="light"] .field-input,
:root[data-theme="light"] .money-wrap,
:root[data-theme="light"] .schedule-select,
:root[data-theme="light"] .category-select,
:root[data-theme="light"] .category-filter {
  background: #fafdf8;
  border-color: #c4d4c1;
  color: #1b3020;
}
:root[data-theme="light"] .money-wrap span {
  color: #4d6d4e;
}
:root[data-theme="light"] .money-wrap input {
  color: #1b3020;
}
:root[data-theme="light"] .field-input::placeholder,
:root[data-theme="light"] .money-wrap input::placeholder {
  color: #758774;
}
:root[data-theme="light"] .method-choice {
  background: #f8faf5;
  border-color: #c6d5c2;
  color: #526655;
}
:root[data-theme="light"] .method-choice.selected {
  background: #dfefcf;
  border-color: #507f38;
  color: #203e22;
}
:root[data-theme="light"] .switch {
  background: #b8c6b4;
  border-color: #99ad95;
}
:root[data-theme="light"] .switch:after {
  background: #fff;
}
:root[data-theme="light"] .paid-toggle small {
  color: #5a715e;
}
:root[data-theme="light"] .primary-button {
  background: #315c2d;
  color: #fff;
}
:root[data-theme="light"] .secondary-button {
  background: #e0eae0;
  color: #24412a;
  border-color: #c2d0bf;
}
:root[data-theme="light"] .settings-divider {
  background: #d7e3d4;
}
:root[data-theme="light"] .settings-action {
  background: #edf4eb;
  border-color: #cfddcb;
  color: #23412a;
}
:root[data-theme="light"] .settings-action:hover {
  background: #dcecd7;
}
:root[data-theme="light"] .settings-action > span:last-child {
  color: #527354;
}
:root[data-theme="light"] .category-total strong {
  color: #1e3323;
}
:root[data-theme="light"] .category-total-track {
  background: #d7e4d1;
}
:root[data-theme="light"] .category-total-fill {
  background: #4a842f;
}
:root[data-theme="light"] .install-steps,
:root[data-theme="light"] .install-desktop-note {
  background: #f1f6ed;
  border-color: #d5e1d0;
  color: #315034;
}
:root[data-theme="light"] .install-intro,
:root[data-theme="light"] .install-steps li div span {
  color: #455e49;
}
:root[data-theme="light"] .install-steps li + li {
  border-color: #d3e1ce;
}
:root[data-theme="light"] .install-step-icon {
  background: #e0ecd5;
  border-color: #b5ceaa;
  color: #315b2c;
}
:root[data-theme="light"] .install-steps strong {
  color: #203727;
}
:root[data-theme="light"] .install-subnote {
  color: #5d725e;
}
:root[data-theme="light"] .theme-option {
  background: #f3f7f1;
  border-color: #c6d5c3;
  color: #455e48;
}
:root[data-theme="light"] .theme-option:has(input:checked) {
  background: #d8ebcf;
  border-color: #598848;
  color: #26452c;
}

/* Privacy and About are standalone static pages using privacy.css. */
:root[data-theme="light"] .page-header,
:root[data-theme="light"] section:not(.summary),
:root[data-theme="light"] .page-footer {
  border-color: var(--line);
}
:root[data-theme="light"] .summary {
  background: #fff;
  border-color: #d4e0d1;
}
:root[data-theme="light"] .summary h2,
:root[data-theme="light"] .eyebrow {
  color: #426d22;
}
:root[data-theme="light"] .page-shell p,
:root[data-theme="light"] .page-shell main ul {
  color: #425b46;
}
:root[data-theme="light"] .page-shell strong,
:root[data-theme="light"] .page-shell h1,
:root[data-theme="light"] .page-shell h2 {
  color: #172c1d;
}
:root[data-theme="light"] .page-shell a {
  color: #315f2c;
}
:root[data-theme="light"] .operator-note {
  background: #eaf1e6;
}
:root[data-theme="light"] .about-action {
  background: #315c2d;
  color: #fff !important;
}
:root[data-theme="light"] .about-action:hover {
  background: #274e27;
}
