/* Staff-app: rustig, donker, grote raakvlakken. */
body { overscroll-behavior-y: none; }

.scherm {
  max-width: 560px; margin: 0 auto;
  padding: calc(16px + var(--veilig-boven)) calc(16px + var(--veilig-rechts)) calc(28px + var(--veilig-onder)) calc(16px + var(--veilig-links));
  display: flex; flex-direction: column; gap: 18px;
  animation: in 0.22s ease-out;
}
.scherm-midden { min-height: 100vh; min-height: 100dvh; justify-content: center; align-items: center; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- login ---------- */
.login { width: 100%; max-width: 380px; display: grid; gap: 16px; text-align: center; justify-items: center; }
.login-logo { width: 84px; height: 84px; border-radius: 22px; box-shadow: var(--schaduw); margin-bottom: 6px; }
.login h1 { font-size: 28px; }
.login-tekst { color: var(--tekst-2); }
.login-hint { margin-top: 4px; }
.knop-groot { min-height: 58px; font-size: 17px; border-radius: 16px; }

/* ---------- kop ---------- */
.kop { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }
.kop h1 { font-size: 30px; font-weight: 750; overflow-wrap: anywhere; }
.kop-klein { font-size: 13px; color: var(--tekst-3); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.kop-terug { justify-content: flex-start; }
.kop-titel { min-width: 0; }
.d-status-kop { font-size: 22px; }

/* ---------- tellers ---------- */
.tellers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.teller {
  background: var(--vlak); border: 1px solid var(--rand-zacht); border-radius: 14px;
  padding: 10px 6px; display: grid; justify-items: center; gap: 2px; min-width: 0;
}
.teller-getal { font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; }
.teller-naam { font-size: 12px; color: var(--tekst-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ---------- grote knop ---------- */
.knop-hero {
  min-height: 84px; border-radius: 22px; font-size: 20px; font-weight: 750; gap: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.plus {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(29, 19, 0, 0.14); font-size: 26px; line-height: 1; font-weight: 600;
}
.owner-link {
  display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px;
  border-radius: 14px; background: var(--vlak); border: 1px solid var(--rand-zacht); color: var(--tekst);
  text-decoration: none; font-weight: 600;
}
.owner-link span { color: var(--tekst-3); font-size: 22px; }

/* ---------- lijst ---------- */
.lijst-blok { display: grid; gap: 10px; }
.sectie-titel { font-size: 13px; font-weight: 700; color: var(--tekst-3); letter-spacing: 0.05em; text-transform: uppercase; }
.tickets { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticket {
  width: 100%; text-align: left; display: grid; gap: 8px; padding: 14px 16px; min-height: 64px;
  background: var(--vlak); border: 1px solid var(--rand-zacht); border-radius: var(--radius); cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ticket:hover { background: var(--vlak-2); border-color: var(--rand); }
.ticket:active { transform: scale(0.99); }
.ticket-boven { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ticket-tekst {
  color: var(--tekst); font-size: 15.5px; overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere;
}
.ticket-onder { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--tekst-3); }
.ticket-naam { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leeg-staat { text-align: center; padding: 30px 16px; border: 1px dashed var(--rand); border-radius: var(--radius); display: grid; gap: 6px; }
.leeg-titel { font-weight: 650; }

/* ---------- detail ---------- */
.detail { display: grid; gap: 18px; }
.d-blok { display: grid; gap: 10px; }
.kaart.d-blok { padding: 16px; gap: 16px; }
.d-tekst { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16.5px; }
.d-feiten { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.d-feiten div { min-width: 0; }
.d-feiten dt { font-size: 12.5px; color: var(--tekst-3); font-weight: 600; }
.d-feiten dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.bijlagen { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.bijlagen li { border-radius: 14px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--rand-zacht); }
.bijlagen a { display: block; }
.bijlagen img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.bijlagen video { width: 100%; aspect-ratio: 4 / 3; background: #000; }
.bijlagen-leeg { color: var(--tekst-3); font-size: 14.5px; }

.tijdlijn { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 0; }
.tijdlijn li { position: relative; padding: 0 0 16px 24px; }
.tijdlijn li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--rand); }
.tijdlijn li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: var(--rand-zacht); }
.tijdlijn li:last-child::after { display: none; }
.tijdlijn li:last-child { padding-bottom: 0; }
.tijdlijn li.tl-status::before { background: var(--accent); }
.tijdlijn li.tl-opmerking::before { background: var(--blauw); }
.tl-wat { font-weight: 600; font-size: 15px; }
.tl-tijd { font-size: 12.5px; color: var(--tekst-3); }
.tl-tekst { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--tekst-2); font-size: 14.5px; }

.d-acties { display: grid; gap: 10px; }
.d-formulier { padding: 16px; display: grid; gap: 12px; }
.rij { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.bestand-knop { position: relative; cursor: pointer; }
.bestand-knop:focus-within { outline: 3px solid var(--accent-sterk); outline-offset: 2px; }

/* ---------- vel (volledig scherm) ---------- */
.vel {
  position: fixed; inset: 0; z-index: 20; background: var(--bg);
  overflow-y: auto; -webkit-overflow-scrolling: touch; animation: omhoog 0.25s ease-out;
}
@keyframes omhoog { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.vel-binnen {
  max-width: 560px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column;
  padding: var(--veilig-boven) var(--veilig-rechts) 0 var(--veilig-links);
}
.vel-kop {
  position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center;
  gap: 8px; padding: 10px 8px; background: rgba(11, 16, 32, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rand-zacht);
}
.vel-kop h1 { font-size: 17px; text-align: center; }
.vel-kop > :first-child { justify-self: start; }
.vel-kop > :last-child { justify-self: end; }
.vel-kop-ruimte { width: 1px; }
.vel-inhoud { flex: 1; display: grid; align-content: start; gap: 20px; padding: 20px 16px; }
.vel-voet {
  position: sticky; bottom: 0; display: grid; gap: 10px;
  padding: 12px 16px calc(12px + var(--veilig-onder)); background: rgba(11, 16, 32, 0.94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--rand-zacht);
}
.optioneel { color: var(--tekst-3); font-weight: 500; }
.voortgang-tekst { text-align: center; }

/* ---------- klaar ---------- */
.klaar { width: 100%; max-width: 400px; display: grid; gap: 14px; justify-items: center; text-align: center; }
.klaar-vink { width: 96px; height: 96px; color: var(--groen); animation: plop 0.4s cubic-bezier(0.2, 1.4, 0.4, 1); }
.klaar-vink svg { width: 100%; height: 100%; }
@keyframes plop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.klaar h1 { font-size: 26px; }
.klaar-tekst { color: var(--tekst-2); font-size: 17px; }
.klaar-knoppen { width: 100%; display: grid; gap: 10px; margin-top: 10px; }
#klaar-fouten { width: 100%; text-align: left; }

/* ---------- instellingen ---------- */
.inst-blok { padding: 16px; display: grid; gap: 12px; }
.inst-titel { font-size: 17px; }
.apparaten { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.apparaat { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--rand-zacht); }
.apparaat:first-child { border-top: 0; padding-top: 0; }
.apparaat-naam { font-weight: 600; }
.apparaat-info { font-size: 13px; color: var(--tekst-3); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 50;
  bottom: calc(20px + var(--veilig-onder)); max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 14px; background: var(--vlak-3); border: 1px solid var(--rand);
  box-shadow: var(--schaduw); font-weight: 600; font-size: 15px; text-align: center;
}
.toast[data-soort="fout"] { background: #3a1d24; border-color: rgba(240, 106, 106, 0.4); }

@media (max-width: 380px) {
  .kop h1 { font-size: 26px; }
  .teller-getal { font-size: 19px; }
  .teller-naam { font-size: 11px; }
  .knop-hero { min-height: 76px; font-size: 18px; }
}

/* tellers zijn filterknoppen */
.teller { font: inherit; color: inherit; cursor: pointer; text-align: center; -webkit-tap-highlight-color: transparent; }
.teller[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-zacht, rgba(232, 168, 72, 0.14)); }
.teller[aria-pressed="true"] .teller-naam { color: var(--tekst); }
.lijst-kop { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.lijst-alles { font: inherit; font-size: 14px; font-weight: 650; color: var(--accent); background: none; border: 0; padding: 8px 0; cursor: pointer; min-height: 44px; }
.lijst-uitleg { margin: 0 0 10px; }
