/* ─── RFFLS Dispatch Board — Stylesheet v6 ───────────────────────────────────
   Design: Clean, modern, professional — 2026
   Palette: Deep navy (#1a2744) + warm gold (#c9a84c) + clean whites
   ─────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy:        #1a2744;
  --navy-light:  #243356;
  --navy-dark:   #111c33;
  --gold:        #c9a84c;
  --gold-light:  #e2c97e;
  --gold-pale:   #fdf6e3;
  --white:       #ffffff;
  --bg:          #f0f2f7;
  --bg-card:     #ffffff;
  --text:        #1a2744;
  --text-muted:  #6b7a99;
  --text-light:  #9ba8c0;
  --border:      #e2e8f0;
  --border-focus:#c9a84c;
  --success:     #16a34a;
  --success-bg:  #dcfce7;
  --warning:     #d97706;
  --warning-bg:  #fef3c7;
  --danger:      #dc2626;
  --danger-bg:   #fee2e2;
  --info:        #2563eb;
  --info-bg:     #dbeafe;
  --purple:      #7c3aed;
  --purple-bg:   #ede9fe;
  --radius:      10px;
  --radius-sm:   6px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --shadow-sm:   0 1px 3px rgba(26,39,68,.07);
  --shadow:      0 4px 16px rgba(26,39,68,.09);
  --shadow-lg:   0 8px 32px rgba(26,39,68,.13);
  --sidebar-w:   256px;
  --transition:  180ms cubic-bezier(0.23, 1, 0.32, 1);
}
html { font-size: 15px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── App Shell ──────────────────────────────────────────────────────────────*/
.app-shell { display: flex; min-height: 100vh; }

/* ─── Sidebar ────────────────────────────────────────────────────────────────*/
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow: hidden;
  box-shadow: 2px 0 20px rgba(0,0,0,.15);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.brand-logo { flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: .02em;
}
.brand-sub {
  font-size: .68rem;
  color: var(--gold);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 500;
}
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
.nav-section-label {
  font-size: .65rem;
  font-weight: 700;
  color: rgba(255,255,255,.3);
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 12px 12px 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: var(--white); }
.nav-item.active {
  background: rgba(201,168,76,.14);
  color: var(--gold-light);
}
.nav-item.active svg { stroke: var(--gold); }
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: .65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}
.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-info { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
  flex-shrink: 0;
}
.user-details { display: flex; flex-direction: column; min-width: 0; }
.user-name {
  font-size: .8rem; font-weight: 600; color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-role { font-size: .68rem; color: rgba(255,255,255,.4); }
.btn-logout {
  color: rgba(255,255,255,.35);
  transition: color var(--transition);
  padding: 6px; border-radius: 4px;
  display: flex; align-items: center;
  background: none; border: none; cursor: pointer;
}
.btn-logout:hover { color: var(--danger); }

/* ─── Main Content ───────────────────────────────────────────────────────────*/
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page-header {
  padding: 28px 32px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
}
.page-subtitle { font-size: .875rem; color: var(--text-muted); margin-top: 4px; }
.page-body { padding: 24px 32px 48px; flex: 1; }

/* ─── Cards ──────────────────────────────────────────────────────────────────*/
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title { font-size: .9375rem; font-weight: 600; color: var(--navy); }
.card-body { padding: 24px; }

/* ─── Flow Steps (afspraak pagina) ───────────────────────────────────────────*/
.flow-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  box-shadow: var(--shadow-sm);
}
.flow-step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  position: relative;
}
.flow-step:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 2px;
  background: var(--border);
}
.flow-step.done::after { background: var(--success); }
.flow-step.active::after { background: var(--gold); }
.flow-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.flow-step.done .flow-step-num { background: var(--success); color: white; }
.flow-step.active .flow-step-num { background: var(--gold); color: var(--navy-dark); }
.flow-step-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.flow-step.done .flow-step-label { color: var(--success); }
.flow-step.active .flow-step-label { color: var(--navy); }

