/* Every palette supports both Bootstrap color modes. */
.workspace-shell { --theme-primary: #0865ee; --theme-rgb: 8,101,238; --theme-highlight: #a9c3ff; --theme-highlight-rgb: 169,195,255; --sidebar-top: #112b4e; --sidebar-bottom: #102543; --sidebar-brand: #112b4e; }
[data-color-theme="Ocean"] { --theme-primary: #006caf; --theme-rgb: 0,108,175; --theme-highlight: #87d6ff; --theme-highlight-rgb: 135,214,255; --sidebar-top: #003c63; --sidebar-bottom: #062f43; --sidebar-brand: #002941; }
[data-color-theme="Forest"] { --theme-primary: #20713e; --theme-rgb: 32,113,62; --theme-highlight: #93dea7; --theme-highlight-rgb: 147,222,167; --sidebar-top: #16412b; --sidebar-bottom: #152c24; --sidebar-brand: #102c1d; }
[data-color-theme="Slate"] { --theme-primary: #526176; --theme-rgb: 82,97,118; --theme-highlight: #c0cddd; --theme-highlight-rgb: 192,205,221; --sidebar-top: #293747; --sidebar-bottom: #1c2632; --sidebar-brand: #182330; }
[data-color-theme="Rose"] { --theme-primary: #b1356a; --theme-rgb: 177,53,106; --theme-highlight: #ffafd0; --theme-highlight-rgb: 255,175,208; --sidebar-top: #5b2347; --sidebar-bottom: #3b1738; --sidebar-brand: #3c1731; }
[data-color-theme="Amber"] { --theme-primary: #966013; --theme-rgb: 150,96,19; --theme-highlight: #f7cf80; --theme-highlight-rgb: 247,207,128; --sidebar-top: #4e371c; --sidebar-bottom: #32271c; --sidebar-brand: #332411; }
[data-color-theme="Violet"] { --theme-primary: #7040b5; --theme-rgb: 112,64,181; --theme-highlight: #cfafff; --theme-highlight-rgb: 207,175,255; --sidebar-top: #3c245e; --sidebar-bottom: #28173f; --sidebar-brand: #28183e; }
[data-color-theme="Teal"] { --theme-primary: #067779; --theme-rgb: 6,119,121; --theme-highlight: #88dedb; --theme-highlight-rgb: 136,222,219; --sidebar-top: #0f4146; --sidebar-bottom: #123039; --sidebar-brand: #0a2c30; }
[data-color-theme="Midnight"] { --theme-primary: #4d56a0; --theme-rgb: 77,86,160; --theme-highlight: #bbc1ff; --theme-highlight-rgb: 187,193,255; --sidebar-top: #202646; --sidebar-bottom: #14182d; --sidebar-brand: #11172b; }
[data-color-theme="Crimson"] { --theme-primary: #b23243; --theme-rgb: 178,50,67; --theme-highlight: #ffafb9; --theme-highlight-rgb: 255,175,185; --sidebar-top: #5a202d; --sidebar-bottom: #371c2b; --sidebar-brand: #39151e; }
.workspace-shell { --bs-primary: var(--theme-primary); --bs-primary-rgb: var(--theme-rgb); --bs-link-color: var(--theme-primary); --bs-link-color-rgb: var(--theme-rgb); --bs-link-hover-color: var(--theme-primary); --bs-link-hover-color-rgb: var(--theme-rgb); --theme-button-text: #fff; }
.workspace-shell[data-bs-theme="dark"] { --bs-primary: var(--theme-highlight); --bs-primary-rgb: var(--theme-highlight-rgb); --bs-link-color: var(--theme-highlight); --bs-link-color-rgb: var(--theme-highlight-rgb); --bs-link-hover-color: var(--theme-highlight); --bs-link-hover-color-rgb: var(--theme-highlight-rgb); --theme-button-text: #101824; }
.workspace-sidebar { background: linear-gradient(180deg, var(--sidebar-top), var(--sidebar-bottom)); }
.sidebar-brand { background: var(--sidebar-brand); }
.sidebar-brand a span { color: var(--theme-highlight); }
.sidebar-link.active { box-shadow: inset 3px 0 0 var(--theme-highlight); }
.sidebar-caption, .sidebar-footer, .sidebar-footer span { color: #c4cddd; }
.eyebrow { color: var(--bs-primary); }
.card-symbol, .user-avatar { color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), .12); }
.research-card:hover { border-color: var(--bs-primary); }
.workspace-shell .btn-primary { --bs-btn-bg: var(--bs-primary); --bs-btn-border-color: var(--bs-primary); --bs-btn-color: var(--theme-button-text); --bs-btn-hover-bg: var(--bs-primary); --bs-btn-hover-border-color: var(--bs-primary); --bs-btn-hover-color: var(--theme-button-text); --bs-btn-active-bg: var(--bs-primary); --bs-btn-active-border-color: var(--bs-primary); --bs-btn-active-color: var(--theme-button-text); --bs-btn-disabled-bg: var(--bs-primary); --bs-btn-disabled-border-color: var(--bs-primary); --bs-btn-disabled-color: var(--theme-button-text); --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb); }
.workspace-shell .btn-outline-primary { --bs-btn-color: var(--bs-primary); --bs-btn-border-color: var(--bs-primary); --bs-btn-hover-bg: var(--bs-primary); --bs-btn-hover-border-color: var(--bs-primary); --bs-btn-hover-color: var(--theme-button-text); --bs-btn-active-bg: var(--bs-primary); --bs-btn-active-border-color: var(--bs-primary); --bs-btn-active-color: var(--theme-button-text); --bs-btn-disabled-color: var(--bs-primary); --bs-btn-disabled-border-color: var(--bs-primary); --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb); }
.workspace-shell .form-control:focus, .workspace-shell .form-select:focus { border-color: var(--bs-primary); box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .2); }
.workspace-toolbar, .appearance-controls, .mode-buttons { display: flex; align-items: center; gap: 12px; }
.appearance-controls { position: relative; gap: 8px; }
.appearance-controls .form-select { width: 125px; }
.mode-buttons { gap: 0; border: 1px solid var(--bs-border-color); border-radius: 6px; padding: 2px; }
.mode-button { border: 0; border-radius: 4px; color: var(--bs-secondary-color); background: transparent; padding: 4px 9px; }
.mode-button.active { color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), .15); }
.mode-button:hover { color: var(--bs-primary); }
[data-bs-theme="dark"] .chart-legend .close, [data-bs-theme="dark"] .chart-legend .ema-slow { color: #60a5fa; }
[data-bs-theme="dark"] .chart-legend .sma20 { color: #86efac; }
[data-bs-theme="dark"] .chart-legend .sma50 { color: #fdba74; }
[data-bs-theme="dark"] .chart-legend .sma200, [data-bs-theme="dark"] .chart-legend .ema-fast { color: #d8b4fe; }
[data-bs-theme="dark"] .history-chart .sma20 { stroke: #86efac; }
[data-bs-theme="dark"] .history-chart .sma50 { stroke: #fdba74; }
[data-bs-theme="dark"] .history-chart .sma200 { stroke: #d8b4fe; }
[data-bs-theme="dark"] .history-chart .rsi { stroke: #5eead4; }
[data-bs-theme="dark"] .history-chart .selected-price { fill: #60a5fa; }
.appearance-error { position: absolute; right: 0; top: 100%; width: 260px; padding: .6rem; background: var(--workspace-surface); color: var(--bs-danger-text-emphasis); border: 1px solid var(--bs-danger-border-subtle); border-radius: 5px; z-index: 10; font-size: .8rem; }
@media (max-width: 700px) { .workspace-topbar { align-items: flex-start; flex-wrap: wrap; } .workspace-toolbar { flex: 1; justify-content: flex-end; flex-wrap: wrap; } .workspace-caption { display: none; } }

