:root {
    --appearance-surface: #fff;
    --appearance-text: #17221d;
    --appearance-line: #dedfd8;
    --appearance-focus: #d79a32;
}

.appearance-control { align-items:center; display:inline-flex; font-size:.72rem; font-weight:750; gap:.45rem; letter-spacing:.04em; margin:0; text-transform:uppercase; }
.appearance-control select { background:var(--appearance-surface); border:1px solid var(--appearance-line); border-radius:7px; color:var(--appearance-text); font:700 .78rem/1.2 system-ui,sans-serif; min-height:36px; padding:.35rem 1.8rem .35rem .55rem; width:auto; }
.appearance-control select:focus-visible { outline:3px solid color-mix(in srgb,var(--appearance-focus) 55%,transparent); outline-offset:2px; }
.appearance-control-inverse { color:#e8f2ed; }
.appearance-control-inverse select { background:#fff; border-color:rgba(255,255,255,.65); color:#17221d; }
.nav-logout { display:inline-flex; margin:0; }
.nav-logout button { background:transparent; color:#edf7f1; min-height:44px; padding:.45rem .2rem; }
.client-login-shell { align-items:center; display:grid; min-height:100vh; padding:1rem; }
.client-login-card { background:var(--appearance-surface); border:1px solid var(--appearance-line); border-radius:16px; box-shadow:0 18px 50px rgba(31,58,45,.12); margin:auto; padding:clamp(1.25rem,5vw,2rem); width:min(470px,100%); }
.client-login-head,.login-heading { align-items:flex-start; display:flex; gap:1rem; justify-content:space-between; }

html[data-appearance="dark"] { color-scheme:dark; --appearance-surface:#142119; --appearance-text:#edf4ef; --appearance-line:#405149; --appearance-focus:#f0b94f; }
html[data-appearance="light"] { color-scheme:light; }
html[data-appearance="dark"] body.platform-body { --ink:#e8eef5; --muted:#aab7c5; --line:#3b4959; --nav:#07111e; --accent:#54c7b6; --paper:#111d2b; --bg:#09131f; }
html[data-appearance="dark"] body.platform-body :is(input,select,textarea,th,.health,.login) { background:#111d2b; border-color:#3b4959; color:#e8eef5; }
html[data-appearance="dark"] body.platform-body :is(.badge,code) { background:#253446; color:#e8eef5; }
html[data-appearance="dark"] body:is(.admin-body,.buyer-private,.client-auth) { --ink:#edf4ef; --muted:#afbeb5; --paper:#142119; --cream:#0d1712; --line:#405149; --forest:#82d0a8; --forest-dark:#dcece3; --terra:#ef9a76; --amber:#f0b94f; --danger:#ffaaa3; background:#0d1712; color:#edf4ef; }
html[data-appearance="dark"] body:is(.admin-body,.buyer-private,.client-auth) :is(input,select,textarea,fieldset,.dashboard-card,.status-cards article,.operations-grid article,.status-list,.attention-list,.responsive-table,.admin-list article,.detail-grid section,.admin-actions form,.client-login-card,.rfq-product,.filter-form,.guide-card,.guide-links a,.guide-journey li,.guide-table-wrap,.operations-filter,.operations-card,.account-state,.rfq-admin-card,.operations-actions>section,.operations-history>section) { background:#142119; border-color:#405149; color:#edf4ef; }
html[data-appearance="dark"] body:is(.admin-body,.buyer-private,.client-auth) :is(th,.status-list a,.attention-list div,.attention-list a) { background:#1b2b22; border-color:#405149; color:#edf4ef; }
html[data-appearance="dark"] body.buyer-private .buyer-dashboard { background:#0d1712; }
html[data-appearance="dark"] body:is(.admin-body,.buyer-private,.client-auth) :is(.notice.success,.badge.success) { background:#173c28; border-color:#377a53; color:#bceccc; }
html[data-appearance="dark"] body:is(.admin-body,.buyer-private,.client-auth) :is(.notice.error,.error-summary) { background:#3a1b1b; border-color:#804343; color:#ffc4bf; }

@media (prefers-color-scheme:dark) {
    html:not([data-appearance="light"]) { color-scheme:dark; --appearance-surface:#142119; --appearance-text:#edf4ef; --appearance-line:#405149; --appearance-focus:#f0b94f; }
    html:not([data-appearance="light"]) body.platform-body { --ink:#e8eef5; --muted:#aab7c5; --line:#3b4959; --nav:#07111e; --accent:#54c7b6; --paper:#111d2b; --bg:#09131f; }
    html:not([data-appearance="light"]) body.platform-body :is(input,select,textarea,th,.health,.login) { background:#111d2b; border-color:#3b4959; color:#e8eef5; }
    html:not([data-appearance="light"]) body:is(.admin-body,.buyer-private,.client-auth) { --ink:#edf4ef; --muted:#afbeb5; --paper:#142119; --cream:#0d1712; --line:#405149; --forest:#82d0a8; --forest-dark:#dcece3; --terra:#ef9a76; --amber:#f0b94f; --danger:#ffaaa3; background:#0d1712; color:#edf4ef; }
    html:not([data-appearance="light"]) body:is(.admin-body,.buyer-private,.client-auth) :is(input,select,textarea,fieldset,.dashboard-card,.status-cards article,.operations-grid article,.status-list,.attention-list,.responsive-table,.admin-list article,.detail-grid section,.admin-actions form,.client-login-card,.rfq-product,.filter-form,.guide-card,.guide-links a,.guide-journey li,.guide-table-wrap,.operations-filter,.operations-card,.account-state,.rfq-admin-card,.operations-actions>section,.operations-history>section) { background:#142119; border-color:#405149; color:#edf4ef; }
    html:not([data-appearance="light"]) body:is(.admin-body,.buyer-private,.client-auth) :is(th,.status-list a,.attention-list div,.attention-list a) { background:#1b2b22; border-color:#405149; color:#edf4ef; }
    html:not([data-appearance="light"]) body.buyer-private .buyer-dashboard { background:#0d1712; }
    html:not([data-appearance="light"]) body:is(.admin-body,.buyer-private,.client-auth) :is(.notice.success,.badge.success) { background:#173c28; border-color:#377a53; color:#bceccc; }
    html:not([data-appearance="light"]) body:is(.admin-body,.buyer-private,.client-auth) :is(.notice.error,.error-summary) { background:#3a1b1b; border-color:#804343; color:#ffc4bf; }
}

@media (max-width:640px) {
    .appearance-control { justify-content:space-between; width:100%; }
    .admin-header .appearance-control,.platform-body header .appearance-control { flex:1 0 100%; }
    .client-login-head,.login-heading { display:grid; }
}
