/* ═══════════════════════════════════════════════════════════════
   REISPLANNER — MAIN CSS
   ═══════════════════════════════════════════════════════════════ */

:root {
  --ink:        #1a1a2e;
  --ink2:       #2d3561;
  --accent:     #e8720c;
  --accent2:    #c75000;
  --sea:        #2563a8;
  --sea-l:      #dbeafe;
  --green:      #16a34a;
  --green-l:    #dcfce7;
  --red:        #dc2626;
  --red-l:      #fee2e2;
  --purple:     #6366f1;
  --purple-l:   #eef2ff;
  --sand:       #faf7f2;
  --linen:      #f5f0e8;
  --border:     #e2d9cc;
  --muted:      #8b7355;
  --white:      #ffffff;
  --shadow:     0 2px 16px rgba(26,26,46,.08);
  --shadow2:    0 8px 40px rgba(26,26,46,.14);
  --r:          10px;
  --font-body:  'DM Sans', sans-serif;
  --font-serif: 'Crimson Pro', serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--sand);
  color: var(--ink);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

/* ── TOPBAR ── */
.topbar {
  background: var(--ink);
  color: white;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
}

.topbar-logo {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  flex-shrink: 0;
}
.topbar-logo span { color: #f0a500; }

.topbar-tabs {
  display: flex;
  gap: 2px;
  margin-left: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.topbar-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 7px 14px;
  border: none;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.65);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  transition: all .15s;
  white-space: nowrap;
}
.tab-btn:hover  { background: rgba(255,255,255,.15); color: white; }
.tab-btn.active { background: var(--accent); color: white; }

.topbar-right {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* ── APP CONTAINER ── */
.app {
  max-width: 1300px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* ── TAB CONTENT ── */
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── BUTTONS ── */
.btn {
  padding: 8px 18px;
  border: none;
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary   { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); }
.btn-green     { background: var(--green); color: white; }
.btn-green:hover { background: #15803d; }
.btn-ghost     { background: rgba(255,255,255,.12); color: white; border: 1px solid rgba(255,255,255,.2); }
.btn-ghost:hover { background: rgba(255,255,255,.2); }
.btn-outline   { background: white; color: var(--ink2); border: 1.5px solid var(--border); }
.btn-outline:hover { background: var(--linen); border-color: #c5b8a8; }
.btn-danger    { background: var(--red); color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-xs { padding: 3px 9px; font-size: 11px; border-radius: 5px; }
.btn-inline {
  background: rgba(255,255,255,.15); color: white; border: none;
  font-family: inherit; font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 5px; cursor: pointer;
}

.ai-btn {
  padding: 7px 16px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white; border: none; border-radius: 7px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s; box-shadow: 0 2px 8px rgba(99,102,241,.3);
  white-space: nowrap;
}
.ai-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99,102,241,.4); }
.ai-btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* ── CARD ── */
.card {
  background: white;
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--linen);
}
.card-title {
  font-family: var(--font-serif);
  font-size: 17px; font-weight: 700; color: var(--ink2);
  display: flex; align-items: center; gap: 8px;
}
.card-body { padding: 20px; }

/* ── FORM ── */
.form-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}
.form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 5px; }

label {
  font-size: 11.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .6px; color: var(--muted);
}

input[type=text], input[type=tel], input[type=number],
input[type=password], textarea, select {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--border); border-radius: 7px;
  font-family: inherit; font-size: 13.5px; color: var(--ink);
  background: white; transition: border-color .14s, box-shadow .14s;
  appearance: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--sea); outline: none;
  box-shadow: 0 0 0 3px rgba(37,99,168,.12);
}
textarea { resize: vertical; min-height: 72px; line-height: 1.5; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238b7355' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 32px;
}

/* ── PAGE HEADERS ── */
.tab-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; margin-bottom: 20px;
  flex-wrap: wrap; gap: 12px;
}
.page-titel {
  font-family: var(--font-serif);
  font-size: 28px; font-weight: 700; color: var(--ink2);
}
.page-subtitel { color: var(--muted); font-size: 14px; margin-top: 2px; }

