/* ===========================================================
 * Bezoekregistratie.nl – theme tokens
 * Pas hier je huisstijl aan. Alles is opgebouwd uit deze
 * variabelen, dus 1 wijziging hier kleurt het hele systeem mee.
 * =========================================================== */

:root {
  /* Brand - afgestemd op marketingsite (www.bezoekregistratie.nl) */
  --vh-primary:        #0e1f3a;   /* deep navy */
  --vh-primary-dark:   #060d1a;
  --vh-primary-light:  #1f3b6e;
  --vh-accent:         #00d4a3;   /* teal-groen */
  --vh-accent-dark:    #00b48a;

  /* Status */
  --vh-success:        #00b48a;
  --vh-warning:        #f59e0b;
  --vh-danger:         #dc2626;
  --vh-info:           #1f5da8;

  /* Surfaces */
  --vh-bg:             #f6f8fc;
  --vh-bg-dark:        #0e1f3a;
  --vh-surface:        #ffffff;
  --vh-surface-2:      #eef2f9;
  --vh-overlay:        rgba(14, 31, 58, 0.92);

  /* Text */
  --vh-text:           #0e1f3a;
  --vh-text-muted:     #5e6b85;
  --vh-text-on-primary:#ffffff;
  --vh-border:         #e3e8f1;

  /* Geometry */
  --vh-radius-sm:      8px;
  --vh-radius-md:      14px;
  --vh-radius-lg:      22px;
  --vh-shadow-sm:      0 1px 2px rgba(14, 31, 58, 0.06);
  --vh-shadow-md:      0 6px 18px rgba(14, 31, 58, 0.10);
  --vh-shadow-lg:      0 18px 40px rgba(14, 31, 58, 0.18);

  --vh-space-1: 4px;
  --vh-space-2: 8px;
  --vh-space-3: 12px;
  --vh-space-4: 16px;
  --vh-space-5: 24px;
  --vh-space-6: 32px;
  --vh-space-7: 48px;

  --vh-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
             "Helvetica Neue", Arial, sans-serif;
  --vh-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* ---------- Basics ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--vh-font);
  color: var(--vh-text);
  background: var(--vh-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--vh-primary); }

/* ---------- Buttons ---------- */
.vh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--vh-space-2);
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: var(--vh-radius-md);
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s ease, transform .05s ease, box-shadow .15s ease;
  background: var(--vh-surface);
  color: var(--vh-text);
  border-color: var(--vh-border);
  text-decoration: none;
  line-height: 1.2;
}
.vh-btn:hover { background: var(--vh-surface-2); }
.vh-btn:active { transform: translateY(1px); }
.vh-btn[disabled] { opacity: .55; cursor: not-allowed; }

.vh-btn--primary { background: var(--vh-primary); color: #fff; border-color: var(--vh-primary); }
.vh-btn--primary:hover { background: var(--vh-primary-dark); }
.vh-btn--accent  { background: var(--vh-accent); color: #fff; border-color: var(--vh-accent); }
.vh-btn--accent:hover { background: var(--vh-accent-dark); }
.vh-btn--ghost   { background: transparent; }
.vh-btn--danger  { background: var(--vh-danger); color: #fff; border-color: var(--vh-danger); }
.vh-btn--danger:hover { filter: brightness(0.92); }
.vh-btn--lg      { padding: 18px 22px; font-size: 19px; border-radius: var(--vh-radius-lg); }
.vh-btn--block   { width: 100%; }

/* ---------- Inputs ---------- */
.vh-input, .vh-select, .vh-textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--vh-text);
  background: var(--vh-surface);
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-radius-md);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.vh-input:focus, .vh-select:focus, .vh-textarea:focus {
  border-color: var(--vh-primary);
  box-shadow: 0 0 0 3px rgba(31, 93, 168, 0.15);
}
.vh-textarea { min-height: 110px; resize: vertical; }

.vh-label {
  display: block;
  font-weight: 600;
  color: var(--vh-text);
  margin: var(--vh-space-3) 0 var(--vh-space-1) 0;
  font-size: 14px;
}

/* ---------- Cards ---------- */
.vh-card {
  background: var(--vh-surface);
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-radius-lg);
  padding: var(--vh-space-5);
  box-shadow: var(--vh-shadow-md);
}

.vh-card--lg { padding: var(--vh-space-6); }

/* ---------- Tags ---------- */
.vh-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--vh-surface-2);
  color: var(--vh-text);
}
.vh-tag--primary { background: rgba(31, 93, 168, 0.12); color: var(--vh-primary-dark); }
.vh-tag--accent  { background: rgba(4, 143, 112, 0.14); color: var(--vh-accent-dark); }
.vh-tag--warn    { background: rgba(242, 168, 38, 0.18); color: #8a5a00; }
.vh-tag--danger  { background: rgba(215, 38, 61, 0.14); color: var(--vh-danger); }
.vh-tag--muted   { background: var(--vh-surface-2); color: var(--vh-text-muted); }

/* ---------- Layout ---------- */
.vh-shell {
  display: flex;
  min-height: 100%;
}
.vh-sidebar {
  width: 240px;
  background: var(--vh-bg-dark);
  color: #fff;
  padding: var(--vh-space-5) var(--vh-space-4);
  display: flex; flex-direction: column; gap: var(--vh-space-4);
  position: sticky; top: 0; height: 100vh;
}
.vh-sidebar__brand {
  font-size: 16px; font-weight: 800; letter-spacing: 0.01em;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: var(--vh-space-3);
  white-space: nowrap;
}
.vh-sidebar__brand .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--vh-accent); box-shadow: 0 0 0 4px rgba(0, 212, 163, 0.30);
  flex-shrink: 0;
}

