/* ─── PLUS Overblijvers – Stijlblad ─── */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Open+Sans:wght@400;500;600&display=swap');

:root {
  --plus-groen:     #5AAB1B;
  --plus-groen-dk:  #3E7E0E;
  --plus-groen-lt:  #EEF7E6;
  --plus-groen-bar: #4A9614;
  --plus-rood:      #E3000B;
  --plus-rood-lt:   #FFF0F0;
  --plus-geel:      #FFD100;
  --plus-blauw:     #003DA5;
  --wit:            #FFFFFF;
  --grijs-50:       #FAFAFA;
  --grijs-100:      #F5F5F5;
  --grijs-200:      #E8E8E8;
  --grijs-300:      #CCCCCC;
  --grijs-500:      #888888;
  --grijs-700:      #444444;
  --zwart:          #1C1C1C;
  --shadow-sm:      0 1px 4px rgba(0,0,0,.08);
  --shadow-md:      0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:      0 8px 32px rgba(0,0,0,.14);
  --radius:         8px;
  --radius-sm:      5px;
  --transition:     .18s ease;
  --font-head:      'Nunito', sans-serif;
  --font-body:      'Open Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--grijs-50);
  color: var(--zwart);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}

/* ── NAVBAR ── */
.navbar {
  background: var(--plus-groen);
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
  height: 56px;
  gap: 1rem;
}
.navbar-brand { display: flex; align-items: center; text-decoration: none; }
.navbar-brand img { height: 32px; }
.navbar-tagline {
  color: rgba(255,255,255,.85);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .88rem;
  margin-left: .85rem;
  padding-left: .85rem;
  border-left: 1px solid rgba(255,255,255,.3);
}
.navbar-nav {
  display: flex; align-items: center; gap: .15rem;
  list-style: none;
}
.navbar-nav a {
  display: block;
  text-decoration: none;
  color: rgba(255,255,255,.92);
  font-weight: 600;
  font-size: .85rem;
  padding: .45rem .8rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  white-space: nowrap;
}
.navbar-nav a:hover    { background: rgba(255,255,255,.15); }
.navbar-nav a.active   { background: rgba(255,255,255,.2); color: #fff; }
.navbar-nav .btn-nav-cta {
  background: var(--wit);
  color: var(--plus-groen);
  font-weight: 700;
  margin-left: .35rem;
}
.navbar-nav .btn-nav-cta:hover { background: var(--grijs-100); }
.nav-badge {
  background: var(--plus-rood);
  color: #fff;
  font-size: .6rem; font-weight: 700;
  padding: .1rem .38rem;
  border-radius: 99px;
  margin-left: .2rem;
  vertical-align: super;
}
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.hamburger span { display: block; width: 22px; height: 2px; background: #fff; margin: 5px 0; }

/* ── CONTAINER ── */
.container     { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }
.container-sm  { max-width: 480px; }
.container-md  { max-width: 800px; }

/* ── HERO ── */
.hero {
  background: var(--plus-groen);
  color: #fff;
  padding: 3.5rem 1.5rem;
}
.hero-inner { max-width: 680px; margin: 0 auto; text-align: center; }
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 900;
  margin-bottom: .75rem;
  line-height: 1.15;
}
.hero p { font-size: 1.05rem; opacity: .9; margin-bottom: 2rem; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .6rem 1.35rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer; border: none;
  text-decoration: none;
  transition: all var(--transition);
  font-family: var(--font-body);
  line-height: 1.4;
}
.btn-primary   { background: var(--plus-groen); color: #fff; }
.btn-primary:hover { background: var(--plus-groen-dk); }
.btn-secondary { background: var(--grijs-200); color: var(--zwart); }
.btn-secondary:hover { background: var(--grijs-300); }
.btn-outline   { background: transparent; border: 2px solid var(--plus-groen); color: var(--plus-groen); }
.btn-outline:hover { background: var(--plus-groen); color: #fff; }
.btn-wit       { background: #fff; color: var(--plus-groen); font-weight: 800; }
.btn-wit:hover { background: var(--grijs-100); }
.btn-danger    { background: #CC0000; color: #fff; }
.btn-danger:hover { background: #AA0000; }
.btn-sm    { padding: .38rem .85rem; font-size: .8rem; }
.btn-lg    { padding: .75rem 1.75rem; font-size: .97rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── KAARTEN ── */
.card {
  background: var(--wit);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--grijs-200);
  overflow: hidden;
}
.card-body   { padding: 1.25rem; }
.card-header {
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--grijs-200);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--grijs-50);
}
.card-header h3 { font-family: var(--font-head); font-size: .97rem; font-weight: 800; }
.card-footer {
  padding: .9rem 1.25rem;
  border-top: 1px solid var(--grijs-200);
  background: var(--grijs-50);
}

/* ── PAKKET GRID ── */
.pakket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.15rem;
}
.pakket-card {
  position: relative; cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
}
.pakket-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pakket-img {
  width: 100%; height: 170px; object-fit: cover;
  background: var(--grijs-200);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; color: var(--grijs-500);
}
img.pakket-img { display: block; }
.korting-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--plus-rood); color: #fff;
  font-weight: 800; font-size: .78rem;
  padding: .2rem .55rem; border-radius: 4px;
  font-family: var(--font-head);
}
.stuks-badge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,.52); color: #fff;
  font-size: .72rem; font-weight: 600;
  padding: .18rem .5rem; border-radius: 4px;
}
.pakket-winkel { font-size: .76rem; color: var(--grijs-500); margin-bottom: .2rem; text-transform: uppercase; letter-spacing: .03em; }
.pakket-naam   { font-family: var(--font-head); font-weight: 800; font-size: .97rem; margin-bottom: .45rem; line-height: 1.3; }
.pakket-prijs  { display: flex; align-items: baseline; gap: .45rem; }
.prijs-nieuw   { font-size: 1.25rem; font-weight: 900; color: var(--plus-groen); font-family: var(--font-head); }
.prijs-oud     { font-size: .83rem; color: var(--grijs-500); text-decoration: line-through; }
.pakket-timer  { font-size: .76rem; color: var(--grijs-500); margin-top: .35rem; }