/* ─── Dienst Kaartjes ────────────────────────────────────────────────────────*/
.dienst-kaart {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.dienst-kaart.heeft-uitvoerder { border-color: #bbf7d0; }
.dienst-kaart.actie-nodig { border-color: #fde68a; }
.dienst-kaart.uitgevraagd { border-color: #bfdbfe; }
.dienst-kaart-header {
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dienst-kaart-naam {
  font-size: .9rem;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dienst-kaart-body { padding: 16px 18px; }
.uitvoerder-optie {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  margin-bottom: 8px;
  transition: border-color var(--transition), background var(--transition);
}
.uitvoerder-optie:hover { border-color: var(--gold); background: var(--gold-pale); }
.uitvoerder-optie.selected { border-color: var(--success); background: var(--success-bg); }
.uitvoerder-optie.beschikbaar { border-color: #bbf7d0; }
.uitvoerder-optie.niet-beschikbaar { opacity: .5; cursor: not-allowed; }
.uitvoerder-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
  flex-shrink: 0;
}
.uitvoerder-avatar.leverancier { background: var(--info); }
.uitvoerder-avatar.medewerker { background: var(--purple); }
.uitvoerder-info { flex: 1; min-width: 0; }
.uitvoerder-naam { font-size: .875rem; font-weight: 600; color: var(--navy); }
.uitvoerder-meta { font-size: .75rem; color: var(--text-muted); }
.uitvoerder-skills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.skill-chip {
  font-size: .65rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--gold-pale);
  color: #7c5a1a;
}
.contact-methode-keuze {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.contact-methode-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
}
.contact-methode-btn.selected { border-color: var(--gold); background: var(--gold-pale); color: #7c5a1a; }
.contact-methode-btn:hover { border-color: var(--navy); color: var(--navy); }

/* ─── Contact Pogingen Timeline ──────────────────────────────────────────────*/
.poging-timeline { display: flex; flex-direction: column; gap: 8px; }
.poging-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .8125rem;
}
.poging-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.poging-icon.mail { background: var(--info-bg); color: var(--info); }
.poging-icon.bellen { background: var(--success-bg); color: var(--success); }
.poging-icon.geen-gehoor { background: var(--warning-bg); color: var(--warning); }
.poging-icon.beschikbaar { background: var(--success-bg); color: var(--success); }
.poging-icon.niet-beschikbaar { background: var(--danger-bg); color: var(--danger); }
.poging-tekst { flex: 1; color: var(--text); }
.poging-tijd { font-size: .7rem; color: var(--text-muted); white-space: nowrap; }

/* ─── Status Badges ──────────────────────────────────────────────────────────*/
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.badge-new        { background: #eff6ff; color: #1d4ed8; }
.badge-progress   { background: #fef3c7; color: #92400e; }
.badge-confirmed  { background: #dcfce7; color: #166534; }
.badge-planned    { background: #f0fdf4; color: #15803d; }
.badge-done       { background: #f1f5f9; color: #475569; }
.badge-cancelled  { background: #fee2e2; color: #991b1b; }
.badge-default    { background: var(--bg); color: var(--text-muted); }
.badge-accepted   { background: var(--success-bg); color: var(--success); }
.badge-refused    { background: var(--danger-bg); color: var(--danger); }
.badge-sent       { background: var(--info-bg); color: var(--info); }
.badge-expired    { background: #f1f5f9; color: #64748b; }
.badge-waiting    { background: #f8fafc; color: #94a3b8; }
.badge-uitgevraagd { background: #eff6ff; color: #1d4ed8; }
.badge-keuze      { background: #fef3c7; color: #92400e; }
.badge-gekozen    { background: #dcfce7; color: #166534; }

/* ─── Inbox ──────────────────────────────────────────────────────────────────*/
.inbox-sectie { margin-bottom: 28px; }
.inbox-sectie-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius);
  margin-bottom: 10px;
  font-size: .8125rem;
  font-weight: 600;
}
.inbox-sectie-count {
  padding: 1px 8px;
  border-radius: 10px;
  font-size: .72rem;
  font-weight: 700;
}
.afspraak-rij {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
  margin-bottom: 6px;
}
.afspraak-rij:hover {
  box-shadow: var(--shadow);
  border-color: var(--gold);
  transform: translateY(-1px);
}
.afspraak-rij.urgent { border-left: 3px solid var(--danger); }
.afspraak-rij.vandaag { border-left: 3px solid var(--success); }
.afspraak-tijd-badge {
  min-width: 56px;
  text-align: center;
  padding: 6px 8px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.afspraak-tijd-badge .tijd { font-size: .9rem; font-weight: 700; color: var(--navy); }
.afspraak-tijd-badge .dag { font-size: .6rem; font-weight: 600; text-transform: uppercase; }
.afspraak-naam { font-size: .9375rem; font-weight: 600; color: var(--navy); }
.afspraak-adres { font-size: .8rem; color: var(--text-muted); margin-top: 1px; }
.afspraak-diensten { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.dienst-chip {
  background: var(--gold-pale);
  color: #7c5a1a;
  font-size: .68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}
.actie-label {
  margin-left: auto;
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.actie-label.rood { background: var(--danger-bg); color: var(--danger); }
.actie-label.oranje { background: var(--warning-bg); color: var(--warning); }
.actie-label.blauw { background: var(--info-bg); color: var(--info); }
.actie-label.groen { background: var(--success-bg); color: var(--success); }

/* ─── Stats Grid (nieuwe inbox) ─────────────────────────────────────────────*/
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stat-card.stat-urgent { border-left: 3px solid var(--danger); }
.stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-card { display: flex; align-items: center; gap: 14px; }
.stat-card .stat-value { font-size: 1.75rem; }

/* ─── Inbox lijst ────────────────────────────────────────────────────────────*/
.inbox-lijst { display: flex; flex-direction: column; gap: 6px; }

/* ─── Empty state varianten ──────────────────────────────────────────────────*/
.empty-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  color: var(--text-muted);
}
.empty-titel { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.empty-sub { font-size: .875rem; color: var(--text-muted); }

/* ─── Button extra sizes ─────────────────────────────────────────────────────*/
.btn-xs { padding: 4px 10px; font-size: .75rem; }

/* ─── Stats Bar ──────────────────────────────────────────────────────────────*/
.stats-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.stat-card.gold-accent { border-left: 3px solid var(--gold); }
.stat-card.navy-accent { border-left: 3px solid var(--navy); }
.stat-card.danger-accent { border-left: 3px solid var(--danger); }
.stat-card.success-accent { border-left: 3px solid var(--success); }

/* ─── Buttons ────────────────────────────────────────────────────────────────*/
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  white-space: nowrap;
  font-family: inherit;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-light); box-shadow: var(--shadow-sm); }
.btn-gold { background: var(--gold); color: var(--navy-dark); }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline { background: transparent; color: var(--navy); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--navy); background: var(--bg); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: #15803d; }
.btn-info { background: var(--info); color: var(--white); }
.btn-info:hover { background: #1d4ed8; }
.btn-sm { padding: 6px 12px; font-size: .8125rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn-icon { padding: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ─── Forms ──────────────────────────────────────────────────────────────────*/
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: .01em;
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
.form-control.ai-filled { background: #fffbeb; border-color: #fbbf24; }
.form-control.missing { border-color: var(--danger); background: #fff5f5; }
.form-hint { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }
.form-hint.error { color: var(--danger); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 20px; }
select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7a99' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
textarea.form-control { resize: vertical; min-height: 80px; }

/* ─── AI Panel ───────────────────────────────────────────────────────────────*/
.ai-panel {
  background: linear-gradient(135deg, #fffbeb 0%, #fef9ee 100%);
  border: 1px solid #fbbf24;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}
.ai-panel-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ai-panel-icon {
  width: 32px; height: 32px;
  background: var(--gold);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy-dark);
}
.ai-panel-title { font-size: .9375rem; font-weight: 600; color: #92400e; }
.ai-panel-sub { font-size: .8rem; color: #b45309; }
.ai-confidence { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: #92400e; }
.confidence-bar { flex: 1; height: 6px; background: rgba(0,0,0,.1); border-radius: 3px; overflow: hidden; }
.confidence-fill { height: 100%; background: var(--gold); border-radius: 3px; transition: width .5s ease; }
.missing-fields {
  background: var(--danger-bg);
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 12px;
}
.missing-fields-title { font-size: .8rem; font-weight: 600; color: var(--danger); margin-bottom: 4px; }
.missing-list { font-size: .8rem; color: #991b1b; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.missing-list li::before { content: '⚠ '; }

/* ─── Tables ─────────────────────────────────────────────────────────────────*/
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; background: var(--bg-card); }
thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 13px 16px;
  font-size: .875rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafbfd; }

/* ─── Alerts ─────────────────────────────────────────────────────────────────*/
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.alert-success { background: var(--success-bg); color: #166534; border: 1px solid #bbf7d0; }
.alert-error   { background: var(--danger-bg);  color: #991b1b; border: 1px solid #fca5a5; }
.alert-warning { background: var(--warning-bg); color: #92400e; border: 1px solid #fde68a; }
.alert-info    { background: var(--info-bg);    color: #1e40af; border: 1px solid #bfdbfe; }

/* ─── Modals ─────────────────────────────────────────────────────────────────*/
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17,28,51,.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.96) translateY(8px);
  transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 600; color: var(--navy); }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px; border-radius: 4px;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ─── Tabs ───────────────────────────────────────────────────────────────────*/
.tabs {
  display: flex;
  gap: 2px;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 24px;
}
.tab {
  flex: 1;
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  background: transparent;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  text-align: center;
  text-decoration: none;
  font-family: inherit;
}
.tab.active { background: var(--white); color: var(--navy); font-weight: 600; box-shadow: var(--shadow-sm); }

/* ─── Klanten ────────────────────────────────────────────────────────────────*/
.klant-kaart {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
  margin-bottom: 8px;
}
.klant-kaart:hover { box-shadow: var(--shadow); border-color: var(--gold); transform: translateY(-1px); }
.klant-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; font-weight: 700;
  flex-shrink: 0;
}
.klant-naam { font-size: .9375rem; font-weight: 600; color: var(--navy); }
.klant-meta { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
.klant-stats { margin-left: auto; text-align: right; flex-shrink: 0; }
.klant-afspraken-count { font-size: 1.1rem; font-weight: 700; color: var(--navy); }
.klant-afspraken-label { font-size: .7rem; color: var(--text-muted); }

/* ─── Login Page ─────────────────────────────────────────────────────────────*/
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, #1e3a5f 100%);
  padding: 24px;
}
.login-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 44px;
  width: 100%;
  max-width: 420px;
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo-icon {
  width: 60px; height: 60px;
  background: var(--navy);
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.login-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; font-weight: 600;
  color: var(--navy); text-align: center; margin-bottom: 4px;
}
.login-sub { font-size: .875rem; color: var(--text-muted); text-align: center; margin-bottom: 28px; }

/* ─── Transcript Box ─────────────────────────────────────────────────────────*/
.transcript-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-size: .8125rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-family: 'Inter', monospace;
}

/* ─── Checkbox Chips ─────────────────────────────────────────────────────────*/
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  font-size: .8125rem;
  font-weight: 500;
  transition: border-color var(--transition), background var(--transition);
  user-select: none;
}
.checkbox-chip input { display: none; }
.checkbox-chip.checked { border-color: var(--gold); background: var(--gold-pale); color: #7c5a1a; }

/* ─── Vendor Response Page (public) ─────────────────────────────────────────*/
.response-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.response-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 480px;
  text-align: center;
}
.response-card .brand { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.response-card .ref { font-size: .8rem; color: var(--gold); font-weight: 600; letter-spacing: .05em; margin-bottom: 24px; }
.response-details { background: #f8fafc; border-radius: var(--radius); padding: 16px; text-align: left; margin-bottom: 24px; }
.response-detail-row { display: flex; justify-content: space-between; font-size: .875rem; padding: 5px 0; border-bottom: 1px solid var(--border); }
.response-detail-row:last-child { border-bottom: none; }
.response-detail-label { color: var(--text-muted); font-weight: 500; }
.response-detail-value { color: var(--navy); font-weight: 600; }
.response-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn-ja { background: var(--success); color: var(--white); padding: 14px; font-size: 1rem; border-radius: var(--radius); }
.btn-nee { background: var(--danger); color: var(--white); padding: 14px; font-size: 1rem; border-radius: var(--radius); }
.btn-ja:hover { background: #15803d; }
.btn-nee:hover { background: #b91c1c; }

/* ─── Spinner ────────────────────────────────────────────────────────────────*/
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Empty State ────────────────────────────────────────────────────────────*/
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: .4; }
.empty-state-title { font-size: 1rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.empty-state-text { font-size: .875rem; }

/* ─── Utilities ──────────────────────────────────────────────────────────────*/
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--gold); }
.text-navy { color: var(--navy); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── Responsive ─────────────────────────────────────────────────────────────*/
@media (max-width: 1200px) {
  .stats-bar { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .form-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .main-content { margin-left: 0; }
  .page-header, .page-body { padding-left: 16px; padding-right: 16px; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr; }
}

/* ─── Mobile Header (hamburger) ─────────────────────────────────────────────*/
.mobile-header {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--navy);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.hamburger {
  background: none; border: none; color: white; cursor: pointer;
  padding: 6px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.hamburger:hover { background: rgba(255,255,255,.1); }
.mobile-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 600; color: var(--white); flex: 1;
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 299;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.open { display: block; }

@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .mobile-header { display: flex !important; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 400 !important; width: 280px;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { z-index: 399 !important; }
  .main-content { margin-left: 0; padding-top: 56px; }
  .page-header {
    padding: 16px 16px 0;
    flex-direction: column; align-items: flex-start; gap: 12px;
  }
  .page-header > div:last-child { width: 100%; flex-wrap: wrap; }
  .page-body { padding: 16px 16px 64px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .afspraak-rij { flex-wrap: wrap; gap: 10px; }
  .flow-steps { flex-direction: column; gap: 8px; padding: 12px 16px; }
  .flow-step::after { display: none; }
  .modal { max-height: 92vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 480px) {
  .page-title { font-size: 1.3rem; }
  .btn { font-size: .8rem; padding: 8px 14px; }
  .btn-sm { font-size: .75rem; padding: 5px 10px; }
}
