/* Codex visual themes. Classic preserves the complete existing CSS. */
.codex-theme-switch{display:flex!important;align-items:end;gap:9px!important;flex-wrap:wrap;padding:9px!important}
.codex-theme-switch label{display:grid;gap:3px;margin:0!important}
.codex-theme-switch select{min-width:100px!important;max-width:143px!important}
.codex-theme-profile{padding:17px 19px;margin:14px 0 22px;border-radius:17px;background:#f6f9fc;border:1px solid #dae6ee;color:#18314b}
.codex-theme-profile h3{font-size:18px;margin:0 0 7px;color:#15334b}.codex-theme-profile p{margin:0 0 13px;color:#64748b;line-height:1.5;font-size:13px}
.codex-theme-controls{display:flex;flex-wrap:wrap;gap:12px}.codex-theme-controls label{display:grid;gap:6px;font-size:11px;font-weight:800;text-transform:uppercase;color:#496477;min-width:170px}
.codex-theme-controls select{min-height:39px;padding:8px 10px;border-radius:9px;font-size:13px}
.codex-theme-previews{display:flex;gap:7px;margin:12px 0;flex-wrap:wrap}.codex-swatch{padding:7px 11px;border-radius:7px;font-size:11px;font-weight:800}
.swatch-classic{background:#e7effb;color:#235092}.swatch-executive{background:#162333;color:#d7b574}.swatch-modern{background:#e3f5f3;color:#116c69}
.codex-theme-profile small{font-size:11px;color:#64748b}
/* Palettes are applied to application only: the login remains brand-consistent. */
html[data-codex-style="executive"] .app{--codex-accent:#b99657;--codex-accent2:#9c7938;--codex-panel:#152338;--codex-body:#091525;--codex-border:rgba(191,164,113,.23)}
html[data-codex-style="modern"] .app{--codex-accent:#159a91;--codex-accent2:#116d75;--codex-panel:#122c35;--codex-body:#0a1e27;--codex-border:rgba(32,181,165,.22)}
html[data-codex-style]:not([data-codex-style="classic"]) .app .side{background:var(--codex-body)!important;border-right:1px solid var(--codex-border)!important}
html[data-codex-style]:not([data-codex-style="classic"]) .app .workspace{background:var(--codex-panel)!important;border-color:var(--codex-border)!important;box-shadow:0 16px 48px rgba(0,0,0,.19)!important;border-radius:22px!important}
html[data-codex-style]:not([data-codex-style="classic"]) .app .nav a.active{background:var(--codex-accent2)!important;color:#fff!important}
html[data-codex-style]:not([data-codex-style="classic"]) .app .brand-mini span{color:var(--codex-accent)!important}
html[data-codex-style]:not([data-codex-style="classic"]) .app .avatar{background:var(--codex-accent2)!important}
html[data-codex-style]:not([data-codex-style="classic"]) .app .box,html[data-codex-style]:not([data-codex-style="classic"]) .app .stat,html[data-codex-style]:not([data-codex-style="classic"]) .app .summary-card{border-radius:15px!important}
html[data-codex-style]:not([data-codex-style="classic"]) .app button:not(.btn-red):not(.btn-clear-small):not(.btn-danger):not(.btn-remove),html[data-codex-style]:not([data-codex-style="classic"]) .app .btn:not(.btn-red):not(.btn-danger){border-radius:10px}
html[data-codex-style="executive"] .app .tab.active{background:#ac884c!important;color:#fff!important}
html[data-codex-style="modern"] .app .tab.active{background:#128f88!important;color:#fff!important}
html[data-codex-style="executive"] .app .chip{background:#f5eddb;color:#73531d}
html[data-codex-style="modern"] .app .chip{background:#ddf6f3;color:#116b65}
html[data-codex-style="executive"][data-codex-theme="light"] .app{--codex-body:#e9e4db;--codex-panel:#faf8f3;--codex-border:#e2d6bd}
html[data-codex-style="modern"][data-codex-theme="light"] .app{--codex-body:#e9f4f3;--codex-panel:#f8fcfc;--codex-border:#cce5e2}
html[data-codex-style]:not([data-codex-style="classic"])[data-codex-theme="light"] .app .side{background:#f5f8f8!important}
html[data-codex-style="executive"][data-codex-theme="light"] .app .side{background:#f7f3e9!important}
html[data-codex-style]:not([data-codex-style="classic"])[data-codex-theme="light"] .app .workspace{background:var(--codex-panel)!important}
@media(max-width:640px){.codex-theme-switch{width:100%}.codex-theme-switch select{width:100%!important}.codex-theme-controls{display:grid;grid-template-columns:1fr 1fr}}
