/* Compact sale workspace: product browsing and checkout scroll independently. */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:34px;padding:7px 10px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#58616d;font-size:11px;white-space:nowrap;cursor:pointer}
.theme-toggle svg{width:17px;height:17px;flex-shrink:0}
.auth-theme-toggle{position:absolute;right:24px;top:22px;z-index:2}
.workspace-label{justify-content:center;gap:8px;padding:9px 0 14px;font-size:10px;letter-spacing:1px}
.offset-brand{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;overflow:hidden;flex-shrink:0}
.offset-logo{width:45px;height:45px;max-width:none;object-fit:contain;flex-shrink:0}
.btn.danger{background:#fff0f1;color:#af3441;border:1px solid #edbdc3}
.btn.danger:hover{background:#ffe1e5}
.sales-content{padding:22px 24px 12px}
.sales-content .page-heading{margin-bottom:17px;align-items:center}
.sales-content .page-heading h1{font-size:28px;margin-top:4px}
.sales-content .subtitle{margin-top:5px;font-size:12px}
.sales-content .footer{display:none}
.products-layout{grid-template-columns:minmax(0,1fr) 342px;gap:18px;align-items:start}
.catalog-panel{min-width:0;container-type:inline-size}
.catalog-toolbar{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.catalog-toolbar .product-tabs{margin:0;gap:5px;flex-wrap:nowrap}
.catalog-toolbar .tab{padding:8px 12px;min-height:34px}
.catalog-toolbar .product-search{margin:0;min-height:34px;padding:8px 10px;min-width:90px;flex:1}
.catalog-scroll{max-height:calc(100dvh - 265px);overflow-y:auto;scrollbar-gutter:stable;padding-right:3px}
.products{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.product{display:grid;grid-template-columns:48px minmax(0,1fr);border-radius:10px;padding:8px;gap:6px 8px;min-height:104px;transition:border-color .15s}
.product.selected{border-color:#c36361;box-shadow:inset 0 0 0 1px #c3636133}
.product-visual{height:44px;width:48px;background:transparent;border-radius:7px}
.product-visual img{height:44px;width:48px;object-fit:contain;filter:drop-shadow(0 3px 4px #27241c14)}
.product-visual .product-symbol{font-size:30px}
.product-info{padding:0;min-width:0;align-self:center}
.product-info h3{font-size:11px;line-height:1.35;white-space:normal;overflow:visible;font-weight:650}
.product-price{font-size:12px;margin-top:4px}
.product-control{grid-column:1/-1;margin:0;padding-top:5px;border-top:1px solid var(--line);gap:4px}
.product-control small{font-size:9px;line-height:1.2}
.stepper{flex-shrink:0;border-color:var(--line)}
.stepper button{width:26px;height:28px;font-size:16px;cursor:pointer}
.stepper input{width:36px;min-height:28px;height:28px;border:0;border-radius:0;padding:0 2px;text-align:center;font-size:11px;background:transparent;appearance:textfield;-moz-appearance:textfield}
.stepper input::-webkit-inner-spin-button,.stepper input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.receipt{top:16px;max-height:calc(100dvh - 216px);display:flex;flex-direction:column}
.receipt-title{padding:13px 15px;gap:8px;flex-shrink:0}
.receipt-title h2{font-size:14px;margin-right:auto}
.receipt-title .btn{min-height:28px;padding:4px 7px;font-size:10px}
.receipt-body{padding:0;display:flex;flex-direction:column;min-height:0}
.receipt-scroll{padding:14px 15px 10px;overflow-y:auto;min-height:0;scrollbar-gutter:stable}
.receipt-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.receipt-body .field{margin-bottom:0;gap:5px}
.receipt-body .field>span{font-size:10px}
.receipt-body input,.receipt-body select{min-height:34px;padding:8px;font-size:11px}
.receipt-body .cart-lines{margin:12px 0;min-height:28px}
.receipt-body .cart-lines .empty{padding:12px 0;font-size:11px}
.cart-line{margin:0;padding:7px 0;border-bottom:1px solid var(--line);font-size:11px;line-height:1.4;gap:8px}
.cart-line>span{flex:1;min-width:0}
.cart-line>b{white-space:nowrap;font-variant-numeric:tabular-nums}
.cart-line .remove{min-width:26px;min-height:26px;font-size:18px;cursor:pointer}
.receipt-checkout{padding:12px 15px 14px;border-top:1px solid var(--line);flex-shrink:0;background:#fff}
.receipt-total{padding:0;border:0;margin:0 0 12px;font-size:11px}
.receipt-total strong{font-size:25px}
.checkout-actions{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px}
.checkout-actions .btn{padding:10px 9px;min-height:38px;font-size:11px;white-space:nowrap;justify-content:center;gap:5px}
.checkout-actions .btn svg{width:15px;height:15px}
.receipt-checkout .inline-error:empty{display:none}
.receipt-checkout .inline-error:not(:empty){padding:0 0 10px}
.invoice-details{margin-top:10px;font-size:10px;color:var(--muted)}
.invoice-details summary{cursor:pointer;padding:5px 0}
.invoice-details .field{margin-top:8px}
.order-rules{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 22px}
.order-rules>div{padding:18px;border:1px solid var(--line);border-top:3px solid var(--red);border-radius:12px;background:var(--surface,#fff)}
.order-rules b{display:block;margin-bottom:9px;font-size:13px;color:var(--text)}
.order-rules p{font-size:12px;line-height:1.6;color:var(--muted)}
.order-rules strong{color:var(--text)}
dialog .order-rules{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
dialog .order-rules>div{padding:12px}
@media(max-width:850px){.order-rules{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:500px){.order-rules,dialog .order-rules{grid-template-columns:1fr}}
.partner-list-company{display:flex;align-items:center;gap:12px;min-width:210px}
.partner-list-company .partner-initial{flex-shrink:0}
.partner-list-actions{display:flex;align-items:center;gap:8px;justify-content:flex-end}
.partner-list th:last-child{text-align:right}
.partner-list td{vertical-align:middle}
.bonus-week-filter{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;margin-bottom:22px}
.bonus-week-navigation{display:flex;align-items:flex-end;gap:8px;min-width:0}
.bonus-week-navigation .field{min-width:250px}
.bonus-week-navigation select{width:100%;min-height:40px}
.bonus-week-shortcuts{display:flex;flex-wrap:wrap;gap:8px}
.bonus-week-note{flex-basis:100%;font-size:12px;line-height:1.5;color:var(--muted)}
@media(max-width:650px){.bonus-week-navigation{width:100%;flex-wrap:wrap}.bonus-week-navigation .field{order:-1;flex-basis:100%;min-width:0}.bonus-week-navigation>.btn{flex:1}.bonus-week-shortcuts{width:100%}.bonus-week-shortcuts .btn{flex:1}}
.receipt textarea{min-height:60px;margin:0;font-size:11px}
#service-menu:not(:empty){margin-top:10px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#service-menu .check{grid-column:1/-1;padding:3px 0;line-height:1.5}
#service-menu .field{align-self:end}
#service-menu .field>span{font-size:9px}
#service-menu select{padding:7px 4px;font-size:10px}
.employee-tabs{margin-bottom:14px}
.catalog-product-name{display:flex;align-items:center;gap:10px}
.catalog-product-name img,.catalog-placeholder{width:40px;height:40px;object-fit:contain;flex-shrink:0}
.catalog-placeholder{display:flex;align-items:center;justify-content:center;color:var(--muted)}
.catalog-placeholder svg{width:23px;height:23px}
.current-product-image{display:flex;align-items:center;gap:12px;margin:14px 0;color:var(--muted);font-size:11px}
.current-product-image img{width:75px;height:75px;object-fit:contain}
@container(max-width:650px){.products{grid-template-columns:repeat(3,minmax(0,1fr))}.product{grid-template-columns:44px minmax(0,1fr);padding:8px;gap:6px}.product-visual,.product-visual img{width:44px;height:44px}.product-control small{display:none}.product-control{justify-content:center}.stepper input{width:42px}}
@container(max-width:420px){.products{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1600px){.sales-content{padding:25px 35px 12px}.products-layout{grid-template-columns:minmax(0,1fr) 370px}.products{grid-template-columns:repeat(5,minmax(0,1fr))}.product{min-height:114px}}
@media(max-width:1200px){.products-layout{grid-template-columns:minmax(0,1fr) 310px;gap:14px}.sales-content{padding:20px 18px 12px}.receipt-fields{gap:8px}.receipt-scroll{padding:12px}.receipt-checkout{padding:12px}.checkout-actions .btn{font-size:10px;padding:10px 7px}}
@media(max-width:900px){.sales-content{padding:18px 18px 12px}.catalog-scroll{max-height:calc(100dvh - 212px)}.receipt{max-height:calc(100dvh - 167px)}.theme-toggle{padding:7px 8px}.top-actions{gap:9px}}
@media(max-width:650px){.sales-content{padding:16px 12px 12px}.sales-content .page-heading{margin-bottom:12px}.sales-content .page-heading h1{font-size:25px}.sales-content .page-heading .eyebrow{display:none}.sales-content .subtitle{font-size:11px;max-width:220px}.products-layout{grid-template-columns:1fr;gap:14px}.catalog-toolbar{gap:8px;margin-bottom:10px}.catalog-toolbar .tab{padding:8px 10px;font-size:10px}.catalog-toolbar .product-search{font-size:11px;width:90px}.catalog-scroll{max-height:350px}.product{min-height:98px;padding:8px;grid-template-columns:46px minmax(0,1fr)}.product-visual,.product-visual img{height:44px;width:46px}.product-control{justify-content:space-between}.product-control small{display:block}.stepper button{width:30px;height:32px}.stepper input{height:32px;min-height:32px;width:42px}.receipt{position:static;max-height:none}.receipt-scroll{max-height:330px}.receipt-title{padding:12px 14px}.receipt-checkout{padding:12px 14px}.checkout-actions .btn{font-size:11px;min-height:40px}.theme-toggle span{display:none}.theme-toggle{width:34px;min-height:34px}.top-actions{gap:6px}.mobile-logo{width:98px}.topbar{gap:9px}.auth-theme-toggle{right:18px;top:18px}}
/* The warm light palette remains available through the same theme toggle. */
html[data-theme=light]{color-scheme:light}
html[data-theme=dark]{color-scheme:dark;--bg:#10151d;--dark:#e8edf5;--text:#e1e7f0;--muted:#9aa7b9;--line:#2b3543;--red:#e45965;--green:#79cda3;--surface:#19212c;--soft:#222c39}
html[data-theme=dark],html[data-theme=dark] body{background:var(--bg);color:var(--text)}
html[data-theme=dark] :is(.sidebar,.topbar,.panel,.stat-card,.product,.receipt,.partner-card,.bonus-rule,.quick-action,.receipt-checkout,dialog){background:var(--surface);border-color:var(--line);color:var(--text)}
html[data-theme=dark] :is(h1,h2,h3,.stat-value,.receipt-total strong,td b,.user-meta b,.mini-stock-row,.activity-row p,.empty strong,.details-list b){color:var(--text)}
html[data-theme=dark] :is(.subtitle,small,.stat-top,.stat-note,.field>span,.check,.operational-note,.breadcrumb,.nav-label,.workspace-label,.footer,.list-count,.filter-label,td,.auth-card>p,.big-clock p){color:var(--muted)}
html[data-theme=dark] :is(.panel-heading,.activity-row,td,.product-control,.sidebar-bottom,.receipt-title){border-color:var(--line)}
html[data-theme=dark] :is(input,select,textarea,.receipt textarea,.filters input,.filters select){background:#121923;border-color:#344151;color:var(--text)}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#75849a}
html[data-theme=dark] :is(input,select,textarea):focus{outline:2px solid #bd566977;border-color:#e0717c}
html[data-theme=dark] input:disabled{color:#7e8ba0;background:#1d2632}
html[data-theme=dark] :is(.btn.secondary,.icon-button,.theme-toggle,.tab,.stepper button,.dialog-heading .close-dialog){background:var(--soft);border-color:#354254;color:#d5deeb}
html[data-theme=dark] .btn.secondary:hover{background:#303d4e}
html[data-theme=dark] :is(.btn.ghost,.remove,.text-link,.proof-link){color:#aebdd0}
html[data-theme=dark] .btn.danger{background:#472530;border-color:#78404d;color:#ffacb7}
html[data-theme=dark] .btn.danger:hover{background:#5c2e3b}
html[data-theme=dark] .btn.dark{background:#354354;color:#f1f4f9}
html[data-theme=dark] .btn.green{background:#24734e;color:#fff}
html[data-theme=dark] .tab.active{background:#d85764;border-color:#d85764;color:#fff}
html[data-theme=dark] .nav-item{color:#a8b5c6}
html[data-theme=dark] .breadcrumb b{color:var(--text)}
html[data-theme=dark] .nav-item:hover{background:#222d3b;color:#fff}
html[data-theme=dark] .nav-item.active{background:#482830;color:#ffadb4}
html[data-theme=dark] .nav-badge{background:#633441;color:#ffc2cb}
html[data-theme=dark] :is(.avatar,.partner-initial){background:#303b4b;color:#c6d6ea}
html[data-theme=dark] :is(th,.hint,.paste-area,.proof-image,.total-strip){background:#202a37;border-color:var(--line);color:#a7b8cd}
html[data-theme=dark] :is(.progress,.mini-stock-row .bar){background:#303c4b}
html[data-theme=dark] .welcome-banner{background:#302c25;border-color:#574735}
html[data-theme=dark] .welcome-banner p{color:#ccb798}
html[data-theme=dark] .welcome-icon{background:#4f402a;color:#e5bc7e}
html[data-theme=dark] .quick-action:hover{background:#253040;border-color:#9a505b}
html[data-theme=dark] .stat-icon{background:#3c3029;color:#ecb187}
html[data-theme=dark] .stat-card:nth-child(2) .stat-icon{background:#322e49;color:#bbade4}
html[data-theme=dark] .stat-card:nth-child(3) .stat-icon{background:#223e34;color:#93d6b6}
html[data-theme=dark] .stat-card:nth-child(4) .stat-icon{background:#273c54;color:#9abfe9}
html[data-theme=dark] .badge{background:#2d3744;color:#c4cdd9}
html[data-theme=dark] :is(.badge.green,.hint.success,.clock-chip.on){background:#203d32;color:#9ee0ba;border-color:#355a47}
html[data-theme=dark] :is(.badge.orange,.hint.warning){background:#443725;color:#edc790}
html[data-theme=dark] :is(.badge.red,.auth-error){background:#492b35;color:#ffb6bf}
html[data-theme=dark] .badge.blue{background:#293c56;color:#adcbf2}
html[data-theme=dark] .clock-chip{background:#222c39;border-color:var(--line);color:#aebcd0}
html[data-theme=dark] .product-price{color:#ff9b86}
html[data-theme=dark] .product.selected{background:#242832;border-color:#da7480}
html[data-theme=dark] .stepper input{background:transparent}
html[data-theme=dark] .auth-form-area{background:var(--bg)}
html[data-theme=dark] .auth-story{background:#171c24}
html[data-theme=dark] .auth-story h1{color:#f5f0e9}
html[data-theme=dark] .auth-story h1 em{color:#eaae75}
html[data-theme=dark] .auth-card .auth-badge{color:#c9ac87}
html[data-theme=dark] .order-line-input button{background:#472c34;color:#f3a4b0}
html[data-theme=dark] dialog::backdrop{background:#050810b0}
html[data-theme=dark] .danger-text{color:#ff9da9}
html[data-theme=dark] .stock-note{color:#d6b181}
html[data-theme=dark] .initial-loading{color:var(--muted)}
.restricted-area{position:relative;min-height:470px;overflow:hidden;border-radius:18px;isolation:isolate}
.restricted-preview{filter:blur(7px);opacity:.55;pointer-events:none;user-select:none;padding:10px}
.restricted-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:24px}
.restricted-placeholder,.restricted-table{background:var(--surface,#fff);border:1px solid var(--line);border-radius:15px}
.restricted-placeholder{padding:24px;display:grid;gap:16px}
.restricted-placeholder span,.restricted-row span,.restricted-placeholder b{display:block;border-radius:5px;background:var(--line);height:12px;width:70%}
.restricted-placeholder b{height:28px;width:40%}
.restricted-table-head{height:64px;background:var(--soft,#f6f5f1);border-radius:15px 15px 0 0}
.restricted-row{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:18px;padding:24px;border-top:1px solid var(--line)}
.restricted-overlay{position:absolute;inset:0;display:grid;place-items:center;padding:24px;background:color-mix(in srgb,var(--bg,#f7f7f3) 35%,transparent)}
.restricted-notice{width:min(100%,450px);padding:32px;text-align:center;border:1px solid var(--line);border-radius:18px;background:var(--surface,#fff);color:var(--text,#20252a);box-shadow:0 16px 60px #0002}
.restricted-lock{display:inline-flex;padding:14px;margin-bottom:18px;border-radius:50%;background:var(--soft,#f6f5f1);color:var(--red)}
.restricted-lock svg{width:30px;height:30px}
.restricted-notice h2{font-size:22px;margin:0 0 12px}
.restricted-notice p{font-size:13px;line-height:1.6;color:var(--muted);margin:0 0 24px}
@media(max-width:650px){.restricted-area{min-height:430px}.restricted-stats{gap:10px}.restricted-placeholder{padding:16px}.restricted-notice{padding:25px 18px}.restricted-notice h2{font-size:20px}.restricted-overlay{padding:14px}}
