:root {
  --blue: #0055a5;
  --blue-dark: #003866;
  --red: #e51b25;
  --ink: #122033;
  --muted: #5b6b7c;
  --paper: #f6f8fb;
  --card: #ffffff;
  --line: #d5deea;
  --radius: 16px;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.45;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); }

.site-header, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
}
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand img { height: 42px; width: auto; }
.header-logout button {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
}
.wrap {
  width: min(720px, calc(100% - 2rem));
  margin: 1.25rem auto 2rem;
}
.site-footer {
  flex-direction: column;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.fine { color: var(--muted); font-size: 0.92rem; }

h1 { font-size: 1.7rem; margin: 0 0 0.6rem; color: var(--blue-dark); }
h2 { font-size: 1.15rem; margin: 0 0 0.4rem; }

.hero { text-align: center; }
.hero-logo { width: min(280px, 70vw); margin: 0.4rem auto 1rem; display: block; }

.choices { display: grid; gap: 0.9rem; margin-top: 1.2rem; }
.card, .legal, .queue-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  text-decoration: none;
  color: inherit;
  display: block;
}
.card.primary { border-color: var(--blue); box-shadow: 0 6px 20px rgb(0 85 165 / 0.08); }
.card:hover { border-color: var(--blue); }

.stack { display: grid; gap: 0.7rem; margin-top: 1rem; }
label { font-weight: 600; }
input[type="email"], input[type="password"], input[type="text"] {
  width: 100%;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
}
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn.secondary { background: #fff; color: var(--blue); border: 2px solid var(--blue); }
.btn.danger { background: var(--red); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.file-btn input { display: none; }
.or { text-align: center; color: var(--muted); }
.camera-actions { display: grid; gap: 0.7rem; }

.banner {
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
}
.banner.error { background: #fde8ea; color: #8a1218; }
.banner.ok { background: #e7f3ec; color: #1c5a36; }
.banner.dev { background: #fff6d8; word-break: break-all; }

.legal { white-space: normal; }
.check {
  display: grid;
  grid-template-columns: 1.3rem 1fr;
  gap: 0.7rem;
  font-weight: 500;
  align-items: start;
}
.check input { width: 1.15rem; height: 1.15rem; margin-top: 0.15rem; }

.preview {
  width: 100%;
  border-radius: 16px;
  max-height: 55vh;
  object-fit: contain;
  background: #000;
}
.hidden { display: none !important; }

.queue { list-style: none; padding: 0; display: grid; gap: 0.8rem; }
.queue-item { display: grid; grid-template-columns: 120px 1fr; gap: 0.8rem; align-items: center; }
.queue-item img { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.thumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; }
.thumbs img { width: 88px; height: 66px; object-fit: cover; border-radius: 8px; }

.qr-print { display: grid; gap: 1.5rem; }
.qr-print figure { margin: 0; text-align: center; }
.qr-print img { width: min(280px, 70vw); }
.qr-print code { display: block; font-size: 0.8rem; word-break: break-all; }

@media (min-width: 700px) {
  .qr-print { grid-template-columns: 1fr 1fr; }
  .camera-actions { grid-template-columns: 1fr 1fr; }
}

body.kiosk {
  background: #001428;
  color: #fff;
  min-height: 100vh;
  overflow: hidden;
}
.stage {
  position: relative;
  height: calc(100vh - 72px);
  background: #000;
}
.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 700ms ease;
}
.slide.on { opacity: 1; }
.empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 2rem;
  gap: 1rem;
}
.empty img { width: min(360px, 50vw); margin: 0 auto; }
.kiosk-bar {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.2rem;
  background: #001c38;
}
.kiosk-bar img { height: 40px; width: auto; }
