/* Color presets extend the shared tokens; semantic status colors are preserved. */
html.cp-evergreen[data-color-scheme="ocean"]:not([data-theme="dark"]) {
    --bg-primary: hsl(218 35% 97%);
    --cp-cream: hsl(218 35% 97%);
    --bg-secondary: #ffffff;
    --cp-surface: #ffffff;
    --bg-tertiary: hsl(218 30% 94%);
    --bg-sidebar: hsl(218 30% 94%);
    --bg-muted: hsl(218 30% 94%);
    --bg-light: hsl(218 30% 94%);
    --table-head-bg: hsl(218 30% 94%);
    --bg-code: hsl(218 30% 94%);
    --bg-hover: hsl(218 35% 91%);
    --text-primary: hsl(218 30% 20%);
    --text-heading: hsl(218 35% 12%);
    --text-dark: hsl(218 35% 12%);
    --cp-ink: hsl(218 35% 12%);
    --text-secondary: hsl(218 20% 35%);
    --table-head-text: hsl(218 20% 35%);
    --text-muted: hsl(218 17% 40%);
    --border-color: hsl(218 25% 84%);
    --border-soft: hsl(218 25% 84%);
    --border-light: hsl(218 25% 84%);
    --cp-border-strong: hsl(218 20% 67%);
    --accent-color: #0055cc;
    --primary-color: #0055cc;
    --purple-color: #0055cc;
    --purple-text: #0055cc;
    --focus-ring: #0055cc;
    --accent-hover: hsl(218 65% 28%);
    --primary-hover: hsl(218 65% 28%);
    --accent-bg: hsl(218 65% 93%);
    --accent-light: hsl(218 65% 93%);
    --accent-soft-bg: hsl(218 65% 93%);
    --primary-light: hsl(218 65% 93%);
    --primary-bg: hsl(218 65% 93%);
    --purple-bg: hsl(218 65% 93%);
    --cp-selection: hsl(218 65% 93%);
    --cp-mint: hsl(218 65% 93%);
    --ai-banner-bg: hsl(218 65% 93%);
    --cp-selection-text: hsl(218 65% 28%);
    --text-on-accent: #ffffff;
    --cp-action: #0055cc;
    --cp-action-hover: hsl(218 65% 28%);
    --cp-action-text: #ffffff;
    --skeleton-base: hsl(218 20% 88%);
    --skeleton-shine: hsl(218 20% 95%);
}
html.cp-evergreen[data-color-scheme="ocean"][data-theme="dark"] {
    --bg-primary: hsl(218 25% 8%);
    --cp-cream: hsl(218 25% 8%);
    --bg-secondary: hsl(218 22% 13%);
    --cp-surface: hsl(218 22% 13%);
    --bg-tertiary: hsl(218 24% 17%);
    --bg-sidebar: hsl(218 24% 17%);
    --bg-muted: hsl(218 24% 17%);
    --bg-light: hsl(218 24% 17%);
    --table-head-bg: hsl(218 24% 17%);
    --bg-code: hsl(218 24% 17%);
    --bg-hover: hsl(218 25% 22%);
    --text-primary: hsl(218 20% 89%);
    --text-heading: hsl(218 20% 96%);
    --text-dark: hsl(218 20% 96%);
    --cp-ink: hsl(218 20% 96%);
    --text-secondary: hsl(218 20% 73%);
    --table-head-text: hsl(218 20% 73%);
    --text-muted: hsl(218 18% 68%);
    --border-color: hsl(218 20% 29%);
    --border-soft: hsl(218 20% 29%);
    --border-light: hsl(218 20% 29%);
    --cp-border-strong: hsl(218 20% 44%);
    --accent-color: hsl(218 80% 78%);
    --primary-color: hsl(218 80% 78%);
    --purple-color: hsl(218 80% 78%);
    --purple-text: hsl(218 80% 78%);
    --focus-ring: hsl(218 80% 78%);
    --accent-hover: hsl(218 85% 86%);
    --primary-hover: hsl(218 85% 86%);
    --accent-bg: hsl(218 30% 23%);
    --accent-light: hsl(218 30% 23%);
    --accent-soft-bg: hsl(218 30% 23%);
    --primary-light: hsl(218 30% 23%);
    --primary-bg: hsl(218 30% 23%);
    --purple-bg: hsl(218 30% 23%);
    --cp-selection: hsl(218 30% 23%);
    --cp-mint: hsl(218 30% 23%);
    --ai-banner-bg: hsl(218 30% 23%);
    --cp-selection-text: hsl(218 75% 84%);
    --text-on-accent: hsl(218 30% 10%);
    --cp-action: hsl(218 75% 77%);
    --cp-action-hover: hsl(218 80% 85%);
    --cp-action-text: hsl(218 30% 10%);
    --skeleton-base: hsl(218 20% 22%);
    --skeleton-shine: hsl(218 20% 28%);
}
html.cp-evergreen[data-color-scheme="cloud"]:not([data-theme="dark"]) {
    --bg-primary: hsl(194 35% 97%);
    --cp-cream: hsl(194 35% 97%);
    --bg-secondary: #ffffff;
    --cp-surface: #ffffff;
    --bg-tertiary: hsl(194 30% 94%);
    --bg-sidebar: hsl(194 30% 94%);
    --bg-muted: hsl(194 30% 94%);
    --bg-light: hsl(194 30% 94%);
    --table-head-bg: hsl(194 30% 94%);
    --bg-code: hsl(194 30% 94%);
    --bg-hover: hsl(194 35% 91%);
    --text-primary: hsl(194 30% 20%);
    --text-heading: hsl(194 35% 12%);
    --text-dark: hsl(194 35% 12%);
    --cp-ink: hsl(194 35% 12%);
    --text-secondary: hsl(194 20% 35%);
    --table-head-text: hsl(194 20% 35%);
    --text-muted: hsl(194 17% 40%);
    --border-color: hsl(194 25% 84%);
    --border-soft: hsl(194 25% 84%);
    --border-light: hsl(194 25% 84%);
    --cp-border-strong: hsl(194 20% 67%);
    --accent-color: #08738a;
    --primary-color: #08738a;
    --purple-color: #08738a;
    --purple-text: #08738a;
    --focus-ring: #08738a;
    --accent-hover: hsl(194 65% 28%);
    --primary-hover: hsl(194 65% 28%);
    --accent-bg: hsl(194 65% 93%);
    --accent-light: hsl(194 65% 93%);
    --accent-soft-bg: hsl(194 65% 93%);
    --primary-light: hsl(194 65% 93%);
    --primary-bg: hsl(194 65% 93%);
    --purple-bg: hsl(194 65% 93%);
    --cp-selection: hsl(194 65% 93%);
    --cp-mint: hsl(194 65% 93%);
    --ai-banner-bg: hsl(194 65% 93%);
    --cp-selection-text: hsl(194 65% 28%);
    --text-on-accent: #ffffff;
    --cp-action: #08738a;
    --cp-action-hover: hsl(194 65% 28%);
    --cp-action-text: #ffffff;
    --skeleton-base: hsl(194 20% 88%);
    --skeleton-shine: hsl(194 20% 95%);
}
html.cp-evergreen[data-color-scheme="cloud"][data-theme="dark"] {
    --bg-primary: hsl(194 25% 8%);
    --cp-cream: hsl(194 25% 8%);
    --bg-secondary: hsl(194 22% 13%);
    --cp-surface: hsl(194 22% 13%);
    --bg-tertiary: hsl(194 24% 17%);
    --bg-sidebar: hsl(194 24% 17%);
    --bg-muted: hsl(194 24% 17%);
    --bg-light: hsl(194 24% 17%);
    --table-head-bg: hsl(194 24% 17%);
    --bg-code: hsl(194 24% 17%);
    --bg-hover: hsl(194 25% 22%);
    --text-primary: hsl(194 20% 89%);
    --text-heading: hsl(194 20% 96%);
    --text-dark: hsl(194 20% 96%);
    --cp-ink: hsl(194 20% 96%);
    --text-secondary: hsl(194 20% 73%);
    --table-head-text: hsl(194 20% 73%);
    --text-muted: hsl(194 18% 68%);
    --border-color: hsl(194 20% 29%);
    --border-soft: hsl(194 20% 29%);
    --border-light: hsl(194 20% 29%);
    --cp-border-strong: hsl(194 20% 44%);
    --accent-color: hsl(194 80% 78%);
    --primary-color: hsl(194 80% 78%);
    --purple-color: hsl(194 80% 78%);
    --purple-text: hsl(194 80% 78%);
    --focus-ring: hsl(194 80% 78%);
    --accent-hover: hsl(194 85% 86%);
    --primary-hover: hsl(194 85% 86%);
    --accent-bg: hsl(194 30% 23%);
    --accent-light: hsl(194 30% 23%);
    --accent-soft-bg: hsl(194 30% 23%);
    --primary-light: hsl(194 30% 23%);
    --primary-bg: hsl(194 30% 23%);
    --purple-bg: hsl(194 30% 23%);
    --cp-selection: hsl(194 30% 23%);
    --cp-mint: hsl(194 30% 23%);
    --ai-banner-bg: hsl(194 30% 23%);
    --cp-selection-text: hsl(194 75% 84%);
    --text-on-accent: hsl(194 30% 10%);
    --cp-action: hsl(194 75% 77%);
    --cp-action-hover: hsl(194 80% 85%);
    --cp-action-text: hsl(194 30% 10%);
    --skeleton-base: hsl(194 20% 22%);
    --skeleton-shine: hsl(194 20% 28%);
}
html.cp-evergreen[data-color-scheme="violet"]:not([data-theme="dark"]) {
    --bg-primary: hsl(262 35% 97%);
    --cp-cream: hsl(262 35% 97%);
    --bg-secondary: #ffffff;
    --cp-surface: #ffffff;
    --bg-tertiary: hsl(262 30% 94%);
    --bg-sidebar: hsl(262 30% 94%);
    --bg-muted: hsl(262 30% 94%);
    --bg-light: hsl(262 30% 94%);
    --table-head-bg: hsl(262 30% 94%);
    --bg-code: hsl(262 30% 94%);
    --bg-hover: hsl(262 35% 91%);
    --text-primary: hsl(262 30% 20%);
    --text-heading: hsl(262 35% 12%);
    --text-dark: hsl(262 35% 12%);
    --cp-ink: hsl(262 35% 12%);
    --text-secondary: hsl(262 20% 35%);
    --table-head-text: hsl(262 20% 35%);
    --text-muted: hsl(262 17% 40%);
    --border-color: hsl(262 25% 84%);
    --border-soft: hsl(262 25% 84%);
    --border-light: hsl(262 25% 84%);
    --cp-border-strong: hsl(262 20% 67%);
    --accent-color: #6941c6;
    --primary-color: #6941c6;
    --purple-color: #6941c6;
    --purple-text: #6941c6;
    --focus-ring: #6941c6;
    --accent-hover: hsl(262 65% 28%);
    --primary-hover: hsl(262 65% 28%);
    --accent-bg: hsl(262 65% 93%);
    --accent-light: hsl(262 65% 93%);
    --accent-soft-bg: hsl(262 65% 93%);
    --primary-light: hsl(262 65% 93%);
    --primary-bg: hsl(262 65% 93%);
    --purple-bg: hsl(262 65% 93%);
    --cp-selection: hsl(262 65% 93%);
    --cp-mint: hsl(262 65% 93%);
    --ai-banner-bg: hsl(262 65% 93%);
    --cp-selection-text: hsl(262 65% 28%);
    --text-on-accent: #ffffff;
    --cp-action: #6941c6;
    --cp-action-hover: hsl(262 65% 28%);
    --cp-action-text: #ffffff;
    --skeleton-base: hsl(262 20% 88%);
    --skeleton-shine: hsl(262 20% 95%);
}
html.cp-evergreen[data-color-scheme="violet"][data-theme="dark"] {
    --bg-primary: hsl(262 25% 8%);
    --cp-cream: hsl(262 25% 8%);
    --bg-secondary: hsl(262 22% 13%);
    --cp-surface: hsl(262 22% 13%);
    --bg-tertiary: hsl(262 24% 17%);
    --bg-sidebar: hsl(262 24% 17%);
    --bg-muted: hsl(262 24% 17%);
    --bg-light: hsl(262 24% 17%);
    --table-head-bg: hsl(262 24% 17%);
    --bg-code: hsl(262 24% 17%);
    --bg-hover: hsl(262 25% 22%);
    --text-primary: hsl(262 20% 89%);
    --text-heading: hsl(262 20% 96%);
    --text-dark: hsl(262 20% 96%);
    --cp-ink: hsl(262 20% 96%);
    --text-secondary: hsl(262 20% 73%);
    --table-head-text: hsl(262 20% 73%);
    --text-muted: hsl(262 18% 68%);
    --border-color: hsl(262 20% 29%);
    --border-soft: hsl(262 20% 29%);
    --border-light: hsl(262 20% 29%);
    --cp-border-strong: hsl(262 20% 44%);
    --accent-color: hsl(262 80% 78%);
    --primary-color: hsl(262 80% 78%);
    --purple-color: hsl(262 80% 78%);
    --purple-text: hsl(262 80% 78%);
    --focus-ring: hsl(262 80% 78%);
    --accent-hover: hsl(262 85% 86%);
    --primary-hover: hsl(262 85% 86%);
    --accent-bg: hsl(262 30% 23%);
    --accent-light: hsl(262 30% 23%);
    --accent-soft-bg: hsl(262 30% 23%);
    --primary-light: hsl(262 30% 23%);
    --primary-bg: hsl(262 30% 23%);
    --purple-bg: hsl(262 30% 23%);
    --cp-selection: hsl(262 30% 23%);
    --cp-mint: hsl(262 30% 23%);
    --ai-banner-bg: hsl(262 30% 23%);
    --cp-selection-text: hsl(262 75% 84%);
    --text-on-accent: hsl(262 30% 10%);
    --cp-action: hsl(262 75% 77%);
    --cp-action-hover: hsl(262 80% 85%);
    --cp-action-text: hsl(262 30% 10%);
    --skeleton-base: hsl(262 20% 22%);
    --skeleton-shine: hsl(262 20% 28%);
}
html.cp-evergreen[data-color-scheme="slate"]:not([data-theme="dark"]) {
    --bg-primary: hsl(215 35% 97%);
    --cp-cream: hsl(215 35% 97%);
    --bg-secondary: #ffffff;
    --cp-surface: #ffffff;
    --bg-tertiary: hsl(215 30% 94%);
    --bg-sidebar: hsl(215 30% 94%);
    --bg-muted: hsl(215 30% 94%);
    --bg-light: hsl(215 30% 94%);
    --table-head-bg: hsl(215 30% 94%);
    --bg-code: hsl(215 30% 94%);
    --bg-hover: hsl(215 35% 91%);
    --text-primary: hsl(215 30% 20%);
    --text-heading: hsl(215 35% 12%);
    --text-dark: hsl(215 35% 12%);
    --cp-ink: hsl(215 35% 12%);
    --text-secondary: hsl(215 20% 35%);
    --table-head-text: hsl(215 20% 35%);
    --text-muted: hsl(215 17% 40%);
    --border-color: hsl(215 25% 84%);
    --border-soft: hsl(215 25% 84%);
    --border-light: hsl(215 25% 84%);
    --cp-border-strong: hsl(215 20% 67%);
    --accent-color: #344054;
    --primary-color: #344054;
    --purple-color: #344054;
    --purple-text: #344054;
    --focus-ring: #344054;
    --accent-hover: hsl(215 65% 28%);
    --primary-hover: hsl(215 65% 28%);
    --accent-bg: hsl(215 65% 93%);
    --accent-light: hsl(215 65% 93%);
    --accent-soft-bg: hsl(215 65% 93%);
    --primary-light: hsl(215 65% 93%);
    --primary-bg: hsl(215 65% 93%);
    --purple-bg: hsl(215 65% 93%);
    --cp-selection: hsl(215 65% 93%);
    --cp-mint: hsl(215 65% 93%);
    --ai-banner-bg: hsl(215 65% 93%);
    --cp-selection-text: hsl(215 65% 28%);
    --text-on-accent: #ffffff;
    --cp-action: #344054;
    --cp-action-hover: hsl(215 65% 28%);
    --cp-action-text: #ffffff;
    --skeleton-base: hsl(215 20% 88%);
    --skeleton-shine: hsl(215 20% 95%);
}
html.cp-evergreen[data-color-scheme="slate"][data-theme="dark"] {
    --bg-primary: hsl(215 25% 8%);
    --cp-cream: hsl(215 25% 8%);
    --bg-secondary: hsl(215 22% 13%);
    --cp-surface: hsl(215 22% 13%);
    --bg-tertiary: hsl(215 24% 17%);
    --bg-sidebar: hsl(215 24% 17%);
    --bg-muted: hsl(215 24% 17%);
    --bg-light: hsl(215 24% 17%);
    --table-head-bg: hsl(215 24% 17%);
    --bg-code: hsl(215 24% 17%);
    --bg-hover: hsl(215 25% 22%);
    --text-primary: hsl(215 20% 89%);
    --text-heading: hsl(215 20% 96%);
    --text-dark: hsl(215 20% 96%);
    --cp-ink: hsl(215 20% 96%);
    --text-secondary: hsl(215 20% 73%);
    --table-head-text: hsl(215 20% 73%);
    --text-muted: hsl(215 18% 68%);
    --border-color: hsl(215 20% 29%);
    --border-soft: hsl(215 20% 29%);
    --border-light: hsl(215 20% 29%);
    --cp-border-strong: hsl(215 20% 44%);
    --accent-color: hsl(215 80% 78%);
    --primary-color: hsl(215 80% 78%);
    --purple-color: hsl(215 80% 78%);
    --purple-text: hsl(215 80% 78%);
    --focus-ring: hsl(215 80% 78%);
    --accent-hover: hsl(215 85% 86%);
    --primary-hover: hsl(215 85% 86%);
    --accent-bg: hsl(215 30% 23%);
    --accent-light: hsl(215 30% 23%);
    --accent-soft-bg: hsl(215 30% 23%);
    --primary-light: hsl(215 30% 23%);
    --primary-bg: hsl(215 30% 23%);
    --purple-bg: hsl(215 30% 23%);
    --cp-selection: hsl(215 30% 23%);
    --cp-mint: hsl(215 30% 23%);
    --ai-banner-bg: hsl(215 30% 23%);
    --cp-selection-text: hsl(215 75% 84%);
    --text-on-accent: hsl(215 30% 10%);
    --cp-action: hsl(215 75% 77%);
    --cp-action-hover: hsl(215 80% 85%);
    --cp-action-text: hsl(215 30% 10%);
    --skeleton-base: hsl(215 20% 22%);
    --skeleton-shine: hsl(215 20% 28%);
}

