/* Theme switcher and dark palette overrides. */
.theme-toggle{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:rgba(245,247,250,.72);color:#647184;cursor:pointer;transition:background .2s,color .2s,transform .2s}
.theme-toggle:hover{background:#fff;color:#e28a46;transform:translateY(-1px)}
.theme-toggle-icon{font-size:19px;line-height:1}
body[data-theme="dark"]{color-scheme:dark;--ink:#e7ebf1;--muted:#a2adbc;--line:#303b4a;--bg:#141b25;--sidebar:#101721;background:var(--bg);color:var(--ink)}
body[data-theme="dark"] .main-content{background:#141b25}
body[data-theme="dark"] .topbar{background:rgba(27,36,49,.9);border-bottom-color:#303b4a;box-shadow:0 5px 22px rgba(0,0,0,.16)}
body[data-theme="dark"] .breadcrumbs,body[data-theme="dark"] .today-label,body[data-theme="dark"] .icon-button{color:#aeb8c6}
body[data-theme="dark"] .breadcrumbs strong{color:#edf1f6}
body[data-theme="dark"] .theme-toggle{background:#303a49;color:#f3bd72}
body[data-theme="dark"] .theme-toggle:hover{background:#3a4657;color:#ffd18a}
body[data-theme="dark"] :is(.metric-card,.panel,.cart-panel,.floor-table,.menu-item,.workspace,.help-card,.channel-switch,.filter-button,.search-box,.cart-table-select,.modal-card,.auth-form-wrap,.checkout-metric,.open-checks-panel,.account-detail-panel,.discount-box,.open-check-card,.cash-refresh,.tenant-features-panel,.permission-editor,.access-summary,.user-management,.support-panel,.catalog-product,.catalog-category-card,.catalog-empty,.floor-toolbar,.kds-card){background:rgba(34,44,59,.88);border-color:rgba(134,151,172,.2);color:#e2e8ef;box-shadow:0 10px 30px rgba(0,0,0,.16)}
body[data-theme="dark"] :is(.metric-card,.panel,.cart-panel,.menu-item,.kds-card){backdrop-filter:blur(18px) saturate(120%);-webkit-backdrop-filter:blur(18px) saturate(120%)}
body[data-theme="dark"] :is(h1,h2,h3,h4,b,strong,.metric-value,.panel-heading h2,.cart-heading h2,.mini-table b,.activity-text b,.activity-amount,.channel-list b,.floor-table-head b,.table-total b,.cart-totals .total-line,.cart-totals .total-line b,.cart-heading p,.cash-panel-heading h2,.account-detail-head h2,.account-empty h2,.open-check-info>b,.open-check-amount,.bill-total,.bill-total>b,.catalog-product-name,.checkout-metric b,.table-toolbar h2,.permission-editor h3,.support-title h2,.modal-card h2){color:#e9eef5}
body[data-theme="dark"] :is(p,small,.eyebrow,.metric-top,.metric-foot,.panel-heading p,.welcome-row p,.page-heading p,.mini-table span,.activity-text,.activity-text small,.breadcrumbs span,.today-label,.cart-heading p,.cash-panel-heading p,.account-empty p,.account-detail-head p,.catalog-product-description,.checkout-metric span,.table-toolbar p,.permission-editor-head p,.support-title p,.data-table td,.bill-item,.bill-line,.cashier-note,.empty-check-list){color:#a5b0bf}
body[data-theme="dark"] :is(.button-secondary,.panel-heading select,.cart-table-select select,.permission-editor-head select,.discount-controls button,.discount-controls select,.discount-controls input,.form-input,.filter-button,.search-box,.table-search input,.user-search input){background:#222d3c;border-color:#3c495b;color:#e1e7ee}
body[data-theme="dark"] :is(.button-secondary,.logout-button){background:#263243;border-color:#3c495b;color:#dce4ee}
body[data-theme="dark"] :is(.open-check-card,.discount-box,.checkout-metric){background:rgba(28,38,52,.82)}
body[data-theme="dark"] .open-check-card:hover{background:#2c394c}
body[data-theme="dark"] .open-check-card.selected{background:rgba(111,75,48,.3)}
body[data-theme="dark"] :is(.data-table th,.tenant-detail,.tenant-features-panel,.permission-option,.table-mini-grid,.activity-item,.floor-toolbar,.cart-totals .total-line,.bill-order,.account-detail-head){border-color:#354152}
body[data-theme="dark"] .data-table th{background:#202b39;color:#aab5c4}
body[data-theme="dark"] .data-table td>b{color:#e2e8ef}
body[data-theme="dark"] .tenant-detail{background:#1d2735}
body[data-theme="dark"] .floor-table{background:linear-gradient(145deg,rgba(42,54,70,.94),rgba(31,42,57,.94))}
body[data-theme="dark"] .table-surface{background:#354458;color:#e9eef5}
body[data-theme="dark"] .donut:after{background:#222c3b}
body[data-theme="dark"] .auth-screen{background:#161e29}
body[data-theme="dark"] .auth-form-side{background:radial-gradient(ellipse at 80% 10%,rgba(240,161,104,.08),transparent 40%),#161e29}
body[data-theme="dark"] .auth-form-wrap{background:rgba(34,44,59,.92)}
body[data-theme="dark"] .auth-form-head h2,body[data-theme="dark"] .auth-mobile-brand b{color:#edf1f6}
body[data-theme="dark"] .form-label{color:#c3ccd8}
body[data-theme="dark"] .form-input::placeholder{color:#7e8a9b}
body[data-theme="dark"] .modal-card{background:rgba(34,44,59,.97)}
body[data-theme="dark"] .modal-card p{color:#a5b0bf}
body[data-theme="dark"] .cart-totals{color:#aab5c4}
body[data-theme="dark"] .cart-totals b,body[data-theme="dark"] .bill-line>b,body[data-theme="dark"] .bill-item strong{color:#e1e7ee}
body[data-theme="dark"] .empty-check-list>b{color:#d0d8e2}
body[data-theme="dark"] .support-notice{background:#403727;color:#e2bd83}
body[data-theme="dark"] .table-mini-grid .mini-table,body[data-theme="dark"] .permission-option,body[data-theme="dark"] .discount-controls button{background:#263243}
body[data-theme="dark"] .chart-grid line,body[data-theme="dark"] .grid-lines i{stroke:#394657;border-color:#394657}
body[data-theme="dark"] .chart-y,body[data-theme="dark"] .chart-x,.chart-y,.chart-x{color:#929eae}
@media(max-width:560px){.top-actions{gap:10px}.theme-toggle{width:31px;height:31px}}

/* Kitchen Kanban: keep each surface and status readable in dark mode. */
body[data-theme="dark"] .kds-column{background:#1c2634;border-color:#3a485b;box-shadow:0 10px 28px rgba(0,0,0,.22)}
body[data-theme="dark"] .kds-column-head{background:#263346;border-bottom-color:#3b4a5e}
body[data-theme="dark"] .kds-column-head h2{color:#f1f5fa}
body[data-theme="dark"] .kds-column-head small{color:#aebacc}
body[data-theme="dark"] .kds-column-count{background:#493723;color:#ffd19a}
body[data-theme="dark"] .kds-column:nth-child(2) .kds-column-count{background:#2e3e64;color:#c6d4ff}
body[data-theme="dark"] .kds-column:nth-child(3) .kds-column-count{background:#493a27;color:#f5d29c}
body[data-theme="dark"] .kds-column:nth-child(4) .kds-column-count{background:#254536;color:#a9e9c2}
body[data-theme="dark"] .kds-column:nth-child(5) .kds-column-count{background:#303c5a;color:#c2ceff}
body[data-theme="dark"] .kds-column-empty{color:#b6c1d0}
body[data-theme="dark"] .kds-column-empty span{background:#254536;color:#9fe2bb}
body[data-theme="dark"] .kds-column-empty b{color:#e1e8f0}
body[data-theme="dark"] .kds-column-empty small{color:#aab6c5}
body[data-theme="dark"] .kds-card{background:#273446;border-color:#3c4a5d;color:#e8edf4}
body[data-theme="dark"] .kds-card-head{border-bottom-color:#3d4b5e}
body[data-theme="dark"] .kds-order-type,body[data-theme="dark"] .kds-order-table{color:#aebacc}
body[data-theme="dark"] .kds-timer{background:#4a3523;color:#ffd09a}
body[data-theme="dark"] .kds-item span{color:#e0e7ef}
body[data-theme="dark"] .kds-item small{color:#abb7c7}
body[data-theme="dark"] .kds-order-note{background:#443626;color:#f0c58f}
body[data-theme="dark"] .kds-card-foot{border-top-color:#3d4b5e}
body[data-theme="dark"] .kds-card-foot button{background:#303d50;border-color:#46556a;color:#dce4ee}
body[data-theme="dark"] .kds-card-foot button.primary{background:#5a3a25;border-color:#704b31;color:#ffd1a8}
body[data-theme="dark"] .kds-card.preparing .kds-card-foot button.primary{background:#2e3e64;border-color:#465a89;color:#c6d5ff}
body[data-theme="dark"] .kds-card.ready .kds-card-foot button.primary,body[data-theme="dark"] .kds-card-foot button.complete{background:#254536;border-color:#35684e;color:#b4efca}
body[data-theme="dark"] .kds-stage-setting-row{background:#202c3b;border-color:#3a485b}
body[data-theme="dark"] .kds-stage-setting-row.inactive{background:#1b2532}
body[data-theme="dark"] .kds-stage-setting-info input{background:#17212d;border-color:#3c4a5d;color:#e5ebf2}
body[data-theme="dark"] .kds-stage-setting-info span,body[data-theme="dark"] .kds-stage-footnote{color:#aab6c5}
body[data-theme="dark"] .kds-stage-setting-actions button{background:#2b394b;border-color:#46556a;color:#d6dfea}
body[data-theme="dark"] .kds-stage-setting-actions button:hover{background:#35465b}
body[data-theme="dark"] .kds-stage-setting-actions button.danger{background:#482f35;border-color:#694049;color:#ffc0c4}
body[data-theme="dark"] .kds-stage-setting-actions button.restore{background:#254536;border-color:#35684e;color:#b4efca}
body[data-theme="dark"] .kds-stage-add-form{border-top-color:#3b495c}
body[data-theme="dark"] .kds-stage-empty{color:#b2bdcb}
