/* Client portal color schemes. Loaded after the existing component styles. */
:root{color-scheme:light;--surface:#fff;--surface-soft:#fafbfe;--field:#fff}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex-shrink:0;min-height:36px;padding:7px 10px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:8px;font-size:11px;cursor:pointer;white-space:nowrap}
.theme-toggle[hidden]{display:none}.theme-toggle:hover{border-color:var(--accent)}.theme-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7}
:root[data-theme=dark]{color-scheme:dark;--ink:#e7ecf7;--muted:#a4b1c8;--canvas:#111827;--line:#344157;--accent:#b3a7ff;--accent-light:#302b50;--nav:#101b2d;--surface:#1c2739;--surface-soft:#222f44;--field:#152033;--shadow:0 4px 22px #0002}
[data-theme=dark] body{background:var(--canvas);color:var(--ink)}
[data-theme=dark] :is(.portal-topbar,.panel,.contentbox,.search-panel,.stat-card,.resource-card,.auth-card,.product-card,.order-progress,.cartbox,.order-complete,.category-tabs a,.news-item,.library-category,.article-list,.header-account-options,.skip-link,.domain-input){background:var(--surface);color:var(--ink);border-color:var(--line)}
[data-theme=dark] :is(.brand,.top-links>a,.top-links .account-link,.header-account-options>a,.stat-value,.detail-grid dd,.detail-list dd,.account-email,.article-preview,.library-category,.resource-file,.product-card h3,.panel-heading,.order-help strong){color:var(--ink)}
[data-theme=dark] :is(.eyebrow,.nav-caption,.heading-action,.top-links>a,.portal-footer a,.account-help,.rich-text,.account-preferences>label,.modern-form>label,.modern-form .form-grid>label,.domain-search-fields label){color:var(--muted)}
[data-theme=dark] :is(.welcome-banner,.hero,.resource-hero,.order-help){background:linear-gradient(120deg,#2d284d,#1e2a41);color:var(--ink);border-color:#514774}
[data-theme=dark] :is(.stat-icon,.avatar,.category-tabs a[aria-current=page]){background:var(--accent-light);color:var(--accent)}
[data-theme=dark] :is(.attachment-field,.account-preferences>label,.account-list-heading,.ticket-message>header,.news-item[open]>summary,.account-email-item[open]>summary,.article-preview:hover,.account-email:hover,.header-account-options>a:hover,.rich-text pre){background:var(--surface-soft);border-color:var(--line);color:var(--ink)}
[data-theme=dark] :is(input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]),select,textarea){background:var(--field)!important;color:var(--ink)!important;border-color:var(--line)!important}
[data-theme=dark] input::placeholder,[data-theme=dark] textarea::placeholder{color:#95a3bc}
[data-theme=dark] :is(.btn,button,input[type=submit],input[type=button]){background:var(--surface-soft);color:var(--ink);border-color:var(--line)}
[data-theme=dark] :is(.btn-primary,button.btn-primary,input.btn-primary){background:#7060e5;color:#fff;border-color:#8272f1}
[data-theme=dark] :is(.table-scroll,.portal-content table,.portal-content td,.portal-content th){background:var(--surface);color:var(--ink);border-color:var(--line)}
[data-theme=dark] .portal-content :is(th,thead td){background:var(--surface-soft)}
[data-theme=dark] .alert-info{background:#223652;color:#d0e2ff;border-color:#3c5779}
[data-theme=dark] :is(.alert-error,.errorbox){background:#472b36;color:#ffc6cf;border-color:#81505d}
[data-theme=dark] :is(.alert-success,.successbox){background:#203e36;color:#b5edcf;border-color:#3b705b}
[data-theme=dark] .header-account-options>a.header-logout{color:#ffacb9}
[data-theme=dark] .email-reader-body{background:#fff;color:#53617b}
@media(max-width:760px){.top-links{gap:8px}.theme-toggle{padding:7px;min-width:34px}.theme-toggle [data-theme-label]{display:none}}
@media print{[data-theme-toggle]{display:none!important}:root[data-theme=dark]{--ink:#18223b;--muted:#53617b;--canvas:#fff;--surface:#fff;--surface-soft:#f5f6fa;--line:#d5d9e0;--field:#fff}}
