/* Stellar Global Finance · curated luxury palettes · progressive overrides.
   Existing components and routes retain their structure. */
html[data-sgf-theme]{
 --lux-deep:#12223a;--lux-deep2:#0a182a;--lux-metal:#d1a96c;--lux-metal-bright:#f5dbad;--lux-blue:#356fba;--lux-paper:#f6f8fb;--lux-surface:#fff;--lux-ink:#21314a;--lux-muted:#76869b;--lux-line:#e5eaf0;--lux-shade:0 12px 34px rgba(20,39,63,.065);
 --lux-sidebar:#15243d;--lux-sidebar-ink:#a9b9ce;--lux-hero-gradient:linear-gradient(130deg,#071425,#12283e 70%,#153647);
 color-scheme:light;
}
html[data-sgf-theme="emerald-reserve"]{--lux-deep:#133b35;--lux-deep2:#0b2926;--lux-metal:#bda06a;--lux-metal-bright:#e7d2a6;--lux-blue:#217c66;--lux-paper:#f5f8f6;--lux-ink:#1b3b35;--lux-muted:#6d8780;--lux-line:#dfebe5;--lux-sidebar:#14362f;--lux-sidebar-ink:#b4d0c4;--lux-hero-gradient:linear-gradient(125deg,#09241f,#175447 66%,#183c37)}
html[data-sgf-theme="sapphire-estate"]{--lux-deep:#17274e;--lux-deep2:#0e1a39;--lux-metal:#b7c9e6;--lux-metal-bright:#edf4ff;--lux-blue:#3e72c8;--lux-paper:#f4f7fd;--lux-ink:#263b63;--lux-muted:#7789a8;--lux-line:#e2e9f5;--lux-sidebar:#13264b;--lux-sidebar-ink:#bdcce6;--lux-hero-gradient:linear-gradient(125deg,#071633,#213e74 70%,#182c50)}
html[data-sgf-theme="ivory-atelier"]{--lux-deep:#403528;--lux-deep2:#29251e;--lux-metal:#b78a4b;--lux-metal-bright:#ecd29b;--lux-blue:#9a7150;--lux-paper:#faf7f1;--lux-ink:#463c2d;--lux-muted:#857962;--lux-line:#ede5d9;--lux-sidebar:#41372b;--lux-sidebar-ink:#dbcfbc;--lux-hero-gradient:linear-gradient(120deg,#2a271f,#66513a 60%,#3f392d)}
html[data-sgf-theme="royal-plum"]{--lux-deep:#332744;--lux-deep2:#201a31;--lux-metal:#d3a7cb;--lux-metal-bright:#f5e4ef;--lux-blue:#9663a6;--lux-paper:#faf7fb;--lux-ink:#42324c;--lux-muted:#937b9a;--lux-line:#eee5ef;--lux-sidebar:#332640;--lux-sidebar-ink:#d4beda;--lux-hero-gradient:linear-gradient(125deg,#201528,#543659 68%,#30243f)}
html[data-sgf-theme="graphite-silver"]{--lux-deep:#272c32;--lux-deep2:#181e26;--lux-metal:#bbcad3;--lux-metal-bright:#f1f5f9;--lux-blue:#617d96;--lux-paper:#f5f6f8;--lux-ink:#303b47;--lux-muted:#7d8a96;--lux-line:#e1e6ea;--lux-sidebar:#252e38;--lux-sidebar-ink:#bdc9d3;--lux-hero-gradient:linear-gradient(125deg,#181f27,#384550 67%,#252e37)}
/* Public homepage: preserve the original particle animation and section geometry. */
html[data-sgf-theme] .sgf-hero{background:radial-gradient(ellipse at 75% 30%,color-mix(in srgb,var(--lux-metal) 19%,transparent),transparent 52%),var(--lux-hero-gradient)}
html[data-sgf-theme] .sgf-nav .sgf-nav-cta,html[data-sgf-theme] .sgf-button-primary{background:linear-gradient(120deg,var(--lux-metal-bright),var(--lux-metal));color:var(--lux-deep2)}
html[data-sgf-theme] .sgf-logo-icon{color:var(--lux-metal-bright);border-color:var(--lux-metal)}
html[data-sgf-theme] .sgf-wealth{background:var(--lux-deep)}
html[data-sgf-theme] .sgf-trust-mark,html[data-sgf-theme] .sgf-section-kicker{color:var(--lux-metal)}
html[data-sgf-theme] .sgf-solution-card:hover{border-color:var(--lux-metal)}
html[data-sgf-theme] .sgf-footer{background:var(--lux-deep2)}
.sgf-custom-logo{display:block;width:100%;height:100%;object-fit:contain;border-radius:inherit}
.sgf-logo-icon:has(.sgf-custom-logo),.prestige-mark:has(.sgf-custom-logo){padding:3px;background:transparent;border:1px solid color-mix(in srgb,var(--lux-metal) 54%,transparent)}
.sgf-logo-icon .sgf-custom-logo,.prestige-mark .sgf-custom-logo{width:100%;height:100%;object-fit:contain}
/* Portal: polished, unified cards with theme-aware accents. */
html[data-sgf-theme] body.portal-body.prestige-body{background:var(--lux-paper);color:var(--lux-ink);--pw-gold:var(--lux-metal);--pw-navy:var(--lux-deep2);--pw-ink:var(--lux-ink);--pw-ink2:var(--lux-ink);--pw-muted:var(--lux-muted);--pw-line:var(--lux-line);--fin-blue:var(--lux-blue);--fin-amber:var(--lux-metal);--fin-text:var(--lux-ink);--fin-line:var(--lux-line)}
html[data-sgf-theme] .prestige-shell .prestige-sidebar{background:linear-gradient(170deg,var(--lux-sidebar),var(--lux-deep2));color:var(--lux-sidebar-ink)}
html[data-sgf-theme] .prestige-mark{background:linear-gradient(130deg,var(--lux-metal-bright),var(--lux-metal));color:var(--lux-deep2)}
html[data-sgf-theme] .prestige-shell .prestige-topbar,html[data-sgf-theme] .prestige-content,html[data-sgf-theme] .portal-content{background:var(--lux-paper)}
html[data-sgf-theme] .prestige-shell .prestige-topbar{background:var(--lux-surface);border-color:var(--lux-line)}
html[data-sgf-theme] .prestige-breadcrumb b,html[data-sgf-theme] .pw-section-title h2,html[data-sgf-theme] .pw-accounts-title h2,html[data-sgf-theme] .prestige-main h1,html[data-sgf-theme] .prestige-main h2,html[data-sgf-theme] .prestige-main h3{color:var(--lux-ink)}
html[data-sgf-theme] .prestige-main .ui-panel,html[data-sgf-theme] .prestige-main .ux-card,html[data-sgf-theme] .prestige-main .pw-panel,html[data-sgf-theme] .prestige-main .pw-stat,html[data-sgf-theme] .prestige-main .pw-account-panel,html[data-sgf-theme] .prestige-main .pw-product,html[data-sgf-theme] .prestige-main .metric-card{background:var(--lux-surface);border-color:var(--lux-line);box-shadow:var(--lux-shade);border-radius:17px}
html[data-sgf-theme] .prestige-shell .sidebar-link.selected{box-shadow:inset 3px 0 var(--lux-metal);color:var(--lux-metal-bright)!important;background:color-mix(in srgb,var(--lux-metal) 14%,transparent)}
html[data-sgf-theme] .prestige-shell .sidebar-link.selected svg{color:var(--lux-metal-bright)}
html[data-sgf-theme] .prestige-shell .primary-btn,html[data-sgf-theme] .prestige-main .demo-btn,html[data-sgf-theme] .prestige-main .ux-btn-blue{background:var(--lux-blue);border-color:var(--lux-blue)}
html[data-sgf-theme] .prestige-main .pw-wealth-hero,html[data-sgf-theme] .prestige-main .pw-admin-hero,html[data-sgf-theme] .prestige-main .ux-retirement-banner{background:radial-gradient(circle at 90% 15%,color-mix(in srgb,var(--lux-metal) 35%,transparent),transparent 53%),var(--lux-hero-gradient)}
html[data-sgf-theme] .pw-welcome .pw-eyebrow,html[data-sgf-theme] .pw-eyebrow,html[data-sgf-theme] .ux-eyebrow{color:var(--lux-blue)}
html[data-sgf-theme] .prestige-demo-mark{color:var(--lux-sidebar-ink)}
/* Auth pages also respect the selected site style. */
html[data-sgf-theme] body:has(.auth-shell){background:var(--lux-paper);color:var(--lux-ink)}
html[data-sgf-theme] .auth-side{background:radial-gradient(circle at 85% 24%,color-mix(in srgb,var(--lux-metal) 21%,transparent),transparent 54%),var(--lux-hero-gradient)}
html[data-sgf-theme] .auth-card .logo,html[data-sgf-theme] .auth-card button[type=submit],html[data-sgf-theme] .auth-side .pill{background:var(--lux-metal);color:var(--lux-deep2)}
html[data-sgf-theme] .auth-card input:focus{border-color:var(--lux-metal);box-shadow:0 0 0 3px color-mix(in srgb,var(--lux-metal) 22%,transparent)}
/* Per-user light/dark preference. Applied only to authenticated portal. */
html[data-sgf-mode=dark]{color-scheme:dark;--lux-paper:#111a25;--lux-surface:#1b2736;--lux-ink:#f0f3f8;--lux-muted:#a3b2c3;--lux-line:#344256;--lux-shade:0 16px 30px rgba(0,0,0,.17)}
html[data-sgf-mode=dark] .prestige-shell .prestige-topbar,html[data-sgf-mode=dark] .prestige-main .ui-panel,html[data-sgf-mode=dark] .prestige-main .ux-card,html[data-sgf-mode=dark] .prestige-main .pw-panel,html[data-sgf-mode=dark] .prestige-main .pw-stat,html[data-sgf-mode=dark] .prestige-main .pw-account-panel,html[data-sgf-mode=dark] .prestige-main .pw-product{color:var(--lux-ink)}
html[data-sgf-mode=dark] .prestige-main p,html[data-sgf-mode=dark] .prestige-main small{color:var(--lux-muted)}
html[data-sgf-mode=dark] .prestige-shell .prestige-disclosure,html[data-sgf-mode=dark] .prestige-main .ux-card-top,html[data-sgf-mode=dark] .prestige-main .pw-bottom-grid,html[data-sgf-mode=dark] .prestige-main .feature-row{border-color:var(--lux-line)}
html[data-sgf-mode=dark] .prestige-main input,html[data-sgf-mode=dark] .prestige-main select,html[data-sgf-mode=dark] .prestige-main textarea{background:#212f40;color:#f4f8fc;border-color:#40516a}
html[data-sgf-mode=dark] .prestige-main .ui-table th,html[data-sgf-mode=dark] .prestige-main .demo-table th{background:#243247;color:#b3c4d5}
html[data-sgf-mode=dark] .prestige-main .ui-table td,html[data-sgf-mode=dark] .prestige-main .demo-table td{color:#d1dce8;border-color:var(--lux-line)}
html[data-sgf-mode=dark] .prestige-main .pw-stat-link,html[data-sgf-mode=dark] .prestige-main .pw-admin-links a{color:var(--lux-ink)!important}
html[data-sgf-mode=dark] .prestige-main .pw-admin-links>a strong{color:var(--lux-ink)}
html[data-sgf-mode=dark] .prestige-main .pw-stat small{color:#a3b2c3}
html[data-sgf-mode=dark] .prestige-main .pw-product-card,html[data-sgf-mode=dark] .prestige-main .pw-product{background:var(--lux-surface)}
/* shared actionable color scheme selector */
.sgf-mode-toggle{display:inline-flex;align-items:center;gap:7px;padding:8px 12px;border:1px solid var(--lux-line);border-radius:11px;color:var(--lux-ink);background:var(--lux-surface);font-weight:750;font-size:11px;white-space:nowrap;cursor:pointer;transition:box-shadow .2s,transform .2s}
.sgf-mode-toggle:hover{box-shadow:0 5px 14px #0001;transform:translateY(-1px)}
.sgf-mode-toggle svg{height:16px;width:16px;stroke:currentColor}
.sgf-mode-toggle:focus-visible{outline:3px solid var(--lux-metal);outline-offset:2px}
.sgf-appearance-options{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}
.sgf-appearance-options label{display:inline-flex;align-items:center;gap:8px;padding:10px 15px;border-radius:10px;background:var(--lux-paper);border:1px solid var(--lux-line);cursor:pointer}
.sgf-appearance-options input{accent-color:var(--lux-blue)}
.sgf-theme-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr));gap:15px;margin:20px 0 28px}
.sgf-theme-card{border:1px solid var(--lux-line);border-radius:17px;background:var(--lux-surface);padding:12px;cursor:pointer;display:block;box-shadow:var(--lux-shade);transition:transform .18s,border .18s}
.sgf-theme-card:hover{transform:translateY(-3px);border-color:var(--lux-metal)}
.sgf-theme-card:has(input:checked){outline:2px solid var(--lux-blue);outline-offset:2px}
.sgf-theme-card input{accent-color:var(--lux-blue)}
.sgf-theme-thumb{height:115px;display:grid;grid-template-columns:30% 1fr;overflow:hidden;border-radius:11px;margin-bottom:12px;box-shadow:inset 0 0 0 1px #0001}
.sgf-theme-thumb aside{background:var(--thumb-deep)}
.sgf-theme-thumb main{padding:13px;background:var(--thumb-bg);display:flex;flex-direction:column;gap:8px}
.sgf-theme-thumb i{display:block;border-radius:5px;height:20px;background:var(--thumb-card);box-shadow:inset 0 0 0 1px #0001}
.sgf-theme-thumb i:last-child{width:68%;height:24px;background:var(--thumb-metal)}
.sgf-theme-card strong{color:var(--lux-ink);font-size:13px}
.sgf-theme-card small{display:block;color:var(--lux-muted);font-size:11px;margin:3px 0 8px}
.sgf-branding-form .ui-panel{margin:0 0 18px}
.sgf-brand-preview{display:flex;align-items:center;gap:20px;flex-wrap:wrap;background:var(--lux-paper);border-radius:15px;padding:20px;border:1px solid var(--lux-line)}
.sgf-brand-preview img{width:64px;height:64px;object-fit:contain}
.sgf-brand-preview .sgf-logo-initial{width:64px;height:64px;border-radius:15px;display:grid;place-items:center;color:var(--lux-deep);font-weight:900;font-size:36px;background:var(--lux-metal)}
.sgf-badge{display:inline-block;padding:6px 9px;border-radius:99px;background:color-mix(in srgb,var(--lux-metal) 16%,var(--lux-surface));color:var(--lux-ink);font-size:11px;font-weight:800}
/* Layout stability, spacing, accessibility. */
html[data-sgf-theme] body.portal-body .portal-main{overflow-wrap:anywhere}
html[data-sgf-theme] body.portal-body button,html[data-sgf-theme] body.portal-body select{min-height:36px}
html[data-sgf-theme] body.portal-body a:focus-visible{outline:3px solid var(--lux-metal);outline-offset:3px}
@media(max-width:760px){.sgf-mode-toggle{min-height:38px;min-width:38px;justify-content:center;padding:8px}.sgf-mode-toggle .sgf-mode-label{display:none}.prestige-shell .prestige-topbar{gap:7px}.sgf-theme-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}
@media(max-width:430px){.sgf-theme-gallery{grid-template-columns:1fr}.prestige-shell .prestige-breadcrumb{font-size:9px;letter-spacing:0}}
@media(prefers-reduced-motion:reduce){.sgf-theme-card,.sgf-mode-toggle{transition:none!important}}

.sgf-legacy-mark{display:inline-flex;align-items:center;justify-content:center;width:37px;height:37px;border-radius:9px;background:var(--lux-metal);color:var(--lux-deep2);font-size:24px;font-weight:900;position:relative}.sgf-legacy-mark>span{font-size:8px;position:absolute;top:2px;right:2px}.navbar-brand:has(.sgf-legacy-mark){display:inline-flex;align-items:center;gap:10px;color:var(--lux-metal)!important;font-size:15px;letter-spacing:1.4px}.navbar-brand .sgf-custom-logo{width:100%;height:100%}
@media(min-width:1100px){.sgf-solution-grid:has(.sgf-solution-card:nth-child(4)){grid-template-columns:repeat(4,minmax(0,1fr))}.sgf-solution-grid:has(.sgf-solution-card:nth-child(4)) .sgf-solution-card{padding:31px 23px}}
@media(min-width:761px) and (max-width:1099px){.sgf-solution-grid:has(.sgf-solution-card:nth-child(4)){grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Dark refinements for account rows, charts, headings and forms. */
html[data-sgf-mode=dark] .prestige-main .pw-account-line{border-color:var(--lux-line);color:#e7edf6!important}
html[data-sgf-mode=dark] .prestige-main .pw-account-line:hover{background:#263449}
html[data-sgf-mode=dark] .prestige-main .pw-account-description b,html[data-sgf-mode=dark] .prestige-main .pw-client-card strong,html[data-sgf-mode=dark] .prestige-main .pw-accounts-title h2,html[data-sgf-mode=dark] .prestige-main .pw-product h3{color:var(--lux-ink)}
html[data-sgf-mode=dark] .prestige-main .pw-account-description small,html[data-sgf-mode=dark] .prestige-main .pw-account-arrow{color:var(--lux-muted)}
html[data-sgf-mode=dark] .prestige-main .pw-retirement-feature{background:linear-gradient(115deg,#1d3a40,#233247);border-color:#355459}
html[data-sgf-mode=dark] .prestige-main .pw-retirement-feature h3,html[data-sgf-mode=dark] .prestige-main .pw-retirement-feature p{color:#edf5f4}
html[data-sgf-mode=dark] .prestige-main .pw-product-banner{background:linear-gradient(120deg,#3d3327,#68513b)}
html[data-sgf-mode=dark] .prestige-main .pw-product-banner h3,html[data-sgf-mode=dark] .prestige-main .pw-product-banner p,html[data-sgf-mode=dark] .prestige-main .pw-product-banner>a{color:#faf0e2!important}
html[data-sgf-mode=dark] .prestige-main .pw-product-category{background:#2c3a4d;color:#c3cedc}
html[data-sgf-mode=dark] .prestige-main .pw-tabbar{border-color:var(--lux-line)}
html[data-sgf-mode=dark] .prestige-main .pw-tabbar>a.current{color:var(--lux-metal-bright);border-bottom-color:var(--lux-metal)}
html[data-sgf-mode=dark] .prestige-main .pw-tabbar>a:hover{color:var(--lux-metal-bright)}
html[data-sgf-mode=dark] .prestige-main .pw-client-reference{background:#233248;border-color:var(--lux-line)}
html[data-sgf-mode=dark] .prestige-main .pw-client-reference strong{color:#f0f4f9}
html[data-sgf-mode=dark] .prestige-main .pw-wealth-note,html[data-sgf-mode=dark] .prestige-main .pw-wealth-amount{color:#fff}
html[data-sgf-mode=dark] .prestige-main .pw-panel-heading{border-color:var(--lux-line)}
html[data-sgf-mode=dark] .prestige-main .pw-table td,html[data-sgf-mode=dark] .prestige-main .pw-table th{color:#d9e3ee;border-color:var(--lux-line)}
html[data-sgf-mode=dark] .prestige-main .pw-table th{color:#a4b5c7}
html[data-sgf-mode=dark] .prestige-main .ui-form label{color:#d6e0ed}
html[data-sgf-mode=dark] .prestige-main .demo-panel{background:var(--lux-surface);border-color:var(--lux-line)}
html[data-sgf-mode=dark] .prestige-main .demo-panel h2,html[data-sgf-mode=dark] .prestige-main .demo-panel h3{color:var(--lux-ink)}
html[data-sgf-mode=dark] .prestige-main .feature-row strong{color:var(--lux-ink)}
html[data-sgf-mode=dark] .prestige-main .pw-accounts-title p,html[data-sgf-mode=dark] .prestige-main .page-heading p{color:var(--lux-muted)}
html[data-sgf-theme] .prestige-shell .prestige-brand{font-size:clamp(12px,1vw,16px);line-height:1.24;min-width:0;letter-spacing:.7px}
html[data-sgf-theme] .prestige-shell .prestige-brand>span:last-child{min-width:0;overflow-wrap:anywhere}
@media(max-width:600px){html[data-sgf-theme] .prestige-shell .prestige-topbar{padding-left:13px;padding-right:13px}html[data-sgf-theme] .prestige-shell .prestige-breadcrumb{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}html[data-sgf-theme] .pw-admin-hero{padding:24px}html[data-sgf-theme] .pw-welcome{gap:15px}html[data-sgf-theme] .prestige-main{padding-left:14px;padding-right:14px}}

/* Specialist trading workspace follows the investor's saved light/dark preference. */
html[data-sgf-theme] body:has(.trading-grid){--gold:var(--lux-metal);--blue:var(--lux-blue)}
html[data-sgf-mode=light] body:has(.trading-grid){--bg:#f4f7fa;--surface:#ffffff;--panel:#ffffff;--panel-high:#f2f5fa;--line:#dde6ef;--txt:#203047;--muted:#63768a;--sub:#8a97a8;--green:#187f63;--red:#c85569;--blue:var(--lux-blue);--gold:var(--lux-metal);background:var(--lux-paper)}
html[data-sgf-mode=light] body:has(.trading-grid) .topbar{background:#fff;border-bottom-color:var(--lux-line)}
html[data-sgf-mode=light] body:has(.trading-grid) .mode-strip{background:#edf2f7;color:#536478;border-bottom-color:#e0e7ed}
html[data-sgf-mode=light] body:has(.trading-grid) .logo{color:#27364c}
html[data-sgf-mode=light] body:has(.trading-grid) .nav-outline{border-color:var(--lux-line)}
html[data-sgf-mode=light] body:has(.trading-grid) .mode-pill{color:#92703d;border-color:#bca479}
html[data-sgf-mode=light] body:has(.trading-grid) .mode-strip a{color:#78603f}
html[data-sgf-mode=light] body:has(.trading-grid) .glass-panel{background:#fff;border-color:var(--lux-line)}
html[data-sgf-mode=light] body:has(.trading-grid) .data-panel thead,html[data-sgf-mode=light] body:has(.trading-grid) .watch-head{background:#f0f3f7;color:#647588}
html[data-sgf-theme] .logo-mark:has(.sgf-custom-logo){padding:3px;background:transparent;border:1px solid var(--lux-metal)}
html[data-sgf-theme] body:has(.trading-grid) .logo-mark:not(:has(.sgf-custom-logo)){background:var(--lux-metal);color:var(--lux-deep2)}
@media(max-width:860px){html[data-sgf-theme] body:has(.trading-grid) .sgf-mode-toggle{font-size:10px;padding:6px 9px}html[data-sgf-theme] body:has(.trading-grid) .topbar{flex-wrap:wrap}}
