/* Multi Bier Bestelportaal — design gebaseerd op CommentRadar UI systeem */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:ital,wght@0,500;0,600;0,700;1,500&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font-ui:      'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'IBM Plex Serif', Georgia, serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, monospace;

  /* Multi Bier oranje als accent (i.p.v. AD-rood) */
  --accent:       #F39200;
  --accent-dk:    #D97F00;
  --accent-soft:  rgba(243,146,0,0.10);
  --accent-line:  rgba(243,146,0,0.28);

  /* Zelfde surfaces als CommentRadar */
  --bg:           #F7F6F2;
  --surface:      #FFFDFC;
  --surface-2:    #F0EFE9;
  --surface-3:    #E5E2DA;
  --border:       #D8D5CB;
  --border-strong:#BDB8AB;
  --ink:          #18181B;
  --ink-2:        #3F3F46;
  --ink-3:        #71717A;
  --ink-4:        #A1A1AA;

  --good:      oklch(0.58 0.13 155);
  --good-soft: oklch(0.58 0.13 155 / 0.10);
  --signal:    oklch(0.62 0.18 28);
  --signal-soft: oklch(0.62 0.18 28 / 0.10);
  --warn:      oklch(0.70 0.15 75);
  --warn-soft: oklch(0.70 0.15 75 / 0.10);

  --shadow-sm: 0 1px 2px rgba(20,20,20,0.04), 0 0 0 1px rgba(20,20,20,0.04);
  --shadow-md: 0 2px 8px rgba(20,20,20,0.06), 0 0 0 1px rgba(20,20,20,0.04);
  --shadow-lg: 0 8px 28px rgba(20,20,20,0.08), 0 0 0 1px rgba(20,20,20,0.04);
  --shadow-popover: 0 0 0 1px rgba(29,28,29,0.13), 0 4px 12px rgba(0,0,0,0.12);

  --radius-sm: 4px;
  --radius:    6px;
  --radius-lg: 8px;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
}

html, body { height: 100%; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-dk); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }

/* ── App shell ─────────────────────────────────────────── */
.app {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

/* ── Rail (sidebar) ─────────────────────────────────────── */
.rail {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.rail__brand {
  padding: 16px 16px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.rail__logo {
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 11px;
  padding: 4px 7px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.rail__name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.15;
  color: var(--ink);
}
.rail__sub {
  font-size: 10.5px;
  color: var(--ink-4);
  margin-top: 1px;
  font-weight: 500;
}

.rail__section {
  padding: 16px 12px 5px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--ink-4);
  font-weight: 500;
}

.rail__nav {
  display: flex;
  flex-direction: column;
  padding: 4px 8px;
  gap: 1px;
}

.rail__item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
}
.rail__item:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.rail__item--active {
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 500;
}
.rail__icon { width: 15px; height: 15px; flex-shrink: 0; color: var(--ink-3); }
.rail__item--active .rail__icon { color: var(--accent-dk); }

.rail__user {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.rail__avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.rail__user-name { font-size: 13px; font-weight: 500; color: var(--ink); }
.rail__user-role { font-size: 11px; color: var(--ink-4); }

/* ── Main area ──────────────────────────────────────────── */
.main { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; overflow-x: hidden; }

.topbar {
  height: 50px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  padding: 0 var(--s-6);
  gap: var(--s-4);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.topbar__crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-3);
}
.topbar__crumbs strong { color: var(--ink); font-weight: 500; }
.topbar__sep { color: var(--ink-4); }
.topbar__spacer { flex: 1; }

.page {
  padding: 28px 32px 64px;
  max-width: 1100px;
}
.page--narrow { max-width: 720px; }

/* ── Page header ────────────────────────────────────────── */
.ph {
  margin-bottom: var(--s-6);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
}
.ph h1 {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.ph__sub {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 4px;
}
.ph__actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
  font-family: inherit;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
  -webkit-appearance: none;
}
.btn svg { flex-shrink: 0; }

.btn--primary {
  background: var(--ink);
  color: var(--bg);
}
.btn--primary:hover { background: var(--ink-2); color: var(--bg); text-decoration: none; }
.btn--primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn--accent {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent-dk);
  font-weight: 600;
}
.btn--accent:hover { background: oklch(from var(--accent) calc(l - 0.04) c h); color: var(--ink); text-decoration: none; }

.btn--ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }

.btn--quiet {
  background: transparent;
  color: var(--ink-3);
  border-color: transparent;
}
.btn--quiet:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }

.btn--danger {
  background: transparent;
  color: var(--signal);
  border-color: oklch(from var(--signal) l c h / 0.3);
}
.btn--danger:hover { background: var(--signal-soft); }

.btn--lg { padding: 10px 18px; font-size: 14px; }
.btn--sm { padding: 5px 9px; font-size: 12px; }
.btn--block { width: 100%; justify-content: center; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: var(--s-5); }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--s-6);
}
.card__head {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.card__sub { font-size: 12px; color: var(--ink-3); font-family: var(--font-mono); }
.card__body { padding: var(--s-5); }

/* ── Two-column layout ──────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: var(--s-6);
  align-items: start;
}

/* ── Detail grid (1fr + fixed sidebar) ─────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--s-6);
  align-items: start;
}
.detail-sticky {
  position: sticky;
  top: calc(50px + var(--s-6));
}

/* ── Card-table (table flush inside a card) ─────────────── */
.card-table { overflow: hidden; }

/* ── PDF preview table ───────────────────────────────────── */
.pdf-preview-row td { vertical-align: middle; padding: 8px 10px; }
.pdf-preview-row input[type="text"],
.pdf-preview-row input[type="number"] {
  padding: 5px 8px;
  font-size: 12.5px;
}
.pdf-preview-row input[type="number"] { width: 90px; }
.pdf-preview-row .field { margin: 0; }

/* ── Forms ──────────────────────────────────────────────── */
.field { margin-bottom: var(--s-4); }
.field label, label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 5px;
}
.label__hint { color: var(--ink-4); font-weight: 400; margin-left: 6px; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  padding: 8px 11px;
  outline: none;
  transition: border-color 0.1s, box-shadow 0.1s;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: var(--ink-4); }
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
}

/* ── Alerts ─────────────────────────────────────────────── */
.alert {
  padding: 9px 13px;
  border-radius: var(--radius);
  border: 1px solid;
  margin-bottom: var(--s-4);
  font-size: 13px;
  line-height: 1.5;
}
.alert--error   { background: var(--signal-soft); border-color: oklch(from var(--signal) l c h / 0.3); color: var(--signal); }
.alert--success { background: var(--good-soft);   border-color: oklch(from var(--good) l c h / 0.3);   color: var(--good); }
.alert--info    { background: var(--surface-2);   border-color: var(--border); color: var(--ink-3); }
.alert--warning { background: var(--warn-soft);   border-color: oklch(from var(--warn) l c h / 0.3);   color: var(--warn); }

/* ── Tables ─────────────────────────────────────────────── */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--s-5);
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--ink-3);
  padding: 9px 16px;
  background: var(--surface-2);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
td { padding: 11px 16px; vertical-align: middle; color: var(--ink-2); }
.td-actions { display: flex; gap: 6px; align-items: center; }

/* ── Status badges ──────────────────────────────────────── */
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 100px;
}
.status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status--sent    { background: var(--good-soft);   color: var(--good); }
.status--failed  { background: var(--signal-soft); color: var(--signal); }
.status--pending { background: var(--surface-3);   color: var(--ink-3); }

/* ── ORDER FORM ─────────────────────────────────────────── */
.klant-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: var(--s-5);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 14px;
}
.klant-header__avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dk);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.klant-header__name { font-size: 15px; font-weight: 600; color: var(--ink); }
.klant-header__meta { font-size: 12px; color: var(--ink-3); font-family: var(--font-mono); margin-top: 2px; }

.product-list { list-style: none; }
.product-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.product-row:last-child { border-bottom: none; }
.product-info { flex: 1; min-width: 140px; }
.product-naam  { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.product-prijs { font-size: 12px; color: var(--ink-4); font-family: var(--font-mono); margin-top: 1px; }

.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}
.qty-btn {
  width: 30px; height: 32px;
  border: none;
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, color 0.1s;
  flex-shrink: 0;
  padding: 0;
}
.qty-btn:hover { background: var(--accent-soft); color: var(--accent-dk); }
.qty-input {
  width: 42px !important;
  text-align: center;
  border: none !important;
  border-left: 1px solid var(--border) !important;
  border-right: 1px solid var(--border) !important;
  border-radius: 0 !important;
  padding: 0 4px !important;
  height: 32px;
  box-shadow: none !important;
  font-size: 13px;
  background: var(--surface);
}
.qty-input:focus { box-shadow: none !important; border-color: var(--border) !important; }
.sub-total {
  min-width: 64px;
  text-align: right;
  font-size: 13px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}