html.cp-evergreen[data-color-scheme]:not([data-color-scheme="evergreen"]) {
 --cp-sa-paper: var(--bg-primary); --cp-sa-surface: var(--bg-secondary);
 --cp-sa-mint: var(--cp-selection); --cp-sa-ink: var(--text-primary);
 --cp-sa-muted: var(--text-secondary); --cp-sa-line: var(--border-color);
 --cp-sa-orange: var(--cp-action); --cp-sa-accent-ink: var(--cp-action-text); --cp-sa-focus: var(--focus-ring);
}
.cp-appearance { position: relative; }
.cp-appearance-panel { position: absolute; right: 0; top: 52px; width: 280px; padding: 18px; border: 1px solid var(--border-color); border-radius: 10px; background: var(--bg-secondary); box-shadow: var(--cp-shadow-popover); z-index: 1100; }
.cp-appearance-panel[hidden] { display: none; }
.cp-appearance-panel h2 { margin: 0 0 6px; font-size: 16px; color: var(--text-heading); }
.cp-appearance-panel p { margin: 0 0 14px; font-size: 12px; color: var(--text-secondary); }
.cp-scheme { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px; margin: 5px 0; border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-secondary); color: var(--text-primary); text-align: left; font-size: 13px; cursor: pointer; }
.cp-scheme[aria-pressed="true"] { outline: 2px solid var(--focus-ring); outline-offset: 1px; background: var(--cp-selection); }
.cp-scheme-swatch { width: 28px; height: 22px; border-radius: 4px; border: 1px solid rgb(0 0 0 / 15%); background: linear-gradient(90deg,var(--swatch) 60%,var(--swatch-soft) 60%); flex-shrink: 0; }
.cp-scheme-check { margin-left: auto; visibility: hidden; }
.cp-scheme[aria-pressed="true"] .cp-scheme-check { visibility: visible; }
@media (max-width: 480px) { .cp-appearance-panel { position: fixed; top: 70px; right: 12px; width: min(280px,calc(100vw - 24px)); } }