/* ── LEGE STAAT ── */
.leeg-scherm {
  text-align: center; padding: 48px 20px; color: var(--muted);
}
.leeg-titel {
  font-family: var(--font-serif);
  font-size: 20px; color: var(--ink2); margin-bottom: 6px;
}
.leeg-sub { font-size: 13px; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--ink); color: white;
  padding: 12px 20px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow2); z-index: 9999;
  transform: translateY(80px); opacity: 0;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  max-width: 320px; pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--green); }
.toast.error   { background: var(--red); }

/* ── BADGE ── */
.badge {
  display: inline-block; background: var(--purple-l); color: var(--purple);
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 10px; letter-spacing: .3px;
}

/* ── MODALS ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,15,30,.75);
  z-index: 2000; display: none;
  align-items: center; justify-content: center;
  backdrop-filter: blur(3px); padding: 20px;
}
.modal-overlay.actief { display: flex; }

.modal {
  background: white; border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
  max-height: 92vh; overflow-y: auto;
  transform: translateY(20px);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  width: 100%;
}
.modal-overlay.actief .modal { transform: translateY(0); }

.modal-header {
  background: var(--ink2); color: white;
  padding: 16px 20px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
  border-radius: 16px 16px 0 0;
  flex-shrink: 0;
}
.modal-titel {
  font-family: var(--font-serif);
  font-size: 18px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
}
.modal-sluit {
  background: rgba(255,255,255,.15); border: none; color: white;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background .14s;
}
.modal-sluit:hover { background: rgba(255,255,255,.3); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 14px 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* Specifieke modal breedtes */
.ai-modal      { max-width: 520px; }
.ai-reis-modal { max-width: 640px; }
.locatie-picker-modal { max-width: 860px; }
.kaart-modal   { max-width: 980px; }
.pdf-modal {
  max-width: 960px; width: 96vw;
  height: 90vh; display: flex; flex-direction: column;
}
.pdf-modal .modal-header { border-radius: 16px 16px 0 0; flex-shrink: 0; }

