/* FoxBooth web: backoffice, /a, login en gastpagina. Licht thema. */
:root {
  --accent: #f18407; --accent-dark: #c96c00; --bg: #f6f5f3; --card: #fff; --text: #1d1d1f; --muted: #6b6b70;
  --line: #e4e2de; --ok: #1f9d55; --bad: #d64545; --radius: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
a { color: var(--accent-dark); }
h1, h2, h3 { margin: 0 0 .6em; line-height: 1.2; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); font-size: .9em; }

button, .btn {
  font: inherit; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 8px;
  padding: .55em 1em; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .4em;
}
button:hover, .btn:hover { border-color: var(--accent); }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.primary:hover { background: var(--accent-dark); }
button.danger { color: var(--bad); }
button:disabled { opacity: .5; cursor: default; }
input, textarea, select {
  font: inherit; width: 100%; padding: .55em .7em; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
input[type=checkbox] { width: auto; accent-color: var(--accent); }
input[type=color] { padding: 2px; height: 2.4em; }
label { display: block; margin-bottom: .9em; font-size: .9em; color: var(--muted); }
label > input, label > textarea, label > select { margin-top: .3em; color: var(--text); }
label.check { display: flex; gap: .5em; align-items: center; color: var(--text); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 1em; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2em; margin-bottom: 1em; }
.badge { display: inline-block; font-size: .78em; padding: .15em .6em; border-radius: 99px; background: var(--line); color: var(--muted); }
.badge.ok { background: #dcf3e5; color: var(--ok); } .badge.bad { background: #fbe3e3; color: var(--bad); }
.toolbar { display: flex; gap: .5em; flex-wrap: wrap; align-items: center; margin-bottom: 1em; }
.toolbar .grow { flex: 1; }
.list { display: grid; gap: .6em; }
.item { display: flex; gap: 1em; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9em 1.1em; }
.item .grow { flex: 1; min-width: 0; }
a.item { color: inherit; text-decoration: none; } a.item:hover { border-color: var(--accent); }
.empty { text-align: center; color: var(--muted); padding: 2em; }
.code { font: 700 2rem ui-monospace, monospace; letter-spacing: .2em; color: var(--accent-dark); }

#toast { position: fixed; bottom: 1.5em; left: 50%; transform: translateX(-50%); background: #222; color: #fff; padding: .7em 1.2em; border-radius: 8px; z-index: 99; }

/* Backoffice-layout */
.layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--card); border-right: 1px solid var(--line); padding: 1.2em; display: flex; flex-direction: column; gap: .3em; }
.side img { width: 150px; margin-bottom: 1.2em; }
.side a { padding: .6em .8em; border-radius: 8px; color: var(--text); text-decoration: none; }
.side a.on, .side a:hover { background: var(--bg); color: var(--accent-dark); font-weight: 600; }
.side .bottom { margin-top: auto; font-size: .85em; color: var(--muted); }
main { padding: 2em; max-width: 1100px; width: 100%; }
.tabs { display: flex; gap: .3em; border-bottom: 1px solid var(--line); margin-bottom: 1.2em; overflow-x: auto; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: .7em 1em; white-space: nowrap; }
.tabs button.on { border-color: var(--accent); color: var(--accent-dark); font-weight: 600; }
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  .side img { width: 90px; margin: 0 1em 0 0; } .side .bottom { display: none; }
  main { padding: 1em; }
}

/* Strip-designer */
.designer { display: grid; grid-template-columns: auto 1fr; gap: 1.5em; align-items: start; }
.stage { position: relative; height: 70vh; aspect-ratio: 101.6 / 152.4; background: #ddd center / 100% 100% no-repeat; box-shadow: 0 2px 12px #0002; user-select: none; touch-action: none; }
.layer { position: absolute; outline: 1px dashed #0002; cursor: move; }
.layer img { width: 100%; height: 100%; display: block; pointer-events: none; }
.layer.on { outline: 2px solid #2b8a6e; z-index: 0; }
.layer .handle { position: absolute; right: -8px; bottom: -8px; width: 16px; height: 16px; background: #fff; border: 2px solid #2b8a6e; border-radius: 50%; cursor: nwse-resize; }
.preview-wrap { position: relative; display: inline-block; line-height: 0; }
.cutline { position: absolute; left: 50%; top: 0; bottom: 0; border-left: 2px dashed #e33; pointer-events: none; }
.slot { position: absolute; background: #f1840755; border: 2px solid var(--accent); cursor: move; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 1.1em; text-shadow: 0 1px 3px #000a; }
.slot.on { background: #f18407aa; }
.slot .handle { position: absolute; right: -8px; bottom: -8px; width: 16px; height: 16px; background: #fff; border: 2px solid var(--accent); border-radius: 50%; cursor: nwse-resize; }
.slot-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4em; align-items: end; }
.slot-form label { margin: 0; }
@media (max-width: 760px) { .designer { grid-template-columns: 1fr; } .stage { height: 60vh; margin: auto; } }

/* Startscherm-voorbeeld met QR */
.screen-preview { position: relative; width: 100%; max-width: 420px; aspect-ratio: 5 / 4; background: #111 center / cover; border-radius: 8px; overflow: hidden; touch-action: none; }
.screen-preview .qr { position: absolute; aspect-ratio: 1; background: #fff; border-radius: 6px; transform: translate(-50%, -50%); cursor: move;
  display: grid; place-items: center; font: 700 .8em monospace; color: #000; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .6em; }
.gallery a { display: block; background: #eee; border-radius: 6px; overflow: hidden; }
.gallery img { width: 100%; display: block; aspect-ratio: 1 / 3; object-fit: cover; border-radius: 4px; }
.designer .gallery img { aspect-ratio: 2 / 3; }

/* Losse pagina's (login, gast) */
.center { min-height: 100vh; display: grid; place-items: center; padding: 1em; }
.narrow { width: 100%; max-width: 380px; }
.narrow .logo { display: block; width: 200px; margin: 0 auto 1.5em; }

/* In-page dialog (no browser popups) */
dialog.modal { border: 0; border-radius: var(--radius); padding: 1.4em; width: min(420px, calc(100vw - 2em)); box-shadow: 0 10px 40px #0003; }
dialog.modal::backdrop { background: #0006; }
dialog.modal .toolbar { margin: 1em 0 0; }
button.danger-fill { background: var(--bad); border-color: var(--bad); color: #fff; font-weight: 600; }
#toast { top: 1.5em; bottom: auto; background: var(--bad); }

/* Booths */
.dot { width: 12px; height: 12px; border-radius: 50%; background: #bbb; flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 4px #1f9d5522; }
.booth-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 0 1em; align-items: start; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .45em 1.2em; margin-top: .4em; }
.grid-buttons { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .5em; }
.grid-buttons button { justify-content: center; padding: .75em; }
