/* TradePilot unified dark theme — shared by public site, student workspace and admin */
:root{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark;--tp-dark-bg:#0b1220;--tp-dark-surface:#111c2d;--tp-dark-surface-2:#17253a;--tp-dark-line:#263750;--tp-dark-text:#e7eef8;--tp-dark-muted:#9aabc0;--tp-dark-blue:#68a9ff}
html[data-theme="dark"] body{background:var(--tp-dark-bg)!important;color:var(--tp-dark-text)!important}
html[data-theme="dark"] .app-shell{background:var(--tp-dark-bg)!important}
html[data-theme="dark"] .sidebar{background:#0e1929!important;border-color:var(--tp-dark-line)!important;color:var(--tp-dark-text)!important}
html[data-theme="dark"] .brand,html[data-theme="dark"] .topbar h1,html[data-theme="dark"] .panel-head h3,html[data-theme="dark"] .stat-card strong,html[data-theme="dark"] .empty-state h3{color:#e8f1ff!important}
html[data-theme="dark"] .main,html[data-theme="dark"] .topbar{color:var(--tp-dark-text)!important}
html[data-theme="dark"] .topbar{background:rgba(11,18,32,.94)!important;border-color:var(--tp-dark-line)!important}
html[data-theme="dark"] .nav-item{color:#aebdd0!important}
html[data-theme="dark"] .nav-item:hover,html[data-theme="dark"] .nav-item.active{background:#172c47!important;color:#83baff!important}
html[data-theme="dark"] .side-label,html[data-theme="dark"] .eyebrow,html[data-theme="dark"] .muted,html[data-theme="dark"] .welcome p{color:var(--tp-dark-muted)!important}
html[data-theme="dark"] .panel,html[data-theme="dark"] .stat-card,html[data-theme="dark"] .auth-card,html[data-theme="dark"] .ticket-message,html[data-theme="dark"] .modal,html[data-theme="dark"] .dropdown-menu{background:var(--tp-dark-surface)!important;border-color:var(--tp-dark-line)!important;color:var(--tp-dark-text)!important;box-shadow:0 8px 28px rgba(0,0,0,.18)!important}
html[data-theme="dark"] .welcome,html[data-theme="dark"] .calc-result{background:linear-gradient(120deg,#142b46,#111c2d)!important;border-color:#294765!important}
html[data-theme="dark"] .welcome h2,html[data-theme="dark"] .auth-card h1,html[data-theme="dark"] .panel h2,html[data-theme="dark"] .panel h3,html[data-theme="dark"] .panel h4{color:#e5efff!important}
html[data-theme="dark"] .lang,html[data-theme="dark"] .user-chip,html[data-theme="dark"] .btn.ghost{background:#17263a!important;border-color:#30445e!important;color:#d9e7f8!important}
html[data-theme="dark"] input:not([type=checkbox]):not([type=radio]):not([type=range]),html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#0e1929!important;border-color:#30445e!important;color:#e6eef9!important}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#7588a0!important}
html[data-theme="dark"] table th{background:#17253a!important;color:#aebed2!important}
html[data-theme="dark"] table td{border-color:#263750!important;color:#d5e0ee!important}
html[data-theme="dark"] .summary-row,html[data-theme="dark"] .ticket-meta,html[data-theme="dark"] .support-reply{border-color:#263750!important;color:#b9c8da!important}
html[data-theme="dark"] .empty-overlay{background:rgba(14,25,41,.88)!important;color:#9fb0c5!important}
html[data-theme="dark"] .symbol-picker,html[data-theme="dark"] .field-help,html[data-theme="dark"] .ticket-message.from-user{background:#142238!important;border-color:#30445e!important;color:#c4d2e4!important}
html[data-theme="dark"] .ticket-message.from-support{background:#102c2b!important;border-color:#24534c!important}
html[data-theme="dark"] .ticket-message.internal-note{background:#302817!important;border-color:#5b4825!important}
html[data-theme="dark"] .pill.buy{background:#123b32!important;color:#72d9b2!important}
html[data-theme="dark"] .pill.sell{background:#421f2a!important;color:#ff9ca5!important}
html[data-theme="dark"] .count{background:#1b304b!important;color:#8bbcff!important}
html[data-theme="dark"] .tp-account-switcher{background:#142238!important;border-color:#30445e!important}
html[data-theme="dark"] .tp-account-switcher label{color:#aebed2!important}
html[data-theme="dark"] .tp-account-switcher select{background:#0e1929!important;color:#e6eef9!important}
html[data-theme="dark"] footer{color:#8192a8!important}
/* Public landing page */
html[data-theme="dark"] body.landing-page{background:#0a1220!important;color:#e8eff9!important}
html[data-theme="dark"] .tp-header,html[data-theme="dark"] .lp-header{background:rgba(10,18,32,.94)!important;border-color:#263750!important}
html[data-theme="dark"] .tp-nav-links a,html[data-theme="dark"] .tp-login,html[data-theme="dark"] .tp-lang{color:#d4e1f2!important}
html[data-theme="dark"] .tp-hero,html[data-theme="dark"] .tp-home-v19,html[data-theme="dark"] .lp-hero,html[data-theme="dark"] .lp-section,html[data-theme="dark"] .tp-section{background-color:#0a1220!important;color:#e8eff9!important}
html[data-theme="dark"] .tp-hero h1,html[data-theme="dark"] .tp-home h2,html[data-theme="dark"] .tp-home h3,html[data-theme="dark"] .lp-section h2,html[data-theme="dark"] .lp-section h3{color:#edf4ff!important}
html[data-theme="dark"] .tp-hero p,html[data-theme="dark"] .tp-home p,html[data-theme="dark"] .lp-section p{color:#a9bad0!important}
html[data-theme="dark"] .tp-tools,html[data-theme="dark"] .tp-workflow,html[data-theme="dark"] .tp-psychology,html[data-theme="dark"] .tp-learning,html[data-theme="dark"] .tp-trust,html[data-theme="dark"] .tp-faq,html[data-theme="dark"] .tp-referral,html[data-theme="dark"] .tp-pricing,html[data-theme="dark"] .lp-pricing,html[data-theme="dark"] .lp-how,html[data-theme="dark"] .lp-journal{background:#0e1929!important;color:#e8eff9!important}
html[data-theme="dark"] .tp-card,html[data-theme="dark"] .tp-feature-card,html[data-theme="dark"] .tp-tool-card,html[data-theme="dark"] .tp-plan,html[data-theme="dark"] .lp-plan,html[data-theme="dark"] .lp-feature,html[data-theme="dark"] .tp-faq-item,html[data-theme="dark"] .tp-step,html[data-theme="dark"] .tp-referral-card{background:#142238!important;border-color:#2b405b!important;color:#dce7f5!important;box-shadow:0 16px 38px rgba(0,0,0,.2)!important}
html[data-theme="dark"] .tp-plan h3,html[data-theme="dark"] .lp-plan h3,html[data-theme="dark"] .tp-card h3,html[data-theme="dark"] .lp-feature h3{color:#edf4ff!important}
html[data-theme="dark"] .tp-plan p,html[data-theme="dark"] .lp-plan li,html[data-theme="dark"] .tp-card p,html[data-theme="dark"] .lp-feature p{color:#afc0d4!important}
html[data-theme="dark"] .tp-window,html[data-theme="dark"] .tp-product-window,html[data-theme="dark"] .mock-window{background:#111e31!important;border-color:#30445e!important;color:#e6eef9!important}
html[data-theme="dark"] .tp-window-body,html[data-theme="dark"] .tp-chart-card,html[data-theme="dark"] .tp-kpi-grid>div{background:#17283f!important;color:#e6eef9!important;border-color:#30445e!important}
html[data-theme="dark"] .tp-campaign-banner{background:linear-gradient(110deg,#102a49,#173b5b 55%,#103d3a)!important;color:#f0f6ff!important}
html[data-theme="dark"] .tp-footer,html[data-theme="dark"] .lp-footer{background:#070e19!important;color:#aebed2!important;border-color:#263750!important}
html[data-theme="dark"] .tp-footer a,html[data-theme="dark"] .lp-footer a{color:#9fc8ff!important}
html[data-theme="dark"] .tp-home a:not(.tp-button),html[data-theme="dark"] .lp-section a:not(.lp-plan-btn){color:#8bbcff}
html[data-theme="dark"] .tp-button,html[data-theme="dark"] .lp-button{color:#fff!important}
/* Theme switch control */
.tp-theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:38px;padding:8px 12px;border:1px solid rgba(125,151,183,.35);border-radius:11px;background:rgba(255,255,255,.82);color:#29435f;font:inherit;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap;transition:background .18s,border-color .18s,transform .18s;backdrop-filter:blur(10px)}
.tp-theme-toggle:hover{transform:translateY(-1px);border-color:#6aa7ef;background:#fff}
.tp-theme-toggle .tp-theme-icon{font-size:16px;line-height:1}
html[data-theme="dark"] .tp-theme-toggle{background:#17283f!important;border-color:#38516f!important;color:#e4efff!important}
html[data-theme="dark"] .tp-theme-toggle:hover{background:#203754!important}
.tp-theme-floating{position:fixed;z-index:9990;top:14px;inset-inline-end:16px;box-shadow:0 6px 20px rgba(0,0,0,.12)}
@media(max-width:700px){.tp-theme-toggle{min-height:34px;padding:7px 9px;font-size:11px}.tp-theme-floating{top:10px;inset-inline-end:10px}}

html[data-theme="dark"] .tp-home-v19 section:not(.tp-campaign-banner){background-color:#0e1929!important}
html[data-theme="dark"] .tp-home-v19 .tp-hero{background-color:#0a1220!important}
html[data-theme="dark"] .tp-home-v19 .tp-final-cta{background-color:#102541!important}

/* Landing header theme switch placement */
.tp21-actions .tp-theme-toggle{min-height:38px;padding:7px 10px;border-radius:10px;font-size:11px;gap:6px;box-shadow:none}
.tp21-actions .tp-theme-toggle .tp-theme-icon{font-size:15px}
.tp21-actions .tp-theme-toggle:hover{transform:translateY(-1px)}
.tp21-mobile-menu .tp-theme-mobile{width:100%;min-height:38px;margin-top:7px;justify-content:center;border-radius:9px}
