/* Classic inherits the existing palette. Other styles retain the same layout. */
:root[data-theme="forest"] {
  --brand-blue:#215c4b; --brand-blue-2:#33775e;
  --brand-green:#427b39; --brand-green-2:#c1d899;
  --bg:#f1f6f3; --card:#fff; --text:#253b31; --muted:#617469; --border:#d5e2d9;
  --surface:#fff; --surface-2:#f6faf7; --thead:#edf4ef; --thead-border:#d5e2d9;
  --row-hover:#f0f7f2; --sidebar-bg:#215c4b; --sidebar-bg-2:#194537;
  --grad-primary:linear-gradient(180deg,#28654f,#1c4b3c);
  --grad-primary-soft:linear-gradient(135deg,#33775e,#215c4b);
  --shadow:0 8px 22px rgb(33 92 75 / 8%); --shadow-strong:0 18px 40px rgb(20 50 37 / 20%);
  --focus:rgb(51 119 94 / 18%);
  --form-border:#cbded2; --form-label:#547460; --form-text:#2d5542;
  --form-primary:#28654f; --form-primary-hover:#1c4b3c; --form-surface:#fff;
}
:root[data-theme="slate"] {
  --brand-blue:#37465b; --brand-blue-2:#53647a;
  --brand-green:#4b657d; --brand-green-2:#c8d7e8;
  --bg:#f0f2f5; --card:#fff; --text:#273345; --muted:#667386; --border:#d5dce5;
  --surface:#fff; --surface-2:#f8f9fb; --thead:#edf0f4; --thead-border:#d5dce5;
  --row-hover:#f2f4f7; --sidebar-bg:#37465b; --sidebar-bg-2:#293649;
  --grad-primary:#37465b; --grad-primary-soft:#45576d;
  --shadow:0 2px 7px rgb(39 51 69 / 5%); --shadow-strong:0 12px 30px rgb(39 51 69 / 16%);
  --focus:rgb(83 100 122 / 20%);
  --form-border:#ccd5e0; --form-label:#5e6c7f; --form-text:#37465b;
  --form-primary:#45576d; --form-primary-hover:#2f4055; --form-surface:#fff;
}

/* Shared surfaces include older workspaces that still declare literal colours. */
:root:is([data-theme="forest"],[data-theme="slate"]) :is(.topbar,.sidebar) {
  background:var(--sidebar-bg) !important;
}
:root:is([data-theme="forest"],[data-theme="slate"]) :is(
  .card,.dash-card,.dash-panel,.dashboard-insight-card,.dash-tablecard,
  .dashboard-hero,.translation-card,.auth-panel,.auth-card
) {
  background:var(--surface) !important;
  border-color:var(--border) !important;
  box-shadow:var(--shadow) !important;
}
:root:is([data-theme="forest"],[data-theme="slate"]) :is(
  .dashboard-hero h1,.dashboard-hero .dashboard-subtitle,.dash-panel h2,
  .dash-tabletitle,.dash-chart-title,.dash-card-body h2,.dashboard-insight-card h3,
  .auth-title,.auth-login-title
) { color:var(--brand-blue) !important; }
:root:is([data-theme="forest"],[data-theme="slate"]) .auth-overlay-clean { background:var(--bg) !important; }
:root:is([data-theme="forest"],[data-theme="slate"]) :is(.filter-toolbar,.filter-summary-label) {
  border-color:var(--form-border) !important;
}
:root:is([data-theme="forest"],[data-theme="slate"]) .filter-summary-label {
  color:var(--form-text); background:var(--surface-2);
}
:root:is([data-theme="forest"],[data-theme="slate"]) :is(.dash-table,.dataTable,.translation-table) thead th {
  color:var(--brand-blue) !important; background:var(--thead) !important;
  border-color:var(--thead-border) !important;
}
:root:is([data-theme="forest"],[data-theme="slate"]) .dash-table tr.total-row td {
  color:var(--brand-blue) !important; background:var(--thead) !important;
}
:root:is([data-theme="forest"],[data-theme="slate"]) :is(.language-menu-list,.theme-menu-list) {
  background:var(--surface); border-color:var(--border); color:var(--brand-blue);
}
:root:is([data-theme="forest"],[data-theme="slate"]) :is(.language-menu-option,.language-menu-link) { color:var(--brand-blue); }
:root:is([data-theme="forest"],[data-theme="slate"]) :is(.language-menu-option:hover,.language-menu-link:hover,.language-menu-option.is-selected) {
  background:var(--thead); color:var(--brand-blue);
}

.display-preferences { display:flex; align-items:center; gap:4px; flex-wrap:wrap; }
.theme-menu { position:relative; flex:0 0 auto; color:inherit; z-index:3; }
.topbar .theme-menu { color:rgb(255 255 255 / 90%); }
.theme-menu > summary { display:inline-flex; align-items:center; gap:7px; padding:8px 9px; border:0; border-radius:var(--ui-radius,4px); list-style:none; cursor:pointer; color:inherit; font-size:12px; font-weight:800; line-height:1; white-space:nowrap; }
.theme-menu > summary::-webkit-details-marker { display:none; }
.theme-menu > summary:hover,.theme-menu[open] > summary { background:rgb(255 255 255 / 14%); }
.theme-chevron { font-size:12px; opacity:.8; }
.theme-menu-list { display:none; position:absolute; inset-inline-end:0; top:calc(100% + 10px); width:190px; max-width:calc(100vw - 28px); padding:8px; border:1px solid var(--form-border,#cdd8eb); border-radius:var(--ui-radius,4px); background:var(--surface,#fff); color:var(--brand-blue); box-shadow:0 12px 28px rgb(15 23 42 / 16%); z-index:1400; }
.theme-menu[open] > .theme-menu-list { display:grid; gap:4px; }
.theme-menu-option { display:flex; align-items:center; gap:10px; width:100%; margin:0; padding:10px 12px; border:0; border-radius:var(--ui-radius,4px); background:transparent; color:inherit; font:inherit; font-size:.85rem; font-weight:700; text-align:start; cursor:pointer; box-shadow:none; }
.theme-menu-option:hover,.theme-menu-option.is-selected { background:var(--thead,#edf2fb); }
.theme-check { margin-inline-start:auto; visibility:hidden; }
.theme-menu-option[aria-pressed="true"] .theme-check { visibility:visible; }
.theme-swatch { width:18px; height:18px; border-radius:2px; border:1px solid rgb(0 0 0 / 15%); flex-shrink:0; }
.theme-swatch-classic { background:#243e8b; }.theme-swatch-forest { background:#215c4b; }.theme-swatch-slate { background:#37465b; }
.theme-menu > summary:focus-visible,.theme-menu-option:focus-visible { outline:2px solid currentColor; outline-offset:2px; }
.sidebar .display-preferences { margin:12px 10px; color:#fff; }
.sidebar .display-preferences .language-menu { margin:0; }
.sidebar .theme-menu-list { inset-inline-start:0; inset-inline-end:auto; }
.auth-login-footer .theme-menu > summary { font-size:.82rem; font-weight:600; padding:7px 9px; }
.auth-login-footer .theme-menu > summary:hover,.auth-login-footer .theme-menu[open] > summary { background:var(--thead,#edf2fb); }
.auth-login-footer .theme-menu-list { top:auto; bottom:calc(100% + 8px); }
@media(max-width:1200px) {
  .topbar .theme-menu [data-theme-current],.topbar .theme-chevron { display:none; }
}
@media(max-width:600px) {
  .topbar .display-preferences { flex-wrap:nowrap; gap:0; }
  .topbar .theme-menu > summary { min-width:32px; min-height:34px; justify-content:center; padding:7px; }
  .topbar-title { max-width:25vw !important; }
}
@media print {
  .display-preferences { display:none !important; }
}
