/* Reset & basis */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  display: flex;
  min-height: 100vh;
}

/* Topbalk */
.topbalk {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: #12122a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.topbalk-links {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.topbalk-rechts {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rol-label {
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
}

#rol-select {
  background: #1e1e3a;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.85rem;
  cursor: pointer;
}

.rol-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.rol-badge.admin       { background: #4f46e5; color: #fff; }
.rol-badge.medewerker-pro { background: #0891b2; color: #fff; }
.rol-badge.medewerker  { background: #6b7280; color: #fff; }

/* Zijbalk */
.sidebar {
  width: 220px;
  background: #1a1a2e;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 48px;
  left: 0;
  height: calc(100vh - 48px);
  padding: 0;
}

.sidebar-nav {
  list-style: none;
  padding: 12px 0;
}

.sidebar-nav-bottom {
  list-style: none;
  padding: 12px 0;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-nav li a {
  display: block;
  padding: 12px 20px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
  border-radius: 0 24px 24px 0;
  margin-right: 12px;
}

.sidebar-nav li a:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.sidebar-nav li a.active {
  background: #4f46e5;
  color: #fff;
}

/* Hoofdinhoud */
.main-content {
  margin-left: 220px;
  margin-top: 48px;
  flex: 1;
  padding: 36px;
}

/* Pagina's */
.page {
  display: none;
}

.page.active {
  display: block;
}

.page-header {
  margin-bottom: 28px;
}

#page-resultaten .page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.resultaten-header-rechts {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

#resultaten-telling,
#resultaten-prijzen,
.telling-blok {
  text-align: right;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: nowrap;
}

#resultaten-telling .telling-totaal,
.telling-blok .telling-totaal {
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 2px;
}

#resultaten-telling .telling-platform,
.telling-blok .telling-platform {
  color: #6b7280;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

#resultaten-telling .telling-platform span:last-child,
.telling-blok .telling-platform span:last-child {
  font-weight: 600;
  color: #1a1a2e;
}

#resultaten-prijzen .prijs-label {
  color: #6b7280;
}

#resultaten-prijzen .prijs-waarde {
  font-weight: 600;
  color: #1a1a2e;
  margin-left: 6px;
}

.page-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a1a2e;
}

.page-header p {
  color: #6b7280;
  margin-top: 4px;
}

/* Kaartjes */
.hm-groep-knop {
  padding: 28px 48px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a2e;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.hm-groep-knop:hover {
  border-color: #4f46e5;
  box-shadow: 0 6px 18px rgba(79,70,229,0.12);
  transform: translateY(-2px);
}

/* Cascade knoppen snellabel-modal */
.sl-cascade-btn {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a1a2e;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.sl-cascade-btn:hover {
  border-color: #4f46e5;
}

.sl-cascade-btn.sl-cascade-active {
  background: var(--cascade-kleur-bg, #10b981);
  border-color: var(--cascade-kleur-border, #10b981);
  color: var(--cascade-kleur-text, #fff);
}

.sl-cascade-btn.sl-cascade-active:hover {
  background: var(--cascade-kleur-bg, #059669);
  border-color: var(--cascade-kleur-border, #059669);
  color: var(--cascade-kleur-text, #fff);
}

.sl-cascade-btn.sl-cascade-inactive {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #9ca3af;
}

.sl-cascade-btn.sl-cascade-inactive:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
  color: #6b7280;
}

.pl-filter-btn {
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 2px solid #e5e7eb;
  border-radius: 20px;
  background: #f3f4f6;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pl-filter-btn:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
}
.pl-filter-btn.pl-filter-actief {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.home-groep {
  margin-bottom: 36px;
}

.home-groep-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-bottom: 12px;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.card.clickable {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.card.clickable:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.card h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.card p {
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.5;
}

/* Formulier */
.tool-form {
  max-width: 960px;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fafafa;
  transition: border-color 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #4f46e5;
  background: #fff;
}

.form-group textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 10px;
}

/* Knoppen */
.btn {
  padding: 10px 22px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.85;
}

.btn-primary {
  background: #4f46e5;
  color: #fff;
}

.btn-secondary {
  background: #6b7280;
  color: #fff;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}

.kassa-numpad-btn {
  font-size: 1.4rem;
  font-weight: 600;
  padding: 12px 0;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.kassa-numpad-btn:active {
  background: #d1d5db;
}

.prijslabel-keuze-btn {
  font-size: 1.1rem;
  padding: 10px 20px;
  min-width: 90px;
}
.prijslabel-keuze-btn.active {
  background: #4f46e5;
  outline: 3px solid #818cf8;
}
.prijslabel-keuze-btn.aanbevolen {
  background: #0f766e;
}
.prijslabel-keuze-btn.aanbevolen.active {
  background: #4f46e5;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 0.8rem;
}

.hidden {
  display: none !important;
}

/* Status balk */
.status-bar {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: #1d4ed8;
}

/* Resultaten */
.results-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.result-item {
  background: #fff;
  border-radius: 10px;
  padding: 16px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  border-left: 4px solid #4f46e5;
}

.result-item .result-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.result-item .result-meta {
  font-size: 0.82rem;
  color: #6b7280;
}

.result-item.new {
  border-left-color: #10b981;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.empty-state {
  color: #9ca3af;
  font-size: 0.9rem;
  padding: 20px 0;
}

h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

/* Foutmelding */
.error-bar {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
  margin-top: 16px;
}

/* Boekkaart */
#ean-result {
  margin-top: 24px;
}

#ean-result h2 {
  margin-bottom: 12px;
}

.boek-kaart {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  max-width: 560px;
}

.boek-cover img {
  width: 90px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

#page-kringloop-resultaten .boek-kaart {
  align-items: stretch;
}

#page-kringloop-resultaten .boek-cover {
  display: flex;
  align-items: flex-start;
}

#page-kringloop-resultaten .boek-cover img {
  height: auto;
  width: auto;
  max-height: 200px;
  max-width: 160px;
}

.boek-info {
  flex: 1;
}

.boek-titel {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #1a1a2e;
}

.boek-rij {
  display: flex;
  gap: 10px;
  font-size: 0.9rem;
  margin-bottom: 6px;
  align-items: baseline;
}

.boek-label {
  font-weight: 600;
  color: #6b7280;
  min-width: 70px;
}

.boek-acties {
  margin-top: 16px;
}

/* Resultaten pagina */
.laden-rijen {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.laden-rij {
  height: 56px;
  background: linear-gradient(90deg, #f0f2f5 25%, #e4e7ec 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  border-radius: 10px;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.resultaat-kaart {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  overflow: hidden;
}

.resultaat-kaart-volledig {
  width: 100%;
}

.resultaat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid #f3f4f6;
  background: #f8f9fb;
}

.resultaat-site {
  font-weight: 700;
  font-size: 0.88rem;
  color: #1a1a2e;
}

.resultaat-aantal {
  font-size: 0.78rem;
  color: #6b7280;
}

.prijs-cel {
  font-weight: 600;
  color: #166534;
  white-space: nowrap;
}

.platform-cel {
  color: #6b7280;
  font-size: 0.78rem;
  white-space: nowrap;
}

.info-cel {
  max-width: 280px;
}

.staat-label {
  display: block;
  font-weight: 600;
  font-size: 0.80rem;
  color: #1a1a2e;
  margin-bottom: 2px;
}

.subtitel-onbekend {
  display: inline-block;
  margin-top: 3px;
  font-size: 0.75rem;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 4px;
  padding: 1px 6px;
}

.auteur-tekst {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 220px;
}

.auteur-tekst.info-tekst-open {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  max-width: none;
}

.info-tekst {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.4;
}

.info-tekst.info-tekst-open {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.btn-info-meer {
  background: none;
  border: none;
  color: #4f46e5;
  font-size: 0.72rem;
  cursor: pointer;
  padding: 0;
  margin-top: 2px;
}

.btn-info-meer:hover {
  text-decoration: underline;
}

.rij-eigen td {
  background: #f0fdf4;
}

.rij-leeg td {
  background: #f9fafb;
  color: #9ca3af;
  font-style: italic;
}

.btn-bekijk {
  display: inline-block;
  background: #4f46e5;
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 4px;
  white-space: nowrap;
}

.btn-bekijk:hover {
  opacity: 0.85;
}

/* Instellingen */
.inst-rij {
  display: flex;
  gap: 16px;
}

.inst-url-group {
  flex: 2;
}

.boeken-tabel td a {
  color: #4f46e5;
  text-decoration: none;
  font-size: 0.88rem;
  word-break: break-all;
}

.boeken-tabel td a:hover {
  text-decoration: underline;
}

.boeken-tabel td .btn-bekijk {
  color: #fff;
  font-size: 0.82rem;
  word-break: normal;
}

.boeken-tabel td .btn-bekijk:hover {
  text-decoration: none;
  opacity: 0.85;
}

/* Opslaan melding */
.opslaan-bar {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
  margin-top: 16px;
}

/* Lege staat */
.leeg-staat {
  color: #6b7280;
  font-size: 0.95rem;
}

.leeg-staat a {
  color: #4f46e5;
  text-decoration: none;
  font-weight: 600;
}

/* Boeken tabel */
.boeken-tabel {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.82rem;
}

.boeken-tabel thead {
  background: #f8f9fb;
}

.boeken-tabel th {
  text-align: left;
  padding: 6px 10px;
  font-weight: 600;
  color: #6b7280;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid #e5e7eb;
}

.th-sorteer {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.th-sorteer:hover {
  color: #4f46e5;
}

.boeken-tabel td {
  padding: 6px 10px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
  color: #1a1a2e;
}

.boeken-tabel tr:last-child td {
  border-bottom: none;
}

.boeken-tabel tr:hover td {
  background: #fafafa;
}

.tabel-cover img {
  width: 36px;
  height: auto;
  border-radius: 3px;
  display: block;
}

.tabel-acties {
  white-space: nowrap;
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-verwijder {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.btn-verwijder:hover {
  color: #ef4444;
  background: #fef2f2;
}

.btn-zoek {
  background: #10b981;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  transition: opacity 0.2s;
}

.btn-zoek:hover {
  opacity: 0.85;
}

.btn-bewerk {
  background: none;
  border: 1px solid #d1d5db;
  color: #374151;
  cursor: pointer;
  font-size: 0.82rem;
  padding: 3px 10px;
  border-radius: 4px;
  transition: background 0.2s;
}

.btn-bewerk:hover {
  background: #f3f4f6;
}

.btn-opslaan {
  background: #4f46e5;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 4px;
}

.btn-annuleer {
  background: none;
  border: 1px solid #d1d5db;
  color: #6b7280;
  cursor: pointer;
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 4px;
}

.tabel-input {
  width: 100%;
  padding: 4px 8px;
  border: 1px solid #4f46e5;
  border-radius: 4px;
  font-size: 0.88rem;
  background: #fafafe;
  min-width: 80px;
}

.tabel-input:focus {
  outline: none;
  background: #fff;
}

.tabel-input-cover {
  min-width: 120px;
  font-size: 0.75rem;
}

.datum-cel {
  white-space: nowrap;
  font-size: 0.85rem;
  color: #6b7280;
}

/* Sidebar groepslabels */
.nav-groep-label {
  padding: 16px 20px 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  list-style: none;
}

.nav-groep-label.groep-zoektool {
  color: #fb923c;
}

.nav-groep-label.groep-kringloop {
  color: #4ade80;
}

/* Rechten tabel */
.rechten-tabel th, .rechten-tabel td { text-align: center; }
.rechten-tabel td:first-child { text-align: left; }
.rechten-tabel .rechten-groep {
  background: #f3f4f6;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  text-align: left !important;
}
.rechten-admin { color: #4f46e5; }
.rechten-pro   { color: #0891b2; }
.rechten-med   { color: #6b7280; }

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e5e7eb;
}

.tab-btn {
  padding: 8px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.95rem;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.tab-btn:hover {
  color: #374151;
}

.tab-btn.active {
  color: #4f46e5;
  border-bottom-color: #4f46e5;
  font-weight: 600;
}

/* Kringloop melding */
.kringloop-melding {
  background: #f0fdf4;
  border: 2px solid #22c55e;
  color: #15803d;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 14px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}
#scangeschiedenis-tbody .kringloop-melding {
  font-size: 0.85rem;
  padding: 4px 8px;
  margin-bottom: 0;
}

.kleur-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  box-sizing: border-box;
  flex-shrink: 0;
}
.kleur-swatch.geselecteerd {
  outline: 2px solid #fff;
  box-shadow: 0 0 0 3px #6b7280;
}

/* Meer-knop in tabelcellen */
.btn-meer-titel {
  background: none;
  border: none;
  color: #6366f1;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
  white-space: nowrap;
}
.btn-meer-titel:hover { text-decoration: underline; }

/* Subcategorie blokken */
.subcat-blok {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
}
.subcat-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.subcat-nr {
  font-size: 0.75rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
  border-radius: 4px;
  padding: 1px 6px;
  font-family: monospace;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
}
.subcat-nr:hover {
  background: #cbd5e1;
  color: #1e293b;
}
.subcat-naam {
  font-weight: 600;
  font-size: 0.9rem;
  flex: 1;
  color: #1e293b;
}
.subcat-verwijder {
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0 2px;
}
.subcat-verwijder:hover { color: #ef4444; }

/* NUR tags (gekoppeld) */
.nur-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.nur-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #dbeafe;
  border: 1px solid #93c5fd;
  border-radius: 4px;
  padding: 2px 6px 2px 9px;
  font-size: 0.8rem;
  color: #1e40af;
}
.nur-tag button {
  background: none;
  border: none;
  cursor: pointer;
  color: #60a5fa;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
}
.nur-tag button:hover { color: #ef4444; }

/* NUR picker dropdown */
.nur-picker {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}
.nur-picker input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  margin-bottom: 6px;
  box-sizing: border-box;
}
.nur-lijst {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
}
.nur-optie {
  padding: 6px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  color: #374151;
  border-bottom: 1px solid #f1f5f9;
}
.nur-optie:last-child { border-bottom: none; }
.nur-optie:hover { background: #eff6ff; color: #1d4ed8; }

/* Prijslabel print */
#print-prijslabel,
#print-catlabel,
#print-ean-label {
  display: none;
}

@media print {
  @page {
    size: 50mm 25mm;
    margin: 0;
  }
  body > * {
    display: none !important;
  }

  /* ── Prijslabels (gedeeld) ── */
  #print-prijslabel {
    display: flex !important;
    flex-direction: row;
    position: fixed;
    top: 0;
    left: 0;
    width: 50mm;
    height: 25mm;
    align-items: stretch;
    padding: 1mm;
    box-sizing: border-box;
    gap: 1mm;
  }
  body.print-ean #print-prijslabel,
  body.print-catlabel #print-prijslabel {
    display: none !important;
  }
  #print-catlabel {
    display: none;
  }
  body.print-catlabel #print-catlabel {
    display: flex !important;
    flex-direction: row;
    position: fixed;
    top: 0;
    left: 0;
    width: 50mm;
    height: 25mm;
    align-items: stretch;
    padding: 1mm;
    box-sizing: border-box;
    gap: 1mm;
  }
  /* Hoofd kolom */
  #print-hoofd,
  #print-cat-hoofd {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
  }
  #print-top,
  #print-cat-top {
    display: flex;
    flex-direction: row;
    flex: 1;
    gap: 1mm;
    min-height: 0;
  }
  /* Links kolom (ID + QR) */
  #print-links,
  #print-cat-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 15mm;
    flex-shrink: 0;
  }
  #print-id,
  #print-cat-id {
    font-size: 2.8mm;
    font-family: Arial, sans-serif;
    color: #000;
    letter-spacing: 0;
    margin: 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    max-width: 15mm;
  }
  #print-barcode,
  #print-cat-barcode {
    width: 15mm;
    height: 15mm;
    flex-shrink: 0;
    margin-top: 0.5mm;
  }
  #print-barcode canvas,
  #print-barcode img,
  #print-cat-barcode canvas,
  #print-cat-barcode img {
    width: 15mm !important;
    height: 15mm !important;
  }
  /* Midden kolom (prijs + tekst) */
  #print-midden,
  #print-cat-midden {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    overflow: hidden;
    min-width: 0;
  }
  #print-prijs,
  #print-cat-prijs {
    font-size: 5mm;
    font-weight: 700;
    font-family: Arial, sans-serif;
    color: #000;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
  }
  #print-taal {
    font-size: 2.8mm;
    font-family: Arial, sans-serif;
    color: #000;
    margin-top: 0.5mm;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #print-taal:empty {
    display: none;
  }
  #print-cat-titel,
  #print-cat-naam {
    font-size: 3mm;
    font-weight: 700;
    font-family: Arial, sans-serif;
    color: #000;
    margin-top: auto;
    padding-bottom: 0.5mm;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #print-cat-titel:empty,
  #print-cat-naam:empty {
    display: none;
  }
  /* Rechts kolom (week + nr) */
  #print-rechts,
  #print-cat-rechts {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 1mm;
    padding-bottom: 0.5mm;
    width: 12mm;
    flex-shrink: 0;
  }
  #print-week,
  #print-cat-week {
    font-size: 3mm;
    font-weight: 400;
    font-family: Arial, sans-serif;
    color: #000;
  }
  #print-cat-nr,
  #print-cat-sub {
    font-size: 3mm;
    font-weight: 400;
    font-family: Arial, sans-serif;
    color: #000;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #print-cat-nr:empty,
  #print-cat-sub:empty {
    display: none;
  }

  /* ── EAN-label ── */
  body.print-ean #print-ean-label {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 50mm;
    height: 25mm;
    padding: 1mm 2mm;
    box-sizing: border-box;
  }
  #print-ean-barcode {
    width: 46mm;
    height: 17mm;
    flex-shrink: 0;
  }
  #print-ean-barcode svg {
    width: 100% !important;
    height: 100% !important;
  }
  #print-ean-tekst {
    font-size: 3mm;
    font-family: Arial, sans-serif;
    color: #000;
    letter-spacing: 0.5mm;
    margin-top: 0.5mm;
  }
}

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  min-width: 300px;
  max-width: 540px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

