.theme-toggle{flex-shrink:0;min-width:36px}
.theme-toggle .icon{width:18px;height:18px}
.theme-to-light{display:none;align-items:center;gap:7px}
.theme-to-dark{display:inline-flex;align-items:center;gap:7px}
html[data-theme=dark] .theme-to-light{display:inline-flex}
html[data-theme=dark] .theme-to-dark{display:none}
.topbar>.actions{flex-wrap:nowrap}
.login-controls{position:absolute;right:30px;top:24px;display:flex;align-items:center;gap:14px}
@media(max-width:700px){.login-controls{top:19px;right:22px;left:22px;justify-content:flex-end}}
@media(max-width:480px){.theme-toggle .theme-label{display:none}}

@media screen{
    :root{color-scheme:light}
    html[data-theme=dark]{color-scheme:dark;--bg:#101815;--surface:#18231e;--ink:#e5ece6;--muted:#a7b8ae;--line:#33463a;--link:#c2dcaa;--red:#ffaba2;--amber:#efc384}
    html[data-theme=dark] .sidebar,html[data-theme=dark] .login-story{background:#122b23}
    html[data-theme=dark] .topbar,html[data-theme=dark] .panel,html[data-theme=dark] .receipt-page{background:var(--surface)}
    html[data-theme=dark] .btn{background:var(--surface);color:var(--ink);border-color:var(--line)}
    html[data-theme=dark] .btn:hover{background:#293e30}
    html[data-theme=dark] .btn.primary{background:#345e40;border-color:#648451;color:#fff}
    html[data-theme=dark] .btn.primary:hover{background:#426e4b}
    html[data-theme=dark] .btn.danger{color:var(--red);border-color:#7e4941}
    html[data-theme=dark] .metric{border-color:var(--line)}
    html[data-theme=dark] .tab{background:#202e25;border-color:var(--line);color:var(--ink)}
    html[data-theme=dark] .tab:hover{background:#2d4433}
    html[data-theme=dark] .tab.active{background:var(--lime);border-color:var(--lime);color:#183020}
    html[data-theme=dark] .dining-table{background:#1b2a22;border-color:#7a9c85;color:var(--ink)}
    html[data-theme=dark] .dining-table:before,html[data-theme=dark] .dining-table:after,html[data-theme=dark] .chairs:before,html[data-theme=dark] .chairs:after{background:#263b2d;border-color:#7a9c85}
    html[data-theme=dark] .dining-table .state{color:#a9d89c}
    html[data-theme=dark] .dining-table.busy{background:#30452a;border-color:#98ba71}
    html[data-theme=dark] .dining-table.busy .state{color:#d1e8a6}
    html[data-theme=dark] .dining-table.overdue{background:#493921;border-color:#cbaa6f}
    html[data-theme=dark] .dining-table.overdue .state{color:#f3cf92}
    html[data-theme=dark] .ring{border-color:#4d6539}
    html[data-theme=dark] th{background:#202e25}
    html[data-theme=dark] th,html[data-theme=dark] td{border-color:var(--line)}
    html[data-theme=dark] tbody tr:hover{background:#202e25}
    html[data-theme=dark] .status{background:#293e2c;color:#bddbae}
    html[data-theme=dark] .status.pending,html[data-theme=dark] .status.open,html[data-theme=dark] .status.confirmed,html[data-theme=dark] .status.draft{background:#493921;color:#f3cf92}
    html[data-theme=dark] .status.preparing{background:#29364f;color:#b8caf8}
    html[data-theme=dark] .status.cancelled,html[data-theme=dark] .status.refunded,html[data-theme=dark] .status.no-show{background:#4c2e2b;color:#ffb7ac}
    html[data-theme=dark] .status.ready{background:#30452a;color:#d1e8a6}
    html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea{background:#142018;border-color:#4a6150;color:var(--ink)}
    html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:#97aa9d;opacity:1}
    html[data-theme=dark] input:focus,html[data-theme=dark] select:focus,html[data-theme=dark] textarea:focus{border-color:#abc98c}
    html[data-theme=dark] .locale select{background:transparent;border:0}
    html[data-theme=dark] option{background:var(--surface);color:var(--ink)}
    html[data-theme=dark] label{color:#bfcec3}
    html[data-theme=dark] .alert{background:#283c22;border-color:#4b6540;color:#d1e8b7}
    html[data-theme=dark] .alert.error{background:#452923;border-color:#795049;color:#ffbeb2}
    html[data-theme=dark] .note{background:#293526;color:#c1d2b1}
    html[data-theme=dark] .count{background:#35482d;color:#d4e4c4}
    html[data-theme=dark] .help-step:before{background:#35482d;color:#d4e4c4}
    html[data-theme=dark] .login-art .dining-table{background:transparent;color:var(--lime)}
}
@media print{.theme-toggle{display:none!important}}
