.login-theme-switch{width:min(400px,100%);margin:16px auto 0;display:flex;align-items:center;justify-content:center;gap:6px;color:var(--muted);font-size:12px}.login-theme-switch button,.app-theme-switch button{padding:6px 10px;color:var(--primary);background:var(--surface);border:1px solid var(--border);border-radius:5px;cursor:pointer}.login-theme-switch button[aria-checked="true"],.app-theme-switch button[aria-checked="true"]{color:var(--on-primary);background:var(--primary);border-color:var(--primary)}.app-theme-switch{position:relative;flex:0 0 auto;color:var(--on-primary);font-size:12px}.app-theme-switch summary{padding:8px 10px;border:1px solid var(--on-primary-border);border-radius:6px;cursor:pointer;list-style:none}.app-theme-switch summary::-webkit-details-marker{display:none}.app-theme-switch[open] summary{border-radius:6px 6px 0 0}.app-theme-switch>div{position:absolute;z-index:20;top:100%;right:0;display:grid;min-width:130px;padding:5px;background:var(--surface);border:1px solid var(--border);border-radius:0 0 6px 6px;box-shadow:var(--shadow)}.app-theme-switch button{padding:7px 9px;text-align:left;color:var(--text);background:var(--surface);border:0;border-radius:4px}.app-theme-switch button:hover,.app-theme-switch button[aria-checked="true"]{background:var(--surface-hover);color:var(--primary)}
:root[data-theme="dark"] body{background:var(--page);color:var(--text)}:root[data-theme="dark"] .commands-sidebar,:root[data-theme="dark"] .order-panel{background:var(--page);color:var(--text)}:root[data-theme="dark"] .command-card,:root[data-theme="dark"] .catalog,:root[data-theme="dark"] .order-cart,:root[data-theme="dark"] .command-fields,:root[data-theme="dark"] .search,:root[data-theme="dark"] .product-card,:root[data-theme="dark"] .item-dialog form{background:var(--surface);color:var(--text);border-color:var(--border)}:root[data-theme="dark"] .command-fields input,:root[data-theme="dark"] .command-fields select,:root[data-theme="dark"] .item-dialog input,:root[data-theme="dark"] .item-dialog textarea{background:var(--surface-soft);color:var(--text);border-color:var(--border)}:root[data-theme="dark"] .search input{color:var(--text)}:root[data-theme="dark"] .secondary,:root[data-theme="dark"] .categories button.active,:root[data-theme="dark"] .categories button{background:var(--surface-hover);color:var(--text);border-color:var(--border)}:root[data-theme="dark"] .editor-actions{background:var(--surface);border-color:var(--border)}:root[data-theme="dark"] .cart-item{border-color:var(--divider)}:root[data-theme="dark"] .app-shell::after{background:var(--border)!important}
:root[data-theme="dark"] .topbar{background:var(--page);color:var(--text)}
:root[data-theme="dark"] .server-loader{background:rgba(0,0,0,.28)}
:root[data-theme="dark"] .server-loader::backdrop{background:rgba(0,0,0,.28)}
:root[data-theme="dark"] .server-loader>div{color:var(--text);background:var(--surface);border:1px solid var(--border);box-shadow:0 12px 30px rgba(0,0,0,.45)}
:root[data-theme="dark"] .server-loader>div small{color:var(--muted)}
.topbar:has(.app-theme-switch){overflow:visible;z-index:10}
@media(max-width:850px){.topbar:has(.app-theme-switch){grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"brand theme" "company operator"}.app-theme-switch{grid-area:theme;grid-row:1;align-self:start;justify-self:end}}
@media(max-width:480px){.topbar:has(.app-theme-switch){grid-template-areas:"brand theme" "company operator"}}

:root[data-theme="dark"] .topbar .brand {
    background:var(--shell-accent);
}

:root[data-theme="dark"] .topbar .brand > img {
    filter:brightness(0) saturate(100%) invert(64%) sepia(14%) saturate(907%) hue-rotate(177deg) brightness(87%) contrast(86%);
}

:root[data-theme="dark"] .commands-sidebar .sidebar-heading {
    color:var(--text);
    background:var(--shell-accent);
    border-bottom-color:var(--border);
    box-shadow:none;
}

:root[data-theme="dark"] .commands-sidebar .sidebar-actions {
    border-left-color:var(--border);
}

:root[data-theme="dark"] .commands-sidebar .sort-toggle {
    color:var(--primary);
    background:var(--surface-hover);
    border-color:var(--border);
}

:root[data-theme="dark"] .commands-sidebar .sort-toggle small {
    color:var(--primary);
}

:root[data-theme="dark"] .commands-sidebar .sidebar-actions .secondary {
    color:var(--text);
    background:var(--surface-hover);
    border-color:var(--border);
}

:root[data-theme="dark"] .commands-sidebar .sidebar-actions .primary {
    color:var(--on-primary);
    background:var(--primary);
    border-color:var(--primary);
}

:root[data-theme="dark"] .commands-sidebar .sidebar-actions .secondary:hover,
:root[data-theme="dark"] .commands-sidebar .sort-toggle:hover {
    color:var(--primary);
    background:var(--primary-soft);
    border-color:var(--primary);
}

:root[data-theme="dark"] .commands-sidebar .sidebar-actions .primary:hover {
    color:var(--on-primary);
    background:#91a9d0;
    border-color:#91a9d0;
}

:root[data-theme="dark"] .topbar .company strong {
    color:var(--text);
}

:root[data-theme="dark"] .user-menu-panel {
    background:var(--page);
    border-color:var(--border);
}