/* Tenant-blok in de sidebar wordt vervangen door een topbar in de main.
   We laten het hier nog gedefinieerd maar verbergen het standaard zodat
   bestaande HTML niet stuk gaat. */
.vh-sidebar__tenant { display: none; }
.vh-sidebar__logout { display: none; }

/* Topbar rechtsboven in de main: tenant + email + uitloggen + groen accent */
.vh-topbar {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 14px;
  padding: 10px 16px;
  margin: 0 0 var(--vh-space-5) 0;
  background: linear-gradient(90deg, rgba(0,212,163,0.06) 0%, rgba(0,212,163,0.14) 100%);
  border: 1px solid rgba(0,212,163,0.25);
  border-left: 4px solid var(--vh-accent);
  border-radius: 10px;
}
.vh-topbar__info { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; min-width: 0; }
.vh-topbar__name {
  font-weight: 700; color: var(--vh-text); font-size: 14px;
  display: flex; align-items: center; gap: 8px;
}
.vh-topbar__name .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--vh-accent); box-shadow: 0 0 0 3px rgba(0,212,163,0.25);
  flex-shrink: 0;
}
.vh-topbar__email { font-size: 12px; color: var(--vh-text-muted); }

/* Proefperiode-badge in de topbar - subtiel maar zichtbaar (amber) */
.vh-topbar__trial {
  margin-right: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 5px 12px; border-radius: 999px;
  white-space: nowrap;
  line-height: 1.4;
}
.vh-topbar__trial::before {
  content: '★'; color: #d97706; font-size: 13px; line-height: 1;
}
.vh-topbar__trial strong { color: #78350f; font-weight: 700; }
.vh-topbar__trial-label { color: #92400e; }
.vh-topbar__trial-hint  { color: #b45309; font-size: 12px; opacity: 0.85; }
@media (max-width: 600px) {
  .vh-topbar__trial { font-size: 12px; padding: 4px 10px; gap: 4px; }
  .vh-topbar__trial-hint { display: none; }
}
.vh-topbar__logout {
  font-size: 13px; font-weight: 600;
  color: var(--vh-text); text-decoration: none;
  padding: 6px 12px; border-radius: 8px;
  background: #fff; border: 1px solid rgba(0,212,163,0.45);
  transition: background .15s, border-color .15s;
}
.vh-topbar__logout:hover {
  background: var(--vh-accent); color: #fff; border-color: var(--vh-accent);
}
@media (max-width: 600px) {
  .vh-topbar { flex-wrap: wrap; gap: 8px; padding: 10px; }
  .vh-topbar__info { align-items: flex-start; }
}

/* Nav-icon: consistente SVG-strokes in plaats van mixed emojis */
.vh-nav__icon {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; opacity: .85;
}
.vh-nav__icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Info-tooltip (i) bij section-heading of label */
.vh-info {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-left: 6px;
  border-radius: 50%; background: var(--vh-surface-2); color: var(--vh-text-muted);
  font-size: 11px; font-weight: 700; cursor: help; vertical-align: middle;
  position: relative;
  border: 1px solid var(--vh-border);
  font-style: normal; font-family: serif;
}
.vh-info:hover { background: var(--vh-primary); color: #fff; border-color: var(--vh-primary); }
.vh-info::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: #0e1f3a; color: #fff; padding: 8px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 400; line-height: 1.4;
  white-space: normal; width: 240px; text-align: left;
  opacity: 0; pointer-events: none; transition: opacity .12s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.20); z-index: 100;
}
.vh-info:hover::after { opacity: 1; }

/* Color picker: native swatch + hex tekstveld naast elkaar */
.vh-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.vh-color {
  width: 44px;
  height: 38px;
  padding: 2px;
  border: 1px solid var(--vh-border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  flex: 0 0 auto;
}
.vh-color::-webkit-color-swatch-wrapper { padding: 0; border-radius: 6px; }
.vh-color::-webkit-color-swatch { border: none; border-radius: 6px; }
.vh-color::-moz-color-swatch { border: none; border-radius: 6px; }
.vh-color-hex {
  flex: 1 1 auto;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0.5px;
}

/* Checkbox: native, opgeschaald + lichte focus-ring */
.vh-checkbox {
  width: 22px;
  height: 22px;
  margin: 8px 0 0 0;
  cursor: pointer;
  accent-color: var(--vh-primary);
  display: block;
}
.vh-checkbox:focus-visible {
  outline: 3px solid rgba(31, 93, 168, 0.30);
  outline-offset: 2px;
  border-radius: 4px;
}

.vh-nav { display: flex; flex-direction: column; gap: 4px; }
.vh-nav a {
  color: rgba(255,255,255,.78); text-decoration: none;
  padding: 10px 12px; border-radius: 12px;
  display: flex; gap: 10px; align-items: center;
  font-weight: 600;
}
.vh-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.vh-nav a.active { background: rgba(255,255,255,.10); color: #fff; }
.vh-nav__icon { width: 20px; opacity: .85; }
.vh-sidebar__footer {
  margin-top: auto; font-size: 12px; opacity: .55;
}

.vh-main {
  flex: 1;
  padding: var(--vh-space-6);
  max-width: 100%;
}
.vh-main h1 { font-size: 26px; margin: 0 0 var(--vh-space-4) 0; }
.vh-main h2 { font-size: 19px; margin: var(--vh-space-5) 0 var(--vh-space-3) 0; }

.vh-grid {
  display: grid;
  gap: var(--vh-space-4);
}
.vh-grid--kpi { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.vh-grid--two { grid-template-columns: 1fr 1fr; }

.vh-kpi {
  position: relative;
  background: linear-gradient(135deg, var(--vh-surface) 0%, #f6f9fd 100%);
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-radius-md);
  padding: 18px 20px 16px 20px;
  box-shadow: 0 2px 4px rgba(14,31,58,0.04);
  transition: transform .15s ease, box-shadow .15s ease;
  overflow: hidden;
}
.vh-kpi::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--vh-primary);
  border-top-left-radius: var(--vh-radius-md);
  border-bottom-left-radius: var(--vh-radius-md);
}
.vh-kpi:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(14,31,58,0.10);
}
.vh-kpi__label {
  font-size: 11px; color: var(--vh-text-muted); text-transform: uppercase;
  letter-spacing: .1em; font-weight: 700;
}
.vh-kpi__value {
  font-size: 38px; font-weight: 800; margin-top: 6px; line-height: 1;
  color: var(--vh-primary); letter-spacing: -0.02em;
}
.vh-kpi__hint  { font-size: 12px; color: var(--vh-text-muted); margin-top: 8px; }

/* Variant-kleuren per KPI-type — eerste 3 (totaal/in/uit) en daarna locaties */
.vh-kpi--total::before    { background: var(--vh-primary); }
.vh-kpi--total .vh-kpi__value { color: var(--vh-primary); }
.vh-kpi--in::before       { background: var(--vh-accent); }
.vh-kpi--in .vh-kpi__value    { color: var(--vh-accent); }
.vh-kpi--out::before      { background: #94a3b8; }
.vh-kpi--out .vh-kpi__value   { color: #475569; }
.vh-kpi--loc::before      { background: var(--vh-accent); }
.vh-kpi--loc .vh-kpi__value   { color: #06624f; }
.vh-kpi--loc {
  background: linear-gradient(135deg, #fff 0%, #ecfdf5 100%);
}
.vh-kpi--expected::before     { background: #f59e0b; }
.vh-kpi--expected .vh-kpi__value { color: #b45309; }
.vh-kpi--expected {
  background: linear-gradient(135deg, #fff 0%, #fffbeb 100%);
}

/* Dual-cell KPI: bezoekers binnen + verwacht vandaag in 1 kaart */
.vh-kpi--dual { padding-bottom: 18px; }
.vh-kpi__dual-row {
  display: flex; align-items: stretch; gap: 16px; margin-top: 8px;
}
.vh-kpi__dual-cell { flex: 1 1 0; min-width: 0; }
.vh-kpi__dual-cell .vh-kpi__value { font-size: 32px; }
.vh-kpi__dual-cell--expected .vh-kpi__value { color: #b45309; }
.vh-kpi__dual-sep {
  width: 1px; background: rgba(14,31,58,0.08);
}

/* Klikbare KPI-kaarten: cursor + sterker hover-effect */
.vh-kpi--clickable { cursor: pointer; user-select: none; }
.vh-kpi--clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(14,31,58,0.14);
}
.vh-kpi--clickable:focus-visible {
  outline: 2px solid var(--vh-primary);
  outline-offset: 2px;
}

/* ---------- Tables ---------- */
.vh-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--vh-surface); border-radius: var(--vh-radius-md);
  overflow: hidden; box-shadow: var(--vh-shadow-sm);
  border: 1px solid var(--vh-border);
}
.vh-table th, .vh-table td {
  text-align: left; padding: 12px 14px; font-size: 14px;
}
.vh-table thead th {
  background: var(--vh-surface-2); color: var(--vh-text-muted);
  font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: .08em;
}
.vh-table tbody tr + tr td { border-top: 1px solid var(--vh-border); }

/* ---------- Modal ---------- */
.vh-modal-bg {
  position: fixed; inset: 0; background: rgba(14, 31, 58, .55);
  display: none; align-items: center; justify-content: center; z-index: 1000;
  padding: var(--vh-space-4);
}
.vh-modal-bg.is-open { display: flex; }
.vh-modal {
  background: var(--vh-surface); border-radius: var(--