/* DARK-AUTO:BEGIN */
/* Сгенерировано scripts/build_dark_auto.py — не править руками. Тёмная тема для старых стилей с жёстко заданными светлыми цветами. */
/* style.css */
:where(html[data-theme=dark]) button:focus-visible,:where(html[data-theme=dark]) a:focus-visible{outline:3px solid var(--accent-line)}
:where(html[data-theme=dark]) input:focus{outline:3px solid var(--accent-line)}
:where(html[data-theme=dark]) input{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .password-wrap button{color:var(--fg-3)}
:where(html[data-theme=dark]) .error{color:var(--bad)}
:where(html[data-theme=dark]) .login-note{color:var(--fg-3)}
:where(html[data-theme=dark]) .sidebar{background:var(--surface)}
:where(html[data-theme=dark]) .nav-caption{color:var(--fg-3)}
:where(html[data-theme=dark]) .nav{color:var(--fg-2)}
:where(html[data-theme=dark]) .nav.active{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .version{color:var(--fg-3)}
:where(html[data-theme=dark]) .avatar{background:var(--surface-2)}
:where(html[data-theme=dark]) .exit{color:var(--fg-3)}
:where(html[data-theme=dark]) .topbar{background:var(--surface)}
:where(html[data-theme=dark]) .crumb{color:var(--fg-3)}
:where(html[data-theme=dark]) .date{color:var(--fg-3)}
:where(html[data-theme=dark]) .orange{color:var(--accent-ink)}
:where(html[data-theme=dark]) .count-badge{border:1px solid var(--line);background:var(--surface);color:var(--fg-2)}
:where(html[data-theme=dark]) .notice{background:var(--surface)}
:where(html[data-theme=dark]) .notice-icon{color:var(--fg-3)}
:where(html[data-theme=dark]) .cash-card{background:var(--surface)}
:where(html[data-theme=dark]) .cash-icon{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .card-bottom{border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .small-label{color:var(--fg-3)}
:where(html[data-theme=dark]) .unset{color:var(--fg-3)}
:where(html[data-theme=dark]) .card-open{color:var(--fg-3)}
:where(html[data-theme=dark]) .bottom-note{color:var(--fg-3)}
:where(html[data-theme=dark]) .safe-panel{background:var(--surface)}
:where(html[data-theme=dark]) .close{color:var(--fg-3)}
:where(html[data-theme=dark]) .workspace{background:var(--surface-2)}
:where(html[data-theme=dark]) .sidebar{background:var(--surface);border-color:var(--line)}
:where(html[data-theme=dark]) .nav-caption{color:var(--fg-3)}
:where(html[data-theme=dark]) .nav{color:var(--fg-2)}
:where(html[data-theme=dark]) .nav.active{background:var(--surface-3);color:var(--fg)}
:where(html[data-theme=dark]) .sidebar-bottom .profile{border-color:var(--line)}
:where(html[data-theme=dark]) .avatar{background:var(--surface-3);color:var(--fg-2)}
:where(html[data-theme=dark]) .topbar{background:var(--surface-2);color:var(--fg-2)}
:where(html[data-theme=dark]) .eyebrow.orange{color:var(--fg-3)}
:where(html[data-theme=dark]) .count-badge,:where(html[data-theme=dark]) .access-pill{background:var(--surface-3);color:var(--fg-2)}
:where(html[data-theme=dark]) .notice{background:var(--surface-3)}
:where(html[data-theme=dark]) .notice p{color:var(--fg-2)}
:where(html[data-theme=dark]) .cash-card{border:1px solid var(--line)}
:where(html[data-theme=dark]) .cash-card:hover{border-color:var(--line)}
:where(html[data-theme=dark]) .cash-icon{background:var(--surface-2);color:var(--fg-3)}
:where(html[data-theme=dark]) .cash-card:hover .cash-icon{background:var(--accent-soft)}
:where(html[data-theme=dark]) .cash-card>p{color:var(--fg-3)}
:where(html[data-theme=dark]) .card-bottom{border-color:var(--line)}
:where(html[data-theme=dark]) .small-label{color:var(--fg-3)}
:where(html[data-theme=dark]) .unset{color:var(--fg-2)}
:where(html[data-theme=dark]) .card-open{background:var(--surface-2);color:var(--fg-3)}
:where(html[data-theme=dark]) .bottom-note{color:var(--fg-3)}
:where(html[data-theme=dark]) .currency-card{background:var(--surface)}
:where(html[data-theme=dark]) .currency-symbol{background:var(--surface-2);color:var(--fg-2)}
:where(html[data-theme=dark]) .currency-type{color:var(--fg-3)}
:where(html[data-theme=dark]) .digital .currency-symbol{background:var(--surface-2);color:var(--ok)}
:where(html[data-theme=dark]) .currency-name>span{border:1px solid var(--line);color:var(--fg-3)}
:where(html[data-theme=dark]) .currency-balance>span{color:var(--fg-3)}
:where(html[data-theme=dark]) .balance-button{background:var(--surface-2);color:var(--fg)}
:where(html[data-theme=dark]) .balance-button:hover{background:var(--surface-3)}
:where(html[data-theme=dark]) .safe-explainer{color:var(--fg-3)}
:where(html[data-theme=dark]) .safe-explainer h3{color:var(--fg-2)}
:where(html[data-theme=dark]) input{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .close{background:var(--surface-2);color:var(--fg-3)}
:where(html[data-theme=dark]) .field-help{color:var(--fg-3)}
:where(html[data-theme=dark]) .login-shell{background:var(--surface-2)}
:where(html[data-theme=dark]) .local-tag{color:var(--fg-3)}
:where(html[data-theme=dark]) .login-box{background:var(--surface)}
@media(max-width:700px){:where(html[data-theme=dark]) .sidebar{background:var(--surface)}}
:where(html[data-theme=dark]) .history-panel{background:var(--surface)}
:where(html[data-theme=dark]) .history-heading>span{color:var(--fg-3)}
:where(html[data-theme=dark]) .history-empty{color:var(--fg-2)}
:where(html[data-theme=dark]) .history-empty span{color:var(--fg-3)}
:where(html[data-theme=dark]) .history-row{border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .history-sign{background:var(--surface-2);color:var(--ok)}
:where(html[data-theme=dark]) .history-sign.out{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .history-info p{color:var(--fg-2)}
:where(html[data-theme=dark]) .history-info small{color:var(--fg-3)}
:where(html[data-theme=dark]) .history-amount span{color:var(--fg-3)}
:where(html[data-theme=dark]) .history-amount.out{color:var(--accent-ink)}
:where(html[data-theme=dark]) textarea{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) textarea:focus{outline:3px solid var(--accent-line)}
:where(html[data-theme=dark]) .optional{color:var(--fg-3)}
:where(html[data-theme=dark]) input:disabled,:where(html[data-theme=dark]) textarea:disabled{background:var(--surface-2);color:var(--fg-2)}
:where(html[data-theme=dark]) .shift-pill{background:var(--surface-2);color:var(--fg-3)}
:where(html[data-theme=dark]) .shift-pill.is-open{background:var(--surface-2);color:var(--ok)}
:where(html[data-theme=dark]) .back-link{color:var(--fg-3)}
:where(html[data-theme=dark]) .secondary{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .cash-total,:where(html[data-theme=dark]) .method-total{background:var(--surface)}
:where(html[data-theme=dark]) .method-total>span{color:var(--fg-2)}
:where(html[data-theme=dark]) .method-total>small{color:var(--fg-3)}
:where(html[data-theme=dark]) .section-title>span{color:var(--fg-3)}
:where(html[data-theme=dark]) .operation-tile{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .operation-tile:hover:not(:disabled){border-color:var(--accent-line)}
:where(html[data-theme=dark]) .operation-tile small{color:var(--fg-3)}
:where(html[data-theme=dark]) .operation-symbol{color:var(--ok)}
:where(html[data-theme=dark]) .operation-symbol.minus{color:var(--accent-ink)}
:where(html[data-theme=dark]) .segmented{background:var(--surface-2)}
:where(html[data-theme=dark]) .segmented button{color:var(--fg-2)}
:where(html[data-theme=dark]) .segmented button.selected{background:var(--surface);color:var(--fg)}
:where(html[data-theme=dark]) .cash-form select{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .count-result{background:var(--surface-2);color:var(--ok)}
:where(html[data-theme=dark]) .count-result.mismatch{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .difference-alert{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .summary-caption{color:var(--fg-3)}
:where(html[data-theme=dark]) .import-filters select,:where(html[data-theme=dark]) .import-side select{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .import-row{border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .import-date{color:var(--fg-3)}
:where(html[data-theme=dark]) .import-main p{color:var(--fg-2)}
:where(html[data-theme=dark]) .import-main small{color:var(--fg-3)}
:where(html[data-theme=dark]) .import-main a{color:var(--accent-ink)}
:where(html[data-theme=dark]) .import-issues{color:var(--accent-ink);background:var(--accent-soft)}
:where(html[data-theme=dark]) .import-side label{color:var(--fg-3)}
:where(html[data-theme=dark]) .import-side>span{color:var(--fg-3)}
:where(html[data-theme=dark]) .import-stats{color:var(--fg-3)}
:where(html[data-theme=dark]) .import-stats strong{color:var(--fg)}
:where(html[data-theme=dark]) .reconcile-card{background:var(--surface)}
:where(html[data-theme=dark]) .reconcile-card p{color:var(--fg-3)}
:where(html[data-theme=dark]) .reconcile-card strong{color:var(--fg)}
:where(html[data-theme=dark]) .reconcile-card small{color:var(--fg-3)}
:where(html[data-theme=dark]) .reconcile-warning,:where(html[data-theme=dark]) .reconcile-warning strong{color:var(--accent-ink)!important}
:where(html[data-theme=dark]) #employee-month{border:1px solid var(--line)}
:where(html[data-theme=dark]) .period-table th,:where(html[data-theme=dark]) .period-table td{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .employee-list-wrap{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .employee-list th{background:var(--surface);color:var(--fg-3)}
:where(html[data-theme=dark]) .employee-list td{border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .employee-list tr:hover td{background:var(--surface)}
:where(html[data-theme=dark]) .employee-list td small{color:var(--fg-3)}
:where(html[data-theme=dark]) .employee-name-button{color:var(--accent-ink)}
:where(html[data-theme=dark]) .daily-balances small{color:var(--fg-3)}
:where(html[data-theme=dark]) .daily-entry select{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .operation-tile{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .operation-tile:hover:not(:disabled){background:var(--accent-soft);border-color:var(--accent-line)}
:where(html[data-theme=dark]) .operation-symbol{background:var(--surface-2)}
:where(html[data-theme=dark]) .operation-symbol.minus{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .daily-entry .history-heading select{background:var(--surface-2);border-color:var(--line)}
:where(html[data-theme=dark]) .daily-balances .cash-total{border:1px solid var(--line)}
:where(html[data-theme=dark]) .department-choice{border:1px solid var(--line);background:var(--surface);color:var(--fg-2)}
:where(html[data-theme=dark]) .department-choice.selected{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .doc-original-logo{background:var(--surface)}
:where(html[data-theme=dark]) .doc-original-logo span{background:var(--surface);color:var(--accent-ink)}
:where(html[data-theme=dark]) .report-table th{color:var(--fg-3);background:var(--surface)}
:where(html[data-theme=dark]) .report-table th,:where(html[data-theme=dark]) .report-table td{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .report-table tr:hover td{background:var(--surface)}
:where(html[data-theme=dark]) .guide-operation{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .guide-operation p{color:var(--fg-2)}
:where(html[data-theme=dark]) .order-form label,:where(html[data-theme=dark]) .order-filters label{color:var(--fg-2)}
:where(html[data-theme=dark]) .order-form input,:where(html[data-theme=dark]) .order-form select,:where(html[data-theme=dark]) .order-form textarea,:where(html[data-theme=dark]) .order-filters input,:where(html[data-theme=dark]) .order-filters select{border:1px solid var(--line);background:var(--surface);color:var(--fg)}
:where(html[data-theme=dark]) .compact-editor{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .order-toolbar{background:var(--surface);border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .order-toolbar #save-state{color:var(--fg-3)}
:where(html[data-theme=dark]) .order-author{color:var(--fg-3)}
:where(html[data-theme=dark]) .order-author span{color:var(--fg)}
:where(html[data-theme=dark]) .order-tabs{border-bottom:1px solid var(--line);background:var(--surface-2)}
:where(html[data-theme=dark]) .order-tabs button{color:var(--fg-2)}
:where(html[data-theme=dark]) .order-tabs button[aria-selected=true]{color:var(--fg);background:var(--surface)}
:where(html[data-theme=dark]) .order-main-grid h2{color:var(--accent-ink)}
:where(html[data-theme=dark]) .order-line-tools{color:var(--fg-3)}
:where(html[data-theme=dark]) .order-line-head{background:var(--surface-2)}
:where(html[data-theme=dark]) .order-subtotal{border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .order-footnote{border-top:1px solid var(--line);background:var(--surface);color:var(--fg-3)}
:where(html[data-theme=dark]) .order-empty{color:var(--fg-3)}
:where(html[data-theme=dark]) .client-suggestions{background:var(--surface)}
:where(html[data-theme=dark]) .client-suggestions button{background:var(--surface);border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .client-suggestions button:hover,:where(html[data-theme=dark]) .client-suggestions button:focus{background:var(--accent-soft)}
:where(html[data-theme=dark]) .client-suggestions small{color:var(--fg-3)}
:where(html[data-theme=dark]) .compact-editor .order-lookup-button{border:1px solid var(--accent-line);background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .compact-editor .order-lookup-button:hover{background:var(--accent-soft)}
:where(html[data-theme=dark]) .order-lookup .client-suggestions{border:1px solid var(--line)}
:where(html[data-theme=dark]) .work-choice{background:var(--surface);border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .work-choice:hover{background:var(--accent-soft)}
:where(html[data-theme=dark]) .work-choice small,:where(html[data-theme=dark]) .work-choice span,:where(html[data-theme=dark]) .line-name small{color:var(--fg-3)}
:where(html[data-theme=dark]) .work-select{color:var(--accent-ink)}
:where(html[data-theme=dark]) .order-line input[readonly]{background:var(--surface)}
:where(html[data-theme=dark]) .stock-ok{color:var(--ok)!important}
:where(html[data-theme=dark]) .stock-low{color:var(--bad)!important}
:where(html[data-theme=dark]) .part-available .line-name>input:first-child{border-color:var(--ok-line);color:var(--ok);background:var(--surface)}
:where(html[data-theme=dark]) .part-shortage .line-name>input:first-child{color:var(--bad);background:var(--surface)}
:where(html[data-theme=dark]) .inline-add{border:1px solid var(--line);background:var(--surface);color:var(--accent-ink)}
:where(html[data-theme=dark]) .inline-catalog-menu{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .inline-choice,:where(html[data-theme=dark]) .inline-create{background:var(--surface);border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .inline-choice small{color:var(--fg-3)}
:where(html[data-theme=dark]) .inline-choice:hover,:where(html[data-theme=dark]) .inline-choice.selected{background:var(--accent-soft)}
:where(html[data-theme=dark]) .inline-create{color:var(--accent-ink)}
:where(html[data-theme=dark]) .inline-catalog-menu p{color:var(--fg-3)}
:where(html[data-theme=dark]) .receipt-row{border:1px solid var(--line)}
:where(html[data-theme=dark]) .product-dialog input,:where(html[data-theme=dark]) .product-dialog select{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .product-dialog input[readonly]{background:var(--surface-2);color:var(--fg-2)}
:where(html[data-theme=dark]) .product-tabs{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .product-tabs button{background:var(--surface-2);color:var(--fg-2)}
:where(html[data-theme=dark]) .product-tabs button[aria-selected=true]{color:var(--fg);background:var(--surface)}
:where(html[data-theme=dark]) .product-grid small{color:var(--fg-3)}
:where(html[data-theme=dark]) .orders-compact .order-line.part-line,:where(html[data-theme=dark]) .orders-compact .order-line.work-line{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .order-line .line-name>input[aria-label="Печатное название детали на польском"]{color:var(--fg-3);background:var(--surface)}
:where(html[data-theme=dark]) .order-state-closed{background:var(--surface-2);color:var(--ok)}
:where(html[data-theme=dark]) .order-state-working{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .order-state-ready{background:var(--info-soft);color:var(--info)}
:where(html[data-theme=dark]) .order-state-cancelled{background:var(--bad-soft);color:var(--bad)}
:where(html[data-theme=dark]) .cash-dialog .employee-card-form input,:where(html[data-theme=dark]) .cash-dialog .employee-card-form select{border:1px solid var(--line)}
:where(html[data-theme=dark]) .employee-card-form fieldset{border:1px solid var(--line)}
:where(html[data-theme=dark]) .queue-toolbar h2 small{color:var(--fg-3)}
:where(html[data-theme=dark]) .queue-toolbar input,:where(html[data-theme=dark]) .queue-toolbar select{border:1px solid var(--line)}
:where(html[data-theme=dark]) .queue-table th{background:var(--surface-2);color:var(--fg-3)}
:where(html[data-theme=dark]) .queue-table th,:where(html[data-theme=dark]) .queue-table td{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .schedule-toolbar input,:where(html[data-theme=dark]) .schedule-toolbar select{border:1px solid var(--line)}
:where(html[data-theme=dark]) .schedule-scroll{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .schedule-column-title{background:var(--surface);border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .schedule-hours>div{color:var(--fg-3)}
:where(html[data-theme=dark]) .schedule-track{border-left:1px solid var(--line)}
:where(html[data-theme=dark]) .schedule-slot{border-bottom:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .schedule-slot:hover{background:var(--accent-soft)}
:where(html[data-theme=dark]) .schedule-event{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .schedule-days{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .schedule-days section{border:1px solid var(--line)}
:where(html[data-theme=dark]) .chat-layout{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .chat-layout aside{border-right:1px solid var(--line)}
:where(html[data-theme=dark]) .chat-contact{border-bottom:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .chat-contact:hover{background:var(--accent-soft)}
:where(html[data-theme=dark]) .chat-contact small{color:var(--fg-3)}
:where(html[data-theme=dark]) .chat-bubble{background:var(--surface-2)}
:where(html[data-theme=dark]) .chat-bubble small{color:var(--fg-3)}
:where(html[data-theme=dark]) .chat-out{background:var(--accent-soft)}
:where(html[data-theme=dark]) #chat-compose textarea{border:1px solid var(--line)}
:where(html[data-theme=dark]) .sch-summary{color:var(--fg-2)}
:where(html[data-theme=dark]) .sch-summary span{color:var(--fg-3)}
:where(html[data-theme=dark]) .schedule-slot:disabled{background:var(--surface-2)}
:where(html[data-theme=dark]) .schedule-column-title small{color:var(--fg-3)}
:where(html[data-theme=dark]) .sch-week-scroll{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .sch-week th,:where(html[data-theme=dark]) .sch-week td{border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .sch-week th{background:var(--surface)}
:where(html[data-theme=dark]) .sch-week th small{color:var(--fg-3)}
:where(html[data-theme=dark]) .sch-week th button,:where(html[data-theme=dark]) .sch-cell-add{color:var(--accent-ink)}
:where(html[data-theme=dark]) .sch-week td>small{color:var(--fg-3)}
:where(html[data-theme=dark]) .sch-agenda{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .sch-agenda section{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .sch-agenda section>small{color:var(--fg-3)}
:where(html[data-theme=dark]) .workspace{background:var(--surface-2)}
:where(html[data-theme=dark]) .sidebar .doc-original-logo{background:var(--surface)}
:where(html[data-theme=dark]) .sidebar .nav:focus-visible,:where(html[data-theme=dark]) .sidebar button:focus-visible{outline:2px solid var(--accent-line)}
:where(html[data-theme=dark]) .workspace-main>.topbar{background:var(--surface);border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .inbox{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .inbox-list{border-right:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .inbox-filters{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .inbox-filters select{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .inbox .chat-contact{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .inbox .chat-contact.selected{background:var(--accent-soft)}
:where(html[data-theme=dark]) .chat-avatar{background:var(--surface-3);color:var(--info)}
:where(html[data-theme=dark]) .channel-badge{border:2px solid var(--line)}
:where(html[data-theme=dark]) .chat-contact-meta time{color:var(--fg-3)}
:where(html[data-theme=dark]) .chat-preview{color:var(--fg-3)}
:where(html[data-theme=dark]) .inbox-dialog-head{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .inbox-dialog-head small{color:var(--fg-3)}
:where(html[data-theme=dark]) .inbox .chat-messages{background:var(--surface)}
:where(html[data-theme=dark]) .inbox .chat-bubble{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .inbox .chat-out{background:var(--accent-soft);border-color:var(--accent-line)}
:where(html[data-theme=dark]) .inbox #chat-compose{border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .inbox-contact{border-left:1px solid var(--line)}
:where(html[data-theme=dark]) .inbox-contact p{color:var(--fg-3)}
:where(html[data-theme=dark]) .inbox-empty{color:var(--fg-3)}
:where(html[data-theme=dark]) .chat-sync-status{color:var(--fg-3)}
:where(html[data-theme=dark]) .inbox-contact select{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .chat-task{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .chat-task small{color:var(--fg-3)}
:where(html[data-theme=dark]) .chat-task.overdue small{color:var(--bad)}
:where(html[data-theme=dark]) .chat-agent-state{background:var(--surface-2)}
@media(max-width:700px){:where(html[data-theme=dark]) .inbox-contact{border-top:1px solid var(--line)}}
:where(html[data-theme=dark]) .estimate-grid th{background:var(--info-soft);color:var(--info);border:1px solid var(--info-line)}
:where(html[data-theme=dark]) .estimate-grid td{border:1px solid var(--info-line)}
:where(html[data-theme=dark]) .estimate-grid tr:nth-child(even){background:var(--surface-2)}
:where(html[data-theme=dark]) .order-open-row:hover{background:var(--accent-soft)}
:where(html[data-theme=dark]) .calls-panel{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .calls-filters input,:where(html[data-theme=dark]) .calls-filters select{border:1px solid var(--line)}
:where(html[data-theme=dark]) .calls-table th{background:var(--surface-2);color:var(--fg-3)}
:where(html[data-theme=dark]) .calls-table th,:where(html[data-theme=dark]) .calls-table td{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .calls-table small{color:var(--fg-3)}
:where(html[data-theme=dark]) .calls-table tr:hover{background:var(--accent-soft)}
:where(html[data-theme=dark]) #calls-info{color:var(--fg-3)}
:where(html[data-theme=dark]) .calls-tabs .active{color:var(--accent-ink);background:var(--accent-soft)}
:where(html[data-theme=dark]) .calls-tabs{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .calls-tabs .secondary.active{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .calls-table tbody tr:nth-child(even){background:var(--surface)}
:where(html[data-theme=dark]) .call-direction.answered{color:var(--ok)}
:where(html[data-theme=dark]) .call-direction.unanswered{color:var(--bad)}
:where(html[data-theme=dark]) .call-new{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .calls-filters{background:var(--surface)}
:where(html[data-theme=dark]) .calls-summary{border:1px solid var(--line)}
:where(html[data-theme=dark]) .call-stat-totals>div{background:var(--surface)}
:where(html[data-theme=dark]) .call-stat-totals small{color:var(--fg-3)}
:where(html[data-theme=dark]) .call-number{border-bottom:1px dotted var(--line-strong)}
:where(html[data-theme=dark]) .call-contact-actions{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .call-contact-actions button{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .call-contact-actions button:hover{background:var(--accent-soft)}
:where(html[data-theme=dark]) .call-journal .call-contact-actions{background:linear-gradient(90deg,var(--accent-soft) 0%,var(--accent-soft) 74%,rgba(255,247,239,0) 100%)}
:where(html[data-theme=dark]) .call-journal .call-contact-actions button{background:var(--surface);color:var(--accent-ink)}
:where(html[data-theme=dark]) .call-journal .call-contact-actions button:hover,:where(html[data-theme=dark]) .call-journal .call-contact-actions button:focus-visible{background:var(--surface);color:var(--accent-ink)}
:where(html[data-theme=dark]) .settings-tabs .selected{color:var(--accent-ink);background:var(--accent-soft)}
:where(html[data-theme=dark]) .settings-list>div{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .settings-list small,:where(html[data-theme=dark]) .customer-card small{color:var(--fg-3)}
:where(html[data-theme=dark]) .customer-summary{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .customer-summary>span{color:var(--fg-2)}
:where(html[data-theme=dark]) .customer-columns section{border:1px solid var(--line)}
:where(html[data-theme=dark]) .customer-order{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .customer-order:hover{background:var(--accent-soft)}
:where(html[data-theme=dark]) .customer-task,:where(html[data-theme=dark]) .customer-event{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .employee-earnings>div{background:var(--surface-2)}
:where(html[data-theme=dark]) .employee-earnings small,:where(html[data-theme=dark]) .payroll-sources small{color:var(--fg-3)}
:where(html[data-theme=dark]) .payroll-sources>div{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .payroll-layout fieldset{border:1px solid var(--line)}
:where(html[data-theme=dark]) .inbox-contact .chat-contact-card{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .contact-card-top small{color:var(--fg-3)}
:where(html[data-theme=dark]) .contact-primary-phone{color:var(--fg)}
:where(html[data-theme=dark]) .contact-extra{color:var(--fg-2)}
:where(html[data-theme=dark]) .contact-action{background:var(--accent-soft);color:var(--accent-ink);border:1px solid var(--accent-line)}
:where(html[data-theme=dark]) .contact-action.contact-tg{color:var(--info);background:var(--info-soft);border-color:var(--info-line)}
:where(html[data-theme=dark]) .contact-action.contact-ig{color:var(--ai);background:var(--surface-2);border-color:var(--ai-line)}
:where(html[data-theme=dark]) .contact-inline-form small{color:var(--fg-3)}
:where(html[data-theme=dark]) .inbox-contact .chat-contact-card .error{color:var(--bad)}
:where(html[data-theme=dark]) .inbox-contact .chat-contact-card{background:var(--surface)}
:where(html[data-theme=dark]) .deal-filters input,:where(html[data-theme=dark]) .deal-filters select,:where(html[data-theme=dark]) .deal-form input,:where(html[data-theme=dark]) .deal-form select,:where(html[data-theme=dark]) .deal-form textarea{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .deals-table-wrap{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .deals-table td,:where(html[data-theme=dark]) .deals-table th{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .deals-table th{background:var(--surface);color:var(--fg-3)}
:where(html[data-theme=dark]) .deals-table small,:where(html[data-theme=dark]) .chat-deal-link small{color:var(--fg-3)}
:where(html[data-theme=dark]) .deal-stage{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .deal-paid{background:var(--surface-2);color:var(--ok)}
:where(html[data-theme=dark]) .deal-lost{background:var(--surface-2);color:var(--fg-3)}
:where(html[data-theme=dark]) .deal-ready{background:var(--info-soft);color:var(--info)}
:where(html[data-theme=dark]) .deal-panel{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .deal-panel p{color:var(--fg-3)}
:where(html[data-theme=dark]) .deal-form small{color:var(--fg-3)}
:where(html[data-theme=dark]) .chat-deal-link{background:var(--surface);border:1px solid var(--accent-line)}
:where(html[data-theme=dark]) .chat-deal-link:hover{background:var(--accent-soft)}
:where(html[data-theme=dark]) .deal-history{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .content:has(.deal-filters) .section-head p{color:var(--fg-3)}
:where(html[data-theme=dark]) button.transcript-status.new{color:var(--bad);background:var(--bad-soft);border-color:var(--bad-line)}
:where(html[data-theme=dark]) button.transcript-status.queued{color:var(--warn);background:var(--warn-soft);border-color:var(--warn-line)}
:where(html[data-theme=dark]) button.transcript-status.done{color:var(--ok);background:var(--surface-2);border-color:var(--ok-line)}
:where(html[data-theme=dark]) .transcript-conversation{background:var(--surface-2)}
:where(html[data-theme=dark]) .transcript-legend{color:var(--fg-3)}
:where(html[data-theme=dark]) .transcript-bubble{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .transcript-bubble.manager{background:var(--accent-soft);border-color:var(--accent-line)}
:where(html[data-theme=dark]) .transcript-bubble.unknown{background:var(--surface-2)}
:where(html[data-theme=dark]) .transcript-bubble small{color:var(--fg-2)}
:where(html[data-theme=dark]) .transcript-analysis{border:1px solid var(--line)}
:where(html[data-theme=dark]) .transcript-analysis>small{color:var(--fg-3)}
:where(html[data-theme=dark]) .transcript-analysis dl>div{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .transcript-analysis dt{color:var(--fg-3)}
:where(html[data-theme=dark]) .request-controls label{color:var(--fg-2)}
:where(html[data-theme=dark]) .request-controls select{border:1px solid var(--line);background:var(--surface);color:var(--fg)}
:where(html[data-theme=dark]) .request-cross{color:var(--accent-ink)!important}
:where(html[data-theme=dark]) .request-progress{background:var(--accent-soft)}
:where(html[data-theme=dark]) .transcript-key{color:var(--fg-3)}
:where(html[data-theme=dark]) .transcript-key .new{color:var(--bad)}
:where(html[data-theme=dark]) .transcript-key .queued{color:var(--warn)}
:where(html[data-theme=dark]) .transcript-key .done{color:var(--ok)}
:where(html[data-theme=dark]) .calls-toolbar{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .agent-eyebrow{color:var(--accent-ink)}
:where(html[data-theme=dark]) .agent-pill{background:var(--surface-2);color:var(--fg-2)}
:where(html[data-theme=dark]) .agent-pill.on{background:var(--surface-2);color:var(--ok)}
:where(html[data-theme=dark]) .agent-settings-card{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .agent-settings-card input:not([type=checkbox]),:where(html[data-theme=dark]) .agent-settings-card select,:where(html[data-theme=dark]) .agent-settings-card textarea{border:1px solid var(--line);background:var(--surface);color:var(--fg)}
:where(html[data-theme=dark]) .agent-account{background:var(--surface)}
:where(html[data-theme=dark]) .agent-mode-note{background:var(--accent-soft);border:1px solid var(--accent-line)}
:where(html[data-theme=dark]) .agent-mode-note p{color:var(--fg-3)}
:where(html[data-theme=dark]) .agent-transcription{border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .chat-agent-panel{border-top:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .chat-agent-bar b{color:var(--accent-ink)}
:where(html[data-theme=dark]) .chat-agent-bar small{color:var(--fg-3)}
:where(html[data-theme=dark]) .chat-ai-draft{background:var(--surface);border:1px solid var(--accent-line)}
:where(html[data-theme=dark]) .chat-ai-draft summary{color:var(--accent-ink)}
:where(html[data-theme=dark]) .chat-ai-handoff{color:var(--accent-ink)}
:where(html[data-theme=dark]) .learning-panel{border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .learning-toolbar select{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .learning-run{background:var(--surface)}
:where(html[data-theme=dark]) .learning-proposal{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .learning-proposal>small{color:var(--fg-3)}
:where(html[data-theme=dark]) .learning-proposal label{color:var(--fg-3)}
:where(html[data-theme=dark]) .learning-proposal textarea{border:1px solid var(--line);color:var(--fg)}
:where(html[data-theme=dark]) .learning-proposal summary{color:var(--accent-ink)}
:where(html[data-theme=dark]) .learning-proposal blockquote{border-left:3px solid var(--accent-line);background:var(--accent-soft)}
:where(html[data-theme=dark]) .chat-head-agent .ai-toolbar{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .chat-head-agent .ai-toolbar-status b{color:var(--fg)}
:where(html[data-theme=dark]) .chat-head-agent .ai-toolbar-status small{color:var(--fg-3)}
:where(html[data-theme=dark]) .chat-head-agent .ai-toolbar .ai-mode-switch{background:var(--surface);color:var(--fg-2);border:1px solid var(--line)}
:where(html[data-theme=dark]) .ai-mode-switch em{background:var(--surface)}
:where(html[data-theme=dark]) .chat-head-agent .ai-toolbar .ai-suggest{background:var(--surface);border:1px solid var(--line);color:var(--accent-ink)}
:where(html[data-theme=dark]) .chat-head-agent .ai-toolbar .ai-takeover{border-left:1px solid var(--line);color:var(--fg-2)}
:where(html[data-theme=dark]) .chat-head-agent .ai-toolbar button:not(:disabled):hover{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .crm-eyebrow{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-board-toolbar [data-pipeline]{color:var(--fg)}
:where(html[data-theme=dark]) .crm-lane{background:var(--surface-2)}
:where(html[data-theme=dark]) .crm-lane>header span{background:var(--surface);color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-deal-card{background:var(--surface);border:1px solid var(--line);color:var(--fg)}
:where(html[data-theme=dark]) .crm-deal-card small{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-deal-card footer{color:var(--fg-3);border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .crm-deal-card footer span{color:var(--accent-ink)}
:where(html[data-theme=dark]) .crm-deal-workspace .crm-order-section{border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .crm-order-section p{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-deal-conversation{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .crm-timeline-head{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .crm-timeline-head small{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-timeline-head select{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .crm-timeline{background:var(--surface-2)}
:where(html[data-theme=dark]) .crm-timeline .chat-bubble{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .crm-timeline .chat-out{background:var(--accent-soft);border-color:var(--accent-line)}
:where(html[data-theme=dark]) .crm-timeline .chat-bubble small{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-call-event{background:var(--surface);border:1px solid var(--info-line)}
:where(html[data-theme=dark]) .crm-call-event small{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-deal-conversation>[data-history-info]{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-deal-compose{border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .crm-deal-compose textarea{border:1px solid var(--line)}
:where(html[data-theme=dark]) .crm-kanban .crm-lane{background:var(--surface-2)}
:where(html[data-theme=dark]) .crm-kanban .crm-lane>header{background:var(--surface);color:var(--fg)}
:where(html[data-theme=dark]) .crm-kanban .crm-lane>header span{background:var(--surface-2);color:var(--fg-2)}
:where(html[data-theme=dark]) .crm-card-amount{color:var(--info)}
:where(html[data-theme=dark]) .crm-card-car{color:var(--fg-3);background:var(--surface-2)}
:where(html[data-theme=dark]) .crm-board-nav{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .crm-board-map button{background:var(--surface-2)}
:where(html[data-theme=dark]) .crm-deal-permalink{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-detail-title{color:var(--fg-2)}
:where(html[data-theme=dark]) .crm-detail-amount small{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-detail-tabs{background:var(--surface);border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .crm-detail-tabs button{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-detail-tabs button[aria-selected=true]{color:var(--accent-ink);background:var(--surface)}
:where(html[data-theme=dark]) .crm-detail-main .deal-form label{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-detail-main .deal-form input,:where(html[data-theme=dark]) .crm-detail-main .deal-form select,:where(html[data-theme=dark]) .crm-detail-main .deal-form textarea{color:var(--info)}
:where(html[data-theme=dark]) .crm-deal-status{background:var(--surface-2)}
:where(html[data-theme=dark]) .crm-history-collapse{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-empty-note{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-stage-stripe span{background:var(--info-soft)}
:where(html[data-theme=dark]) .crm-stage-stripe span.current{outline:2px solid var(--line)}
:where(html[data-theme=dark]) .vin-vehicle-info{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-deal-conversation [data-agent-toolbar]{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .vin-input-row button[data-vin-decode]{border:1px solid var(--accent-line);background:linear-gradient(145deg,var(--accent-soft),var(--accent-soft));color:var(--accent-ink)}
:where(html[data-theme=dark]) .vin-input-row button[data-vin-decode]:hover:not(:disabled){background:linear-gradient(145deg,var(--accent-soft),var(--accent-soft))}
:where(html[data-theme=dark]) .vin-input-row button[data-vin-decode]:disabled:before{border:2px solid var(--accent-line)}
:where(html[data-theme=dark]) .crm-deal-conversation [data-agent-toolbar]{background:var(--surface);border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .crm-deal-conversation .ai-toolbar{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .crm-deal-conversation .ai-toolbar-status b{color:var(--info)}
:where(html[data-theme=dark]) .crm-deal-conversation .ai-toolbar-status small{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-deal-conversation .ai-toolbar button{border:1px solid var(--line);background:var(--surface);color:var(--fg-2)}
:where(html[data-theme=dark]) .crm-deal-conversation .ai-toolbar .ai-mode-switch{background:var(--surface)}
:where(html[data-theme=dark]) .crm-deal-conversation .ai-toolbar .ai-suggest{background:var(--accent-soft);color:var(--accent-ink);border-color:var(--accent-line)}
:where(html[data-theme=dark]) .crm-deal-conversation .ai-toolbar .ai-takeover{color:var(--fg-2)}
:where(html[data-theme=dark]) .crm-deal-conversation .ai-toolbar button:hover:not(:disabled){background:var(--accent-soft);border-color:var(--accent-line);color:var(--accent-ink)}
:where(html[data-theme=dark]) .crm-deal-conversation .ai-toolbar.is-auto{border-color:var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .crm-deal-conversation [data-chat-agent]{background:var(--surface)}
:where(html[data-theme=dark]) .crm-deal-conversation .chat-ai-draft{border:1px solid var(--accent-line);background:var(--surface)}
:where(html[data-theme=dark]) .crm-deal-conversation .chat-ai-draft summary{color:var(--accent-ink);background:var(--accent-soft)}
:where(html[data-theme=dark]) .crm-deal-conversation .chat-ai-draft .field-help{color:var(--fg-3)}
:where(html[data-theme=dark]) .vin-input-row button[data-vin-decode]{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .vin-input-row button[data-vin-decode]:hover:not(:disabled){background:var(--accent-soft)}
:where(html[data-theme=dark]) .call-period-dialog{border:1px solid var(--line);color:var(--fg)}
:where(html[data-theme=dark]) .call-period-dialog header{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .period-body nav{border-right:1px solid var(--line)}
:where(html[data-theme=dark]) .period-body nav button:hover{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .period-grid small{color:var(--fg-3)}
:where(html[data-theme=dark]) .period-grid button:hover,:where(html[data-theme=dark]) .period-grid button.range{background:var(--accent-soft)}
:where(html[data-theme=dark]) .call-period-dialog footer{border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .call-period-dialog footer input{border:1px solid var(--line)}
:where(html[data-theme=dark]) .call-period-inline{background:var(--surface)}
:where(html[data-theme=dark]) .call-period-overlay{background:var(--surface)}
:where(html[data-theme=dark]) .chat-channel-label{background:var(--surface-2);color:var(--fg-2)}
:where(html[data-theme=dark]) .chat-channel-label.whatsapp{background:var(--ok-soft);color:var(--ok)}
:where(html[data-theme=dark]) .chat-channel-label.telegram{background:var(--info-soft);color:var(--info)}
:where(html[data-theme=dark]) .chat-channel-label.instagram{background:var(--ai-soft);color:var(--ai)}
:where(html[data-theme=dark]) .chat-contact-body .chat-peer{color:var(--fg)}
:where(html[data-theme=dark]) .chat-contact-body .chat-route{color:var(--fg-3)}
:where(html[data-theme=dark]) .cash-view-tabs{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .cash-view-tabs button,:where(html[data-theme=dark]) .cash-sheet-workshops button{color:var(--fg-2)}
:where(html[data-theme=dark]) .cash-view-tabs .selected,:where(html[data-theme=dark]) .cash-sheet-workshops .selected{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .cash-sheet{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .cash-sheet-workshops{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .cash-sheet-filters{background:var(--surface)}
:where(html[data-theme=dark]) .cash-sheet-filters label{color:var(--fg-2)}
:where(html[data-theme=dark]) .cash-sheet-filters input[type=month],:where(html[data-theme=dark]) .cash-sheet-filters select{border:1px solid var(--line);background:var(--surface);color:var(--fg)}
:where(html[data-theme=dark]) .cash-sheet-status{color:var(--fg-3)}
:where(html[data-theme=dark]) .cash-sheet-title p{color:var(--fg-3)}
:where(html[data-theme=dark]) .sheet-count{background:var(--surface-2);color:var(--fg-2)}
:where(html[data-theme=dark]) .cash-sheet-metrics>div{border:1px solid var(--line)}
:where(html[data-theme=dark]) .cash-sheet-metrics span{color:var(--fg-2)}
:where(html[data-theme=dark]) .cash-sheet-metrics small{color:var(--fg-3)}
:where(html[data-theme=dark]) .sheet-positive{color:var(--ok)}
:where(html[data-theme=dark]) .sheet-negative{color:var(--bad)}
:where(html[data-theme=dark]) .cash-sheet-note,:where(html[data-theme=dark]) .cash-sheet-hint{color:var(--fg-3)}
:where(html[data-theme=dark]) .cash-sheet-scroll{border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .cash-sheet-table th,:where(html[data-theme=dark]) .cash-sheet-table td{border-bottom:1px solid var(--line);border-right:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .cash-sheet-table thead th{background:var(--surface-2);color:var(--fg-2)}
:where(html[data-theme=dark]) .cash-sheet-table thead small{color:var(--fg-3)}
:where(html[data-theme=dark]) .cash-sheet-table tr>th:first-child{background:var(--surface);border-right:1px solid var(--line)}
:where(html[data-theme=dark]) .cash-sheet-table thead th:first-child{background:var(--surface-2)}
:where(html[data-theme=dark]) .cash-sheet-table .sheet-weekend th,:where(html[data-theme=dark]) .cash-sheet-table .sheet-weekend td{background:var(--surface)}
:where(html[data-theme=dark]) .cash-sheet-table .sheet-today th,:where(html[data-theme=dark]) .cash-sheet-table .sheet-today td{background:var(--accent-soft)}
:where(html[data-theme=dark]) .cash-sheet-table .sheet-income{color:var(--ok)}
:where(html[data-theme=dark]) .cash-sheet-table .sheet-expense{color:var(--bad)}
:where(html[data-theme=dark]) .cash-sheet-table .sheet-transfer{color:var(--info)}
:where(html[data-theme=dark]) .cash-sheet-table tfoot th,:where(html[data-theme=dark]) .cash-sheet-table tfoot td{background:var(--surface-2);border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .cash-sheet-table tfoot th:first-child{background:var(--surface-2)}
:where(html[data-theme=dark]) .cash-sheet-empty{color:var(--fg-3);background:var(--surface)}
:where(html[data-theme=dark]) .sheet-detail-list article{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .sheet-detail-list small{color:var(--fg-3)}
:where(html[data-theme=dark]) .orders-compact .report-table .order-open-row>td{border-bottom:2px solid var(--line)}
:where(html[data-theme=dark]) .orders-compact .report-table .order-open-row .secondary{background:var(--surface)}
:where(html[data-theme=dark]) .orders-compact .order-state-paid{background:var(--surface-2);color:var(--ok)}
:where(html[data-theme=dark]) .cash-j-search input{border:1px solid var(--line);background:var(--surface);color:var(--fg)}
:where(html[data-theme=dark]) .cash-j-stat{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .cash-j-stat.is-expense{background:var(--surface);border-color:var(--line)}
:where(html[data-theme=dark]) .cash-j-stat span{color:var(--fg-2)}
:where(html[data-theme=dark]) .cash-j-stat small{color:var(--fg-3)}
:where(html[data-theme=dark]) .cash-journal .is-income{color:var(--ok)}
:where(html[data-theme=dark]) .cash-journal .is-expense{color:var(--bad)}
:where(html[data-theme=dark]) .cash-j-sections button{border:1px solid var(--line);background:var(--surface);color:var(--fg-2)}
:where(html[data-theme=dark]) .cash-j-sections button.selected{background:var(--accent-soft);border-color:var(--accent-line);color:var(--accent-ink)}
:where(html[data-theme=dark]) .cash-j-help{color:var(--fg-3)}
:where(html[data-theme=dark]) .cash-j-scroll{border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .cash-j-table th{background:var(--surface-2);color:var(--fg-3)}
:where(html[data-theme=dark]) .cash-j-table td{border-bottom:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .cash-j-table td:first-child{border-left:3px solid var(--info-line)}
:where(html[data-theme=dark]) .cash-j-table tr:hover td{background:var(--surface)}
:where(html[data-theme=dark]) .cash-j-table small{color:var(--fg-3)}
:where(html[data-theme=dark]) .cash-j-table p{color:var(--fg-2)}
:where(html[data-theme=dark]) .cash-j-order{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .cash-j-unlinked{color:var(--accent-ink)}
:where(html[data-theme=dark]) .cash-j-footer{color:var(--fg-3);border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .cash-j-empty{color:var(--fg-3)}
:where(html[data-theme=dark]) .cash-j-order-summary dl{background:var(--surface)}
:where(html[data-theme=dark]) .orders-compact .order-lifecycle{border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .orders-compact .order-lifecycle h2>small{color:var(--fg-3)}
:where(html[data-theme=dark]) .order-life-stage{border:1px solid var(--line);border-left:3px solid var(--line-strong);background:var(--surface)}
:where(html[data-theme=dark]) .order-life-stage>span{color:var(--fg-3)}
:where(html[data-theme=dark]) .order-life-stage>strong{color:var(--fg-3)}
:where(html[data-theme=dark]) .order-life-stage>small{color:var(--fg-3)}
:where(html[data-theme=dark]) .order-life-stage.recorded>strong{color:var(--info)}
:where(html[data-theme=dark]) .order-life-stage.working.recorded{background:var(--warn-soft)}
:where(html[data-theme=dark]) .order-life-stage.ready.recorded{background:var(--info-soft)}
:where(html[data-theme=dark]) .order-life-stage.payment.recorded{background:var(--surface-2)}
:where(html[data-theme=dark]) .wa-actions input,:where(html[data-theme=dark]) .wa-panel input,:where(html[data-theme=dark]) .wa-panel select,:where(html[data-theme=dark]) .wa-goals-dialog input{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .wa-kpi,:where(html[data-theme=dark]) .wa-panel{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .wa-kpi>span,:where(html[data-theme=dark]) .wa-stock section>span{color:var(--fg-3)}
:where(html[data-theme=dark]) .wa-kpi>strong,:where(html[data-theme=dark]) .wa-stock strong{color:var(--info)}
:where(html[data-theme=dark]) .wa-kpi>small,:where(html[data-theme=dark]) .wa-kpi p,:where(html[data-theme=dark]) .wa-stock small{color:var(--fg-3)}
:where(html[data-theme=dark]) .wa-inline{color:var(--fg-3)}
:where(html[data-theme=dark]) .wa-inline b{color:var(--info)}
:where(html[data-theme=dark]) .wa-funnel{background:var(--surface)}
:where(html[data-theme=dark]) .wa-funnel strong{color:var(--accent-ink)}
:where(html[data-theme=dark]) .wa-funnel>b{color:var(--info)}
:where(html[data-theme=dark]) .wa-stock section{border-left:2px solid var(--accent-line)}
:where(html[data-theme=dark]) .wa-panel td small{color:var(--fg-3)}
:where(html[data-theme=dark]) .wa-notice{background:var(--accent-soft);border:1px solid var(--accent-line);color:var(--accent-ink)}
:where(html[data-theme=dark]) .transcript-translation-toolbar button[aria-pressed=true]{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .employee-detail-dialog .employee-earnings>div{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .employee-detail-dialog .employee-actions #motivation{background:var(--accent-soft);color:var(--accent-ink);border:1px solid var(--accent-line)}
:where(html[data-theme=dark]) .split-payment-dialog label.split-payment-row{background:var(--surface-2);border:1px solid var(--line)}
:where(html[data-theme=dark]) .split-payment-row small{color:var(--fg-3)}
:where(html[data-theme=dark]) .split-payment-row .split-input input{background:var(--surface)}
:where(html[data-theme=dark]) .split-payment-dialog .split-summary,:where(html[data-theme=dark]) .split-order{background:var(--accent-soft)}
:where(html[data-theme=dark]) .split-extra{border:1px solid var(--line)}
:where(html[data-theme=dark]) .settings-department-choices label.checkbox-label{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .settings-department-choices label.checkbox-label:has(input:checked){background:var(--accent-soft);border-color:var(--accent-line);color:var(--accent-ink)}
:where(html[data-theme=dark]) .schedule-hours>div{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .schedule-slot{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .schedule-slot:nth-child(4n+1){border-top:1px solid var(--info-line)}
:where(html[data-theme=dark]) .schedule-hours>div:nth-child(4n+1){color:var(--info)}
:where(html[data-theme=dark]) .dialog-back{border:1px solid var(--line);background:var(--surface);color:var(--info)}
:where(html[data-theme=dark]) .dialog-back:hover{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) #settings-body td small{color:var(--fg-3)}
:where(html[data-theme=dark]) .schedule-appointment-dialog details{color:var(--fg-2)}
:where(html[data-theme=dark]) .booking-board{border-right:1px solid var(--line)}
:where(html[data-theme=dark]) .booking-board button{border:1px solid var(--line);background:var(--surface);color:var(--info)}
:where(html[data-theme=dark]) .booking-month small{color:var(--fg-3)}
:where(html[data-theme=dark]) .booking-board button.selected{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .booking-day-head span{color:var(--fg-3)}
:where(html[data-theme=dark]) .booking-day-head i{color:var(--fg-3)}
:where(html[data-theme=dark]) .booking-day-head b{color:var(--accent-ink)}
:where(html[data-theme=dark]) .booking-hint{color:var(--fg-3)}
:where(html[data-theme=dark]) .booking-slots{border:1px solid var(--line)}
:where(html[data-theme=dark]) .booking-slots thead{background:var(--surface-2)}
:where(html[data-theme=dark]) .booking-slots td{border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .booking-slots .hour td,:where(html[data-theme=dark]) .booking-slots .hour th{border-top:1px solid var(--info-line)}
:where(html[data-theme=dark]) .booking-slots button{background:var(--surface);color:var(--ok)}
:where(html[data-theme=dark]) .booking-slots button:hover:not(:disabled){background:var(--surface-2)}
:where(html[data-theme=dark]) .booking-slots button:disabled{background:var(--surface-2)}
:where(html[data-theme=dark]) .booking-slots button.busy{background:var(--surface-3);color:var(--fg-2)}
:where(html[data-theme=dark]) .booking-selection{background:var(--surface-2);color:var(--fg-3)}
:where(html[data-theme=dark]) .booking-selection.ready{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .booking-slots button:empty{background:var(--surface)}
:where(html[data-theme=dark]) .booking-slots button:disabled:empty{background:repeating-linear-gradient(135deg,var(--surface-2),var(--surface-2) 5px,var(--surface-2) 5px,var(--surface-2) 6px)}
:where(html[data-theme=dark]) .booking-slots button.selected{background:var(--accent-soft)!important;color:var(--accent-ink)!important}
:where(html[data-theme=dark]) .chat-bubble .chat-message-author{color:var(--fg-2)}
:where(html[data-theme=dark]) .chat-message-author span{color:var(--fg-3)}
:where(html[data-theme=dark]) .inbox .chat-bubble.chat-ai-message,:where(html[data-theme=dark]) .crm-timeline .chat-bubble.chat-ai-message{background:var(--surface-3);border-color:var(--info-line);color:var(--info)}
:where(html[data-theme=dark]) .inbox .chat-bubble.chat-ai-message,:where(html[data-theme=dark]) .crm-timeline .chat-bubble.chat-ai-message{background:var(--accent-soft);border-color:var(--accent-line)}
:where(html[data-theme=dark]) .crm-timeline .deal-system-event.deal-ai-comment{background:var(--surface-3);border:1px solid var(--info-line);color:var(--fg-2)}
:where(html[data-theme=dark]) .crm-deal-card.ai-booked{background:var(--ai-soft)!important;color:var(--ai)}
:where(html[data-theme=dark]) .crm-deal-card.ai-booked:hover{background:var(--ai-soft)!important}
:where(html[data-theme=dark]) .crm-deal-card.ai-booked .ai-booked-label{color:var(--ai)}
:where(html[data-theme=dark]) .call-period-dialog header .period-dates input{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .call-period-dialog header .period-dates span{color:var(--fg-3)}
:where(html[data-theme=dark]) .call-copy{border:1px solid var(--line);background:var(--surface);color:var(--fg-3)}
:where(html[data-theme=dark]) .call-copy:hover,:where(html[data-theme=dark]) .call-copy:focus-visible{color:var(--accent-ink)}
:where(html[data-theme=dark]) .call-copy.copied{color:var(--ok)}
:where(html[data-theme=dark]) .cash-j-summary .cash-j-net.is-income strong{color:var(--ok)}
:where(html[data-theme=dark]) .cash-j-summary .cash-j-net.is-expense strong{color:var(--bad)}
:where(html[data-theme=dark]) .shop-cash-bar label{color:var(--fg-2)}
:where(html[data-theme=dark]) .shop-cash-bar input{border:1px solid var(--line)}
:where(html[data-theme=dark]) .order-car-info{border:1px solid var(--accent-line);background:var(--surface)}
:where(html[data-theme=dark]) .order-car-info dt{color:var(--fg-3)}
/* receipt-status.css */
:where(html[data-theme=dark]) .report-table tr.receipt-posted>td{background:var(--surface-2)}
:where(html[data-theme=dark]) .report-table tr.receipt-posted:hover>td{background:var(--ok-soft)}
:where(html[data-theme=dark]) .receipt-status{background:var(--surface-2);color:var(--fg-2)}
:where(html[data-theme=dark]) .receipt-posted .receipt-status,:where(html[data-theme=dark]) .receipt-status.is-posted{background:var(--ok-soft);color:var(--ok)}
:where(html[data-theme=dark]) .receipt-source{background:var(--accent-soft);border:1px solid var(--accent-line)}
:where(html[data-theme=dark]) .receipt-product-link{color:var(--accent-ink)}
:where(html[data-theme=dark]) .receipt-parts-picker select{border:1px solid var(--line);background:var(--surface);color:var(--fg)}
:where(html[data-theme=dark]) .return-results thead{background:var(--surface-2)}
:where(html[data-theme=dark]) .return-results small{color:var(--fg-3)}
:where(html[data-theme=dark]) .return-selected{background:var(--accent-soft)}
:where(html[data-theme=dark]) .receipt-pack small{color:var(--fg-2)}
:where(html[data-theme=dark]) .receipt-pack-hint{color:var(--accent-ink)}
:where(html[data-theme=dark]) .receipt-pack-hint button{color:var(--accent-ink)}
/* chat-workspace.css */
:where(html[data-theme=dark]) .inbox-contact{border-right:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .chat-dialog-actions{border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .chat-dialog-actions button{background:var(--surface-2);border:1px solid var(--line)}
:where(html[data-theme=dark]) .chat-dialog-actions [data-inbox-state]{color:var(--fg-3)}
:where(html[data-theme=dark]) .chat-state-badge{color:var(--fg-3)}
:where(html[data-theme=dark]) .chat-note{background:var(--warn-soft)!important;border:1px solid var(--warn-line)}
:where(html[data-theme=dark]) .chat-note strong{color:var(--warn)}
:where(html[data-theme=dark]) #chat-compose.chat-composer{border-top:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .compose-hint{color:var(--fg-3)}
:where(html[data-theme=dark]) .note-hint{color:var(--warn)}
:where(html[data-theme=dark]) .chat-composer.is-note{background:var(--warn-soft)!important}
:where(html[data-theme=dark]) .chat-composer textarea{border:1px solid var(--line)}
:where(html[data-theme=dark]) .compose-tools button:not(.primary){background:var(--surface-2);border:1px solid var(--line)}
:where(html[data-theme=dark]) .compose-shortcut{color:var(--fg-3)}
:where(html[data-theme=dark]) .compose-file{background:var(--surface-2);border:1px solid var(--line)}
:where(html[data-theme=dark]) .compose-file small{color:var(--fg-3)}
:where(html[data-theme=dark]) .chat-composer [data-compose-popup]{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .compose-template{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .compose-template small{color:var(--fg-3)}
@media(max-width:700px){:where(html[data-theme=dark]) .inbox-contact{border-top:1px solid var(--line)}}
:where(html[data-theme=dark]) .content:has(>.inbox)>.schedule-toolbar{border-bottom:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .chat-sync-status{color:var(--fg-3)}
:where(html[data-theme=dark]) .inbox .inbox-list{background:var(--surface);border-right-color:var(--info-line)}
:where(html[data-theme=dark]) .inbox .inbox-contact{background:var(--surface);border-right:1px solid var(--info-line)}
:where(html[data-theme=dark]) .inbox .inbox-contact h3{color:var(--info);border-top:1px solid var(--info-line)}
:where(html[data-theme=dark]) .inbox .inbox-contact h2{color:var(--info)}
:where(html[data-theme=dark]) .inbox .inbox-contact select{border:1px solid var(--info-line);background:var(--surface)}
:where(html[data-theme=dark]) .inbox .inbox-contact .back-link{color:var(--info)}
:where(html[data-theme=dark]) .inbox .inbox-filters{background:var(--surface)}
:where(html[data-theme=dark]) .inbox .inbox-filters input{background:var(--surface-2);border-color:var(--line)}
:where(html[data-theme=dark]) .inbox .inbox-filters select,:where(html[data-theme=dark]) .inbox #chat-inbox-state{border-color:var(--info-line);color:var(--fg-3);background:var(--surface)}
:where(html[data-theme=dark]) .inbox .chat-contact{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .inbox .chat-contact:hover{background:var(--surface-2)}
:where(html[data-theme=dark]) .inbox .chat-contact.selected{background:var(--info-soft)}
:where(html[data-theme=dark]) .inbox .chat-contact-body strong{color:var(--info)}
:where(html[data-theme=dark]) .inbox .chat-route{color:var(--fg-3)}
:where(html[data-theme=dark]) .inbox .chat-avatar{background:var(--surface-2);color:var(--info)}
:where(html[data-theme=dark]) .inbox .inbox-dialog-head{background:var(--surface)}
:where(html[data-theme=dark]) .inbox .chat-messages{background:var(--surface-2)}
:where(html[data-theme=dark]) .inbox .chat-bubble{border:1px solid var(--line);background:var(--surface);color:var(--info)}
:where(html[data-theme=dark]) .inbox .chat-bubble.chat-out{background:var(--info-soft);border-color:var(--info-line);color:var(--info)}
:where(html[data-theme=dark]) .inbox .chat-bubble small{color:var(--fg-3)}
:where(html[data-theme=dark]) .inbox .crm-system-event{color:var(--fg-3)}
:where(html[data-theme=dark]) .inbox .chat-note{background:var(--warn-soft)!important;color:var(--warn)}
:where(html[data-theme=dark]) .inbox .chat-dialog-actions{background:var(--surface);border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .inbox .chat-dialog-actions button{color:var(--fg-3)}
:where(html[data-theme=dark]) .inbox .chat-dialog-actions button:hover{background:var(--surface-2);color:var(--info)}
:where(html[data-theme=dark]) .inbox .chat-dialog-actions [data-inbox-state]{color:var(--ok)}
:where(html[data-theme=dark]) .inbox .compose-routing select{background:var(--surface);color:var(--info)}
:where(html[data-theme=dark]) .inbox .compose-hint{color:var(--fg-3)}
:where(html[data-theme=dark]) .inbox #chat-compose textarea:focus{outline:1px solid var(--info-line)}
:where(html[data-theme=dark]) .inbox #chat-compose .compose-tools button{color:var(--fg-3)}
:where(html[data-theme=dark]) .inbox #chat-compose .compose-tools button:hover{background:var(--surface-2);color:var(--info)}
:where(html[data-theme=dark]) .inbox .chat-composer.is-note{background:var(--warn-soft)!important}
@media(max-width:700px){:where(html[data-theme=dark]) .inbox .inbox-contact{border-top:1px solid var(--info-line)}}
@media(max-width:960px){:where(html[data-theme=dark]) .inbox .inbox-list{border-bottom:1px solid var(--info-line)}:where(html[data-theme=dark]) .inbox .inbox-contact{border-top:1px solid var(--info-line)}}
:where(html[data-theme=dark]) .chat-contact-card{border:1px solid var(--info-line);background:var(--surface)}
:where(html[data-theme=dark]) .contact-initials{background:var(--info-soft);color:var(--info)}
:where(html[data-theme=dark]) .contact-field>span{color:var(--fg-3)}
:where(html[data-theme=dark]) .deal-contact-card .contact-card-top small{color:var(--info)}
:where(html[data-theme=dark]) .deal-link-preview section{background:var(--surface-2)}
:where(html[data-theme=dark]) .deal-link-warning{background:var(--accent-soft)}
:where(html[data-theme=dark]) .unlinked-list{border:1px solid var(--line)}
:where(html[data-theme=dark]) .unlinked-order-row{border-bottom:1px solid var(--line);background:var(--surface);color:var(--info)}
:where(html[data-theme=dark]) .unlinked-order-row:hover,:where(html[data-theme=dark]) .unlinked-order-row:focus-visible{background:var(--surface-2)}
:where(html[data-theme=dark]) .unlinked-order-row small{color:var(--fg-3)}
:where(html[data-theme=dark]) .unlinked-order-row .unlinked-match{color:var(--ok)}
:where(html[data-theme=dark]) .contact-terms-badge{border:1px solid var(--line,var(--line));color:var(--muted,var(--fg-3));background:var(--surface,var(--surface))}
:where(html[data-theme=dark]) .contact-terms[data-mode="discount"] .contact-terms-badge{color:var(--accent-ink);background:var(--accent-soft);border-color:var(--accent-line)}
:where(html[data-theme=dark]) .contact-terms[data-mode="cost"] .contact-terms-badge{color:var(--ok);background:var(--surface-2);border-color:var(--ok-line)}
:where(html[data-theme=dark]) .contact-terms-edit{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface));color:var(--muted,var(--fg-3))}
:where(html[data-theme=dark]) .contact-terms-edit:hover{color:var(--accent,var(--accent-ink))}
/* system-admin.css */
:where(html[data-theme=dark]) .system-cards button,:where(html[data-theme=dark]) .system-kpis>div{border:1px solid var(--info-line);background:var(--surface)}
:where(html[data-theme=dark]) .system-cards span,:where(html[data-theme=dark]) .system-kpis small{color:var(--fg-3)}
:where(html[data-theme=dark]) .system-kpis strong{color:var(--info)}
:where(html[data-theme=dark]) .sys-state{background:var(--warn-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .sys-state.approved{background:var(--ok-soft);color:var(--ok)}
:where(html[data-theme=dark]) .sys-state.rejected{background:var(--surface-2);color:var(--fg-2)}
:where(html[data-theme=dark]) .sys-notice{background:var(--surface-2)}
:where(html[data-theme=dark]) button.danger-link{color:var(--bad)}
:where(html[data-theme=dark]) [data-master-report] small{color:var(--fg-3)}
:where(html[data-theme=dark]) .system-filters label select{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .settings-menu{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .settings-menu h1{color:var(--info)}
:where(html[data-theme=dark]) .settings-menu h2{color:var(--fg-3)}
:where(html[data-theme=dark]) .settings-menu nav button{color:var(--info)}
:where(html[data-theme=dark]) .settings-menu nav button:hover{background:var(--surface-2)}
:where(html[data-theme=dark]) .settings-menu nav button.is-current{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .settings-detail{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .settings-bell{border:1px solid var(--line);background:var(--surface);color:var(--fg-3)}
:where(html[data-theme=dark]) .settings-bell.has-pending{color:var(--accent-ink);background:var(--accent-soft);border-color:var(--accent-line)}
:where(html[data-theme=dark]) .deletion-muted{background:var(--surface-2)!important;color:var(--fg-3)!important}
:where(html[data-theme=dark]) .deletion-muted strong,:where(html[data-theme=dark]) .deletion-muted td,:where(html[data-theme=dark]) .deletion-muted small{color:var(--fg-3)!important}
:where(html[data-theme=dark]) .deletion-label{border:1px solid var(--line-strong);background:var(--surface-2);color:var(--fg-2)}
:where(html[data-theme=dark]) .deletion-label.approved{background:var(--surface-3)}
:where(html[data-theme=dark]) .deletion-muted .secondary{background:var(--surface)}
:where(html[data-theme=dark]) .part-details summary{color:var(--fg-3)}
:where(html[data-theme=dark]) .part-details summary:hover{background:var(--surface-2)}
:where(html[data-theme=dark]) .part-details-body{background:var(--surface)}
:where(html[data-theme=dark]) .order-line .part-details-body .work-select{color:var(--fg-2)}
:where(html[data-theme=dark]) .order-line-head.part-line{background:var(--surface-2)}
:where(html[data-theme=dark]) .orders-compact .order-line.part-line{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .orders-compact .order-line.part-line:hover{border-color:var(--info-line)}
:where(html[data-theme=dark]) .orders-compact .order-line.part-line>div:not(.line-name){border-left:1px solid var(--line)}
:where(html[data-theme=dark]) .orders-compact .part-line>input{border-left:1px solid var(--line)!important}
:where(html[data-theme=dark]) .orders-compact .part-line input:focus,:where(html[data-theme=dark]) .orders-compact .part-line select:focus{background:var(--surface)}
:where(html[data-theme=dark]) .orders-compact .part-line input[readonly]{background:var(--surface);color:var(--fg-2)}
:where(html[data-theme=dark]) .orders-compact .part-line .inline-add{border-left:1px solid var(--line)}
:where(html[data-theme=dark]) .orders-compact .part-line .inline-add:hover{background:var(--accent-soft)}
:where(html[data-theme=dark]) .orders-compact .part-line>.secondary{border-left:1px solid var(--line);color:var(--fg-3)}
:where(html[data-theme=dark]) .orders-compact .part-line>.secondary:hover{background:var(--bad-soft);color:var(--bad)}
:where(html[data-theme=dark]) .orders-compact .part-line .part-details-body{border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .order-line-head.work-line{background:var(--surface-2)}
:where(html[data-theme=dark]) .orders-compact .order-line.work-line{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .orders-compact .order-line.work-line:hover{border-color:var(--info-line)}
:where(html[data-theme=dark]) .orders-compact .work-line>div:not(.line-name){border-left:1px solid var(--line)}
:where(html[data-theme=dark]) .orders-compact .work-line>input,:where(html[data-theme=dark]) .orders-compact .work-line>select{border-left:1px solid var(--line)!important}
:where(html[data-theme=dark]) .orders-compact .work-line input:focus,:where(html[data-theme=dark]) .orders-compact .work-line select:focus{background:var(--surface)}
:where(html[data-theme=dark]) .orders-compact .work-line input[readonly]{background:var(--surface);color:var(--fg-2)}
:where(html[data-theme=dark]) .orders-compact .work-line .inline-add{border-left:1px solid var(--line)}
:where(html[data-theme=dark]) .orders-compact .work-line .inline-add:hover{background:var(--accent-soft)}
:where(html[data-theme=dark]) .orders-compact .work-line>.secondary{border-left:1px solid var(--line);color:var(--fg-3)}
:where(html[data-theme=dark]) .orders-compact .work-line>.secondary:hover{background:var(--bad-soft);color:var(--bad)}
:where(html[data-theme=dark]) .work-details summary{color:var(--fg-3)}
:where(html[data-theme=dark]) .work-details summary:hover{background:var(--surface-2)}
:where(html[data-theme=dark]) .work-details-body{background:var(--surface);border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .work-details-body small,:where(html[data-theme=dark]) .work-details-body .work-select{color:var(--fg-2)}
:where(html[data-theme=dark]) .chat-filter-summary{color:var(--fg-3)}
:where(html[data-theme=dark]) .chat-filter-summary .back-link{color:var(--info)}
:where(html[data-theme=dark]) .my-pay-card summary:focus-visible{outline:2px solid var(--accent-line)}
:where(html[data-theme=dark]) .my-pay-sound:focus-visible{outline:2px solid var(--accent-line)}
:where(html[data-theme=dark]) .system-audit td small{color:var(--muted,var(--fg-3))}
:where(html[data-theme=dark]) .system-audit a{color:var(--accent,var(--accent-ink))}
:where(html[data-theme=dark]) .sys-del-info small{color:var(--fg-3,var(--fg-2))}
/* supplier-returns.css */
:where(html[data-theme=dark]) .return-sync-note{border:1px solid var(--line,var(--line));background:var(--surface-2,var(--surface))}
:where(html[data-theme=dark]) .return-state-posted{color:var(--ok);background:var(--ok-soft)}
:where(html[data-theme=dark]) .return-state-review{color:var(--warn);background:var(--warn-soft)}
/* master.css */
:where(html[data-theme=dark]) .master-workspace{background:var(--surface-2);color:var(--info)}
:where(html[data-theme=dark]) .master-header span{color:var(--fg-3)}
:where(html[data-theme=dark]) .master-nav{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .master-nav button{border:1px solid var(--line);background:var(--surface);color:var(--fg-2)}
:where(html[data-theme=dark]) .master-nav button.active{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .master-heading p{color:var(--fg-3)}
:where(html[data-theme=dark]) .master-date-controls input{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .master-event,:where(html[data-theme=dark]) .master-order-card{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .master-event-time span,:where(html[data-theme=dark]) .master-event-body small,:where(html[data-theme=dark]) .master-order-card small{color:var(--fg-3)}
:where(html[data-theme=dark]) .master-event-meta{color:var(--fg-2)}
:where(html[data-theme=dark]) .master-payment{background:var(--warn-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .master-payment-paid{background:var(--ok-soft);color:var(--ok)}
:where(html[data-theme=dark]) .master-payment-cancelled,:where(html[data-theme=dark]) .master-payment-no_charge{background:var(--surface-2);color:var(--fg-2)}
:where(html[data-theme=dark]) .master-empty{border:1px dashed var(--info-line);background:var(--surface)}
:where(html[data-theme=dark]) .master-empty p{color:var(--fg-3)}
:where(html[data-theme=dark]) .master-filters label{color:var(--fg-2)}
:where(html[data-theme=dark]) .master-filters input,:where(html[data-theme=dark]) .master-filters select{border:1px solid var(--line);background:var(--surface);color:var(--info)}
:where(html[data-theme=dark]) .master-pagination{color:var(--fg-3)}
:where(html[data-theme=dark]) .master-note{color:var(--fg-3)}
:where(html[data-theme=dark]) .master-detail-section{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .master-work-table th{color:var(--fg-3);background:var(--surface)}
:where(html[data-theme=dark]) .master-work-table td,:where(html[data-theme=dark]) .master-work-table th{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .master-workspace button:focus-visible,:where(html[data-theme=dark]) .master-workspace input:focus-visible,:where(html[data-theme=dark]) .master-workspace select:focus-visible{outline:3px solid var(--accent-line)}
:where(html[data-theme=dark]) .master-filters .master-period-control{color:var(--fg-2)}
:where(html[data-theme=dark]) .master-period-control [data-master-period]::after{color:var(--fg-3)}
:where(html[data-theme=dark]) .master-period-dialog{background:var(--surface,var(--surface))}
:where(html[data-theme=dark]) .master-period-dialog .master-period-hint{color:var(--fg-3)}
:where(html[data-theme=dark]) .master-period-dialog .period-body nav button.selected{background:var(--accent-soft);color:var(--accent-ink)}
:where(html[data-theme=dark]) .master-period-dialog>header{background:var(--surface,var(--surface))}
:where(html[data-theme=dark]) .master-period-dialog>footer{background:var(--surface,var(--surface))}
:where(html[data-theme=dark]) .master-cost-note{border:1px solid var(--ok-line);background:var(--surface-2);color:var(--ok)}
/* ui-runtime.css */
:where(html[data-theme=dark]) .page-loading:after,:where(html[data-theme=dark]) .boot:after{border:3px solid var(--line)}
:where(html[data-theme=dark]) .table-tools-count{color:var(--fg-3)}
:where(html[data-theme=dark]) .sortable-heading:hover{color:var(--accent-ink);background:var(--accent-soft)}
:where(html[data-theme=dark]) .sound-toggle{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .download-grid button{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .download-grid span{color:var(--fg-3)}
:where(html[data-theme=dark]) .backup-card{border:1px solid var(--accent-line);background:var(--surface)}
:where(html[data-theme=dark]) .crm-deal-card.needs-reply{background:linear-gradient(125deg,var(--bad-soft),var(--surface) 80%);border-color:var(--bad-line)}
:where(html[data-theme=dark]) .reply-indicator{color:var(--bad);background:var(--bad-soft)}
:where(html[data-theme=dark]) .deal-reply-notice{border:1px solid var(--bad-line);background:linear-gradient(110deg,var(--bad-soft),var(--surface));color:var(--bad)}
:where(html[data-theme=dark]) .deal-reply-notice small{color:var(--bad)}
:where(html[data-theme=dark]) .wa-data-note{background:var(--accent-soft);border:1px solid var(--accent-line);color:var(--accent-ink)}
:where(html[data-theme=dark]) .sound-toggle{color:var(--fg-3)}
:where(html[data-theme=dark]) .sound-toggle.is-on{color:var(--accent-ink);background:var(--accent-soft)}
:where(html[data-theme=dark]) .guide-frame{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .deal-stage-picker details{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .deal-stage-picker summary small{color:var(--fg-2)}
:where(html[data-theme=dark]) .deal-stage-picker summary strong{color:var(--info)}
:where(html[data-theme=dark]) .deal-stage-options button{color:var(--info)}
:where(html[data-theme=dark]) .deal-stage-picker .tone-0{background:var(--info-soft)}
:where(html[data-theme=dark]) .deal-stage-picker .tone-1{background:var(--warn-soft)}
:where(html[data-theme=dark]) .deal-stage-picker .tone-2{background:var(--ok-soft)}
:where(html[data-theme=dark]) .deal-stage-picker .tone-3{background:var(--info-soft)}
:where(html[data-theme=dark]) .deal-stage-picker .tone-4{background:var(--accent-soft)}
:where(html[data-theme=dark]) .deal-stage-picker .tone-5{background:var(--info-soft)}
:where(html[data-theme=dark]) .deal-stage-picker .won{background:var(--ok-soft)}
:where(html[data-theme=dark]) .deal-stage-picker .lost{background:var(--surface-3)}
:where(html[data-theme=dark]) .related-options{border:1px solid var(--line)}
:where(html[data-theme=dark]) .related-options small{color:var(--fg-3)}
:where(html[data-theme=dark]) .related-work-button{color:var(--accent-ink)}
@media(min-width:701px){:where(html[data-theme=dark]) .orders-compact .order-line:is(.work-line,.part-line):last-child{border-bottom:1px solid var(--line)}}
:where(html[data-theme=dark]) .orders-compact .order-line [data-discount-price]{border-left:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .trash-button{color:var(--bad)!important;background:var(--surface-2)!important;border:1px solid var(--bad-line)!important}
:where(html[data-theme=dark]) .trash-button:hover{background:var(--bad-soft)!important}
:where(html[data-theme=dark]) .cash-count-card{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .cash-count-card small{color:var(--fg-3)}
:where(html[data-theme=dark]) .deal-full-composer{background:var(--surface);border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .crm-deal-record>.crm-record-card{border-right:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .crm-record-header .crm-stage-stripe span.current{outline:1px solid var(--line)}
:where(html[data-theme=dark]) .crm-record-header .deal-stage-options{background:var(--surface);border:1px solid var(--info-line)}
:where(html[data-theme=dark]) .crm-record-header .deal-header-owner option{background:var(--surface);color:var(--info)}
:where(html[data-theme=dark]) .crm-record-menu>div{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .crm-record-menu .crm-deal-permalink{color:var(--info)}
:where(html[data-theme=dark]) .crm-deal-record .crm-detail-main>p{color:var(--fg-2)}
:where(html[data-theme=dark]) .crm-deal-record .deal-form :is(small,.field-help){color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-deal-record .deal-full-composer .compose-routing select{border:1px solid var(--line);background:var(--surface)}
:where(html[data-theme=dark]) .crm-deal-record .deal-full-composer .compose-hint{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-deal-record .deal-full-composer .compose-shortcut{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-deal-record .compact-compose{border-top:1px solid var(--info-line);background:var(--surface)}
:where(html[data-theme=dark]) .crm-deal-record .compact-compose .compose-routing select{color:var(--info)}
:where(html[data-theme=dark]) .crm-deal-record .compact-compose .compose-routing select:hover{background:var(--surface-2)}
:where(html[data-theme=dark]) .crm-deal-record .compact-compose :is(.is-note,.compose-attention,.compose-readonly) .compose-hint{color:var(--accent-ink);background:var(--accent-soft)}
:where(html[data-theme=dark]) .crm-deal-record .compact-compose .compose-readonly .compose-hint{background:var(--surface-2);color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-deal-record .compact-compose #chat-compose textarea:focus{outline:1px solid var(--info-line);background:var(--surface)}
:where(html[data-theme=dark]) .crm-deal-record .compact-compose .compose-tools button:not([data-send]){color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-deal-record .compact-compose .compose-tools button:not([data-send]):hover{background:var(--surface-2);color:var(--info)}
:where(html[data-theme=dark]) .crm-deal-record .compact-compose :is(.compose-status,.compose-info)>summary{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-deal-record .compact-compose :is(.compose-status,.compose-info)>summary:hover{background:var(--surface-2)}
:where(html[data-theme=dark]) .crm-deal-record .compact-compose .compose-info>summary{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-deal-record .compact-compose :is(.compose-status,.compose-info)>div{background:var(--surface);border:1px solid var(--info-line)}
:where(html[data-theme=dark]) .crm-deal-record .compact-compose .compose-status .chat-dialog-actions button{color:var(--info)}
:where(html[data-theme=dark]) .crm-deal-record .compact-compose .compose-status .chat-dialog-actions button:hover{background:var(--surface-2)}
:where(html[data-theme=dark]) .crm-deal-record .compact-compose .compose-status [data-clear]{border-top:1px solid var(--line)!important}
:where(html[data-theme=dark]) .crm-deal-record .compact-compose .compose-info>div{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-deal-record .compact-compose .compose-file{border:1px solid var(--line)}
:where(html[data-theme=dark]) .crm-deal-record [data-history-info]:not([hidden]){color:var(--accent-ink);background:var(--accent-soft)}
:where(html[data-theme=dark]) .crm-kanban .crm-deal-card:hover{border-color:var(--info-line);background:var(--surface)}
:where(html[data-theme=dark]) .crm-kanban .crm-deal-card.needs-reply{background:linear-gradient(110deg,var(--surface-2),var(--surface) 85%);border-color:var(--bad-line)}
:where(html[data-theme=dark]) .crm-kanban .crm-deal-card.needs-reply:hover{background:var(--surface-2)}
:where(html[data-theme=dark]) .crm-kanban .crm-card-amount{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-kanban .crm-card-request{color:var(--info)}
:where(html[data-theme=dark]) .crm-kanban .crm-deal-card footer .crm-card-context{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-kanban .crm-deal-card footer .crm-card-next{color:var(--accent-ink)}
:where(html[data-theme=dark]) .crm-kanban .crm-deal-card footer .reply-indicator{color:var(--bad)}
:where(html[data-theme=dark]) .crm-kanban .crm-card-created{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-deal-record .crm-system-event.deal-system-event{color:var(--fg-3)}
:where(html[data-theme=dark]) .deal-system-event header{color:var(--fg-3)}
:where(html[data-theme=dark]) .deal-system-event header strong{color:var(--fg-2)}
:where(html[data-theme=dark]) .deal-event-field{color:var(--fg-2)}
:where(html[data-theme=dark]) .deal-event-before{color:var(--fg-3)}
:where(html[data-theme=dark]) .deal-event-after{color:var(--info)}
:where(html[data-theme=dark]) .deal-event-after.deal-event-stage{background:var(--ok-soft);color:var(--ok)}
:where(html[data-theme=dark]) .deal-event-long summary{color:var(--fg-3)}
:where(html[data-theme=dark]) .crm-deal-record .crm-timeline .crm-system-event.deal-system-event.deal-ai-comment{background:var(--surface-3);border:1px solid var(--info-line);color:var(--info)}
:where(html[data-theme=dark]) .crm-deal-record .deal-ai-comment header strong{color:var(--info)}
:where(html[data-theme=dark]) .crm-board-toolbar.deal-search-toolbar{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .deal-search-toolbar .deal-search-chip{background:var(--ok-soft);border:1px solid var(--ok-line);color:var(--ok)}
:where(html[data-theme=dark]) .deal-search-total{color:var(--fg-3)}
:where(html[data-theme=dark]) .deal-search-panel:not([hidden]){background:var(--surface);border:1px solid var(--info-line)}
:where(html[data-theme=dark]) .deal-search-panel nav{border-right:1px solid var(--line)}
:where(html[data-theme=dark]) .deal-search-panel nav button{background:var(--surface);border-bottom:1px solid var(--line);color:var(--fg-2)}
:where(html[data-theme=dark]) .deal-search-panel nav button:hover{background:var(--surface-2);color:var(--info)}
:where(html[data-theme=dark]) .deal-search-panel h3{color:var(--fg-3)}
:where(html[data-theme=dark]) .deal-search-fields label{color:var(--fg-3)}
:where(html[data-theme=dark]) .deal-search-fields input,:where(html[data-theme=dark]) .deal-search-fields select{border:1px solid var(--info-line)}
:where(html[data-theme=dark]) .deal-active-filters button{background:var(--surface-2);color:var(--info)}
:where(html[data-theme=dark]) .deal-view-switch button{color:var(--fg-3)}
:where(html[data-theme=dark]) .deal-view-switch button[aria-pressed=true]{color:var(--accent-ink);background:var(--accent-soft)}
:where(html[data-theme=dark]) .deal-list-view{background:var(--surface)}
:where(html[data-theme=dark]) .receipt-choice-list button{background:var(--surface,var(--surface));border:1px solid var(--border,var(--line))}
:where(html[data-theme=dark]) .document-link:hover{color:var(--orange,var(--accent-ink))}
:where(html[data-theme=dark]) .orders-compact .order-toolbar #save-state{color:var(--text,var(--fg))}
:where(html[data-theme=dark]) .orders-compact #save-state small{color:var(--muted,var(--fg-3))}
:where(html[data-theme=dark]) .outsourced-card{border:1px solid var(--border,var(--line));background:var(--surface,var(--surface))}
:where(html[data-theme=dark]) .outsourced-card header span,:where(html[data-theme=dark]) .outsourced-label{color:var(--muted,var(--info))}
:where(html[data-theme=dark]) .outsourced-card footer{border-top:1px solid var(--border,var(--line))}
:where(html[data-theme=dark]) .missed-call-heading{background:var(--surface);border:1px solid var(--line)}
:where(html[data-theme=dark]) .missed-call-card{background:var(--surface);border:1px solid var(--accent-line);color:var(--fg)}
:where(html[data-theme=dark]) .missed-call-card>small{color:var(--fg-2)}
:where(html[data-theme=dark]) .missed-call-close{color:var(--fg-2)}
:where(html[data-theme=dark]) .missed-call-card.is-answered .missed-call-actions>span{color:var(--ok)}
:where(html[data-theme=dark]) #missed-call-stack .missed-call-card.is-attempted .missed-call-actions>span{color:var(--warn)}
:where(html[data-theme=dark]) .missed-queue{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
:where(html[data-theme=dark]) .missed-queue>header span{color:var(--fg-2,var(--fg-2))}
:where(html[data-theme=dark]) .missed-queue>header small{color:var(--fg-2,var(--fg-2))}
:where(html[data-theme=dark]) .missed-queue>p{color:var(--fg-2,var(--fg-2))}
:where(html[data-theme=dark]) .missed-queue-row{border-top:1px solid var(--line,var(--line))}
:where(html[data-theme=dark]) .missed-queue-row small{color:var(--fg-2,var(--fg-2))}
:where(html[data-theme=dark]) .missed-queue-row i{color:var(--fg-2,var(--fg-2))}
:where(html[data-theme=dark]) .missed-queue-head{color:var(--fg-2,var(--fg-2))}
:where(html[data-theme=dark]) .missed-queue-row.is-attempted .missed-queue-attempts{color:var(--warn)}
:where(html[data-theme=dark]) .missed-queue-actions .missed-queue-remove{color:var(--fg-2,var(--fg-2))}
:where(html[data-theme=dark]) .lang-toggle{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface));color:var(--fg-2,var(--fg-3))}
:where(html[data-theme=dark]) .lang-toggle:hover{color:var(--accent-ink)}
/* cash-audit.css */
:where(html[data-theme=dark]) .cash-icon-action{border:1px solid var(--line);background:var(--surface);color:var(--fg-2)}
:where(html[data-theme=dark]) .cash-icon-action:hover{color:var(--accent-ink);background:var(--accent-soft);border-color:var(--accent-line)}
:where(html[data-theme=dark]) .cash-audit-list article,:where(html[data-theme=dark]) .cash-audit-event{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .cash-audit-list small,:where(html[data-theme=dark]) .cash-audit-event small{color:var(--fg-3)}
:where(html[data-theme=dark]) .deletion-label.corrected{color:var(--fg-2);background:var(--surface-2)}
:where(html[data-theme=dark]) .cash-journal .cash-j-date-search{background:var(--surface-2);border:1px solid var(--info-line)}
:where(html[data-theme=dark]) .cash-journal .cash-j-date-search label{color:var(--info)}
:where(html[data-theme=dark]) .cash-journal .cash-j-date-search input{border:1px solid var(--info-line);background:var(--surface)}
:where(html[data-theme=dark]) .cash-journal .cash-j-table th{background:var(--surface-2);color:var(--info)}
:where(html[data-theme=dark]) .cash-journal .cash-j-table tbody tr:hover{background:var(--surface-2)}
:where(html[data-theme=dark]) .shift-report-dialog .shift-report-period{color:var(--fg-3)}
:where(html[data-theme=dark]) .shift-report-totals section{border:1px solid var(--line);background:var(--surface-2)}
:where(html[data-theme=dark]) .shift-report-totals section+section{background:var(--surface-2);border-color:var(--info-line)}
:where(html[data-theme=dark]) .shift-report-totals span{color:var(--info)}
:where(html[data-theme=dark]) .shift-report-totals strong{color:var(--info)}
:where(html[data-theme=dark]) .shift-report-totals small{color:var(--fg-3)}
:where(html[data-theme=dark]) .shift-report-dialog .shift-report-note{color:var(--fg-3)}
:where(html[data-theme=dark]) .shift-report-breakdown{border:1px solid var(--line)}
:where(html[data-theme=dark]) .shift-report-dialog summary{color:var(--info)}
:where(html[data-theme=dark]) .shift-report-operations-title span{color:var(--fg-3)}
:where(html[data-theme=dark]) .shift-report-dialog th,:where(html[data-theme=dark]) .shift-report-dialog td{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .shift-report-dialog th{background:var(--surface-2);color:var(--fg-3)}
:where(html[data-theme=dark]) .shift-report-dialog td small{color:var(--fg-3)}
:where(html[data-theme=dark]) .shift-report-dialog .is-income{color:var(--ok)}
:where(html[data-theme=dark]) .shift-report-dialog .is-expense{color:var(--bad)}
:where(html[data-theme=dark]) .shift-report-footer span{color:var(--fg-3)}
/* money-notes.css */
:where(html[data-theme=dark]) .money-notes-btn{border:1px solid var(--accent-line,var(--accent-line));background:var(--accent-soft,var(--accent-soft));color:var(--accent-ink,var(--accent-ink))}
:where(html[data-theme=dark]) .money-notes-pop{border:1px solid var(--line-strong,var(--line-strong));background:var(--surface,var(--surface));color:var(--fg,var(--fg))}
:where(html[data-theme=dark]) .mn-in-sum{color:var(--ok,var(--ok))}
:where(html[data-theme=dark]) .mn-out-sum{color:var(--bad,var(--bad))}
:where(html[data-theme=dark]) .mn-close{color:var(--fg-2,var(--fg-2))}
:where(html[data-theme=dark]) .mn-form{background:var(--surface-2,var(--surface))}
:where(html[data-theme=dark]) .mn-kinds button{border:1px solid var(--line-strong,var(--line-strong));background:var(--surface,var(--surface));color:var(--fg,var(--fg))}
:where(html[data-theme=dark]) .mn-kinds small{color:var(--fg-3,var(--fg-2))}
:where(html[data-theme=dark]) .mn-error{color:var(--bad,var(--bad))}
:where(html[data-theme=dark]) .mn-row{border-top:1px solid var(--line,var(--line))}
:where(html[data-theme=dark]) .mn-check{border:1.5px solid var(--line-strong,var(--line-strong));color:var(--fg-2,var(--fg-2))}
:where(html[data-theme=dark]) .mn-in{background:var(--ok-soft,var(--ok-soft));color:var(--ok,var(--ok))}
:where(html[data-theme=dark]) .mn-out{background:var(--bad-soft,var(--bad-soft));color:var(--bad,var(--bad))}
:where(html[data-theme=dark]) .mn-note{background:var(--surface-3,var(--surface-2));color:var(--fg-2,var(--fg-2))}
:where(html[data-theme=dark]) .mn-in-sum{color:var(--ok,var(--ok))}
:where(html[data-theme=dark]) .mn-out-sum{color:var(--bad,var(--bad))}
:where(html[data-theme=dark]) .mn-due{color:var(--fg-2,var(--fg-2))}
:where(html[data-theme=dark]) .mn-due.is-late{color:var(--bad,var(--bad))}
:where(html[data-theme=dark]) .mn-row.is-done .mn-text,:where(html[data-theme=dark]) .mn-row.is-done .mn-sum,:where(html[data-theme=dark]) .mn-row.is-done .mn-due{color:var(--fg-3,var(--fg-2))}
:where(html[data-theme=dark]) .mn-empty{color:var(--fg-2,var(--fg-2))}
/* design-v4.css */
html[data-theme=dark]{background:var(--bg)}
html[data-theme=dark] body{background:var(--bg);color:var(--fg)}
html[data-theme=dark] a{color:var(--info)}
html[data-theme=dark] button:focus-visible,html[data-theme=dark] a:focus-visible,html[data-theme=dark] input:focus-visible,html[data-theme=dark] select:focus-visible,html[data-theme=dark] textarea:focus-visible,html[data-theme=dark] summary:focus-visible{outline:2px solid var(--accent)}
html[data-theme=dark] input:not([type=checkbox]):not([type=radio]),html[data-theme=dark] select,html[data-theme=dark] textarea{background:var(--surface);border:1px solid var(--line-strong);color:var(--fg)}
html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:var(--fg-3)}
html[data-theme=dark] label{color:var(--fg-2)}
html[data-theme=dark] .muted,html[data-theme=dark] .field-help,html[data-theme=dark] .optional{color:var(--fg-3)}
html[data-theme=dark] .error{color:var(--bad)}
html[data-theme=dark] .primary{background:var(--accent-strong);color:#fff;border:1px solid var(--accent-strong)}
html[data-theme=dark] .primary:hover{background:var(--accent-hover)}
html[data-theme=dark] .secondary,html[data-theme=dark] .balance-button{background:var(--surface);border:1px solid var(--line-strong);color:var(--fg)}
html[data-theme=dark] .secondary:hover,html[data-theme=dark] .balance-button:hover{background:var(--surface-3);border-color:var(--line-strong)}
html[data-theme=dark] .workspace{background:var(--bg)}
html[data-theme=dark] .workspace>.sidebar{background:var(--rail);border:0;color:var(--rail-fg)}
html[data-theme=dark] .sidebar .sidebar-toggle{border:0;color:var(--rail-fg);background:transparent}
html[data-theme=dark] .sidebar .nav-caption{color:var(--rail-cap)}
html[data-theme=dark] .sidebar .nav{border:0;color:var(--rail-fg);background:transparent}
html[data-theme=dark] .sidebar .nav:hover{background:var(--rail-2);color:#fff}
html[data-theme=dark] .sidebar .nav.active{background:var(--rail-2);color:#fff}
html[data-theme=dark] .sidebar .nav.active:before{background:var(--accent)}
html[data-theme=dark] .sidebar .profile{border-top:1px solid #ffffff16;color:#fff}
html[data-theme=dark] .sidebar .profile small{color:var(--rail-fg)}
html[data-theme=dark] .sidebar .avatar{background:var(--accent-strong);color:#fff}
html[data-theme=dark] .sidebar .exit{color:var(--rail-fg)}
html[data-theme=dark] .sidebar #my-pay .my-pay-card{background:var(--rail-2);border:0}
html[data-theme=dark] .topbar{background:var(--surface);border-bottom:1px solid var(--line)}
html[data-theme=dark] .topbar .date{color:var(--fg-3)}
html[data-theme=dark] .topbar .crumb{color:var(--fg-2)}
html[data-theme=dark] .topbar .sound-toggle{background:var(--surface);border:1px solid var(--line);color:var(--fg-2)}
html[data-theme=dark] .history-panel,html[data-theme=dark] .safe-panel,html[data-theme=dark] .settings-card,html[data-theme=dark] .wa-panel,html[data-theme=dark] .download-grid button,html[data-theme=dark] .backup-card,html[data-theme=dark] .master-card,html[data-theme=dark] .master-summary{background:var(--surface);border:1px solid var(--line);color:var(--fg)}
html[data-theme=dark] .report-table,html[data-theme=dark] .calls-table{background:var(--surface);color:var(--fg)}
html[data-theme=dark] .report-table th,html[data-theme=dark] .calls-table th,html[data-theme=dark] table th{background:var(--surface-2);color:var(--fg-3);border-bottom:1px solid var(--line)}
html[data-theme=dark] .report-table td,html[data-theme=dark] .calls-table td,html[data-theme=dark] table td{border-bottom:1px solid var(--line);color:var(--fg)}
html[data-theme=dark] .report-table tbody tr:hover,html[data-theme=dark] .calls-table tbody tr:hover{background:var(--surface-2)}
html[data-theme=dark] .report-table td small,html[data-theme=dark] .calls-table td small{color:var(--fg-3)}
html[data-theme=dark] .table-tools{background:var(--surface);border-bottom:1px solid var(--line)}
html[data-theme=dark] .table-tools-count{color:var(--fg-3)}
html[data-theme=dark] .sortable-heading:hover{color:var(--accent-ink);background:var(--accent-soft)}
html[data-theme=dark] .close{background:var(--surface-3);border:0;color:var(--fg-2)}
html[data-theme=dark] .close:hover{color:var(--bad)}
html[data-theme=dark] dialog{background:var(--surface);border:1px solid var(--line);color:var(--fg)}
html[data-theme=dark] dialog::backdrop{background:var(--overlay)}
html[data-theme=dark] .notice,html[data-theme=dark] .wa-data-note{background:var(--warn-soft);color:var(--warn);border-color:var(--warn-line)}
html[data-theme=dark] .notice p{color:inherit}
html[data-theme=dark] .doc-v4-search{border:1px solid var(--line-strong);background:var(--surface-2);color:var(--fg-3)}
html[data-theme=dark] .doc-v4-search kbd{border:1px solid var(--line)}
html[data-theme=dark] .doc-v4-theme{background:var(--surface);color:var(--fg-2);border:1px solid var(--line)}
html[data-theme=dark] .doc-v4-search-results h3{color:var(--fg-3)}
html[data-theme=dark] .doc-v4-result{background:var(--surface);border:0;border-bottom:1px solid var(--line);color:var(--fg)}
html[data-theme=dark] .doc-v4-result:hover{background:var(--surface-2)}
html[data-theme=dark] .doc-v4-result small{color:var(--fg-3)}
html[data-theme=dark] .doc-v4-result svg{color:var(--fg-3)}
html[data-theme=dark] .doc-v4-empty{color:var(--fg-3)}
html[data-theme=dark] #doc-progress{background:var(--surface);border:1px solid var(--line)}
html[data-theme=dark] #doc-progress:after{background:url('/assets/doc-v4-mark.png') center/contain no-repeat}
html[data-theme=dark] .page-loading:after,html[data-theme=dark] .boot:after{border:0;background:url('/assets/doc-v4-mark.png') center/contain no-repeat}
html[data-theme=dark] .login-shell{background:var(--bg)}
html[data-theme=dark] .login-shell .brand-panel{background:var(--rail);color:var(--rail-fg-strong);border-right:1px solid var(--line)}
html[data-theme=dark] .login-shell .brand-top span{color:var(--rail-fg);border-color:var(--rail-cap)}
html[data-theme=dark] .login-shell .brand-copy .eyebrow{color:var(--rail-fg)}
html[data-theme=dark] .login-shell .brand-copy h1{color:var(--rail-fg-strong)}
html[data-theme=dark] .login-shell .brand-copy h1 span{color:var(--accent)}
html[data-theme=dark] .login-shell .brand-copy p{color:var(--rail-fg)}
html[data-theme=dark] .login-shell .brand-bottom{color:var(--rail-cap)}
html[data-theme=dark] .login-shell .login-box{background:var(--surface);border:1px solid var(--line)}
html[data-theme=dark] .login-shell .login-logo{background:transparent}
html[data-theme=dark] .login-shell .local-tag{color:var(--fg-3)}
html[data-theme=dark] .login-shell .password-wrap button{color:var(--fg-2)}
html[data-theme=dark] .login-shell .login-note{color:var(--fg-3)}
html[data-theme=dark] .login-shell footer{color:var(--fg-3)}
@media(max-width:700px){html[data-theme=dark] .login-shell .brand-panel{border-right:0}}
html[data-theme=dark] .calls-tabs,html[data-theme=dark] .settings-tabs{background:var(--surface-3)}
html[data-theme=dark] .calls-tabs button,html[data-theme=dark] .settings-tabs button{border:0;background:transparent;color:var(--fg-2)}
html[data-theme=dark] .calls-tabs button.active,html[data-theme=dark] .settings-tabs button.active{background:var(--surface);color:var(--fg)}
html[data-theme=dark] .calls-toolbar{background:var(--surface)}
html[data-theme=dark] .call-stat-totals>div{background:var(--surface);border:1px solid var(--line)}
html[data-theme=dark] .guide-frame{border-color:var(--line)}
html[data-theme=dark] .doc-v4-nav-group{color:var(--rail-cap)}
@media(max-width:700px){html[data-theme=dark] .doc-v4-mobile-menu{border:1px solid var(--line);background:var(--surface);color:var(--fg)}}
html[data-theme=dark] .workspace>.sidebar .sidebar-toggle{background:var(--rail)}
html[data-theme=dark] .workspace>.sidebar .sidebar-toggle:hover{background:var(--rail-2);color:#fff}
html[data-theme=dark] .calls-toolbar .calls-company{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface));color:var(--fg,var(--fg))}
html[data-theme=dark] .calls-toolbar .calls-company:focus-visible{outline:2px solid #f46b18}
html[data-theme=dark] .call-player-bar{background:var(--surface,var(--surface));border-top:1px solid var(--line-strong,var(--line-strong))}
html[data-theme=dark] .call-player-bar .cpb-info small{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .call-player-bar .cpb-line{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .call-player-bar [data-cpb-seek]{border:0;background:none}
html[data-theme=dark] .call-player-bar .cpb-download{border:1px solid var(--line-strong,var(--line-strong));color:var(--fg,var(--fg));background:var(--surface,var(--surface))}
html[data-theme=dark] .call-player-bar .cpb-legend{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .call-player-bar .cpb-legend i.cpb-side-a{background:#4b5563}
html[data-theme=dark] .call-player-bar .cpb-legend i.cpb-side-b{background:#2f6fe4}
html[data-theme=dark] button.call-play{border:1px solid var(--accent,#f46b18);background:var(--accent-soft,var(--accent-soft));color:var(--accent-ink,var(--accent-ink))}
html[data-theme=dark] .call-play:hover{background:var(--accent,#f46b18);color:#fff}
html[data-theme=dark] .call-play:focus-visible{outline:2px solid var(--accent,#f46b18)}
html[data-theme=dark] .call-play.is-current{background:var(--accent,#f46b18);color:#fff}
html[data-theme=dark] #content #order-filter-form>label{color:var(--fg-2)}
html[data-theme=dark] #content #order-filter-form .order-shops>span{color:var(--fg-2)}
html[data-theme=dark] #content #order-filter-form .order-shops details>summary{border-color:var(--line-strong)}
html[data-theme=dark] #content .inbox-dialog-head .chat-head-agent{border:0}
html[data-theme=dark] #content .inbox-dialog-head .ai-toolbar{border:0;background:none}
html[data-theme=dark] #content .crm-timeline-head .crm-conversation-caption{border:0}
html[data-theme=dark] #content .crm-record-card .deal-vehicle-editor>label{color:var(--fg-2)}
html[data-theme=dark] #content .crm-record-card .deal-notes{border:1px solid var(--line);background:var(--surface-2)}
html[data-theme=dark] #content .crm-record-card .deal-notes>summary{color:var(--fg-2)}
html[data-theme=dark] #content #sch-prev,html[data-theme=dark] #content #sch-next,html[data-theme=dark] dialog.booking-board-dialog :is(button[data-month],button[data-day-step]){border:1px solid var(--line-strong);background:var(--surface)}
html[data-theme=dark] #content #sch-prev::before,html[data-theme=dark] #content #sch-next::before,html[data-theme=dark] dialog.booking-board-dialog :is(button[data-month],button[data-day-step])::before{border:solid var(--fg-2)}
html[data-theme=dark] #content #sch-prev:hover,html[data-theme=dark] #content #sch-next:hover,html[data-theme=dark] dialog.booking-board-dialog :is(button[data-month],button[data-day-step]):hover{background:var(--accent-soft);border-color:var(--accent-line)}
html[data-theme=dark] #content #sch-prev:hover::before,html[data-theme=dark] #content #sch-next:hover::before,html[data-theme=dark] dialog.booking-board-dialog :is(button[data-month],button[data-day-step]):hover::before{border-color:var(--accent-ink)}
html[data-theme=dark] #content .order-shops details>summary::after{color:inherit;background:linear-gradient(45deg,transparent 42%,currentColor 42%,currentColor 58%,transparent 58%) left center/6px 6px no-repeat,linear-gradient(-45deg,transparent 42%,currentColor 42%,currentColor 58%,transparent 58%) right center/6px 6px no-repeat}
html[data-theme=dark] :is(#content,dialog) .crm-task>header{color:var(--fg-3)}
html[data-theme=dark] :is(#content,dialog) .task-type{color:var(--fg-1,inherit)}
html[data-theme=dark] :is(#content,dialog) :is(.task-overdue) .task-due{color:var(--bad,var(--bad))}
html[data-theme=dark] :is(#content,dialog) :is(.task-today) .task-due{color:var(--ok,var(--ok))}
html[data-theme=dark] :is(#content,dialog) .crm-task>strong a{color:inherit}
html[data-theme=dark] :is(#content,dialog) .crm-task .task-where{color:var(--fg-3);background:none;border:0}
html[data-theme=dark] :is(#content,dialog) .crm-task .task-where:hover{color:var(--accent,var(--accent-ink))}
html[data-theme=dark] #content .task-empty-note{color:var(--accent-ink);background:var(--warn-soft);border-bottom:1px solid var(--warn-line)}
html[data-theme=dark] #content .compose-tabs>button{border:0;border-bottom:2px solid transparent;background:none;color:var(--fg-3)}
html[data-theme=dark] #content .compose-tabs>button:hover{color:var(--fg-1,inherit);background:var(--surface-2)}
html[data-theme=dark] #content .compose-tabs>button.active{color:var(--accent,var(--accent-ink));border-bottom-color:var(--accent,#c2540a)}
html[data-theme=dark] #content .compose-to{color:var(--fg-3)}
html[data-theme=dark] :is(#content,dialog) .task-form label{color:var(--fg-3)}
html[data-theme=dark] :is(#content,dialog) .task-chip span,html[data-theme=dark] :is(#content,dialog) .task-quick button{border:1px solid var(--line,var(--line-strong));background:var(--surface,var(--surface));color:var(--fg-1,inherit)}
html[data-theme=dark] :is(#content,dialog) .task-chip input:checked+span,html[data-theme=dark] :is(#content,dialog) .task-quick button.active{border-color:var(--accent,#c2540a);background:var(--accent,#c2540a);color:#fff}
html[data-theme=dark] :is(#content,dialog) .task-chip input:focus-visible+span{outline:2px solid var(--accent,#c2540a)}
html[data-theme=dark] :is(#content,dialog) .task-quick button:hover{border-color:var(--accent,#c2540a)}
html[data-theme=dark] :is(#content,dialog) .task-when .task-allday{color:var(--fg-1,inherit)}
html[data-theme=dark] :is(#content,dialog) .task-form-actions small{color:var(--fg-3)}
html[data-theme=dark] dialog .task-type-new{border-top:1px solid var(--line,var(--line-strong))}
html[data-theme=dark] #content .task-table-wrap{border:1px solid var(--line,var(--line-strong));background:var(--surface,var(--surface))}
html[data-theme=dark] #content .task-table th{color:var(--fg-3);border-bottom:1px solid var(--line,var(--line-strong))}
html[data-theme=dark] #content .task-table td{border-bottom:1px solid var(--line,var(--line-strong))}
html[data-theme=dark] #content .task-table tr:last-child td{border-bottom:0}
html[data-theme=dark] #content .task-table td:first-child{border-left:3px solid var(--ai,#7c5cd6)}
html[data-theme=dark] #content .task-table tr.task-overdue td:first-child{border-left-color:var(--bad,#c62828)}
html[data-theme=dark] #content .task-table tr.task-today td:first-child{border-left-color:var(--ok,#1f7a3d)}
html[data-theme=dark] #content .task-table tr.task-done td:first-child{border-left-color:var(--line,var(--line-strong))}
html[data-theme=dark] #content .task-table td small{color:var(--fg-3)}
html[data-theme=dark] #content .task-cal{background:var(--line,var(--surface-3));border:1px solid var(--line,var(--line-strong))}
html[data-theme=dark] #content .task-cal-head{background:var(--surface-2);color:var(--fg-3)}
html[data-theme=dark] #content .task-cal-cell{background:var(--surface,var(--surface))}
html[data-theme=dark] #content .task-cal-cell.outside{background:var(--surface-2)}
html[data-theme=dark] #content .task-cal-date{border:0;background:none;color:var(--fg-1,inherit)}
html[data-theme=dark] #content .task-cal-cell.is-today .task-cal-date{background:var(--accent,#c2540a);color:#fff}
html[data-theme=dark] #content .task-cal-item{border-left:3px solid var(--ai,#7c5cd6);background:var(--surface-2);color:inherit}
html[data-theme=dark] #content .task-cal-item.task-overdue{border-left-color:var(--bad,#c62828)}
html[data-theme=dark] #content .task-cal-item.task-today{border-left-color:var(--ok,#1f7a3d)}
html[data-theme=dark] #content .task-cal-item.task-done{border-left-color:var(--line,var(--line-strong))}
html[data-theme=dark] #content .task-cal-more{border:0;background:none;color:var(--accent,var(--accent-ink))}
html[data-theme=dark] dialog.booking-board-dialog .booking-master-busy{color:var(--fg-3)}
html[data-theme=dark] #content :is(.task-layouts,.task-cal-bar .segmented){background:var(--surface-2)}
html[data-theme=dark] #content :is(.task-layouts,.task-cal-bar .segmented) button{border:0;background:none;color:var(--fg-3)}
html[data-theme=dark] #content :is(.task-layouts,.task-cal-bar .segmented) button[aria-pressed=true]{background:#222;color:#fff}
html[data-theme=dark] #content .cash-journal>.cash-sheet-workshops{border-bottom:0}
html[data-theme=dark] #content .cash-journal>.cash-sheet-filters{background:none;border:0}
html[data-theme=dark] #content .cash-journal>.cash-sheet-filters .cash-sheet-status{color:var(--fg-3)}
html[data-theme=dark] #content .cash-journal>[data-j-body]{border-top:1px solid var(--line,var(--line))}
html[data-theme=dark] #content .cash-journal .cash-j-help{color:var(--fg-3)}
html[data-theme=dark] #content .cash-journal form.cash-j-date-search{border:0!important;background:none!important}
html[data-theme=dark] #content .cash-journal form.cash-j-date-search label{color:var(--fg-3)}
html[data-theme=dark] #content .cash-journal .cash-j-export{color:var(--fg-3)}
html[data-theme=dark] #content .cash-day-bar{border-bottom:1px solid var(--line,var(--line))}
html[data-theme=dark] #content .cash-day-bar .cash-sheet-status{color:var(--fg-3)}
html[data-theme=dark] #content .cash-day .cash-j-scroll{border:1px solid var(--line,var(--line))}
html[data-theme=dark] #content .cash-day-table td small{color:var(--fg-3)}
html[data-theme=dark] #content .cash-day-table tfoot td{border-top:2px solid var(--line,var(--line-strong));background:var(--surface-2)}
html[data-theme=dark] #content .cash-day .cash-j-help{color:var(--fg-3)}
html[data-theme=dark] dialog .cash-dialog-shop{background:var(--shop,var(--accent,#c2540a));color:#fff}
html[data-theme=dark] dialog .debts-table tr.debt-group td{background:var(--surface-2,var(--surface));border-bottom:1px solid var(--line,var(--line))}
html[data-theme=dark] dialog .debts-table tr.debt-sub .debt-what{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] dialog .accountable-group{border:1px solid var(--line,var(--line))}
html[data-theme=dark] dialog .accountable-group>header{background:var(--surface-2,var(--surface));border-bottom:1px solid var(--line,var(--line))}
html[data-theme=dark] dialog .accountable-group>header small{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] dialog .accountable-group .accountable-issue:last-child{border-bottom:0}
html[data-theme=dark] dialog .debts-table tr.debt-group:hover td{background:var(--surface-3,var(--surface-2))}
html[data-theme=dark] dialog .debts-table tr.debt-group:focus-visible{outline:2px solid var(--accent,#c2540a)}
html[data-theme=dark] dialog .debts-table tr.debt-group td:first-child::before{border-right:2px solid var(--fg-2,#5d626a);border-bottom:2px solid var(--fg-2,#5d626a)}
html[data-theme=dark] dialog .split-payment-form .split-fx .split-fx-actual{color:var(--fg-1,var(--fg))}
html[data-theme=dark] dialog .split-payment-form .split-fx .split-fx-actual.is-warn{color:var(--warn,var(--accent-ink))}
html[data-theme=dark] dialog .split-payment-form .split-change{border:1px solid var(--ok-line);background:var(--surface-2);color:var(--ok)}
html[data-theme=dark] dialog .split-payment-form .split-change small{color:var(--ok)}
html[data-theme=dark] dialog .debt-actions .invoice-edit{border:1px solid var(--line,var(--line));background:var(--surface);color:var(--fg-2)}
html[data-theme=dark] dialog .debt-actions .invoice-edit:hover,html[data-theme=dark] dialog .debt-actions .invoice-edit:focus-visible{border-color:#E8590C;color:var(--accent-ink)}
html[data-theme=dark] dialog .invoices-table tr.invoice-editing td{background:var(--surface)}
html[data-theme=dark] dialog .cash-form .method-buttons button{border:1.5px solid var(--line,var(--line));background:var(--surface,var(--surface));color:var(--fg-1,var(--fg))}
html[data-theme=dark] dialog .cash-form .method-buttons button:hover:not(:disabled){border-color:var(--accent,#E8590C)}
html[data-theme=dark] dialog .cash-form .method-buttons button.selected{border-color:var(--accent,#E8590C);background:var(--accent-soft,var(--accent-soft));color:var(--accent-ink,var(--accent-ink))}
html[data-theme=dark] #content .cash-journal .cash-j-chips{color:var(--fg-3)}
html[data-theme=dark] #content .cash-journal .cash-j-chip{border:1px solid var(--line,var(--line));background:var(--surface-2,var(--surface));color:var(--fg,var(--fg))}
html[data-theme=dark] #content .cash-journal .cash-j-chip small{color:var(--fg-3)}
html[data-theme=dark] #content .cash-journal .cash-j-chip:has(button){border-color:var(--accent,#dc681d);background:var(--accent-soft,var(--accent-soft))}
html[data-theme=dark] #content .cash-journal .cash-j-chip button{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] #content .cash-journal .cash-j-chip button:hover{background:rgba(0,0,0,.08)}
html[data-theme=dark] #content .cash-journal .cash-j-chip button:focus-visible{outline:2px solid var(--accent,#dc681d)}
html[data-theme=dark] dialog.doc-v4-search-dialog>p.muted{color:var(--fg-3)}
html[data-theme=dark] dialog.doc-v4-search-dialog .doc-v4-search-field svg{color:var(--fg-3)}
html[data-theme=dark] dialog.doc-v4-search-dialog .doc-v4-search-results h3 i{background:var(--surface-2,var(--surface-2));color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] dialog.doc-v4-search-dialog .doc-v4-result{border:1px solid var(--line,var(--line))}
html[data-theme=dark] dialog.doc-v4-search-dialog .doc-v4-result:hover,html[data-theme=dark] dialog.doc-v4-search-dialog .doc-v4-result:focus-visible{background:var(--accent-soft,var(--accent-soft));border-color:var(--accent,#dc681d);outline:0}
html[data-theme=dark] dialog.doc-v4-search-dialog .doc-v4-result-icon{background:var(--surface-2,var(--surface-2))}
html[data-theme=dark] dialog.doc-v4-search-dialog .doc-v4-result-icon svg{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] dialog.doc-v4-search-dialog .doc-v4-result[data-kind=orders] .doc-v4-result-icon{background:var(--info-soft)}
html[data-theme=dark] dialog.doc-v4-search-dialog .doc-v4-result[data-kind=orders] .doc-v4-result-icon svg{color:var(--info)}
html[data-theme=dark] dialog.doc-v4-search-dialog .doc-v4-result[data-kind=deals] .doc-v4-result-icon{background:var(--accent-soft)}
html[data-theme=dark] dialog.doc-v4-search-dialog .doc-v4-result[data-kind=deals] .doc-v4-result-icon svg{color:var(--accent-ink)}
html[data-theme=dark] dialog.doc-v4-search-dialog .doc-v4-result em{background:var(--surface-2,var(--surface-2));color:var(--fg-2,var(--fg-2))}
/* design-v4-cash.css */
html[data-theme=dark] .cash-pos-heading .cash-view-tabs{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] .cash-pos-heading .cash-view-tabs button{border:0;background:transparent;color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .cash-pos-heading .cash-view-tabs button.selected{background:var(--fg,#262726);color:var(--surface,#fff)}
html[data-theme=dark] #content:has(.cash-pos-layout) .daily-balances .cash-total{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] #content:has(.cash-pos-layout) .daily-balances .cash-physical{border-color:var(--accent-line,var(--accent-line))}
html[data-theme=dark] #content:has(.cash-pos-layout) .cash-total .small-label{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] #content:has(.cash-pos-layout) .cash-total small{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .cash-physical small b{color:var(--nocheck,var(--info))}
html[data-theme=dark] #content .is-income{color:var(--ok,var(--ok))}
html[data-theme=dark] #content .is-expense{color:var(--bad,var(--bad))}
html[data-theme=dark] #content:has(.cash-pos-layout) .history-panel{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] #content:has(.cash-pos-layout) .history-heading{border-bottom:1px solid var(--line,var(--line))}
html[data-theme=dark] #content:has(.cash-pos-layout) .history-heading small{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] #content:has(.cash-pos-layout) .department-choice{border:1px solid var(--line-strong,var(--line-strong));background:var(--surface,var(--surface));color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] #content:has(.cash-pos-layout) .department-choice.selected{color:var(--accent-ink,var(--accent-ink));background:var(--accent-soft,var(--accent-soft));border-color:var(--accent,#f46b18)}
html[data-theme=dark] .cash-operation-group h3{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] #content:has(.cash-pos-layout) .operation-tile{border:1px solid var(--line,var(--line));background:var(--surface-2,var(--surface))}
html[data-theme=dark] #content:has(.cash-pos-layout) .operation-tile:hover:not(:disabled){background:var(--accent-soft,var(--accent-soft));border-color:var(--accent-line,var(--accent-line))}
html[data-theme=dark] #content:has(.cash-pos-layout) .operation-tile small{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] #content:has(.cash-pos-layout) .operation-symbol{background:var(--ok-soft,var(--ok-soft));color:var(--ok,var(--ok))}
html[data-theme=dark] #content:has(.cash-pos-layout) .operation-symbol.minus{background:var(--accent-soft,var(--accent-soft));color:var(--accent-ink,var(--accent-ink))}
html[data-theme=dark] .cash-pos-notice{color:var(--warn,var(--accent-ink))}
html[data-theme=dark] #content:has(.cash-pos-layout) .field-help{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] #content:has(.cash-pos-layout) .queue-toolbar{border-bottom:1px solid var(--line,var(--line))}
html[data-theme=dark] #content:has(.cash-pos-layout) #queue-count{color:var(--accent-ink,var(--accent-ink));background:var(--accent-soft,var(--accent-soft))}
html[data-theme=dark] #content:has(.cash-pos-layout) .queue-toolbar select{background:var(--surface,var(--surface))}
html[data-theme=dark] #content:has(.cash-pos-layout) .queue-scroll th{background:var(--surface-2,var(--surface));color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] #content:has(.cash-pos-layout) .queue-scroll td{border-bottom:1px solid var(--line,var(--line));color:var(--fg,var(--fg))}
html[data-theme=dark] #content:has(.cash-pos-layout) .queue-scroll td small{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .cash-queue-menu summary{border:1px solid var(--line-strong,var(--line-strong))}
html[data-theme=dark] .cash-queue-menu>div{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] #content:has(.cash-pos-layout) .cash-queue-menu button{border:0;background:none;color:var(--fg,var(--fg))}
html[data-theme=dark] #content:has(.cash-pos-layout) .cash-queue-menu button:hover{background:var(--surface-3,var(--surface-2))}
html[data-theme=dark] #content:has(.cash-pos-layout) .cash-queue-menu .danger-link{color:var(--bad,var(--bad))}
html[data-theme=dark] #content .cash-sheet{border-color:var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] #content .cash-j-stat{background:var(--surface-2,var(--surface));border:1px solid var(--line,var(--line))}
html[data-theme=dark] #content .cash-j-date-search{background:var(--surface-2,var(--surface));border-top:1px solid var(--line,var(--line));border-bottom:1px solid var(--line,var(--line))}
html[data-theme=dark] #content .cash-j-date-search label{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] #content .cash-j-export{color:var(--fg-2,var(--fg-2));border-bottom:1px solid var(--line,var(--line))}
html[data-theme=dark] #content .cash-j-table th{background:var(--surface-2,var(--surface))}
html[data-theme=dark] dialog.cash-shift-dialog,html[data-theme=dark] dialog.shift-report-dialog,html[data-theme=dark] dialog.accountable-dialog{background:var(--surface,var(--surface));color:var(--fg,var(--fg))}
html[data-theme=dark] .cash-close-preview h3,html[data-theme=dark] .cash-close-balance h3{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .cash-dialog .shift-report-totals section{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] .cash-dialog .shift-report-totals span{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .cash-dialog .shift-report-totals strong{color:var(--fg,var(--fg))}
html[data-theme=dark] .cash-dialog .shift-report-totals small{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .cash-close-balance{border-bottom:1px solid var(--line,var(--line))}
html[data-theme=dark] .cash-close-balance>small{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .cash-dialog-actions{border-top:1px solid var(--line,var(--line))}
html[data-theme=dark] .cash-dialog .shift-report-scroll th,html[data-theme=dark] .cash-dialog .shift-report-scroll td{border-bottom:1px solid var(--line,var(--line))}
html[data-theme=dark] .cash-dialog .shift-report-scroll td small{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .accountable-totals section{border:1px solid var(--line,var(--line));background:var(--surface-2,var(--surface))}
html[data-theme=dark] .accountable-totals span{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .accountable-filters input,html[data-theme=dark] .accountable-filters select{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface));color:var(--fg,var(--fg))}
html[data-theme=dark] .accountable-issue{border-bottom:1px solid var(--line,var(--line))}
html[data-theme=dark] .accountable-issue small{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .accountable-status{color:var(--warn,var(--accent-ink));background:var(--warn-soft,var(--warn-soft))}
html[data-theme=dark] .accountable-status.is-closed{background:var(--ok-soft,var(--ok-soft));color:var(--ok,var(--ok))}
html[data-theme=dark] .accountable-amounts{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .accountable-timeline{border-left:2px solid var(--line,var(--line))}
html[data-theme=dark] .accountable-form-summary{background:var(--surface-2,var(--surface))}
html[data-theme=dark] #content .currency-card{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] #content .employee-list-wrap{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] #content .employee-list th,html[data-theme=dark] #content .employee-list td{border-color:var(--line,var(--line));color:var(--fg,var(--fg))}
html[data-theme=dark] #content .employee-list th{background:var(--surface-2,var(--surface));color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] #content .employee-list td small{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] #content .employee-list .employee-name-button{color:var(--info,var(--info))}
html[data-theme=dark] #content .employee-list td.is-overpaid{color:var(--bad,var(--bad))}
html[data-theme=dark] #content #employee-filters{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] #content:has(#employee-filters) .cash-card{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] .payroll-dialog .employee-earnings>div,html[data-theme=dark] .employee-detail-dialog .employee-earnings>div{border:1px solid var(--line,var(--line));background:var(--surface-2,var(--surface))}
html[data-theme=dark] #content .wa-kpi,html[data-theme=dark] #content .wa-panel{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] #content .wa-kpi>strong{color:var(--fg,var(--fg))}
html[data-theme=dark] #content .wa-kpi>span,html[data-theme=dark] #content .wa-stock section>span{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] #content .wa-panel .report-table th{background:var(--surface-2,var(--surface))}
html[data-theme=dark] #content .wa-funnel{background:var(--surface-2,var(--surface))}
html[data-theme=dark] .accountable-files a{color:var(--info,var(--info));border:1px solid var(--line,var(--line))}
html[data-theme=dark] .accountable-files a:hover{background:var(--info-soft,var(--info-soft))}
html[data-theme=dark] .accountable-upload small{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .accountable-upload-file{border:1px solid var(--line,var(--line))}
html[data-theme=dark] .accountable-upload-file small{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] #content:has(.cash-pos-layout) .queue-scroll td.is-income{color:var(--ok,var(--ok))}
html[data-theme=dark] #content:has(.cash-pos-layout) .queue-scroll td.is-expense{color:var(--bad,var(--bad))}
html[data-theme=dark] .debts-summary section{border:1px solid var(--line,var(--line))}
html[data-theme=dark] .debts-summary span{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .debts-table th{color:var(--fg-2,var(--fg-2));background:var(--surface-2,var(--surface));border-bottom:1px solid var(--line,var(--line))}
html[data-theme=dark] .debts-table td{border-bottom:1px solid var(--line,var(--line))}
html[data-theme=dark] .debts-table td small{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .debts-closed summary{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .debts-badge{color:var(--accent-ink,var(--accent-ink));background:var(--accent-soft,var(--accent-soft))}
html[data-theme=dark] .advance-order{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] .advance-order:hover,html[data-theme=dark] .advance-order:focus-visible{border-color:var(--accent,#e4630b)}
html[data-theme=dark] .advance-order small{color:var(--muted,var(--fg-3))}
html[data-theme=dark] .customer-prepayment{border-bottom:1px solid var(--line,var(--line))}
html[data-theme=dark] .customer-prepayment small{color:var(--muted,var(--fg-3))}
html[data-theme=dark] .general-share{border:1px solid var(--line,var(--line))}
html[data-theme=dark] [data-bank-pool] .pool-terminal b{color:var(--fg-1,var(--info))}
html[data-theme=dark] [data-bank-pool] .pool-open{color:var(--accent,var(--accent-ink))}
html[data-theme=dark] .cash-operation-group[data-tone]{border:1px solid var(--tone-line);border-left:4px solid var(--tone);background:var(--tone-soft)}
html[data-theme=dark] .cash-operation-group[data-tone] h3{color:var(--tone)}
html[data-theme=dark] .cash-operation-group[data-tone] .operation-tile{background:var(--surface,var(--surface))}
html[data-theme=dark] .daily-entry[data-shop]{border:2px solid var(--shop);background:color-mix(in srgb,var(--shop) 14%,var(--surface,var(--surface)))}
html[data-theme=dark] .daily-entry[data-shop]>.history-heading{background:var(--shop)}
html[data-theme=dark] .daily-entry[data-shop]>.history-heading h2,html[data-theme=dark] .daily-entry[data-shop]>.history-heading small{color:#fff}
html[data-theme=dark] #content:has(.cash-pos-layout) .daily-entry[data-shop] .department-choice.selected{color:#fff;background:var(--shop);border-color:var(--shop)}
html[data-theme=dark] .daily-entry[data-shop]>.shop-watermark{color:var(--shop)}
html[data-theme=dark] .daily-entry[data-shop] .cash-operation-group[data-tone]{background:color-mix(in srgb,var(--tone-soft) 72%,transparent)}
html[data-theme=dark] .split-payment-form .split-all{border:1px solid var(--accent-line,var(--accent-line));background:var(--accent-soft,var(--accent-soft));color:var(--accent-ink,var(--accent-ink))}
html[data-theme=dark] .split-payment-form .split-all:hover{border-color:var(--accent,#f46b18)}
html[data-theme=dark] .daily-entry[data-shop] .cash-operation-group[data-tone]{background:color-mix(in srgb,var(--tone-soft) 50%,transparent)}
html[data-theme=dark] #content:has(.cash-pos-layout) .daily-entry[data-shop] .operation-tile{background:color-mix(in srgb,var(--surface,var(--surface)) 82%,transparent)}
html[data-theme=dark] .daily-entry[data-shop] .cash-operation-group[data-tone="safe"] button{background:color-mix(in srgb,var(--surface,var(--surface)) 86%,transparent)}
html[data-theme=dark] .shift-shop{color:var(--shop);background:color-mix(in srgb,var(--shop) 12%,transparent)}
html[data-theme=dark] .link-pay{background:var(--accent-soft);border:1px solid var(--accent-line)}
html[data-theme=dark] .link-pay small{color:var(--fg-2)}
html[data-theme=dark] .link-tabs button{border:1px solid var(--line);background:var(--surface)}
html[data-theme=dark] .link-tabs button.active{background:#1F2430;border-color:#1F2430;color:#fff}
html[data-theme=dark] .link-row{border:1px solid var(--line);background:var(--surface);color:inherit}
html[data-theme=dark] .link-row:hover,html[data-theme=dark] .link-row:focus-visible{border-color:#E8590C;background:var(--surface);outline:none}
html[data-theme=dark] .link-row.is-exact{border-color:var(--ok-line);background:var(--surface)}
html[data-theme=dark] .link-row.is-exact .link-sum small{color:var(--ok)}
html[data-theme=dark] .link-who small{color:var(--fg-2)}
html[data-theme=dark] .link-sum small{color:var(--fg-2)}
html[data-theme=dark] .link-hint{color:var(--fg-2)}
html[data-theme=dark] .debt-actions .debt-more{border:1px solid var(--line);background:var(--surface);color:var(--fg-2)}
html[data-theme=dark] .debt-actions .debt-more:hover,html[data-theme=dark] .debt-actions .debt-more:focus-visible{border-color:#E8590C;color:var(--accent-ink);outline:none}
html[data-theme=dark] .debt-menu{background:var(--surface);border:1px solid var(--line)}
html[data-theme=dark] .debt-menu button{color:var(--info)}
html[data-theme=dark] .debt-menu button:hover,html[data-theme=dark] .debt-menu button:focus-visible{background:var(--surface-2)}
html[data-theme=dark] .debt-menu button.is-danger{color:var(--bad)}
html[data-theme=dark] .debt-menu button:disabled{background:none}
html[data-theme=dark] .link-row.is-short{background:var(--warn-soft);border-color:var(--warn-line)}
html[data-theme=dark] .link-row.is-short:hover{background:var(--warn-soft);border-color:var(--warn-line)}
html[data-theme=dark] .link-why{color:var(--warn)}
html[data-theme=dark] .invoice-toggle-face{border:1.5px solid var(--line);background:var(--surface)}
html[data-theme=dark] .invoice-toggle-face::before{background:var(--surface-2);color:var(--fg-2)}
html[data-theme=dark] .invoice-toggle-face::after{background:var(--surface-3) radial-gradient(circle at 12px 12px,var(--surface) 9px,transparent 9.5px)}
html[data-theme=dark] .invoice-toggle-face small{color:var(--fg-2)}
html[data-theme=dark] .invoice-toggle:hover .invoice-toggle-face{border-color:#E8590C}
html[data-theme=dark] .invoice-toggle input:focus-visible+.invoice-toggle-face{outline:2px solid #E8590C}
html[data-theme=dark] .invoice-toggle input:checked+.invoice-toggle-face{border-color:#E8590C;background:var(--accent-soft)}
html[data-theme=dark] .invoice-toggle input:checked+.invoice-toggle-face::before{background:#E8590C;color:#fff}
html[data-theme=dark] .invoice-toggle input:checked+.invoice-toggle-face::after{background:#E8590C radial-gradient(circle at 30px 12px,var(--surface) 9px,transparent 9.5px)}
html[data-theme=dark] .invoice-fields{border:1px solid var(--accent-line);background:var(--surface)}
html[data-theme=dark] .invoice-copy{background:var(--surface-2)}
html[data-theme=dark] .invoice-copy:hover,html[data-theme=dark] .invoice-copy:focus-visible{background:var(--accent-soft);color:var(--accent-ink)}
html[data-theme=dark] .birthday-people{border:1px solid var(--line,var(--line))}
html[data-theme=dark] .cash-form .birthday-people .birthday-person{border-top:1px solid var(--line,var(--line))}
html[data-theme=dark] .cash-form .birthday-person button.birthday-via{background:var(--surface-2);color:var(--info);border:1px solid transparent}
html[data-theme=dark] .cash-form .birthday-person button.birthday-via.is-debt{background:var(--accent-soft);color:var(--accent-ink)}
html[data-theme=dark] .cash-form .birthday-person button.birthday-via:hover,html[data-theme=dark] .cash-form .birthday-person button.birthday-via:focus-visible{border-color:currentColor}
html[data-theme=dark] .birthday-via{background:var(--surface-2);color:var(--info)}
html[data-theme=dark] .birthday-via.is-debt{background:var(--accent-soft);color:var(--accent-ink)}
html[data-theme=dark] .birthday-total{border-top:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] #content .cash-journal>.cash-sheet-workshops .cash-j-advances{border-left:1px solid var(--line)}
html[data-theme=dark] #content .cash-j-invoice{color:var(--accent-ink)}
html[data-theme=dark] #content .cash-j-invoice.is-issued{color:var(--ok)}
html[data-theme=dark] .cash-pos-heading .cash-view-tabs #cash-quick-open{color:var(--accent,var(--accent-ink))}
html[data-theme=dark] .cash-pos-heading .cash-view-tabs #cash-quick-open.is-stale .debts-badge{background:#c62828;color:#fff}
html[data-theme=dark] .quick-choice span{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] .quick-choice input:checked + span{background:var(--fg,#262726);color:var(--surface,#fff);border-color:var(--fg,#262726)}
html[data-theme=dark] .quick-choice input:focus-visible + span{outline:2px solid var(--accent,#f46b18)}
html[data-theme=dark] .quick-row{border:1px solid var(--line,var(--line))}
html[data-theme=dark] .quick-row.is-stale{border-color:#e0a3a3;background:var(--surface)}
html[data-theme=dark] .quick-row-text small{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .quick-sort-note{background:var(--accent-soft);color:var(--accent-ink)}
html[data-theme=dark] .general-split-row{border-bottom:1px dashed var(--line,var(--line))}
html[data-theme=dark] .general-split-row:last-child{border-bottom:0}
html[data-theme=dark] .general-split-row small{color:var(--muted,var(--fg-3))}
html[data-theme=dark] .cash-split{outline:none}
html[data-theme=dark] .cash-split-hint{color:var(--fg-3,#9aa0a8)}
/* design-v4-sales.css */
html[data-theme=dark] .inbox-page-toolbar .chat-sync-status{color:var(--fg-3)}
html[data-theme=dark] .content .inbox{border:1px solid var(--line);background:var(--surface)}
html[data-theme=dark] .inbox .inbox-list{background:var(--surface);border-right:1px solid var(--line)}
html[data-theme=dark] .inbox .inbox-filters{background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .inbox .inbox-filters :is(input,select),html[data-theme=dark] .inbox #chat-inbox-state{background:var(--surface);color:var(--fg);border:1px solid var(--line-strong)}
html[data-theme=dark] .chat-quick-filters{background:var(--surface-3)}
html[data-theme=dark] .chat-quick-filters button{border:0;background:transparent;color:var(--fg-2)}
html[data-theme=dark] .chat-quick-filters button[aria-pressed=true]{background:var(--rail);color:var(--rail-fg-strong)}
html[data-theme=dark] .inbox .chat-filter-summary{color:var(--fg-3);border-bottom:1px solid var(--line)}
html[data-theme=dark] .inbox .chat-filter-summary button{color:var(--fg-2)}
html[data-theme=dark] .inbox .chat-contact{background:var(--surface);color:var(--fg);border:0;border-bottom:1px solid var(--line)}
html[data-theme=dark] .inbox .chat-contact:hover{background:var(--surface-2)}
html[data-theme=dark] .inbox .chat-contact.selected{background:var(--accent-soft)}
html[data-theme=dark] .inbox .chat-avatar{background:var(--surface-3);color:var(--fg-2)}
html[data-theme=dark] .inbox .chat-contact-meta strong{color:var(--fg)}
html[data-theme=dark] .inbox .chat-contact-meta time{color:var(--fg-3)}
html[data-theme=dark] .inbox .chat-preview{color:var(--fg-2)}
html[data-theme=dark] .inbox .chat-channel-label{background:var(--surface-3);color:var(--fg-2)}
html[data-theme=dark] .inbox .chat-unread{background:var(--accent-strong);color:var(--rail-fg-strong)}
html[data-theme=dark] .chat-state-badge{color:var(--fg-3)}
html[data-theme=dark] .inbox .inbox-dialog-head{border-bottom:1px solid var(--line);background:var(--surface)}
html[data-theme=dark] .inbox .chat-head-client strong{color:var(--fg)}
html[data-theme=dark] .inbox .chat-head-route{color:var(--fg-2)}
html[data-theme=dark] .inbox .chat-head-agent .chat-agent-bar{border:0;background:none}
html[data-theme=dark] .inbox .chat-messages{background:var(--bg)}
html[data-theme=dark] .inbox .chat-bubble,html[data-theme=dark] .crm-deal-record .crm-timeline .chat-bubble{border:1px solid var(--line);background:var(--surface);color:var(--fg)}
html[data-theme=dark] .inbox .chat-out,html[data-theme=dark] .crm-deal-record .crm-timeline .chat-out{background:var(--accent-soft);border-color:var(--accent-line)}
html[data-theme=dark] .inbox .chat-bubble.chat-ai-message,html[data-theme=dark] .crm-deal-record .crm-timeline .chat-bubble.chat-ai-message{background:var(--ai-soft);border-color:var(--ai-line);color:var(--fg)}
html[data-theme=dark] .inbox .chat-bubble.chat-note,html[data-theme=dark] .crm-deal-record .crm-timeline .chat-bubble.chat-note{background:var(--warn-soft);border:1px solid var(--warn-line);color:var(--fg)}
html[data-theme=dark] .inbox .chat-bubble.chat-ai-note,html[data-theme=dark] .crm-deal-record .crm-timeline .chat-bubble.chat-ai-note{background:var(--ai-soft);border-color:var(--ai-line)}
html[data-theme=dark] .chat-note>strong{color:var(--warn)}
html[data-theme=dark] .chat-ai-note>strong{color:var(--ai)}
html[data-theme=dark] .chat-bubble .chat-message-author{color:var(--fg-2)}
html[data-theme=dark] .chat-bubble.chat-ai-message .chat-message-author{color:var(--ai)}
html[data-theme=dark] .inbox .chat-bubble small,html[data-theme=dark] .crm-deal-record .chat-bubble small{color:var(--fg-2)}
html[data-theme=dark] .chat-bubble.chat-delivery-failed{border-color:var(--bad-line)}
html[data-theme=dark] .chat-delivery-failed>small{color:var(--bad)!important}
html[data-theme=dark] .inbox .inbox-contact{border-left:1px solid var(--line);background:var(--surface)}
html[data-theme=dark] .inbox .inbox-contact .chat-contact-card{background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .inbox-contact h3{color:var(--fg-2)}
html[data-theme=dark] .inbox-contact :is(p,small){color:var(--fg-2)}
html[data-theme=dark] .chat-contact-card .contact-card-top small{color:var(--fg-3)}
html[data-theme=dark] .chat-contact-card .contact-card-top .back-link{color:var(--fg-2)}
html[data-theme=dark] .contact-identity .contact-initials{background:var(--accent-soft);color:var(--accent-ink)}
html[data-theme=dark] .chat-contact-card .contact-identity h2,html[data-theme=dark] .inbox-contact .chat-contact-card h2{color:var(--fg)}
html[data-theme=dark] .contact-field>span{color:var(--fg-2)}
html[data-theme=dark] .contact-field>div{color:var(--fg)}
html[data-theme=dark] .contact-field .contact-copy{border:0;background:transparent;color:var(--fg-2)}
html[data-theme=dark] .contact-copy:hover{background:var(--surface-3)}
html[data-theme=dark] .chat-contact-card .contact-action{border:1px solid var(--line);background:var(--surface);color:var(--fg-2)}
html[data-theme=dark] .contact-vehicle{border-top:1px solid var(--line)}
html[data-theme=dark] .contact-vehicle>small{color:var(--fg-2)}
html[data-theme=dark] .chat-task{border-color:var(--line)}
html[data-theme=dark] .inbox .compact-compose #chat-compose.chat-composer,html[data-theme=dark] .crm-deal-record .compact-compose #chat-compose.chat-composer{border-top:1px solid var(--line);background:var(--surface)}
html[data-theme=dark] .crm-deal-record .compact-compose{background:var(--surface);border:0}
html[data-theme=dark] .inbox .compact-compose .compose-routing select,html[data-theme=dark] .crm-deal-record .compact-compose .compose-routing select{border:1px solid var(--line-strong);background:var(--surface);color:var(--fg)}
html[data-theme=dark] .compact-compose .compose-routing [data-compose-mode]{background:var(--surface-3)!important;border-color:var(--surface-3)!important}
html[data-theme=dark] .compact-compose .compose-status{color:var(--fg-2)}
html[data-theme=dark] .compact-compose .compose-state-dot{background:var(--ok)}
html[data-theme=dark] .compact-compose .chat-dialog-actions{background:var(--surface);border:1px solid var(--line)}
html[data-theme=dark] .compact-compose .compose-status .chat-dialog-actions button{border:0;background:var(--surface-2);color:var(--fg)}
html[data-theme=dark] .compact-compose .compose-info{color:var(--fg-3)}
html[data-theme=dark] .compact-compose .compose-info>div{background:var(--surface);color:var(--fg-2);border:1px solid var(--line)}
html[data-theme=dark] .compose-author{color:var(--fg-2)}
html[data-theme=dark] .compose-author strong{color:var(--fg)}
html[data-theme=dark] .compact-compose .compose-hint{color:var(--fg-3)!important}
html[data-theme=dark] .inbox .compact-compose #chat-compose textarea,html[data-theme=dark] .crm-deal-record .compact-compose #chat-compose textarea{background:var(--surface);color:var(--fg);border:1px solid var(--line-strong)}
html[data-theme=dark] .compact-compose #chat-compose.is-note textarea{background:var(--warn-soft);border-color:var(--warn-line)}
html[data-theme=dark] .compact-compose .compose-tools :is([data-attach],[data-mic],[data-templates],[data-emoji]){background:transparent;color:var(--fg-2);border:0}
html[data-theme=dark] .compact-compose .compose-tools [data-compose-suggest]{background:transparent;border:0;color:var(--ai)}
html[data-theme=dark] .compact-compose [data-compose-popup]{border-color:var(--line);background:var(--surface);color:var(--fg)}
html[data-theme=dark] .compose-file{background:var(--surface-2);border-color:var(--line)}
html[data-theme=dark] .chat-agent-bar{background:var(--surface-2);color:var(--fg-2);border-color:var(--line)}
html[data-theme=dark] .ai-toolbar-status b{color:var(--ai)}
html[data-theme=dark] .ai-toolbar-status small{color:var(--fg-2)}
html[data-theme=dark] .chat-agent-bar .ai-suggest{color:var(--ai);border-color:var(--ai-line);background:var(--ai-soft)}
html[data-theme=dark] .chat-agent-bar .ai-takeover{color:var(--fg-2)}
html[data-theme=dark] .chat-ai-draft{border:1px dashed var(--ai-line);background:var(--ai-soft);color:var(--fg)}
html[data-theme=dark] .chat-ai-draft>summary{color:var(--ai)}
html[data-theme=dark] .chat-ai-draft .field-help{color:var(--fg-2)}
html[data-theme=dark] .crm-board-toolbar.deal-search-toolbar{background:transparent;border:0}
html[data-theme=dark] .deal-search-toolbar [data-pipeline]{background:var(--surface)!important;border:1px solid var(--line-strong)!important;color:var(--fg)}
html[data-theme=dark] .deal-search-toolbar .deal-view-switch{border:1px solid var(--line-strong);background:var(--surface)}
html[data-theme=dark] .deal-view-switch button{color:var(--fg-2)}
html[data-theme=dark] .deal-view-switch button[aria-pressed=true]{background:var(--rail);color:var(--rail-fg-strong)}
html[data-theme=dark] .deal-search-toolbar .deal-filters input[name=q]{background:var(--surface);color:var(--fg);border:1px solid var(--line-strong)}
html[data-theme=dark] .deal-search-toolbar .deal-search-chip{background:var(--surface);color:var(--fg);border-color:var(--line-strong)}
html[data-theme=dark] .deal-search-total{color:var(--fg-2)}
html[data-theme=dark] .deal-search-panel:not([hidden]){background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .deal-search-panel nav{border-color:var(--line)}
html[data-theme=dark] .deal-search-panel nav button{background:var(--surface);color:var(--fg-2);border-color:var(--line)}
html[data-theme=dark] .deal-search-panel nav button:hover{background:var(--accent-soft);color:var(--accent-ink)}
html[data-theme=dark] .deal-search-panel :is(input,select){background:var(--surface);color:var(--fg);border-color:var(--line-strong)}
html[data-theme=dark] .deal-search-panel h3,html[data-theme=dark] .deal-search-fields label{color:var(--fg-2)}
html[data-theme=dark] .deal-active-filters button{background:var(--accent-soft);color:var(--accent-ink);border-color:var(--accent-line)}
html[data-theme=dark] .crm-kanban .crm-lane{background:var(--surface-3);border:0}
html[data-theme=dark] .crm-kanban .crm-lane>header{border-top:3px solid var(--lane-color,var(--line-strong));border-bottom:0;background:var(--surface-3)}
html[data-theme=dark] .crm-lane>header strong{color:var(--fg)}
html[data-theme=dark] .crm-kanban .crm-lane>header span{background:var(--surface);color:var(--fg-2)}
html[data-theme=dark] .crm-kanban .crm-deal-card{background:var(--surface);border:1px solid var(--line);color:var(--fg)}
html[data-theme=dark] .crm-kanban .crm-deal-card.needs-reply{background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .crm-kanban .crm-deal-card:hover{border-color:var(--accent-line);background:var(--surface-2)}
html[data-theme=dark] .crm-kanban .crm-card-amount{color:var(--fg-2)}
html[data-theme=dark] .crm-kanban .crm-card-request{color:var(--fg-2)}
html[data-theme=dark] .crm-kanban .crm-card-number{color:var(--fg-2)}
html[data-theme=dark] .crm-kanban .crm-card-created{color:var(--fg-3)}
html[data-theme=dark] .crm-kanban .crm-deal-card footer{border:0}
html[data-theme=dark] .crm-kanban .crm-card-context{color:var(--fg-2)!important}
html[data-theme=dark] .crm-kanban .crm-card-next{color:var(--fg-3)!important}
html[data-theme=dark] .crm-kanban .crm-deal-card .reply-indicator,html[data-theme=dark] .deal-waiting-badge{background:var(--bad-soft);color:var(--bad);border:0}
html[data-theme=dark] .reply-indicator:before{background:var(--bad)}
html[data-theme=dark] .crm-lane-empty{color:var(--fg-3)}
html[data-theme=dark] .deal-list-view{border:1px solid var(--line);background:var(--surface)}
html[data-theme=dark] .deal-list-view td,html[data-theme=dark] .deal-list-view th{border-color:var(--line);background:var(--surface);color:var(--fg)}
html[data-theme=dark] .deal-list-view th{background:var(--surface-2);color:var(--fg-2)}
html[data-theme=dark] .deal-list-view [data-table-deal]{border:0;background:transparent;color:var(--info)}
html[data-theme=dark] .deal-pagination{color:var(--fg-3)}
html[data-theme=dark] .crm-board-nav{background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .workspace-main>.content:has(.crm-deal-record){background:var(--bg)}
html[data-theme=dark] .content .crm-deal-record{border:1px solid var(--line);background:var(--surface)}
html[data-theme=dark] .crm-deal-record>.crm-record-card{border-right:1px solid var(--line);background:var(--surface)}
html[data-theme=dark] .content .crm-record-header.section-head{background:var(--surface);color:var(--fg);border-bottom:1px solid var(--line)}
html[data-theme=dark] .content .crm-record-header h1{color:var(--fg)}
html[data-theme=dark] .crm-record-header [data-back]{color:var(--fg-2)}
html[data-theme=dark] .crm-record-header .crm-detail-title{color:var(--fg)}
html[data-theme=dark] .crm-record-created{color:var(--fg-3)}
html[data-theme=dark] .crm-record-menu>summary{color:var(--fg-2)}
html[data-theme=dark] .crm-record-menu>div{background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .crm-record-menu .crm-deal-permalink{color:var(--info)}
html[data-theme=dark] .crm-record-header .deal-stage-picker summary,html[data-theme=dark] .crm-record-header .deal-stage-picker summary strong{background:transparent;color:var(--fg)}
html[data-theme=dark] .crm-record-header .deal-stage-picker summary small{color:var(--fg-2)}
html[data-theme=dark] .crm-record-header .crm-stage-stripe span{background:var(--line)!important;outline:none}
html[data-theme=dark] .crm-record-header .crm-stage-stripe span.done{background:var(--accent-line)!important}
html[data-theme=dark] .crm-record-header .crm-stage-stripe span.current{background:var(--accent)!important;outline:none}
html[data-theme=dark] .crm-record-header .deal-stage-options{background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .crm-record-header .deal-stage-options button{background:var(--surface);color:var(--fg)}
html[data-theme=dark] .crm-record-header .deal-stage-options button[aria-pressed=true]{background:var(--accent-soft);color:var(--accent-ink)}
html[data-theme=dark] .crm-record-header .deal-stage-picker .error{color:var(--bad)}
html[data-theme=dark] .crm-record-header .crm-detail-amount>small{color:var(--fg-2)}
html[data-theme=dark] .crm-record-header .crm-detail-amount>strong{color:var(--fg)}
html[data-theme=dark] .crm-record-header .deal-header-owner{color:var(--fg-2)}
html[data-theme=dark] .crm-record-header .deal-header-owner select{color:var(--fg);background:var(--surface);border-color:var(--line-strong)}
html[data-theme=dark] .crm-record-header .deal-header-owner option{background:var(--surface);color:var(--fg)}
html[data-theme=dark] .crm-deal-record .crm-detail-tabs{background:var(--surface);border-bottom:1px solid var(--line)}
html[data-theme=dark] .crm-deal-record .crm-detail-tabs button{color:var(--fg-2)}
html[data-theme=dark] .crm-deal-record .crm-detail-tabs button[aria-selected=true]{color:var(--accent-ink);background:var(--accent-soft);border-bottom-color:var(--accent)}
html[data-theme=dark] .crm-deal-record .crm-detail-main{background:var(--surface)}
html[data-theme=dark] .crm-deal-record .deal-form label{color:var(--fg-2)}
html[data-theme=dark] .crm-deal-record .deal-form :is(input,select,textarea){background:var(--surface);color:var(--fg);border-color:var(--line-strong)}
html[data-theme=dark] .crm-deal-record .deal-form :is(small,.field-help){color:var(--fg-3)}
html[data-theme=dark] .crm-deal-record .crm-order-section,html[data-theme=dark] .crm-other-deals{background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .chat-deal-link{background:var(--surface);color:var(--fg);border-color:var(--line)}
html[data-theme=dark] .chat-deal-link small{color:var(--fg-2)}
html[data-theme=dark] .crm-deal-record>.crm-deal-conversation{background:var(--surface)}
html[data-theme=dark] .crm-deal-record .crm-timeline-head{background:var(--surface);border-color:var(--line);color:var(--fg)}
html[data-theme=dark] .crm-deal-record .crm-timeline-head small{color:var(--fg-3)}
html[data-theme=dark] .crm-deal-record .crm-timeline-head select{background:var(--surface);color:var(--fg);border-color:var(--line-strong)}
html[data-theme=dark] .crm-deal-record .crm-timeline{background:var(--bg)}
html[data-theme=dark] .crm-deal-record .crm-call-event{background:var(--surface);color:var(--fg);border-color:var(--line);border-left-color:var(--info)}
html[data-theme=dark] .crm-call-event small{color:var(--fg-3)}
html[data-theme=dark] .crm-deal-record .crm-system-event.deal-system-event{color:var(--fg-2)}
html[data-theme=dark] .deal-system-event header,html[data-theme=dark] .deal-system-event header strong{color:var(--fg-2)}
html[data-theme=dark] .deal-event-field{color:var(--fg-2)}
html[data-theme=dark] .deal-event-before{color:var(--fg-3)}
html[data-theme=dark] .deal-event-after{color:var(--fg)}
html[data-theme=dark] .deal-event-after.deal-event-stage{background:var(--ok-soft);color:var(--ok)}
html[data-theme=dark] .crm-deal-record .crm-timeline .crm-system-event.deal-system-event.deal-ai-comment{background:var(--ai-soft);border:1px solid var(--ai-line);border-left:3px solid var(--ai);color:var(--fg)}
html[data-theme=dark] .crm-deal-record .deal-ai-comment header strong{color:var(--ai)}
html[data-theme=dark] .deal-ai-note-label{color:var(--ai)}
html[data-theme=dark] .crm-deal-record [data-history-info]{color:var(--fg-3);background:var(--surface)}
html[data-theme=dark] .crm-deal-record .crm-record-mobile{background:var(--surface);color:var(--fg);border-color:var(--line)}
html[data-theme=dark] .customer-card .customer-summary,html[data-theme=dark] .customer-card .customer-columns section,html[data-theme=dark] .customer-car,html[data-theme=dark] .customer-order,html[data-theme=dark] .customer-task{background:var(--surface);border-color:var(--line);color:var(--fg)}
html[data-theme=dark] .customer-card :is(small,.muted,.field-help){color:var(--fg-2)}
@media(max-width:1240px){html[data-theme=dark] .inbox .inbox-contact{background:var(--surface)}}
html[data-theme=dark] .content:has(>.inbox)>.schedule-toolbar{background:transparent;border:0}
html[data-theme=dark] .content>.inbox{border:1px solid var(--line)}
html[data-theme=dark] .inbox .inbox-contact{border-right:0;border-top:0;border-left:1px solid var(--line)}
html[data-theme=dark] .inbox .chat-agent-bar b{color:var(--ai)}
html[data-theme=dark] .inbox .chat-agent-bar small{color:var(--fg-2)}
html[data-theme=dark] .inbox .chat-contact-card,html[data-theme=dark] .crm-deal-record .chat-contact-card{background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .inbox .inbox-contact .contact-copy{border:0}
html[data-theme=dark] .inbox .inbox-contact .back-link{color:var(--fg-2)}
html[data-theme=dark] .inbox .chat-bubble.chat-out{background:var(--accent-soft);color:var(--fg);border-color:var(--accent-line)}
html[data-theme=dark] .inbox .chat-bubble.chat-ai-message{background:var(--ai-soft);border-color:var(--ai-line);color:var(--fg)}
html[data-theme=dark] .inbox .chat-bubble.chat-note,html[data-theme=dark] .crm-deal-record .chat-bubble.chat-note{background:var(--warn-soft)!important;color:var(--fg)}
html[data-theme=dark] .inbox .chat-bubble.chat-ai-note,html[data-theme=dark] .crm-deal-record .chat-bubble.chat-ai-note{background:var(--ai-soft)!important}
html[data-theme=dark] .inbox .compact-compose #chat-compose.chat-composer{border-top:1px solid var(--line);background:var(--surface)}
html[data-theme=dark] .inbox .compact-compose #chat-compose.chat-composer textarea{border:1px solid var(--line-strong);background:var(--surface);color:var(--fg)}
html[data-theme=dark] .inbox .compact-compose #chat-compose.chat-composer.is-note,html[data-theme=dark] .crm-deal-record .compact-compose #chat-compose.chat-composer.is-note{background:var(--surface)!important}
html[data-theme=dark] .inbox .compact-compose #chat-compose.is-note textarea{background:var(--warn-soft)}
html[data-theme=dark] .inbox .compact-compose #chat-compose .compose-tools [data-send]{background:var(--accent-strong);color:var(--rail-fg-strong)}
html[data-theme=dark] .inbox .compact-compose #chat-compose .compose-tools [data-send]:hover{background:var(--accent-hover)}
html[data-theme=dark] .inbox .compact-compose #chat-compose .compose-tools [data-compose-suggest],html[data-theme=dark] .crm-deal-record .compact-compose #chat-compose .compose-tools button[data-compose-suggest]{color:var(--ai);background:transparent}
html[data-theme=dark] .inbox .compact-compose .compose-tools :is([data-attach],[data-mic],[data-templates],[data-emoji]){color:var(--fg-2)}
html[data-theme=dark] .inbox .chat-agent-panel,html[data-theme=dark] .crm-deal-record .crm-deal-conversation [data-chat-agent],html[data-theme=dark] .crm-deal-record .crm-deal-conversation [data-agent-toolbar]{background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .crm-deal-record .chat-agent-bar.ai-toolbar{background:var(--surface-2);border-color:var(--line)}
html[data-theme=dark] .crm-deal-record .chat-agent-bar .ai-toolbar-status b{color:var(--ai)}
html[data-theme=dark] .crm-deal-record .chat-agent-bar .ai-toolbar-status small{color:var(--fg-2)}
html[data-theme=dark] .crm-deal-record .crm-deal-conversation .chat-ai-draft{background:var(--ai-soft);border-color:var(--ai-line)}
html[data-theme=dark] .crm-deal-record .crm-deal-conversation .chat-ai-draft summary{background:var(--ai-soft);color:var(--ai)}
html[data-theme=dark] .inbox .chat-head-agent .ai-toolbar .ai-mode-switch,html[data-theme=dark] .crm-deal-record .crm-deal-conversation .ai-toolbar .ai-mode-switch{background:var(--surface);color:var(--fg-2);border-color:var(--line-strong)}
html[data-theme=dark] .inbox .chat-head-agent .ai-toolbar .ai-suggest,html[data-theme=dark] .crm-deal-record .crm-deal-conversation .ai-toolbar .ai-suggest{background:var(--ai-soft);color:var(--ai);border-color:var(--ai-line)}
html[data-theme=dark] .inbox .chat-head-agent .ai-toolbar .ai-takeover,html[data-theme=dark] .crm-deal-record .crm-deal-conversation .ai-toolbar .ai-takeover{background:transparent;color:var(--fg-2);border-color:transparent}
html[data-theme=dark] .compact-compose .chat-composer [data-compose-popup]{background:var(--surface);color:var(--fg);border-color:var(--line)}
html[data-theme=dark] .compact-compose .compose-template{border-color:var(--line)}
html[data-theme=dark] .compact-compose .compose-template button{color:var(--fg)}
html[data-theme=dark] .compact-compose .compose-template small{color:var(--fg-2)}
html[data-theme=dark] .inbox .compact-compose #chat-compose textarea:focus,html[data-theme=dark] .crm-deal-record .compact-compose #chat-compose textarea:focus{background:var(--surface);color:var(--fg);outline:2px solid var(--accent);border-color:var(--accent)}
html[data-theme=dark] .inbox .compact-compose #chat-compose.is-note textarea:focus,html[data-theme=dark] .crm-deal-record .compact-compose #chat-compose.is-note textarea:focus{background:var(--warn-soft)}
html[data-theme=dark] .chat-voice-transcript{border:1px solid var(--border,var(--line));background:var(--surface-2,var(--surface-2))}
html[data-theme=dark] .chat-voice-transcript summary{color:var(--text-secondary,var(--fg-3))}
html[data-theme=dark] .crm-deal-card.needs-reply{border-left:4px solid var(--bad,#d94358)!important}
html[data-theme=dark] .crm-deal-card.task-future{border-right:4px solid var(--ai,#8057cf)!important}
html[data-theme=dark] .crm-deal-card.task-today{border-right:4px solid var(--ok,#259b61)!important}
html[data-theme=dark] .crm-deal-card.task-overdue{border-right:4px solid var(--bad,#d94358)!important}
html[data-theme=dark] .task-indicator{color:var(--ai)}
html[data-theme=dark] .task-today .task-indicator{color:var(--ok)}
html[data-theme=dark] .task-overdue .task-indicator{color:var(--bad)}
html[data-theme=dark] .task-column{background:var(--surface-2);border-top:3px solid var(--ai)}
html[data-theme=dark] .task-column.task-today{border-color:var(--ok)}
html[data-theme=dark] .task-column.task-overdue{border-color:var(--bad)}
html[data-theme=dark] .crm-task{border:1px solid var(--line);border-left:3px solid var(--ai);background:var(--surface)}
html[data-theme=dark] .crm-task.task-today{border-left-color:var(--ok)}
html[data-theme=dark] .crm-task.task-overdue{border-left-color:var(--bad)}
html[data-theme=dark] .crm-task small{color:var(--fg-3)}
html[data-theme=dark] .deal-task-panel{background:var(--surface);border-bottom:1px solid var(--line)}
html[data-theme=dark] .deal-task-panel>small{color:var(--fg-3)}
html[data-theme=dark] .contact-inline-form label{color:var(--text-muted,var(--fg-3))}
html[data-theme=dark] .deal-task-panel>header>[data-planner]{border:1px solid var(--line-strong);background:var(--surface);color:var(--fg-2)}
html[data-theme=dark] .deal-task-panel>header>[data-planner]:hover{background:var(--surface-3);color:var(--fg)}
html[data-theme=dark] .vehicle-full-data>div{border-bottom:1px solid var(--line)}
html[data-theme=dark] .vehicle-full-data dt{color:var(--fg-2)}
html[data-theme=dark] .vehicle-full-data dd{color:var(--fg)}
html[data-theme=dark] .content .deal-focused .crm-record-header h1{color:var(--fg-2)}
html[data-theme=dark] .deal-focused .crm-record-menu .crm-record-created{color:var(--fg-3)}
html[data-theme=dark] .deal-focused .deal-request-label input{border:0!important;border-bottom:1px solid transparent!important;background:transparent!important;color:var(--fg)}
html[data-theme=dark] .deal-focused .deal-request-label input:hover:not(:disabled){border-bottom-color:var(--line-strong)!important}
html[data-theme=dark] .deal-focused .deal-request-label input:focus{border-bottom-color:var(--accent)!important;outline:none!important}
html[data-theme=dark] .deal-focused .deal-contact-card{border:0;border-bottom:1px solid var(--line)}
html[data-theme=dark] .deal-focused .deal-contact-card .contact-card-top>small{color:var(--fg-2)}
html[data-theme=dark] .deal-focused .deal-form .vin-vehicle-info{color:var(--fg-3)}
html[data-theme=dark] .deal-focused .deal-form .deal-vehicle-details{color:var(--fg-2);background:var(--surface-2);border-color:var(--line)}
html[data-theme=dark] .deal-focused .deal-notes{border-top:1px solid var(--line)}
html[data-theme=dark] .deal-focused .deal-notes>summary{color:var(--fg-2)}
html[data-theme=dark] .deal-focused .deal-notes>summary::marker{color:var(--fg-3)}
html[data-theme=dark] .deal-focused .deal-note-preview{color:var(--fg-3)}
html[data-theme=dark] .deal-focused .crm-conversation-tools [data-agent-toolbar]{border:0}
html[data-theme=dark] .deal-focused .crm-conversation-tools .chat-agent-bar.ai-toolbar{border:0;background:transparent}
html[data-theme=dark] .deal-focused .deal-task-toggle[aria-expanded=true]{border-color:var(--accent-line);background:var(--accent-soft);color:var(--accent-ink)}
html[data-theme=dark] .deal-focused .deal-task-overdue{background:var(--bad-soft);color:var(--bad)}
html[data-theme=dark] .deal-focused .crm-conversation-caption>strong{color:var(--fg-2)}
html[data-theme=dark] .deal-focused .crm-conversation-caption>select{border-color:transparent;background:transparent}
html[data-theme=dark] .deal-focused .deal-task-panel{background:var(--surface-2)}
html[data-theme=dark] body dialog.cash-dialog.transcript-dialog>.dialog-top .close{background:var(--surface-3,var(--surface-2))}
html[data-theme=dark] .transcript-dialog .transcript-translation-toolbar{background:var(--surface-2)}
html[data-theme=dark] .transcript-dialog .transcript-analysis{background:var(--surface,var(--surface))}
html[data-theme=dark] .deal-duplicate-badge{border:1px solid var(--ai-line);background:var(--bad-soft);color:var(--ai)}
html[data-theme=dark] .dup-board-menu summary{border:1px solid var(--border,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] .dup-board-menu>div{background:var(--surface,var(--surface));border:1px solid var(--line)}
html[data-theme=dark] .dup-pair{border-bottom:1px solid var(--line)}
html[data-theme=dark] .dup-pair small,html[data-theme=dark] .dup-note{color:var(--fg-3)}
html[data-theme=dark] .dup-card{background:var(--surface);border:1px solid var(--line)}
html[data-theme=dark] .dup-comparison{border:1px solid var(--line)}
html[data-theme=dark] .dup-grid-head{background:var(--surface-2)}
html[data-theme=dark] .dup-field{border-top:1px solid var(--line)}
html[data-theme=dark] .dup-field>span:first-child{color:var(--fg-3)}
html[data-theme=dark] .dup-value{border:1px solid transparent}
html[data-theme=dark] .dup-value.selected{border-color:var(--accent-line);background:var(--accent-soft)}
html[data-theme=dark] .dup-result{color:var(--fg)}
html[data-theme=dark] .dup-footer{background:var(--surface,var(--surface))}
html[data-theme=dark] .dup-empty{color:var(--fg-3)}
html[data-theme=dark] .dup-blocked{color:var(--accent-ink)}
html[data-theme=dark] .dup-value:has(input:disabled){background:var(--surface)}
html[data-theme=dark] .deal-list-view a[data-table-deal]{color:inherit}
html[data-theme=dark] .deal-moved-notice{background:#1F2430;color:#fff}
/* design-v4-service.css */
html[data-theme=dark] .v4-service-register,html[data-theme=dark] .v4-schedule,html[data-theme=dark] .v4-order-editor{color:var(--fg,var(--fg))}
html[data-theme=dark] .v4-service-register .page-heading p{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .v4-service-register .history-panel{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] .v4-service-register .report-table{background:var(--surface,var(--surface))}
html[data-theme=dark] .v4-service-register .report-table th{background:var(--surface-2,var(--bg,var(--surface-2)));color:var(--fg-2,var(--fg-2));border-bottom:1px solid var(--line,var(--line))}
html[data-theme=dark] .v4-service-register .report-table td{border-bottom:1px solid var(--line,var(--line));color:var(--fg,var(--fg));background:var(--surface,var(--surface))}
html[data-theme=dark] .v4-service-register .report-table td small{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .v4-service-register .report-table tr:last-child td{border-bottom:0}
html[data-theme=dark] .v4-service-register .report-table tr:hover>td,html[data-theme=dark] .v4-service-register .report-table .order-open-row:hover>td{background:var(--surface-2,var(--bg,var(--surface-2)))}
html[data-theme=dark] .v4-service-register .report-table .order-open-row>td{border-bottom:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] .v4-service-register .report-table .order-open-row>td:first-child strong{color:var(--info,var(--info))}
html[data-theme=dark] .v4-service-register .report-table .secondary{background:var(--surface,var(--surface));color:var(--fg,var(--fg))}
html[data-theme=dark] .v4-service-register .receipt-posted .receipt-status,html[data-theme=dark] .v4-service-register .order-state-paid,html[data-theme=dark] .v4-service-register .order-state-closed{background:var(--ok-soft,var(--surface-2));color:var(--ok,var(--ok))}
html[data-theme=dark] .v4-service-register .order-state-working{background:var(--accent-soft,var(--accent-soft));color:var(--accent-ink,var(--accent-ink))}
html[data-theme=dark] .v4-service-register .receipt-draft .receipt-status,html[data-theme=dark] .v4-service-register .order-state-draft{background:var(--warn-soft,var(--warn-soft));color:var(--warn,var(--accent-ink))}
html[data-theme=dark] .v4-service-register .order-state-ready{background:var(--info-soft,var(--info-soft));color:var(--info,var(--info))}
html[data-theme=dark] .v4-service-register .order-state-cancelled{background:var(--bad-soft,var(--bad-soft));color:var(--bad,var(--bad))}
html[data-theme=dark] .v4-service-register .access-pill,html[data-theme=dark] .v4-service-register .receipt-status{border:0}
html[data-theme=dark] .v4-service-register .order-filters{border-bottom:1px solid var(--line,var(--line))}
html[data-theme=dark] .v4-service-register .order-pagination{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .v4-service-segments{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] .v4-service-segments button{border:0;border-right:1px solid var(--line,var(--line));background:transparent;color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .v4-service-segments button:last-child{border-right:0}
html[data-theme=dark] .v4-service-segments button[aria-pressed=true]{background:var(--fg,#262726);color:var(--surface,#fff)}
html[data-theme=dark] .v4-stock-summary>span{color:var(--fg-2,var(--fg-2));background:var(--surface,var(--surface));border:1px solid var(--line,var(--line))}
html[data-theme=dark] .v4-stock-summary strong{color:var(--fg,var(--fg))}
html[data-theme=dark] .v4-stock-bar{background:var(--line,var(--surface-3))}
html[data-theme=dark] .v4-stock-bar i{background:var(--ok,#1e7a45)}
html[data-theme=dark] .v4-service-register .stock-ok{color:var(--ok,var(--ok))!important}
html[data-theme=dark] .v4-service-register .stock-low{color:var(--bad,var(--bad))!important}
html[data-theme=dark] .v4-stock-movements>summary span{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .v4-service-empty{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .v4-receipt-advisory{background:var(--warn-soft,var(--warn-soft));color:var(--warn,var(--accent-ink))}
html[data-theme=dark] .v4-service-register .v4-receipt-duplicate{color:var(--warn,var(--accent-ink))}
html[data-theme=dark] .v4-service-register #ic-order-sync{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .order-form.v4-order-editor{background:transparent;border:0}
html[data-theme=dark] .v4-order-editor>.order-toolbar{border:0;background:var(--bg,var(--surface-2))}
html[data-theme=dark] .v4-order-editor>.order-toolbar #save-state{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .v4-order-editor>.error:not(:empty){background:var(--bad-soft,var(--bad-soft));border:1px solid var(--bad,#b9342b)}
html[data-theme=dark] .v4-order-main{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] .v4-service-card{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] .v4-service-card>h2{border-bottom:1px solid var(--line,var(--line));color:var(--fg,var(--fg))}
html[data-theme=dark] .v4-calculation>div>span{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .v4-calculation .v4-calculation-total{border-top:1px solid var(--line,var(--line))}
html[data-theme=dark] .v4-calculation .v4-calculation-total>*{color:var(--fg,var(--fg))}
html[data-theme=dark] .v4-calculation .v4-calculation-due strong{color:var(--bad,var(--bad))}
html[data-theme=dark] .v4-calculation>p{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .v4-contact-avatar{background:var(--accent-soft,var(--accent-soft));color:var(--accent-ink,var(--accent-ink))}
html[data-theme=dark] .v4-order-contact dt{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .v4-order-contact .field-help{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .v4-order-editor .order-author{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .v4-order-editor .order-author span{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .v4-order-editor .order-lifecycle{border:0}
html[data-theme=dark] .v4-order-editor .order-life-stage{background:none!important;border:0;border-top:3px solid var(--line,var(--line))}
html[data-theme=dark] .v4-order-editor .order-life-stage.recorded{border-top-color:var(--ok,#1e7a45)}
html[data-theme=dark] .v4-order-editor .order-life-stage>span{color:var(--fg,var(--fg))}
html[data-theme=dark] .v4-order-editor .order-life-stage>strong{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .v4-order-editor .order-tabs{background:var(--surface,var(--surface));border-color:var(--line,var(--line))}
html[data-theme=dark] .v4-order-editor .order-tabs button{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .v4-order-editor .order-tabs button[aria-selected=true]{background:var(--surface,var(--surface));color:var(--fg,var(--fg));border-color:var(--accent,#f46b18)}
html[data-theme=dark] .v4-order-editor .order-main-grid h2{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .v4-order-editor .order-main-grid label{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .v4-order-editor input,html[data-theme=dark] .v4-order-editor select,html[data-theme=dark] .v4-order-editor textarea{background:var(--surface,var(--surface));color:var(--fg,var(--fg));border-color:var(--line,var(--line))}
html[data-theme=dark] .v4-order-editor input:disabled,html[data-theme=dark] .v4-order-editor textarea:disabled,html[data-theme=dark] .v4-order-editor select:disabled{color:var(--fg-2,var(--fg-2));background:var(--surface-2,var(--bg,var(--surface-2)))}
html[data-theme=dark] .v4-order-editor .order-lookup-button{background:var(--surface,var(--surface));border-color:var(--line,var(--line));color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .v4-order-editor .order-footnote{color:var(--fg-3,var(--fg-2));background:var(--surface-2,var(--bg,var(--surface-2)));border-color:var(--line,var(--line))}
html[data-theme=dark] .v4-order-editor .card{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] .receipt-editor{background:var(--surface,var(--surface));border-color:var(--line,var(--line))}
html[data-theme=dark] .receipt-editor .order-toolbar{background:var(--surface,var(--surface));border-color:var(--line,var(--line))}
html[data-theme=dark] .receipt-editor .receipt-source{background:var(--warn-soft,var(--warn-soft));border-color:var(--line,var(--line));color:var(--warn,var(--accent-ink))}
html[data-theme=dark] .receipt-editor .receipt-confirm{color:var(--fg,var(--fg))}
html[data-theme=dark] .v4-schedule .schedule-toolbar input,html[data-theme=dark] .v4-schedule .schedule-toolbar select,html[data-theme=dark] .v4-schedule .schedule-toolbar button{background:var(--surface,var(--surface));color:var(--fg,var(--fg));border:1px solid var(--line,var(--line))}
html[data-theme=dark] .v4-schedule .schedule-toolbar .primary{background:var(--accent-strong,#c4500a);color:#fff;border-color:var(--accent-strong,#c4500a)}
html[data-theme=dark] .v4-schedule .v4-calendar-modes button{border:0;border-right:1px solid var(--line,var(--line))}
html[data-theme=dark] .v4-schedule .v4-calendar-modes button[aria-pressed=true]{background:var(--fg,#262726);color:var(--surface,#fff)}
html[data-theme=dark] .v4-schedule .sch-summary{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .v4-schedule .sch-summary span{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .v4-schedule .schedule-scroll{border-color:var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] .v4-schedule .schedule-column-title{background:var(--surface-2,var(--bg,var(--surface-2)));border-color:var(--line,var(--line))}
html[data-theme=dark] .v4-schedule .schedule-column-title small{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .v4-schedule .schedule-hours>div,html[data-theme=dark] .v4-schedule .schedule-slot{border-bottom:1px solid var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] .v4-schedule .schedule-hours>div{color:var(--fg-3,var(--fg-2));border-bottom-color:transparent}
html[data-theme=dark] .v4-schedule .schedule-track{border-color:var(--line,var(--line))}
html[data-theme=dark] .v4-schedule .schedule-slot:nth-child(4n+1){border-top:0}
html[data-theme=dark] .v4-schedule .schedule-slot:disabled{background:repeating-linear-gradient(135deg,var(--surface,var(--surface)),var(--surface,var(--surface)) 3px,var(--line,var(--surface-3)) 4px,var(--surface,var(--surface)) 5px)}
html[data-theme=dark] .v4-schedule .schedule-slot:not(:disabled):hover{background:var(--accent-soft,var(--accent-soft))}
html[data-theme=dark] .v4-schedule .schedule-event{border:1px solid color-mix(in srgb,var(--info,#2f64c8) 25%,var(--line,var(--line)));background:var(--info-soft,var(--info-soft));color:var(--fg,var(--fg))}
html[data-theme=dark] .v4-schedule .sch-week-scroll,html[data-theme=dark] .v4-schedule .sch-agenda{border-color:var(--line,var(--line));background:var(--surface,var(--surface))}
html[data-theme=dark] .v4-schedule .sch-week th{background:var(--surface-2,var(--bg,var(--surface-2)));color:var(--fg,var(--fg))}
html[data-theme=dark] .v4-schedule .sch-week th,html[data-theme=dark] .v4-schedule .sch-week td{border-color:var(--line,var(--line))}
html[data-theme=dark] .schedule-appointment-dialog .booking-board,html[data-theme=dark] .schedule-appointment-dialog .booking-details{background:var(--surface,var(--surface));color:var(--fg,var(--fg))}
html[data-theme=dark] .schedule-appointment-dialog .booking-selection{background:var(--info-soft,var(--info-soft))}
html[data-theme=dark] .schedule-appointment-dialog .booking-selection.ready{background:var(--ok-soft,var(--surface-2));color:var(--ok,var(--ok))}
html[data-theme=dark] .v4-order-editor .danger-link{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface));color:var(--bad,var(--bad))}
html[data-theme=dark] .v4-contact-copy-row>.contact-copy{border:0;background:transparent;color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .v4-contact-copy-row>.contact-copy:hover{background:var(--surface-2,var(--surface));color:var(--accent-ink,var(--accent-ink))}
html[data-theme=dark] .v4-service-error{background:var(--surface,var(--surface));border:1px solid var(--bad-line,var(--bad-line))}
html[data-theme=dark] .v4-service-error p{color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .v4-order-more>summary{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface));color:var(--fg,var(--fg))}
html[data-theme=dark] .v4-order-more>div{background:var(--surface,var(--surface));border:1px solid var(--line,var(--line))}
html[data-theme=dark] .v4-manager-hint{color:var(--warn,var(--accent-ink))}
html[data-theme=dark] .v4-order-editor .v4-unassigned{border-color:var(--warn-line,var(--warn-line))}
html[data-theme=dark] .orders-compact.v4-service-register .report-table .order-open-row>td{background:var(--order-row-bg);color:var(--fg);border-bottom:2px solid var(--surface)}
html[data-theme=dark] .orders-compact.v4-service-register .report-table .order-open-row:hover>td,html[data-theme=dark] .orders-compact.v4-service-register .report-table .order-open-row:focus-within>td{background:var(--order-row-hover)}
html[data-theme=dark] .orders-compact.v4-service-register .report-table tr.receipt-posted>td{background:var(--surface);color:var(--fg);border-bottom-color:var(--line)}
html[data-theme=dark] .orders-compact.v4-service-register .report-table tr.receipt-posted:hover>td{background:var(--surface-2)}
html[data-theme=dark] .orders-compact.v4-service-register .report-table .order-open-row .secondary{background:var(--surface);color:var(--fg);border-color:var(--line)}
html[data-theme=dark] .orders-compact .v4-order-editor .order-line:is(.work-line,.part-line),html[data-theme=dark] .v4-order-editor .work-details-body,html[data-theme=dark] .v4-order-editor .part-details-body{background:var(--surface);color:var(--fg);border-color:var(--line)}
html[data-theme=dark] .orders-compact .v4-order-editor .order-line:is(.work-line,.part-line)>div{border-color:var(--line)}
html[data-theme=dark] .orders-compact .v4-order-editor .order-line:is(.work-line,.part-line) input:focus,html[data-theme=dark] .orders-compact .v4-order-editor .order-line:is(.work-line,.part-line) select:focus{background:var(--surface-2)}
html[data-theme=dark] .orders-compact .v4-order-editor .order-line:is(.work-line,.part-line) input[readonly]{background:var(--surface-2);color:var(--fg-2)}
html[data-theme=dark] .v4-order-editor .order-line-head{background:var(--surface-2);color:var(--fg-2)}
html[data-theme=dark] .orders-compact .v4-order-editor .order-line{border-color:var(--line)}
html[data-theme=dark] .v4-order-editor .order-line input[readonly],html[data-theme=dark] .v4-order-editor .order-line .line-name>input[aria-label="Печатное название детали на польском"]{background:var(--surface-2);color:var(--fg-2)}
html[data-theme=dark] .v4-order-editor .order-subtotal{border-color:var(--line)}
html[data-theme=dark] .v4-order-editor .estimate-grid th{background:var(--surface-2);color:var(--fg-2);border-color:var(--line)}
html[data-theme=dark] .v4-order-editor .estimate-grid td{border-color:var(--line);background:var(--surface)}
html[data-theme=dark] .v4-order-editor .estimate-grid tr:nth-child(even) td{background:var(--surface-2)}
html[data-theme=dark] .receipt-editor .receipt-table td,html[data-theme=dark] .receipt-parts-picker .report-table td{background:var(--surface);color:var(--fg);border-color:var(--line)}
html[data-theme=dark] .receipt-parts-picker select{background:var(--surface);color:var(--fg);border-color:var(--line)}
html[data-theme=dark] .v4-schedule .schedule-days{background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .v4-schedule .schedule-days section,html[data-theme=dark] .v4-schedule .sch-agenda section{border-color:var(--line)}
html[data-theme=dark] .v4-schedule .schedule-day-title,html[data-theme=dark] .v4-schedule .sch-week th button,html[data-theme=dark] .v4-schedule .sch-cell-add{color:var(--accent-ink)}
html[data-theme=dark] .v4-schedule .sch-week td{background:var(--surface)}
html[data-theme=dark] .v4-schedule .sch-week th small,html[data-theme=dark] .v4-schedule .sch-week td>small,html[data-theme=dark] .v4-schedule .sch-agenda section>small{color:var(--fg-3)}
html[data-theme=dark] .schedule-appointment-dialog .booking-board{border-color:var(--line)}
html[data-theme=dark] .schedule-appointment-dialog .booking-board button{background:var(--surface);color:var(--fg-2);border-color:var(--line)}
html[data-theme=dark] .schedule-appointment-dialog .booking-month button.selected{background:var(--accent-soft);color:var(--accent-ink);border-color:var(--accent-line)}
html[data-theme=dark] .schedule-appointment-dialog .booking-month .outside{color:var(--fg-3)}
html[data-theme=dark] .schedule-appointment-dialog .booking-slots{border-color:var(--line)}
html[data-theme=dark] .schedule-appointment-dialog .booking-slots thead{background:var(--surface-2)}
html[data-theme=dark] .schedule-appointment-dialog .booking-slots td,html[data-theme=dark] .schedule-appointment-dialog .booking-slots .hour td,html[data-theme=dark] .schedule-appointment-dialog .booking-slots .hour th{border-color:var(--line)}
html[data-theme=dark] .schedule-appointment-dialog .booking-slots button{background:var(--ok-soft);color:var(--ok)}
html[data-theme=dark] .schedule-appointment-dialog .booking-slots button:empty{background:var(--surface)}
html[data-theme=dark] .schedule-appointment-dialog .booking-slots button:hover:not(:disabled){background:var(--ok-soft)}
html[data-theme=dark] .schedule-appointment-dialog .booking-slots button:disabled{background:var(--surface-2);color:var(--fg-3)}
html[data-theme=dark] .schedule-appointment-dialog .booking-slots button:disabled:empty{background:repeating-linear-gradient(135deg,var(--surface),var(--surface) 5px,var(--line) 5px,var(--line) 6px)}
html[data-theme=dark] .schedule-appointment-dialog .booking-slots button.busy{background:var(--ai-soft);color:var(--ai)}
html[data-theme=dark] .schedule-appointment-dialog .booking-slots button.selected{background:var(--accent-soft)!important;color:var(--accent-ink)!important;border-color:var(--accent)}
html[data-theme=dark] .master-workspace{background:var(--bg);color:var(--fg)}
html[data-theme=dark] .master-workspace .master-header{background:var(--surface);border-bottom:1px solid var(--line)}
html[data-theme=dark] .master-workspace .master-header img{background:var(--surface)}
html[data-theme=dark] .master-workspace .master-header span{color:var(--fg-3)}
html[data-theme=dark] .master-workspace .master-nav{border-bottom:1px solid var(--line);background:var(--surface)}
html[data-theme=dark] .master-workspace .master-nav button{border:0;background:transparent;color:var(--fg-2)}
html[data-theme=dark] .master-workspace .master-nav button.active{background:var(--accent-soft);color:var(--accent-ink)}
html[data-theme=dark] .master-workspace .master-heading p{color:var(--fg-3)}
html[data-theme=dark] .master-workspace .secondary{color:var(--fg);background:var(--surface);border:1px solid var(--line)}
html[data-theme=dark] .master-workspace .master-date-controls input{background:var(--surface);color:var(--fg);border:1px solid var(--line)}
html[data-theme=dark] .master-pay-card{background:#232423;color:#fff}
html[data-theme=dark] .master-pay-card>div+div{border-left:1px solid #494b4d}
html[data-theme=dark] .master-pay-card span{color:#c2c6cc}
html[data-theme=dark] .master-pay-card small{color:#c2c6cc}
html[data-theme=dark] .master-workspace .master-event,html[data-theme=dark] .master-workspace .master-order-card{border:1px solid var(--line);background:var(--surface)}
html[data-theme=dark] .master-workspace .master-order-card.master-current{border-left:3px solid var(--accent)}
html[data-theme=dark] .master-workspace .master-current .master-payment{background:var(--accent-soft);color:var(--accent-ink)}
html[data-theme=dark] .master-workspace .master-event-time span,html[data-theme=dark] .master-workspace .master-event-body small,html[data-theme=dark] .master-workspace .master-order-card small{color:var(--fg-3)}
html[data-theme=dark] .master-workspace .master-event-meta{color:var(--fg-2)}
html[data-theme=dark] .master-workspace .master-payment{background:var(--warn-soft);color:var(--warn)}
html[data-theme=dark] .master-workspace .master-payment-paid{background:var(--ok-soft);color:var(--ok)}
html[data-theme=dark] .master-workspace .master-payment-cancelled,html[data-theme=dark] .master-workspace .master-payment-no_charge{background:var(--surface-3);color:var(--fg-2)}
html[data-theme=dark] .master-workspace .master-empty{background:var(--surface);border:1px dashed var(--line-strong)}
html[data-theme=dark] .master-workspace .master-empty p{color:var(--fg-3)}
html[data-theme=dark] .master-workspace .master-filters{background:var(--surface);border:1px solid var(--line)}
html[data-theme=dark] .master-workspace .master-filters label{color:var(--fg-2)}
html[data-theme=dark] .master-workspace .master-filters input,html[data-theme=dark] .master-workspace .master-filters select{border:1px solid var(--line);background:var(--surface);color:var(--fg)}
html[data-theme=dark] .master-workspace .master-pagination{color:var(--fg-3)}
html[data-theme=dark] .master-workspace .master-note{color:var(--fg-3)}
html[data-theme=dark] .master-workspace .master-detail-section{border:1px solid var(--line);background:var(--surface)}
html[data-theme=dark] .master-workspace .master-work-table td,html[data-theme=dark] .master-workspace .master-work-table th{border-bottom:1px solid var(--line);background:var(--surface)}
html[data-theme=dark] .master-workspace .master-work-table th{background:var(--surface-2);color:var(--fg-3)}
html[data-theme=dark] .master-workspace .master-manager-note{background:var(--info-soft);color:var(--info)}
html[data-theme=dark] .master-checklist label{border-bottom:1px solid var(--line);color:var(--fg)}
html[data-theme=dark] .master-checklist small{color:var(--fg-3)}
html[data-theme=dark] .master-workspace .master-diagnostic-form{border-top:1px solid var(--line)}
html[data-theme=dark] .master-workspace .master-diagnostic-form label,html[data-theme=dark] .master-workspace .master-photo-upload label{color:var(--fg-2)}
html[data-theme=dark] .master-workspace .master-diagnostic-form textarea{border:1px solid var(--line);background:var(--surface);color:var(--fg)}
html[data-theme=dark] .master-workspace .master-photo-upload{border-top:1px solid var(--line)}
html[data-theme=dark] .master-workspace .master-photo-upload input{background:var(--surface);color:var(--fg);border:1px solid var(--line)}
html[data-theme=dark] .master-workspace .master-photo-upload small{color:var(--fg-3)}
html[data-theme=dark] .master-photo-list a{color:var(--fg-3)}
html[data-theme=dark] .master-photo-list img{border:1px solid var(--line)}
html[data-theme=dark] .master-diagnostic-note{border:1px solid var(--line-strong);border-left:3px solid var(--info);background:var(--surface-2)}
html[data-theme=dark] .master-diagnostic-note header span,html[data-theme=dark] .master-diagnostic-note>small{color:var(--fg-3)}
html[data-theme=dark] .master-diagnostic-note p{color:var(--fg)}
html[data-theme=dark] .master-pay-row{border-bottom:1px solid var(--line)}
html[data-theme=dark] .v4-master-report{border-top:1px solid var(--line);background:var(--surface);color:var(--fg)}
html[data-theme=dark] .v4-master-report-warning{background:var(--warn-soft);color:var(--warn)}
html[data-theme=dark] .v4-master-readiness>div{border-bottom:1px solid var(--line)}
html[data-theme=dark] .v4-master-readiness>div>span{color:var(--fg-3)}
html[data-theme=dark] .v4-master-readiness>div>.is-ready{color:var(--ok)}
html[data-theme=dark] .v4-master-readiness small{color:var(--fg-3)}
@media(max-width:680px){html[data-theme=dark] .master-workspace .master-nav{border:0;background:#232423}html[data-theme=dark] .master-workspace .master-nav button{color:#c2c6cc}html[data-theme=dark] .master-workspace .master-nav button.active{background:#383b3b;color:#fff}html[data-theme=dark] .master-workspace .master-nav button.active svg{color:var(--accent-ink)}html[data-theme=dark] .master-pay-card>div+div{border-left:0;border-top:1px solid #494b4d}}
html[data-theme=dark] .v4-order-photo-upload{border-top:1px solid var(--line)}
html[data-theme=dark] .v4-order-photo-upload label{color:var(--fg-2)}
html[data-theme=dark] .v4-order-photo-upload input{background:var(--surface);color:var(--fg);border:1px solid var(--line)}
html[data-theme=dark] .v4-order-photo-upload small{color:var(--fg-3)}
html[data-theme=dark] .schedule-notifications{border:1px solid var(--line);background:var(--surface-2)}
html[data-theme=dark] .schedule-notifications h3{color:var(--fg)}
html[data-theme=dark] .schedule-notifications .field-help{color:var(--fg-3)}
html[data-theme=dark] .schedule-notifications .schedule-notify-option{color:var(--fg)}
html[data-theme=dark] .schedule-notification-history{border:1px solid var(--line);background:var(--surface);color:var(--fg)}
html[data-theme=dark] .schedule-notification-history.has-error{border-color:var(--warn-line)}
html[data-theme=dark] .schedule-notification-history article{border-top:1px solid var(--line)}
html[data-theme=dark] .schedule-notification-history article.has-error{border-left:3px solid var(--warn)}
html[data-theme=dark] .schedule-notification-history header small{color:var(--fg-2)}
html[data-theme=dark] .schedule-notification-history small{color:var(--fg-3)}
html[data-theme=dark] .schedule-notification-history .notification-error{color:var(--bad)}
html[data-theme=dark] .schedule-notification-history details summary{color:var(--fg-3)}
html[data-theme=dark] .schedule-notifications .schedule-notification-history{background:var(--surface)}
html[data-theme=dark] .schedule-notification-preview{border:1px solid var(--line);background:var(--surface);color:var(--fg)}
html[data-theme=dark] .schedule-notification-preview article{border-top:1px solid var(--line)}
html[data-theme=dark] .schedule-notification-preview strong{color:var(--fg-3)}
html[data-theme=dark] .order-undo-tools button:focus-visible{outline:2px solid var(--accent,#e55b0a)}
html[data-theme=dark] .order-shops details>summary{border:1px solid var(--line,var(--line-strong));background:var(--surface)}
html[data-theme=dark] .order-shops details>summary::after{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .order-shops details[open]>summary{border-color:var(--accent,#c2540a)}
html[data-theme=dark] .order-shops-list{background:var(--surface);border:1px solid var(--line,var(--line-strong))}
html[data-theme=dark] .order-shops-list label:hover{background:var(--bg-2,var(--surface-2))}
html[data-theme=dark] .order-sheet{border:1px solid var(--line,var(--line));border-bottom:3px solid color-mix(in srgb,var(--shop) 45%,transparent);background:var(--surface-2,var(--surface-2));color:var(--fg-2,var(--fg-2))}
html[data-theme=dark] .order-sheet.is-current{background:var(--surface,var(--surface));border-bottom-color:var(--shop);color:var(--fg,var(--fg))}
html[data-theme=dark] .order-sheet>button:focus-visible,html[data-theme=dark] .order-sheet-add:focus-visible{outline:2px solid var(--accent,#E8590C)}
html[data-theme=dark] .order-sheet strong i{color:var(--warn,var(--accent-ink))}
html[data-theme=dark] .order-sheet small{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .order-sheet>.order-sheet-close{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .order-sheet>.order-sheet-close:hover{color:var(--bad,var(--bad))}
html[data-theme=dark] .order-sheet-add{border:1px dashed var(--line-strong,var(--line-strong));color:var(--fg-2,var(--fg-2));background:var(--surface,var(--surface))}
html[data-theme=dark] .order-sheet-add:hover{color:var(--accent,var(--accent-ink))}
html[data-theme=dark] .order-sheet-modes{border:0}
html[data-theme=dark] .order-sheet-shops .order-sheet-shop{border-color:var(--shop);color:var(--shop)}
html[data-theme=dark] .order-sheet-shops .order-sheet-shop:hover{background:var(--shop);color:#fff}
html[data-theme=dark] .order-form[data-shop] .order-meta{background:color-mix(in srgb,var(--shop) 5%,transparent)}
html[data-theme=dark] .order-shop-art{color:var(--shop)}
html[data-theme=dark] .print-form-preview-title small{color:var(--fg-3,var(--fg-2))}
html[data-theme=dark] .pv-sheet{background:var(--surface);color:var(--fg);border:1px solid var(--line)}
html[data-theme=dark] .pv-sheet header{border-bottom:3px solid #222}
html[data-theme=dark] .pv-sheet header small{color:var(--fg-3)}
html[data-theme=dark] .pv-sheet header>div:last-child{color:var(--fg-3)}
html[data-theme=dark] .pv-parties>div+div{border-left:1px solid var(--line-strong);color:var(--fg-3)}
html[data-theme=dark] .pv-parties i{color:var(--fg-3)}
html[data-theme=dark] .pv-sample{color:#aaa}
html[data-theme=dark] .pv-sample td,html[data-theme=dark] .pv-sample th{border-bottom:1px solid var(--line)}
html[data-theme=dark] .pv-warranty{border-top:1px solid var(--line);color:var(--fg-2)}
html[data-theme=dark] .pv-warranty h6{color:var(--fg)}
html[data-theme=dark] .pv-sheet footer{border-top:1px solid #c66a31}
html[data-theme=dark] .pv-services{color:#aaa}
html[data-theme=dark] .pv-sheet [data-pv]:hover{background:var(--accent-soft)}
html[data-theme=dark] .pv-sheet [data-pv].is-on{background:var(--accent-soft)}
/* my-day.css */
html[data-theme=dark] .day-row{background:var(--surface,var(--surface));border:1px solid var(--line)}
html[data-theme=dark] .crm-sms-event{background:var(--surface,var(--surface));border:1px solid var(--line);border-left:3px solid #d35b09}
html[data-theme=dark] .crm-sms-event small{color:var(--fg-3)}
html[data-theme=dark] #content .my-day-page{color:var(--text,var(--fg))}
html[data-theme=dark] #content .my-day-page .md-heading p{color:var(--fg-3)}
html[data-theme=dark] #content .my-day-page .md-scope{background:var(--surface-3)}
html[data-theme=dark] #content .my-day-page .md-scope button{background:transparent;border:0;color:inherit}
html[data-theme=dark] #content .my-day-page .md-scope button.active{background:var(--surface)}
html[data-theme=dark] #content .my-day-page .md-refresh span{color:var(--fg-3)}
html[data-theme=dark] #content .my-day-page .md-queues button{background:var(--surface,var(--surface));border:1px solid var(--line);color:inherit}
html[data-theme=dark] #content .my-day-page .md-queues button.active{border-color:#e86d22;background:var(--accent-soft)}
html[data-theme=dark] #content .my-day-page small{color:var(--fg-3)}
html[data-theme=dark] #content .my-day-page .md-panel{border:1px solid var(--line);background:var(--surface,var(--surface))}
html[data-theme=dark] #content .my-day-page .md-panel>header{border-bottom:1px solid var(--line)}
html[data-theme=dark] #content .my-day-page .md-panel>header>span{color:var(--fg-3)}
html[data-theme=dark] #content .my-day-page .md-item{border-bottom:1px solid var(--line)}
html[data-theme=dark] #content .my-day-page .md-item p{color:var(--fg-3)}
html[data-theme=dark] #content .my-day-page .md-group{background:var(--surface-2);color:var(--fg-3);border-bottom:1px solid var(--line)}
html[data-theme=dark] #content .my-day-page .md-group.overdue{background:var(--accent-soft);color:var(--accent-ink)}
html[data-theme=dark] #content .my-day-page .md-overdue{color:var(--bad);background:var(--accent-soft)}
html[data-theme=dark] #content .my-day-page .md-empty{color:var(--fg-3)}
html[data-theme=dark] #content .my-day-page .md-visit{border-bottom:1px solid var(--line);color:inherit}
html[data-theme=dark] #content .my-day-page .md-pill{border:1px solid var(--line)}
html[data-theme=dark] #content .my-day-page .md-pill.next{background:#c94e00;color:white;border-color:#c94e00}
html[data-theme=dark] #content .my-day-page footer a{color:var(--accent-ink)}
html[data-theme=dark] .sidebar .nav .pc-nav-warning{color:var(--bad)}
html[data-theme=dark] .sidebar .nav .pc-nav-warning svg{color:var(--bad)!important}
html[data-theme=dark] .pc-preview{background:var(--surface,var(--surface));border:1px solid var(--accent-line)}
html[data-theme=dark] .pc-demo-bar{background:var(--accent-soft);color:var(--accent-ink)}
html[data-theme=dark] #content .my-day-page .pc-demo-bar button{background:none;border:0;color:inherit}
html[data-theme=dark] .pc-panel-head p{color:var(--muted,var(--fg-3))}
html[data-theme=dark] .pc-heading-icon{background:var(--bad-soft);color:var(--bad)}
html[data-theme=dark] .pc-heading-icon.resolved{background:var(--surface-2);color:var(--ok)}
html[data-theme=dark] .pc-count{color:var(--fg-3)}
html[data-theme=dark] #content .my-day-page .pc-stage-tabs button{border:1px solid var(--line);background:var(--surface,var(--surface));color:var(--text,var(--fg))}
html[data-theme=dark] #content .my-day-page .pc-stage-tabs button[aria-pressed="true"]{background:#30353b;border-color:#30353b;color:#fff}
html[data-theme=dark] .pc-stage-tabs>span{color:var(--fg-3)}
html[data-theme=dark] .pc-task{border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
html[data-theme=dark] .pc-status{color:var(--bad)}
html[data-theme=dark] .pc-status.resolved{color:var(--ok)}
html[data-theme=dark] .pc-task p{color:var(--muted,var(--fg-3))}
html[data-theme=dark] .pc-bottom{background:var(--bg,var(--surface))}
html[data-theme=dark] .pc-bottom>div>span{color:var(--fg-3)}
html[data-theme=dark] .pc-bottom p span{color:var(--fg-3)}
html[data-theme=dark] #content .my-day-page .pc-preview footer{color:var(--fg-3)}
html[data-theme=dark] .pc-preview-toast{background:var(--surface,var(--surface));color:var(--text,var(--fg));border:1px solid var(--accent-line);border-left:3px solid #db5526}
html[data-theme=dark] .pc-preview-toast>button[data-close]{border:0;background:none}
html[data-theme=dark] .pc-preview-toast small{color:var(--accent-ink)}
html[data-theme=dark] .pc-countdown{color:var(--accent-ink)}
html[data-theme=dark] .pc-countdown>small{color:var(--fg-3)}
html[data-theme=dark] .pc-countdown.overdue{color:var(--bad)}
/* work-inspector.css */
html[data-theme=dark] .inspector-status{background:var(--surface-secondary,var(--surface-2))}
html[data-theme=dark] .inspector-case{border:1px solid var(--line)}
html[data-theme=dark] .inspector-case header span{color:var(--accent-ink)}
html[data-theme=dark] .inspector-case p,html[data-theme=dark] .inspector-case small{color:var(--fg-3)}
html[data-theme=dark] .inspector-case blockquote{border-left:3px solid #f46b18;background:var(--accent-soft)}
html[data-theme=dark] .inspector-dialog .dialog-top{background:var(--surface,var(--surface))}
/* staff-messages.css */
html[data-theme=dark] .staff-event{background:var(--warn-soft);border:1px solid var(--warn-line);color:var(--fg)}
html[data-theme=dark] .staff-event small{color:var(--fg-3)}
html[data-theme=dark] .staff-toast{background:var(--surface);border:2px solid #f46b18;color:var(--fg)}
html[data-theme=dark] .staff-toast small{color:var(--fg-3)}
html[data-theme=dark] #chat-compose.is-staff .compose-hint{background:transparent;color:var(--fg-3)}
html[data-theme=dark] body .staff-toast header [data-dismiss]{border:0;background:var(--surface-2)}
html[data-theme=dark] body .staff-toast [data-expand]{border:0;background:transparent;color:var(--accent-ink)}
html[data-theme=dark] .staff-history-meta{color:var(--accent-ink)}
/* monitoring.css */
html[data-theme=dark] .monitor-heading p,html[data-theme=dark] .monitor-help{color:var(--fg-3)}
html[data-theme=dark] .monitor-summary{background:var(--accent-soft);color:var(--accent-ink)}
html[data-theme=dark] .monitor-summary.ok{background:var(--surface-2);color:var(--ok)}
html[data-theme=dark] .monitor-summary.error{background:var(--bad-soft);color:var(--bad)}
html[data-theme=dark] .monitor-metrics article{background:var(--surface,var(--surface));border:1px solid var(--line)}
html[data-theme=dark] .monitor-metrics small,html[data-theme=dark] .monitor-metrics span{color:var(--fg-3)}
html[data-theme=dark] .monitor-panel{background:var(--surface,var(--surface));border:1px solid var(--line)}
html[data-theme=dark] .monitor-row{border-top:1px solid var(--line)}
html[data-theme=dark] .monitor-row p{color:var(--fg-3)}
html[data-theme=dark] .monitor-row small{color:var(--fg-3)}
html[data-theme=dark] .monitor-status{background:var(--surface-2);color:var(--fg-2)}
html[data-theme=dark] .monitor-status.ok{background:var(--surface-2);color:var(--ok)}
html[data-theme=dark] .monitor-status.warning{background:var(--accent-soft);color:var(--accent-ink)}
html[data-theme=dark] .monitor-status.error{background:var(--bad-soft);color:var(--bad)}
html[data-theme=dark] .monitor-alert.has-errors{color:var(--bad);border-color:var(--bad-line)}
html[data-theme=dark] .monitor-toast{background:var(--accent-soft);border:1px solid var(--accent-line)}
html[data-theme=dark] .monitor-card{background:var(--surface,var(--surface));border:1px solid var(--line,var(--line))}
html[data-theme=dark] .monitor-card-description{color:var(--fg-2,var(--fg-3))}
html[data-theme=dark] .monitor-card footer small{color:var(--fg-2,var(--fg-3))}
html[data-theme=dark] .monitor-card details{border-top:1px solid var(--line,var(--line))}
html[data-theme=dark] .monitor-card-heading span{color:var(--fg-2,var(--fg-3))}
html[data-theme=dark] .monitor-resource-row{border-top:1px solid var(--line,var(--line))}
html[data-theme=dark] .monitor-resource-value h3{color:var(--fg-2,var(--fg-3))}
html[data-theme=dark] .monitor-resource-value small{color:var(--fg-2,var(--fg-3))}
/* workload.css */
html[data-theme=dark] .wl{color:var(--wl-fg)}
html[data-theme=dark] .wl-card{background:var(--surface,var(--surface));border:1px solid var(--wl-line)}
html[data-theme=dark] .wl-card h2{color:var(--wl-fg2)}
html[data-theme=dark] .wl-dot{background:var(--wl-free)}
html[data-theme=dark] .wl-dot.work{background:var(--wl-work)}
html[data-theme=dark] .wl-dot.idle{background:var(--wl-idle)}
html[data-theme=dark] .wl-dot.busy{background:var(--wl-busy)}
html[data-theme=dark] .wl-dot.unknown{background:transparent;outline:1px dashed var(--line-strong,var(--line-strong))}
html[data-theme=dark] .wl-hint{color:var(--wl-fg2)}
html[data-theme=dark] .wl-hero li,html[data-theme=dark] .wl-now li{color:var(--wl-fg2)}
html[data-theme=dark] .wl-hero li b,html[data-theme=dark] .wl-now li b{color:var(--wl-fg)}
html[data-theme=dark] .wl-hero li.sep,html[data-theme=dark] .wl-now li.sep{border-top:1px solid var(--wl-line)}
html[data-theme=dark] .wl-evening{color:var(--wl-fg2);background:var(--surface-2,var(--surface))}
html[data-theme=dark] .wl-evening b{color:var(--wl-fg)}
html[data-theme=dark] .wl-days{border-bottom:1px solid var(--wl-line)}
html[data-theme=dark] .wl-day{background:linear-gradient(var(--surface-2,var(--surface)),var(--surface-2,var(--surface))) bottom/100% 100% no-repeat}
html[data-theme=dark] .wl-day i.work{background:var(--wl-work)}
html[data-theme=dark] .wl-day i.idle{background:var(--wl-idle)}
html[data-theme=dark] .wl-day i.none{background:var(--line-strong,var(--surface-3))}
html[data-theme=dark] .wl-day span{color:var(--wl-fg2)}
html[data-theme=dark] .wl-day.today span{color:var(--accent-ink,var(--accent-ink))}
html[data-theme=dark] .wl-day.today{outline:1px solid var(--accent-line,var(--accent-line))}
html[data-theme=dark] .wl-now-big span{color:var(--wl-fg2)}
html[data-theme=dark] .wl-seg{border:1px solid var(--wl-line)}
html[data-theme=dark] .wl-seg button{color:var(--wl-fg2)}
html[data-theme=dark] .wl-seg button+button{border-left:1px solid var(--wl-line)}
html[data-theme=dark] .wl-seg button.on{background:var(--accent-soft,var(--accent-soft));color:var(--accent-ink,var(--accent-ink))}
html[data-theme=dark] .wl-seg button:focus-visible{outline:2px solid var(--accent,#F46B18)}
html[data-theme=dark] .wl-post{border-top:1px solid var(--wl-line)}
html[data-theme=dark] .wl-post:first-of-type{border-top:none}
html[data-theme=dark] .wl-post header em{color:var(--wl-fg2)}
html[data-theme=dark] .wl-post small{color:var(--ai,var(--info))}
html[data-theme=dark] .wl-strip{background:var(--surface-3,var(--surface-2))}
html[data-theme=dark] .wl-strip b{background:var(--surface-2,var(--surface));border-left:1px solid var(--line-strong,var(--line-strong));border-right:1px solid var(--line-strong,var(--line-strong))}
html[data-theme=dark] .wl-strip i.work{background:var(--wl-work)}
html[data-theme=dark] .wl-strip i.idle{background:var(--wl-idle)}
html[data-theme=dark] .wl-axis{color:var(--wl-fg2)}
html[data-theme=dark] .wl-table th,html[data-theme=dark] .wl-table td{border-bottom:1px solid var(--wl-line)}
html[data-theme=dark] .wl-table th{color:var(--wl-fg2)}
html[data-theme=dark] .wl-table tr:last-child td{border-bottom:none}
html[data-theme=dark] .wl-plate{border:1px solid var(--line-strong,var(--line-strong));background:var(--surface,var(--surface))}
html[data-theme=dark] .wl-tag.ok{background:var(--ok-soft,var(--ok-soft));color:var(--ok,var(--ok))}
html[data-theme=dark] .wl-tag.warn{background:var(--warn-soft,var(--warn-soft));color:var(--warn,var(--warn))}
html[data-theme=dark] .wl-tag.bad{background:var(--danger-soft,var(--bad-soft));color:var(--danger,var(--bad))}
html[data-theme=dark] .wl-dot.unpaid{background:var(--wl-unpaid)}
html[data-theme=dark] .wl-day i.unpaid{background:var(--wl-unpaid)}
html[data-theme=dark] .wl-strip i.unpaid{background:var(--wl-unpaid)}
html[data-theme=dark] .wl-post small.bad{color:var(--wl-unpaid)}
html[data-theme=dark] .wl-tile{border:1px solid var(--wl-line);background:var(--surface-2,var(--surface))}
html[data-theme=dark] .wl-tile>span{color:var(--wl-fg2)}
html[data-theme=dark] .wl-tile ul{color:var(--wl-fg2)}
html[data-theme=dark] .wl-tile li b{color:var(--wl-fg)}
html[data-theme=dark] .wl-tile.ok{border-left:3px solid var(--wl-work)}
html[data-theme=dark] .wl-tile.bad{border-left:3px solid var(--wl-unpaid)}
html[data-theme=dark] .wl-tile.bad>strong{color:var(--wl-unpaid)}
html[data-theme=dark] .wl-table tr.wl-lost td{background:color-mix(in srgb,var(--wl-unpaid) 6%,transparent)}
html[data-theme=dark] .wl-shop{border:1px solid var(--wl-line);background:var(--surface-2,var(--surface));border-top:3px solid var(--wl-free)}
html[data-theme=dark] .wl-shop.work{border-top-color:var(--wl-work)}
html[data-theme=dark] .wl-shop.idle{border-top-color:var(--wl-idle)}
html[data-theme=dark] .wl-chip{background:var(--surface-3,var(--surface-2));color:var(--wl-fg2)}
html[data-theme=dark] .wl-chip.work{background:var(--ok-soft,var(--ok-soft));color:var(--ok,var(--ok))}
html[data-theme=dark] .wl-chip.idle{background:var(--warn-soft,var(--warn-soft));color:var(--warn,var(--warn))}
html[data-theme=dark] .wl-shop-big span{color:var(--wl-fg2)}
html[data-theme=dark] .wl-bar{background:var(--wl-free)}
html[data-theme=dark] .wl-bar i.work{background:var(--wl-work)}
html[data-theme=dark] .wl-bar i.idle{background:var(--wl-idle)}
html[data-theme=dark] .wl-shop ul{color:var(--wl-fg2)}
html[data-theme=dark] .wl-shop li b{color:var(--wl-fg)}
html[data-theme=dark] .wl-hour{background:var(--surface-3,var(--surface-2))}
html[data-theme=dark] .wl-hour i.work{background:var(--wl-work)}
html[data-theme=dark] .wl-hour i.idle{background:var(--wl-idle)}
html[data-theme=dark] .wl-hour span{color:var(--wl-fg2)}
html[data-theme=dark] .wl-shop footer{color:var(--wl-fg2);border-top:1px solid var(--wl-line)}
html[data-theme=dark] .wl-legend{color:var(--wl-fg2)}
html[data-theme=dark] .wl-legend i{border:1px solid var(--line-strong,var(--line-strong));background:var(--surface,var(--surface))}
html[data-theme=dark] .wl-legend i.work{background:var(--wl-work);border-color:var(--wl-work)}
html[data-theme=dark] .wl-legend i.idle{background:var(--wl-idle);border-color:var(--wl-idle)}
html[data-theme=dark] .wl-legend i.unpaid{background:var(--wl-unpaid);border-color:var(--wl-unpaid)}
html[data-theme=dark] .wl-legend i.busy{background:var(--wl-busy);border-color:var(--wl-busy)}
html[data-theme=dark] .wl-fact{border:1px solid var(--wl-line);background:var(--surface-2,var(--surface));border-left:3px solid var(--wl-free)}
html[data-theme=dark] .wl-fact>span{color:var(--wl-fg2)}
html[data-theme=dark] .wl-fact>small{color:var(--wl-fg2)}
html[data-theme=dark] .wl-fact.work{border-left-color:var(--wl-work)}
html[data-theme=dark] .wl-fact.idle{border-left-color:var(--wl-idle)}
html[data-theme=dark] .wl-fact.unpaid{border-left-color:var(--wl-unpaid)}
html[data-theme=dark] .wl-fact.unpaid>strong{color:var(--wl-unpaid)}
html[data-theme=dark] .wl-bar i.unpaid{background:var(--wl-unpaid)}
/* assistants.css */
html[data-theme=dark] .assistant-tab{border:0!important;color:white!important;background:linear-gradient(145deg,#7351b8,#9b6cc4)!important}
html[data-theme=dark] .assistant-tab i{background:#c84c05;color:white}
html[data-theme=dark] .assistant-panel{border:1px solid var(--line);background:var(--surface);color:var(--fg)}
html[data-theme=dark] .assistant-panel>header{border-bottom:1px solid var(--line)}
html[data-theme=dark] .assistant-avatar{background:var(--ai-soft);color:var(--ai)}
html[data-theme=dark] .assistant-heading select{border:0!important;background:transparent!important}
html[data-theme=dark] .assistant-heading small{color:var(--fg-3)}
html[data-theme=dark] .assistant-panel [data-close]{border:0!important;background:var(--surface-2)!important;color:var(--fg-3)!important}
html[data-theme=dark] .assistant-context{color:var(--fg-3);background:var(--surface)}
html[data-theme=dark] .assistant-context span{color:var(--fg-3)}
html[data-theme=dark] .assistant-feed{background:var(--surface)}
html[data-theme=dark] .assistant-message{border:1px solid var(--line);background:var(--surface)}
html[data-theme=dark] .assistant-message.from-me{background:var(--accent-soft);border-color:var(--accent-line)}
html[data-theme=dark] .assistant-message.from-assistant{background:var(--surface-2);border-color:var(--ai-line)}
html[data-theme=dark] .assistant-message>div{color:var(--fg-3)}
html[data-theme=dark] .assistant-message small{color:var(--fg-3)}
html[data-theme=dark] .assistant-panel form{border-top:1px solid var(--line)}
html[data-theme=dark] .assistant-panel form label{color:var(--fg-3)}
html[data-theme=dark] .assistant-panel textarea{border:1px solid var(--ai-line)}
html[data-theme=dark] .assistant-bottom small{color:var(--fg-3)}
html[data-theme=dark] .assistant-panel button[type=submit]{background:#7853a5!important;color:white!important;border:0!important}
html[data-theme=dark] .assistant-error{color:var(--bad)}
html[data-theme=dark] .assistant-usage{color:var(--fg-3);border-top:1px solid var(--line)}
html[data-theme=dark] .assistant-proposals{background:var(--surface)}
html[data-theme=dark] .assistant-proposals article{border-top:1px solid var(--line)}
html[data-theme=dark] .assistant-proposals small{color:var(--fg-3)}
html[data-theme=dark] .assistant-proposals [data-confirm]{background:#7853a5;color:#fff;border-color:#7853a5}
html[data-theme=dark] .assistant-welcome{color:var(--fg-3)}
html[data-theme=dark] .assistant-welcome>div{color:var(--ai)}
html[data-theme=dark] .assistant-welcome h3{color:var(--fg)}
html[data-theme=dark] .assistant-welcome button{background:var(--surface);border:1px solid var(--ai-line)}
html[data-theme=dark] .assistant-panel button:focus-visible,html[data-theme=dark] .assistant-tab:focus-visible{outline:2px solid #8956bf}
html[data-theme=dark] .assistant-deliveries{color:var(--fg-3);border-top:1px solid var(--line)}
html[data-theme=dark] .assistant-deliveries p{border-bottom:1px solid var(--line)}
html[data-theme=dark] .assistant-deliveries span{color:var(--ai)}
html[data-theme=dark] button.assistant-tab{background:linear-gradient(145deg,#9171c4 0%,#7450aa 100%)!important;border:1px solid var(--line)!important;outline:none!important}
html[data-theme=dark] button.assistant-tab svg{color:#fff}
html[data-theme=dark] button.assistant-tab:focus-visible{outline:2px solid #bca5da!important}
html[data-theme=dark] button.assistant-tab i{border:2px solid var(--line)}
html[data-theme=dark] button.assistant-tab{border-right:0!important}
html[data-theme=dark] button.assistant-tab:hover{background:linear-gradient(145deg,#9b7acf,#7b56b1)!important}
html[data-theme=dark] .assistant-audit{color:var(--fg-3);border-top:1px solid var(--line);background:var(--surface)}
html[data-theme=dark] .assistant-panel .assistant-bottom [data-file]{border:1px solid var(--ai-line)!important;background:var(--surface-2)!important;color:var(--ai)!important}
html[data-theme=dark] .assistant-file{background:var(--ai-soft);color:var(--ai)}
html[data-theme=dark] .assistant-file button{border:0!important;background:transparent!important;color:var(--ai)!important}
/* advertising.css */
html[data-theme=dark] .adv-page{color:var(--text,var(--fg))}
html[data-theme=dark] .adv-heading small{color:var(--accent-ink)}
html[data-theme=dark] .adv-heading p,html[data-theme=dark] .adv-note,html[data-theme=dark] .adv-panel p,html[data-theme=dark] .adv-account,html[data-theme=dark] .adv-explainer p{color:var(--fg-3)}
html[data-theme=dark] .adv-tabs{border-bottom:1px solid var(--adv-border)}
html[data-theme=dark] .adv-tabs button{border:0;background:transparent;color:inherit;border-bottom:3px solid transparent}
html[data-theme=dark] .adv-tabs button.active{color:var(--accent-ink);border-color:#e66d20}
html[data-theme=dark] .adv-metrics article,html[data-theme=dark] .adv-panel,html[data-theme=dark] .adv-explainer{border:1px solid var(--adv-border);background:var(--surface,var(--surface))}
html[data-theme=dark] .adv-metrics span{color:var(--fg-3)}
html[data-theme=dark] .adv-metrics small{color:var(--fg-3)}
html[data-theme=dark] .adv-explainer{background:var(--accent-soft)}
html[data-theme=dark] .adv-page th{background:var(--surface-2);color:var(--fg-3)}
html[data-theme=dark] .adv-page td,html[data-theme=dark] .adv-page th{border-bottom:1px solid var(--adv-border)}
html[data-theme=dark] .adv-page td small{color:var(--fg-3)}
html[data-theme=dark] .adv-tag{background:var(--surface-2);color:var(--ok)}
html[data-theme=dark] .adv-lead{border-top:1px solid var(--adv-border);color:inherit}
html[data-theme=dark] .adv-lead span,html[data-theme=dark] .adv-lead small{color:var(--fg-3)}
html[data-theme=dark] .adv-warning{background:var(--accent-soft);color:var(--accent-ink)}
/* payment-control.css */
html[data-theme=dark] .pc-panel{border:1px solid var(--accent-line);background:var(--surface)}
html[data-theme=dark] .pc-panel>header{background:var(--accent-soft)}
html[data-theme=dark] .pc-panel p,html[data-theme=dark] .pc-panel small{color:var(--fg-3)}
html[data-theme=dark] .pc-triangle{color:var(--bad)}
html[data-theme=dark] .pc-triangle b{color:white}
html[data-theme=dark] .pc-row{border-top:1px solid var(--line)}
html[data-theme=dark] .pc-stage{color:var(--accent-ink)}
html[data-theme=dark] .pc-stage.s1,html[data-theme=dark] .pc-stage.s2{color:var(--bad)}
html[data-theme=dark] .pc-acks{border-top:1px solid var(--line)}
html[data-theme=dark] .pc-agreement{border:1px solid var(--line);color:var(--fg)}
html[data-theme=dark] .pc-agreement::backdrop{background:#17212bb3}
html[data-theme=dark] .pc-agreement header{border-bottom:1px solid var(--line)}
html[data-theme=dark] .pc-agreement header p{color:var(--fg-2)}
html[data-theme=dark] .pc-rules{background:var(--surface)}
html[data-theme=dark] .pc-agreement small{color:var(--fg-3)}
html[data-theme=dark] .pc-toast{background:var(--accent-soft);border:1px solid var(--accent-line)}
html[data-theme=dark] .pc-toast>button{border:0;background:none}
html[data-theme=dark] .pc-toast a{color:var(--accent-ink)}
/* marketing-dashboard.css */
html[data-theme=dark] .mk-controls label{color:var(--mk-muted)}
html[data-theme=dark] .mk-kpi,html[data-theme=dark] .mk-panel{background:var(--surface,var(--surface));border:1px solid var(--mk-line)}
html[data-theme=dark] .mk-kpi>span{color:var(--mk-muted)}
html[data-theme=dark] .mk-kpi>p{color:var(--mk-muted)}
html[data-theme=dark] .mk-kpi>div{border-top:1px solid var(--mk-line)}
html[data-theme=dark] .mk-kpi>div span{color:var(--mk-muted)}
html[data-theme=dark] .mk-kpi b{color:var(--text,var(--fg))}
html[data-theme=dark] .mk-panel-head p,html[data-theme=dark] .mk-foot{color:var(--mk-muted)}
html[data-theme=dark] .mk-table th,html[data-theme=dark] .mk-table td{border-bottom:1px solid var(--mk-line)}
html[data-theme=dark] .mk-table thead th{background:var(--surface);color:var(--fg-2)}
html[data-theme=dark] .mk-table small{color:var(--mk-muted)}
html[data-theme=dark] .mk-total{background:var(--accent-soft)}
html[data-theme=dark] .mk-total th,html[data-theme=dark] .mk-total td{border:0}
html[data-theme=dark] .mk-partial{color:var(--accent-ink)}
html[data-theme=dark] .mk-note{background:var(--accent-soft);border:1px solid var(--accent-line);color:var(--accent-ink)}
html[data-theme=dark] .mk-averages span,html[data-theme=dark] .mk-averages small{color:var(--mk-muted)}
html[data-theme=dark] .mk-dot{background:#e55b0a}
html[data-theme=dark] .mk-gray{background:var(--info-soft)}
/* employee-adjustments.css */
html[data-theme=dark] .employee-actions .pay-bonus{color:var(--ok);border-color:var(--ok-line);background:var(--surface)}
html[data-theme=dark] .employee-actions .pay-penalty{color:var(--bad);border-color:var(--bad-line);background:var(--surface)}
html[data-theme=dark] .employee-pay-adjustments{border-top:1px solid var(--border,var(--line))}
html[data-theme=dark] .employee-adjustment-row{border-bottom:1px solid var(--border,var(--line))}
html[data-theme=dark] .employee-adjustment-row small{color:var(--muted,var(--fg-3))}
html[data-theme=dark] .employee-adjustment-row .pay-bonus{color:var(--ok)}
html[data-theme=dark] .employee-adjustment-row .pay-penalty{color:var(--bad)}
/* stocktaking.css */
html[data-theme=dark] .order-warehouse-bar label{color:var(--muted,var(--fg-3))}
html[data-theme=dark] .stocktake-state{background:var(--surface-2);color:var(--fg-2)}
html[data-theme=dark] .stocktake-state.posted{background:var(--surface-2);color:var(--ok)}
html[data-theme=dark] .stocktake-state.cancelled{background:var(--bad-soft);color:var(--bad)}
html[data-theme=dark] .stocktake-meta{background:var(--surface-subtle,var(--surface-2))}
html[data-theme=dark] .stocktake-help{color:var(--muted,var(--fg-3))}
html[data-theme=dark] .stocktake-table th{background:var(--surface-subtle,var(--surface-2));color:var(--muted,var(--fg-3))}
html[data-theme=dark] .stocktake-table td,html[data-theme=dark] .stocktake-table th{border-bottom:1px solid var(--border,var(--line))}
html[data-theme=dark] .stocktake-table input[aria-invalid=true]{border-color:#c83232}
html[data-theme=dark] .stocktake-table td.stocktake-variance{color:var(--accent-ink);background:var(--accent-soft)}
html[data-theme=dark] .stocktake-empty{color:var(--muted,var(--fg-3))}
html[data-theme=dark] .stocktake-footer{border-top:1px solid var(--border,var(--line))}
html[data-theme=dark] .stocktake-footer>div{color:var(--muted,var(--fg-3))}
html[data-theme=dark] .order-issue-summary{background:var(--surface-2);color:var(--fg-2)}
html[data-theme=dark] .order-issue-summary[data-state=full]{background:var(--surface-2);color:var(--ok)}
html[data-theme=dark] .order-issue-summary[data-state=partial]{background:var(--accent-soft);color:var(--accent-ink)}
html[data-theme=dark] .order-issue-summary[data-state=none]{background:var(--accent-soft);color:var(--accent-ink)}
html[data-theme=dark] .inline-catalog-menu[popover]{border:1px solid var(--line);background:var(--surface,var(--surface))}
/* tires.css */
html[data-theme=dark] .tire-sections>div{border:1px solid var(--line)}
html[data-theme=dark] .tire-sections span{color:var(--fg-2)}
html[data-theme=dark] .tire-workspace>.card{background:var(--surface,var(--surface));border:1px solid var(--line)}
/* whats-new.css */
html[data-theme=dark] .wn-dialog{border:0;background:var(--surface);color:var(--fg)}
html[data-theme=dark] .wn-dialog::backdrop{background:rgba(20,22,26,.6)}
html[data-theme=dark] .wn-hero{background:linear-gradient(135deg,#1f2328 0%,#3a2a20 60%,#E8590C 140%);color:#fff}
html[data-theme=dark] .wn-hero small{background:rgba(255,255,255,.14)}
html[data-theme=dark] .wn-hero p{color:rgba(255,255,255,.82)}
html[data-theme=dark] .wn-hint{color:rgba(255,255,255,.7)}
html[data-theme=dark] .wn-group{color:var(--accent-ink)}
html[data-theme=dark] .wn-item{border-bottom:1px solid var(--line)}
html[data-theme=dark] .wn-item:last-of-type{border-bottom:0}
html[data-theme=dark] .wn-item p{color:var(--fg)}
html[data-theme=dark] .wn-item ul{color:var(--fg)}
html[data-theme=dark] .wn-ex{border-left:3px solid #E8590C;background:var(--accent-soft);color:var(--accent-ink)}
html[data-theme=dark] .wn-ex b{color:var(--accent-ink)}
html[data-theme=dark] .wn-who{background:var(--surface-2);color:var(--fg-2)}
html[data-theme=dark] kbd.wn-k{border:1px solid var(--line-strong);background:var(--surface);color:var(--fg)}
html[data-theme=dark] .wn-pic{border:1px solid var(--line);background:var(--surface-2);color:var(--fg)}
html[data-theme=dark] .wn-field{border:1px solid var(--line-strong);background:var(--surface)}
html[data-theme=dark] .wn-field.on{border-color:#E8590C}
html[data-theme=dark] .wn-row{background:var(--surface);border:1px solid var(--line)}
html[data-theme=dark] .wn-row span:last-child{color:var(--fg-3)}
html[data-theme=dark] .wn-muted{color:var(--fg-3)}
html[data-theme=dark] .wn-chip{background:var(--surface);border:1px solid var(--line-strong)}
html[data-theme=dark] .wn-chip.on{background:#E8590C;border-color:#E8590C;color:#fff}
html[data-theme=dark] .wn-tab{border:1px solid var(--line);border-bottom:3px solid var(--line-strong);background:var(--surface-2)}
html[data-theme=dark] .wn-tab.on{background:var(--surface);border-bottom-color:#E8590C}
html[data-theme=dark] .wn-tab.blue{border-bottom-color:#1971C2}
html[data-theme=dark] .wn-plus{border:1px dashed var(--line-strong);background:var(--surface)}
html[data-theme=dark] .wn-btn{background:#E8590C;color:#fff}
html[data-theme=dark] .wn-btn.ghost{background:var(--surface);color:var(--fg);border:1px solid var(--line-strong)}
html[data-theme=dark] .wn-sheet{background:var(--surface);border:1px solid var(--line)}
html[data-theme=dark] .wn-sheet header{border-bottom:2px solid #222}
html[data-theme=dark] .wn-bar{background:#222;color:#fff}
html[data-theme=dark] .wn-line{background:var(--surface-3)}
html[data-theme=dark] .wn-mark{background:var(--accent-soft)}
html[data-theme=dark] .wn-foot{background:var(--surface-2);border-top:1px solid var(--line)}
html[data-theme=dark] .wn-foot p{color:var(--fg-2)}
html[data-theme=dark] .wn-close{border:0;background:#E8590C;color:#fff}
html[data-theme=dark] .wn-close:hover{background:#c94b08}
html[data-theme=dark] .wn-close:focus-visible{outline:3px solid var(--accent-line)}
html[data-theme=dark] .wn-chrome{background:#202124;color:#e8eaed}
html[data-theme=dark] .wn-chrome b{color:#fff}
html[data-theme=dark] .wn-chrome p{color:#e8eaed}
html[data-theme=dark] .wn-chrome span{background:#a8c7fa;color:var(--info)}
html[data-theme=dark] .wn-chrome::before,html[data-theme=dark] .wn-chrome::after{background:#e03131}
html[data-theme=dark] .wn-gone{color:var(--bad)}
/* call-companies.css */
html[data-theme=dark] .calls-toolbar .calls-company{border:1px solid var(--line,var(--line));background:var(--surface,var(--surface));color:var(--fg,var(--fg))}
html[data-theme=dark] .calls-toolbar .calls-company:focus-visible{outline:2px solid #f46b18}
/* inter-cars.css */
html[data-theme=dark] .ic-product-cell small[data-ic-choice]{color:var(--muted)}
html[data-theme=dark] .ic-dialog .report-table input,html[data-theme=dark] .ic-dialog .report-table select{border:1px solid var(--line);background:var(--surface)}
/* DARK-AUTO:END */
/* Handoff v4. Shared live CRM primitives; no demo data or role switching. */
:root{--orange:var(--accent);--ink:var(--fg);--muted:var(--fg-3)}
html{background:var(--bg);color-scheme:light}body{background:var(--bg);color:var(--fg);font:13px/1.45 var(--font)}
button,input,select,textarea{font:inherit}button,a{-webkit-tap-highlight-color:transparent}a{color:var(--info)}svg{width:18px;height:18px}
button:disabled{cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
input:not([type=checkbox]):not([type=radio]),select,textarea{background:var(--surface);border:1px solid var(--line-strong);color:var(--fg);border-radius:var(--r-sm);height:var(--ctl);min-height:var(--ctl);padding:5px 9px;font-size:13px;min-width:0;max-width:100%;box-shadow:none}
textarea{height:auto;min-height:72px;resize:vertical}input::placeholder,textarea::placeholder{color:var(--fg-3)}input[type=checkbox],input[type=radio]{accent-color:var(--accent);width:16px;height:16px;min-height:0;margin:0 6px 0 0;vertical-align:middle}
label{font-size:12px;font-weight:500;margin-bottom:5px;color:var(--fg-2)}.muted,.field-help,.optional{color:var(--fg-3);font-size:12px;line-height:1.45}.field-help{margin:5px 0 10px}.error{font-size:12px;min-height:0;color:var(--bad)}.error:empty{display:none}
.primary,.secondary,.balance-button{min-height:32px;border-radius:6px;padding:6px 12px;font-size:12px;font-weight:600;line-height:1.4;display:inline-flex;align-items:center;justify-content:center;gap:6px;text-decoration:none}
.primary{background:var(--accent-strong);color:#fff;border:1px solid var(--accent-strong)}.primary:hover{background:var(--accent-hover)}.secondary,.balance-button{background:var(--surface);border:1px solid var(--line-strong);color:var(--fg)}.secondary:hover,.balance-button:hover{background:var(--surface-3);border-color:var(--line-strong)}
h1,h2,h3,p{overflow-wrap:break-word}h1{font-size:20px;line-height:1.3;letter-spacing:-.3px}h2{font-size:16px;line-height:1.4}h3{font-size:14px}.page-heading{gap:12px;flex-wrap:wrap;margin:0 0 14px}.page-heading h1{font-size:20px;margin:0 0 3px;letter-spacing:-.3px}.page-heading p{font-size:12px}.page-heading .eyebrow{display:none}
.workspace{min-height:100dvh;background:var(--bg)}.workspace>.sidebar{width:208px;padding:0 8px 8px;background:var(--rail);border:0;height:100dvh;position:sticky;top:0;z-index:80;color:var(--rail-fg);overflow-y:auto;scrollbar-width:thin;flex:none;gap:0}
.sidebar .sidebar-brand{height:65px;padding:12px 4px 10px;display:flex;align-items:center}.sidebar .doc-original-logo{width:110px;height:42px;overflow:visible;margin:0}.sidebar .doc-original-logo img{width:110px;height:42px;object-fit:contain;max-width:100%;margin:0;transform:none;filter:none}.sidebar .sidebar-toggle{position:absolute;top:15px;right:8px;width:28px;height:28px;min-height:28px;padding:5px;margin:0;border:0;color:var(--rail-fg);background:transparent}.sidebar-toggle span{display:none}
.sidebar .nav-caption{margin:8px 10px 7px;font-size:10px;letter-spacing:1.5px;color:var(--rail-cap)}.sidebar .nav{border:0;border-radius:7px;padding:8px 10px;min-height:36px;margin:0 0 2px;color:var(--rail-fg);font-size:12px;font-weight:500;gap:9px;position:relative;background:transparent}.sidebar .nav:hover{background:var(--rail-2);color:#fff}.sidebar .nav.active{background:var(--rail-2);color:#fff}.sidebar .nav.active:before{content:'';position:absolute;left:-8px;top:8px;bottom:8px;width:3px;background:var(--accent);border-radius:0 3px 3px 0}.sidebar .nav svg{width:17px;height:17px}.sidebar .sidebar-bottom{padding-top:8px}.sidebar .version{display:none}.sidebar .profile{border-top:1px solid #ffffff16;gap:8px;padding:10px 5px 0;color:#fff}.sidebar .profile strong{font-size:12px}.sidebar .profile small{font-size:10px;color:var(--rail-fg)}.sidebar .avatar{width:30px;height:30px;border-radius:50%;background:var(--accent-strong);font-size:11px;color:#fff}.sidebar .exit{color:var(--rail-fg);padding:4px}.sidebar #my-pay .my-pay-card{margin:4px 0 10px;background:var(--rail-2);border:0;border-radius:8px}.sidebar .my-pay-card summary{padding:9px 8px}.sidebar .my-pay-card summary strong{font-size:14px}
.workspace.sidebar-collapsed>.sidebar{width:60px;padding:0 7px 8px}.sidebar-collapsed .sidebar .sidebar-brand{height:58px;padding:12px 0;visibility:hidden}.sidebar-collapsed .sidebar .sidebar-toggle{right:15px}.sidebar-collapsed .sidebar .nav{font-size:0;justify-content:center;padding:9px;gap:0}.sidebar-collapsed .sidebar .nav svg{width:20px;height:20px}.sidebar-collapsed .sidebar .nav-caption{display:none}.sidebar-collapsed .sidebar .profile>div,.sidebar-collapsed .sidebar .profile .exit{display:none}.sidebar-collapsed .sidebar .profile{justify-content:center;padding:10px 0 0}.sidebar-collapsed .sidebar .nav.active:before{left:-7px}
.workspace-main{min-width:0;flex:1}.topbar{position:sticky;top:0;z-index:70;height:46px;min-height:46px;padding:0 16px;gap:10px;background:var(--surface);border-bottom:1px solid var(--line);font-size:12px;font-weight:500;justify-content:flex-start}.topbar .date{margin-left:auto;white-space:nowrap;font-size:11px;color:var(--fg-3)}.topbar .crumb{margin-left:4px;color:var(--fg-2)}.topbar button{min-height:28px;height:28px;font-size:11px;margin:0}.topbar .sound-toggle{background:var(--surface);border:1px solid var(--line);color:var(--fg-2);border-radius:6px}.content{max-width:none;width:100%;margin:0;padding:16px}
.history-panel,.safe-panel,.settings-card,.wa-panel,.download-grid button,.backup-card,.master-card,.master-summary{background:var(--surface);border:1px solid var(--line);border-radius:8px;box-shadow:none;color:var(--fg)}.history-heading{padding:10px 14px;gap:8px}.history-heading h2{font-size:14px;margin:0}.report-scroll,.calls-scroll{max-width:100%;overflow:auto;scrollbar-width:thin}.report-table,.calls-table{width:100%;border-collapse:collapse;font-size:12px;background:var(--surface);color:var(--fg)}.report-table th,.calls-table th,table th{background:var(--surface-2);color:var(--fg-3);font-size:11px;font-weight:600;letter-spacing:.2px;text-align:left;padding:8px 10px;border-bottom:1px solid var(--line)}.report-table td,.calls-table td,table td{padding:8px 10px;font-size:12px;line-height:1.35;border-bottom:1px solid var(--line);color:var(--fg);vertical-align:middle}.report-table tbody tr:hover,.calls-table tbody tr:hover{background:var(--surface-2)}.report-table td small,.calls-table td small{color:var(--fg-3);font-size:11px}.report-table td .secondary{min-height:26px;font-size:11px;padding:3px 8px}.table-tools{gap:8px;padding:8px 12px;background:var(--surface);border-bottom:1px solid var(--line)}.table-tools input{height:28px;min-height:28px;font-size:12px;max-width:220px}.table-tools button{min-height:28px;font-size:11px;padding:4px 9px}.table-tools-count{color:var(--fg-3);font-size:11px}.sortable-heading:hover{color:var(--accent-ink);background:var(--accent-soft)}
.dialog-top{margin-bottom:12px}.dialog-top>.cash-icon,.dialog-top>.currency-symbol{display:none}.close{background:var(--surface-3);border:0;color:var(--fg-2);width:28px;height:28px;min-height:28px;border-radius:6px;font-size:22px;line-height:1;display:grid;place-items:center;margin-left:auto}.close:hover{color:var(--bad)}dialog{background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-pop);padding:20px;color:var(--fg);width:calc(100% - 32px);max-width:640px;max-height:calc(100dvh - 32px);overflow:auto;scrollbar-width:thin}dialog::backdrop{background:var(--overlay);backdrop-filter:blur(2px)}dialog h2{font-size:18px;margin:0 0 6px}dialog .cash-form,dialog form{margin-top:14px}dialog :is(input,select,textarea){margin:4px 0 8px}dialog .cash-form>.primary{margin-top:10px}.notice,.wa-data-note{border-radius:8px;padding:10px 14px;margin-bottom:12px;background:var(--warn-soft);color:var(--warn);border-color:var(--warn-line)}.notice p{color:inherit;font-size:12px}
.doc-v4-search{flex:1;min-width:150px;max-width:560px;height:30px;display:flex;align-items:center;gap:6px;text-align:left;padding:4px 9px;border:1px solid var(--line-strong);border-radius:6px;background:var(--surface-2);color:var(--fg-3);margin-left:12px!important}.doc-v4-search span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.doc-v4-search kbd{font:10px var(--font);border:1px solid var(--line);padding:1px 4px;border-radius:3px}.doc-v4-theme{width:28px;background:var(--surface);color:var(--fg-2);border:1px solid var(--line);border-radius:6px}.doc-v4-search-dialog{max-width:720px}.doc-v4-search-results{max-height:60vh;overflow:auto}.doc-v4-search-results h3{margin:16px 0 7px;color:var(--fg-3);font-size:11px;text-transform:uppercase;letter-spacing:1px}.doc-v4-result{display:flex;justify-content:space-between;align-items:center;gap:12px;background:var(--surface);border:0;border-bottom:1px solid var(--line);padding:10px 8px;width:100%;text-align:left;border-radius:0;color:var(--fg)}.doc-v4-result:hover{background:var(--surface-2)}.doc-v4-result strong,.doc-v4-result small{display:block;overflow-wrap:anywhere}.doc-v4-result small{color:var(--fg-3);font-size:11px}.doc-v4-result>span{min-width:0}.doc-v4-result svg{color:var(--fg-3)}.doc-v4-search-form{display:flex;gap:8px}.doc-v4-search-form input{flex:1}.doc-v4-empty{padding:28px 12px;color:var(--fg-3);text-align:center}
/* Busy indicator is the DOC mark, never a demo logo/text or an unrelated spinner. */
#doc-progress{left:auto;right:18px;top:54px;width:34px;height:34px;background:var(--surface);border:1px solid var(--line);border-radius:50%;box-shadow:var(--shadow);z-index:30000}#doc-progress:after{width:24px;height:24px;margin:4px;background:url('/assets/doc-v4-mark.png') center/contain no-repeat;box-shadow:none;animation:doc-spin 1.2s linear infinite}.page-loading:after,.boot:after{border:0;width:40px;height:40px;background:url('/assets/doc-v4-mark.png') center/contain no-repeat;animation:doc-spin 1.2s linear infinite}.boot{display:grid;place-content:center;min-height:100dvh;font-size:0}.page-loading{font-size:0}.page-loading>*{visibility:hidden}
/* Restore the two-panel welcome screen using the shared v4 palette and type. */
.login-shell{display:grid;grid-template-columns:minmax(0,48fr) minmax(0,52fr);background:var(--bg);min-height:100dvh}
.login-shell .brand-panel{display:flex;min-height:100dvh;background:var(--rail);color:var(--rail-fg-strong);padding:clamp(28px,4vw,64px);border-right:1px solid var(--line)}
.login-shell .brand-top{font-size:32px;letter-spacing:-1px;font-weight:750}.login-shell .brand-top span{color:var(--rail-fg);border-color:var(--rail-cap);font-size:11px;letter-spacing:3px}
.login-shell .brand-copy{display:block;margin:auto 0;padding:48px 0}.login-shell .brand-copy .eyebrow{color:var(--rail-fg);font-size:10px;letter-spacing:1.8px}
.login-shell .brand-copy h1{color:var(--rail-fg-strong);font-size:clamp(44px,5.3vw,80px);line-height:1.08;font-weight:650;letter-spacing:-2.5px;margin:26px 0}.login-shell .brand-copy h1 span{color:var(--accent)}
.login-shell .brand-copy p{color:var(--rail-fg);font-size:16px;line-height:1.65}.login-shell .brand-bottom{display:flex;color:var(--rail-cap);font-size:11px}
.login-shell .login-panel{max-width:none;width:100%;min-width:0;min-height:100dvh;margin:0;padding:28px clamp(24px,4vw,64px);gap:24px}
.login-shell .login-box{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:36px;max-width:420px;margin:auto;box-shadow:var(--shadow);text-align:left}
.login-shell .login-logo{width:170px;height:66px;margin:0 0 26px;background:transparent}.login-shell .login-logo img{width:170px;height:66px;object-fit:contain;transform:none}
.login-shell .local-tag{display:flex;font-size:10px;color:var(--fg-3)}.login-shell h2{font-size:24px;line-height:1.3;letter-spacing:-.6px;margin:0 0 8px;text-align:left}.login-shell .muted{font-size:13px}
.login-shell input{height:42px;min-height:42px;padding:9px 12px}.login-shell .password-wrap input{padding-right:90px}.login-shell .password-wrap button{top:0;bottom:0;right:10px;min-height:42px;padding:0 4px;color:var(--fg-2)}
.login-shell form{margin-top:26px}.login-shell #login{margin-bottom:18px}.login-shell .login-submit{min-height:42px;margin-top:18px;font-size:13px}.login-shell .login-note{margin-top:22px;color:var(--fg-3);font-size:11px}.login-shell footer{position:static;padding:0;text-align:center;font-size:11px;color:var(--fg-3)}
@media(max-width:700px){.login-shell{display:flex;flex-direction:column}.login-shell .brand-panel{min-height:0;padding:22px 24px;border-right:0}.login-shell .brand-top{font-size:25px}.login-shell .brand-copy{padding:22px 0 0;margin:0}.login-shell .brand-copy h1{font-size:clamp(27px,6vw,38px);letter-spacing:-1px;line-height:1.18;margin:0}.login-shell .brand-copy h1 br{display:none}.login-shell .brand-copy .eyebrow,.login-shell .brand-copy p,.login-shell .brand-bottom{display:none}.login-shell .login-panel{min-height:0;flex:1;padding:24px 20px;gap:24px}.login-shell .local-tag{display:none}.login-shell .login-box{padding:26px;max-width:420px}.login-shell .login-logo{width:150px;height:58px;margin-bottom:20px}.login-shell h2{font-size:22px}.login-shell footer{padding-top:4px}}

.calls-tabs,.settings-tabs{display:flex;flex-wrap:wrap;gap:4px;padding:4px;background:var(--surface-3);border-radius:7px}.calls-tabs button,.settings-tabs button{border:0;border-radius:5px;background:transparent;color:var(--fg-2);padding:6px 10px;font-size:12px}.calls-tabs button.active,.settings-tabs button.active{background:var(--surface);color:var(--fg);box-shadow:var(--shadow)}.calls-toolbar{gap:8px;padding:12px;background:var(--surface)}.calls-toolbar :is(input,select){height:32px;min-height:32px}.call-stat-totals>div{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:12px}.call-stat-totals strong{font-size:22px}.calls-table audio{max-width:230px}.settings-layout{gap:16px}.settings-card{padding:16px}.settings-card h2{margin-top:0}.guide-frame{border-radius:8px;border-color:var(--line)}
.doc-v4-nav-group{margin:14px 10px 5px;font-size:9px;letter-spacing:1.3px;color:var(--rail-cap);text-transform:uppercase}.sidebar-collapsed .doc-v4-nav-group{display:none}.doc-v4-mobile-menu{display:none}
@media(max-width:1100px){.topbar .date{display:none}.topbar .doc-v4-search{margin-left:auto!important}.content{padding:12px}.page-heading{gap:8px}.topbar{padding:0 12px}.topbar .sound-toggle{font-size:0;width:28px;padding:0}.topbar .sound-toggle:before{content:'♪';font-size:15px}}
@media(max-width:700px){.workspace{display:block}.workspace>.sidebar,.workspace.sidebar-collapsed>.sidebar{position:fixed;left:0;top:46px;width:208px;height:calc(100dvh - 46px);transform:translateX(-100%);transition:transform .15s;z-index:100;padding:0 8px 8px}.workspace.doc-mobile-nav-open>.sidebar{transform:translateX(0);box-shadow:10px 0 30px #0003}.workspace-main{width:100%;margin:0}.topbar{position:sticky;top:0;width:100%;height:46px;padding:0 8px;gap:6px;font-size:11px}.topbar .crumb{display:none}.doc-v4-mobile-menu{display:inline-grid;place-items:center;min-width:28px;width:28px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--fg)}.doc-v4-search{min-width:28px;max-width:44px;width:28px;padding:5px;flex:none;margin-left:auto!important}.doc-v4-search span,.doc-v4-search kbd{display:none}.topbar .date{display:none}.content{padding:10px}.page-heading h1{font-size:18px}dialog{width:calc(100% - 16px);max-width:calc(100% - 16px);max-height:calc(100dvh - 16px);padding:16px}.primary,.secondary{min-height:34px}.table-tools{padding:8px;gap:6px}.table-tools-count{font-size:10px}.table-tools input{max-width:none;min-width:100px;flex:1}.report-table,.calls-table{min-width:620px}.page-heading>p{flex-basis:100%}.sidebar .sidebar-toggle{display:none}.sidebar-collapsed .sidebar .sidebar-brand{visibility:visible;height:65px}.sidebar-collapsed .sidebar .nav{font-size:12px;justify-content:flex-start;gap:9px}.sidebar-collapsed .sidebar .nav-caption,.sidebar-collapsed .doc-v4-nav-group{display:block}.sidebar-collapsed .sidebar .profile>div,.sidebar-collapsed .sidebar .profile .exit{display:block}.sidebar-collapsed .sidebar .profile{justify-content:flex-start}.doc-v4-search-dialog .doc-v4-search-form{flex-wrap:wrap}.doc-v4-search-dialog .doc-v4-search-form input{width:100%;min-width:160px}}
@media(prefers-reduced-motion:reduce){#doc-progress:after,.page-loading:after,.boot:after{animation:none}.workspace>.sidebar{transition:none}}

/* Theme coverage for legacy shared controls and panels. */
html[data-theme=dark]{color-scheme:dark}
html[data-theme=dark] .workspace .topbar,html[data-theme=dark] .workspace .topbar>span,html[data-theme=dark] .workspace .topbar .notification-bell{background:var(--surface);color:var(--fg-2);border-color:var(--line)}
html[data-theme=dark] :is(input:not([type=checkbox]):not([type=radio]),select,textarea){background-color:var(--surface)!important;color:var(--fg)!important;border-color:var(--line-strong)!important}
html[data-theme=dark] :is(.secondary,.balance-button,.table-tools,.history-heading,.safe-card,.settings-card,.settings-layout,.download-grid button,.backup-card,.call-card,.employee-card,.master-card,.master-summary){background-color:var(--surface);color:var(--fg);border-color:var(--line)}
html[data-theme=dark] :is(.report-table,.calls-table) :is(th,td){color:var(--fg);border-color:var(--line)}
html[data-theme=dark] :is(.report-table,.calls-table) th{background:var(--surface-2);color:var(--fg-2)}
html[data-theme=dark] :is(.secondary,.balance-button):disabled{color:var(--fg-3)}
html[data-theme=dark] :is(.settings-tabs,.calls-tabs){background:var(--surface-3)}
html[data-theme=dark] :is(.table-tools-count,.muted,.small-label,.field-help){color:var(--fg-3)}
.table-tools{display:flex;align-items:center;flex-wrap:wrap}.table-tools input{width:auto;flex:0 1 220px}.table-tools-count{margin-right:auto}
@media(max-width:700px){.workspace:has(.crm-deal-record):not(.sidebar-collapsed)>.sidebar{position:fixed;left:0;top:46px;width:208px;height:calc(100dvh - 46px);transform:translateX(-100%);padding:0 8px 8px}.workspace.doc-mobile-nav-open:has(.crm-deal-record):not(.sidebar-collapsed)>.sidebar{transform:translateX(0)}.workspace:has(.crm-deal-record)>.workspace-main{margin-left:0;width:100%}}

@media(max-width:700px){.workspace>.sidebar{visibility:hidden;pointer-events:none}.workspace.doc-mobile-nav-open>.sidebar{visibility:visible;pointer-events:auto}}
/* Avoid a pale-on-pale transition frame when switching the theme. */
.orders-compact .report-table .order-open-row>td{transition:none}

/* Reserve the brand/header slot even when the rail is collapsed. */
.workspace.sidebar-collapsed>.sidebar .sidebar-brand{display:flex!important;flex:none;height:58px;min-height:58px;visibility:hidden;padding:0}
.workspace>.sidebar .sidebar-brand{flex-shrink:0}
.workspace>.sidebar .sidebar-toggle{z-index:2;display:grid;place-items:center;width:32px;height:32px;min-height:32px;padding:6px;top:12px;background:var(--rail);border-radius:7px}
.workspace>.sidebar .sidebar-toggle:hover{background:var(--rail-2);color:#fff}
.workspace.sidebar-collapsed>.sidebar .sidebar-toggle{right:18px}
.workspace>.sidebar .sidebar-toggle svg{width:20px;height:20px;pointer-events:none}
@media(max-width:700px){
 .workspace>.sidebar .sidebar-toggle{display:none}
 .workspace.sidebar-collapsed>.sidebar .sidebar-brand{visibility:visible;height:65px;min-height:65px;padding:12px 4px 10px}
}

.calls-toolbar .calls-company{width:180px;flex:0 0 180px;margin:0;border:1px solid var(--line,#dce0e7);border-radius:8px;background:var(--surface,#fff);color:var(--fg,#292c30);font:inherit;font-size:13px;font-weight:600;padding:0 28px 0 12px;height:38px;min-height:38px;cursor:pointer}.calls-toolbar .calls-company:focus-visible{outline:2px solid #f46b18;outline-offset:2px}@media(max-width:900px){.calls-toolbar{flex-wrap:wrap}.calls-toolbar .calls-tabs{order:2;flex-basis:100%}.calls-toolbar .calls-header-actions{margin-left:auto}}

/* Call recording player: one bar at the bottom of the window. */
.call-player-bar{position:fixed;left:0;right:0;bottom:0;z-index:1200;display:grid;grid-template-columns:minmax(140px,320px) auto minmax(180px,1fr) auto auto;align-items:center;gap:6px 14px;padding:10px 18px;background:var(--surface,#fff);border-top:1px solid var(--line-strong,#cfd4da);box-shadow:0 -6px 24px rgba(20,24,30,.12)}
.call-player-bar audio{display:none}
.call-player-bar .cpb-info{min-width:0;display:flex;flex-direction:column;gap:2px}.call-player-bar .cpb-info strong{font-size:13px}.call-player-bar .cpb-info small{font-size:12px;color:var(--fg-2,#5d626a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.call-player-bar .cpb-buttons{display:flex;align-items:center;gap:6px}.call-player-bar button{min-height:36px;padding:6px 10px;font-size:13px;white-space:nowrap}.call-player-bar [data-cpb-toggle]{width:44px;height:44px;border-radius:50%;padding:0;font-size:15px}.call-player-bar [data-cpb-speed]{min-width:54px}.call-player-bar .cpb-close{width:36px;padding:0;font-size:18px;line-height:1}
.call-player-bar .cpb-line{display:flex;align-items:center;gap:10px;min-width:0;font-size:12px;font-variant-numeric:tabular-nums;color:var(--fg-2,#5d626a)}
.call-player-bar [data-cpb-seek]{flex:1;min-width:0;height:28px;margin:0;padding:0;border:0;background:none;accent-color:var(--accent,#f46b18);cursor:pointer}
.call-player-bar{grid-template-columns:minmax(140px,300px) auto minmax(180px,1fr) auto auto auto}
.call-player-bar .cpb-track{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center}.call-player-bar .cpb-track canvas{width:100%;height:54px;display:block;cursor:pointer}.call-player-bar .cpb-track canvas[hidden]{display:none}
.call-player-bar.has-wave [data-cpb-seek]{height:14px}
.call-player-bar .cpb-download{display:inline-flex;align-items:center;min-height:36px;padding:6px 10px;font-size:13px;white-space:nowrap;text-decoration:none;border:1px solid var(--line-strong,#cfd4da);border-radius:6px;color:var(--fg,#262726);background:var(--surface,#fff)}.call-player-bar .cpb-download[hidden]{display:none}
.call-player-bar .cpb-legend{display:none;grid-column:3;font-size:11px;color:var(--fg-2,#5d626a)}.call-player-bar.two-sides .cpb-legend{display:block}.call-player-bar .cpb-legend i{display:inline-block;width:9px;height:9px;border-radius:2px;margin:0 5px 0 0;vertical-align:-1px}.call-player-bar .cpb-legend i.cpb-side-a{background:#4b5563}.call-player-bar .cpb-legend i.cpb-side-b{background:#2f6fe4;margin-left:12px}
.call-player-bar [data-cpb-error]{grid-column:1/-1}.call-player-bar [data-cpb-error]:empty{display:none}
.has-call-player #content{padding-bottom:96px}
@media(max-width:760px){.call-player-bar{grid-template-columns:1fr auto auto;padding:8px 12px}.call-player-bar .cpb-info{grid-column:1/-1}.call-player-bar .cpb-line{grid-column:1/-1;grid-row:3}.call-player-bar .cpb-buttons{grid-column:1}.call-player-bar .cpb-legend{grid-column:1/-1}.has-call-player #content{padding-bottom:210px}}
/* Round play button in call rows. */
button.call-play{display:inline-flex;font-size:0;line-height:0;align-items:center;justify-content:center;width:36px;height:36px;min-height:36px;padding:0;margin-right:6px;vertical-align:middle;border-radius:50%;border:1px solid var(--accent,#f46b18);background:var(--accent-soft,#fff1e8);color:var(--accent-ink,#c2500a);cursor:pointer;transition:background .15s,color .15s,transform .1s,box-shadow .15s}
.call-play svg{width:18px;height:18px;fill:currentColor;display:block}.call-play .call-play-stop{display:none}.call-play .call-play-go{margin-left:1px}
.call-play:hover{background:var(--accent,#f46b18);color:#fff;box-shadow:0 2px 8px rgba(244,107,24,.35)}.call-play:active{transform:scale(.94)}
.call-play:focus-visible{outline:2px solid var(--accent,#f46b18);outline-offset:2px}
.call-play.is-current{background:var(--accent,#f46b18);color:#fff;box-shadow:0 0 0 3px rgba(244,107,24,.2)}
.call-play.is-playing .call-play-go{display:none}.call-play.is-playing .call-play-stop{display:block}
.call-play.is-loading{opacity:.6;cursor:progress}
@media(prefers-reduced-motion:reduce){.call-play{transition:none}}

/* === Правки вида 13.11.2026 (docs/pravki-2026-11-13.md, пункты 1–9) === */
/* 1. Звонки: кнопка записи и «Расшифровка» одной высоты на одной линии. */
#content .call-play{margin:0 8px 0 0;vertical-align:middle}
#content .call-play+.transcript-status{display:inline-flex;align-items:center;height:36px;min-height:36px;padding:0 14px;margin:0;vertical-align:middle;line-height:1}
/* 2. Календарь: все элементы панели одной высоты в один ряд. */
#content .schedule-toolbar:not(.inbox-page-toolbar){display:flex;align-items:center;flex-wrap:wrap;gap:8px}
#content .schedule-toolbar:not(.inbox-page-toolbar)>h1{margin:0 6px 0 0;line-height:34px}
#content .schedule-toolbar:not(.inbox-page-toolbar)>:is(select,input,button),#content .schedule-toolbar .v4-calendar-modes{box-sizing:border-box;height:34px;min-height:34px;margin:0}
#content .schedule-toolbar .v4-calendar-modes{display:inline-flex;align-items:stretch}
#content .schedule-toolbar .v4-calendar-modes button{height:auto;min-height:0}
#content .schedule-toolbar #sch-add{margin-left:auto}
/* 3. Заказ-наряды: один блок фильтров — статус выбирается вкладками, поиск один. */
#content #order-filter-form>label:has(>select[name=status]){display:none}
#content:has(#order-filter-form) .history-panel .table-tools{display:none}
#content #order-filter-form{align-items:flex-end;gap:10px}
#content #order-filter-form>label{display:flex;flex-direction:column;gap:5px;margin:0;font-size:12px!important;font-weight:500;line-height:1.45;color:var(--fg-2)}
#content #order-filter-form>label>:is(select,input),#content #order-filter-form>button{box-sizing:border-box;height:34px;min-height:34px;margin:0}
#content #order-filter-form .order-shops{gap:5px;font-size:12px;min-width:160px}
#content #order-filter-form .order-shops>span{font-size:12px;font-weight:500;line-height:1.45;color:var(--fg-2)}
#content #order-filter-form .order-shops details>summary{display:flex;align-items:center;height:34px;padding:0 28px 0 10px;border-color:var(--line-strong);border-radius:var(--r-sm);font-size:13px;line-height:1}
#content #order-filter-form .order-shops details>summary::after{top:auto}
/* 4. Склад: один поиск, счётчики только во вкладках, выбор склада рядом с заголовком. */
#content:has(#stock-warehouse) .v4-stock-summary{display:none}
#content #stock-list>.table-tools{display:none}
#content .page-heading:has(#stock-warehouse)>div:first-child{display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px}
#content .page-heading:has(#stock-warehouse) h1{margin:0}
#content .page-heading:has(#stock-warehouse) p.muted{order:3;margin:0}
#content .stock-warehouse-label{display:flex;align-items:center;gap:8px;margin:0}
#content .stock-warehouse-label select{height:34px;min-height:34px}
#content .v4-register-controls:has(#inventory-search){display:flex;align-items:center;gap:12px}
#content .v4-register-controls #inventory-search{flex:1 1 280px;max-width:460px;height:34px;min-height:34px;margin-left:auto}
/* 6. Чаты: кнопка «Задачи» убрана (раздел «Задачи» есть в меню), шапка тоньше. */
#content .inbox-page-toolbar [data-chat-task-queue]{display:none}
#content .inbox-page-toolbar{display:flex;align-items:center;gap:12px;min-height:0;margin:0 0 6px;padding:0}
#content .inbox-page-toolbar h1{margin:0;font-size:16px;line-height:24px}
/* 7. Открытый чат: клиент, ИИ-помощник и действия в одной панели. */
#content .inbox-dialog-head{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px}
#content .inbox-dialog-head .chat-head-client{margin-right:auto}
#content .inbox-dialog-head .chat-head-client{flex:0 1 auto;min-width:0}
#content .inbox-dialog-head .chat-head-agent{flex:1 1 100%;min-width:0;margin:0;padding:0;border:0;order:3}
@media(min-width:1700px){#content .inbox-dialog-head{flex-wrap:nowrap}#content .inbox-dialog-head .chat-head-agent{flex:0 1 auto;order:0;margin-right:auto}#content .inbox-dialog-head .chat-head-client{flex:0 1 auto;margin-right:16px}}
#content .inbox-dialog-head .ai-toolbar{display:flex;align-items:center;flex-wrap:nowrap;gap:8px;margin:0;padding:0;border:0;background:none}
#content .inbox-dialog-head .ai-toolbar-actions{display:flex;align-items:center;flex-wrap:nowrap;gap:6px}
#content .inbox-dialog-head :is(.ai-toolbar-actions button,.ai-mode-switch){height:30px;min-height:30px;padding-block:0;font-size:12px;white-space:nowrap}
#content .inbox-dialog-head>button.secondary{height:30px;min-height:30px;padding:0 10px;font-size:12px;white-space:nowrap}
#content .inbox-list label.field-help{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:8px;margin:6px 8px}
#content .inbox-list label.field-help select{width:100%;margin:0}
/* 9. Новая запись: без кнопки «Назад», заголовок по центру, окно уже. */
dialog.booking-board-dialog{width:min(1180px,96vw)!important;max-width:96vw!important}
dialog.booking-board-dialog .dialog-back{display:none}
dialog.booking-board-dialog .dialog-top{position:absolute;top:10px;right:12px;margin:0}
dialog.booking-board-dialog>h2{margin:0;text-align:center}
dialog.booking-board-dialog>h2+p.muted{margin:2px 0 10px;text-align:center}
/* 5. Сделки: шапка в один ряд, поиск тянется, дубль кнопки «Поиск дублей» убран (остался в меню «⋯»). */
#content .deal-search-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
#content .deal-search-toolbar>h1{margin:0 4px 0 0;font-size:22px;line-height:34px}
#content .deal-search-toolbar>button[data-duplicates]{display:none}
#content .deal-search-toolbar>:is(select,button),#content .deal-search-toolbar .deal-view-switch,#content .deal-search-toolbar .dup-board-menu>summary,#content .deal-search-toolbar .deal-filters>:is(input,button){box-sizing:border-box;height:34px;min-height:34px;margin:0}
#content .deal-search-toolbar .deal-view-switch{display:inline-flex;align-items:stretch}
#content .deal-search-toolbar .deal-view-switch button{height:auto;min-height:0}
#content .deal-search-toolbar .deal-filters{display:flex;align-items:center;flex:1 1 220px;min-width:200px;gap:6px;margin:0;order:3}
#content .deal-search-toolbar .deal-filters>button[type=submit]{display:none}
@media(max-width:1500px){#content .deal-search-toolbar .deal-search-total{display:none}}
#content .deal-search-toolbar .deal-filters>input[name=q]{flex:1 1 auto;min-width:0;width:auto}
#content .deal-search-toolbar .deal-search-total{order:4;white-space:nowrap}
#content .deal-search-toolbar>[data-loss-view]{order:5}
#content .deal-search-toolbar>[data-pipeline-edit]{order:6}
#content .deal-search-toolbar>.dup-board-menu{order:7}
#content .deal-search-toolbar>[data-new]{order:8;margin-left:0}
/* 8. Карточка сделки: ИИ-помощник, задачи и выбор истории в одной панели; левый блок аккуратнее. */
#content .crm-timeline-head{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:6px 12px}
#content .crm-timeline-head .crm-conversation-tools{display:flex;align-items:center;justify-content:flex-start;flex:1 1 auto;flex-wrap:wrap;gap:6px 12px;margin:0;min-width:0}
#content .crm-timeline-head [data-deal-task-tools]{margin-left:auto}
#content .crm-timeline-head .crm-conversation-caption{display:flex;align-items:center;gap:8px;margin:0;padding:0;border:0}
#content .crm-timeline-head .crm-conversation-caption strong{display:none}
#content .crm-timeline-head :is(.ai-toolbar-actions button,.ai-mode-switch,.deal-task-tools button,.crm-conversation-caption select){height:30px;min-height:30px;padding-block:0;font-size:12px;white-space:nowrap}
#content .crm-record-card .deal-form{display:flex;flex-direction:column;gap:10px}
#content .crm-record-card .deal-vehicle-editor>label{font-size:12px;font-weight:600;color:var(--fg-2)}
#content .crm-record-card .deal-notes{border:1px solid var(--line);border-radius:var(--r-sm);padding:6px 10px;background:var(--surface-2)}
#content .crm-record-card .deal-notes>summary{cursor:pointer;font-size:12px;font-weight:600;color:var(--fg-2)}
#content .crm-record-card .deal-form>button.primary{align-self:flex-end;width:auto;height:32px;min-height:32px;padding:0 16px;font-size:13px}
#content .crm-record-card>[data-deal-sms-journal]{align-self:flex-start;height:30px;min-height:30px;margin:8px 12px 12px;padding:0 12px;font-size:12px}
#content .crm-record-card>[data-deal-sms-journal]::after{content:" · журнал"}
/* Календари: стрелки «назад/вперёд» — аккуратные квадратные кнопки с нарисованным шевроном. */
#content #sch-prev,#content #sch-next,dialog.booking-board-dialog :is(button[data-month],button[data-day-step]){display:inline-flex;align-items:center;justify-content:center;flex:none;box-sizing:border-box;width:34px;min-width:34px;height:34px!important;min-height:34px!important;padding:0!important;font-size:0!important;line-height:0;border:1px solid var(--line-strong);border-radius:var(--r-sm);background:var(--surface);box-shadow:none;cursor:pointer}
#content #sch-prev::before,#content #sch-next::before,dialog.booking-board-dialog :is(button[data-month],button[data-day-step])::before{content:"";display:block;flex:none;box-sizing:content-box;width:7px!important;height:7px!important;border:solid var(--fg-2);border-width:0 0 2px 2px;transform:rotate(45deg);margin-left:3px}
#content #sch-next::before,dialog.booking-board-dialog :is(button[data-month="1"],button[data-day-step="1"])::before{transform:rotate(-135deg);margin-left:-3px}
#content #sch-prev:hover,#content #sch-next:hover,dialog.booking-board-dialog :is(button[data-month],button[data-day-step]):hover{background:var(--accent-soft);border-color:var(--accent-line)}
#content #sch-prev:hover::before,#content #sch-next:hover::before,dialog.booking-board-dialog :is(button[data-month],button[data-day-step]):hover::before{border-color:var(--accent-ink)}
#content .schedule-toolbar #sch-today{height:34px!important;min-height:34px!important}
#content .schedule-toolbar #sch-prev{border-radius:var(--r-sm) 0 0 var(--r-sm)!important;margin-right:-9px}
#content .schedule-toolbar #sch-next{border-radius:0 var(--r-sm) var(--r-sm) 0!important;margin-left:-9px}
#content .schedule-toolbar #sch-date{position:relative;border-radius:0}
#content .schedule-toolbar #sch-date:focus-visible{z-index:1}
dialog.booking-board-dialog :is(button[data-month],button[data-day-step]){width:30px;min-width:30px;height:30px!important;min-height:30px!important}
dialog.booking-board-dialog :is(.booking-month-head,.booking-day-head){display:flex;align-items:center;gap:6px}
dialog.booking-board-dialog :is(.booking-month-head,.booking-day-head)>strong{min-width:118px;text-align:center}
dialog.booking-board-dialog .booking-month-head>strong::first-letter{text-transform:uppercase}
dialog.booking-board-dialog .booking-month-head>button[data-quick="0"]{margin-left:auto}
dialog.booking-board-dialog .booking-month-head>button[data-quick]{height:30px;min-height:30px;padding:0 12px}
dialog.booking-board-dialog .booking-day-head>span{margin-left:auto}
@media(max-width:700px){#content .schedule-toolbar:not(.inbox-page-toolbar)>h1{flex:1 1 100%}#content .schedule-toolbar #sch-today{margin-right:35%}#content .schedule-toolbar #sch-date{flex:1 1 calc(100% - 80px)}}

/* === Стрелки выпадающих списков: единый шеврон по центру высоты, текст не наезжает === */
select:not([multiple]):not([size]){-webkit-appearance:none!important;appearance:none!important;background-image:linear-gradient(45deg,transparent 42%,currentColor 42%,currentColor 58%,transparent 58%),linear-gradient(-45deg,transparent 42%,currentColor 42%,currentColor 58%,transparent 58%)!important;background-repeat:no-repeat!important;background-size:6px 6px!important;background-position:right 16px top 50%,right 11px top 50%!important;padding-right:32px!important;text-overflow:ellipsis}
select:not([multiple]):not([size]):disabled{background-image:linear-gradient(45deg,transparent 42%,#a8a29e 42%,#a8a29e 58%,transparent 58%),linear-gradient(-45deg,transparent 42%,#a8a29e 42%,#a8a29e 58%,transparent 58%)!important}
#content .order-shops details>summary::after{content:""!important;top:50%!important;right:11px!important;width:11px;height:6px;margin-top:-3px;color:inherit;background:linear-gradient(45deg,transparent 42%,currentColor 42%,currentColor 58%,transparent 58%) left center/6px 6px no-repeat,linear-gradient(-45deg,transparent 42%,currentColor 42%,currentColor 58%,transparent 58%) right center/6px 6px no-repeat}

/* === Задачи 14.11.2026 (docs/pravki-2026-11-13.md, пункты 13–22) === */
:is(#content,dialog) .crm-task{gap:4px;padding:9px 10px}
:is(#content,dialog) .crm-task>header{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;font-size:11px;color:var(--fg-3)}
:is(#content,dialog) .task-type{font-weight:700;color:var(--fg-1,inherit);white-space:nowrap}
:is(#content,dialog) .task-due{font-weight:600;white-space:nowrap}
:is(#content,dialog) :is(.task-overdue) .task-due{color:var(--bad,#c62828)}
:is(#content,dialog) :is(.task-today) .task-due{color:var(--ok,#1f7a3d)}
:is(#content,dialog) .task-people{margin-left:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
:is(#content,dialog) .crm-task>strong{font-size:13px;line-height:1.3;overflow-wrap:anywhere}
:is(#content,dialog) .crm-task>strong a{color:inherit;text-decoration:none}
:is(#content,dialog) .crm-task>strong a:hover{text-decoration:underline}
:is(#content,dialog) .crm-task .task-where{justify-self:start;font-size:11px;color:var(--fg-3);text-decoration:none;padding:0;min-height:0;background:none;border:0;text-align:left}
:is(#content,dialog) .crm-task .task-where:hover{color:var(--accent,#c2540a)}
:is(#content,dialog) .crm-task .task-actions{display:flex;flex-wrap:nowrap;align-items:center;gap:6px;margin-top:2px}
:is(#content,dialog) .crm-task .task-actions input{flex:1 1 120px;min-width:0;height:28px;min-height:28px;padding:2px 8px;font-size:12px}
:is(#content,dialog) .crm-task .task-actions button{flex:none;height:28px;min-height:28px;padding:0 10px;font-size:12px;white-space:nowrap}
:is(#content,dialog) .crm-task .task-result{margin:0;font-size:12px;flex:1 1 auto;overflow-wrap:anywhere}
/* Закреплённые задачи сделки и плашка «нет задач» */
#content .deal-task-panel{position:sticky;top:0;z-index:3;max-height:210px;padding:6px 12px;box-shadow:0 4px 10px -8px rgba(0,0,0,.35)}
#content .deal-task-panel.is-empty{padding:0;box-shadow:none}
#content .deal-task-panel .crm-task{margin:4px 0}
#content .deal-task-panel .crm-task .task-where{display:none}
#content .deal-task-panel{max-height:176px}
#content :is(.deal-task-panel,.compose-task-strip) .crm-task{grid-template-columns:minmax(0,1fr) minmax(220px,1.1fr);align-items:center;column-gap:12px;row-gap:2px;padding:6px 10px}
#content :is(.deal-task-panel,.compose-task-strip) .crm-task>header{grid-column:1}
#content :is(.deal-task-panel,.compose-task-strip) .crm-task>strong{grid-column:1}
#content :is(.deal-task-panel,.compose-task-strip) .crm-task>strong [data-task-open]{display:inline;cursor:default}
#content :is(.deal-task-panel,.compose-task-strip) .crm-task .task-actions{grid-column:2;grid-row:1/span 2;margin:0}
#content :is(.deal-task-panel,.compose-task-strip) .crm-task .task-people{margin-left:0}
@media(max-width:900px){#content :is(.deal-task-panel,.compose-task-strip) .crm-task{grid-template-columns:minmax(0,1fr)}#content :is(.deal-task-panel,.compose-task-strip) .crm-task .task-actions{grid-column:1;grid-row:auto}}
#content .task-planner-link{font-size:11px;padding:0;min-height:0}
#content .task-empty-note{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px 12px;margin:0;padding:7px 12px;font-size:12px;color:#8a5300;background:#fff6e5;border-bottom:1px solid #f1dcae}
#content .task-empty-note button{height:26px;min-height:26px;padding:0 10px;font-size:12px}
:root[data-theme=dark] #content .task-empty-note{color:#f1c676;background:#33280f;border-color:#57431a}
#content .compose-task-strip{padding:4px 10px 0}
#content .compose-task-strip.is-empty{padding:0}
#content .compose-task-strip .crm-task{margin:4px 0}
#content .compose-task-strip .crm-task .task-where{display:none}
#content .task-cal-bar>button[data-cal-step]{width:32px;padding:0;font-size:18px;line-height:1}
/* Переключатель поля ввода: Чат / Примечание / Задача / Запись */
#content .compose-tabs{display:flex;align-items:center;gap:2px;padding:4px 10px 0;flex-wrap:wrap}
#content .compose-tabs>button{height:28px;min-height:28px;padding:0 10px;border:0;border-bottom:2px solid transparent;border-radius:6px 6px 0 0;background:none;color:var(--fg-3);font-size:12px;font-weight:600;box-shadow:none}
#content .compose-tabs>button:hover{color:var(--fg-1,inherit);background:var(--surface-2)}
#content .compose-tabs>button.active{color:var(--accent,#c2540a);border-bottom-color:var(--accent,#c2540a)}
#content .compose-to{display:flex;align-items:center;gap:6px;margin:0 0 0 auto;font-size:11px;color:var(--fg-3)}
#content .compose-to select{height:26px;min-height:26px;font-size:12px;padding-top:0;padding-bottom:0;width:auto}
#content .compose-tabs+form [data-compose-mode]{display:none}
#content .compose-task-pane{padding:8px 10px 10px}
/* Форма задачи */
:is(#content,dialog) .task-form{display:grid;gap:8px;margin:0}
:is(#content,dialog) .task-form label{margin:0;font-size:11px;color:var(--fg-3)}
:is(#content,dialog) .task-type-row,:is(#content,dialog) .task-quick{display:flex;flex-wrap:wrap;gap:5px}
:is(#content,dialog) .task-chip{display:inline-flex;cursor:pointer}
:is(#content,dialog) .task-chip input{position:absolute;opacity:0;pointer-events:none}
:is(#content,dialog) .task-chip span,:is(#content,dialog) .task-quick button{display:inline-flex;align-items:center;height:28px;min-height:28px;padding:0 10px;border:1px solid var(--line,#d5d9df);border-radius:999px;background:var(--surface,#fff);color:var(--fg-1,inherit);font-size:12px;font-weight:500;white-space:nowrap;box-shadow:none}
:is(#content,dialog) .task-chip input:checked+span,:is(#content,dialog) .task-quick button.active{border-color:var(--accent,#c2540a);background:var(--accent,#c2540a);color:#fff}
:is(#content,dialog) .task-chip input:focus-visible+span{outline:2px solid var(--accent,#c2540a);outline-offset:2px}
:is(#content,dialog) .task-quick button:hover{border-color:var(--accent,#c2540a)}
:is(#content,dialog) .task-when{display:flex;flex-wrap:wrap;align-items:end;gap:8px}
:is(#content,dialog) .task-when label{display:grid;gap:3px}
:is(#content,dialog) .task-when :is(input[type=date],input[type=time],select){height:32px;min-height:32px;width:auto;font-size:13px}
:is(#content,dialog) .task-when .task-allday{display:flex;align-items:center;gap:6px;height:32px;font-size:12px;color:var(--fg-1,inherit)}
:is(#content,dialog) .task-when .task-form-owner{flex:1 1 160px}
:is(#content,dialog) .task-when .task-form-owner select{width:100%}
:is(#content,dialog) .task-form-text,:is(#content,dialog) .task-form-deal{display:grid;gap:3px}
:is(#content,dialog) .task-form-text input{height:34px;min-height:34px}
:is(#content,dialog) .task-form .error{margin:0;min-height:0}
:is(#content,dialog) .task-form .error:empty{display:none}
:is(#content,dialog) .task-form-actions{display:flex;align-items:center;gap:8px}
:is(#content,dialog) .task-form-actions small{margin-left:auto;color:var(--fg-3);font-size:11px}
dialog.task-dialog{width:min(620px,94vw)}
dialog .task-type-edit,dialog .task-type-new{display:flex;gap:6px;align-items:center;margin:6px 0}
dialog .task-type-edit [data-icon],dialog .task-type-new [name=icon]{flex:0 0 52px;width:52px;text-align:center}
dialog .task-type-edit [data-name],dialog .task-type-new [name=name]{flex:1 1 auto;min-width:0}
dialog .task-type-edit button,dialog .task-type-new button{flex:none;height:34px;min-height:34px;padding:0 10px}
dialog .task-type-new{margin-top:12px;padding-top:12px;border-top:1px solid var(--line,#d5d9df)}
/* Планер: шапка, список, календарь */
#content .task-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#content .task-heading h1{margin:0 auto 0 0}
#content .task-layouts button,#content .task-cal-bar .segmented button{height:32px;min-height:32px;padding:0 12px;font-size:13px}
#content .task-planner.task-layout-list,#content .task-planner.task-layout-calendar{display:block}
#content .task-table-wrap{overflow:auto;border:1px solid var(--line,#d5d9df);border-radius:8px;background:var(--surface,#fff)}
#content .task-table{width:100%;border-collapse:collapse;font-size:12px}
#content .task-table th{text-align:left;font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--fg-3);padding:8px 10px;border-bottom:1px solid var(--line,#d5d9df);white-space:nowrap}
#content .task-table td{padding:7px 10px;border-bottom:1px solid var(--line,#d5d9df);vertical-align:middle}
#content .task-table tr:last-child td{border-bottom:0}
#content .task-table td:first-child{border-left:3px solid var(--ai,#7c5cd6);white-space:nowrap}
#content .task-table tr.task-overdue td:first-child{border-left-color:var(--bad,#c62828)}
#content .task-table tr.task-today td:first-child{border-left-color:var(--ok,#1f7a3d)}
#content .task-table tr.task-done td:first-child{border-left-color:var(--line,#d5d9df)}
#content .task-table td small{display:block;color:var(--fg-3);font-size:10px}
#content .task-table td input{height:28px;min-height:28px;min-width:150px;font-size:12px;padding:2px 8px}
#content .task-table td button{height:28px;min-height:28px;padding:0 10px;font-size:12px;white-space:nowrap}
#content .task-cal-bar{display:flex;align-items:center;gap:6px;margin-bottom:10px;flex-wrap:wrap}
#content .task-cal-bar>button{height:32px;min-height:32px;padding:0 12px}
#content .task-cal-bar strong{margin:0 auto 0 8px;font-size:14px}
#content .task-cal{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:1px;background:var(--line,#d5d9df);border:1px solid var(--line,#d5d9df);border-radius:8px;overflow:hidden}
#content .task-cal-head{background:var(--surface-2);padding:6px 8px;font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--fg-3)}
#content .task-cal-cell{background:var(--surface,#fff);min-height:104px;padding:4px;display:flex;flex-direction:column;gap:3px;min-width:0}
#content .task-cal-week .task-cal-cell{min-height:320px}
#content .task-cal-cell.outside{background:var(--surface-2)}
#content .task-cal-cell.outside .task-cal-date{opacity:.5}
#content .task-cal-date{align-self:flex-start;height:22px;min-height:22px;padding:0 6px;border:0;background:none;box-shadow:none;font-size:12px;font-weight:600;color:var(--fg-1,inherit);border-radius:999px}
#content .task-cal-cell.is-today .task-cal-date{background:var(--accent,#c2540a);color:#fff}
#content .task-cal-item{display:block;padding:2px 6px;border-left:3px solid var(--ai,#7c5cd6);border-radius:4px;background:var(--surface-2);font-size:11px;line-height:1.35;color:inherit;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#content .task-cal-week .task-cal-item{white-space:normal}
#content .task-cal-item.task-overdue{border-left-color:var(--bad,#c62828)}
#content .task-cal-item.task-today{border-left-color:var(--ok,#1f7a3d)}
#content .task-cal-item.task-done{border-left-color:var(--line,#d5d9df);opacity:.65}
#content .task-cal-more{align-self:flex-start;height:20px;min-height:20px;padding:0 6px;border:0;background:none;box-shadow:none;font-size:11px;color:var(--accent,#c2540a)}
#content .task-cal-day{max-width:720px}
/* Окно записи: причина, когда пост свободен, а мастер занят */
dialog.booking-board-dialog .booking-master-busy{font-size:10px;color:var(--fg-3);white-space:nowrap}
@media(max-width:700px){
#content .task-cal-month .task-cal-item{font-size:0;padding:0;height:6px;border-radius:3px;border-left-width:12px}
#content .task-cal-cell{min-height:64px}
#content .task-cal-week{grid-template-columns:1fr}
#content .task-cal-week .task-cal-head{display:none}
#content .task-cal-week .task-cal-cell{min-height:0}
#content .crm-task .task-actions{flex-wrap:wrap}
#content .task-people{margin-left:0}
}
#content :is(.task-layouts,.task-cal-bar .segmented){display:inline-flex;gap:2px;padding:2px;border-radius:8px;background:var(--surface-2)}
#content :is(.task-layouts,.task-cal-bar .segmented) button{border:0;background:none;box-shadow:none;border-radius:6px;color:var(--fg-3);font-weight:600}
#content :is(.task-layouts,.task-cal-bar .segmented) button[aria-pressed=true]{background:#222;color:#fff}
:root[data-theme=dark] #content :is(.task-layouts,.task-cal-bar .segmented) button[aria-pressed=true]{background:#f2f2f2;color:#111}
@media(max-width:700px){
#content .task-heading h1{flex:1 1 100%}
#content .task-filters input{flex:1 1 100%}
#content .deal-task-panel{max-height:128px}
}

/* === Касса · Таблицы: порядок на странице журнала (16.11.2026) === */
/* Шапка: вид кассы слева, все кнопки одной группой справа */
#content .cash-sheet-heading{align-items:center;flex-wrap:wrap;gap:8px 10px;margin-bottom:10px}
#content .cash-sheet-heading>div:first-child{display:flex;align-items:center;gap:14px;margin-right:auto}
#content .cash-sheet-heading h1{margin:0}
#content .cash-sheet-heading .cash-j-actions{gap:8px;margin:0}
#content .cash-sheet-heading :is(.cash-j-actions button,.full-export){height:34px;min-height:34px;padding:0 12px;font-size:13px;white-space:nowrap}
/* Цеха и месяц со способом оплаты — одна строка */
#content .cash-journal{display:flex;flex-wrap:wrap;align-items:center}
#content .cash-journal>.cash-sheet-workshops{flex:1 1 420px;min-width:0;padding:8px 14px;border-bottom:0;flex-wrap:wrap;gap:2px}
#content .cash-journal>.cash-sheet-workshops button{height:32px;min-height:32px;padding:0 12px}
#content .cash-journal>.cash-sheet-filters{flex:0 1 auto;align-items:center;gap:8px;padding:8px 14px;background:none;border:0;margin:0}
#content .cash-journal>.cash-sheet-filters label{display:block;margin:0;font-size:0;line-height:0}
#content .cash-journal>.cash-sheet-filters :is(input,select){height:34px;min-height:34px;font-size:13px;line-height:normal;width:auto}
#content .cash-journal>.cash-sheet-filters input[type=month]{width:160px}
#content .cash-journal>.cash-sheet-filters select{min-width:170px}
#content .cash-journal>.cash-sheet-filters .cash-sheet-status{order:-1;margin:0 4px 0 0;font-size:11px;color:var(--fg-3);white-space:nowrap}
#content .cash-journal>[data-j-body]{flex:1 1 100%;min-width:0;border-top:1px solid var(--line,#e9ebef)}
/* Заголовок журнала: одна тонкая строка */
#content .cash-journal .cash-sheet-title{align-items:center;padding:10px 14px 0}
#content .cash-journal .cash-sheet-title h2{margin:0;font-size:16px}
#content .cash-journal .cash-sheet-title p{display:none}
#content .cash-journal .sheet-count{font-size:11px;padding:3px 10px}
/* Итоги */
#content .cash-journal .cash-j-summary{padding:10px 14px 6px}
#content .cash-journal .cash-j-stat{padding:8px 12px}
#content .cash-journal .cash-j-stat strong{font-size:19px;line-height:1.25}
/* Разделы, период и поиск */
#content .cash-journal .cash-j-sections{padding:6px 14px 0;flex-wrap:wrap;gap:6px}
#content .cash-journal .cash-j-help{padding:4px 14px 0;font-size:11px;color:var(--fg-3)}
#content .cash-journal form.cash-j-date-search{display:flex!important;flex-wrap:wrap;align-items:center;gap:8px;margin:8px 14px 0!important;padding:0!important;border:0!important;border-radius:0;background:none!important;box-shadow:none}
#content .cash-journal form.cash-j-date-search label{display:flex!important;flex-direction:row!important;align-items:center;gap:6px;margin:0;font-size:11px;color:var(--fg-3);white-space:nowrap}
#content .cash-journal form.cash-j-date-search :is(input,select,button){height:34px!important;min-height:34px;font-size:13px;line-height:normal;margin:0!important}
#content .cash-journal form.cash-j-date-search .cash-j-period{display:flex!important;flex-direction:row!important;align-items:center;gap:8px;flex:0 0 auto;width:auto}
#content .cash-journal form.cash-j-date-search .cash-j-period>label{font-size:0!important;gap:0}
#content .cash-journal .cash-j-period select{width:190px}
#content .cash-journal .cash-j-range{display:flex;align-items:center;gap:8px}
#content .cash-journal .cash-j-range[hidden]{display:none}
#content .cash-journal form.cash-j-date-search .cash-j-query{flex:1 1 260px;font-size:0!important;gap:0;max-width:none;width:auto}
#content .cash-journal form.cash-j-date-search .cash-j-query input{width:100%!important;max-width:none}
#content .cash-journal form.cash-j-date-search button{flex:none;width:auto!important;padding:0 14px}
#content .cash-journal .cash-j-export{align-items:center;padding:8px 14px;font-size:12px;color:var(--fg-3)}
#content .cash-journal .cash-j-export button{height:30px!important;min-height:30px!important;padding:0 12px!important;font-size:12px!important}
/* Строки: значки действий ровным столбцом справа в первой колонке */
#content .cash-journal .cash-j-table th{white-space:nowrap}
#content .cash-journal .cash-j-table td{vertical-align:middle;padding:7px 10px}
#content .cash-journal .cash-j-table td:first-child{position:relative;padding-right:132px;white-space:nowrap}
#content .cash-journal .cash-j-table td:first-child .cash-row-actions{position:absolute;right:8px;top:50%;transform:translateY(-50%);margin:0;gap:4px}
#content .cash-journal .cash-j-table td:first-child small{display:block;white-space:normal}
#content .cash-journal .cash-j-table td:first-child .deletion-label{margin-left:6px}
#content .cash-journal .cash-j-table td p{margin:2px 0 0}
#content .cash-journal .cash-j-table button[data-link-order]{height:26px!important;min-height:26px!important;padding:0 10px!important;font-size:12px!important;margin-top:2px}
#content .cash-journal .cash-j-table .cash-j-unlinked{display:block;font-size:11px}
#content .cash-journal .cash-j-money{white-space:nowrap}
@media(max-width:900px){
#content .cash-sheet-heading>div:first-child{flex:1 1 100%}
#content .cash-sheet-heading .cash-j-actions{flex-wrap:wrap}
#content .cash-journal>.cash-sheet-filters{flex:1 1 100%;flex-wrap:wrap;padding-top:0}
#content .cash-journal>.cash-sheet-filters .cash-sheet-status{order:5}
#content .cash-journal .cash-j-period,#content .cash-journal .cash-j-period select{flex:1 1 100%;width:100%}
#content .cash-journal .cash-j-period>label{flex:1 1 100%}
#content .cash-journal .cash-j-range{flex-wrap:wrap}
}
#content .cash-journal form.cash-j-date-search .cash-j-range input{width:150px!important;flex:none}
#content .cash-journal form.cash-j-date-search :is(.cash-j-period,.cash-j-range){width:auto!important;max-width:none!important;min-width:0;flex:0 0 auto!important;overflow:visible}
#content .cash-journal form.cash-j-date-search .cash-j-range label{flex:none}
#content .cash-journal form.cash-j-date-search .cash-j-range:not([hidden]){display:flex!important;flex-wrap:nowrap;align-items:center;gap:8px}
@media(max-width:900px){
#content .cash-journal form.cash-j-date-search :is(.cash-j-period,.cash-j-range){flex:1 1 100%!important;flex-wrap:wrap!important;max-width:100%!important}
#content .cash-journal form.cash-j-date-search .cash-j-period>label{flex:1 1 100%}
#content .cash-journal form.cash-j-date-search .cash-j-period select{width:100%!important}
}
#content .cash-journal form.cash-j-date-search :is(.cash-j-range label,.cash-j-period>label){width:auto!important}

/* === Касса · День: приходы и расходы по способам оплаты (16.11.2026) === */
#content .cash-day{display:block}
#content .cash-day-bar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0;padding:8px 14px;border-bottom:1px solid var(--line,#e9ebef)}
#content .cash-day-bar :is(input,select,button){height:34px;min-height:34px;font-size:13px;margin:0;width:auto}
#content .cash-day-bar [data-d-step]{width:34px;padding:0;font-size:18px;line-height:1}
#content .cash-day-bar input[type=date]{width:160px}
#content .cash-day-bar select{min-width:170px;margin-left:8px}
#content .cash-day-bar .cash-sheet-status{margin-left:auto;font-size:11px;color:var(--fg-3)}
#content .cash-day .cash-sheet-title{align-items:center;padding:10px 14px 0}
#content .cash-day .cash-sheet-title h2{margin:0;font-size:16px}
#content .cash-day .sheet-count{font-size:11px;padding:3px 10px}
#content .cash-day .cash-day-summary{grid-template-columns:repeat(3,minmax(0,1fr));padding:10px 14px 6px}
#content .cash-day .cash-j-stat{padding:8px 12px;text-align:left}
#content .cash-day .cash-j-stat strong{font-size:19px;line-height:1.25}
#content .cash-day .cash-j-scroll{margin:6px 14px 0;border:1px solid var(--line,#e9ebef);border-radius:8px;max-width:820px}
#content .cash-day-table{width:100%}
#content .cash-day-table :is(th,td){padding:9px 14px;vertical-align:middle}
#content .cash-day-table :is(th,td):not(:first-child){text-align:right}
#content .cash-day-table td.cash-j-money{font-size:14px;white-space:nowrap}
#content .cash-day-table td small{display:block;font-size:10px;font-weight:400;color:var(--fg-3)}
#content .cash-day-table tfoot td{border-top:2px solid var(--line,#d5d9df);font-weight:700;background:var(--surface-2)}
#content .cash-day .cash-j-help{padding:8px 14px 0;font-size:11px;color:var(--fg-3);max-width:820px}
#content .cash-day .cash-j-export{padding:8px 14px 12px;max-width:848px}
#content .cash-day .cash-j-export button{height:32px!important;min-height:32px!important;padding:0 12px!important;font-size:12px!important}
@media(max-width:700px){#content .cash-day .cash-day-summary{grid-template-columns:1fr}#content .cash-day-bar select{margin-left:0;flex:1 1 100%}#content .cash-day-bar .cash-sheet-status{margin-left:0}#content .cash-day-table :is(th,td){padding:8px}}
#content .cash-day .cash-j-scroll .cash-day-table{min-width:0!important;width:100%!important;table-layout:fixed}

/* === Касса: цех рядом с заголовком окна операции (18.11.2026) === */
dialog .cash-dialog-shop{display:inline-flex;align-items:center;gap:6px;margin-left:10px;padding:4px 12px 4px 9px;border-radius:999px;background:var(--shop,var(--accent,#c2540a));color:#fff;font-size:15px;font-weight:700;line-height:1.3;vertical-align:middle;white-space:nowrap}
dialog .cash-dialog-shop svg{width:16px;height:16px;flex:none}
dialog .cash-dialog-shop[data-shop="1"]{--shop:#C2255C}
dialog .cash-dialog-shop[data-shop="2"]{--shop:#5F6B7A}
dialog .cash-dialog-shop[data-shop="3"]{--shop:#8D6E00}
dialog .cash-dialog-shop[data-shop="4"]{--shop:#1971C2}
dialog .cash-dialog-shop[data-shop="5"]{--shop:#0C8599}
dialog .cash-dialog-shop[data-shop="6"]{--shop:#6741D9}

/* Касса: долги и подотчёт собраны по человеку (18.11.2026) */
dialog .debts-table tr.debt-group td{background:var(--surface-2,#f8f9fa);border-bottom:1px solid var(--line,#e3e6ea)}
dialog .debts-table tr.debt-group strong{font-size:inherit}
dialog .debts-table tr.debt-sub td{padding-top:5px;padding-bottom:5px}
dialog .debts-table tr.debt-sub td:first-child{padding-left:24px}
dialog .debts-table tr.debt-sub .debt-what{display:block;font-size:12px;line-height:1.35;color:var(--fg-2,#5d626a)}
dialog .debts-table tr.debt-sub .debt-num strong{font-weight:500}
dialog .accountable-group{margin:12px 0;border:1px solid var(--line,#e3e6ea);border-radius:10px;overflow:hidden}
dialog .accountable-group>header{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 14px;background:var(--surface-2,#f8f9fa);border-bottom:1px solid var(--line,#e3e6ea)}
dialog .accountable-group>header strong{font-size:15px}
dialog .accountable-group>header small{display:block;margin-top:2px;font-size:12px;color:var(--fg-2,#5d626a);line-height:1.4}
dialog .accountable-group>header .accountable-status{font-size:13px;font-weight:700}
dialog .accountable-group .accountable-issue{padding:12px 14px}
dialog .accountable-group .accountable-issue:last-child{border-bottom:0}
dialog .debts-table tr.debt-group{cursor:pointer}
dialog .debts-table tr.debt-group:hover td{background:var(--surface-3,#f1f3f5)}
dialog .debts-table tr.debt-group:focus-visible{outline:2px solid var(--accent,#c2540a);outline-offset:-2px}
dialog .debts-table tr.debt-group td:first-child{position:relative;padding-left:30px}
dialog .debts-table tr.debt-group td:first-child::before{content:"";position:absolute;left:12px;top:50%;width:7px;height:7px;margin-top:-5px;border-right:2px solid var(--fg-2,#5d626a);border-bottom:2px solid var(--fg-2,#5d626a);transform:rotate(-45deg);transition:transform .15s}
dialog .debts-table tr.debt-group[aria-expanded=true] td:first-child::before{transform:rotate(45deg)}
dialog .debts-table tr.debt-sub td:first-child{padding-left:30px}
dialog .debts-table tr.debt-sub[hidden]{display:none}

/* Касса: оплата в евро и долларах (18.11.2026) */
dialog .split-payment-form .split-fx .split-fx-actual{font-weight:600;color:var(--fg-1,#1f2328)}
dialog .split-payment-form .split-fx .split-fx-actual.is-warn{color:var(--warn,#8f5600)}
dialog .split-payment-form .split-fx .split-fx-actual:empty{display:none}
dialog .split-payment-form .split-change{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0;padding:12px 16px;border:1px solid #9ad3ae;border-radius:12px;background:#eaf7ee;color:#14532d}
dialog .split-payment-form .split-change[hidden]{display:none}
dialog .split-payment-form .split-change span{display:grid;gap:2px;font-weight:600}
dialog .split-payment-form .split-change small{font-weight:400;font-size:12px;color:#2f6b45}
dialog .split-payment-form .split-change strong{font-size:22px;white-space:nowrap}
dialog .debt-actions .invoice-edit{flex:none;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;min-height:0;margin:0;padding:0;border:1px solid var(--line,#DFE2E8);border-radius:10px;background:#fff;color:#4B5563;cursor:pointer}
dialog .debt-actions .invoice-edit:hover,dialog .debt-actions .invoice-edit:focus-visible{border-color:#E8590C;color:#C2410C}
dialog .debt-actions .invoice-edit:disabled{opacity:.45;cursor:default}
dialog .invoices-table tr.invoice-editing td{background:#FFF9F5}
dialog .invoices-table tr.invoice-editing input{width:100%;min-width:0;min-height:36px;margin:0;padding:6px 10px;font-size:14px;box-sizing:border-box}
dialog .invoices-table tr.invoice-editing td:first-child input{font-weight:600;margin-bottom:4px}
dialog .invoices-table tr.invoice-editing td:nth-child(3) input{width:130px}
dialog .invoices-table tr.invoice-editing td:nth-child(4) input{width:110px}
html[data-theme=dark] dialog .invoices-table tr.invoice-editing td{background:#2A2119}html[data-theme=dark] dialog .debt-actions .invoice-edit{background:#1D2028;border-color:#343844;color:#E5E7EB}

/* Окно входа: логотип, заголовок и подписи по центру, поля и кнопка одной высоты (19.11.2026) */
.login-shell .login-box .muted{text-align:center;margin:0}
.login-shell .login-box h2{text-align:center}
.login-shell .login-box .login-logo{margin-left:auto;margin-right:auto}
.login-shell .login-box form input{height:44px;min-height:44px;box-sizing:border-box}
.login-shell .login-box .password-wrap{position:relative;display:block}
.login-shell .login-box .password-wrap button{position:absolute;top:0;bottom:0;right:10px;height:44px;min-height:0;margin:0;padding:0 4px;display:flex;align-items:center;line-height:1}
.login-shell .login-box form#login-form button.login-submit{height:44px!important;min-height:44px!important;font-size:14px}
.login-shell .login-box .login-note{justify-content:center;text-align:center}
.login-shell .login-box .login-logo img{mix-blend-mode:multiply}

/* Касса: способ оплаты кнопками вместо списка (19.11.2026) */
dialog .cash-form .method-buttons{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:8px;margin:0}
dialog .cash-form .method-buttons button{width:auto;min-height:46px;margin:0;padding:8px 10px;border:1.5px solid var(--line,#DFE2E8);border-radius:12px;background:var(--surface,#fff);color:var(--fg-1,#1f2328);font:inherit;font-weight:600;cursor:pointer}
dialog .cash-form .method-buttons button:hover:not(:disabled){border-color:var(--accent,#E8590C)}
dialog .cash-form .method-buttons button.selected{border-color:var(--accent,#E8590C);background:var(--accent-soft,#FFF1E8);color:var(--accent-ink,#9a3f06)}
dialog .cash-form .method-buttons button:disabled{opacity:.45;cursor:default}
dialog .cash-form select[name=method][hidden]{display:none}
/* Звонки · «Нужно перезвонить»: последняя колонка фиксированная, иначе заголовки съезжают относительно строк */
.missed-queue-row{grid-template-columns:130px minmax(150px,1.3fr) minmax(150px,1.2fr) 110px minmax(160px,1.2fr) 190px}
/* Касса · Таблицы: все фильтры в одной строке (период, месяц/день/интервал, способ оплаты, поиск) и строка «Показано» */
#content .cash-journal form.cash-j-date-search label[hidden]{display:none!important}
#content .cash-journal form.cash-j-date-search .cash-j-period select{width:170px}
#content .cash-journal form.cash-j-date-search :is(.cash-j-month,.cash-j-day) input{width:160px!important}
#content .cash-journal form.cash-j-date-search .cash-j-method{font-size:0!important;gap:0;flex:0 0 auto}
#content .cash-journal form.cash-j-date-search .cash-j-method select{width:220px}
#content .cash-journal .cash-j-chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:8px 14px 0;font-size:12px;color:var(--fg-3)}
#content .cash-journal .cash-j-chip{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border:1px solid var(--line,#e3e6ea);border-radius:13px;background:var(--surface-2,#f8f9fa);color:var(--fg,#252a32);font-size:12px;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
#content .cash-journal .cash-j-chip small{color:var(--fg-3);font-size:11px}
#content .cash-journal .cash-j-chip:has(button){border-color:var(--accent,#dc681d);background:var(--accent-soft,#fff0e5)}
#content .cash-journal .cash-j-chip button{all:unset;cursor:pointer;width:18px;height:18px;margin-right:-5px;border-radius:50%;text-align:center;line-height:18px;font-size:11px;color:var(--fg-2,#5d626a)}
#content .cash-journal .cash-j-chip button:hover{background:rgba(0,0,0,.08)}
#content .cash-journal .cash-j-chip button:focus-visible{outline:2px solid var(--accent,#dc681d)}
@media(max-width:700px){#content .cash-journal form.cash-j-date-search .cash-j-method,#content .cash-journal form.cash-j-date-search .cash-j-method select,#content .cash-journal form.cash-j-date-search :is(.cash-j-month,.cash-j-day){flex:1 1 100%!important;width:100%!important}#content .cash-journal form.cash-j-date-search :is(.cash-j-month,.cash-j-day) input{width:100%!important}}
/* Общий поиск по CRM: компактная шапка, поле с лупой, строки-карточки со значком и статусом */
dialog.doc-v4-search-dialog{width:min(680px,calc(100vw - 24px));max-width:680px;padding:20px 22px 18px;border-radius:14px}
dialog.doc-v4-search-dialog .dialog-top{position:absolute;top:14px;right:14px;margin:0;padding:0;min-height:0}
dialog.doc-v4-search-dialog .dialog-top .cash-icon{display:none}
dialog.doc-v4-search-dialog .dialog-top .close{width:32px;height:32px;min-height:32px;padding:0;border-radius:8px}
dialog.doc-v4-search-dialog>h2{margin:0 44px 2px 0;font-size:19px;line-height:1.3}
dialog.doc-v4-search-dialog>p.muted{margin:0 44px 14px 0;font-size:12px;color:var(--fg-3)}
dialog.doc-v4-search-dialog .doc-v4-search-form{display:flex;flex-wrap:nowrap;align-items:stretch;gap:8px;margin:0}
dialog.doc-v4-search-dialog .doc-v4-search-field{position:relative;flex:1 1 auto;min-width:0;display:block;margin:0}
dialog.doc-v4-search-dialog .doc-v4-search-field svg{position:absolute;left:13px;top:50%;width:18px;height:18px;transform:translateY(-50%);color:var(--fg-3);pointer-events:none}
dialog.doc-v4-search-dialog .doc-v4-search-field input{box-sizing:border-box;width:100%;min-width:0;height:44px!important;min-height:44px;margin:0!important;padding:0 12px 0 40px!important;font-size:15px;border-radius:10px}
dialog.doc-v4-search-dialog .doc-v4-search-form button{flex:none;height:44px!important;min-height:44px!important;margin:0!important;padding:0 20px!important;border-radius:10px;font-size:14px}
dialog.doc-v4-search-dialog .doc-v4-search-results{max-height:min(60vh,560px);margin:6px -8px 0;padding:0 8px 2px}
dialog.doc-v4-search-dialog .doc-v4-search-results h3{display:flex;align-items:center;gap:7px;margin:16px 0 6px;padding:0 4px;font-size:11px;font-weight:600;letter-spacing:.6px}
dialog.doc-v4-search-dialog .doc-v4-search-results h3 i{font-style:normal;letter-spacing:0;min-width:18px;padding:1px 6px;border-radius:9px;background:var(--surface-2,#f1f2f4);color:var(--fg-2,#5d626a);text-align:center}
dialog.doc-v4-search-dialog .doc-v4-result{gap:12px;padding:9px 10px;margin:0 0 4px;border:1px solid var(--line,#e3e6ea);border-radius:10px;min-height:54px}
dialog.doc-v4-search-dialog .doc-v4-result:hover,dialog.doc-v4-search-dialog .doc-v4-result:focus-visible{background:var(--accent-soft,#fff0e5);border-color:var(--accent,#dc681d);outline:0}
dialog.doc-v4-search-dialog .doc-v4-result-icon{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--surface-2,#f1f2f4)}
dialog.doc-v4-search-dialog .doc-v4-result-icon svg{width:18px;height:18px;color:var(--fg-2,#5d626a)}
dialog.doc-v4-search-dialog .doc-v4-result[data-kind=orders] .doc-v4-result-icon{background:#e8f1fb}dialog.doc-v4-search-dialog .doc-v4-result[data-kind=orders] .doc-v4-result-icon svg{color:#2b6cb0}
dialog.doc-v4-search-dialog .doc-v4-result[data-kind=deals] .doc-v4-result-icon{background:#fdf0e3}dialog.doc-v4-search-dialog .doc-v4-result[data-kind=deals] .doc-v4-result-icon svg{color:#c2570c}
dialog.doc-v4-search-dialog .doc-v4-result-text{flex:1 1 auto;min-width:0}
dialog.doc-v4-search-dialog .doc-v4-result strong{font-size:14px;font-weight:600;line-height:1.3}
dialog.doc-v4-search-dialog .doc-v4-result small{margin-top:2px;font-size:12px}
dialog.doc-v4-search-dialog .doc-v4-result em{flex:none;max-width:40%;padding:3px 9px;border-radius:11px;background:var(--surface-2,#f1f2f4);color:var(--fg-2,#5d626a);font-style:normal;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
dialog.doc-v4-search-dialog .doc-v4-result>svg{flex:none;width:16px;height:16px}
dialog.doc-v4-search-dialog .doc-v4-empty{padding:26px 12px 12px;font-size:13px}
html[data-theme=dark] dialog.doc-v4-search-dialog .doc-v4-result[data-kind] .doc-v4-result-icon{background:var(--surface-2)}
@media(max-width:560px){dialog.doc-v4-search-dialog{padding:16px 14px 14px}dialog.doc-v4-search-dialog .doc-v4-search-form button{padding:0 14px!important}dialog.doc-v4-search-dialog .doc-v4-result em{display:none}}
/* Тёмная тема: ручные доводки поверх сгенерированного слоя */
html[data-theme=dark] #content .daily-entry>.history-heading small{color:rgba(255,255,255,.82)!important}
html[data-theme=dark] dialog.doc-v4-search-dialog .doc-v4-result[data-kind=orders] .doc-v4-result-icon svg{color:var(--info)}
html[data-theme=dark] dialog.doc-v4-search-dialog .doc-v4-result[data-kind=deals] .doc-v4-result-icon svg{color:var(--accent-ink)}
/* Тёмная тема · Звонки: кнопка «Расшифровка» показывает статус цветом, как в светлой теме */
html[data-theme=dark] #content button.transcript-status.new{color:var(--bad)!important;background:var(--bad-soft)!important;border-color:var(--bad-line)!important}
html[data-theme=dark] #content button.transcript-status.queued{color:var(--warn)!important;background:var(--warn-soft)!important;border-color:var(--warn-line)!important}
html[data-theme=dark] #content button.transcript-status.done{color:var(--ok)!important;background:var(--ok-soft)!important;border-color:var(--ok-line)!important}
html[data-theme=dark] .transcript-key .new{color:var(--bad)}html[data-theme=dark] .transcript-key .queued{color:var(--warn)}html[data-theme=dark] .transcript-key .done{color:var(--ok)}
/* Тёмная тема в духе Telegram (ночная): сине-серый фон, синее выделение, оранжевый остаётся фирменным для главных кнопок */
:root[data-theme="dark"]{--bg:#0E1621;--surface:#17212B;--surface-2:#1C2733;--surface-3:#242F3D;--line:#22303D;--line-strong:#2F3F50;--fg:#F5F5F5;--fg-2:#A9B8C6;--fg-3:#708499;--rail:#17212B;--rail-2:#202B36;--rail-fg:#8FA1B3;--accent-soft:#33261E;--accent-line:#6A4128;--ok-soft:#15302A;--ok-line:#22503F;--bad-soft:#331F27;--bad-line:#5E2E37;--info:#6AB2F2;--info-soft:#1D3347;--info-line:#2B5278;--warn-soft:#2E2A1F;--warn-line:#56491F;--ai-soft:#24213A;--ai-line:#3F3866;--shadow:0 1px 2px rgba(0,0,0,.35);--shadow-pop:0 18px 48px rgba(0,0,0,.6)}
/* Выбранная кнопка в переключателях: не белая плашка, а мягкая подложка */
html[data-theme=dark] .cash-pos-heading .cash-view-tabs button.selected,html[data-theme=dark] .quick-choice input:checked+span,html[data-theme=dark] .v4-service-segments button[aria-pressed=true],html[data-theme=dark] .v4-schedule .v4-calendar-modes button[aria-pressed=true]{background:#2B5278!important;color:#fff!important;box-shadow:none}
/* Календарь: линии только по часам, нерабочее время без штриховки, записи — нейтральные карточки с цветной полосой */
html[data-theme=dark] .v4-schedule .schedule-scroll{border-color:var(--line);border-radius:12px;background:var(--surface)}
html[data-theme=dark] .v4-schedule .schedule-column-title{background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .v4-schedule .schedule-track{border-color:var(--line)}
html[data-theme=dark] .v4-schedule .schedule-slot{border-top:0;border-bottom:1px solid transparent;background:var(--surface)}
html[data-theme=dark] .v4-schedule .schedule-slot:nth-child(4n){border-bottom-color:var(--line)}
html[data-theme=dark] .v4-schedule .schedule-slot:disabled{background:var(--bg)}
html[data-theme=dark] .v4-schedule .schedule-slot:not(:disabled):hover{background:var(--surface-3)}
html[data-theme=dark] .v4-schedule .schedule-event{border:0;border-left:3px solid var(--info);border-radius:6px;background:var(--surface-3);color:var(--fg);box-shadow:0 1px 2px rgba(0,0,0,.35)}
html[data-theme=dark] .v4-schedule .schedule-event:hover{background:#2B3A4A}
html[data-theme=dark] .v4-schedule .schedule-event small{color:var(--fg-2)}
html[data-theme=dark] #content .segmented button.active{background:#2B5278!important;color:#fff!important;box-shadow:none}
/* Тёмная тема · заказ-наряд и касса: без бурого оттенка шапки, водяной знак цеха едва заметен */
html[data-theme=dark] #content fieldset.order-meta{background:var(--surface-2)!important}
html[data-theme=dark] .order-shop-art{opacity:.05!important}
html[data-theme=dark] .daily-entry[data-shop]>.shop-watermark{opacity:.07!important}
/* Telegram: активный пункт меню и выбранные вкладки — синяя подсветка */
html[data-theme=dark] .sidebar a.nav.active,html[data-theme=dark] .sidebar .nav.active{background:#2B5278!important;color:#fff!important}
html[data-theme=dark] .sidebar a.nav.active svg{color:#fff}
html[data-theme=dark] .topbar{background:var(--surface);border-color:var(--line)}
html[data-theme=dark] #content :is(.cash-view-tabs button.selected,.cash-sheet-workshops button.selected,.cash-j-sections button.selected){background:#2B5278!important;color:#fff!important;border-color:#2B5278!important}
html[data-theme=dark] #content :is(.cash-view-tabs button.selected,.cash-sheet-workshops button.selected,.cash-j-sections button.selected) small{color:#cfe3f7!important}
/* Telegram dark: order register — quiet status tint, coloured status badges, faint shop marks */
html[data-theme=dark] .orders-compact.v4-service-register .report-table .order-open-row:not(:has(.order-state-draft)){--order-row-bg:color-mix(in srgb,var(--order-row-accent) 7%,var(--surface))}
html[data-theme=dark] .orders-compact.v4-service-register .report-table .order-open-row:has(.order-state-draft){--order-row-bg:var(--surface)}
html[data-theme=dark] .orders-compact.v4-service-register .report-table .order-open-row:hover>td{background:color-mix(in srgb,var(--order-row-accent) 13%,var(--surface))}
html[data-theme=dark] .order-mark-row>td:first-child:before,html[data-theme=dark] .tire-order-row>td:first-child:before{opacity:.18!important}
html[data-theme=dark] .v4-service-register .access-pill:is(.order-state-draft){background:var(--surface-3);color:var(--fg-2)}
html[data-theme=dark] .v4-service-register .access-pill.order-state-accepted{background:var(--ai-soft);color:#B3A6F5}
html[data-theme=dark] .v4-service-register .access-pill.order-state-working{background:var(--warn-soft);color:#E8C066}
html[data-theme=dark] .v4-service-register .access-pill.order-state-ready{background:var(--info-soft);color:var(--info)}
html[data-theme=dark] .v4-service-register .access-pill:is(.order-state-paid,.order-state-closed){background:var(--ok-soft);color:#6FD39B}
html[data-theme=dark] .v4-service-register .access-pill.order-state-cancelled{background:var(--bad-soft);color:#F08A8A}
