.theme-picker{position:relative;flex-shrink:0}.theme-picker summary{list-style:none;display:flex;align-items:center;gap:6px;min-height:40px;padding:7px;cursor:pointer;font-size:11px;border-radius:8px;color:var(--ink)}.theme-picker summary::-webkit-details-marker{display:none}.theme-picker summary:hover{background:var(--bg)}.theme-options{position:absolute;right:0;top:100%;z-index:1200;min-width:210px;padding:6px;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:0 10px 30px #18223b25;display:grid;gap:4px}.theme-options button{justify-content:flex-start;background:transparent;color:var(--ink);min-height:44px}.theme-options button[aria-pressed=true]{background:#f3e8e6;color:#963e35}.theme-picker:not([open])>.theme-options{display:none}
html[data-theme=dark]{--ink:#e5eaf5;--muted:#a4b0c4;--line:#334158;--bg:#101827;--blue:#b8b4ff;--red:#e0786e;--green:#72c3a2;color-scheme:dark}
html[data-theme=dark] body{background:var(--bg);color:var(--ink)}
html[data-theme=dark] :is(.sidebar,.topbar,.auth-topbar,.panel,.stat,.mobile-record,.mobile-nav,.theme-options,.search-select-popup,.service-tv-menu){background:#192438;border-color:var(--line);color:var(--ink)}
html[data-theme=dark] :is(input,select,textarea,.search-select-trigger,.search-select-popup>input,.secondary,.global-search){background:#111d30;border-color:#40506a;color:var(--ink)}
html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:#9baac0}
html[data-theme=dark] :is(th,thead){background:#152034;color:#b1bfd4;border-color:var(--line)}
html[data-theme=dark] :is(td,.list-row,.detail-strip,.registry-pagination){background:transparent;color:#c6d1e3;border-color:var(--line)}
html[data-theme=dark] :is(tbody tr:hover,.list-row:hover,.search-select-option:hover,.search-select-option.highlighted,.search-select-option[aria-selected=true]){background:#27364f;color:#f1f4ff}
html[data-theme=dark] :is(td strong,.field>label,.field small,.panel-heading h2,.header-user,.breadcrumb strong,.mobile-record-title h2,.mobile-record-fields dd){color:#d5deed}
html[data-theme=dark] :is(td a,.search-select-option,.nav-item,.sidebar nav>a,.text-button,.theme-picker summary){color:#c2c7ff}
html[data-theme=dark] :is(.nav-item.active,.sidebar nav>a.active,.registry-tabs>a.active,.theme-options button[aria-pressed=true]){background:#3a2b38;color:#ffaca1}
html[data-theme=dark] :is(.filters,.panel-heading,.form-actions,.sidebar-profile,.sidebar-note,.workspace-label,.mobile-record-heading,.mobile-record-details,.mobile-record-fields>div,.registry-column-filters,.registry-column-picker){border-color:var(--line)}
html[data-theme=dark] :is(.notice,.info-strip,.mobile-banner,.notification.unread){background:#23334a;border-color:#40516a;color:#d0daec}
html[data-theme=dark] :is(.notice.success,.tv-list-badge,.badge.good,.badge.Finished){background:#173d35;color:#a3e3c9;border-color:#315d50}
html[data-theme=dark] :is(.notice.error,.badge.danger){background:#492d35;color:#ffb5ac;border-color:#74404a}
html[data-theme=dark] :is(.badge.warning,.tv-list-badge.waiting,.badge.InProgress,.test-mode-badge){background:#443a26;color:#f3d48e;border-color:#6a5734}
html[data-theme=dark] .badge.Open,html[data-theme=dark] .badge.Closed{background:#2e3c55;color:#cfdaef}
html[data-theme=dark] :is(.theme-options button,.secondary:hover,.icon-button:hover){background:transparent;color:var(--ink)}
html[data-theme=dark] .theme-options button:hover{background:#2c3b54}
html[data-theme=dark] .brand img,html[data-theme=dark] .mobile-brand img{background:white;border-radius:4px}
html[data-theme=dark] .auth-form-section{background:#101827}html[data-theme=dark] .auth-card h2{color:var(--ink)}
@media(max-width:700px){.theme-picker [data-theme-label]{display:none}.theme-picker summary{padding:5px;min-width:32px}.app-body .topbar .global-search{display:none}.auth-topbar .auth-topbar-note{display:none}}
@media print{html[data-theme=dark]{--ink:#18223b;--muted:#68758a;--line:#ddd;--bg:#fff;--blue:#373580;color-scheme:light}html[data-theme=dark] body,html[data-theme=dark] :is(.panel,td,th,thead){background:white!important;color:#18223b!important}.theme-picker{display:none!important}}
