  :root { --nav: 60px; }

  html, body { height:100%; margin:0; background:#f8f9fa; display:flex; flex-direction:column; }
  main { flex:1 0 auto; padding:1rem; text-align:left; }



  /**
  HOMEGEDEELTE
  ***/

  .home-hero-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: rgba(13, 110, 253, 0.08);
  color: #0d6efd;
  font-size: 1.8rem;
}

.home-card {
  border-radius: 0.8rem;
}

.home-card .card-body {
  padding: 1rem 1.1rem;
}

@media (min-width: 768px) {
  .home-card .card-body {
    padding: 1.25rem 1.5rem;
  }
}

  /* Bottom tabs */
  .bottom-nav {
    position:fixed; left:0; right:0; bottom:0; height:60px;
    background:#fff; border-top:1px solid #dee2e6;
    display:flex; justify-content:space-around; align-items:center;
    box-shadow:0 -1px 5px rgba(0,0,0,.1); z-index:1001; transition:opacity .25s;
  }
  .bottom-nav.hidden { opacity:0; pointer-events:none; }
  .bottom-nav button { background:none; border:0; font-size:1.1rem; color:#6c757d; }
  .bottom-nav button.active { color:#0d6efd; }
/* Basis looks (optioneel) */
.splash-screen {
  min-height: 100vh;           /* full screen */
  background: radial-gradient(circle at top, #f8f9fa, #e9ecef);
  text-align: center;
}

.splash-text {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* 1) Icon zacht laten bouncen */
.splash-icon {
  animation: splash-bounce 1.2s ease-in-out infinite;
}

@keyframes splash-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-6px);
  }
  60% {
    transform: translateY(0);
  }
}

/* 2) Loading… met "lopende" puntjes */
.splash-dots {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  width: 0;                     /* start met 0 puntjes zichtbaar */
  animation: splash-dots 1s steps(3, end) infinite;
}

/* We tonen "..." maar knippen er in met width */
.splash-dots::before {
  content: '...';
}

/* Breedte loopt in 3 stappen → ., .., ... */
@keyframes splash-dots {
  0% {
    width: 0;
  }
  100% {
    width: 1.2em;               /* genoeg voor drie puntjes */
  }
}
  /* Splash / PIN overlays */
  #splash, #pinScreen {
    position:fixed; inset:0; background:#0d6efd; color:#fff;
    z-index:2000; transition:opacity .25s; display:flex;
    align-items:center; justify-content:center; flex-direction:column;
  }
  #splash.hidden, #pinScreen.hidden { opacity:0; pointer-events:none; }
  .pin-dots { font-size:2rem; letter-spacing:.5rem; margin-bottom:1rem; }
  .pin-grid { display:grid; grid-template-columns:repeat(3,72px); gap:12px; justify-content:center; }
  .pin-key { width:60px; height:60px; border-radius:50%; font-size:1.4rem; }

  /* Scanner overlay */
  #scanOverlay { position:fixed; inset:0; background:#000; display:none; z-index:1000; }
  #scannerWrap {
    position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
    padding:6px; padding-bottom:calc(var(--nav) + 6px); box-sizing:border-box;
  }
  #scanner {
    position:relative; border:10px solid transparent; transition:border-color 120ms;
    max-width:92vw; max-height:calc(100vh - var(--nav) - 12px);
    aspect-ratio:16/9; height:calc(100vh - var(--nav) - 12px); width:auto; background:#000; box-sizing:border-box;
  }
  #scanner video, #scanner canvas { width:100% !important; height:100% !important; object-fit:contain !important; display:block; }
  #scanner canvas.drawingBuffer { position:absolute; left:0; top:0; pointer-events:none; }

  /* List items + flash */
  .list-item{ padding:.5rem .75rem; background:#fff; border:1px solid #eee; border-radius:.5rem; margin-bottom:.5rem; position:relative; transition:background-color .6s, transform .2s; touch-action:pan-y; }
  .flash-add{ background:#eafaf0; animation:fadeOutBg 3s forwards; }
  @keyframes fadeOutBg{ 0%{background:#eafaf0} 100%{background:#fff} }

  /* Undo bar */
  #undoBar{
    position:fixed; left:12px; right:12px; bottom:calc(var(--nav) + 12px);
    background:#212529; color:#fff; border-radius:.75rem; padding:.6rem .8rem; display:none;
    align-items:center; justify-content:space-between; z-index:1100; box-shadow:0 6px 18px rgba(0,0,0,.25);
  }
  #undoBar.show{ display:flex; }
  #undoBar .undo-btn{ border:0; background:transparent; color:#0d6efd; font-weight:600; }

#authStatusContainer {
  padding:12px 16px;
  background:#f8f9fa;
  border-bottom:1px solid #eee;
  /* no display here */
}
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-overlay.hidden {
  display: none;
}

.loading-overlay__center {
  background: #fff;
  padding: 2rem 2.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  text-align: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem auto;
  border-radius: 50%;
  border: 4px solid #ddd;
  border-top-color: #007bff; /* vervang door SBS-kleur */
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
.first-run {
  max-width: 480px;
  margin: 4rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  text-align: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.first-run h1 {
  margin-bottom: 1rem;
  font-size: 1.6rem;
}

.first-run p {
  margin-bottom: 1.5rem;
}

.btn-primary {
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: none;
  background: #007bff; /* vervang door SBS-kleur */
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}
.load-students-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050; /* boven gewone content */
}

.load-students-modal {
  max-width: 420px;
  width: 90%;
}
