/* Colours and font from the 6kamp Dranklijst. Dark mode follows the phone; the QR area always stays white so it scans. */
:root {
  --bg: #f3f5f4;
  --surface: #ffffff;
  --line: #dde3e0;
  --fg: #111312;
  --muted: #5b6561;
  --brand: #00c18c;          /* 6kamp groen, uit het logo */
  --brand-fg: #04140e;       /* tekst op groen: zwart leest beter dan wit */
  --brand-ink: #007a58;      /* groen als tekstkleur op een lichte achtergrond */
  --warn: #b8410f;
  --warn-soft: #fdebe2;
  --font: "Archivo", "Segoe UI", system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d0c; --surface: #151918; --line: #29302d; --fg: #eef2f0; --muted: #9aa5a0;
    --brand-ink: #33dcaa; --warn: #ff9a6b; --warn-soft: #3a1d10;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 16px; line-height: 1.45; padding-bottom: env(safe-area-inset-bottom, 0px); }
h1, h2 { margin: 0; text-wrap: balance; }

.masthead { background: var(--surface); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.masthead .inner { display: flex; align-items: center; gap: 10px; max-width: 640px; margin: 0 auto; padding: 12px 16px; }
.masthead .brand { font-weight: 800; font-size: 1.1rem; flex: 1; }
.page { max-width: 640px; margin: 0 auto; padding: 16px; }
.status { color: var(--muted); text-align: center; margin: 0; }
.status:empty { display: none; }

.btn { font: inherit; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; font-weight: 600; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-fg); font-weight: 700; }
.btn.big { padding: 13px 16px; font-size: 1rem; }
.btn.small { padding: 6px 10px; font-size: 0.88rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Verkooppagina: two big thumb-sized tiles per row. */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { font: inherit; border: 0; border-radius: 16px; background: var(--brand); color: var(--brand-fg); padding: 22px 10px; min-height: 120px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; overflow-wrap: anywhere; }
.tile:active { transform: scale(0.97); }
.tile .label { font-size: 1.05rem; font-weight: 600; }
.tile .price { font-size: 2rem; font-weight: 800; font-stretch: 80%; }
.tile .price.open { font-size: 1.5rem; }

/* Afdrukken: QR codes on white, two per row, never split over two pages. */
.print-page { background: #ffffff; color: #111312; color-scheme: light; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.print-page .page { max-width: 760px; }
.print-head { display: flex; align-items: center; gap: 16px; padding-bottom: 14px; border-bottom: 3px solid var(--brand); }
.print-head h1 { font-size: 1.6rem; font-weight: 800; }
.print-head p { margin: 2px 0 0; color: #5b6561; }
.print-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.print-card { border: 2px solid var(--brand); border-radius: 14px; overflow: hidden; text-align: center; break-inside: avoid; display: flex; flex-direction: column; }
.print-band { background: var(--brand); color: var(--brand-fg); padding: 10px 12px; display: flex; flex-direction: column; }
.print-label { font-weight: 600; font-size: 1.05rem; }
.print-price { font-weight: 800; font-size: 2rem; font-stretch: 80%; line-height: 1.1; }
.print-card .qr-code { width: 78%; min-width: 0; margin: 14px auto 6px; }
.print-hint { margin: 0 12px; font-weight: 600; }
.print-foot { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 12px; font-size: 0.8rem; font-weight: 700; color: #5b6561; }
@media (max-width: 480px) { .print-grid { grid-template-columns: 1fr; } }
@media print {
  @page { size: A4; margin: 12mm; }
  .no-print { display: none !important; }
  .print-page .page { max-width: none; padding: 0; }
  .print-grid { grid-template-columns: 1fr 1fr; }
}

/* iPhone install steps */
.help-sheet { color: var(--fg); max-width: min(400px, calc(100% - 32px)); }
.help-sheet ol { padding-left: 20px; }
.help-sheet::backdrop { background: rgb(0 0 0 / 0.5); }

/* QR screen: full screen on a phone, always white. */
.qr-sheet { border: 0; padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px)); width: 100%; max-width: 480px; max-height: 100%; height: 100%;
  background: #ffffff; color: #111312; text-align: center; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.qr-sheet[open] { display: flex; }
.qr-sheet::backdrop { background: #ffffff; }
.qr-title { font-size: 1.9rem; font-weight: 800; }
.qr-code { width: min(80vw, 340px); min-width: 260px; aspect-ratio: 1; background: #ffffff; }
.qr-code svg { width: 100%; height: 100%; display: block; }
.qr-hint { color: #5b6561; margin: 0; max-width: 300px; }
.qr-sheet .btn { background: #ffffff; color: #111312; border-color: #dde3e0; width: 100%; max-width: 300px; }

/* Beheer */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.card h1 { font-size: 1.3rem; margin-bottom: 8px; }
label { display: block; font-weight: 600; font-size: 0.9rem; margin-top: 8px; }
input { font: inherit; display: block; width: 100%; margin-top: 4px; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); }
input.invalid { border-color: var(--warn); }
.field-note { font-size: 0.85rem; color: var(--warn); margin: 4px 0 0; }
.field-note:empty { display: none; }
.row-actions { display: flex; gap: 6px; margin-top: 10px; }
.row-actions .spacer { flex: 1; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.sub { color: var(--muted); font-size: 0.9rem; margin: 0 0 8px; }
.error { color: var(--warn); margin: 8px 0 0; }
.error:empty { display: none; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-weight: 600; }
