/* 't Hok POS — verfijnd bruin café palette (overrides VOSS site tokens)
   Light: linen #F7F2EA / cream #FAF6F0 · accent #6B4E3D · gold #8B6914
   Dark:  espresso #1C1612 / walnut #2A221C · accent #C9A66B · gold #D4AF7A */
:root,
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f2ea;
  --surface: #ede6da;
  --card: #faf6f0;
  --text: #2a1f18;
  --muted: #7a6b5c;
  --border: rgba(42, 31, 24, 0.12);
  --brand: #6b4e3d;
  --brand-weak: rgba(107, 78, 61, 0.13);
  --gradient: linear-gradient(120deg, #8b6914 0%, #7d5a47 46%, #6b4e3d 100%);
  --gradient-soft: linear-gradient(
    120deg,
    color-mix(in oklab, #8b6914 16%, transparent) 0%,
    color-mix(in oklab, #7d5a47 12%, transparent) 55%,
    color-mix(in oklab, #6b4e3d 8%, transparent) 100%
  );
  --gradient-glow: 0 8px 24px color-mix(in oklab, #6b4e3d 20%, transparent);
  --shadow: 0 10px 28px rgba(42, 31, 24, 0.09);
  --radius: 12px;
  --control-radius: 14px;
  --surface-radius: 16px;
  --control-min-height: 44px;
  --control-bg: color-mix(in oklab, var(--bg) 62%, var(--card));
  --control-border: color-mix(in oklab, var(--border) 45%, transparent);
  --control-shadow: 0 1px 3px rgba(42, 31, 24, 0.05);
  --control-focus-ring: 0 0 0 3px color-mix(in oklab, var(--brand) 16%, transparent);
  --accent: var(--brand);
  --product-image-bg: #efe6d8;
  --pos-sidebar: clamp(280px, 28vw, 340px);
  --pos-ticket: clamp(280px, 30vw, 360px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1c1612;
  --surface: #241e18;
  --card: #2a221c;
  --text: #f0e8dc;
  --muted: #a89888;
  --border: rgba(240, 232, 220, 0.11);
  --brand: #c9a66b;
  --brand-weak: rgba(201, 166, 107, 0.15);
  --gradient: linear-gradient(120deg, #d4af7a 0%, #c9a66b 44%, #8b6914 100%);
  --gradient-soft: linear-gradient(
    160deg,
    color-mix(in oklab, #c9a66b 12%, var(--bg)) 0%,
    color-mix(in oklab, #6b4e3d 8%, var(--bg)) 42%,
    var(--bg) 100%
  );
  --gradient-glow: 0 8px 28px color-mix(in oklab, #c9a66b 24%, transparent);
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
  --control-bg: color-mix(in oklab, var(--bg) 78%, var(--card));
  --control-border: color-mix(in oklab, var(--border) 55%, transparent);
  --control-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  --control-focus-ring: 0 0 0 3px color-mix(in oklab, var(--brand) 20%, transparent);
  --product-image-bg: #3a3028;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

html {
  overflow: hidden;
  background: var(--bg);
  height: -webkit-fill-available;
}

body.pos-body {
  position: fixed;
  inset: 0;
  overflow: hidden;
  padding-top: 0 !important;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overscroll-behavior: none;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  user-select: none;
  -webkit-user-select: none;
}

html.pos-standalone,
body.pos-standalone {
  overscroll-behavior: none;
}

.app.pos-shell {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

input,
select,
textarea,
.pos-search input,
.panel-field input,
.panel-field textarea,
.panel-field select,
.ios-alert input {
  font-size: 16px;
}

input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}

input,
textarea,
[contenteditable="true"] {
  user-select: text;
  -webkit-user-select: text;
}

/* Soft iPad-friendly controls (POS + admin shared) */
body.pos-body .panel-field input:not([type="checkbox"]):not([type="radio"]),
body.pos-body .panel-field select,
body.pos-body .panel-field textarea {
  min-height: var(--control-min-height);
  border-radius: var(--control-radius);
  border-color: var(--control-border);
  background: var(--control-bg);
  box-shadow: var(--control-shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

body.pos-body .panel-field input:not([type="checkbox"]):not([type="radio"]):focus,
body.pos-body .panel-field select:focus,
body.pos-body .panel-field textarea:focus {
  outline: none;
  border-color: color-mix(in oklab, var(--brand) 42%, var(--control-border));
  box-shadow: var(--control-focus-ring);
}

body.pos-body .panel-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%237a6b5c' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}

html[data-theme="dark"] body.pos-body .panel-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23a89888' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

body.pos-body .card {
  border-radius: var(--surface-radius);
  border-color: var(--control-border);
  box-shadow: var(--control-shadow);
}

.guest-row,
.product-tile,
.cat-chip,
.pos-icon-btn,
.list-row,
.mix-modal-btn,
.mix-fris-btn {
  -webkit-touch-callout: none;
}

[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Laadscherm — altijd licht, onafhankelijk van app-thema */
.pos-entrance-overlay {
  --entrance-bg: #f7f2ea;
  --entrance-text: #2a1f18;
  --entrance-muted: #7a6b5c;
  --entrance-accent: #6b4e3d;
  --entrance-track: rgba(42, 31, 24, 0.12);
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: calc(24px + var(--safe-top)) 24px calc(24px + var(--safe-bottom));
  background: var(--entrance-bg);
  color: var(--entrance-text);
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.pos-entrance-overlay.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.pos-entrance-overlay-inner {
  width: min(960px, 96vw);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3.5vh, 32px);
  text-align: center;
  background: transparent;
}

.pos-entrance-logo {
  display: block;
  max-width: min(95vw, 960px);
  height: auto;
  margin: 0 auto;
}

.pos-login-logo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.pos-entrance-title {
  margin: 0;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--entrance-text);
}

.pos-entrance-sub,
.pos-entrance-sub.muted {
  margin: 0;
  font-size: clamp(1.05rem, 2.8vw, 1.4rem);
  line-height: 1.35;
  color: var(--entrance-muted);
}

.pos-entrance-bar {
  width: clamp(240px, 72vw, 440px);
  height: 8px;
  border-radius: 999px;
  background: var(--entrance-track);
  overflow: hidden;
  margin-top: 6px;
}

.pos-entrance-bar span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: var(--entrance-accent);
  animation: pos-entrance-progress 1.1s ease-in-out infinite;
}

@media (min-width: 768px) {
  .pos-entrance-overlay-inner {
    width: min(960px, 85vw);
    gap: clamp(22px, 4vh, 36px);
  }

  .pos-entrance-logo {
    max-width: min(88vw, 960px);
  }

  .pos-entrance-bar {
    width: clamp(320px, 58vw, 520px);
    height: 10px;
  }
}

@keyframes pos-entrance-progress {
  from { transform: translateX(-120%); }
  to { transform: translateX(320%); }
}

body.pos-bootstrapping {
  overflow: hidden;
}

body.pos-bootstrapping .pos-entrance-overlay,
body.pos-bootstrapping .pos-access-login,
body.pos-bootstrapping .pos-shell {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.pos-entrance-pending { overflow: hidden; }

body.pos-entrance-pending .pos-shell,
body.pos-entrance-pending .screen,
body.pos-entrance-pending .modal-root,
body.pos-entrance-pending .toast,
body.pos-entrance-pending .pos-login-screen {
  visibility: hidden;
  opacity: 0;
  transform: translateY(18px);
}

body.pos-entrance-pending.is-entered .pos-shell,
body.pos-entrance-pending.is-entered .screen,
body.pos-entrance-pending.is-entered .modal-root,
body.pos-entrance-pending.is-entered .toast,
body.pos-entrance-pending.is-entered .pos-login-screen {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition:
    opacity 0.75s ease 0.2s,
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

/* Login */
.pos-login-screen,
.pos-access-login {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--bg);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.pos-login-screen .panel-login,
.pos-access-login .panel-login {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: calc(20px + var(--safe-top)) calc(20px + var(--safe-right)) calc(20px + var(--safe-bottom)) calc(20px + var(--safe-left));
  box-sizing: border-box;
}

.pos-login-screen .panel-login-card,
.pos-access-login .panel-login-card {
  width: min(420px, 100%);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.pos-login-screen .panel-login-brand-block,
.pos-access-login .panel-login-brand-block {
  background: transparent;
  color: inherit;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
  width: 100%;
  min-width: 0;
}

.pos-login-screen .panel-form,
.pos-access-login .panel-form {
  width: 100%;
  min-width: 0;
}

.pos-login-screen .panel-login-btn,
.pos-access-login .panel-login-btn {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  justify-content: center;
}

.pos-login-back {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  justify-content: center;
}

/* Layout */
.pos-shell {
  display: grid;
  grid-template-columns: var(--pos-sidebar) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 16px;
  height: 100%;
  padding: calc(12px + var(--safe-top)) calc(12px + var(--safe-right)) calc(12px + var(--safe-bottom)) calc(12px + var(--safe-left));
  background:
    radial-gradient(circle at top left, color-mix(in oklab, #8b6914 10%, transparent), transparent 42%),
    radial-gradient(circle at top right, color-mix(in oklab, #6b4e3d 8%, transparent), transparent 38%),
    var(--bg);
}

.sidebar {
  grid-row: 1;
  grid-column: 1;
}

.main,
.leaderboard-panel,
.wheel-panel {
  grid-row: 1;
  grid-column: 2;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.sidebar-header {
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: none;
}

.sidebar-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pos-mode-switch {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  background: color-mix(in oklab, var(--surface) 55%, var(--card));
  border: 1px solid var(--border);
}

.pos-mode-switch--triple {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}

.pos-mode-switch--compact .pos-mode-btn {
  min-height: 38px;
  font-size: 13px;
}

.pos-mode-switch--triple .pos-mode-btn {
  width: 100%;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  min-height: 48px;
  padding: 6px 4px;
  font-size: 10px;
  letter-spacing: 0;
}

.pos-mode-switch--triple .pos-mode-icon {
  font-size: 15px;
}

.pos-mode-switch--triple .pos-mode-label {
  display: block;
  width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  text-align: center;
  line-height: 1.1;
}

.pos-mode-btn {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.pos-mode-icon {
  font-size: 16px;
  line-height: 1;
}

.pos-mode-btn.is-active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 8px color-mix(in oklab, #000 10%, transparent);
}

.pos-mode-btn.is-active[data-id="leaderboard"] {
  background: color-mix(in oklab, #b8860b 12%, var(--card));
  color: var(--text);
}

.pos-mode-btn.is-active[data-id="wheel"] {
  background: color-mix(in oklab, #7d5a47 14%, var(--card));
  color: var(--text);
}

.sidebar,
.stage,
.ticket-panel,
.leaderboard-panel,
.wheel-panel,
.screen {
  min-height: 0;
  overflow: hidden;
}

.sidebar,
.stage,
.ticket-panel,
.leaderboard-panel,
.wheel-panel {
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  border-radius: var(--radius);
  background: var(--card);
}

.main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--pos-ticket);
  gap: 16px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.pos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.pos-header-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pos-brand-mark-wrap {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f7f2ea;
  border: 1px solid var(--border);
  flex: none;
  overflow: hidden;
}

.pos-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 0;
  object-fit: contain;
  border: none;
  flex: none;
}

.pos-eyebrow {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pos-title {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.pos-title-sm {
  font-size: 1.35rem;
}

.pos-header-actions {
  display: flex;
  gap: 8px;
  flex: none;
}

.pos-icon-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  justify-content: center;
  border-radius: 12px;
  font-size: 22px;
  line-height: 1;
}

.presentation-logout-btn {
  flex: none;
  min-width: 44px;
  min-height: 44px;
  font-size: 18px;
  background: color-mix(in oklab, #9a3412 10%, var(--card));
  border-color: color-mix(in oklab, #9a3412 22%, var(--border));
  color: #9a3412;
}

.presentation-logout-btn:active {
  background: color-mix(in oklab, #9a3412 16%, var(--card));
}

.pos-search-wrap {
  flex-shrink: 0;
  padding: 14px 16px 12px;
  border-top: 1px solid var(--border);
  background: var(--card);
}

.guest-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.guest-filter-chip {
  flex: 1 1 0;
  min-width: 0;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.guest-filter-chip.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.pos-search input {
  width: 100%;
  min-height: var(--control-min-height);
  border: 1px solid var(--control-border);
  border-radius: var(--control-radius);
  background: var(--control-bg);
  padding: 0 14px;
  outline: none;
  box-shadow: var(--control-shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pos-search input:focus {
  border-color: color-mix(in oklab, var(--brand) 42%, var(--control-border));
  box-shadow: var(--control-focus-ring);
}

.guest-scroll,
.product-scroll,
.ticket-lines,
.screen-body,
.leaderboard-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.guest-scroll { padding: 0 10px 10px; }

.ticket-lines { padding: 8px 10px; }

.guest-list { display: flex; flex-direction: column; gap: 6px; }

.guest-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.guest-row:hover {
  background: color-mix(in oklab, var(--brand) 6%, var(--surface));
}

.guest-row.selected {
  background: color-mix(in oklab, var(--brand) 12%, var(--surface));
  border-color: color-mix(in oklab, var(--brand) 24%, var(--border));
}

.guest-club-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: color-mix(in oklab, #b8860b 18%, var(--surface));
  color: color-mix(in oklab, #8b6914 85%, var(--text));
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.4;
}

.guest-role-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--brand) 16%, var(--surface));
  color: color-mix(in oklab, var(--brand) 85%, var(--text));
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.4;
}

.guest-owner-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    color-mix(in oklab, #d4af37 38%, var(--surface)),
    color-mix(in oklab, #b8860b 28%, var(--surface))
  );
  color: color-mix(in oklab, #7a5c00 92%, var(--text));
  border: 1px solid color-mix(in oklab, #d4af37 50%, transparent);
  box-shadow: 0 1px 0 color-mix(in oklab, #fff 35%, transparent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.4;
}

.podium-name .guest-owner-badge,
.leaderboard-hero-name .guest-owner-badge,
.leaderboard-name .guest-owner-badge {
  margin-left: 6px;
  vertical-align: middle;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  flex: none;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--text) 8%, transparent);
}

.avatar.has-photo {
  background: var(--surface);
  padding: 0;
}

.avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-lg {
  width: 72px;
  height: 72px;
  font-size: 24px;
}

.avatar-xl {
  width: 88px;
  height: 88px;
  font-size: 28px;
  border-width: 3px;
}

.ticket-head-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ticket-avatar-wrap .avatar,
.avatar.ticket-avatar {
  width: 44px;
  height: 44px;
  font-size: 16px;
}

.guest-form-modal {
  text-align: center;
}

.guest-form-lead {
  font-size: 14px;
  line-height: 1.4;
}

.guest-photo-slot {
  display: flex;
  justify-content: center;
  margin: 4px 0 2px;
}

.guest-photo-actions {
  display: grid;
  gap: 8px;
  margin-bottom: 4px;
}

.guest-photo-btn {
  width: 100%;
  justify-content: center;
  min-height: 42px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.guest-photo-btn.guest-photo-remove {
  color: #dc2626;
  border-color: color-mix(in oklab, #dc2626 28%, var(--border));
}

.guest-form-modal .panel-field {
  text-align: left;
}

.guest-role-check {
  margin-top: 4px;
  text-align: left;
}

.guest-role-hint {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  margin-top: 2px;
}

.guest-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
}

.guest-copy strong {
  display: block;
  min-width: 0;
  font-size: 15px;
  line-height: 1.2;
}

.guest-copy strong .guest-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.guest-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.guest-copy > .guest-meta,
.muted { color: var(--muted); font-size: 13px; line-height: 1.25; }

.guest-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 15px;
}

.guest-amount.has-tab { color: var(--brand); }

.sidebar-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px 18px calc(14px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface) 55%, var(--card));
  flex-shrink: 0;
}

.sidebar-foot span { display: block; font-size: 12px; margin-bottom: 2px; }

.sidebar-foot-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
}

.pos-live-sync {
  display: inline-block;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #8a867f;
  opacity: 0.85;
}

.pos-live-sync.is-live {
  color: #b33a3a;
}

.pos-live-sync.is-saved {
  color: #2f7a4a;
}

.pos-live-sync.is-offline,
.pos-live-sync.is-error {
  color: #8a867f;
}

.pos-live-sync.is-error {
  color: #8a867f;
  opacity: 1;
}

.sidebar-foot strong {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.pos-admin-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in oklab, #22c55e 16%, var(--surface));
  color: #15803d;
  font-size: 12px;
}

.stage-header { padding-left: 16px; }

.back-btn { margin-right: auto; }

.cat-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 16px 12px;
  flex-shrink: 0;
}

.cat-chip {
  flex: none;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.cat-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
  padding: 4px 16px 18px;
}

.product-tile {
  position: relative;
  min-height: 210px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--card), color-mix(in oklab, var(--surface) 65%, var(--card)));
  box-shadow: 0 8px 24px color-mix(in oklab, var(--text) 4%, transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 10px 10px 12px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.product-tile:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--brand) 28%, var(--border));
  box-shadow: var(--gradient-glow);
}

.product-tile:disabled {
  cursor: not-allowed;
  border-color: color-mix(in oklab, var(--border) 82%, transparent);
  box-shadow: none;
}

.product-tile:disabled .product-name,
.product-tile:disabled .product-price {
  color: color-mix(in oklab, var(--muted) 72%, transparent);
}

.product-tile.is-extra {
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    var(--gradient) border-box;
  border: 1px solid transparent;
}

.product-visual {
  width: 100%;
  max-width: 112px;
  height: 132px;
  min-height: 132px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  overflow: hidden;
  background: var(--product-image-bg);
}

.product-visual--image {
  border: 1px solid color-mix(in oklab, var(--border) 70%, #e8dfd2);
  padding: 6px;
}

.product-visual--image img,
.list-icon--image img,
.ticket-line-thumb {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

.product-visual--placeholder {
  border: 1px dashed color-mix(in oklab, var(--border) 85%, transparent);
  color: color-mix(in oklab, var(--text) 78%, var(--muted));
}

.product-visual--placeholder svg {
  width: 38%;
  height: 38%;
  opacity: 1;
}

.product-visual--thumb {
  max-width: 80px;
  height: 96px;
  min-height: 96px;
}

.product-name {
  font-size: 14px;
  font-weight: 650;
  text-align: center;
  line-height: 1.2;
  min-height: calc(1.2em * 2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.product-price {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-top: auto;
}

.product-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.empty {
  margin: 24px 16px;
  padding: 28px 18px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: color-mix(in oklab, var(--surface) 50%, transparent);
}

.empty h3 {
  margin: 8px 0 6px;
  color: var(--text);
  font-size: 1.1rem;
}

.empty-icon { font-size: 40px; }

.ticket-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.pos-ticket-title {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.ticket-lines { flex: 1; padding: 8px 10px; }

.ticket-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
}

.ticket-line-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  min-width: 0;
}

.ticket-line-name > span:last-child {
  overflow: hidden;
  min-width: 0;
}

.ticket-line-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ticket-line-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-line-thumb-wrap {
  width: 32px;
  height: 40px;
  border-radius: 7px;
  flex: none;
  border: 1px solid color-mix(in oklab, var(--border) 70%, #e8dfd2);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--product-image-bg);
}

.ticket-line-thumb {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

.ticket-line-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  flex: none;
  display: grid;
  place-items: center;
  background: color-mix(in oklab, var(--surface) 72%, var(--border));
  color: var(--muted);
}

.ticket-line-icon svg {
  width: 14px;
  height: 14px;
  opacity: 1;
}

.ticket-line-meta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ticket-line-sum {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2px;
}

.stepper button {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
}

.stepper button:disabled {
  color: color-mix(in oklab, var(--muted) 72%, transparent);
  cursor: not-allowed;
  opacity: 0.55;
}

.stepper span {
  min-width: 22px;
  text-align: center;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.ticket-foot {
  padding: 14px 18px calc(14px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface) 55%, var(--card));
  flex-shrink: 0;
}

.ticket-sum {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 16px;
}

.ticket-sum strong {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
  font-size: 1.65rem;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.ticket-total-original {
  text-decoration: line-through;
  color: var(--muted);
  font-size: 0.62em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ticket-total-discounted {
  color: #dc2626;
  font-weight: 700;
}

/* Instellingen / admin schermen */
.screen {
  position: absolute;
  inset: calc(12px + var(--safe-top)) calc(12px + var(--safe-right)) calc(12px + var(--safe-bottom)) calc(12px + var(--safe-left));
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  animation: pos-slide-in 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.screen-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.screen-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
}

.screen-action { justify-self: end; }

.screen-body {
  flex: 1;
  padding: 16px;
}

.group {
  border: 1px solid var(--control-border, var(--border));
  border-radius: var(--surface-radius, 16px);
  overflow: hidden;
  margin: 0 0 22px;
  background: var(--card);
  box-shadow: var(--control-shadow);
}

.group-title {
  margin: 0 0 8px;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.group-foot {
  margin: -14px 4px 18px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.list-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.group .list-row:last-child { border-bottom: 0; }

.list-row.danger { color: #dc2626; }

.list-row .value {
  margin-left: auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.list-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  flex: none;
  overflow: hidden;
}

.list-icon--image {
  border: 1px solid color-mix(in oklab, var(--border) 70%, #e8dfd2);
  padding: 3px;
  overflow: hidden;
  background: var(--product-image-bg);
}

.list-icon--image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

.list-icon--placeholder {
  background: color-mix(in oklab, var(--surface) 72%, var(--border));
  color: var(--muted);
}

.list-icon--placeholder svg {
  width: 16px;
  height: 16px;
  opacity: 1;
}

.chevron { color: var(--muted); margin-left: 6px; }

.install-note {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in oklab, var(--brand) 6%, var(--surface));
  margin-bottom: 22px;
  font-size: 14px;
  line-height: 1.45;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.emoji-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.emoji-pick {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  font-size: 22px;
  cursor: pointer;
}

.emoji-pick.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 18%, transparent);
}

/* Modals — constrained to visual viewport (iPad Mini landscape + PWA chrome) */
.modal-root {
  position: fixed;
  inset: 0;
  z-index: 8500;
  display: grid;
  place-items: safe center;
  align-content: safe center;
  box-sizing: border-box;
  padding: max(10px, var(--safe-top)) max(12px, var(--safe-right)) max(10px, var(--safe-bottom)) max(12px, var(--safe-left));
  overflow: hidden;
  /* Outside .pos-shell zoom — size against real viewport / visualViewport */
  width: 100%;
  max-width: 100vw;
  height: 100%;
  max-height: 100vh;
  max-height: 100svh;
  max-height: 100dvh;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(28, 22, 18, 0.55);
}

.modal-layer {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-width: 100%;
  min-height: 0;
  max-height: calc(100vh - 20px - var(--safe-top) - var(--safe-bottom));
  max-height: calc(100svh - 20px - var(--safe-top) - var(--safe-bottom));
  max-height: calc(100dvh - 20px - var(--safe-top) - var(--safe-bottom));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-layer > .ios-alert,
.modal-layer > .mix-modal,
.modal-layer > .pos-modal-card,
.modal-layer > .ios-sheet {
  width: 100%;
  max-height: 100%;
  min-height: 0;
}

.pos-modal-card {
  display: grid;
  gap: 14px;
  padding: 22px 18px 18px;
}

.modal-layer .pos-modal-card {
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 20px 44px rgba(28, 22, 18, 0.12), 0 4px 12px rgba(28, 22, 18, 0.06);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

html[data-theme="dark"] .modal-layer .pos-modal-card {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--border);
}

.pos-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.pos-modal-actions .btn { flex: 1; }

.ios-alert,
.ios-sheet-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.modal-layer > .ios-alert {
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.modal-layer > .ios-alert .ios-alert-actions {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  background: var(--card);
  z-index: 1;
}

.ios-alert-title {
  padding: 18px 16px 0;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
}

.ios-alert-message {
  padding: 6px 16px 16px;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  color: var(--muted);
}

.ios-alert input:not([type="checkbox"]):not([type="radio"]) {
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  min-height: var(--control-min-height, 44px);
  border: 1px solid var(--control-border, var(--border));
  border-radius: var(--control-radius, 14px);
  background: var(--control-bg, var(--bg));
  padding: 0 14px;
  box-shadow: var(--control-shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ios-alert input:not([type="checkbox"]):not([type="radio"]):focus {
  outline: none;
  border-color: color-mix(in oklab, var(--brand) 42%, var(--control-border, var(--border)));
  box-shadow: var(--control-focus-ring);
}

.ios-alert-message .panel-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 2px 0;
  text-align: left;
  cursor: pointer;
}

.ios-alert-message .panel-check input[type="checkbox"],
.ios-alert-message .panel-check input[type="radio"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--accent, var(--brand));
  cursor: pointer;
}

.ios-alert-actions {
  display: flex;
  border-top: 1px solid var(--border);
}

.ios-alert-actions button,
.ios-sheet-btn {
  flex: 1;
  min-height: 46px;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 16px;
  cursor: pointer;
}

.ios-alert-actions.stacked { flex-direction: column; }

.ios-alert-actions .destructive,
.ios-sheet-btn.destructive { color: #dc2626; }

.ios-alert-actions .bold,
.ios-sheet-btn.bold { font-weight: 700; }

.ios-sheet { width: min(360px, 100%); margin: 0 auto; }

.ios-sheet-group { margin-bottom: 8px; }

.ios-sheet-title {
  padding: 12px 16px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.ios-sheet-btn {
  width: 100%;
  border-top: 1px solid var(--border);
}

/* Mix-popup — café-stijl keuzemodal */
.mix-modal {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 20px 44px rgba(28, 22, 18, 0.12), 0 4px 12px rgba(28, 22, 18, 0.06);
  text-align: center;
  min-height: 0;
}

html[data-theme="dark"] .mix-modal {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--border);
}

.mix-modal-header {
  flex: 0 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 26px 22px 18px;
  background: linear-gradient(
    180deg,
    color-mix(in oklab, #b8860b 6%, var(--card)) 0%,
    var(--card) 100%
  );
  border-bottom: 1px solid var(--border);
}

.mix-modal-visual {
  display: flex;
  justify-content: center;
}

.mix-modal-visual .product-visual--thumb {
  width: 80px;
  height: 98px;
  min-height: 98px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, #b8860b 22%, var(--border));
  box-shadow: 0 8px 20px rgba(28, 22, 18, 0.1);
}

.mix-modal-product {
  margin-top: 12px;
}

.mix-modal-name {
  margin: 0 0 2px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.mix-modal-price {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
}

.mix-modal-actions {
  display: grid;
  gap: 10px;
  padding: 16px 18px 20px;
  flex-shrink: 0;
}

.mix-modal-actions[data-mix-step="fris"] {
  flex: 1 1 auto;
  flex-shrink: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.mix-modal-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.3;
  cursor: pointer;
  text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.mix-modal-btn:active {
  transform: scale(0.98);
}

.mix-modal-cta-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.mix-modal-cta-sub {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  opacity: 0.88;
}

.mix-modal-cta-single {
  font-size: 15px;
  font-weight: 600;
}

.mix-modal-btn--mix {
  border: none;
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--gradient-glow);
}

.mix-modal-btn--mix .mix-modal-cta-sub {
  color: rgba(255, 255, 255, 0.88);
  opacity: 1;
}

.mix-modal-btn--mix:hover,
.mix-modal-btn--mix:focus-visible {
  filter: brightness(1.05);
  box-shadow: 0 10px 26px color-mix(in oklab, var(--brand) 32%, transparent);
}

.mix-modal-btn--plain {
  background: transparent;
  color: var(--text);
  border: 1.5px solid color-mix(in oklab, var(--border) 85%, var(--text));
  box-shadow: none;
}

.mix-modal-btn--plain:hover,
.mix-modal-btn--plain:focus-visible {
  background: color-mix(in oklab, var(--surface) 75%, transparent);
  border-color: color-mix(in oklab, var(--brand) 28%, var(--border));
  filter: none;
}

.mix-modal-btn--plain:active {
  background: color-mix(in oklab, var(--surface) 92%, transparent);
}

.mix-fris-lead {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.mix-fris-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mix-fris-btn {
  display: grid;
  gap: 4px;
  justify-items: center;
  min-height: 88px;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.mix-fris-btn:active {
  transform: scale(0.98);
}

.mix-fris-btn:hover,
.mix-fris-btn:focus-visible {
  border-color: color-mix(in oklab, var(--brand) 40%, var(--border));
  box-shadow: 0 4px 14px rgba(28, 22, 18, 0.08);
}

.mix-fris-btn .product-visual--thumb {
  width: 48px;
  height: 60px;
  min-height: 60px;
  border-radius: 10px;
}

.mix-fris-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.mix-fris-price {
  font-size: 12px;
}

.mix-fris-back {
  margin-top: 2px;
}

.mix-fris-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 0;
}

.mix-label-field {
  padding: 10px 14px 12px;
}

.mix-label-field input {
  width: 100%;
  margin-top: 6px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 9600;
  background: #2a221c;
  color: #f0e8dc;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.app.guest-open {}

/* Landscape tablets (~1024px iPad) keep products | Huidige tab side-by-side.
   Stack the ticket panel only on narrower phones / small tablets. */
@media (max-width: 899px) {
  .main {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(180px, 34vh);
    min-height: 0;
  }

  .stage,
  .ticket-panel {
    min-height: 0;
  }
}

/* Slightly tighter columns so ~900–1100px landscape still fits three panes. */
@media (min-width: 900px) and (max-width: 1100px) {
  .pos-shell {
    --pos-sidebar: clamp(220px, 24vw, 280px);
    --pos-ticket: clamp(220px, 26vw, 280px);
    gap: 12px;
  }

  .main {
    gap: 12px;
  }
}

@media (max-width: 739px) {
  .pos-shell { grid-template-columns: 1fr; }
  .pos-shell:not(.guest-open):not(.app-tab-leaderboard):not(.app-tab-wheel) .main { display: none; }
  .pos-shell.guest-open .sidebar { display: none; }
  .pos-shell.app-tab-leaderboard .sidebar { display: none; }
  .pos-shell.app-tab-wheel .sidebar { display: none; }
  .pos-shell.app-tab-leaderboard .leaderboard-panel {
    grid-column: 1 / -1;
    display: flex !important;
    min-height: 0;
    max-height: 100%;
  }
  .pos-shell.app-tab-wheel .wheel-panel {
    grid-column: 1 / -1;
    display: flex !important;
    min-height: 0;
    max-height: 100%;
  }
  .leaderboard-back-btn,
  .wheel-back-btn {
    display: inline-flex !important;
    flex: none;
  }
  .leaderboard-header {
    flex-wrap: wrap;
  }
  .wheel-header {
    flex-wrap: wrap;
  }
  .leaderboard-header .pos-header-copy {
    flex: 1;
    min-width: 0;
  }
  .wheel-header .pos-header-copy {
    flex: 1;
    min-width: 0;
  }
  .back-btn { display: inline-flex !important; }
  .main {
    grid-template-rows: minmax(0, 1fr) minmax(180px, 42vh);
    min-height: 0;
  }
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  }
  .podium {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
  }
  .podium-place {
    min-height: 132px;
    padding: 10px 6px;
  }
  .podium-1 { min-height: 156px; }
  .podium-name { font-size: 12px; }
  .podium-score { font-size: 1.1rem; }
  .leaderboard-view-btn {
    flex-direction: column;
    gap: 4px;
    min-height: 56px;
    padding: 8px 6px;
    font-size: 12px;
  }
  .leaderboard-view-btn span:first-child {
    font-size: 18px;
  }
  .leaderboard-scope-row {
    flex-direction: column;
    align-items: stretch;
  }
  .leaderboard-scope {
    width: 100%;
  }
  .leaderboard-scope-btn {
    flex: 1;
  }
}

@media (max-height: 720px) {
  .leaderboard-body {
    padding-bottom: 12px;
  }

  .podium-place {
    min-height: 112px;
    padding: 10px 8px;
  }

  .podium-1 {
    min-height: 132px;
  }

  .podium-medal {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@keyframes pos-slide-in {
  from { transform: translateX(24px); opacity: 0.65; }
  to { transform: translateX(0); opacity: 1; }
}

/* Café overrides for shared VOSS button/scroll styles */
body.pos-body .btn-primary {
  background-color: var(--brand);
  background-image: var(--gradient);
  box-shadow: 0 4px 16px color-mix(in oklab, var(--brand) 28%, transparent);
  color: #fff;
  -webkit-text-fill-color: #fff;
}

body.pos-body .btn-primary:hover,
body.pos-body .btn-primary:focus-visible {
  background-color: var(--brand);
  background-image: var(--gradient);
  box-shadow: 0 8px 22px color-mix(in oklab, var(--brand) 35%, transparent);
  color: #fff;
  -webkit-text-fill-color: #fff;
}

body.pos-body .btn-primary:active {
  background-color: #5a3f30;
  background-image: linear-gradient(120deg, #7d5a47 0%, #6b4e3d 48%, #5a3f30 100%);
  box-shadow: 0 2px 8px color-mix(in oklab, var(--brand) 22%, transparent);
  color: #fff;
  -webkit-text-fill-color: #fff;
}

/* Dark theme brand is gold — white label vanishes; use espresso text */
html[data-theme="dark"] body.pos-body .btn-primary:not(.wheel-spin-btn),
html[data-theme="dark"] body.pos-body .btn-primary:not(.wheel-spin-btn):hover,
html[data-theme="dark"] body.pos-body .btn-primary:not(.wheel-spin-btn):focus-visible,
html[data-theme="dark"] body.pos-body .btn-primary:not(.wheel-spin-btn):active {
  color: #1c1612;
  -webkit-text-fill-color: #1c1612;
}

/* Hide scrollbars — touch scroll unchanged (iPad/POS) */
body.pos-body,
body.pos-body * {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.pos-body::-webkit-scrollbar,
body.pos-body *::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.activity-log {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-entry {
  display: grid;
  grid-template-columns: minmax(4.5rem, auto) 1fr;
  gap: 0.65rem 0.85rem;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.activity-entry:last-child {
  border-bottom: 0;
}

.activity-time {
  font-size: 0.78rem;
  white-space: nowrap;
}

.activity-label {
  font-size: 0.92rem;
  line-height: 1.35;
}

.pos-theme-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.pos-theme-row:last-child { border-bottom: 0; }

.pos-theme-toggle {
  margin-left: auto;
  min-height: 36px;
  padding: 0 14px;
  gap: 8px;
}

/* ── Instellingen (iPad-native settings) ── */

.screen--settings .screen-body {
  padding: clamp(12px, 2vh, 24px) clamp(14px, 2.5vw, 28px);
  max-width: 560px;
  margin: 0 auto;
}

.settings-page {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.5vh, 24px);
  width: 100%;
  min-width: 0;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.settings-section > .settings-card,
.settings-section > .settings-stat-grid,
.settings-section > .debt-widget {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.settings-install-details {
  border: 1px solid color-mix(in oklab, var(--border) 80%, transparent);
  border-radius: 12px;
  background: color-mix(in oklab, var(--surface) 60%, var(--card));
  overflow: hidden;
}

.settings-install-summary {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.settings-install-summary::-webkit-details-marker {
  display: none;
}

.settings-install-details[open] .settings-install-summary {
  border-bottom: 1px solid var(--border);
}

.settings-install-note {
  margin: 0;
  padding: 12px 16px 14px;
  font-size: 13px;
  line-height: 1.45;
}

.settings-section-title {
  margin: 0 0 10px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.settings-section-foot {
  margin: 8px 4px 0;
  font-size: 13px;
  line-height: 1.45;
}

.settings-foot {
  margin: 4px 4px 0;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.settings-card {
  border: 1px solid var(--control-border, var(--border));
  border-radius: var(--surface-radius, 16px);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--control-shadow);
}

.settings-card .list-row {
  min-height: 56px;
  padding: 14px 18px;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.settings-row:last-child {
  border-bottom: 0;
}

.settings-row--zoom {
  flex-wrap: wrap;
  align-items: flex-start;
  padding-bottom: 16px;
}

.settings-row--zoom .settings-row-copy {
  flex: 1 1 auto;
  min-width: min-content;
}

.settings-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in oklab, var(--brand) 12%, var(--surface));
  font-size: 18px;
  flex: none;
}

.settings-row-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.settings-row-label {
  font-size: 1rem;
  font-weight: 600;
}

.settings-row-hint {
  font-size: 13px;
}

.settings-row--theme {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
}

.settings-row--theme .settings-segmented {
  flex: 1 1 100%;
  margin-left: 50px;
}

.settings-segmented--theme .settings-segmented-btn {
  font-size: 14px;
}

.settings-beheer-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.settings-beheer-card:hover {
  border-color: color-mix(in oklab, var(--accent) 35%, var(--border));
  background: color-mix(in oklab, var(--accent) 6%, var(--card));
}

.settings-beheer-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in oklab, var(--brand) 14%, var(--surface));
  font-size: 20px;
  flex: none;
}

.settings-beheer-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.settings-beheer-label {
  font-size: 1rem;
  font-weight: 700;
}

.settings-beheer-hint {
  font-size: 13px;
}

.settings-beheer-chevron {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  flex: none;
}

.settings-theme-btn {
  margin-left: auto;
  min-height: 44px;
  min-width: 88px;
  padding: 0 16px;
  flex: none;
}

.settings-segmented {
  display: flex;
  width: 100%;
  gap: 6px;
  margin-top: 4px;
  padding: 4px;
  border-radius: 12px;
  background: color-mix(in oklab, var(--surface) 80%, var(--border));
}

.settings-row--zoom .settings-segmented {
  flex: 1 1 calc(100% - 50px);
  width: calc(100% - 50px);
  min-width: 0;
  margin-left: 50px;
  margin-top: 2px;
  gap: 4px;
}

.settings-row--zoom .settings-segmented-btn {
  min-width: 0;
  padding: 0 2px;
  font-size: 13px;
}

.settings-segmented-btn {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.settings-segmented-btn.is-active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 4px color-mix(in oklab, #000 8%, transparent);
}

.settings-stat-grid {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.settings-stat-grid--evening {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  min-height: 72px;
  justify-content: center;
}

.settings-stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.settings-stat-value {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen--settings .debt-widget.card {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--control-border, var(--border));
  border-radius: var(--surface-radius, 16px);
  background: var(--card);
  box-shadow: var(--control-shadow);
}

.settings-evening-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 14px;
}

.settings-evening-actions .btn {
  width: 100%;
  justify-content: center;
}

.settings-card.settings-log-list {
  padding: 6px 16px 10px;
}

.settings-card .settings-notify-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.settings-card .settings-notify-check:last-child {
  border-bottom: 0;
}

@media (max-width: 420px) {
  .settings-stat-grid--evening {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 520px) {
  .settings-row--theme {
    flex-wrap: nowrap;
    align-items: center;
  }

  .settings-row--theme .settings-segmented {
    flex: none;
    width: auto;
    min-width: 220px;
    margin-left: auto;
    margin-top: 0;
  }

  /* Zoom keeps chips on a second line so options never collide with the label. */
  .settings-row--zoom {
    flex-wrap: wrap;
    align-items: flex-start;
    padding-bottom: 14px;
  }

  .settings-row--zoom .settings-segmented {
    flex: 1 1 calc(100% - 50px);
    width: calc(100% - 50px);
    min-width: 0;
    margin-left: 50px;
    margin-top: 2px;
  }
}

.round-btn {
  flex: none;
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
  white-space: nowrap;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.ticket-line-gift {
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.ticket-line-discount {
  color: color-mix(in oklab, #34c759 72%, var(--muted));
  font-weight: 600;
}

.round-modal {
  max-width: 420px;
  width: min(100%, 420px);
}

.round-modal-lead {
  margin: 8px 0 14px;
  font-size: 14px;
  line-height: 1.4;
}

.round-modal-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.round-toggle-all {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.round-guest-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(50vh, 320px);
  overflow: auto;
  margin-bottom: 16px;
}

.round-guest-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
}

.round-guest-chip:has(input:checked) {
  border-color: color-mix(in oklab, var(--brand) 40%, var(--border));
  background: color-mix(in oklab, var(--brand) 8%, var(--surface));
}

.round-guest-chip input {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--brand);
}

.round-guest-chip span:last-child {
  font-weight: 600;
  font-size: 15px;
}

.round-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: min(52vh, 360px);
  overflow: auto;
  margin-bottom: 16px;
}

.round-product-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
  text-align: center;
}

.round-product-tile:active {
  transform: scale(0.98);
}

.round-product-tile .product-visual--thumb {
  width: 64px;
  height: 80px;
  min-height: 80px;
  border-radius: 12px;
}

.round-product-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.round-product-price {
  font-size: 11px;
}

.round-products-empty {
  margin: 0 0 16px;
  text-align: center;
}

/* Leaderboard panel */
.leaderboard-panel {
  background:
    radial-gradient(ellipse at top, color-mix(in oklab, #b8860b 14%, transparent) 0%, transparent 55%),
    var(--card);
}

.leaderboard-header {
  border-bottom-color: color-mix(in oklab, #b8860b 18%, var(--border));
  background: color-mix(in oklab, #b8860b 5%, var(--card));
}

.leaderboard-back-btn {
  display: none;
  min-height: 44px;
  padding-inline: 12px;
}

.pos-brand-mark-wrap--gold {
  background: linear-gradient(145deg, #f7f2ea, color-mix(in oklab, #b8860b 18%, #f7f2ea));
  border-color: color-mix(in oklab, #b8860b 28%, var(--border));
}

.leaderboard-toolbar {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 6px 18px 18px;
  border-bottom: 1px solid var(--border);
}

.leaderboard-view-switch {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 16px;
  background: color-mix(in oklab, var(--surface) 55%, var(--card));
  border: 1px solid var(--border);
}

.leaderboard-view-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.leaderboard-view-btn.is-active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 8px color-mix(in oklab, #000 10%, transparent);
}

.leaderboard-view-btn.is-active[data-id="rounds"] {
  background: color-mix(in oklab, #6b4e3d 10%, var(--card));
}

.leaderboard-view-btn.is-active[data-id="drinks"] {
  background: color-mix(in oklab, #b8860b 12%, var(--card));
}

.leaderboard-view-btn.is-active[data-id="darts"] {
  background: color-mix(in oklab, #2f6b4f 12%, var(--card));
}

.leaderboard-view-switch--triple {
  gap: 8px;
}

.leaderboard-dart-form {
  margin: 0 0 18px;
  padding: 16px 18px;
  display: grid;
  gap: 14px;
  border: 1px solid color-mix(in oklab, #2f6b4f 22%, var(--border));
  background: linear-gradient(
    160deg,
    color-mix(in oklab, #2f6b4f 8%, var(--card)) 0%,
    var(--card) 70%
  );
}

.leaderboard-dart-form.is-collapsed {
  gap: 0;
  padding-block: 12px;
}

.leaderboard-dart-form-head {
  display: grid;
  gap: 4px;
}

.leaderboard-dart-form-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.leaderboard-dart-form-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.leaderboard-dart-form-toggle {
  flex: none;
  white-space: nowrap;
}

.leaderboard-dart-form-lead {
  margin: 0;
  font-size: 13px;
}

.leaderboard-dart-form-body {
  display: grid;
  gap: 14px;
}

.leaderboard-dart-form.is-collapsed .leaderboard-dart-form-lead,
.leaderboard-dart-form.is-collapsed .leaderboard-dart-form-body {
  display: none;
}

.leaderboard-dart-participants {
  display: grid;
  gap: 10px;
}

.leaderboard-dart-participants-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
}

.leaderboard-hero--darts {
  border-color: color-mix(in oklab, #2f6b4f 28%, var(--border));
  background: linear-gradient(
    135deg,
    color-mix(in oklab, #2f6b4f 12%, var(--card)) 0%,
    color-mix(in oklab, var(--surface) 40%, var(--card)) 100%
  );
}

.leaderboard-scope-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.leaderboard-body {
  padding: 0;
}

.leaderboard-content {
  padding: 18px 18px 20px;
}

.leaderboard-hero {
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid color-mix(in oklab, #b8860b 28%, var(--border));
  background: linear-gradient(
    135deg,
    color-mix(in oklab, #b8860b 12%, var(--card)) 0%,
    color-mix(in oklab, var(--surface) 40%, var(--card)) 100%
  );
}

.leaderboard-hero-label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.leaderboard-hero-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.leaderboard-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.leaderboard-hero-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-hero-score {
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
}

.leaderboard-scope {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  background: color-mix(in oklab, var(--surface) 55%, var(--card));
  border: 1px solid var(--border);
  flex: none;
}

.leaderboard-scope-btn {
  min-height: 36px;
  padding: 6px 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.leaderboard-scope-btn.is-active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 6px color-mix(in oklab, #000 8%, transparent);
}

.leaderboard-scope-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.leaderboard-sections {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.leaderboard-block-title {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 700;
}

.podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
}

.podium-place {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 148px;
  padding: 14px 10px 12px;
  border-radius: 16px 16px 8px 8px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface) 45%, var(--card));
  text-align: center;
}

.podium-1 {
  min-height: 188px;
  background: linear-gradient(
    180deg,
    color-mix(in oklab, #b8860b 18%, var(--card)) 0%,
    color-mix(in oklab, var(--surface) 40%, var(--card)) 100%
  );
  border-color: color-mix(in oklab, #b8860b 35%, var(--border));
}

.podium-2 {
  background: linear-gradient(
    180deg,
    color-mix(in oklab, #94a3b8 16%, var(--card)) 0%,
    color-mix(in oklab, var(--surface) 40%, var(--card)) 100%
  );
  border-color: color-mix(in oklab, #94a3b8 30%, var(--border));
}

.podium-3 {
  background: linear-gradient(
    180deg,
    color-mix(in oklab, #b87333 16%, var(--card)) 0%,
    color-mix(in oklab, var(--surface) 40%, var(--card)) 100%
  );
  border-color: color-mix(in oklab, #b87333 30%, var(--border));
}

.podium-place.is-empty {
  opacity: 0.55;
}

.podium-medal {
  font-size: 22px;
  line-height: 1;
}

.podium-name {
  width: 100%;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-score {
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
}

.podium-avatar--empty {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px dashed var(--border);
  background: color-mix(in oklab, var(--surface) 60%, transparent);
}

.leaderboard-rest {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.leaderboard-rest .leaderboard-row:last-child {
  border-bottom: 0;
}

.leaderboard-rank {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: none;
  border-radius: 999px;
  background: color-mix(in oklab, var(--surface) 60%, var(--card));
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.leaderboard-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-value {
  flex: none;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
  font-weight: 800;
  font-size: 15px;
}

.leaderboard-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 20px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: color-mix(in oklab, var(--surface) 35%, var(--card));
}

.leaderboard-empty p {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.leaderboard-empty-icon {
  font-size: 2rem;
  line-height: 1;
}

.leaderboard-rest-head {
  padding: 10px 16px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface) 40%, var(--card));
}

.leaderboard-rest-empty {
  margin: 0;
  padding: 14px 16px;
  font-size: 14px;
  text-align: center;
}

/* Wheel panel */
.wheel-panel {
  background:
    radial-gradient(ellipse at top, color-mix(in oklab, #7d5a47 16%, transparent) 0%, transparent 55%),
    var(--card);
}

.wheel-header {
  border-bottom-color: color-mix(in oklab, #7d5a47 18%, var(--border));
  background: color-mix(in oklab, #7d5a47 5%, var(--card));
}

.wheel-back-btn {
  display: none;
  min-height: 44px;
  padding-inline: 12px;
}

.pos-brand-mark-wrap--wheel {
  background: linear-gradient(145deg, #f7f2ea, color-mix(in oklab, #7d5a47 18%, #f7f2ea));
  border-color: color-mix(in oklab, #7d5a47 28%, var(--border));
}

.wheel-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  container-type: size;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px 14px;
}

.wheel-toolbar {
  flex-shrink: 0;
  padding: 6px 18px 14px;
  border-bottom: 1px solid var(--border);
}

.wheel-toolbar-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wheel-guest-picker-btn {
  width: 100%;
  min-height: 42px;
  font-size: 14px;
  font-weight: 700;
}

.wheel-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  background: color-mix(in oklab, var(--surface) 55%, var(--card));
  border: 1px solid var(--border);
}

.wheel-mode-btn {
  flex: 1 1 calc(50% - 3px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

@media (min-width: 720px) {
  .wheel-mode-btn {
    flex: 1 1 0;
    font-size: 14px;
    gap: 8px;
    padding: 8px 12px;
  }
}

.wheel-mode-btn.is-active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 8px color-mix(in oklab, #000 10%, transparent);
}

.wheel-mode-btn.is-active[data-id="shots"] {
  background: color-mix(in oklab, #6b4e3d 10%, var(--card));
}

.wheel-mode-btn.is-active[data-id="guests"] {
  background: color-mix(in oklab, #007aff 10%, var(--card));
}

.wheel-mode-btn.is-active[data-id="dice"] {
  background: color-mix(in oklab, #7d5a47 12%, var(--card));
}

.wheel-many-warning {
  width: 100%;
  max-width: 520px;
  margin: 0;
  flex: none;
  padding: 10px 14px;
  border-radius: 12px;
  background: color-mix(in oklab, #b8860b 10%, var(--card));
  border: 1px solid color-mix(in oklab, #b8860b 22%, var(--border));
  font-size: 13px;
  text-align: center;
}

.wheel-stage {
  position: relative;
  flex: 0 0 auto;
  align-self: center;
  width: min(100cqi, 100cqh, 720px);
  max-width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  max-height: 100%;
  display: block;
}

.wheel-stage,
.wheel-rotor,
.wheel-canvas {
  transition: none;
}

.wheel-rotor {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    0 8px 28px color-mix(in oklab, #000 18%, transparent),
    inset 0 0 0 4px color-mix(in oklab, #6b4e3d 35%, #fff);
  will-change: transform;
}

.wheel-canvas {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}

.wheel-pointer {
  position: absolute;
  top: -2px;
  left: 50%;
  z-index: 2;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 22px solid #6b4e3d;
  filter: drop-shadow(0 2px 4px color-mix(in oklab, #000 25%, transparent));
}

.wheel-spin-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Beat body.pos-body .btn-primary gradient; center "Draai!" in the hub */
body.pos-body .btn.wheel-spin-btn,
body.pos-body .wheel-spin-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  width: 96px;
  height: 96px;
  min-width: 96px;
  min-height: 96px;
  padding: 0;
  margin: 0;
  gap: 0;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
  background: #000;
  background-color: #000;
  background-image: none;
  color: #fff;
  -webkit-text-fill-color: #fff;
  border: 2px solid #000;
  box-shadow: 0 4px 16px color-mix(in oklab, #000 20%, transparent);
  transition: box-shadow 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

body.pos-body .btn.wheel-spin-btn:hover,
body.pos-body .btn.wheel-spin-btn:focus-visible,
body.pos-body .wheel-spin-btn:hover,
body.pos-body .wheel-spin-btn:focus-visible {
  background: #1a1a1a;
  background-color: #1a1a1a;
  background-image: none;
  border-color: #1a1a1a;
  box-shadow: 0 8px 22px color-mix(in oklab, #000 35%, transparent);
  transform: none;
}

body.pos-body .btn.wheel-spin-btn:active,
body.pos-body .wheel-spin-btn:active {
  background: #000;
  background-color: #000;
  background-image: none;
  border-color: #000;
  box-shadow: 0 2px 8px color-mix(in oklab, #000 22%, transparent);
  transform: none;
}

body.pos-body .btn.wheel-spin-btn:disabled,
body.pos-body .wheel-spin-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.wheel-modal-label {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wheel-modal-guest {
  margin: -2px 0 0;
  font-size: 13px;
  font-weight: 500;
}

.wheel-modal-avatar {
  display: flex;
  justify-content: center;
  margin: 0 0 12px;
}

.wheel-modal-hero {
  display: flex;
  justify-content: center;
  margin: 4px 0 14px;
}

.wheel-modal--guest .wheel-modal-hero .avatar,
.wheel-modal--guest .avatar-hero {
  /* Cap by viewport height so landscape iPad Mini keeps actions on-screen */
  --wheel-hero-size: clamp(112px, min(36vw, 28dvh), 280px);
  width: var(--wheel-hero-size);
  height: var(--wheel-hero-size);
  font-size: clamp(40px, calc(var(--wheel-hero-size) * 0.33), 96px);
  border-width: clamp(4px, 1vw, 7px);
  box-shadow:
    0 clamp(12px, 3vw, 28px) clamp(28px, 7vw, 64px) color-mix(in oklab, #000 22%, transparent),
    0 0 0 clamp(4px, 1.2vw, 10px) color-mix(in oklab, #fff 85%, transparent);
  animation: wheel-modal-hero-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.wheel-modal--shot .wheel-modal-hero .product-visual--thumb {
  --wheel-hero-size: clamp(112px, min(36vw, 28dvh), 280px);
  width: var(--wheel-hero-size);
  max-width: none;
  height: var(--wheel-hero-size);
  min-height: unset;
  aspect-ratio: 1 / 1;
  flex: none;
  border-radius: clamp(14px, 2.5vw, 24px);
  border-width: clamp(3px, 0.7vw, 5px);
  box-shadow:
    0 clamp(12px, 3vw, 28px) clamp(28px, 7vw, 64px) color-mix(in oklab, #000 22%, transparent),
    0 0 0 clamp(4px, 1.2vw, 10px) color-mix(in oklab, #fff 85%, transparent);
  animation: wheel-modal-hero-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.wheel-modal--shot .wheel-modal-hero .product-visual--thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wheel-modal--shot .mix-modal-price {
  font-size: clamp(1rem, 2.4vw, 1.15rem);
}

@keyframes wheel-modal-hero-in {
  from {
    opacity: 0;
    transform: scale(0.55);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-layer:has(.wheel-modal--guest),
.modal-layer:has(.wheel-modal--shot) {
  width: min(92vw, 640px);
}

.wheel-modal--guest,
.wheel-modal--shot {
  border-radius: clamp(20px, 3vw, 28px);
  max-height: 100%;
}

.wheel-modal--guest .mix-modal-header,
.wheel-modal--shot .mix-modal-header {
  padding: clamp(16px, 3.5vh, 40px) clamp(18px, 4vw, 36px) clamp(12px, 2.5vh, 32px);
}

.wheel-modal--guest .wheel-modal-label,
.wheel-modal--shot .wheel-modal-label {
  margin: 0 0 clamp(8px, 2vh, 22px);
  font-size: clamp(13px, 2.2vw, 17px);
}

.wheel-modal--guest .wheel-modal-hero,
.wheel-modal--shot .wheel-modal-hero {
  margin: clamp(4px, 1vh, 10px) 0 clamp(10px, 2.5vh, 32px);
}

.wheel-modal--guest .mix-modal-name,
.wheel-modal--shot .mix-modal-name {
  font-size: clamp(1.35rem, 4.5vw, 2.4rem);
  line-height: 1.15;
}

.wheel-modal--guest .mix-modal-actions,
.wheel-modal--shot .mix-modal-actions {
  gap: clamp(8px, 1.5vh, 14px);
  padding: clamp(12px, 2.5vh, 24px) clamp(16px, 4vw, 32px) clamp(14px, 3vh, 36px);
}

.wheel-modal--guest .mix-modal-btn,
.wheel-modal--shot .mix-modal-btn {
  min-height: clamp(48px, 7vh, 64px);
  padding: clamp(10px, 1.8vh, 16px) clamp(16px, 3vw, 24px);
  border-radius: clamp(12px, 2vw, 18px);
  font-size: clamp(15px, 2.2vw, 18px);
}

.wheel-modal--guest .mix-modal-cta-single,
.wheel-modal--shot .mix-modal-cta-single {
  font-size: clamp(15px, 2.4vw, 19px);
}

@media (max-height: 700px) {
  .modal-root {
    padding: max(6px, var(--safe-top)) max(10px, var(--safe-right)) max(6px, var(--safe-bottom)) max(10px, var(--safe-left));
  }

  .round-guest-grid {
    max-height: min(38vh, 240px);
  }

  .round-product-grid {
    max-height: min(40vh, 260px);
  }
}

.wheel-empty {
  margin: auto;
}

/* ── Rad toys: dobbelsteen ── */

.wheel-toy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.5cqh, 22px);
  width: min(100%, 480px);
  margin: auto;
  padding: 4px 0 8px;
  text-align: center;
}

/* Die sits higher; reserved bottom space so 3D projection clears labels */
.wheel-toy--dice {
  justify-content: flex-start;
  gap: clamp(10px, 2cqh, 16px);
  padding: clamp(4px, 1cqh, 10px) 0 clamp(8px, 1.5cqh, 14px);
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
}

.wheel-toy--dice .dice-stage {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  align-content: center;
  width: 100%;
  min-height: 0;
  /* Extra bottom padding: tilted cube + shadow project below the layout box */
  padding: clamp(6px, 1.2cqh, 12px) clamp(8px, 1.5cqi, 14px) clamp(36px, 7cqh, 64px);
  margin: 0;
  box-sizing: border-box;
}

.wheel-toy--dice .wheel-toy-result,
.wheel-toy--dice .wheel-toy-btn {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.wheel-toy--dice .wheel-toy-result {
  margin-top: clamp(2px, 0.6cqh, 6px);
}

.wheel-toy-result {
  margin: 0;
  min-height: 1.35em;
  font-size: clamp(1.45rem, 4.8cqw, 2rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: color 0.2s ease;
}

.wheel-toy-result.is-set {
  color: var(--text);
  animation: wheel-toy-result-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes wheel-toy-result-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.wheel-toy-btn {
  min-width: 168px;
  min-height: 52px;
  font-size: 1.05rem;
  font-weight: 800;
}

.dice-stage {
  appearance: none;
  border: 0;
  background: transparent;
  padding: clamp(8px, 1.5cqh, 16px);
  cursor: pointer;
  perspective: 1100px;
  transform-style: preserve-3d;
  -webkit-tap-highlight-color: transparent;
}

.dice-stage:disabled {
  cursor: wait;
}

.dice {
  /* Faces flush to half-size + 0.5px (seals seams without in-plane scale lips) */
  --dice-size: min(52cqi, 38cqh, 220px);
  --dice-depth: calc(var(--dice-size) / 2 + 0.5px);
  --dice-radius: 2%;
  position: relative;
  display: block;
  width: var(--dice-size);
  height: var(--dice-size);
  /* Look down at the table-top face (result) */
  transform: rotateX(-48deg) rotateY(28deg);
  transform-style: preserve-3d;
}

.dice::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -14%;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    color-mix(in oklab, #000 28%, transparent) 0%,
    transparent 72%
  );
  transform: translateZ(-12px);
  pointer-events: none;
  z-index: -1;
}

.dice-cube {
  /* Must be block/absolute — inline span collapses; % face sizes become ~0 */
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(0deg) rotateY(0deg);
  transition: transform 1.4s cubic-bezier(0.18, 0.7, 0.22, 1);
  will-change: transform;
}

/* Solid body fills any sub-pixel corner gaps */
.dice-cube::before {
  content: "";
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 1%;
  background: #e6d7c3;
  transform: translateZ(0);
  pointer-events: none;
}

.dice-core {
  position: absolute;
  inset: 2%;
  display: block;
  border-radius: 1%;
  background: #e8d9c6;
  transform: translateZ(0);
  pointer-events: none;
}

.dice.is-rolling {
  animation: dice-toss 1.4s cubic-bezier(0.18, 0.72, 0.22, 1) both;
}

.dice.is-rolling .dice-cube {
  transition-duration: 1.4s;
}

.dice.is-landed {
  animation: dice-land 0.48s cubic-bezier(0.22, 1.35, 0.36, 1) both;
}

@keyframes dice-toss {
  0% {
    transform: rotateX(-48deg) rotateY(28deg) translateY(0) scale(1);
  }
  16% {
    transform: rotateX(-54deg) rotateY(20deg) translateY(-28px) scale(1.04);
  }
  38% {
    transform: rotateX(-42deg) rotateY(32deg) translateY(-10px) scale(1.01);
  }
  62% {
    transform: rotateX(-52deg) rotateY(22deg) translateY(-16px) scale(1.02);
  }
  82% {
    transform: rotateX(-46deg) rotateY(26deg) translateY(4px) scale(0.98);
  }
  100% {
    transform: rotateX(-48deg) rotateY(28deg) translateY(0) scale(1);
  }
}

@keyframes dice-land {
  0% {
    transform: rotateX(-48deg) rotateY(28deg) scale(0.94) translateY(6px);
  }
  55% {
    transform: rotateX(-48deg) rotateY(28deg) scale(1.03) translateY(-2px);
  }
  100% {
    transform: rotateX(-48deg) rotateY(28deg) scale(1) translateY(0);
  }
}

.dice-face {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  place-items: center;
  padding: 15%;
  margin: 0;
  border: 0;
  outline: 0;
  border-radius: var(--dice-radius);
  background: #efe6d8 linear-gradient(155deg, #fbf7f0 0%, #efe6d8 52%, #e0d0bc 100%);
  box-shadow:
    inset 0 1px 2px color-mix(in oklab, #fff 40%, transparent),
    inset 0 -2px 5px color-mix(in oklab, #6b4e3d 8%, transparent);
  color: transparent;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.dice-face--1 { transform: rotateY(0deg) translateZ(var(--dice-depth)); }
.dice-face--2 { transform: rotateX(90deg) translateZ(var(--dice-depth)); }
.dice-face--3 { transform: rotateY(90deg) translateZ(var(--dice-depth)); }
.dice-face--4 { transform: rotateY(-90deg) translateZ(var(--dice-depth)); }
.dice-face--5 { transform: rotateX(-90deg) translateZ(var(--dice-depth)); }
.dice-face--6 { transform: rotateY(180deg) translateZ(var(--dice-depth)); }

.dice-pip {
  width: 28%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: transparent;
}

.dice-pip.is-on {
  background: radial-gradient(circle at 35% 30%, #5a4236, #2c1f19 70%);
  box-shadow:
    inset 0 1px 2px color-mix(in oklab, #000 40%, transparent),
    0 1px 0 color-mix(in oklab, #fff 35%, transparent);
}

/* ── Admin panel (Beheerpaneel) — VOSS-style shell ── */

.screen--admin {
  inset: calc(8px + var(--safe-top)) calc(8px + var(--safe-right)) calc(8px + var(--safe-bottom)) calc(8px + var(--safe-left));
}

.screen-body--admin {
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.admin-shell {
  --admin-sidebar-width: clamp(240px, 18vw, 280px);
  --admin-logo-width: 180px;
  --admin-main-pad: clamp(12px, 1.8vh, 22px) clamp(14px, 1.8vw, 22px);
  display: grid;
  grid-template-columns: var(--admin-sidebar-width) minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  height: 100%;
  background: var(--bg);
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.5vh, 16px);
  padding: clamp(10px, 1.6vh, 18px) clamp(10px, 1vw, 14px);
  border-right: 1px solid var(--border);
  background: var(--card);
  min-height: 0;
  overflow: hidden;
}

.admin-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 4px 4px 8px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.admin-brand-logo {
  width: min(var(--admin-logo-width, 180px), 100%);
  height: auto;
  display: block;
}

.admin-brand-logo--dark { display: none; }

html[data-theme="dark"] .admin-brand-logo--light { display: none; }

html[data-theme="dark"] .admin-brand-logo--dark { display: block; }

.admin-brand-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

.admin-brand-sub {
  font-size: 11px;
  line-height: 1.35;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.admin-nav-link:hover {
  background: color-mix(in oklab, var(--accent) 8%, var(--card));
  border-color: color-mix(in oklab, var(--accent) 18%, var(--border));
}

.admin-nav-link.is-active {
  background: color-mix(in oklab, var(--accent) 12%, var(--card));
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
  color: var(--accent);
}

.admin-nav-icon {
  flex: none;
  width: 1.25rem;
  text-align: center;
  font-size: 1rem;
  line-height: 1;
}

.admin-nav-label {
  flex: 1;
  min-width: 0;
}

.admin-sidebar-bottom {
  flex-shrink: 0;
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.admin-sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-sidebar-clock {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 6%, var(--card));
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.admin-sidebar-clock:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--card));
}

.admin-sidebar-clock-time,
.admin-clock-fullscreen-time {
  --admin-clock-group-width: 2.35ch;
  --admin-clock-sep-width: 0.95em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(3 * var(--admin-clock-group-width) + 2 * var(--admin-clock-sep-width));
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  line-height: 1;
  color: var(--text);
}

.admin-sidebar-clock-time {
  font-size: 1rem;
  font-weight: 600;
}

.admin-clock-group {
  display: inline-flex;
  flex: 0 0 var(--admin-clock-group-width);
  width: var(--admin-clock-group-width);
  min-width: var(--admin-clock-group-width);
  justify-content: center;
  gap: 0.12em;
}

.admin-clock-digit {
  display: inline-block;
  flex: 0 0 1ch;
  width: 1ch;
  min-width: 1ch;
  height: 1em;
  line-height: 1em;
  overflow: hidden;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.admin-clock-digit.is-tick {
  animation: admin-clock-tick 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.admin-clock-sep {
  flex: 0 0 var(--admin-clock-sep-width);
  width: var(--admin-clock-sep-width);
  text-align: center;
  opacity: 0.45;
  user-select: none;
}

.admin-sidebar-clock-date {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

@keyframes admin-clock-tick {
  0% {
    transform: translateY(0);
    opacity: 1;
  }

  40% {
    transform: translateY(-0.45em);
    opacity: 0;
  }

  41% {
    transform: translateY(0.35em);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-clock-digit.is-tick {
    animation: none;
  }
}

body.admin-clock-fullscreen-open {
  overflow: hidden;
}

.admin-clock-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
}

.admin-clock-fullscreen[hidden] {
  display: none;
}

.admin-clock-fullscreen-back {
  position: absolute;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.admin-clock-fullscreen-back:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
}

.admin-clock-fullscreen-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 24px;
  text-align: center;
}

.admin-clock-fullscreen-time {
  --admin-clock-group-width: 2.4ch;
  --admin-clock-sep-width: 0.8em;
  font-size: clamp(4.5rem, 20vw, 9rem);
  font-weight: 600;
}

.admin-clock-fullscreen-date {
  font-size: clamp(1.2rem, 3.8vw, 1.65rem);
  line-height: 1.4;
  letter-spacing: 0.015em;
  max-width: min(92vw, 36rem);
}

.admin-clock-fullscreen-logo {
  margin-top: 12px;
}

.admin-clock-fullscreen-logo .admin-brand-logo {
  width: min(220px, 50vw);
}

.admin-nav-back {
  color: var(--muted);
}

.admin-main-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.admin-topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: clamp(10px, 1.4vh, 14px) clamp(14px, 1.6vw, 20px);
  border-bottom: 1px solid var(--border);
  background: var(--card);
  flex-shrink: 0;
}

.admin-menu-btn {
  display: none;
  min-height: 36px;
  padding: 6px 10px;
}

.admin-page-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--admin-main-pad);
  display: grid;
  gap: clamp(14px, 2vh, 20px);
  align-content: start;
}

.admin-section {
  display: grid;
  gap: clamp(14px, 2vh, 20px);
  align-content: start;
}

/* Dashboard home */

.admin-home-hero {
  padding: 18px 20px;
}

.admin-home-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-home-title {
  margin: 0 0 8px;
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  line-height: 1.15;
}

.admin-home-lead {
  margin: 0;
  max-width: 58ch;
  font-size: 14px;
  line-height: 1.5;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 12px;
}

.admin-stat-card {
  padding: 16px 18px;
  display: grid;
  gap: 6px;
}

.admin-stat-card--alert {
  border-color: color-mix(in oklab, #b8860b 40%, var(--border));
  background: color-mix(in oklab, #b8860b 8%, var(--card));
}

.admin-stat-label {
  font-size: 12px;
  color: var(--muted);
}

.admin-stat-value {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.admin-stat-sub {
  font-size: 11px;
  line-height: 1.35;
}

.admin-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 14px;
}

.admin-chart-panel {
  display: grid;
  gap: 6px;
}

.admin-chart-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.admin-chart-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.admin-chart {
  padding: 14px;
}

.admin-chart--empty {
  min-height: 160px;
  display: grid;
  place-items: center;
}

.admin-chart-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.admin-chart-donut-wrap {
  position: relative;
  flex: none;
  width: 120px;
  height: 120px;
}

.admin-chart-donut {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  mask: radial-gradient(circle at center, transparent 58%, #000 59%);
  -webkit-mask: radial-gradient(circle at center, transparent 58%, #000 59%);
}

.admin-chart-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  line-height: 1.1;
  text-align: center;
  pointer-events: none;
}

.admin-chart-center strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.admin-chart-legend {
  flex: 1;
  min-width: 120px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.admin-chart-legend li {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.admin-chart-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.admin-open-btn {
  margin-top: 6px;
  width: 100%;
  font-size: 13px;
}

.admin-section-toolbar {
  margin-bottom: 0;
}

.admin-price-row,
.admin-badge-row,
.admin-inventory-row,
.admin-discount-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.group .admin-price-row:last-child,
.group .admin-badge-row:last-child,
.group .admin-inventory-row:last-child,
.group .admin-discount-row:last-child { border-bottom: 0; }

.admin-price-name,
.admin-badge-name {
  flex: 1;
  min-width: 0;
}

.admin-price-field {
  flex: none;
  width: 88px;
}

.admin-price-field input {
  width: 100%;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.admin-badge-row {
  cursor: pointer;
}

.admin-badge-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.admin-badge-pill {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--muted) 18%, transparent);
  color: var(--muted);
}

.admin-badge-pill.is-on {
  background: color-mix(in oklab, #b8860b 22%, var(--card));
  color: #9a7209;
}

.admin-badge-pill--promo.is-on {
  background: color-mix(in oklab, #c41e3a 18%, var(--card));
  color: #a31830;
}

.admin-badge-pill--limited.is-on {
  background: color-mix(in oklab, #c45c26 20%, var(--card));
  color: #a3481c;
}

.admin-badge-pill--soldout.is-on {
  background: color-mix(in oklab, #5c4a3a 22%, var(--card));
  color: #4a3828;
}

.admin-badge-row--triple {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 10px;
  align-items: center;
}

.admin-badge-row--quad {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto auto;
  gap: 10px;
  align-items: center;
}

.product-new-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 3px 7px;
  border-radius: 999px;
  background: #b8860b;
  color: #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 18%);
}

.product-promo-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 3px 7px;
  border-radius: 999px;
  background: #c41e3a;
  color: #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 18%);
}

.product-limited-badge {
  position: absolute;
  bottom: 36px;
  left: 8px;
  z-index: 2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 3px 7px;
  border-radius: 999px;
  background: #c45c26;
  color: #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 18%);
  white-space: nowrap;
}

.product-soldout-badge {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: #5c4a3a;
  color: #f7f2ea;
  box-shadow: 0 2px 8px rgb(0 0 0 / 22%);
  white-space: nowrap;
}

.product-tile.is-sold-out {
  opacity: 0.62;
  filter: grayscale(0.35);
}

.product-tile.is-sold-out:disabled {
  cursor: not-allowed;
}

.debt-progress {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--ink) 10%, transparent);
  overflow: hidden;
  margin: 10px 0 6px;
}

.debt-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f5c45, #3d8b5c);
  transition: width 0.35s ease;
}

.debt-widget-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.debt-widget-amount,
.admin-debt-amount {
  display: block;
  font-size: 1.5rem;
  line-height: 1.1;
}

.debt-widget-hint,
.admin-debt-hint {
  font-size: 13px;
  margin: 0;
}

.admin-debt-card {
  margin-bottom: 14px;
}

.admin-debt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-debt-pct {
  font-size: 1.25rem;
  font-weight: 800;
  color: #2f5c45;
}

.admin-debt-sub {
  display: block;
  font-size: 13px;
}

.admin-margin-ok,
.admin-margin-low,
.admin-margin-na {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-margin-ok {
  color: #2f5c45;
}

.admin-margin-low {
  color: #c41e3a;
}

.admin-price-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  align-items: center;
}

.admin-prices-hint {
  margin: 0 0 12px;
}

.product-price-was {
  display: block;
  font-size: 11px;
  text-decoration: line-through;
}

.admin-inventory-row {
  align-items: flex-start;
  flex-wrap: wrap;
}

.admin-inventory-copy {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-inventory-status {
  font-size: 13px;
  line-height: 1.35;
}

.admin-inventory-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.admin-inventory-fields--inline {
  padding: 0 4px 12px;
}

.admin-inv-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: var(--muted);
}

.admin-inv-field input {
  width: 72px;
  font-size: 14px;
}

.admin-mix-hint {
  align-self: end;
  font-size: 12px;
}

.admin-discount-row .admin-discount-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-discount-form {
  margin-top: 8px;
}

.admin-empty-note {
  padding: 12px 16px;
  margin: 0;
}

.btn-sm {
  min-height: var(--control-min-height, 44px);
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 999px;
  border-color: var(--control-border, var(--border));
  box-shadow: var(--control-shadow);
}

.danger-text { color: #dc2626; }

@media (max-width: 860px) {
  .admin-shell {
    grid-template-columns: 1fr;
    position: relative;
  }

  .admin-sidebar {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 20;
    width: min(var(--admin-sidebar-width), 82vw);
    transform: translateX(-105%);
    transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 12px 40px rgb(0 0 0 / 18%);
  }

  .admin-sidebar[data-open="true"] {
    transform: translateX(0);
  }

  .admin-menu-btn {
    display: inline-flex;
  }
}

@media (min-width: 861px) {
  .admin-inventory-row {
    flex-wrap: nowrap;
    align-items: center;
  }
}

.product-stock-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}
.product-stock-badge--low { background: #b8860b; color: #fff; }
.product-stock-badge--empty { background: #7a2e3a; color: #fff; }
.product-tile.is-stock-low { outline: 2px solid color-mix(in oklab, #b8860b 55%, transparent); }
.product-tile.is-stock-empty { outline: 2px solid color-mix(in oklab, #7a2e3a 45%, transparent); }
.settings-sync-status { margin: 0 0 8px; font-size: 13px; }
.settings-log-list { display: grid; gap: 0; }
.settings-log-row { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.settings-log-row:last-child { border-bottom: 0; }
.settings-log-time { font-size: 12px; }
.settings-log-label { font-size: 13px; }

/* Landing page */
body.pos-body.pos-landing-body {
  position: relative;
  inset: auto;
  overflow: auto;
  min-height: 100dvh;
  height: auto;
}

.pos-landing-body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at top left, color-mix(in oklab, #8b6914 12%, transparent), transparent 45%),
    radial-gradient(circle at bottom right, color-mix(in oklab, #6b4e3d 10%, transparent), transparent 40%),
    var(--bg);
}

.pos-landing {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(32px + var(--safe-top)) calc(24px + var(--safe-right)) calc(32px + var(--safe-bottom)) calc(24px + var(--safe-left));
  box-sizing: border-box;
}

.pos-landing-card {
  width: min(560px, 100%);
  text-align: center;
  padding: clamp(32px, 7vw, 48px) clamp(24px, 6vw, 40px);
  box-sizing: border-box;
  box-shadow: var(--shadow);
}

.pos-landing-logo {
  display: block;
  width: min(340px, 88vw);
  height: auto;
  margin: 0 auto 24px;
}

.pos-landing-eyebrow {
  margin: 0 0 4px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pos-landing-title {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
}

.pos-landing-lead {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.55;
  max-width: 42ch;
  margin-inline: auto;
}

.pos-landing-form {
  width: 100%;
  text-align: left;
  margin-bottom: 16px;
}

.pos-landing-form .panel-field {
  margin-bottom: 14px;
}

.pos-landing-error {
  margin: 0 0 14px;
  text-align: left;
}

.pos-landing-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.pos-landing-btn {
  width: 100%;
  justify-content: center;
  font-size: 1.05rem;
  padding: 14px 20px;
}

.pos-landing-foot {
  margin: 0;
  font-size: 13px;
}

body.pos-entrance-pending .pos-access-login {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

body.pos-entrance-pending.is-entered .pos-access-login {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.45s ease 0.15s, visibility 0.45s ease 0.15s;
}

/* Tab receipt preview — fixed shell, scrollable paper, sticky footer */
.modal-root:has(.pos-receipt-preview-modal) {
  place-items: safe center;
  align-content: safe center;
  padding: max(8px, var(--safe-top)) 10px max(8px, var(--safe-bottom));
  overflow: hidden;
}

.modal-layer:has(.pos-receipt-preview-modal) {
  width: min(100%, 520px);
  max-width: 100%;
  max-height: calc(100vh - 16px - var(--safe-top) - var(--safe-bottom));
  max-height: calc(100svh - 16px - var(--safe-top) - var(--safe-bottom));
  max-height: calc(100dvh - 16px - var(--safe-top) - var(--safe-bottom));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.pos-receipt-preview-modal {
  /* Override .pos-modal-card display:grid — explicit rows keep footer on-screen */
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  min-height: 0;
  max-height: inherit;
  overflow: hidden;
}

.pos-receipt-preview-head {
  grid-row: 1;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.pos-receipt-preview-lead {
  font-size: 0.88rem;
  line-height: 1.35;
}

.pos-receipt-preview-scroll {
  grid-row: 2;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #f6f1ea;
  padding: 10px;
}

html[data-theme="dark"] .pos-receipt-preview-scroll {
  background: color-mix(in oklab, var(--card) 82%, #fff 18%);
}

.pos-receipt-preview-paper {
  margin: 0 auto;
  max-width: 360px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(28, 22, 18, 0.08);
  color: #2c2118;
  /* Allow selecting receipt text on iPad */
  user-select: text;
  -webkit-user-select: text;
}

.pos-receipt-preview-paper .pos-receipt {
  max-width: none;
}

.pos-receipt-preview-actions {
  grid-row: 3;
  flex-shrink: 0;
  padding-top: 2px;
  position: sticky;
  bottom: 0;
  z-index: 2;
  flex-wrap: wrap;
  background: var(--card);
}

.pos-receipt-preview-actions .btn {
  min-height: var(--control-min-height);
  justify-content: center;
  font-weight: 700;
  flex: 1 1 auto;
  min-width: 7.5rem;
}

.pos-receipt-preview-actions .btn-primary {
  color: #fff;
  -webkit-text-fill-color: #fff;
}

html[data-theme="dark"] .pos-receipt-preview-actions .btn-primary {
  color: #1c1612;
  -webkit-text-fill-color: #1c1612;
}

/* Keep toasts under open Bon modal so they cannot cover Printen */
.modal-root:not([hidden]):has(.pos-receipt-preview-modal) ~ .toast,
body.pos-body:has(.pos-receipt-preview-modal) .toast {
  z-index: 8400;
}

/* Tab receipt (bon) — narrow café print */
.pos-receipt-body {
  margin: 0;
  background: #fff;
  color: #2c2118;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.pos-receipt {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: 16px 14px 22px;
  box-sizing: border-box;
  background: #fff;
  color: #2c2118;
}

.pos-receipt-header {
  text-align: center;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 2px solid color-mix(in oklab, #6b4e3d 25%, #d4c4a8);
}

.pos-receipt-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.pos-receipt-logo {
  height: 132px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.pos-receipt-venue {
  margin: 0;
  font-size: 0.95rem;
  color: #6b4e3d;
}

.pos-receipt-meta {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: #7a6a5a;
}

.pos-receipt-guest {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #2c2118;
}

.pos-receipt-guest span {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7a6a5a;
  margin-bottom: 2px;
}

.pos-receipt-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.82rem;
}

.pos-receipt-table col.pos-receipt-col-name {
  width: auto;
}

.pos-receipt-table col.pos-receipt-col-qty {
  width: 3.25rem;
}

.pos-receipt-table col.pos-receipt-col-unit {
  width: 4.75rem;
}

.pos-receipt-table col.pos-receipt-col-total {
  width: 5.25rem;
}

.pos-receipt-table th {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7a6a5a;
  padding: 0 4px 6px;
  border-bottom: 1px solid #d4c4a8;
  vertical-align: bottom;
}

.pos-receipt-table td {
  padding: 8px 4px;
  vertical-align: top;
  border-bottom: 1px dotted #e5d9c8;
}

.pos-receipt-table th.pos-receipt-col-name,
.pos-receipt-table td.pos-receipt-col-name {
  text-align: left;
  overflow-wrap: anywhere;
}

.pos-receipt-table th.pos-receipt-col-qty,
.pos-receipt-table td.pos-receipt-col-qty,
.pos-receipt-table th.pos-receipt-col-unit,
.pos-receipt-table td.pos-receipt-col-unit,
.pos-receipt-table th.pos-receipt-col-total,
.pos-receipt-table td.pos-receipt-col-total {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pos-receipt-table td.pos-receipt-col-total {
  font-weight: 600;
}

.pos-receipt-item-name {
  font-weight: 600;
  color: #2c2118;
}

.pos-receipt-note {
  margin-top: 2px;
  font-size: 0.72rem;
  color: #7a6a5a;
}

.pos-receipt-row--gift .pos-receipt-item-name {
  font-weight: 500;
}

.pos-receipt-empty {
  text-align: center;
  color: #7a6a5a;
  padding: 12px 4px !important;
}

.pos-receipt-totals {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 2px solid color-mix(in oklab, #6b4e3d 25%, #d4c4a8);
}

.pos-receipt-total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  padding: 3px 0;
  color: #4a3528;
}

.pos-receipt-total-row--discount {
  color: #6b4e3d;
}

.pos-receipt-total-row--grand {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid #d4c4a8;
  font-size: 1.05rem;
  font-weight: 800;
  color: #2c2118;
}

.pos-receipt-footer {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid #d4c4a8;
  text-align: center;
  font-size: 0.8rem;
  color: #7a6a5a;
}

.pos-receipt-sign {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #d4c4a8;
}

.pos-receipt-sign-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7a6a5a;
  margin-bottom: 8px;
}

.pos-receipt-sign-box {
  min-height: 110px;
  border: 1.5px solid #c4b09a;
  border-radius: 4px;
  background: #fff;
}

.pos-receipt-sign-box--signed {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  box-sizing: border-box;
}

.pos-receipt-sign-img {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 98px;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

@media print {
  @page {
    size: 80mm auto;
    margin: 5mm;
  }

  html,
  body.pos-receipt-body {
    background: #fff !important;
    color: #2c2118 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .pos-receipt {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  .pos-receipt-logo {
    height: 120px;
    max-width: 100%;
  }

  .pos-receipt-sign-box {
    min-height: 120px;
  }

  .pos-receipt-sign-img {
    max-height: 104px;
  }
}

/* ── Presentatie-modus (prijzen verbergen) ── */

body.pos-body[data-pos-surface="tabs"].prices-hidden .product-price,
body.pos-body[data-pos-surface="tabs"].prices-hidden .product-price-was,
body.pos-body[data-pos-surface="tabs"].prices-hidden .guest-amount:not(.guest-amount--count),
body.pos-body[data-pos-surface="tabs"].prices-hidden .ticket-line-sum,
body.pos-body[data-pos-surface="tabs"].prices-hidden .ticket-line-discount,
body.pos-body[data-pos-surface="tabs"].prices-hidden .ticket-total-original,
body.pos-body[data-pos-surface="tabs"].prices-hidden .ticket-total-discounted,
body.pos-body[data-pos-surface="tabs"].prices-hidden .mix-modal-price,
body.pos-body[data-pos-surface="tabs"].prices-hidden .mix-fris-price,
body.pos-body[data-pos-surface="tabs"].prices-hidden .round-product-price,
body.pos-body[data-pos-surface="tabs"].prices-hidden .debt-widget-amount:not(.debt-widget-amount--count),
body.pos-body[data-pos-surface="tabs"].prices-hidden .pos-receipt-col-unit,
body.pos-body[data-pos-surface="tabs"].prices-hidden .pos-receipt-col-total,
body.pos-body[data-pos-surface="tabs"].prices-hidden .money,
body.pos-body[data-pos-surface="tabs"].prices-hidden .price {
  visibility: hidden !important;
}

.login-otp-field {
  display: grid;
  gap: 6px;
}

.login-otp-input {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.28em;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
}

.login-otp-hint {
  font-size: 12px;
}

.panel-login-brand-block.is-presentation-unlock {
  cursor: pointer;
  border-radius: 14px;
  outline: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.panel-login-brand-block.is-presentation-unlock:hover,
.panel-login-brand-block.is-presentation-unlock:focus-within {
  background: color-mix(in oklab, var(--surface) 55%, transparent);
  box-shadow: 0 0 0 2px color-mix(in oklab, #7d5a47 28%, transparent);
}

.panel-login-brand-unlock {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.panel-login-brand-unlock[href] {
  cursor: pointer;
}

.panel-login-brand-unlock[aria-disabled="true"] {
  cursor: default;
  pointer-events: none;
}

.panel-login-brand-block.is-presentation-unlock .panel-login-brand-unlock {
  pointer-events: auto;
}

.panel-login-unlock-backup {
  display: block;
  margin: 0.35rem auto 0.15rem;
  text-align: center;
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.55;
  cursor: pointer;
}

.panel-login-unlock-backup:hover,
.panel-login-unlock-backup:focus-visible {
  opacity: 0.9;
}

/* ── Paniekknop (Instellingen → Beveiliging) ── */

.settings-card--panic {
  padding: 0;
  overflow: hidden;
}

.settings-panic-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 72px;
  padding: 18px 20px;
  border: 0;
  background: color-mix(in oklab, #9a3412 10%, var(--card));
  color: #9a3412;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, transform 0.12s;
}

.settings-panic-btn:active {
  transform: scale(0.985);
  background: color-mix(in oklab, #9a3412 16%, var(--card));
}

.settings-panic-btn-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.settings-panic-btn-label {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.settings-panic-btn-hint {
  font-size: 0.85rem;
}

.settings-panic-status {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 18px 20px;
  background: color-mix(in oklab, #78716c 8%, var(--card));
}

.settings-panic-status-icon {
  font-size: 1.35rem;
  flex: none;
}

.settings-panic-status-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.settings-panic-status-copy strong {
  font-size: 1.05rem;
}

html[data-theme="dark"] .settings-panic-btn {
  background: color-mix(in oklab, #c2410c 18%, var(--card));
  color: #fdba74;
}

html[data-theme="dark"] .settings-panic-btn:active {
  background: color-mix(in oklab, #c2410c 26%, var(--card));
}