/* ── Virtueel toetsenbord ─────────────────────────────────────────── */
#vk-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
}
#vk-overlay.hidden { display: none; }

#vk-modal {
  width: 100%;
  background: #cdd1d8;
  padding: 8px 6px 12px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
}

#vk-display {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
  min-height: 46px;
}

#vk-tekst-wrapper {
  flex: 1;
  font-size: 1.1rem;
  font-family: monospace;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.vk-cursor {
  animation: vk-blink 1s step-end infinite;
  color: #2563eb;
  font-weight: 700;
}

@keyframes vk-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.vk-annuleer {
  background: none;
  border: none;
  color: #555;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 8px;
  white-space: nowrap;
}

.vk-rij {
  display: flex;
  gap: 5px;
  margin-bottom: 5px;
  justify-content: center;
}

.vk-toets {
  flex: 1;
  min-height: 48px;
  max-width: 48px;
  background: #fff;
  border: none;
  border-radius: 5px;
  font-size: 1.15rem;
  font-family: Arial, sans-serif;
  box-shadow: 0 1px 0 1px rgba(0,0,0,0.3);
  cursor: pointer;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.vk-toets:active { background: #b5bbc8; transform: scale(0.95); }

.vk-toets-spec {
  flex: 1.5;
  max-width: 70px;
  background: #adb5c4;
  font-size: 0.8rem;
}

.vk-spatie {
  flex: 5;
  max-width: 260px;
  background: #fff;
  font-size: 0.85rem;
}

.vk-klaar {
  flex: 2;
  max-width: 96px;
  background: #2563eb;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}
.vk-klaar:active { background: #1d4ed8; }

.vk-shift-actief { background: #fff; color: #2563eb; }

.vk-field-wrap {
  display: flex;
  gap: 6px;
  align-items: center;
}
.vk-field-wrap input { flex: 1; min-width: 0; }

.vk-trigger {
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}
.vk-trigger:active { background: #ddd; }

/* ─── Productgroep kleurswatches ───────────────────────────────────────────── */
.pg-kleur-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, outline 0.1s;
  flex-shrink: 0;
}
.pg-kleur-swatch:hover { transform: scale(1.15); }

/* ─── Cascade zoekbalk ─────────────────────────────────────────────────────── */
.cascade-zoek-wrapper {
  position: relative;
  margin-bottom: 14px;
}
.cascade-zoek-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px 8px 34px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.88rem;
  outline: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 11px center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cascade-zoek-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99,102,241,0.15);
}
.cascade-zoek-dropdown {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  z-index: 200;
  max-height: 260px;
  overflow-y: auto;
}
.cascade-zoek-item {
  padding: 9px 13px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid #f3f4f6;
}
.cascade-zoek-item:last-child { border-bottom: none; }
.cascade-zoek-item:hover, .cascade-zoek-item:focus { background: #f5f3ff; outline: none; }
.cascade-zoek-item-naam {
  font-weight: 600;
  font-size: 0.88rem;
  color: #1a1a2e;
}
.cascade-zoek-item-pad {
  font-size: 0.72rem;
  color: #9ca3af;
  letter-spacing: 0.01em;
}
.cascade-zoek-leeg {
  padding: 12px 14px;
  color: #9ca3af;
  font-size: 0.85rem;
  text-align: center;
}


/* ── Rapportages ── */

.rap-kpi-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px 20px;
  text-align: center;
}
.rap-kpi-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  margin-bottom: 6px;
}
.rap-kpi-omzet {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.1;
}
.rap-kpi-sub {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 4px;
}

.rap-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 20px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.rap-nav-btn:hover {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}
.rap-nav-icon { font-size: 1.4rem; margin-bottom: 4px; }
.rap-nav-titel { font-size: 1rem; font-weight: 600; color: #1a1a2e; }
.rap-nav-sub   { font-size: 0.8rem; color: #9ca3af; }

.rap-view {}
.rap-view-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.rap-view-header h2 {
  flex: 1;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
}
.rap-terug-btn { white-space: nowrap; }

.rap-tabel {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.rap-tabel th {
  background: #f8fafc;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  padding: 8px 10px;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}
.rap-tabel td {
  padding: 8px 10px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: top;
}
.rap-tabel tfoot td {
  font-weight: 700;
  background: #f8fafc;
  border-top: 2px solid #e5e7eb;
  border-bottom: none;
}
.rap-tabel tbody tr:hover td { background: #f9fafb; }

.rap-dag-tegel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 16px;
  text-align: center;
}
.rap-dag-tegel-label { font-size: 0.75rem; color: #9ca3af; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.rap-dag-tegel-waarde { font-size: 1.4rem; font-weight: 700; color: #1a1a2e; }

.rap-afsluiting-ok   { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.rap-afsluiting-fout { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

@media print {
  body.print-rapport main               { display: block !important; }
  body.print-rapport .sidebar,
  body.print-rapport nav                { display: none !important; }
  body.print-rapport .page-header,
  body.print-rapport .rap-view-header .btn,
  body.print-rapport .rap-terug-btn,
  body.print-rapport .rap-filters,
  body.print-rapport .rap-nav-btn       { display: none !important; }
  body.print-rapport .rap-print-gebied  { display: block !important; }
  body.print-rapport .page              { display: none !important; }
  body.print-rapport #page-rapportages  { display: block !important; }
  body.print-rapport .rap-view.hidden   { display: none !important; }
  body.print-rapport .rap-view:not(.hidden) { display: block !important; }
}


/* ── Kassabon ── */

.bon-wrap {
  width: 72mm;
  margin: 0 auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 10pt;
  color: #000;
  padding: 4mm 0;
}
.bon-winkelnaam {
  font-size: 13pt;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1mm;
}
.bon-adres {
  font-size: 9pt;
  text-align: center;
  color: #333;
}
.bon-dun    { font-size: 9pt; }
.bon-groot  { font-size: 12pt; font-weight: 700; }
.bon-lijn {
  border-top: 1px dashed #000;
  margin: 2mm 0;
}
.bon-totaalrij {
  display: flex;
  margin-bottom: 1mm;
}
.bon-item-rij {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5mm;
  font-size: 9.5pt;
}
.bon-item-naam {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding-right: 3mm;
}
.bon-item-prijs { white-space: nowrap; }
.bon-footer {
  text-align: center;
  font-size: 9pt;
  margin-top: 2mm;
  font-style: italic;
  white-space: pre-line;
}
.bon-openingstijden {
  text-align: left;
  font-size: 9pt;
  margin-top: 1mm;
  white-space: pre;
  font-family: monospace;
}
.bon-regel { margin-bottom: 1mm; }

#bon-voorbeeld-modal {
  align-items: flex-start;
  padding: 24px 0;
  overflow-y: auto;
}
#bon-voorbeeld-inhoud .bon-wrap {
  width: 100%;
  margin: 0;
  padding: 0;
}

@media print {
  body.print-bon #kassabon-template { display: block !important; }
}
