/* Tafelbestellingen: huisstijl (navy / petrol / geel), rustig en zakelijk. */
:root {
  --navy: #1e1c3c;
  --navy-2: #2c2a52;
  --teal: #239a98;
  --teal-dark: #1b7c7a;
  --yellow: #f9e830;
  --mint: #e4f4f4;

  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --text: #17162a;
  --muted: #6b6e7d;
  --line: #e2e4ea;
  --line-2: #d3d6de;
  --danger: #d6204e;
  --danger-bg: #fdecef;
  --warn-bg: #fff9d6;

  --vrij: #239a98;
  --bezet: #4a46a0;
  --besteld: #f9e830;
  --betaald: #9a98b5;

  --r-sm: 0;
  --r: 0;
  --r-lg: 0;
  --shadow: 0 1px 2px rgba(23, 22, 42, .05), 0 4px 16px rgba(23, 22, 42, .06);
  --heading: "Montserrat", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Inter", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { margin: 0; line-height: 1.2; font-family: var(--heading); }
h1 { font-size: 1.05rem; font-weight: 700; letter-spacing: .01em; }
h2 { font-size: 1.15rem; font-weight: 700; color: var(--navy); }
h3 { font-family: inherit; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
a { color: inherit; }
[hidden] { display: none !important; }
.meta { color: var(--muted); font-size: .86rem; }

/* ---------- Knoppen ---------- */
button, .btn {
  font: inherit;
  font-weight: 600;
  font-size: .9rem;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--navy);
  border-radius: var(--r);
  padding: .5rem .9rem;
  min-height: 40px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  touch-action: manipulation;
  transition: background .12s, border-color .12s, color .12s;
}
button:hover, .btn:hover { background: var(--surface-2); border-color: var(--muted); }
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
button:disabled { opacity: .4; cursor: not-allowed; }
button:disabled:hover { background: var(--surface); border-color: var(--line-2); }
button.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
button.primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
button.primary:disabled:hover { background: var(--teal); border-color: var(--teal); }
button.cta { background: var(--yellow); border-color: #e6d400; color: var(--navy); }
button.cta:hover { background: #f2e01c; border-color: #d9c800; }
button.cta:disabled:hover { background: var(--yellow); }
button.danger { color: var(--danger); }
button.danger:hover { background: var(--danger-bg); border-color: var(--danger); }
button.big { min-height: 48px; font-size: .95rem; flex: 1 1 0; min-width: 0; }
button.small { min-height: 30px; padding: .2rem .6rem; font-size: .8rem; border-radius: var(--r-sm); }
button.active { background: var(--navy); border-color: var(--navy); color: #fff; }
button.full { width: 100%; flex: none; }
button.link { border: 0; background: none; color: var(--muted); min-height: 28px; padding: 0; font-size: .82rem; font-weight: 500; text-decoration: underline; align-self: center; }
button.link:hover { background: none; color: var(--danger); }

input, select, textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: .5rem .7rem;
  min-height: 40px;
  width: 100%;
}
input:focus, select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(35, 154, 152, .15); }

/* ---------- Bovenbalk ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .6rem 1.25rem;
  min-height: 60px;
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar h1 { color: #fff; }
.topbar .spacer { flex: 1; }
.topbar nav { display: flex; gap: .4rem; flex-wrap: wrap; }
.topbar button, .topbar .btn { background: transparent; border-color: rgba(255, 255, 255, .28); color: #fff; min-height: 36px; padding: .3rem .8rem; font-size: .85rem; }
.topbar button:hover, .topbar .btn:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .5); }
.topbar button.active { background: #fff; color: var(--navy); border-color: #fff; }
.topbar button.primary { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: rgba(255, 255, 255, .75); }
.legend span::before {
  content: "";
  display: inline-block;
  width: .7rem; height: .7rem;
  border-radius: 0;
  margin-right: .35rem;
  vertical-align: -1px;
  background: var(--c);
}
.badge {
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  padding: .05rem .45rem;
  min-width: 1.2rem;
  text-align: center;
}

.editbar {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  padding: .6rem 1.25rem;
  background: var(--warn-bg);
  border-bottom: 1px solid #efe39a;
}
.editbar .hint { font-size: .85rem; color: var(--muted); flex-basis: 100%; }

/* ---------- Plattegrond ---------- */
.floor-wrap { padding: 1.25rem; min-width: 0; }
.floor {
  position: relative;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  user-select: none;
  aspect-ratio: 16 / 10;
  container-type: inline-size;
}
.floor.has-image { aspect-ratio: auto; }
.floor img.plan { display: block; width: 100%; height: auto; pointer-events: none; }

/* Een tafel = rechthoek in de kleur van haar status. Breedte/hoogte komen uit de instellingen van de tafel. */
.tbl {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 28px;
  min-height: 28px;
  padding: 2px 4px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--c, var(--vrij));
  color: var(--on, #fff);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), 0 1px 3px rgba(23, 22, 42, .2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  overflow: visible;
  cursor: pointer;
  transition: box-shadow .15s, filter .15s;
  container-type: size; /* tekstgrootte en labels volgen de grootte van de tafel zelf */
}
.tbl:hover { background: var(--c, var(--vrij)); filter: brightness(1.06); }
.tbl .nr { font-family: var(--heading); font-size: clamp(12px, 34cqmin, 22px); font-weight: 700; line-height: 1; }
/* Naam en bedrag staan BINNEN de tafel, en alleen als er plaats genoeg is (nooit over een andere tafel). */
.tbl .tag {
  display: none;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  font-size: clamp(9px, 11cqh, 12px);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}
.tbl .tag span { flex: none; }
.tbl .tag .bk { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; opacity: .9; }
@container (min-height: 38px) and (min-width: 50px) {
  .tbl .tag { display: flex; }
}
@container (max-width: 110px) {
  .tbl .tag .bk { display: none; }
}
.tbl.selected { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--navy); z-index: 3; }
.tbl.s-vrij { --c: var(--vrij); }
.tbl.s-bezet { --c: var(--bezet); }
.tbl.s-besteld { --c: var(--besteld); --on: var(--navy); }
.tbl.s-betaald { --c: var(--betaald); }
.tbl .flag {
  position: absolute;
  top: -8px; right: -8px;
  background: var(--danger);
  color: #fff;
  border: 2px solid var(--surface);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 .25rem;
}
.tbl .flag.pending { background: var(--navy); }
.tbl .link-badge {
  position: absolute;
  bottom: -9px; left: -6px;
  background: var(--navy);
  color: #fff;
  border: 2px solid var(--surface);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 5px;
  white-space: nowrap;
  z-index: 2;
}
.total.linked { background: var(--navy); color: #fff; padding: .7rem .9rem; }
.pay-choice { margin-top: .6rem; border: 1px solid var(--line); background: var(--surface-2); padding: .7rem .8rem; display: flex; flex-direction: column; gap: .5rem; }
.pay-choice > strong { font-size: .85rem; }
.pay-choice button.choice { justify-content: space-between; text-align: left; min-height: 46px; padding: .5rem .9rem; }
.pay-choice button.choice span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pay-choice button.choice strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.total.linked small { font-weight: 500; opacity: .8; font-size: .78rem; }
.tbl.alarm { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(214, 32, 78, .7); }
  50% { box-shadow: 0 0 0 10px rgba(214, 32, 78, 0); }
}
.floor.editing .tbl { cursor: grab; outline: 2px dashed rgba(23, 22, 42, .35); outline-offset: 2px; }
.floor.editing .tbl.dragging { cursor: grabbing; z-index: 5; filter: brightness(1.1); }

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  align-items: start;
}
.panel {
  background: var(--surface);
  border-left: 1px solid var(--line);
  min-height: calc(100vh - 60px);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  overflow-x: hidden;
  position: sticky;
  top: 60px;
}
.panel-inner { padding: 1.25rem 1.25rem 2.75rem; display: flex; flex-direction: column; gap: 1.1rem; } /* onderaan ruimte voor het Made by-label */
.panel .empty { color: var(--muted); padding: 3rem 1.5rem; text-align: center; }
.panel-head { display: flex; align-items: center; gap: .6rem; }
.panel-head .close { margin-left: auto; }
.guest-name { display: flex; flex-direction: column; gap: .1rem; background: var(--navy); color: #fff; border-radius: var(--r); padding: .65rem .9rem; margin-top: -.3rem; }
.guest-name span { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.guest-name em { font-style: normal; font-size: .82rem; opacity: .8; margin-top: .15rem; }
.guest-name strong { font-family: var(--heading); font-size: 1.2rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.pill {
  display: inline-block;
  border-radius: 0;
  padding: .1rem .5rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--on, #fff);
  background: var(--c);
  text-transform: capitalize;
}
.pill.s-vrij { --c: var(--vrij); }
.pill.s-bezet { --c: var(--bezet); }
.pill.s-besteld { --c: var(--besteld); --on: var(--navy); }
.pill.s-betaald { --c: var(--betaald); }

.field { display: flex; flex-direction: column; gap: .3rem; }
.field label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.field .row { display: flex; gap: .4rem; }
.field .row input { flex: 1; }

.warn {
  background: var(--danger-bg);
  border: 1px solid #f5b8c7;
  border-radius: var(--r);
  padding: .75rem .9rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.warn .row { display: flex; gap: .5rem; }

.card { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.bill { padding: .2rem .9rem; }
.bill-order { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.bill-order:last-child { border-bottom: 0; }
.bill-order .head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .8rem; color: var(--muted); margin-bottom: .3rem; white-space: nowrap; }
.line { display: flex; gap: .5rem; align-items: baseline; }
.line .q { min-width: 2rem; font-weight: 600; color: var(--muted); }
.line .n { flex: 1; }
.line .note { display: block; font-size: .8rem; color: var(--muted); font-style: italic; }
.line .p { font-variant-numeric: tabular-nums; }
.total { display: flex; justify-content: space-between; font-size: 1.1rem; font-weight: 700; padding: .6rem .9rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.status-tag { font-size: .7rem; font-weight: 600; border-radius: 0; padding: .05rem .4rem; background: var(--line); color: var(--text); text-transform: capitalize; }
.status-tag.nieuw { background: var(--besteld); color: var(--navy); }
.status-tag.klaar { background: var(--vrij); color: #fff; }
.status-tag.fout { background: var(--danger); color: #fff; }
.order-btns { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.head .order-btns { margin-top: 0; }
.changed {
  display: inline-block;
  margin: .2rem 0;
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: 0;
  padding: .1rem .45rem;
  font-size: .76rem;
  font-weight: 600;
}

/* Tafelpaneel: alles in één kolom onder elkaar */
.step { display: flex; flex-direction: column; gap: .6rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.cat-tabs { display: flex; gap: .35rem; flex-wrap: wrap; }
.cat-tabs button { min-height: 32px; padding: .2rem .7rem; font-size: .82rem; border-radius: var(--r-sm); }
.menu-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.menu-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  min-height: 48px;
  padding: .35rem .5rem .35rem .9rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  text-align: left;
}
.menu-row:last-child { border-bottom: 0; }
.menu-row:hover { background: var(--surface-2); border-color: var(--line); }
.menu-row .n { flex: 1; }
.menu-row .price { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .88rem; }
.menu-row .plus {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-2);
  color: var(--teal);
  font-weight: 700;
}
.menu-row.in-cart { background: var(--mint); }
.menu-row.in-cart .plus { background: var(--teal); border-color: var(--teal); color: #fff; font-size: .85rem; }

.cart { padding: .75rem .9rem; display: flex; flex-direction: column; gap: .5rem; }
.cart-line, .edit-lines .cart-line { display: grid; grid-template-columns: 1fr auto 4.5rem; align-items: center; gap: .6rem; }
.cart-line .n { font-weight: 500; }
.cart-line .p { text-align: right; font-variant-numeric: tabular-nums; }
.stepper { display: inline-flex; align-items: center; gap: .3rem; }
.stepper button { min-height: 30px; min-width: 30px; width: 30px; padding: 0; border-radius: var(--r-sm); }
.stepper .q { min-width: 1.4rem; text-align: center; font-weight: 600; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.step.pay .total { padding: 0; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.pay-methods button { flex-direction: column; gap: 0; min-height: 56px; }
.pay-methods button small { font-weight: 400; font-size: .75rem; opacity: .8; }
.pay-methods button.wide { grid-column: 1 / -1; }
.pay-methods button.stripe { background: var(--navy); border-color: var(--navy); color: #fff; min-height: 60px; font-size: 1rem; }
.pay-methods button.stripe:hover { background: var(--navy-2); border-color: var(--navy-2); }
.pay-methods button.stripe:disabled:hover { background: var(--navy); border-color: var(--navy); }

.edit-lines { display: flex; flex-direction: column; gap: .5rem; }
.edit-lines .cart-line.removed .n, .edit-lines .cart-line.removed .p { text-decoration: line-through; color: var(--muted); }
.edit-lines .note { display: block; font-size: .8rem; color: var(--muted); font-style: italic; }

.qr-box { display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center; }
.qr-box svg { width: min(260px, 70vw); height: auto; border: 1px solid var(--line); border-radius: var(--r); padding: 6px; background: #fff; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; font-size: .88rem; text-align: left; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; word-break: break-all; }
.waiting { display: inline-flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .88rem; }
.waiting::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* Groepen (tabs) aan één tafel */
.group-tabs { display: flex; border-bottom: 2px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; margin: 0 -1.25rem; padding: 0 1.25rem; }
.group-tabs button { border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; background: none; flex-direction: column; align-items: flex-start; gap: 0; padding: .45rem .9rem; min-height: 48px; color: var(--muted); white-space: nowrap; }
.group-tabs button:hover { background: var(--surface-2); border-color: transparent; border-bottom-color: var(--line-2); }
.group-tabs button.active { color: var(--navy); border-bottom-color: var(--teal); background: none; }
.group-tabs .gname { font-weight: 700; font-size: .9rem; }
.group-tabs .gsum { font-size: .75rem; font-weight: 500; font-variant-numeric: tabular-nums; }

/* DrinkTokens */
.tokens-on { display: flex; align-items: center; gap: .75rem; background: var(--mint); border: 1px solid #b9e3e2; border-radius: var(--r); padding: .65rem .8rem; }
.tokens-on div { flex: 1; display: flex; flex-direction: column; }
.tokens-on strong { color: var(--teal-dark); }
.tokens-on span { font-size: .82rem; color: var(--muted); }
.free { font-size: .7rem; font-weight: 600; color: var(--teal-dark); background: var(--mint); border-radius: 0; padding: .05rem .35rem; }
s.was { color: var(--muted); font-size: .8rem; }

/* "Made by S-IT Solutions": klein en doorschijnend, rechtsonder */
.made-by {
  position: fixed;
  right: 10px;
  bottom: 8px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  color: var(--text);
  font: 400 10.5px/1 "Segoe UI", system-ui, sans-serif; /* zelfde lettertype als s-itsolutions.be */
  letter-spacing: .02em;
  text-decoration: none;
  opacity: .28;
  transition: opacity .2s;
}
.made-by:hover { opacity: .7; }
.made-by .mb-logo {
  width: 14px; height: 14px;
  border: 1.2px solid currentColor;
  display: grid; place-items: center;
  font-size: 9px; font-weight: 600;
}
.made-by.in-flow { position: static; float: right; margin: 0 16px 16px; }
@media print { .made-by { display: none; } }

/* ---------- Meldingen ---------- */
.toasts {
  position: fixed;
  top: 72px;
  right: 1rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  width: min(380px, calc(100vw - 2rem));
}
.toast {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--c, var(--teal));
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: .7rem .8rem;
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  animation: slidein .2s ease-out;
}
.toast .msg { flex: 1; font-weight: 500; }
.toast .time { font-size: .76rem; color: var(--muted); }
.toast.k-order { --c: #d9c800; background: #fffbe0; color: #1e1c3c; }
.toast.k-order .msg { font-weight: 700; font-size: 1.02rem; }
.toast .kassa { margin-top: .25rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
.toast .kassa.ok { color: var(--teal); }
.toast .kassa.bad { color: var(--danger); }
.toast.k-qr-open { --c: var(--bezet); }
.toast.k-qr-blocked { --c: var(--danger); background: var(--danger-bg); }
.toast.k-order-edit { --c: var(--danger); }
.toast.k-paid { --c: var(--teal); }
.toast.k-info { --c: var(--bezet); }
.toast.k-error { --c: var(--danger); }
@keyframes slidein { from { transform: translateY(-8px); opacity: 0; } }

/* ---------- Dialogen ---------- */
dialog {
  border: 0;
  border-radius: var(--r-lg);
  padding: 0;
  background: var(--surface);
  color: var(--text);
  width: min(520px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  box-shadow: 0 20px 60px rgba(23, 22, 42, .3);
}
dialog::backdrop { background: rgba(30, 28, 60, .55); }
dialog form { padding: 1.4rem; display: flex; flex-direction: column; gap: .9rem; }
dialog label { display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
dialog fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: .8rem; display: flex; flex-direction: column; gap: .7rem; margin: 0; }
dialog legend { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 0 .3rem; }
dialog .row { display: flex; gap: .5rem; }
dialog .row > * { flex: 1; }
dialog .foot { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.menu-edit { display: flex; flex-direction: column; gap: .4rem; max-height: 55vh; overflow-y: auto; }
.menu-edit .r { display: grid; grid-template-columns: 1fr 2fr 80px 60px 40px; gap: .35rem; }
.menu-edit .r.meta span { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Pincode ---------- */
.login {
  position: fixed;
  inset: 0;
  background: var(--navy);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.login form { background: var(--surface); border-radius: var(--r-lg); padding: 1.75rem; width: min(340px, 100%); display: flex; flex-direction: column; gap: .8rem; box-shadow: var(--shadow); }
.login input { font-size: 1.5rem; text-align: center; letter-spacing: .4em; }
.login .err { color: var(--danger); min-height: 1.2em; font-size: .88rem; }

/* ---------- Kolommen, kopjes en overzicht (gedeeld door iPad en PC) ---------- */
.col { padding: 1.25rem; min-width: 0; }
.col > h2 { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.col .floor-wrap { padding: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.legend-light { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin-bottom: .9rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: .6rem .85rem; display: flex; flex-direction: column; gap: .1rem; }
.stat span { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat strong { font-family: var(--heading); font-size: 1.25rem; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.open-bills { margin-top: 1.1rem; display: flex; flex-direction: column; gap: .4rem; }
.open-bills h3 { margin-bottom: .2rem; }
.open-bills button { justify-content: space-between; width: 100%; min-height: 46px; }

/* ---------- Kleinere schermen (liggend): tafelpaneel schuift van rechts in beeld ---------- */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .panel {
    position: fixed;
    top: 60px; right: 0; bottom: 0;
    width: min(420px, 92vw);
    min-height: 0;
    max-height: none;
    border-left: 1px solid var(--line);
    box-shadow: -12px 0 40px rgba(23, 22, 42, .18);
    z-index: 30;
    transform: translateX(0);
    transition: transform .2s ease;
  }
  .panel.is-empty { transform: translateX(105%); box-shadow: none; }
}

/* ---------- iPad rechtop: plattegrond boven, tafelpaneel eronder (twee kolommen) ---------- */
@media (min-width: 700px) and (max-width: 1100px) and (orientation: portrait) {
  .layout { display: flex; flex-direction: column; align-items: stretch; height: calc(100vh - 60px); height: calc(100dvh - 60px); }
  .layout > .col { flex: none; width: 100%; max-height: 62%; overflow-y: auto; padding-bottom: .75rem; }
  .layout > .col .open-bills { display: none; }
  .panel {
    position: static;
    flex: 1;
    width: auto;
    min-height: 0;
    max-height: none;
    transform: none;
    transition: none;
    border-left: 0;
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(23, 22, 42, .06);
  }
  .panel.is-empty { transform: none; box-shadow: 0 -6px 20px rgba(23, 22, 42, .06); }
  .panel .empty { padding: 2rem; }
  .pcols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
  .pcol { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
  .pcol > .step:first-child { border-top: 0; padding-top: 0; }
}

/* ---------- Telefoon ---------- */
@media (max-width: 600px) {
  .panel { width: 100vw; border-left: 0; }
  .col { padding: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar nav { width: 100%; }
}
