/* Dark mode for the whole app. Applies only when <html data-kp-theme="dark">. Colors only; no layout change, so Arabic RTL is untouched. */
html[data-kp-theme=dark]{color-scheme:dark;--ink:#e6edf6;--muted:#9fb0c6;--line:#243756;--bg:#0b1422;--shadow:0 8px 28px rgba(0,0,0,.35)}
html[data-kp-theme=dark] body{background:#0b1422;color:#e6edf6}
html[data-kp-theme=dark] .sidebar{background:linear-gradient(180deg,#0f1b30 0%,#0b1527 100%);border-inline-start:1px solid #1d2f4b}
html[data-kp-theme=dark] .topbar{background:#0f1a2e;border-bottom:1px solid #22344f;box-shadow:none}
html[data-kp-theme=dark] .top-brand b,html[data-kp-theme=dark] .crumb{color:#e6edf6}
html[data-kp-theme=dark] .top-brand span{color:#9fb0c6;border-inline-start-color:#2a4062}
html[data-kp-theme=dark] .icon-btn,html[data-kp-theme=dark] .language-btn,html[data-kp-theme=dark] .date-chip,html[data-kp-theme=dark] .select-chip,html[data-kp-theme=dark] .outline-btn{background:#14233b;border-color:#2a4062;color:#d5dfeb;box-shadow:none}
html[data-kp-theme=dark] .icon-btn:hover,html[data-kp-theme=dark] .outline-btn:hover,html[data-kp-theme=dark] .language-btn:hover{background:#1a2d4a;border-color:#f2a34a;color:#f6c27e}
html[data-kp-theme=dark] .top-avatar{background:#1f3556;color:#fff}
html[data-kp-theme=dark] .notification-dot{border-color:#0f1a2e}
html[data-kp-theme=dark] .welcome-row h1,html[data-kp-theme=dark] .page-title h1,html[data-kp-theme=dark] .section-head h2,html[data-kp-theme=dark] .panel-heading h3{color:#f3f7fc}
html[data-kp-theme=dark] .welcome-row p,html[data-kp-theme=dark] .page-title p,html[data-kp-theme=dark] .section-head p,html[data-kp-theme=dark] .panel-heading p{color:#9fb0c6}
html[data-kp-theme=dark] .eyebrow{color:#f2a34a}
html[data-kp-theme=dark] .kpi-card,html[data-kp-theme=dark] .panel{background:#121f33;border-color:#243756;box-shadow:0 8px 24px rgba(0,0,0,.28)}
html[data-kp-theme=dark] .kpi-top{color:#b9c6d8}
html[data-kp-theme=dark] .kpi-value{color:#f3f7fc}
html[data-kp-theme=dark] .kpi-value small,html[data-kp-theme=dark] .kpi-foot{color:#9fb0c6}
html[data-kp-theme=dark] .kpi-icon,html[data-kp-theme=dark] .kpi-icon.violet,html[data-kp-theme=dark] .kpi-icon.green,html[data-kp-theme=dark] .kpi-icon.amber,html[data-kp-theme=dark] .kpi-icon.blue{background:#2a2217!important;color:#f2a34a!important}
html[data-kp-theme=dark] .notice{background:#241d12;border-color:#5b4222}
html[data-kp-theme=dark] .notice b{color:#f3d9ae}
html[data-kp-theme=dark] .notice small{color:#cdb88f}
html[data-kp-theme=dark] .notice-icon{background:#3a2c14;color:#f2a34a}
html[data-kp-theme=dark] .demo-pill{background:#2a2217;color:#f2c27e}
html[data-kp-theme=dark] .progress-track,html[data-kp-theme=dark] .bar{background:#1f3350}
html[data-kp-theme=dark] .legend-gray{background:#5b6f8c}
html[data-kp-theme=dark] .chart-hours{color:#9fb0c6}
html[data-kp-theme=dark] .chart-insight{background:#0f1a2e;border-color:#243756;color:#b9c6d8}
html[data-kp-theme=dark] .insight-sep{background:#2a4062}
html[data-kp-theme=dark] .recommendation{border-bottom-color:#22344f}
html[data-kp-theme=dark] .recommendation b,html[data-kp-theme=dark] .recommendation strong{color:#eef3fa}
html[data-kp-theme=dark] .recommendation small,html[data-kp-theme=dark] .recommendation p{color:#9fb0c6}
html[data-kp-theme=dark] .rec-number{background:#2a2217;color:#f2a34a}
html[data-kp-theme=dark] table{color:#d5dfeb}
html[data-kp-theme=dark] th{background:#0f1a2e;color:#b9c6d8}
html[data-kp-theme=dark] td{color:#d5dfeb;border-bottom-color:#22344f}
html[data-kp-theme=dark] .food-thumb{background:#2a2217}
html[data-kp-theme=dark] .status-tag{background:#12332b;color:#6fd6b3}
html[data-kp-theme=dark] .priority-high{background:#3a2616;color:#ffb27a}
html[data-kp-theme=dark] .priority-normal{background:#16304d;color:#8fc0f0}
html[data-kp-theme=dark] .negative,html[data-kp-theme=dark] .stock-low{color:#ffb27a}
html[data-kp-theme=dark] .footer{color:#8497b3;border-top-color:#22344f}
/* form fields everywhere in the app */
html[data-kp-theme=dark] .page input,html[data-kp-theme=dark] .page select,html[data-kp-theme=dark] .page textarea,html[data-kp-theme=dark] .waste-form input,html[data-kp-theme=dark] .waste-form select,html[data-kp-theme=dark] .kp-branch-mirror{background:#14233b!important;color:#eef3fa!important;border-color:#3a5379!important;color-scheme:dark}
html[data-kp-theme=dark] .page input::placeholder{color:#8497b3}
html[data-kp-theme=dark] .page input:focus,html[data-kp-theme=dark] .page select:focus{border-color:#f2a34a!important;box-shadow:0 0 0 3px #f2a34a33}
html[data-kp-theme=dark] .page label>span:first-child,html[data-kp-theme=dark] .live-sales-form label:first-child>span:first-child,html[data-kp-theme=dark] .live-forecast-form label:first-child>span:first-child,html[data-kp-theme=dark] .live-waste-form label:first-child>span:first-child{color:#c3cfdf!important}
html[data-kp-theme=dark] .live-sales-form .kp-btn-help{color:#8497b3}
html[data-kp-theme=dark] .page .primary-btn.outline,html[data-kp-theme=dark] .kp-btn-main{color:#fff}
html[data-kp-theme=dark] .live-sales-metric{background:#0f1a2e;border-color:#243756;color:#e6edf6}
html[data-kp-theme=dark] .live-waste-form,html[data-kp-theme=dark] .live-waste-record{background:#0f1a2e;border-color:#243756}
html[data-kp-theme=dark] .live-stock-movement,html[data-kp-theme=dark] .live-waste-record{border-top-color:#243756}
html[data-kp-theme=dark] .live-prep-result th,html[data-kp-theme=dark] .live-forecast-result th,html[data-kp-theme=dark] .live-waste-result th,html[data-kp-theme=dark] .live-inventory-table th{background:#0f1a2e;color:#b9c6d8}
html[data-kp-theme=dark] .live-prep-result th,html[data-kp-theme=dark] .live-prep-result td,html[data-kp-theme=dark] .live-forecast-result th,html[data-kp-theme=dark] .live-forecast-result td,html[data-kp-theme=dark] .live-waste-result th,html[data-kp-theme=dark] .live-waste-result td,html[data-kp-theme=dark] .live-inventory-table th,html[data-kp-theme=dark] .live-inventory-table td{border-bottom-color:#22344f}
html[data-kp-theme=dark] .live-inventory-table td,html[data-kp-theme=dark] .live-prep-result td,html[data-kp-theme=dark] .live-forecast-result td,html[data-kp-theme=dark] .live-waste-result td{color:#d5dfeb}
html[data-kp-theme=dark] .kp-empty{background:#241d12;border-color:#5b4222;color:#e9c98f}
html[data-kp-theme=dark] .toast{background:#1f3556;color:#fff}
html[data-kp-theme=dark] .page p,html[data-kp-theme=dark] .page small{color:inherit}
/* theme toggle button in the top bar */
.kp-theme-btn{height:38px;min-width:42px;padding:0 12px;border:1px solid #e3e8ef;border-radius:10px;background:#fff;color:#263f63;font:700 15px inherit;cursor:pointer;line-height:1}
.kp-theme-btn:hover{border-color:#e99a31;color:#9b6118}
html[data-kp-theme=dark] .kp-theme-btn{background:#14233b;border-color:#2a4062;color:#f6c27e}
html[data-kp-theme=dark] .item-cell{color:#eef3fa}
html[data-kp-theme=dark] .food-thumb{background:#2a2217;color:#f2a34a}
html[data-kp-theme=dark] .page h1,html[data-kp-theme=dark] .page h2,html[data-kp-theme=dark] .page h3,html[data-kp-theme=dark] .page h4{color:#f3f7fc!important}
html[data-kp-theme=dark] .live-stock-movement h3,html[data-kp-theme=dark] .live-stock-movement h4,html[data-kp-theme=dark] .live-waste-record h3,html[data-kp-theme=dark] .live-waste-record h4{color:#f3f7fc!important}
/* customer-mode notice and sign-out button (added styles use higher specificity than the inline ones) */
html[data-kp-theme=dark] .customer-mode-status{background:#241d12;border-color:#5b4222;color:#f3d9ae}
html[data-kp-theme=dark] .customer-mode-status strong{color:#f6e3bd}
html[data-kp-theme=dark] .customer-mode-status p{color:#d9c49a}
html[data-kp-theme=dark] .kp-logout{background:#14233b;border-color:#2a4062;color:#d5dfeb}
html[data-kp-theme=dark] .kp-logout:hover{border-color:#f2a34a;color:#f6c27e}
