@layer palette {
:root[data-theme="dark"]{color-scheme:dark!important;--bg:#121310!important;--surface:#1c1c19!important;--raised:#302e26!important;--line:#433d31!important;--text:#f1ebdd!important;--muted:#b6afa1!important;--cyan:#d8bd82!important;--amber:#E7BA69!important;--green:#7DDDB5!important;--red:#FF91A3!important}
:root[data-theme="dark"] :where(body *){color:inherit!important}
:root[data-theme="dark"] body,:root[data-theme="dark"] .app-shell,:root[data-theme="dark"] .workspace,:root[data-theme="dark"] .auth-layout{background:#121310!important;color:#f1ebdd!important}
:root[data-theme="dark"] body *{border-color:#433d31!important}
:root[data-theme="dark"] .panel,:root[data-theme="dark"] .sidebar,:root[data-theme="dark"] .workspace-top,:root[data-theme="dark"] .site-nav,:root[data-theme="dark"] .local-ribbon,:root[data-theme="dark"] .auth-card,:root[data-theme="dark"] .price-card,:root[data-theme="dark"] .feature,:root[data-theme="dark"] .stat,:root[data-theme="dark"] .stats>div,:root[data-theme="dark"] .ops-metrics>div,:root[data-theme="dark"] .ops-metrics>article,:root[data-theme="dark"] .faq-grid details,:root[data-theme="dark"] .customer-stat-grid>div,:root[data-theme="dark"] .customer-device,:root[data-theme="dark"] .customer-payment,:root[data-theme="dark"] .customer-license,:root[data-theme="dark"] .license-feature,:root[data-theme="dark"] .release-feature,:root[data-theme="dark"] .customer-note,:root[data-theme="dark"] .customer-diagnostic,:root[data-theme="dark"] .customer-empty,:root[data-theme="dark"] .empty,:root[data-theme="dark"] .preview-box,:root[data-theme="dark"] .floating-note,:root[data-theme="dark"] .cta-band,:root[data-theme="dark"] .terminal-card,:root[data-theme="dark"] .terminal-top,:root[data-theme="dark"] .terminal-inner,:root[data-theme="dark"] .terminal-bottom,:root[data-theme="dark"] .user-info-section,:root[data-theme="dark"] .info-balances>div,:root[data-theme="dark"] .info-demo-balance,:root[data-theme="dark"] .customer-code,:root[data-theme="dark"] .device-code,:root[data-theme="dark"] .ops-note,:root[data-theme="dark"] dialog,:root[data-theme="dark"] .modal-head,:root[data-theme="dark"] .modal-body,:root[data-theme="dark"] .modal-foot{background:#1c1c19!important;color:#f1ebdd!important}
:root[data-theme="dark"] h1,:root[data-theme="dark"] h2,:root[data-theme="dark"] h3,:root[data-theme="dark"] h4,:root[data-theme="dark"] h5,:root[data-theme="dark"] h6,:root[data-theme="dark"] strong,:root[data-theme="dark"] b,:root[data-theme="dark"] label,:root[data-theme="dark"] th,:root[data-theme="dark"] td,:root[data-theme="dark"] dt,:root[data-theme="dark"] dd,:root[data-theme="dark"] .brand,:root[data-theme="dark"] .side-link,:root[data-theme="dark"] .price,:root[data-theme="dark"] .stat,:root[data-theme="dark"] .person,:root[data-theme="dark"] .workspace-top,:root[data-theme="dark"] .customer-card-top,:root[data-theme="dark"] .customer-payment-value,:root[data-theme="dark"] .customer-facts,:root[data-theme="dark"] .info-row dd,:root[data-theme="dark"] .price-label,:root[data-theme="dark"] .license-plan,:root[data-theme="dark"] .release-version{color:#f1ebdd!important}
:root[data-theme="dark"] p,:root[data-theme="dark"] small,:root[data-theme="dark"] .muted,:root[data-theme="dark"] .tiny,:root[data-theme="dark"] .eyebrow,:root[data-theme="dark"] .sidebar-label,:root[data-theme="dark"] .nav-group-label,:root[data-theme="dark"] .nav-links,:root[data-theme="dark"] .footer,:root[data-theme="dark"] .footer-links,:root[data-theme="dark"] .local-ribbon,:root[data-theme="dark"] .stat-label,:root[data-theme="dark"] .chart-labels,:root[data-theme="dark"] .info-row dt,:root[data-theme="dark"] .info-missing,:root[data-theme="dark"] .info-source,:root[data-theme="dark"] .info-footnote,:root[data-theme="dark"] .info-updated,:root[data-theme="dark"] .customer-facts dt,:root[data-theme="dark"] .customer-steps,:root[data-theme="dark"] .customer-timeline,:root[data-theme="dark"] .customer-empty,:root[data-theme="dark"] .account-help-line,:root[data-theme="dark"] .license-caption,:root[data-theme="dark"] .hero-foot,:root[data-theme="dark"] .customer-stat-grid>div>span,:root[data-theme="dark"] .customer-stat-grid>div>small,:root[data-theme="dark"] .license-feature .license-subtitle,:root[data-theme="dark"] .release-version>span{color:#b6afa1!important}
:root[data-theme="dark"] .eyebrow:before,:root[data-theme="dark"] .dot:first-child{background:#d8bd82!important}
:root[data-theme="dark"] .hero h1 span,:root[data-theme="dark"] .typing-accent,:root[data-theme="dark"] .text-link,:root[data-theme="dark"] .customer-text-link,:root[data-theme="dark"] .feature-num,:root[data-theme="dark"] .chart-price strong,:root[data-theme="dark"] .info-copy,:root[data-theme="dark"] .nav-links a.active{color:#d8bd82!important}
:root[data-theme="dark"] a:hover,:root[data-theme="dark"] .text-link:hover,:root[data-theme="dark"] .customer-text-link:hover{color:#eed6a0!important}
:root[data-theme="dark"] .btn,:root[data-theme="dark"] button.close-btn,:root[data-theme="dark"] .strategy-tab,:root[data-theme="dark"] .info-copy{background:#1c1c19!important;color:#d8bd82!important;border-color:#433d31!important}
:root[data-theme="dark"] .btn:hover,:root[data-theme="dark"] .strategy-tab:hover,:root[data-theme="dark"] .side-link:hover{background:#302e26!important;color:#eed6a0!important;border-color:#d8bd82!important}
:root[data-theme="dark"] .btn.primary,:root[data-theme="dark"] .btn.amber,:root[data-theme="dark"] .release-upload-button,:root[data-theme="dark"] .skip{background:#d8bd82!important;color:#fffdf7!important;border-color:#d8bd82!important}
:root[data-theme="dark"] .btn.primary:hover,:root[data-theme="dark"] .btn.amber:hover,:root[data-theme="dark"] .release-upload-button:hover{background:#eed6a0!important;color:#fffdf7!important;border-color:#eed6a0!important}
:root[data-theme="dark"] .btn.primary *,:root[data-theme="dark"] .btn.amber *,:root[data-theme="dark"] .release-upload-button *{color:inherit!important}
:root[data-theme="dark"] .side-link.selected,:root[data-theme="dark"] .strategy-tab.selected,:root[data-theme="dark"] .side-link[aria-current=page],:root[data-theme="dark"] .strategy-access,:root[data-theme="dark"] .badge.cyan,:root[data-theme="dark"] .customer-pill,:root[data-theme="dark"] .avatar{background:#302e26!important;color:#eed6a0!important;border-color:#433d31!important}
:root[data-theme="dark"] input,:root[data-theme="dark"] select,:root[data-theme="dark"] textarea{background:#1c1c19!important;color:#f1ebdd!important;border-color:#433d31!important;accent-color:#d8bd82!important}
:root[data-theme="dark"] input::placeholder,:root[data-theme="dark"] textarea::placeholder{color:#b6afa1!important}
:root[data-theme="dark"] input:disabled,:root[data-theme="dark"] select:disabled,:root[data-theme="dark"] textarea:disabled,:root[data-theme="dark"] .btn:disabled{background:#263345!important;color:#b6afa1!important}
:root[data-theme="dark"] :focus-visible{outline-color:#d8bd82!important}
:root[data-theme="dark"] th{background:#302e26!important;color:#f1ebdd!important}
:root[data-theme="dark"] td{background:#1c1c19!important}
:root[data-theme="dark"] tbody tr:hover td{background:#121310!important}
:root[data-theme="dark"] .badge,:root[data-theme="dark"] .customer-status,:root[data-theme="dark"] .customer-notice,:root[data-theme="dark"] .notice,:root[data-theme="dark"] .notice.amber,:root[data-theme="dark"] .badge.amber,:root[data-theme="dark"] .warning{background:#352C1C!important;color:#F1CD8B!important;border-color:#665133!important}
:root[data-theme="dark"] .badge.green,:root[data-theme="dark"] .customer-status.online,:root[data-theme="dark"] .device-state.online,:root[data-theme="dark"] .positive,:root[data-theme="dark"] .info-positive,:root[data-theme="dark"] .payment-progress .complete{background:#17382F!important;color:#7DDDB5!important;border-color:#35644F!important}
:root[data-theme="dark"] .badge.red,:root[data-theme="dark"] .btn.danger,:root[data-theme="dark"] .form-error:not(:empty),:root[data-theme="dark"] .info-negative,:root[data-theme="dark"] .red{background:#3A222D!important;color:#FF91A3!important;border-color:#70424F!important}
:root[data-theme="dark"] .form-error:empty{background:transparent!important}
:root[data-theme="dark"] .quote{background:#17382F!important;color:#7DDDB5!important}
:root[data-theme="dark"] .quote.down{background:#3A222D!important;color:#FF91A3!important}
:root[data-theme="dark"] .quote b{color:inherit!important}
:root[data-theme="dark"] .chart-line{stroke:#d8bd82!important}
:root[data-theme="dark"] .chart-fill{fill:#302e26!important}
:root[data-theme="dark"] .auth-art{background:#302e26!important;color:#f1ebdd!important}
:root[data-theme="dark"] .divider{border-color:#433d31!important}
:root[data-theme="dark"] dialog::backdrop{background:#03070DBB!important}
:root[data-theme="dark"] #toast{background:#f1ebdd!important;color:#fffdf7!important}
:root[data-theme="dark"] .customer-conversation{background:#121310!important;color:#f1ebdd!important}
:root[data-theme="dark"] .hero>.reveal>h1,:root[data-theme="dark"] .hero>.reveal>h1 *{color:#FF91A3!important}
:root[data-theme="dark"] .hero>.reveal>.eyebrow{color:#77D5E7!important}
:root[data-theme="dark"] .hero>.reveal>.eyebrow:before{background:#77D5E7!important}
:root[data-theme="dark"] .hero>.reveal>p{color:#b6afa1!important}
:root[data-theme="dark"] .payment-invoice .invoice-address{color:#f1ebdd!important;background:#302e26!important;border-color:#433d31!important}
:root[data-theme="dark"] .payment-invoice .checkout-total{background:#121310!important}
:root[data-theme="dark"] .payment-invoice .checkout-total>span{color:#b6afa1!important}
:root[data-theme="dark"] .btn.primary,:root[data-theme="dark"] .btn.amber,:root[data-theme="dark"] .release-upload-button{background:#896a32!important;color:#fffdf7!important;border-color:#896a32!important}
:root[data-theme="dark"] .btn.primary:hover,:root[data-theme="dark"] .btn.amber:hover{background:#715326!important;color:#fffdf7!important}
}
#site-preferences{display:flex;align-items:center;gap:8px;flex-shrink:0}
.preference-language{display:flex;align-items:center;gap:6px;margin:0}
.preference-caption{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#site-preferences select,#site-preferences button{min-height:38px;border:1px solid var(--line);border-radius:8px;padding:7px 10px;background:var(--surface);color:var(--text);font:inherit}
#site-preferences .preference-theme{display:flex;align-items:center;gap:6px;cursor:pointer}
#site-preferences :focus-visible{outline:2px solid var(--cyan);outline-offset:3px}
#site-preferences.preferences-floating{position:fixed;right:16px;top:16px;z-index:20;background:var(--surface);padding:6px;border-radius:10px;border:1px solid var(--line)}
.site-nav{flex-wrap:wrap;height:auto;min-height:88px;padding-block:12px}
.site-nav .nav-links{flex-wrap:wrap}.site-nav .nav-end{flex-wrap:wrap}
.workspace-top{flex-wrap:wrap;gap:12px;padding-block:12px;height:auto}
.workspace-top>div{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
html[lang="ru"] .hero h1{font-size:clamp(22px,2.5vw,34px);overflow-wrap:anywhere}
html[lang="ru"] .hero>.reveal>.eyebrow{line-height:1.8}
@media(max-width:800px){.site-nav .nav-end{margin-left:auto;gap:8px}.workspace-top>div{gap:8px}.workspace-top{align-items:flex-start}#site-preferences select,#site-preferences button{max-width:140px}.nav-end{max-width:100%}}
@media(max-width:480px){.site-nav{gap:12px}.site-nav .nav-end{width:100%;justify-content:space-between}.workspace-top>div{width:100%;justify-content:space-between}#site-preferences .theme-label{font-size:13px}.preferences-floating{max-width:calc(100vw - 32px)}}
/* Translated labels can be longer than their English equivalents. */
.workspace-head{flex-wrap:wrap;gap:16px}.workspace-head>div{min-width:0;max-width:100%}
html[lang="ru"] :is(h1,h2,h3,.btn,.side-link){overflow-wrap:anywhere}
@media(max-width:540px){.workspace-head>.btn{margin-left:0}.modal-foot{flex-wrap:wrap}.modal-foot>.btn{max-width:100%}.toolbar{flex-wrap:wrap}}

/* Compact preference icons with accessible direct toggles. */
#site-preferences .preference-language{position:relative;width:44px;height:40px;justify-content:center;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
#site-preferences .preference-language select{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;padding:0}
#site-preferences .language-flag{display:flex;pointer-events:none;border-radius:2px;overflow:hidden;box-shadow:0 0 0 1px var(--line)}
#site-preferences .preference-language:focus-within{outline:2px solid var(--cyan);outline-offset:3px}
#site-preferences .preference-theme{width:40px;height:40px;justify-content:center;padding:0;font-size:23px}
#site-preferences .theme-label{display:none}
#site-preferences .preference-language:hover,#site-preferences .preference-theme:hover{border-color:var(--cyan)}

#site-preferences button.preference-language{display:flex;padding:0;cursor:pointer}

/* Legacy surfaces must follow the active palette, including nested admin dialogs. */
@layer palette {
 :root body.admin-regular #license-form .license-section{background:var(--surface)!important;color:var(--text)!important;border-color:var(--line)!important}
 :root .preview-caption{background:var(--raised)!important;color:var(--text)!important}
 :root .coin-icon{background:var(--raised)!important;color:var(--amber)!important}
 :root .portrait-controls,:root .portrait-controls button{color:var(--text)!important}
 :root .portrait-controls button{background:var(--raised)!important;border-color:var(--line)!important}
 :root:not([data-theme="dark"]) .customer-pill.positive{background:#EAF7F1!important;color:#087A54!important;border-color:#BDE5D4!important}
 :root:not([data-theme="dark"]) .customer-pill.warning{background:#FFF6E5!important;color:#825400!important;border-color:#EAD5AA!important}
 :root[data-theme="dark"] .customer-pill.positive{background:#17382F!important;color:#7DDDB5!important;border-color:#35644F!important}
 :root[data-theme="dark"] .customer-pill.warning{background:#352C1C!important;color:#F1CD8B!important;border-color:#665133!important}
 :root[data-theme="dark"] #toast{background:#f1ebdd!important;color:#302b24!important}
}

/* Keep admin content aligned to the top when the sidebar is taller. */
body.admin-regular .app-shell > .workspace{margin-block:0;align-self:start}

/* Shared angel-inspired premium typography and surfaces. */
@layer palette {
:root[data-theme] :is(h1,h2,.brand,.stat strong,.price,.customer-payment-value,.license-plan){font-family:'Baskerville Old Face',Palatino,Georgia,serif!important;font-weight:400!important;letter-spacing:-.02em!important}
:root[data-theme] .brand *{font-family:inherit!important}
:root[data-theme] :is(.workspace-head h1,.auth-card h1){font-size:clamp(32px,3.3vw,48px)!important;line-height:1.18!important}
:root[data-theme] :is(.panel,.auth-card,.price-card,.stat,.customer-license){border-radius:14px!important}
:root[data-theme] :is(.stat,.customer-stat-grid>div){border-top:2px solid var(--cyan)!important}
:root[data-theme] :is(.btn.primary,.btn.amber,.release-upload-button){background:#d8bd82!important;color:#211e17!important;border-color:#d8bd82!important}
:root[data-theme] :is(.btn.primary:hover,.btn.amber:hover){background:#eed6a0!important;color:#211e17!important}
:root[data-theme] .side-link.selected{box-shadow:inset 3px 0 var(--cyan)!important}
:root[data-theme] .workspace-top>span:first-child{display:none!important}
:root[data-theme] .eyebrow,:root[data-theme] .sidebar-label{letter-spacing:.13em!important;font-size:11px!important}
:root[data-theme] .auth-art{background:linear-gradient(180deg,#12131066,#121310dd),url('/fx/angel-desktop.webp') center/cover!important;color:#f1ebdd!important}
:root[data-theme] .auth-art :is(h1,h2,p,span,strong){color:#f1ebdd!important}
:root[data-theme] dialog::backdrop{background:#090a08b8!important}
:root[data-theme] .sidebar{overflow-y:auto}
}

@layer palette {
:root[data-theme] body .auth-card h2{font-size:36px!important;line-height:1.2!important;margin-bottom:16px!important}
:root[data-theme] body .brand span{font-size:25px!important}
:root[data-theme] body .auth-art{border-radius:16px!important;padding:40px!important;min-height:420px!important;display:flex;flex-direction:column;justify-content:flex-end}
:root[data-theme] body .auth-art>img{display:none!important}
:root[data-theme] body .auth-art h1{font-size:36px!important;line-height:1.2!important}
}
@media(max-width:800px){@layer palette{:root[data-theme] body .auth-art{display:none!important}}}

@layer palette {
:root[data-theme] .customer-stat-grid>div{border-top-color:#d8bd82!important}
:root[data-theme] .side-link.selected{box-shadow:inset 3px 0 #d8bd82!important}
:root[data-theme] #site-preferences button{background:var(--surface)!important;color:#d8bd82!important;border-color:var(--line)!important}
}

@layer palette{:root[data-theme] .brand img{background:transparent!important;border:0!important;border-radius:0!important;padding:0!important;width:48px!important;height:48px!important;object-fit:contain!important;filter:none!important}}
