:root {
    --bg: #f5f6f8;
    --panel: #ffffff;
    --ink: #1f2933;
    --muted: #697386;
    --line: #dde3ea;
    --brand: #006d77;
    --brand-dark: #07545d;
    --accent: #f4a261;
    --ok: #157f3b;
    --bad: #b42318;
    --warn: #b54708;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--ink); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: #172026; color: #f8fafc; padding: 20px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; background: var(--accent); color: #1b1b1b; font-weight: 800; }
.brand strong { display: block; line-height: 1.2; }
.brand small, .topbar span, small, .muted { color: var(--muted); }
.sidebar .brand small { color: #b8c1cc; }
.nav { margin-top: 28px; }
.nav p { margin: 22px 8px 8px; color: #93a4b7; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.nav a { display: flex; gap: 10px; align-items: center; padding: 11px 10px; border-radius: 8px; color: #dce5ee; }
.nav a span { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #445462; border-radius: 6px; font-size: 12px; }
.nav a:hover, .nav a.active { background: #24313a; color: #fff; }
.main { padding: 24px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.topbar h1 { margin: 0; font-size: 26px; }
.topbar form { display: flex; align-items: center; gap: 10px; }
.user { color: var(--ink); font-weight: 700; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.panel h2 { margin: 0 0 14px; font-size: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr); align-items: start; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stats.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 8px; }
.stats article { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.stats span { color: var(--muted); font-size: 13px; }
.stats strong { display: block; font-size: 25px; margin: 8px 0 2px; }
.btn { border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); padding: 9px 13px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-height: 38px; }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { background: transparent; color: inherit; }
.btn.small { min-height: 32px; padding: 6px 9px; font-size: 13px; }
.btn.wide, .wide { width: 100%; }
.alert { border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid transparent; }
.alert.ok { color: #075e2b; background: #e9f8ef; border-color: #b7e5c5; }
.alert.bad { color: #9f1d14; background: #fff0ee; border-color: #ffc7c2; }
label { display: grid; gap: 7px; margin-bottom: 13px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(0, 109, 119, .18); border-color: var(--brand); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pill { display: inline-flex; align-items: center; min-height: 26px; border-radius: 999px; padding: 4px 9px; background: #eef2f6; color: #334155; font-size: 12px; font-weight: 700; }
.pill.active, .pill.completed { background: #e9f8ef; color: var(--ok); }
.pill.overtime { background: #fff2df; color: var(--warn); }
.pill.expired, .pill.cancelled { background: #fff0ee; color: var(--bad); }
.rules { padding: 12px; background: #f9fafb; border: 1px dashed #c7d0da; border-radius: 8px; color: #475467; margin: 6px 0 14px; }
.menu-list { display: grid; gap: 8px; }
.menu-row { grid-template-columns: 1fr 90px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 0; }
.menu-row span { display: grid; gap: 3px; }
.summary { display: grid; grid-template-columns: 140px 1fr; gap: 10px 14px; margin: 0 0 18px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 700; }
.sticky { position: sticky; top: 18px; }
.search { display: flex; gap: 8px; align-items: center; }
.search input { width: 240px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.timer { display: block; font-size: 20px; font-weight: 800; color: var(--brand); }
.timer.due { color: var(--warn); }
.timer.over { color: var(--bad); }
.empty { max-width: 520px; margin: 10vh auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 26px; text-align: center; }
.guest { background: linear-gradient(140deg, #eff6f7, #fff7ed); min-height: 100vh; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 24px; box-shadow: 0 14px 45px rgba(15, 23, 42, .12); }
.login-brand { margin-bottom: 22px; }
code { background: #eef2f6; padding: 2px 5px; border-radius: 5px; }
@media (max-width: 980px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; }
    .nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
    .nav p { grid-column: 1 / -1; margin-top: 12px; }
    .grid.two, .stats { grid-template-columns: 1fr; }
    .topbar { align-items: flex-start; flex-direction: column; }
    .field-grid { grid-template-columns: 1fr; }
    .sticky { position: static; }
}
@media (max-width: 560px) {
    .main { padding: 16px; }
    .search { width: 100%; flex-direction: column; }
    .search input, .search .btn { width: 100%; }
    .summary { grid-template-columns: 1fr; }
}

.desktop-pos { background: #eef2f4; min-height: 100vh; }
.pos-top { min-height: 76px; display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; padding: 14px 22px; background: #101820; color: #fff; border-bottom: 4px solid var(--accent); }
.pos-top small, .pos-top span { color: #cbd5df; }
.pos-top form { display: flex; align-items: center; gap: 10px; }
.pos-switch { display: flex; gap: 8px; background: #1e2a33; border-radius: 8px; padding: 5px; }
.pos-switch a { min-width: 88px; text-align: center; border-radius: 6px; padding: 10px 12px; color: #dce5ee; font-weight: 800; }
.pos-switch a.active { background: #fff; color: #101820; }
.pos-main { padding: 18px; }
.desktop-pos .panel { box-shadow: 0 8px 25px rgba(15, 23, 42, .08); }
.desktop-pos .panel h2 { font-size: 22px; }
.desktop-pos input, .desktop-pos select, .desktop-pos textarea { min-height: 48px; font-size: 16px; }
.desktop-pos .field-grid { gap: 16px; }
.pos-workspace { grid-template-columns: minmax(0, 1fr) 360px; }
.pos-select-large, .pos-number, .scan-input { font-size: 20px; font-weight: 800; }
.pos-pay { min-height: 68px; font-size: 20px; margin-top: 12px; }
.scan-status { min-height: 18px; font-weight: 700; }
.scan-status.ok { color: var(--ok); }
.scan-status.bad { color: var(--bad); }
.desktop-pos .menu-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.desktop-pos .menu-row { min-height: 76px; background: #fff; }
.desktop-pos .menu-row input { font-size: 20px; font-weight: 800; text-align: center; }
.desktop-pos .summary { font-size: 15px; }
.hour-bars { display: grid; gap: 10px; }
.hour-row { display: grid; grid-template-columns: 58px 1fr 44px; gap: 12px; align-items: center; }
.hour-row div { height: 18px; border-radius: 999px; background: #eef2f6; overflow: hidden; }
.hour-row i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.hour-row strong { text-align: right; }
@media (max-width: 980px) {
    .pos-top { grid-template-columns: 1fr; }
    .pos-workspace { grid-template-columns: 1fr; }
    .desktop-pos .menu-list { grid-template-columns: 1fr; }
}
