:root{
  --bg:#f4f5f3; --card:#fff; --ink:#1f2420; --muted:#6b7268;
  --line:#e2e4df; --accent:#2f6e4f; --accent-ink:#fff;
  --warn:#c97a1b; --danger:#c0392b; --ready:#2f6e4f;
  --radius:14px; --gap:14px;
}
*{box-sizing:border-box}
body{
  margin:0; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  background:var(--bg); color:var(--ink); min-height:100vh;
}
header.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 20px; background:var(--card); border-bottom:1px solid var(--line);
  position:sticky; top:0; z-index:10;
}
header.topbar h1{font-size:1.15rem; margin:0}
header.topbar .who{font-size:.85rem; color:var(--muted)}
button{
  font:inherit; border:none; border-radius:10px; padding:12px 16px;
  cursor:pointer; background:var(--accent); color:var(--accent-ink);
  min-height:44px;
}
button.secondary{background:#e9eae6; color:var(--ink)}
button.danger{background:var(--danger); color:#fff}
button:disabled{opacity:.5; cursor:default}
input,select,textarea{
  font:inherit; padding:12px; border:1px solid var(--line); border-radius:10px;
  width:100%; background:#fff;
}
main{padding:20px; max-width:900px; margin:0 auto}
.card{background:var(--card); border-radius:var(--radius); padding:16px; box-shadow:0 1px 3px rgba(0,0,0,.06)}
.grid{display:grid; gap:var(--gap); grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}
.tile{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:22px 10px; border-radius:var(--radius); font-size:1.3rem; font-weight:600;
  color:#fff; min-height:90px; border:none; cursor:pointer;
}
.tile small{font-size:.75rem; font-weight:400; margin-top:4px; opacity:.9}
.tile.available{background:var(--accent)}
.tile.occupied{background:var(--warn)}
.tile.awaiting_payment{background:var(--danger)}
.toast{
  position:fixed; top:16px; left:50%; transform:translateX(-50%);
  background:var(--ink); color:#fff; padding:12px 20px; border-radius:10px;
  z-index:100; max-width:90vw; text-align:center;
}
.badge{display:inline-block; padding:3px 9px; border-radius:999px; font-size:.75rem; color:#fff}
.badge.sent_to_kitchen,.badge.open{background:var(--warn)}
.badge.preparing{background:#3a6fb0}
.badge.ready{background:var(--ready)}
.row{display:flex; align-items:center; justify-content:space-between; gap:10px}
.list>*+*{margin-top:10px}
.order-card{background:#fff; border-radius:var(--radius); padding:14px; box-shadow:0 1px 3px rgba(0,0,0,.08); border-left:6px solid var(--warn)}
.order-card.ready{border-left-color:var(--ready)}
.item-line{display:flex; align-items:center; justify-content:space-between; padding:10px 0; border-bottom:1px solid var(--line)}
.item-line:last-child{border-bottom:none}
.item-line.done{opacity:.4; text-decoration:line-through}
.qty-box{display:flex; align-items:center; gap:10px}
.qty-box button{min-width:40px; padding:8px}
.tabs{display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap}
.tabs button{background:#e9eae6; color:var(--ink)}
.tabs button.active{background:var(--ink); color:#fff}
.menu-cat{margin:18px 0 8px; font-weight:600; color:var(--muted); text-transform:uppercase; font-size:.8rem}
.login-wrap{display:flex; align-items:center; justify-content:center; min-height:100vh; padding:20px}
.login-card{width:100%; max-width:360px}
.login-card h1{text-align:center; margin-bottom:4px}
.login-card p{text-align:center; color:var(--muted); margin-top:0}
.login-card label{display:block; margin:14px 0 6px; font-size:.9rem}
.err{color:var(--danger); font-size:.9rem; min-height:1.2em; margin-top:10px}
.empty{color:var(--muted); text-align:center; padding:40px 0}

/* Kelno branding */
header.topbar h1.brand{display:flex; align-items:center; gap:10px}
.brand-mark{width:30px; height:30px; border-radius:8px}
.brand-logo{display:block; width:72px; height:72px; margin:0 auto 10px; border-radius:18px}

/* ---- Kelno v2 additions ---- */
.badge.pending{background:#b8392b}
.badge.rejected{background:#6b7268}
.badge.paid{background:#6b7268}
.badge.ch{background:#3a6fb0}
.badge.ch.takeaway{background:#7a4cb0}
.badge.ch.wolt{background:#009de0}
.badge.ch.uber{background:#111}
.badge.ch.lieferando{background:#ff8000}
.tabs button{white-space:nowrap}
.tabs{overflow-x:auto}
.sw{position:relative; display:inline-block; width:46px; height:26px; flex:none}
.sw input{opacity:0; width:0; height:0}
.sw span{position:absolute; inset:0; background:#c8cbc5; border-radius:26px; cursor:pointer; transition:.2s}
.sw span:before{content:""; position:absolute; height:20px; width:20px; left:3px; top:3px; background:#fff; border-radius:50%; transition:.2s}
.sw input:checked + span{background:var(--accent)}
.sw input:checked + span:before{transform:translateX(20px)}
.muted{color:var(--muted); font-size:.85rem}
.inline{display:flex; gap:8px; flex-wrap:wrap; align-items:center}
.inline > input,.inline > select{flex:1 1 140px; width:auto}
.thumb{width:44px; height:44px; border-radius:10px; object-fit:cover; background:#e9eae6; flex:none}
.big-logo{display:block; width:120px; height:120px; margin:0 auto 14px; border-radius:28px}
.pill{display:inline-block; padding:2px 8px; border-radius:999px; background:#e9eae6; font-size:.75rem}
button.small{padding:6px 10px; min-height:34px; font-size:.85rem}
.incoming{border-left:6px solid #b8392b}
