/* ===================================================
   ChipReaders.nl - Main Stylesheet
   =================================================== */

:root {
  --primary:        #059669;
  --primary-dark:   #047857;
  --primary-darker: #064e3b;
  --primary-light:  #d1fae5;
  --accent:         #f59e0b;
  --accent-dark:    #d97706;
  --text:           #111827;
  --text-muted:     #6b7280;
  --border:         #e5e7eb;
  --bg:             #f9fafb;
  --white:          #ffffff;
  --danger:         #ef4444;
  --warning:        #f59e0b;
  --info:           #3b82f6;
  --success:        #10b981;
  --radius:         .75rem;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow:         0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -1px rgba(0,0,0,.04);
  --shadow-lg:      0 10px 25px -5px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* Typography */
.fw-500 { font-weight: 500 !important; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.text-white-75 { color: rgba(255,255,255,.75) !important; }
.font-monospace { font-family: 'Courier New', monospace !important; }
.chip-code { font-family: 'Courier New', monospace; background: #f3f4f6; padding: 2px 8px; border-radius: 4px; font-size: .85em; letter-spacing: .05em; color: var(--primary-dark); }

/* Navbar */
.bg-primary-dark { background: var(--primary-darker) !important; }

.main-navbar {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 60%, #047857 100%);
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding-top: .6rem;
  padding-bottom: .6rem;
  /* overflow visible zodat dropdowns niet worden geclipt */
  overflow: visible !important;
}
/* Sticky-top maakt een nieuwe stacking context — dropdown moet daarboven uitkomen */
.main-navbar.sticky-top { overflow: visible !important; }
.main-navbar .navbar-collapse,
.main-navbar .container,
.main-navbar .navbar-nav { overflow: visible !important; }

.navbar-brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
}

.text-accent { color: var(--accent) !important; }

/* Nav pill links */
.nav-pill {
  font-size: .875rem;
  font-weight: 500;
  color: rgba(255,255,255,.78) !important;
  padding: .35rem .85rem !important;
  border-radius: 6px;
  transition: background .18s, color .18s;
  position: relative;
}
.nav-pill:hover {
  background: rgba(255,255,255,.1);
  color: #fff !important;
}
.nav-pill.active {
  background: rgba(255,255,255,.15);
  color: #fff !important;
  font-weight: 600;
}

/* Underline-streepje alleen voor gewone links, NIET voor dropdown-toggles
   (dropdown-toggle gebruikt ::after voor de caret — dat mogen we niet overschrijven) */
.nav-pill:not(.dropdown-toggle).active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* Dropdown-toggle caret — Bootstrap's ::after correct stylen */
.nav-pill.dropdown-toggle::after {
  display: inline-block;
  margin-left: .4rem;
  vertical-align: .2em;
  content: '';
  border-top: .32em solid;
  border-right: .32em solid transparent;
  border-bottom: 0;
  border-left: .32em solid transparent;
  opacity: .75;
  /* Zorg dat position:absolute van de active-state hier NIET geldt */
  position: static !important;
  transform: none !important;
  background: transparent !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  left: auto !important;
}
.nav-pill.dropdown-toggle.show::after { opacity: 1; }

/* Admin badge */
.nav-pill-admin {
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent) !important;
  background: rgba(245,158,11,.12);
  padding: .3rem .75rem !important;
  border-radius: 6px;
  border: 1px solid rgba(245,158,11,.3);
  transition: background .18s;
}
.nav-pill-admin:hover {
  background: rgba(245,158,11,.22);
  color: var(--accent) !important;
}

/* User nav item */
.nav-user {
  font-size: .875rem;
  font-weight: 500;
  color: rgba(255,255,255,.85) !important;
  padding: .3rem .5rem !important;
  border-radius: 8px;
  transition: background .18s;
}
.nav-user:hover { background: rgba(255,255,255,.1); color: #fff !important; }

/* Navbar dropdown open state */
.nav-pill.dropdown-toggle.show { background: rgba(255,255,255,.15); color: #fff !important; }

.navbar-dropdown {
  border: none;
  border-radius: 14px;
  box-shadow: 0 16px 48px -8px rgba(0,0,0,.28), 0 4px 12px rgba(0,0,0,.12);
  padding: .5rem;
  margin-top: .5rem !important;
  min-width: 220px;
  background: #fff;
  /* Zorg dat dropdown altijd boven navbar uitkomt */
  z-index: 1035 !important;
  position: absolute !important;
}
.navbar-dropdown .dropdown-header {
  font-size: .63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #9ca3af;
  padding: .5rem .75rem .3rem;
}
.navbar-dropdown .dropdown-item {
  border-radius: 9px;
  padding: .55rem .75rem;
  font-size: .875rem;
  font-weight: 500;
  color: #344256;
  transition: background .12s;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.navbar-dropdown .dropdown-item:hover {
  background: #f0fdf4;
  color: #065f46;
}
.navbar-dropdown .dropdown-item i {
  font-size: 1rem;
  width: 1.15rem;
  text-align: center;
  flex-shrink: 0;
  opacity: .7;
}
.navbar-dropdown .dropdown-item:hover i { opacity: 1; }
.navbar-dropdown .dropdown-item .badge { margin-left: auto; }
.navbar-dropdown hr { margin: .35rem .5rem; border-color: #f1f5f9; }

/* Accent items in dropdown */
.dropdown-item-accent { color: #059669 !important; }
.dropdown-item-accent:hover { background: #d1fae5 !important; }
.dropdown-item-danger { color: #dc2626 !important; }
.dropdown-item-danger:hover { background: #fee2e2 !important; }

/* Zorg dat alle nav-dropdowns klikbaar zijn (fix pointer-events) */
.main-navbar .dropdown-menu.show { pointer-events: all !important; }

/* CTA button */
.btn-nav-cta {
  font-size: .85rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: .4rem 1.1rem;
  border-radius: 7px;
  transition: background .18s, transform .1s;
  white-space: nowrap;
}
.btn-nav-cta:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
}

/* Dropdown */
.dropdown-menu {
  border-radius: 10px;
  min-width: 200px;
  padding: .5rem 0;
}
.dropdown-item {
  font-size: .875rem;
  padding: .45rem 1rem;
  border-radius: 6px;
  margin: 1px .4rem;
  width: auto;
}
.dropdown-item:hover { background: #f0fdf4; }

.avatar-sm {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 1.5px solid rgba(255,255,255,.3);
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .75rem;
  flex-shrink: 0;
}

.avatar-lg {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.3rem;
  flex-shrink: 0;
}

/* Buttons */
.btn-accent {
  background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600;
  transition: all .2s;
}
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }

.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

/* Hero */
.hero-section {
  background: linear-gradient(135deg, var(--primary-darker) 0%, var(--primary-dark) 50%, var(--primary) 100%);
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-bg { display: none; }
.min-vh-hero { min-height: 85vh; }

.hero-badge {
  display: inline-flex; align-items: center;
  background: rgba(255,255,255,.15); color: rgba(255,255,255,.9);
  padding: .35rem 1rem; border-radius: 50px;
  font-size: .85rem; font-weight: 500;
  border: 1px solid rgba(255,255,255,.2);
}
.hero-search-card .tab-content {
  min-height: 54px;
}

.hero-divider {
  border-top: 1px solid rgba(255,255,255,.15);
}

.hero-action-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .1rem;
  padding: .75rem .5rem;
  border-radius: .75rem;
  text-decoration: none;
  text-align: center;
  transition: transform .15s, box-shadow .15s;
  font-weight: 600;
  line-height: 1.2;
}
.hero-action-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.25); }

.hero-action-vermist {
  background: #16a34a;
  color: #fff;
  border: 2px solid #15803d;
}
.hero-action-vermist:hover { background: #15803d; color: #fff; }

.hero-action-gezien {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 2px solid rgba(255,255,255,.3);
}
.hero-action-gezien:hover { background: rgba(255,255,255,.25); color: #fff; }

.hero-action-btn i { font-size: 1.25rem; margin-bottom: .15rem; }
.hero-action-label { font-size: .9rem; font-weight: 700; }
.hero-action-sub { font-size: .75rem; opacity: .8; font-weight: 400; }

.hero-action-gratis {
  display: inline-block;
  background: #fff;
  color: #16a34a;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .04em;
  padding: .1em .45em;
  border-radius: 3px;
  margin-top: .1rem;
  text-transform: uppercase;
}

.hero-search-card {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 1rem;
  padding: 1.5rem;
}
.hero-tabs .nav-link {
  color: rgba(255,255,255,.7);
  border-radius: 50px;
  padding: .4rem 1rem;
  font-weight: 500;
}
.hero-tabs .nav-link.active {
  background: rgba(255,255,255,.2);
  color: white;
}

.hero-illustration { width: 100%; max-width: 400px; }
.hero-svg { width: 100%; height: auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,.2)); }

/* Stats */
.stats-section { background: white; border-top: none; border-bottom: 1px solid var(--border); }
.stat-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: transform .2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-icon { font-size: 1.5rem; margin-bottom: .5rem; color: var(--primary); }
.stat-number { font-size: 1.8rem; font-weight: 700; color: var(--text); line-height: 1; }
.stat-label { color: var(--text-muted); font-size: .85rem; margin-top: .25rem; }

/* Section */
.section-label {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: .25rem .75rem; border-radius: 50px;
  font-size: .8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: .75rem;
}
.section-title { font-size: 2rem; font-weight: 700; color: var(--text); }

/* How it works */
.how-card {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all .3s;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.how-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.how-step {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem;
}
.how-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
}

/* Role cards */
.role-card {
  border-radius: var(--radius);
  padding: 2.5rem;
  border: 1px solid var(--border);
  transition: all .3s;
}
.role-card-bezitter { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); border-color: #bfdbfe; }
.role-card-reader   { background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); border-color: #bbf7d0; }
.role-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.role-icon { font-size: 3rem; margin-bottom: 1rem; display: block; }
.role-features { list-style: none; padding: 0; margin: 1rem 0 0; }
.role-features li { padding: .35rem 0; font-size: .95rem; }

/* Chipreader card */
.chipreader-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all .3s;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.chipreader-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary); }

.cr-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex-shrink: 0;
}
.cr-avatar-lg {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; flex-shrink: 0;
}
.cr-avatar-xl {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; flex-shrink: 0;
}

/* CTA */
.cta-section {
  background: linear-gradient(135deg, var(--primary-darker), var(--primary));
}

/* Footer */
.footer {
  background: var(--primary-darker);
  color: rgba(255,255,255,.85);
  margin-top: auto;
}
.footer-heading { color: rgba(255,255,255,.5); text-transform: uppercase; font-size: .75rem; letter-spacing: .08em; margin-bottom: .75rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: rgba(255,255,255,.7); text-decoration: none; font-size: .9rem; transition: color .2s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.25rem 0; }
.text-footer-muted { color: rgba(255,255,255,.45); }
.footer-social {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 1rem; transition: all .2s;
}
.footer-social:hover { background: var(--accent); color: white; }

/* Auth pages */
.auth-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 2rem 0;
  background: linear-gradient(135deg, var(--primary-darker) 0%, var(--primary) 100%);
}
.auth-card {
  background: white;
  border-radius: 1.25rem;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

/* Role selector */
.role-select-btn {
  display: block;
  padding: 1.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: var(--bg);
}
.btn-check:checked + .role-select-btn {
  border-color: var(--primary);
  background: var(--primary-light);
}
.role-select-btn:hover { border-color: var(--primary); }
.role-emoji { font-size: 2rem; margin-bottom: .5rem; display: block; }
.role-name { font-weight: 600; font-size: 1rem; }
.role-desc { display: block; margin-top: .25rem; }

/* Dashboard */
.dashboard-page { background: var(--bg); min-height: calc(100vh - 64px); }
.dashboard-welcome {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius);
  padding: 1.75rem;
  color: white;
}
.dashboard-welcome .text-muted { color: rgba(255,255,255,.7) !important; }
.dashboard-welcome .badge { font-size: .8rem; }

.dash-stat-card {
  display: block;
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all .2s;
  color: var(--text);
  text-decoration: none;
}
.dash-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--text); text-decoration: none; }
.dash-stat-card i { font-size: 1.75rem; margin-bottom: .5rem; display: block; }
.dash-stat-num { font-size: 1.6rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.dash-stat-lbl { color: var(--text-muted); font-size: .8rem; margin-top: .25rem; }

.dash-action-card {
  display: flex; align-items: center; gap: 1rem;
  background: white;
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: all .2s;
}
.dash-action-card:hover { border-color: var(--primary); color: var(--primary); transform: translateX(4px); }
.dash-action-icon {
  width: 44px; height: 44px; border-radius: .5rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex-shrink: 0;
}
.bg-primary-light { background: #eff6ff; }
.bg-success-light { background: #f0fdf4; }
.bg-warning-light { background: #fffbeb; }
.bg-info-light    { background: #eff6ff; }
.bg-danger-light  { background: #fef2f2; }

/* Page headers */
.page-header { border-bottom: 1px solid var(--border); }
.bg-gradient-primary { background: linear-gradient(135deg, var(--primary-darker), var(--primary)) !important; }
.bg-gradient-success { background: linear-gradient(135deg, #064e3b, #059669) !important; }

/* Chip search result */
.chip-result-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 2px solid var(--primary);
}
.chip-result-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.chip-result-icon { font-size: 3rem; }
.chip-result-body { padding: 1.5rem; }
.result-field { padding: .5rem; background: var(--bg); border-radius: .5rem; }
.owner-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem; background: var(--bg);
  border-radius: var(--radius); border: 1px solid var(--border);
}
.owner-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}

/* Map */
.map-layout {
  display: flex;
  height: calc(100vh - 64px);
}
.map-sidebar {
  width: 320px;
  flex-shrink: 0;
  background: white;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.reader-list { overflow-y: auto; flex: 1; }
.reader-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
}
.reader-item:hover { background: var(--bg); }
.reader-item-icon { font-size: 1.25rem; flex-shrink: 0; }
.map-container { flex: 1; position: relative; }
.map-no-key {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
@media (max-width: 767px) {
  .map-layout { flex-direction: column; height: auto; }
  .map-sidebar { width: 100%; height: 250px; border-right: none; border-bottom: 1px solid var(--border); }
  .map-container { height: 400px; }
}

/* Animal cards */
.animal-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all .2s;
}
.animal-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.animal-card-vermist { border-color: var(--warning); }
.animal-card-header {
  padding: 1.25rem;
  display: flex; align-items: center; gap: 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.animal-icon { font-size: 2.25rem; flex-shrink: 0; }
.animal-card-body { padding: 1rem 1.25rem; }
.animal-card-footer {
  padding: .75rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: flex; gap: .5rem; flex-wrap: wrap;
}
.chip-display {
  background: var(--bg); border-radius: .5rem;
  padding: .5rem .75rem;
  display: flex; align-items: center;
}
.chip-display code { font-size: .95rem; }

/* Empty states */
.empty-state {
  text-align: center;
  padding: 3rem;
}
.empty-icon { font-size: 3.5rem; margin-bottom: 1rem; display: block; }

/* Payment */
.payment-summary {
  background: var(--primary-light);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.payment-price { font-size: 1.75rem; font-weight: 700; color: var(--primary-dark); }

/* ===================================================
   ADMIN PANEL — Light SaaS dashboard (v2)
   =================================================== */
:root {
  --a-bg:        #f6f8fa;   /* canvas */
  --a-surface:   #ffffff;   /* cards, sidebar, topbar */
  --a-border:    #e9edf2;   /* hairline borders */
  --a-border-2:  #eef1f5;   /* lighter dividers */
  --a-ink:       #0f1f2e;   /* headings */
  --a-text:      #344256;   /* body text */
  --a-muted:     #8a97a8;   /* secondary text */
  --a-soft:      #f3f6f9;   /* hover / zebra */
  --a-radius:    16px;
  --a-radius-sm: 11px;
  --a-shadow:    0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.03);
  --a-shadow-md: 0 10px 30px -12px rgba(16,24,40,.18);
  --a-ring:      0 0 0 4px rgba(5,150,105,.12);
}

.admin-body {
  height: 100vh; overflow: hidden; display: block;
  background: var(--a-bg);
  color: var(--a-text);
  font-feature-settings: "cv02","cv03","cv04","cv11";
  -webkit-font-smoothing: antialiased;
}
.admin-layout { display: flex; height: 100vh; }

/* ---------- Sidebar (light) ---------- */
.admin-sidebar {
  width: 264px; flex-shrink: 0; height: 100vh;
  background: var(--a-surface);
  border-right: 1px solid var(--a-border);
  display: flex; flex-direction: column; overflow: hidden;
}
.admin-brand {
  display: flex; align-items: center; gap: .7rem;
  padding: 1.25rem 1.35rem 1.1rem;
}
.admin-brand-logo {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px -4px rgba(5,150,105,.5);
}
.admin-brand-logo img { filter: brightness(0) invert(1); }
.admin-brand-text { font-weight: 700; font-size: 1.02rem; line-height: 1; letter-spacing: -.02em; color: var(--a-ink); display: flex; flex-direction: column; }
.admin-brand-text small { font-weight: 600; font-size: .6rem; color: var(--a-muted); letter-spacing: .14em; text-transform: uppercase; margin-top: 5px; }

.admin-nav { flex: 1; overflow-y: auto; padding: .35rem .8rem 1rem; }
.admin-nav::-webkit-scrollbar { width: 5px; }
.admin-nav::-webkit-scrollbar-thumb { background: #dfe5ec; border-radius: 3px; }
.admin-nav-section {
  color: var(--a-muted); font-size: .64rem; text-transform: uppercase;
  letter-spacing: .13em; padding: 1.15rem .7rem .4rem; font-weight: 700;
}
.admin-nav-link {
  display: flex; align-items: center; gap: .72rem;
  padding: .56rem .7rem; color: var(--a-text);
  text-decoration: none; font-size: .9rem; font-weight: 500;
  border-radius: 10px; margin-bottom: 2px; position: relative;
  transition: background .15s, color .15s;
}
.admin-nav-link i { font-size: 1.08rem; width: 1.3rem; text-align: center; flex-shrink: 0; color: var(--a-muted); transition: color .15s; }
.admin-nav-link:hover { background: var(--a-soft); color: var(--a-ink); }
.admin-nav-link:hover i { color: var(--a-text); }
.admin-nav-link.active { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.admin-nav-link.active i { color: var(--primary); }
.admin-nav-link.active::before {
  content: ""; position: absolute; left: -.8rem; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--primary);
}
.admin-nav-link .badge { margin-left: auto; font-size: .66rem; padding: .25em .5em; }
.admin-nav-sub { font-size: .82rem; padding: .44rem .7rem .44rem 1rem; color: var(--a-muted); margin-bottom: 3px; }
.admin-nav-sub i { font-size: .82rem; }
.admin-nav-sub:hover { color: var(--a-ink); background: var(--a-soft); }

/* Sidebar user footer */
.admin-user {
  border-top: 1px solid var(--a-border); padding: .8rem .9rem;
  display: flex; align-items: center; gap: .65rem;
}
.admin-user .avatar-sm {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none; width: 36px; height: 36px; font-size: .85rem;
}
.admin-user-info { min-width: 0; flex: 1; }
.admin-user-name { color: var(--a-ink); font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-user-role { color: var(--a-muted); font-size: .72rem; }
.admin-user-logout {
  color: var(--a-muted); font-size: 1rem; line-height: 1; transition: all .15s;
  width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
}
.admin-user-logout:hover { color: var(--danger); background: #fef2f2; }

/* ---------- Main / Topbar ---------- */
.admin-main { flex: 1; height: 100vh; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
/* Modals moeten buiten de overflow: hidden van admin-main kunnen renderen */
.admin-main .modal { overflow-y: auto; }
.admin-main .modal-dialog-scrollable .modal-body { max-height: calc(100vh - 220px); overflow-y: auto; }
.admin-header {
  background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(8px);
  padding: 1rem 2rem; border-bottom: 1px solid var(--a-border);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-shrink: 0; min-height: 68px;
}
.admin-header h4 { font-size: 1.22rem; margin: 0; font-weight: 700; color: var(--a-ink); letter-spacing: -.02em; }
.admin-header .text-muted { font-size: .82rem; color: var(--a-muted) !important; }
.admin-head-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-head-actions { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.admin-crumb { font-size: .74rem; color: var(--a-muted); font-weight: 600; letter-spacing: .02em; display: flex; align-items: center; gap: .4rem; }
.admin-crumb a { color: var(--a-muted); text-decoration: none; }
.admin-crumb a:hover { color: var(--primary); }
.admin-content { padding: 2rem; overflow-y: auto; flex: 1; }
.admin-content::-webkit-scrollbar { width: 10px; }
.admin-content::-webkit-scrollbar-thumb { background: #dfe5ec; border-radius: 5px; border: 3px solid var(--a-bg); }

/* ---------- Stat tiles ---------- */
.admin-stat-card {
  background: var(--a-surface); border-radius: var(--a-radius);
  padding: 1.35rem 1.45rem; border: 1px solid var(--a-border);
  box-shadow: var(--a-shadow); height: 100%;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.admin-stat-card:hover { transform: translateY(-3px); box-shadow: var(--a-shadow-md); border-color: #dfe6ee; }
.admin-stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 1rem;
}
.admin-stat-num { font-size: 1.95rem; font-weight: 800; line-height: 1; margin-bottom: .35rem; color: var(--a-ink); letter-spacing: -.03em; }
.admin-stat-lbl { color: var(--a-muted); font-size: .82rem; font-weight: 600; }
.admin-stat-sub { font-size: .76rem; margin-top: .55rem; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: .25rem; }

/* Stat icon tints */
.bg-primary-light { background: var(--primary-light) !important; }
.bg-warning-light { background: #fff3da !important; }
.bg-success-light { background: #d7f5e3 !important; }
.bg-info-light    { background: #dbeafe !important; }
.bg-danger-light  { background: #fee2e2 !important; }
.text-info  { color: #2563eb !important; }

/* ---------- Cards inside admin ---------- */
.admin-content .card {
  border: 1px solid var(--a-border) !important;
  border-radius: var(--a-radius) !important;
  box-shadow: var(--a-shadow) !important;
  background: var(--a-surface);
}
.admin-content .card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--a-border-2) !important;
  padding: 1.1rem 1.35rem; font-weight: 600;
}
.admin-content .card-header h5,
.admin-content .card-header h6 { color: var(--a-ink); letter-spacing: -.01em; }
.admin-content .card-body { padding: 1.35rem; }
.admin-content .card-footer { background: transparent !important; border-top: 1px solid var(--a-border-2); padding: .9rem 1.35rem; }

/* Section title (above content blocks) */
.a-section-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--a-muted); margin: 0 0 .85rem; }

/* ---------- Tables ---------- */
.admin-content .table { margin: 0; color: var(--a-text); }
.admin-content .table thead th {
  background: var(--a-soft); color: var(--a-muted);
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--a-border) !important; border-top: none;
  padding: .8rem 1.1rem; white-space: nowrap;
}
.admin-content .table tbody td { padding: .85rem 1.1rem; border-color: var(--a-border-2); vertical-align: middle; }
.admin-content .table tbody tr:last-child td { border-bottom: none; }
.admin-content .table-hover tbody tr { transition: background .12s; }
.admin-content .table-hover tbody tr:hover { background: var(--a-soft); }
.admin-content .table > :not(caption) > * > * { box-shadow: none !important; }

/* ---------- Buttons ---------- */
.admin-content .btn,
.admin-head-actions .btn {
  border-radius: 10px; font-weight: 600; font-size: .875rem;
  padding: .5rem .95rem; transition: all .15s; border-width: 1px;
}
.admin-content .btn-sm, .admin-head-actions .btn-sm { padding: .38rem .7rem; font-size: .8rem; border-radius: 9px; }
.admin-content .btn-lg { padding: .7rem 1.2rem; font-size: .95rem; border-radius: 12px; }
.admin-content .btn-primary, .admin-head-actions .btn-primary {
  background: var(--primary); border-color: var(--primary);
  box-shadow: 0 4px 12px -3px rgba(5,150,105,.45);
}
.admin-content .btn-primary:hover, .admin-head-actions .btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); }
.admin-content .btn-outline-primary { color: var(--primary); border-color: #cdeede; }
.admin-content .btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }
.admin-content .btn-outline-secondary { color: var(--a-text); border-color: var(--a-border); background: #fff; }
.admin-content .btn-outline-secondary:hover { background: var(--a-soft); color: var(--a-ink); border-color: #d7dde5; }
.admin-content .btn-light { background: var(--a-soft); border-color: var(--a-border); color: var(--a-text); }

/* Icon button (square, for row actions) */
.a-iconbtn {
  width: 34px; height: 34px; padding: 0 !important;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px !important; font-size: .95rem;
}

/* ---------- Badges ---------- */
.admin-content .badge {
  font-weight: 600; font-size: .72rem; padding: .4em .7em;
  border-radius: 7px; letter-spacing: .01em;
}

/* ---------- Forms ---------- */
.admin-content .form-label { font-weight: 600; font-size: .85rem; color: var(--a-ink); margin-bottom: .4rem; }
.admin-content .form-control,
.admin-content .form-select {
  border-radius: 10px; border-color: var(--a-border); font-size: .9rem;
  padding: .55rem .85rem; color: var(--a-ink); background-color: #fff;
}
.admin-content .form-control-sm, .admin-content .form-select-sm { border-radius: 9px; padding: .42rem .7rem; font-size: .85rem; }
.admin-content .form-control:focus,
.admin-content .form-select:focus { border-color: var(--primary); box-shadow: var(--a-ring); }
.admin-content .form-text { color: var(--a-muted); font-size: .8rem; }
.admin-content .input-group-text { background: var(--a-soft); border-color: var(--a-border); border-radius: 10px; color: var(--a-muted); }

/* Filter bar */
.a-filterbar { background: var(--a-surface); border: 1px solid var(--a-border); border-radius: var(--a-radius); box-shadow: var(--a-shadow); padding: .85rem 1.1rem; margin-bottom: 1.4rem; }

/* Segmented filter (status pills) */
.a-segment { display: inline-flex; background: var(--a-soft); border: 1px solid var(--a-border); border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.a-segment a {
  padding: .38rem .8rem; border-radius: 8px; font-size: .82rem; font-weight: 600;
  color: var(--a-muted); text-decoration: none; transition: all .12s; white-space: nowrap;
}
.a-segment a:hover { color: var(--a-ink); }
.a-segment a.active { background: var(--a-surface); color: var(--primary-dark); box-shadow: var(--a-shadow); }

/* ---------- Modals ---------- */
.admin-content ~ .modal .modal-content,
.modal .modal-content { border: none; border-radius: var(--a-radius); box-shadow: 0 24px 60px -12px rgba(16,24,40,.35); }
.modal .modal-header, .modal .modal-footer { border-color: var(--a-border-2); padding: 1.1rem 1.35rem; }
.modal .modal-body { padding: 1.35rem; }
.modal .modal-title { font-weight: 700; color: var(--a-ink); }

/* Avatar inside admin tables/lists */
.admin-content .avatar-sm,
.admin-stat-card .avatar-sm {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none; color: #fff;
}

/* Empty state */
.a-empty { text-align: center; padding: 3rem 1rem; color: var(--a-muted); }
.a-empty-icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--a-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.8rem; color: var(--a-muted); margin-bottom: .9rem;
}
.a-empty-title { font-weight: 700; color: var(--a-text); font-size: 1rem; margin-bottom: .25rem; }

/* List rows (dashboard panels) */
.a-listrow { display: flex; align-items: center; gap: .85rem; padding: .8rem 1.35rem; border-bottom: 1px solid var(--a-border-2); transition: background .12s; }
.a-listrow:last-child { border-bottom: none; }
.a-listrow:hover { background: var(--a-soft); }

.min-w-0 { min-width: 0 !important; }

/* Mobile topbar + backdrop (hidden on desktop) */
.admin-mobile-bar { display: none; }
.admin-backdrop { display: none; }

/* Misc badges / colors */
.border-primary { border-color: var(--primary) !important; }
.border-success { border-color: var(--success) !important; }
.border-warning { border-color: var(--warning) !important; }
.border-info    { border-color: var(--info) !important; }
.border-danger  { border-color: var(--danger) !important; }

.bg-primary { background-color: var(--primary) !important; }
.text-primary { color: var(--primary) !important; }
.btn-success { background-color: var(--success) !important; border-color: var(--success) !important; }

/* Password strength */
.pw-bar { background: #e5e7eb; height: 4px; border-radius: 2px; margin-bottom: 4px; }

/* Breadcrumbs */
.breadcrumb { font-size: .875rem; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* Tables */
.table th { font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); }
.table td { vertical-align: middle; }

/* Cards */
.card { border-radius: var(--radius) !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Externe databases */
.extern-db-card {
  display: flex;
  align-items: center;
  gap: .55rem;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: .5rem;
  padding: .5rem .7rem;
  font-size: .88rem;
}
.extern-db-card.found {
  background: #f0fdf4;
  border-color: #86efac;
}
.extern-db-card.not-found {
  background: transparent;
  border-color: transparent;
  padding: .25rem .4rem;
}
.db-flag { font-size: 1rem; flex-shrink: 0; line-height: 1; }
.db-flag-sm { font-size: .85rem; opacity: .6; }
.db-notfound-dot {
  color: #d1d5db;
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1;
}

/* NDG gevonden kaart */
.ndg-found-card {
  flex-direction: column;
  align-items: stretch;
  padding: 1.1rem 1.25rem;
  background: #f0fdf4;
  border: 2px solid #059669;
  border-radius: var(--radius);
}
.ndg-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .4rem .75rem;
}
.ndg-detail-item {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: .4rem;
  padding: .45rem .65rem;
  border: 1px solid #d1fae5;
}
.ndg-label {
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}
.ndg-value {
  font-size: .92rem;
  color: var(--text);
  margin-top: .1rem;
}

/* ===================================================
   RESPONSIVE — Mobile First
   =================================================== */

/* Kaart — mobiel: sidebar bovenaan als accordeon, kaart eronder */
@media (max-width: 767px) {
  .map-layout {
    flex-direction: column;
    height: auto;
    min-height: 0;
  }
  .map-sidebar {
    width: 100%;
    height: auto;
    max-height: 220px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow-y: auto;
  }
  .sidebar-header { position: sticky; top: 0; z-index: 1; background: var(--bg); }
  .map-container {
    height: 60vw;
    min-height: 280px;
    max-height: 480px;
  }
}

/* ── Publieke navbar — mobiel ── */
@media (max-width: 991px) {
  /* Hamburger-menu achtergrond zelfde groen als navbar */
  .main-navbar .navbar-collapse.show,
  .main-navbar .navbar-collapse.collapsing {
    background: linear-gradient(180deg, #064e3b 0%, #065f46 100%);
    border-radius: 0 0 16px 16px;
    padding: .5rem .75rem 1rem;
    margin: .5rem -12px 0;
    box-shadow: 0 12px 32px rgba(0,0,0,.25);
  }
  /* Dropdowns in mobiele menu: inline, donker */
  .main-navbar .navbar-dropdown {
    position: static !important;
    width: 100%;
    margin-top: .25rem !important;
    box-shadow: none !important;
    background: rgba(0,0,0,.2) !important;
    border: 1px solid rgba(255,255,255,.1) !important;
  }
  .main-navbar .navbar-dropdown .dropdown-item {
    color: rgba(255,255,255,.85) !important;
    border-radius: 8px;
  }
  .main-navbar .navbar-dropdown .dropdown-item:hover {
    background: rgba(255,255,255,.12) !important;
    color: #fff !important;
  }
  .main-navbar .navbar-dropdown .dropdown-header { color: rgba(255,255,255,.45) !important; }
  .main-navbar .navbar-dropdown hr { border-color: rgba(255,255,255,.12) !important; }
  .main-navbar .navbar-dropdown .dropdown-item i { opacity: .75; }
  /* Logo beter zichtbaar op mobiel */
  .main-navbar .navbar-brand-text { font-size: 1.1rem; }
}

/* Admin panel — off-canvas drawer op mobiel */
@media (max-width: 991px) {
  .admin-body { overflow: auto; }
  .admin-layout { display: block; height: auto; }

  .admin-mobile-bar {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    position: sticky; top: 0; z-index: 1040;
    background: var(--a-surface);
    padding: .6rem 1rem;
    border-bottom: 1px solid var(--a-border);
  }
  .admin-mobile-bar .fw-700 { color: var(--a-ink); }
  .admin-burger {
    border: 1px solid var(--a-border); background: #fff;
    width: 40px; height: 40px; border-radius: 10px;
    font-size: 1.3rem; line-height: 1; color: var(--a-ink);
    display: flex; align-items: center; justify-content: center;
  }

  .admin-sidebar {
    position: fixed; top: 0; left: 0; z-index: 1050;
    height: 100vh; width: 264px;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 0 24px 60px -12px rgba(16,24,40,.35);
  }
  .admin-sidebar.open { transform: translateX(0); }

  .admin-backdrop {
    position: fixed; inset: 0; z-index: 1045;
    background: rgba(15,31,46,.45);
    opacity: 0; visibility: hidden; transition: opacity .25s;
  }
  .admin-backdrop.show { display: block; opacity: 1; visibility: visible; }

  .admin-main { height: auto; overflow: visible; }
  .admin-header { padding: .9rem 1.1rem; min-height: 0; position: static; backdrop-filter: none; }
  .admin-header h4 { font-size: 1.08rem; }
  .admin-content { padding: 1.1rem; overflow: visible; }
}

/* Hero */
@media (max-width: 767px) {
  .min-vh-hero { min-height: auto; padding: 2.5rem 0 2rem; }
  .hero-section .display-4 { font-size: 1.75rem; }
  .hero-search-card { padding: 1rem; }
  .hero-badge { font-size: .78rem; }
}

/* Auth kaarten */
@media (max-width: 575px) {
  .auth-page { padding: 1rem 0; align-items: flex-start; }
  .auth-card { padding: 1.5rem 1.25rem; border-radius: 1rem; }
  .section-title { font-size: 1.4rem; }
}

/* Dashboard */
@media (max-width: 575px) {
  .dashboard-welcome { padding: 1.25rem; }
  .dashboard-welcome .avatar-lg { width: 40px; height: 40px; font-size: 1.1rem; }
  .dashboard-welcome h2 { font-size: 1.2rem; }
  .dash-action-card { padding: .9rem 1rem; }
  .dash-action-icon { width: 38px; height: 38px; font-size: 1.1rem; }
}

/* Dier-kaarten — 1 kolom op mobiel */
@media (max-width: 575px) {
  .animal-card-header { padding: 1rem; }
  .animal-icon { font-size: 1.75rem; }
  .animal-card-footer .btn { font-size: .8rem; padding: .3rem .6rem; }
}

/* Externe databases — volledige breedte op mobiel */
@media (max-width: 575px) {
  .ndg-details-grid { grid-template-columns: 1fr 1fr; }
  .ndg-found-card { padding: .9rem 1rem; }
}

/* Tabel scroll op mobiel */
@media (max-width: 767px) {
  .table-responsive { font-size: .82rem; }
  .table th, .table td { padding: .5rem .6rem; }
  .chip-code { font-size: .78rem; }
}

/* Navbar — compacter op mobiel */
@media (max-width: 575px) {
  .navbar-brand .fw-700 { font-size: 1.1rem; }
  .navbar-brand img { height: 28px; }
}

/* Chip search — result card */
@media (max-width: 575px) {
  .chip-result-header { padding: 1rem; }
  .chip-result-icon { font-size: 2.25rem; }
  .chip-result-body { padding: 1rem; }
}

/* Role-selector knoppen */
@media (max-width: 400px) {
  .role-select-btn { padding: .9rem .5rem; }
  .role-emoji { font-size: 1.5rem; }
  .role-name { font-size: .85rem; }
}

/* CTA section */
@media (max-width: 575px) {
  .cta-section .display-4 { font-size: 1.5rem; }
  .cta-section .btn { width: 100%; }
}

/* Page headers op mobiel */
@media (max-width: 575px) {
  .page-header { padding: 1rem 0 !important; }
  .page-header h1 { font-size: 1.3rem; }
}

/* Footer compacter */
@media (max-width: 767px) {
  .footer { font-size: .88rem; }
}

/* Algmeen: knoppen vol-breed op kleine schermen */
@media (max-width: 400px) {
  .btn-lg { font-size: .95rem; padding: .6rem 1.2rem; }
}

/* Touch-vriendelijke tap targets */
@media (pointer: coarse) {
  .nav-link { padding-top: .6rem; padding-bottom: .6rem; }
  .dropdown-item { padding: .6rem 1rem; }
  .reader-item { padding: 1rem 1.25rem; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; }
}

/* Prevent horizontal scroll */
@media (max-width: 575px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
  .row.g-4 { --bs-gutter-x: .75rem; }
}

/* Zoekresultaten — sectie-labels */
.db-section-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 0 .3rem;
  border-top: 1px solid var(--border);
  margin-bottom: .5rem;
  font-size: .88rem;
}
.db-section-label:first-child { border-top: none; padding-top: 0; }
.db-section-icon { font-size: 1rem; line-height: 1; }

/* Registratie formulier secties */
.reg-section {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  overflow: hidden;
}
.reg-section-title {
  display: flex;
  align-items: center;
  padding: .85rem 1.25rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: .95rem;
}
.reg-step {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
  margin-right: .6rem; flex-shrink: 0;
}
.reg-section-body { padding: 1.25rem; }

/* Foto upload dropzone */
.foto-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all .2s;
  cursor: pointer;
}
.foto-upload-area:hover, .foto-upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* NDG-stijl grid voor dierdetail */
.ndg-style-grid { border: 1px solid var(--border); border-radius: .5rem; overflow: hidden; }
.ndg-style-row {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.ndg-style-row:last-child { border-bottom: none; }
.ndg-key {
  width: 45%; flex-shrink: 0;
  padding: .55rem .85rem;
  background: #f0f4f8;
  font-size: .82rem;
  font-weight: 600;
  color: #1e5799;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
}
.ndg-val {
  padding: .55rem .85rem;
  font-size: .88rem;
  color: var(--text);
  display: flex;
  align-items: center;
  flex: 1;
}

/* Chip highlight */
.chip-highlight {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--primary-light);
  border: 2px solid var(--primary);
  border-radius: .5rem;
  padding: .85rem 1rem;
}
.chip-highlight-label { font-size: .8rem; font-weight: 600; color: var(--primary-dark); flex-shrink: 0; }
.chip-highlight-code { font-family: 'Courier New', monospace; font-size: 1.1rem; font-weight: 700; color: var(--primary-darker); letter-spacing: .06em; }

/* Dier foto banner */
.dier-foto-banner { overflow: hidden; max-height: 280px; border-radius: var(--radius) var(--radius) 0 0; }
.dier-foto-img { width: 100%; object-fit: cover; max-height: 280px; display: block; }

@media (max-width: 575px) {
  .ndg-key { width: 50%; font-size: .78rem; padding: .45rem .65rem; }
  .ndg-val { font-size: .82rem; padding: .45rem .65rem; }
  .chip-highlight { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .chip-highlight-code { font-size: .95rem; }
}

/* Credits pakket kaarten */
.pakket-card-new {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  padding: 0 0 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  height: 100%;
  overflow: hidden;
  position: relative;
}
.pakket-card-new:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(5,150,105,.15); }
.pakket-best { border-color: var(--primary); box-shadow: 0 4px 20px rgba(5,150,105,.2); }
input[type=radio].pakket-radio:checked + label .pakket-card-new,
.pakket-card-new.selected { border-color: var(--primary); background: #f0fdf4; box-shadow: 0 6px 24px rgba(5,150,105,.2); }

.pakket-top-badge { background: var(--primary); color: #fff; font-size: .73rem; font-weight: 700; padding: 5px 12px; letter-spacing: .02em; }
.pakket-credits { font-size: 3rem; font-weight: 800; color: var(--text); line-height: 1; margin: 18px 0 2px; }
.pakket-credits-label { font-size: .78rem; color: var(--text-muted); margin-bottom: 14px; }
.pakket-prijs { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.pakket-per { font-size: .78rem; color: var(--text-muted); margin-bottom: 10px; }
.pakket-label-badge { display: inline-block; background: #f3f4f6; color: #6b7280; font-size: .72rem; font-weight: 600; padding: 3px 10px; border-radius: 20px; margin-top: 4px; }

/* ── Global mobile table fix: any .table not already in .table-responsive scrolls horizontally ── */
@media (max-width: 767px) {
  .table:not(.table-responsive .table) {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* Prevent forms from overflowing on small screens */
  input, select, textarea { max-width: 100%; }
  /* Registration form address row */
  .reg-section-body .row > [class*="col-"] { margin-bottom: 4px; }
}

/* ── Live chat widget (rechtsonder) ────────────────────────────────────── */
.cr-chat-bubble {
  position: fixed; right: 22px; bottom: 22px; z-index: 1080;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; cursor: pointer; box-shadow: 0 10px 30px -8px rgba(5,150,105,.55);
  transition: transform .15s ease, background .15s ease;
}
.cr-chat-bubble:hover { transform: scale(1.06); background: var(--primary-dark); }
.cr-chat-bubble.is-open { background: var(--text); }
.cr-chat-badge {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 5px;
  background: var(--danger); color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
}

.cr-chat-panel {
  position: fixed; right: 22px; bottom: 94px; z-index: 1080;
  width: 360px; max-width: calc(100vw - 32px);
  height: 500px; max-height: calc(100dvh - 140px);
  background: #fff; border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 60px -12px rgba(16,24,40,.35);
  border: 1px solid var(--border);
}
.cr-chat-head {
  background: var(--primary); color: #fff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.cr-chat-head-info { display: flex; align-items: center; gap: 10px; }
.cr-chat-head-info img { filter: brightness(0) invert(1); opacity: .95; }
.cr-chat-title { font-weight: 700; font-size: .92rem; line-height: 1.2; }
.cr-chat-sub { font-size: .72rem; opacity: .85; }
.cr-chat-close {
  background: rgba(255,255,255,.15); border: none; color: #fff; width: 30px; height: 30px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .85rem;
}
.cr-chat-close:hover { background: rgba(255,255,255,.28); }

.cr-chat-messages {
  flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px;
  background: var(--bg);
}
.cr-chat-welcome {
  background: var(--primary-light); color: var(--primary-darker); font-size: .82rem; line-height: 1.4;
  padding: 12px 14px; border-radius: 12px; display: flex; gap: 8px; align-items: flex-start;
}
.cr-chat-welcome i { flex-shrink: 0; margin-top: 1px; }

.cr-msg { max-width: 82%; font-size: .85rem; line-height: 1.4; padding: 9px 12px; border-radius: 14px; white-space: pre-wrap; word-break: break-word; }
.cr-msg-bezoeker { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.cr-msg-admin { align-self: flex-start; background: #fff; color: var(--text); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.cr-msg-systeem { align-self: center; background: transparent; color: var(--text-muted); font-size: .75rem; font-style: italic; }

.cr-chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid var(--border); background: #fff; flex-shrink: 0; }
.cr-chat-input {
  flex: 1; resize: none; border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px;
  font-size: .85rem; max-height: 90px; font-family: inherit;
}
.cr-chat-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.cr-chat-send {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; border: none;
  background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center;
}
.cr-chat-send:hover { background: var(--primary-dark); }
.cr-chat-send:disabled { opacity: .5; }

@media (max-width: 480px) {
  .cr-chat-panel { right: 12px; bottom: 84px; width: calc(100vw - 24px); }
  .cr-chat-bubble { right: 14px; bottom: 14px; }
}
