/* Six approved palettes; semantic task/category/status colors are unchanged. */
:root {
  --theme-rgb: 123,175,142;
  --theme-on-primary: #FFFFFF;
  --theme-hover: var(--primary-dark);
  --theme-on-hover: #FFFFFF;
  --theme-link: var(--primary-dark);
  --sidebar-start: #f0f7f3;
  --sidebar-end: #e8f4ee;
  --bg-card: #FFFFFF;
}
:root[data-theme="purple"], .theme-option[data-theme-choice="purple"] {
  --primary: #D8D1E1; --primary-light: #EDE8F2; --primary-dark: #766580; --primary-bg: #F0EDF4;
  --bg: #FAF9FB; --text-primary: #47414E; --text-secondary: #625B6A; --text-muted: #756E7C; --border: #E7E2EB;
  --sidebar-start: #F0EDF4; --sidebar-end: #EDE8F2; --theme-rgb: 184,172,202;
  --theme-on-primary: #51455D; --theme-hover: #C9BFD5; --theme-on-hover: #51455D; --theme-link: #766580;
  --calendar-start: #FAF9FB; --calendar-end: #F0EDF4;
}
:root[data-theme="pink"], .theme-option[data-theme-choice="pink"] {
  --primary: #E6D3DB; --primary-light: #F3E8EC; --primary-dark: #856170; --primary-bg: #F5EFF1;
  --bg: #FCF9FA; --text-primary: #4C4247; --text-secondary: #6C5C64; --text-muted: #7B7075; --border: #EEE3E8;
  --sidebar-start: #F5EFF1; --sidebar-end: #F3E8EC; --theme-rgb: 197,170,181;
  --theme-on-primary: #664C58; --theme-hover: #D9C1CB; --theme-on-hover: #664C58; --theme-link: #856170;
  --calendar-start: #FCF9FA; --calendar-end: #F5EFF1;
}
:root[data-theme="rose"], .theme-option[data-theme-choice="rose"] {
  --primary: #BE3F73; --primary-light: #D77A9E; --primary-dark: #9C2F5C; --primary-bg: #F6E1E9;
  --bg: #FCF5F8; --text-primary: #523441; --text-secondary: #735563; --text-muted: #806B75; --border: #EFDDE5;
  --sidebar-start: #F6E1E9; --sidebar-end: #F5DFE8; --theme-rgb: 190,63,115;
  --theme-on-primary: #FFFFFF; --theme-hover: #9C2F5C; --theme-on-hover: #FFFFFF; --theme-link: #A43260;
  --calendar-start: #FCF5F8; --calendar-end: #F6E1E9;
}
:root[data-theme="blue"], .theme-option[data-theme-choice="blue"] {
  --primary: #4675A4; --primary-light: #92B5D7; --primary-dark: #365D84; --primary-bg: #E2EDF7;
  --bg: #F3F7FC; --text-primary: #334456; --text-secondary: #50667A; --text-muted: #68798A; --border: #DDE6EF;
  --sidebar-start: #E2EDF7; --sidebar-end: #DEEBF7; --theme-rgb: 70,117,164;
  --theme-on-primary: #FFFFFF; --theme-hover: #365D84; --theme-on-hover: #FFFFFF; --theme-link: #4675A4;
  --calendar-start: #F3F7FC; --calendar-end: #E2EDF7;
}
:root[data-theme="apricot"], .theme-option[data-theme-choice="apricot"] {
  --primary: #9E6740; --primary-light: #E3B889; --primary-dark: #80512F; --primary-bg: #F7EBDD;
  --bg: #FCF7F0; --text-primary: #4E4033; --text-secondary: #6B5C4D; --text-muted: #7E7265; --border: #EBE0D3;
  --sidebar-start: #F7EBDD; --sidebar-end: #F4E5D4; --theme-rgb: 158,103,64;
  --theme-on-primary: #FFFFFF; --theme-hover: #80512F; --theme-on-hover: #FFFFFF; --theme-link: #9E6740;
  --calendar-start: #FCF7F0; --calendar-end: #F7EBDD;
}
.theme-option[data-theme-choice="green"] {
  --primary: #7BAF8E; --primary-light: #A8D5BA; --primary-bg: #EEF6F1;
}
/* Keep pale-theme buttons readable, including calendar, mobile and inventory controls. */
.sidebar-logo, .user-avatar, .time-tab.active, .filter-chip:hover, .filter-chip.active,
.month-rule-btn:hover, .year-radar-gen-btn:hover, .fab-add, .btn-primary,
.cal-day.today .cal-day-num, .mobile-quick-send, .mobile-kanban-tab.active, .hh-tabs button.active {
  color: var(--theme-on-primary);
}
.btn-primary:hover { background: var(--theme-hover); color: var(--theme-on-hover); }
.mobile-quick-send:active { background: var(--theme-hover); color: var(--theme-on-hover); }
html:not([data-theme="green"]) .cal-day.selected {
  border-color: var(--primary-dark); background: var(--primary-bg); box-shadow: inset 0 0 0 1px var(--primary-light);
}
html:not([data-theme="green"]) a,
html:not([data-theme="green"]) .col-action-btn:hover,
html:not([data-theme="green"]) .view-all-link,
html:not([data-theme="green"]) .mobile-nav-item.active,
html:not([data-theme="green"]) .policy-tabs [aria-selected="true"],
html:not([data-theme="green"]) .policy-evidence button,
html:not([data-theme="green"]) .policy-title { color: var(--theme-link); }
html:not([data-theme="green"]) input:focus,
html:not([data-theme="green"]) select:focus,
html:not([data-theme="green"]) textarea:focus { border-color: var(--primary-dark); }
html:not([data-theme="green"]) .check-toggle input { accent-color: var(--primary-dark); }
.settings-nav { width: 100%; text-align: left; }
.settings-view { max-width: 1000px; margin: 0 auto; padding-bottom: 24px; }
.settings-view h2 { font-size: 24px; margin-bottom: 6px; }
.settings-intro, .settings-description { color: var(--text-secondary); line-height: 1.7; }
.settings-card { margin-top: 22px; background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.settings-card-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.settings-card-heading h3 { font-size: 18px; }
.settings-current { color: var(--primary-dark); background: var(--primary-bg); padding: 5px 10px; border-radius: 8px; font-size: 13px; }
.theme-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-top: 22px; }
.theme-option { text-align: left; background: #FFFFFF; color: #433E48; border: 1px solid #DDD8E2; border-radius: 12px; padding: 14px; min-width: 0; }
.theme-option:hover { box-shadow: var(--shadow-sm); }
.theme-option:focus-visible { outline: 3px solid var(--primary-dark); outline-offset: 3px; }
.theme-option[aria-pressed="true"] { border: 2px solid var(--primary-dark); padding: 13px; }
.theme-swatch { display: flex; height: 48px; overflow: hidden; border-radius: 8px; margin-bottom: 12px; }
.theme-swatch span { flex: 1; background: var(--primary-light); }
.theme-swatch span:first-child { flex: 2; background: var(--primary); }
.theme-swatch span:last-child { background: var(--primary-bg); }
.theme-option-label { display: flex; justify-content: space-between; gap: 5px; align-items: center; font-weight: 600; }
.theme-selected { visibility: hidden; color: #514A59; }
.theme-option[aria-pressed="true"] .theme-selected { visibility: visible; }
.theme-option-note { display: block; font-size: 12px; color: #736D79; margin-top: 4px; }
.theme-status { margin-top: 16px; min-height: 22px; color: var(--text-secondary); font-size: 13px; }
@media(max-width:768px) {
  .settings-view h2 { font-size: 21px; }
  .settings-card { padding: 16px; }
  .theme-options { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .theme-option { padding: 11px; }
  .theme-option[aria-pressed="true"] { padding: 10px; }
  .theme-option-label { font-size: 13px; }
}