/* ── STATISTIEKEN ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.stat-card {
  background: var(--wit);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--grijs-200);
  box-shadow: var(--shadow-sm);
}
.stat-nr    { font-family: var(--font-head); font-size: 1.9rem; font-weight: 900; color: var(--plus-groen); }
.stat-label { font-size: .78rem; color: var(--grijs-500); margin-top: .15rem; }

/* ── FORMULIEREN ── */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-weight: 600; font-size: .85rem;
  color: var(--grijs-700);
  margin-bottom: .32rem;
}
.form-control {
  width: 100%;
  padding: .58rem .85rem;
  border: 1.5px solid var(--grijs-300);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: var(--font-body);
  background: var(--wit);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--plus-groen);
  box-shadow: 0 0 0 3px rgba(90,171,27,.12);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-check { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .9rem; }
.form-check input { width: auto; cursor: pointer; accent-color: var(--plus-groen); }
textarea.form-control { min-height: 90px; resize: vertical; }
.field-error { color: #CC0000; font-size: .78rem; margin-top: .2rem; }

/* ── MELDINGEN ── */
.alert {
  padding: .8rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: .9rem;
  font-size: .88rem;
  border-left: 4px solid transparent;
}
.alert-success { background: #EEF7E6; color: #2E6B10; border-color: var(--plus-groen); }
.alert-danger  { background: #FEE8E8; color: #8B0000; border-color: var(--plus-rood); }
.alert-warning { background: #FFF8DC; color: #7A5800; border-color: var(--plus-geel); }
.alert-info    { background: #EAF1FF; color: #003580; border-color: var(--plus-blauw); }

/* ── TABEL ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .87rem; }
th {
  background: var(--grijs-50); padding: .65rem 1rem;
  text-align: left; font-weight: 700; font-size: .78rem;
  color: var(--grijs-700); border-bottom: 2px solid var(--grijs-200);
  text-transform: uppercase; letter-spacing: .04em;
}
td { padding: .65rem 1rem; border-bottom: 1px solid var(--grijs-200); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--grijs-50); }

/* ── BADGES ── */
.badge {
  display: inline-block; padding: .18rem .55rem;
  border-radius: 99px; font-size: .72rem; font-weight: 700;
}
.badge-groen      { background: #EEF7E6; color: #2E6B10; }
.badge-rood       { background: #FEE8E8; color: #8B0000; }
.badge-blauw      { background: #EAF1FF; color: #003580; }
.badge-oranje     { background: #FFF3E0; color: #8B4500; }
.badge-grijs      { background: var(--grijs-200); color: var(--grijs-700); }
.badge-superadmin { background: #F3E8FF; color: #5B21B6; }
.badge-ondernemer { background: #EAF1FF; color: #003580; }
.badge-medewerker { background: #EEF7E6; color: #2E6B10; }
.badge-klant      { background: var(--grijs-200); color: var(--grijs-700); }

/* ── ADMIN LAYOUT ── */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 56px);
}
.sidebar { background: #1C2A1C; padding: 1.25rem 0; }
.sidebar-section {
  color: #6B876B; font-size: .68rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .6rem 1.1rem .25rem;
}
.sidebar-section:first-child { padding-top: .25rem; }
.sidebar a {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem 1.1rem;
  color: #B8D4B8; text-decoration: none;
  font-size: .84rem; font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.sidebar a:hover  { background: rgba(255,255,255,.06); color: #fff; }
.sidebar a.active {
  background: rgba(90,171,27,.25);
  color: #A8E080;
  border-left: 3px solid var(--plus-groen);
}
.admin-content { padding: 1.75rem 2rem; background: var(--grijs-50); overflow-y: auto; }

/* ── PAGINA HEADER ── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 1.5rem; flex-wrap: wrap; gap: .75rem;
}
.page-title    { font-family: var(--font-head); font-size: 1.45rem; font-weight: 900; }
.page-subtitle { color: var(--grijs-500); font-size: .85rem; margin-top: .2rem; }

/* ── SWIPE KNOP ── */
.swipe-container {
  position: relative;
  background: var(--grijs-200);
  border-radius: 99px;
  height: 58px;
  display: flex; align-items: center;
  padding: 4px;
  overflow: hidden;
  user-select: none;
  touch-action: none;
}
.swipe-track {
  position: absolute; inset: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--plus-groen-lt) 0%, var(--plus-groen-lt) var(--progress, 0%), transparent var(--progress, 0%));
  transition: background .1s;
}
.swipe-handle {
  position: absolute; left: 4px;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--plus-groen);
  display: flex; align-items: center; justify-content: center;
  cursor: grab; z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  transition: left .15s;
}
.swipe-handle svg { color: #fff; }
.swipe-label {
  position: absolute; left: 0; right: 0;
  text-align: center; pointer-events: none;
  font-weight: 700; font-size: .9rem;
  color: var(--grijs-700); z-index: 1;
}
.swipe-container.done .swipe-handle { background: #2E7D32; }
.swipe-container.done .swipe-label  { color: var(--plus-groen); }

/* ── QR / STATUS KLEUREN ── */
.status-gereserveerd { color: var(--plus-blauw); font-weight: 600; }
.status-opgehaald    { color: var(--plus-groen); font-weight: 600; }
.status-geannuleerd  { color: var(--grijs-500); }
.status-no_show      { color: var(--plus-rood); font-weight: 600; }

/* ── STAPPEN ── */
.stappen { display: flex; margin: 1.75rem 0; }
.stap { flex: 1; text-align: center; position: relative; padding: .75rem .4rem; }
.stap-nr {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--grijs-200); color: var(--grijs-700);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem;
  margin: 0 auto .6rem; position: relative; z-index: 1;
}
.stap.actief .stap-nr { background: var(--plus-groen); color: #fff; }
.stap.klaar  .stap-nr { background: var(--plus-groen); color: #fff; }
.stap-lijn {
  position: absolute; top: 21px; left: calc(50% + 17px); right: calc(-50% + 17px);
  height: 2px; background: var(--grijs-200);
}
.stap-label { font-size: .78rem; color: var(--grijs-700); line-height: 1.35; }

/* ── FOOTER ── */
footer {
  background: #1C2A1C; color: #7A9A7A;
  text-align: center; padding: 1.5rem;
  font-size: .8rem; margin-top: 3rem;
}
footer a { color: var(--plus-groen); text-decoration: none; }

/* ── LEGE TOESTAND ── */
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--grijs-500); }
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: .85rem; opacity: .4; }
.empty-state p { margin-bottom: 1.1rem; }

/* ── PWA BANNER ── */
#pwa-banner {
  position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%);
  background: var(--zwart); color: #fff;
  padding: .8rem 1.35rem;
  border-radius: 99px; display: flex; align-items: center; gap: .9rem;
  box-shadow: var(--shadow-lg); z-index: 999; font-size: .85rem;
  max-width: calc(100vw - 2rem);
}
#pwa-banner.hidden { display: none; }

/* ── ANIMATIES ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn .3s ease both; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .hamburger { display: block; }
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .pakket-grid { grid-template-columns: 1fr 1fr; }
  .navbar-tagline { display: none; }
  .container { padding: 1.25rem 1rem; }
}
@media (max-width: 400px) {
  .pakket-grid { grid-template-columns: 1fr; }
  .stats-grid  { grid-template-columns: 1fr 1fr; }
}

/* ── ZOEKBALK ── */
.zoek-balk {
  display: flex; gap: .5rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.zoek-balk input {
  flex: 1; min-width: 200px;
  padding: .6rem 1rem;
  border: 1.5px solid var(--grijs-300);
  border-radius: var(--radius-sm);
  font-size: .9rem; font-family: var(--font-body);
}
.zoek-balk input:focus {
  outline: none; border-color: var(--plus-groen);
  box-shadow: 0 0 0 3px rgba(90,171,27,.12);
}
.zoek-resultaat-geen {
  padding: 1.5rem; text-align: center;
  color: var(--grijs-500); font-size: .9rem;
}

/* ── MOBIEL VERBETERINGEN ── */
@media (max-width: 768px) {
  /* Navbar */
  .navbar-inner { padding: 0 1rem; height: 52px; }
  .navbar-nav {
    display: none; position: fixed; top: 52px; left: 0; right: 0;
    background: var(--plus-groen); flex-direction: column;
    padding: .5rem 0; box-shadow: var(--shadow-md); z-index: 199;
    gap: 0;
  }
  .navbar-nav.open { display: flex; }
  .navbar-nav a { padding: .75rem 1.5rem; border-radius: 0; font-size: .95rem; }
  .hamburger { display: flex; flex-direction: column; justify-content: center; }

  /* Container */
  .container { padding: 1rem; }

  /* Pakket grid */
  .pakket-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .stat-nr { font-size: 1.6rem; }

  /* Formulieren */
  .form-row { grid-template-columns: 1fr; gap: .75rem; }

  /* Tabel - scrollbaar */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 500px; }
  th, td { padding: .55rem .75rem; font-size: .8rem; }

  /* Kaart body */
  .card-body { padding: 1rem; }
  .card-header { padding: .75rem 1rem; }
  .card-footer { padding: .75rem 1rem; }

  /* Pagina header */
  .page-header { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .page-title { font-size: 1.2rem; }

  /* Admin layout - sidebar verbergen */
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; position: fixed; top: 52px; left: 0; bottom: 0;
             width: 240px; z-index: 150; overflow-y: auto; }
  .sidebar.open { display: block; }
  .admin-content { padding: 1rem; }

  /* Swipe container */
  .swipe-container { height: 62px; }
  .swipe-handle { width: 54px; height: 54px; }

  /* Knoppen */
  .btn-lg { padding: .7rem 1.25rem; font-size: .92rem; }
  .btn { font-size: .85rem; }

  /* Popup */
  #bevestig-popup { padding: .5rem; }

  /* Zoekbalk */
  .zoek-balk input { font-size: .88rem; }

  /* Footer */
  footer { padding: 1.25rem .75rem; font-size: .78rem; }
}

@media (max-width: 480px) {
  .pakket-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .navbar-tagline { display: none; }
  .pakket-img { height: 150px; }
}

/* Touch verbeteringen */
@media (hover: none) {
  .btn:hover { transform: none; }
  .pakket-card:hover { transform: none; box-shadow: var(--shadow-sm); }
}

/* ── RESERVERING DETAIL MOBIEL ── */
@media (max-width: 600px) {
  /* Tabel in kaart */
  .card-body table { width: 100%; }
  .card-body table td {
    display: block; width: 100% !important;
    padding: .25rem 0; border: none;
  }
  .card-body table td:first-child {
    font-weight: 600; color: var(--grijs-500);
    font-size: .78rem; text-transform: uppercase;
    padding-top: .6rem;
  }
  .card-body table tr { border-bottom: 1px solid var(--grijs-200); }
  .card-body table tr:last-child { border-bottom: none; }

  /* Swipe container */
  .swipe-container { height: 62px; }
  .swipe-label { font-size: .82rem; }

  /* Page header op mobiel */
  .page-header { flex-direction: column; gap: .4rem; }
  .page-header .btn { align-self: flex-start; }

  /* Tekst niet afkappen */
  td, th { word-break: break-word; white-space: normal; }
}