.order-totaal-bar {
  position: sticky;
  bottom: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 11px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
  margin: 0 -32px -64px;
  box-shadow: 0 -1px 0 rgba(0,0,0,0.1);
}
.totaal-label { font-size: 12px; color: rgba(247,246,242,0.55); }
.totaal-amount {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ── SCAN ────────────────────────────────────────────────── */
.scan-wrap { max-width: 480px; }
.manual-fallback {
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  border-top: 1px solid var(--border);
}
.scanner-viewport {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1;
  background: #0F0E0D;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: var(--s-3);
}
#scanner-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.scanner-frame {
  width: 56%;
  aspect-ratio: 1 / 1;
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.42);
  position: relative;
}
.scanner-frame::before, .scanner-frame::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border-color: rgba(243,146,0,0.9);
  border-style: solid;
}
.scanner-frame::before { top: -2px; left: -2px; border-width: 3px 0 0 3px; border-radius: 2px 0 0 0; }
.scanner-frame::after  { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; border-radius: 0 0 2px 0; }
.scanner-status {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.6);
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  padding: 7px 12px;
  text-align: center;
}
.scanner-status--ok    { background: oklch(from var(--good) l c h / 0.82); color: #D1FAE5; }
.scanner-status--warn  { background: oklch(from var(--warn) l c h / 0.82); color: #FEF3C7; }
.scanner-status--error { background: oklch(from var(--signal) l c h / 0.82); color: #FEE2E2; }

/* ── QR ─────────────────────────────────────────────────── */
.qr-wrap { display: flex; flex-direction: column; gap: var(--s-4); }
.qr-wrap img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  max-width: 200px;
}
.visitor-badge {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink-2);
}
.visitor-badge strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  display: block;
  margin-bottom: 2px;
}

/* ── CONFIRM PAGE ────────────────────────────────────────── */
.confirm-totaal {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-align: right;
  padding: 12px 0 0;
  border-top: 1px solid var(--border-strong);
  margin-top: 4px;
}

/* ── PRODUCT LIST ─────────────────────────────────────────  */
.product-list-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: var(--s-3);
}
.sortable-item { border-bottom: 1px solid var(--border); }
.sortable-item:last-child { border-bottom: none; }

.view-mode-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  transition: background 0.1s;
}
.view-mode-row:hover { background: var(--surface-2); }
.drag-handle { color: var(--ink-4); cursor: grab; font-size: 14px; padding: 0 2px; flex-shrink: 0; }
.drag-handle:active { cursor: grabbing; }
.product-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-dk);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 3px;
  padding: 1px 6px;
  font-family: var(--font-mono);
  white-space: nowrap;
}
.edit-mode-row {
  padding: 12px 14px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

/* ── LOGIN — verkoper ────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: var(--s-10) var(--s-6);
  background: var(--bg);
}
.login-box { width: 100%; max-width: 340px; }
.login-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: var(--s-8);
}
.login-logo__mark {
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  font-size: 11px;
  padding: 4px 7px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}
.login-logo__name { font-weight: 600; font-size: 15px; color: var(--ink); }
.login-title { font-size: 22px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.login-sub   { font-size: 13px; color: var(--ink-3); margin-bottom: var(--s-6); }
.login-field { margin-bottom: var(--s-4); }
.login-field label { font-size: 12px; font-weight: 500; color: var(--ink-2); display: block; margin-bottom: 5px; }
.login-box .btn--primary { width: 100%; justify-content: center; margin-top: var(--s-2); padding: 9px; font-size: 14px; }
.admin-corner {
  position: fixed;
  top: var(--s-4);
  right: var(--s-4);
}
.admin-corner-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  text-decoration: none;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.admin-corner-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--border-strong); text-decoration: none; }

/* ── LOGIN — admin (donkere variant) ────────────────────── */
.admin-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: var(--s-10) var(--s-6);
  background: var(--ink);
}
.admin-login-box { width: 100%; max-width: 340px; }
.admin-login-logo { display: flex; align-items: center; gap: 9px; margin-bottom: var(--s-8); }
.admin-login-logo__mark {
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  font-size: 11px;
  padding: 4px 7px;
  border-radius: var(--radius-sm);
}
.admin-login-logo__name { font-weight: 600; font-size: 15px; color: rgba(247,246,242,0.9); }
.admin-login-title { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.admin-login-sub   { font-size: 13px; color: rgba(247,246,242,0.4); margin-bottom: var(--s-6); }
.admin-login-box label { color: rgba(247,246,242,0.55); }
.admin-login-box input {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.14);
  color: #fff;
}
.admin-login-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(243,146,0,0.22);
}
.admin-login-box input::placeholder { color: rgba(255,255,255,0.2); }
.btn--admin {
  width: 100%;
  justify-content: center;
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent-dk);
  font-weight: 600;
  font-size: 14px;
  padding: 9px;
  margin-top: var(--s-2);
}
.btn--admin:hover { background: oklch(from var(--accent) calc(l + 0.04) c h); color: var(--ink); text-decoration: none; }
.seller-back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: var(--s-6);
  font-size: 12.5px;
  color: rgba(247,246,242,0.35);
  text-decoration: none;
  transition: color 0.1s;
}
.seller-back-link:hover { color: rgba(247,246,242,0.65); text-decoration: none; }
.seller-back-link u { text-underline-offset: 2px; }

