/* Shared controls. Light is explicit and never follows the system preference. */
:root{color-scheme:light}
:root[data-theme="dark"]{color-scheme:dark;background:#0e1421}
.theme-switcher{display:inline-flex;align-items:center;flex:0 0 auto;gap:2px;padding:3px;border:1px solid #e1e7f2;border-radius:999px;background:#f5f7fc;vertical-align:middle}
body .theme-switcher button{display:grid;place-items:center;width:30px;min-width:30px;height:30px;min-height:30px;margin:0;padding:0;border:0;border-radius:50%;background:transparent;color:#6d7890;box-shadow:none;cursor:pointer;transform:none;transition:background .18s,color .18s}
body .theme-switcher button svg{width:17px;height:17px;flex:none;pointer-events:none}
body .theme-switcher button[aria-pressed="true"]{background:#fff;color:#4775ff;box-shadow:0 1px 5px #22356715}
body .theme-switcher button:hover{color:#315de5;background:#e9efff;transform:none}
body .theme-switcher button:focus-visible{outline:2px solid #4775ff;outline-offset:3px}
.fd-menu-bottom{gap:12px}
.topbar-actions{gap:12px}
:root[data-theme="dark"] .theme-switcher{border-color:#34415b;background:#1c273b}
:root[data-theme="dark"] body .theme-switcher button{color:#aebbd0}
:root[data-theme="dark"] body .theme-switcher button[aria-pressed="true"]{color:#adbeff;background:#344776;box-shadow:0 1px 5px #0003}
:root[data-theme="dark"] body .theme-switcher button:hover{color:#fff;background:#344776}
@media(max-width:600px){body .theme-switcher{gap:0;padding:3px}body .theme-switcher button{width:28px;min-width:28px;height:30px;min-height:30px}.topbar-actions{gap:7px}}
@media(prefers-reduced-motion:reduce){body .theme-switcher button{transition:none}}
/* Keep brand accents, project images and authenticator codes intact. */
:root[data-theme="dark"] body,:root[data-theme="dark"] #landingView.fd-landing{background:#0e1421;color:#edf2fc}
:root[data-theme="dark"] .seo-page,:root[data-theme="dark"] .seo-directory{background:#0e1421;color:#edf2fc}
:root[data-theme="dark"] .fd-project-preview img,:root[data-theme="dark"] .fd-project-dialog img{background:#fff}
:root[data-theme="dark"] body.fd-product :is(#clientView,#adminView) .two-factor-qr{background:#fff;border-color:#fff}
:root[data-theme="dark"] input,:root[data-theme="dark"] select,:root[data-theme="dark"] textarea{caret-color:#b5c6ff}
:root[data-theme="dark"] select option{background:#1b263a;color:#edf2fc}
:root[data-theme="dark"] input:-webkit-autofill{-webkit-text-fill-color:#edf2fc;caret-color:#edf2fc;box-shadow:0 0 0 1000px #23324d inset!important}
:root[data-theme="dark"] ::selection{background:#527aff;color:#fff}
:root[data-theme="dark"] .fd-form .fd-control{color:#edf2fc}
:root[data-theme="dark"] .fd-form .fd-control::placeholder{color:#aab8ce}
:root[data-theme="dark"] .fd-form .fd-control:focus{background:#1b263ae6}
:root[data-theme="dark"] .fd-svg foreignObject div[style*="background:linear-gradient"]{background:linear-gradient(135deg,#1c2a3bcc,#18223866)!important}
:root[data-theme="dark"] .fd-header-holder foreignObject div[style*="color:"]{color:#eff3fc!important}
:root[data-theme="dark"] .fd-svg foreignObject [data-fd-fit][style*="background"]{background-image:linear-gradient(95deg,#eff3fc 35%,#8eaaff)!important;background-clip:text!important;-webkit-background-clip:text!important}
:root[data-theme="dark"][data-theme-surface="app"] body.fd-product :is(#clientView,#adminView){background:#0e1421}
:root[data-theme="dark"][data-theme-surface="app"] body.fd-product :is(#clientView,#adminView) :is(.field input,.field select,.field textarea,.service-picker select,.service-picker__search input,.chat-composer textarea){background:#111b2c}
:root[data-theme="dark"][data-theme-surface="app"] body.fd-product #authModal :is(input,textarea){background:#111b2c}
:root[data-theme="dark"][data-theme-surface="app"] body.fd-product :is(#clientView,#adminView) .service-tag>span{background:#263249}
:root[data-theme="dark"][data-theme-surface="app"] body.fd-product :is(#clientView,#adminView) .service-tag input:checked+span{background:#334873;color:#dae4ff;border-color:#6687eb}
:root[data-theme="dark"][data-theme-surface="app"] body.fd-product :is(#clientView,#adminView) :is(.badge--completed,.badge--paid,.badge--done){background:#173b2b;color:#a0e4b9}
:root[data-theme="dark"][data-theme-surface="app"] body.fd-product :is(#clientView,#adminView) :is(.badge--cancelled,.badge--overdue){background:#402330;color:#ff9caf}
:root[data-theme="dark"][data-theme-surface="app"] body.fd-product :is(#clientView,#adminView) :is(.badge--awaiting_payment,.badge--review){background:#3b3020;color:#efce94}
:root[data-theme="dark"][data-theme-surface="app"] body.fd-product #authModal .auth-tab[aria-selected="true"],:root[data-theme="dark"][data-theme-surface="app"] body.fd-product #authModal .auth-tab.is-active{background:#30436d;color:#dbe4ff}
@media(max-width:900px){body.fd-product :is(#clientView,#adminView) .workspace-sidebar:not(.is-open){visibility:hidden}}
.theme-nav-toggle{display:none}
@media(max-width:700px){
 .seo-header.seo-nav-ready{gap:16px}
 .seo-nav-ready .theme-nav-toggle{display:grid;place-items:center;width:42px;height:42px;margin-left:auto;border:1px solid #e1e7f2;border-radius:13px;background:#f5f7fc;color:#45536b}
 .theme-nav-toggle svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round}
 .seo-nav-ready .theme-nav-toggle[aria-expanded="false"]+.seo-nav{display:none}
 .seo-nav-ready .seo-nav{flex:1 0 100%;padding:18px;border-radius:20px;background:#f5f7fc;gap:18px;justify-content:flex-start}
 .seo-nav-ready .seo-nav>a{flex-basis:100%}
 :root[data-theme="dark"] .seo-nav-ready :is(.theme-nav-toggle,.seo-nav){background:#192235;color:#eff3fc;border-color:#35445f}
}
@media(max-width:600px){
 html[data-theme-surface="legal"] .legal-intro h1{font-size:clamp(28px,8vw,36px);overflow-wrap:anywhere}
 html[data-theme-surface="legal"] body>header{gap:12px;flex-wrap:wrap}
 html[data-theme-surface="error"] .wev-error-header{gap:12px;flex-wrap:wrap}
}
:root[data-theme="dark"] #landingView.fd-landing :is([data-fig-node="1:149"],[data-fig-node="1:219"],[data-fig-node="1:220"],[data-fig-node="76:15"],[data-fig-node="76:16"],[data-fig-node="76:17"]) path{fill:#6b7991}