/* ── PDF VIEWER ── */
.pdf-naam {
  font-size: 14px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.pdf-viewer-wrap {
  flex: 1; min-height: 0; background: #525659;
  display: flex; flex-direction: column;
  border-radius: 0 0 16px 16px; overflow: hidden;
}

/* ── KAART MODAL ── */
.kaart-uitleg {
  padding: 10px 18px; background: #f8f9fa;
  border-top: 1px solid #dee2e6;
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
  font-size: 13px; color: #495057;
}
.kaart-info {
  padding: 10px 18px; background: #f0f7ff;
  border-top: 1px solid #dbeafe;
  font-size: 13px; color: #1e40af;
  min-height: 40px; display: flex; align-items: center; gap: 8px;
}

/* ── DROP ZONE ── */
.drop-zone {
  border: 2.5px dashed #c7d2fe; border-radius: 10px;
  padding: 28px; text-align: center; cursor: pointer;
  transition: all .18s; background: #fafbff;
  font-size: 13px; color: #6b7280; margin-bottom: 16px;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--purple); background: var(--purple-l);
}
.drop-zone-icoon { font-size: 36px; margin-bottom: 8px; }
.drop-zone-sub { font-size: 11.5px; color: #9ca3af; margin-top: 4px; }

/* ── BIJLAGEN LIJST ── */
.bijlagen-lijst { display: flex; flex-direction: column; gap: 8px; }
.bijlage-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: white;
  border: 1.5px solid var(--border); border-radius: 8px;
  transition: border-color .14s;
}
.bijlage-item:hover { border-color: var(--purple); }
.bijlage-icoon { font-size: 24px; flex-shrink: 0; }
.bijlage-info { flex: 1; min-width: 0; }
.bijlage-naam {
  font-weight: 600; font-size: 13px; color: var(--sea);
  cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bijlage-naam:hover { text-decoration: underline; }
.bijlage-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.bijlage-acties { display: flex; gap: 6px; flex-shrink: 0; }

/* ── OVERZICHT GRID ── */
.overzicht-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.dag-kaartje {
  background: white; border-radius: var(--r);
  box-shadow: var(--shadow); overflow: hidden;
  cursor: pointer; transition: box-shadow .15s, transform .15s;
  border: 2px solid transparent;
}
.dag-kaartje:hover { box-shadow: var(--shadow2); transform: translateY(-2px); border-color: var(--sea-l); }
.dag-kaartje-header {
  padding: 12px 16px; display: flex; align-items: center;
  gap: 10px; color: white;
}
.dag-kaartje-nr {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; flex-shrink: 0;
}
.dag-kaartje-body { padding: 12px 16px; }
.dag-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chip { font-size: 10px; padding: 2px 7px; border-radius: 10px; font-weight: 600; }
.chip-must { background: var(--green-l); color: var(--green); }
.chip-opt  { background: #fff3e0; color: var(--accent); }

/* ── PROGRESS ── */
.progress-wrap {
  height: 4px; background: var(--border); border-radius: 2px;
  overflow: hidden; margin-top: 12px;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--sea), var(--accent));
  border-radius: 2px; transition: width .4s ease;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar-right .btn-sm:not(.btn-primary) { display: none; }
  .app { padding: 16px 14px; }
  .form-grid.cols-2, .form-grid.cols-3 { grid-template-columns: 1fr; }
  .modal-overlay { padding: 10px; }
  .ai-modal, .ai-reis-modal { max-width: 100%; }
}
@media (max-width: 480px) {
  .topbar-logo { font-size: 16px; }
  .tab-btn { padding: 6px 10px; font-size: 12px; }
}

/* ── GENERATOR KNOPPEN RIJ ── */
.gen-knoppen-rij {
  display: flex;
  gap: 16px;
  margin: 24px 0 0;
  flex-wrap: wrap;
}
.gen-reisplan-knop {
  background: linear-gradient(135deg, #059669, #10b981) !important;
}
.gen-reisplan-knop:hover { opacity: .9; }

/* ── REISPLAN TAB ── */
.reisplan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: white;
  border-bottom: 2px solid var(--border, #e2d9cc);
  position: sticky;
  top: 66px;
  z-index: 100;
  flex-wrap: wrap;
  gap: 12px;
}
.reisplan-titel-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.reisplan-badge {
  background: #d1fae5;
  color: #065f46;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid #a7f3d0;
}
.reisplan-acties {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}


/* Print stijl voor reisplan */
@media print {
  .topbar, .reisplan-header { display: none !important; }
  .tab-content:not(#tabReisplan) { display: none !important; }
  .reisplan-inhoud { display: block !important; }
}

/* ── REISPLAN CONTAINER ── */
.reisplan-container {
  min-height: calc(100vh - 66px);
  background: var(--grijs-l, #f5f0e8);
}

/* ── REISPLAN LAYOUT ── */
.rp-header {
  background: var(--ink2, #2d3561);
  color: white;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.rp-logo { font-size: 20px; font-weight: 700; font-family: var(--font-serif); }
.rp-meta { font-size: 12px; opacity: .75; margin-top: 3px; }
.rp-header-acties { display: flex; gap: 8px; }
.rp-btn {
  padding: 7px 14px; border-radius: 7px; border: none; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,.15); color: white; transition: all .14s;
}
.rp-btn:hover { background: rgba(255,255,255,.25); }
.rp-btn-primary { background: var(--sea, #2563a8) !important; }

.rp-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  min-height: calc(100vh - 130px);
}
.rp-sidebar {
  background: white;
  border-right: 1px solid var(--border, #e2d9cc);
  position: sticky;
  top: 66px;
  height: calc(100vh - 66px);
  overflow-y: auto;
}
.rp-nav-list { list-style: none; }
.rp-nav-btn {
  width: 100%; text-align: left; border: none; background: none;
  padding: 10px 12px; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--linen, #f5f0e8);
  transition: background .12s; font-size: 13px; color: var(--ink);
}
.rp-nav-btn:hover { background: var(--linen); }
.rp-nav-btn.actief { background: var(--sea-l); color: var(--sea); font-weight: 600; border-left: 3px solid var(--sea); }
.rp-badge {
  width: 26px; height: 26px; border-radius: 50%; color: white;
  font-size: 11px; font-weight: 700; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.rp-nav-info { flex: 1; min-width: 0; }
.rp-nav-titel { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-nav-sub { font-size: 11px; color: var(--muted); }

.rp-main { padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.rp-dag-card { background: white; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.08); overflow: hidden; }
.rp-dag-header {
  padding: 14px 18px; color: white;
  display: flex; align-items: center; gap: 12px;
}
.rp-dag-nr {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.25); border: 2px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; flex-shrink: 0;
}
.rp-dag-titel { font-size: 15px; font-weight: 700; }
.rp-dag-meta { font-size: 11.5px; opacity: .85; display: flex; gap: 10px; margin-top: 2px; }
.rp-car-btn {
  margin-left: auto; background: rgba(255,255,255,.2); border: none;
  border-radius: 7px; padding: 6px 10px; cursor: pointer; font-size: 16px;
  transition: background .14s;
}
.rp-car-btn:hover { background: rgba(255,255,255,.35); }

.rp-beschr { padding: 14px 18px; font-size: 14px; line-height: 1.6; color: var(--ink); border-bottom: 1px solid var(--linen); }
.rp-stops { padding: 14px 18px; }
.rp-stops-titel { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 10px 0 6px; }
.rp-stop { border: 1px solid var(--linen); border-radius: 7px; margin-bottom: 6px; overflow: hidden; }
.rp-stop-hdr { padding: 10px 12px; display: flex; align-items: center; gap: 8px; cursor: pointer; background: var(--grijs-l, #f9f7f4); }
.rp-stop-nr { width: 24px; height: 24px; border-radius: 50%; color: white; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rp-stop-naam { flex: 1; font-size: 13px; font-weight: 600; }
.rp-stop-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 8px; }
.rp-must { background: #d1fae5; color: #065f46; }
.rp-opt  { background: #fef3c7; color: #92400e; }
.rp-stop-body { padding: 10px 12px; font-size: 13px; line-height: 1.6; display: none; }
.rp-stop.open .rp-stop-body { display: block; }
.rp-stop-gps { font-size: 11px; color: var(--muted); margin-top: 6px; font-family: monospace; }
.rp-nav-micro {
  border: none; background: none; cursor: pointer; font-size: 13px;
  padding: 2px 5px; border-radius: 4px; opacity: .55; transition: opacity .12s;
  flex-shrink: 0;
}
.rp-nav-micro:hover { opacity: 1; background: rgba(0,0,0,.06); }

.rp-kaart-wrap { padding: 12px 18px; border-top: 1px solid var(--linen); }
.rp-kaart-btn { background: none; border: 1px solid var(--border); border-radius: 7px; padding: 8px 14px; cursor: pointer; font-family: inherit; font-size: 13px; width: 100%; text-align: left; transition: background .12s; }
.rp-kaart-btn:hover { background: var(--linen); }
.rp-kaart-container { margin-top: 10px; border-radius: 7px; overflow: hidden; }

.rp-ovn { padding: 14px 18px; border-top: 1px solid var(--linen); }
.rp-ovn-hdr { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 10px; }
.rp-ovn-tip { padding: 10px 0; border-bottom: 1px solid var(--linen); }
.rp-ovn-tip:last-child { border-bottom: none; }
.rp-ovn-naam-rij { display: flex; align-items: center; gap: 6px; }
.rp-ovn-naam { font-size: 14px; font-weight: 600; }
.rp-ovn-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.rp-ovn-beschr { font-size: 13px; line-height: 1.5; margin-top: 5px; }

/* Navigatie keuzescherm */
.rp-nav-keuze {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,.4);
}
.rp-nav-keuze.actief { display: flex; align-items: flex-end; }
.rp-nav-keuze-card {
  background: white; border-radius: 16px 16px 0 0;
  padding: 20px 20px 28px; width: 100%; max-width: 500px; margin: 0 auto;
  position: relative; box-shadow: 0 -4px 24px rgba(0,0,0,.18);
  animation: rpSlideUp .22s ease;
}
@keyframes rpSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.rp-nav-keuze-titel { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #64748b; margin-bottom: 8px; }
.rp-nav-keuze-label { font-size: 15px; font-weight: 600; color: #1a1a2e; margin-bottom: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-nav-keuze-knoppen { display: flex; flex-direction: column; gap: 10px; }
.rp-nav-keuze-btn { padding: 13px 18px; border-radius: 10px; border: none; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; transition: all .14s; }
.rp-keuze-huidig { background: #1a73e8; color: white; }
.rp-keuze-huidig:hover { background: #1558b0; }
.rp-keuze-dag { background: #f1f5f9; color: #334155; }
.rp-keuze-dag:hover { background: #e2e8f0; }
.rp-nav-keuze-sluit { position: absolute; top: 16px; right: 16px; background: #f1f5f9; border: none; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 14px; }

/* Print */
@media print {
  /* Verberg navigatie elementen */
  .topbar,
  .rp-sidebar,
  .rp-header-acties,
  .rp-kaart-wrap,
  .rp-car-btn,
  .rp-nav-micro,
  .rp-nav-keuze { display: none !important; }

  /* Volledige breedte layout */
  .rp-layout { grid-template-columns: 1fr; }

  /* Alle dag cards tonen */
  .rp-dag-card { display: block !important; }

  /* Nette paginering */
  .rp-dag-card {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    margin-bottom: 16px;
  }

  /* Stop details uitklappen */
  .rp-stop-body { display: block !important; }

  /* Dag header printbaar */
  .rp-dag-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* Verberg kaart containers */
  .rp-kaart-container { display: none !important; }

  /* Header aanpassen */
  .rp-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (max-width: 700px) {
  .rp-layout { grid-template-columns: 1fr; }
  .rp-sidebar { position: static; height: auto; }
}

/* ── AUTH MODAL ── */
.auth-modal  { max-width: 420px; }
.reizen-modal { max-width: 560px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; padding: 20px 0 0; }
.auth-fout { color: var(--red, #dc2626); font-size: 13px; min-height: 18px; }
.auth-onthoud { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.auth-wissel { text-align: center; padding: 14px 0 4px; font-size: 13px; color: var(--muted); }
.btn-link { background: none; border: none; color: var(--sea, #2563a8); cursor: pointer; font-size: 13px; text-decoration: underline; padding: 0; font-family: inherit; }
.btn-link:hover { opacity: .8; }

/* ── REIZEN LIJST ── */
.reizen-lijst { min-height: 200px; max-height: 60vh; overflow-y: auto; }
.reis-item {
  display: flex; align-items: center;
  padding: 12px 18px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .12s;
  gap: 12px;
}
.reis-item:hover       { background: var(--linen); }
.reis-item.actief      { background: var(--sea-l); border-left: 3px solid var(--sea); }
.reis-item-info        { flex: 1; min-width: 0; }
.reis-item-naam        { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reis-item-meta        { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.reis-item-acties      { display: flex; gap: 4px; flex-shrink: 0; }
.reis-actie-btn        { background: none; border: none; cursor: pointer; padding: 4px 6px; border-radius: 5px; font-size: 14px; transition: background .12s; }
.reis-actie-btn:hover  { background: var(--linen); }
.reis-actie-del:hover  { background: #fee2e2; }

/* ── OPSLAAN STATUS ── */
.opslaan-status {
  font-size: 11px;
  transition: color .3s;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.opslaan-status:empty { display: none; }
.opslaan-pending { color: #f59e0b; }
.opslaan-ok      { color: #10b981; }
.opslaan-fout    { color: #ef4444; }
.opslaan-stil    { color: #9ca3af; font-weight: 400; }

/* ═══════════════════════════════════════════════════
   HAMBURGER MENU (mobiel)
═══════════════════════════════════════════════════ */

/* Hamburger knop — standaard verborgen op desktop */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background .15s;
  margin-left: auto;
  flex-shrink: 0;
}
.hamburger-btn:hover { background: rgba(255,255,255,.1); }
.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #d1d5db;
  border-radius: 2px;
  transition: all .22s ease;
  transform-origin: center;
}
/* X animatie */
.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Dropdown menu */
.hamburger-menu {
  display: none;
  position: fixed;
  top: 56px;
  left: 0; right: 0;
  background: var(--ink2, #2d3561);
  border-top: 1px solid rgba(255,255,255,.1);
  z-index: 900;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  animation: menuSlideDown .18s ease;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}
.hamburger-menu.open { display: flex; }

@keyframes menuSlideDown {
  from { transform: translateY(-8px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.mob-tab-btn {
  background: none;
  border: none;
  color: #d1d5db;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 14px 20px;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: background .12s, color .12s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mob-tab-btn:hover,
.mob-tab-btn.actief { background: rgba(255,255,255,.1); color: white; }
.mob-tab-btn.actief { border-left: 3px solid var(--sea, #2563a8); padding-left: 17px; }

.hamburger-divider {
  height: 1px;
  background: rgba(255,255,255,.12);
  margin: 4px 0;
}

.hamburger-auth-sectie {
  display: flex;
  flex-direction: column;
}

.hamburger-user {
  padding: 10px 20px 4px;
  font-size: 12px;
  color: #9ca3af;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.mob-actie-btn {
  background: none;
  border: none;
  color: #d1d5db;
  font-family: inherit;
  font-size: 15px;
  padding: 13px 20px;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: background .12s;
}
.mob-actie-btn:hover   { background: rgba(255,255,255,.08); }
.mob-inloggen          { color: #fbbf24; font-weight: 600; }
.mob-uitloggen         { color: #f87171; }

/* ── Responsive breekpunten ──────────────────────── */

/* Tablet/mobiel: verberg desktop tabs, toon hamburger */
@media (max-width: 768px) {
  .topbar-tabs   { display: none !important; }
  .hamburger-btn { display: flex; }

  /* Verberg desktop auth knoppen in topbar — zitten in hamburger menu */
  #authGebruikerInfo,
  #btnAuthActie,
  #opslaanStatus { display: none !important; }

  /* Logo kleiner */
  .topbar-logo { font-size: 18px; }

  /* Topbar compacter */
  .topbar { padding: 0 14px; height: 52px; }

  /* Content geen topbar overlapping */
  .app { padding-top: 0; }

  /* Reisplan layout: geen sidebar op mobiel */
  .rp-layout { grid-template-columns: 1fr; }
  .rp-sidebar { display: none; }
  .rp-main { padding: 12px; }
}

@media (max-width: 480px) {
  .topbar-logo { font-size: 16px; }
}

/* ── REISPLAN VEROUDERD ── */
.tab-btn.verouderd,
.mob-tab-btn.verouderd {
  opacity: 0.65;
  font-style: italic;
}
.tab-btn.verouderd::after,
.mob-tab-btn.verouderd::after {
  content: ' ⚠';
  font-style: normal;
  font-size: 10px;
  opacity: .8;
}

.rp-verouderd-banner {
  background: #fef3c7;
  color: #92400e;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid #fde68a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.rp-verouderd-banner button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #92400e;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}

/* ── DAG CARD TOGGLE KNOPPEN ── */
.rp-dag-toggles {
  display: flex;
  gap: 5px;
  align-items: center;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.rp-toggle {
  padding: 4px 9px;
  border: 1.5px solid rgba(255,255,255,.45);
  border-radius: 12px;
  background: rgba(255,255,255,.15);
  color: white;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  opacity: .7;
}
.rp-toggle.actief {
  background: rgba(255,255,255,.28);
  border-color: rgba(255,255,255,.75);
  opacity: 1;
}
.rp-toggle:not(.actief) {
  text-decoration: line-through;
  opacity: .45;
}
.rp-toggle:hover { opacity: 1 !important; }

/* ── KAART LAYER CONTROL ── */
.rp-kaart-layers {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
  padding: 8px 10px;
  min-width: 110px;
  font-family: inherit;
  user-select: none;
}
.rp-layer-titel {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #94a3b8;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid #e2e8f0;
}
.rp-layer-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 2px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  border-radius: 4px;
  transition: all .12s;
  white-space: nowrap;
}
.rp-layer-item:hover { background: #f8fafc; }
.rp-layer-item:not(.actief) {
  opacity: .4;
  text-decoration: line-through;
}
.rp-layer-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,.7);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

/* ── HOND INFO ── */
.rp-stop-hond, .rp-ovn-hond,
.stop-hond, .tip-hond {
  font-size: 12.5px;
  line-height: 1.55;
  color: #4a5568;
  background: #f0fdf4;
  border-left: 3px solid #48bb78;
  padding: 6px 10px;
  border-radius: 0 6px 6px 0;
  margin: 6px 0 4px;
}

/* ── REISPLAN IFRAME ── */
.reisplan-frame {
  width: 100%;
  height: calc(100vh - 56px);
  border: none;
  display: block;
  background: white;
}

/* ── AI DAG ASSISTENT SECTIES ── */
.ai-dag-sectie {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--linen);
}
.ai-dag-sectie:last-of-type { border-bottom: none; }
.ai-dag-sectie-titel {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  margin-bottom: 8px;
}

/* ── AI DAG ASSISTENT UITBREIDINGEN ── */
.ai-sectie-titel {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  margin-bottom: 8px;
}
.ai-reis-rij {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.ai-reis-rij .form-group { flex: 1; min-width: 100px; }

/* ── AI PREVIEW CHIPS ── */
.ai-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.ai-chip-hond-ok   { background: #d1fae5; color: #065f46; }
.ai-chip-hond-warn { background: #fef3c7; color: #92400e; }
.ai-chip-hond      { background: #e0e7ff; color: #3730a3; }
.ai-chip-hond-onbekend { background: #f3f4f6; color: #6b7280; }
.ai-chip-gps       { background: #dbeafe; color: #1e40af; }
.ai-chip-gps-mis   { background: #fef3c7; color: #92400e; }
.ai-chip-type      { background: #f3f4f6; color: #374151; }
.ai-chip-prijs     { background: #f0fdf4; color: #166534; }

.ai-hond-info {
  font-size: 12px;
  line-height: 1.5;
  color: #065f46;
  background: #f0fdf4;
  border-left: 3px solid #4ade80;
  padding: 5px 8px;
  border-radius: 0 6px 6px 0;
  margin-top: 4px;
}

/* ── EDITOR STOP HOND CHIPS ── */
.stop-hond-rij {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--linen);
}
.stop-hond-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.stop-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.stop-chip-hond-ok   { background: #d1fae5; color: #065f46; }
.stop-chip-hond-warn { background: #fef3c7; color: #92400e; }
.stop-chip-hond      { background: #e0e7ff; color: #3730a3; }

.stop-hond-tekst {
  font-size: 12px;
  color: #4b5563;
  line-height: 1.5;
}

.ai-chip-hond-no      { background: #fee2e2; color: #991b1b; }
.stop-chip-hond-no    { background: #fee2e2; color: #991b1b; }
.ai-chip-hond-onbekend { background: #f3f4f6; color: #6b7280; }

/* ── WENSEN CHIPS ── */
.ai-chip-wens  { background: #ede9fe; color: #5b21b6; }
.ai-chip-stop  { background: #dbeafe; color: #1e40af; }
.ai-chip-extra { background: #f3f4f6; color: #374151; cursor: help; }
.ai-chip-info  { background: #e0e7ff; color: #3730a3; }
.ai-chip-interesse { background: #ede9fe; color: #5b21b6; }

/* ── EDITOR STOP CHIPS ── */
.stop-chips-rij {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 6px;
}
.stop-chip-interesse {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: #ede9fe;
  color: #5b21b6;
  white-space: nowrap;
}

/* AI Zoek knop bij overnachting */
.btn-ai-zoek {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
}
.btn-ai-zoek:hover { opacity: .85; }