/* ── Toast ──────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}
.toast {
  background: var(--ink);
  color: var(--bg);
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.18s ease;
  white-space: nowrap;
}
.toast--error { background: var(--signal); }
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { opacity:1 } 50% { opacity:0.4 } }

/* ── Misc ────────────────────────────────────────────────── */
.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-3); font-size: 12px; }
.hidden { display: none !important; }
.empty {
  text-align: left;
  padding: var(--s-8) 0;
  color: var(--ink-4);
  font-size: 13px;
}
.divider { height: 1px; background: var(--border); margin: var(--s-6) 0; }

/* ── Mobile (≤768px) ────────────────────────────────────── */
@media (max-width: 768px) {
  .app { grid-template-columns: 1fr; }

  /* Bottom navigation bar */
  .rail {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: auto;
    flex-direction: row;
    border-right: none;
    border-top: 1px solid var(--border);
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -1px 0 var(--border), 0 -4px 16px rgba(0,0,0,0.06);
    background: var(--surface);
  }
  .rail__brand, .rail__section, .rail__user { display: none; }
  .rail__nav {
    flex-direction: row;
    padding: 0; gap: 0; flex: 1;
  }
  .rail__item {
    flex-direction: column;
    gap: 2px;
    padding: 7px 4px 5px;
    font-size: 10px;
    flex: 1;
    justify-content: center;
    align-items: center;
    border-radius: 0;
    min-height: 50px;
  }
  .rail__item--active { background: transparent; color: var(--accent-dk); }
  .rail__item--active .rail__icon { color: var(--accent-dk); }
  .rail__icon { width: 18px; height: 18px; }

  /* Logout item in bottom nav: smaller & muted — not a primary action */
  .rail__item--logout {
    max-width: 50px;
    color: var(--ink-4);
    font-size: 0;        /* hide text label */
  }
  .rail__item--logout .rail__icon { color: var(--ink-4); }

  /* Main content */
  .main { padding-bottom: 70px; min-width: 0; }
  .topbar { height: 44px; padding: 0 var(--s-4); }
  .page { padding: 16px 14px 28px; max-width: 100%; }

  /* Typography */
  .ph { flex-direction: column; align-items: flex-start; gap: 12px; }
  .ph h1 { font-size: 20px; }

  /* Layout grids → single column */
  .two-col { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .input-row { grid-template-columns: 1fr; }

  /* Detail grid: show summary ABOVE the per-seller breakdown on mobile */
  .detail-grid__summary { order: -1; }
  .detail-sticky { position: static; }

  /* Tables: horizontal scroll instead of clipping */
  .table-wrap { overflow-x: auto; }
  .card-table { overflow-x: auto; }

  /* Cards */
  .card__body { padding: var(--s-4); }

  /* Klant header: wrap when screen is narrow */
  .klant-header { flex-wrap: wrap; gap: 10px; }
  .klant-header .btn--sm { margin-left: 0 !important; width: 100%; justify-content: center; }

  /* Order totaal bar: sits ABOVE the fixed bottom nav, not behind it */
  .order-totaal-bar {
    bottom: calc(50px + env(safe-area-inset-bottom, 0px));
    margin: 0 -14px;
  }

  /* Scanner fullwidth on mobile */
  .scan-wrap { max-width: 100%; }
  .scanner-viewport { max-width: 100%; }
}