html.cp-evergreen.cp-auth[data-color-scheme]:not([data-color-scheme="evergreen"]) .col-login-left > .row:first-child > .text-center::before { background: var(--accent-color); border-color: var(--cp-border-strong); box-shadow: 23px 22px 0 var(--cp-border-strong), 24px 23px 0 var(--border-color), -22px 55px 0 var(--cp-selection), -23px 56px 0 var(--cp-border-strong); }
html.cp-evergreen.cp-auth[data-color-scheme]:not([data-color-scheme="evergreen"]) .col-login-left > .row:first-child > .text-center::after { border-color: var(--cp-action-hover); box-shadow: 0 7px 0 var(--cp-action-hover); }
html.cp-evergreen.cp-auth[data-color-scheme]:not([data-color-scheme="evergreen"]) :is(.btn-login, .wm-login-btn) { background: var(--cp-action) !important; border-color: var(--cp-action) !important; color: var(--cp-action-text) !important; }
html.cp-evergreen[data-color-scheme]:not([data-color-scheme="evergreen"]):is(.cp-auth,.cp-filemanager,.cp-fileeditor) :is(.btn-login,.wm-login-btn,.btn-primary,.btn-success,.btn-light):hover { background: var(--cp-action-hover) !important; border-color: var(--cp-action-hover) !important; color: var(--cp-action-text) !important; }
