/* ═══════════════════════════════════════════════════════════
   BPM Point — Referentievoertuigen (premium scherm)
   ═══════════════════════════════════════════════════════════ */

body.page-referentie {
  background:
    radial-gradient(ellipse 880px 400px at 100% 0%, rgba(59, 130, 246, 0.12), transparent 55%),
    radial-gradient(ellipse 720px 360px at 0% 25%, rgba(20, 184, 166, 0.09), transparent 50%),
    radial-gradient(ellipse 560px 300px at 90% 100%, rgba(139, 92, 246, 0.07), transparent 48%),
    var(--gray-100);
}

.ref-page-wrap {
  max-width: 1180px;
  padding-bottom: 3rem;
}

/* ── Hero ─────────────────────────────────────────────────── */
.ref-hero {
  position: relative;
  margin: 0 0 1.5rem;
  padding: 1.65rem 1.5rem 1.85rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 45%, rgba(241, 245, 249, 0.93) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 22px 48px -22px rgba(15, 23, 42, 0.16),
    0 8px 20px -10px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

@supports (backdrop-filter: blur(12px)) {
  .ref-hero {
    backdrop-filter: blur(14px);
  }
}

.ref-hero__mesh {
  position: absolute;
  inset: -45% -25% auto -35%;
  height: 150%;
  background:
    radial-gradient(circle at 25% 35%, rgba(59, 130, 246, 0.1), transparent 45%),
    radial-gradient(circle at 78% 28%, rgba(20, 184, 166, 0.08), transparent 42%),
    radial-gradient(circle at 48% 85%, rgba(139, 92, 246, 0.06), transparent 40%);
  pointer-events: none;
}

.ref-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem 1.5rem;
}

.ref-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 0.45rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--blue);
}

.ref-eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.22);
}

.ref-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.6rem, 3.8vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--navy);
  line-height: 1.12;
}

.ref-sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--gray-600);
}

.ref-sub strong {
  color: var(--gray-900);
  font-weight: 600;
}

.ref-gaspedaal-note {
  margin: 8px 0 0;
  max-width: 40rem;
  font-size: 13px;
  line-height: 1.55;
  color: var(--gray-600);
}

.ref-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ref-hero__actions .btn {
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(26, 46, 74, 0.08);
}

.ref-hero__actions a.btn#btn-mo-apply-filters:not([hidden]) {
  background: #0d6efd;
  color: #fff;
  border: 1px solid #0a58ca;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.ref-hero__actions a.btn#btn-mo-apply-filters.ref-mo-apply-ready {
  animation: ref-mo-pulse 1.4s ease-in-out infinite;
}

@keyframes ref-mo-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(13, 110, 253, 0); }
}

.ref-hero__actions .btn-primary {
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

/* ── Statistieken ─────────────────────────────────────────── */
body.page-referentie .stat-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 1.35rem;
}

body.page-referentie .stat {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(165deg, #fff 0%, rgba(248, 250, 252, 0.96) 100%);
  padding: 1rem 1.1rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 28px -16px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

body.page-referentie .stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0ea5e9, #6366f1, #8b5cf6);
  opacity: 0.85;
}

body.page-referentie .stat .lbl {
  color: var(--gray-600);
  letter-spacing: 0.06em;
}

body.page-referentie .stat .val {
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  body.page-referentie .stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Filterbalk ───────────────────────────────────────────── */
body.page-referentie .ref-filterbar {
  border-radius: 16px;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(180deg, #fff 0%, rgba(248, 250, 252, 0.88) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 12px 32px -20px rgba(15, 23, 42, 0.12);
  gap: 12px 14px;
}

body.page-referentie .ref-filterbar select,
body.page-referentie .ref-filterbar input {
  height: 34px;
  border-radius: 10px;
  border-color: var(--gray-200);
  background: #fff;
  font-size: 13px;
}

body.page-referentie .ref-sep {
  color: var(--gray-200);
  opacity: 0.9;
}

/* ── Toevoegen-card ───────────────────────────────────────── */
body.page-referentie #add-form.card {
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(180deg, #fff 0%, rgba(248, 250, 252, 0.92) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 18px 40px -22px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}

body.page-referentie #add-form .card-title {
  font-size: 15px;
  letter-spacing: -0.02em;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 0.75rem;
}

body.page-referentie #add-form .field input,
body.page-referentie #add-form .field select {
  border-radius: 10px;
}

/* ── Grid & kaarten ───────────────────────────────────────── */
body.page-referentie .ref-grid {
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
}

body.page-referentie .ref-card {
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(180deg, #fff 0%, rgba(248, 250, 252, 0.55) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 16px 36px -22px rgba(15, 23, 42, 0.14);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
}

body.page-referentie .ref-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 22px 44px -20px rgba(37, 99, 235, 0.18);
  transform: translateY(-3px);
}

body.page-referentie .ref-img {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(241, 245, 249, 0.95) 0%, rgba(226, 232, 240, 0.55) 100%);
  font-size: 32px;
}

body.page-referentie .ref-img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

body.page-referentie .ref-img-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

body.page-referentie .ref-body {
  padding: 1rem 1.05rem 1.05rem;
}

body.page-referentie .ref-prijs {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--navy);
  font-weight: 800;
}

body.page-referentie .ref-rank,
body.page-referentie .ref-rank-only {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-400);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

body.page-referentie .ref-naam {
  font-size: 14px;
  line-height: 1.35;
  color: var(--gray-900);
}

body.page-referentie .ref-meta {
  font-size: 12px;
  line-height: 1.65;
}

body.page-referentie .ref-link {
  margin-top: 6px;
  padding: 4px 0;
  font-weight: 600;
  border-radius: 6px;
}

body.page-referentie .ref-actions .btn-sm {
  border-radius: 8px;
}

/* ── Lege staat ───────────────────────────────────────────── */
body.page-referentie .ref-grid > .empty {
  grid-column: 1 / -1;
  border-radius: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.65);
  background: rgba(255, 255, 255, 0.65);
  padding: 2.5rem 1.5rem;
}

body.page-referentie .ref-grid .empty-icon {
  font-size: 2.25rem;
  opacity: 0.85;
}

body.page-referentie .ref-grid .empty p {
  font-size: 14px;
  color: var(--gray-600);
  max-width: 28rem;
  margin: 0.5rem auto 0;
  line-height: 1.6;
}

/* ── Onderste knoppen ───────────────────────────────────── */
body.page-referentie .btn-row .btn {
  border-radius: 10px;
  font-weight: 600;
}

/* ── Automatisch ophalen (laden) ─────────────────────────── */
#btn-auto-gaspedaal.is-loading {
  opacity: 0.85;
  pointer-events: none;
}

.ref-grid--loading {
  position: relative;
  min-height: 120px;
  opacity: 0.55;
  pointer-events: none;
}

.ref-grid--loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--blue-600, #2563eb);
  border-radius: 50%;
  animation: ref-spin 0.75s linear infinite;
}

@keyframes ref-spin {
  to { transform: rotate(360deg); }
}

@media print {
  body.page-referentie {
    background: #fff !important;
    background-image: none !important;
  }

  body.page-referentie .navbar,
  body.page-referentie .ref-hero,
  body.page-referentie .ref-filterbar,
  body.page-referentie .stat-row,
  body.page-referentie #add-form,
  body.page-referentie #ref-grid,
  body.page-referentie .btn-row {
    display: none !important;
  }

  body.page-referentie .page-wrap {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.page-referentie .ref-print-wrap {
    display: block !important;
    padding: 12mm 14mm 10mm;
    color: #0f172a;
    font-size: 11pt;
    line-height: 1.45;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.page-referentie .ref-print-brand {
    margin: 0 0 4px;
    font-size: 9pt;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
  }

  body.page-referentie .ref-print-head h2 {
    margin: 0 0 10px;
    font-size: 18pt;
    color: #1a2e4a;
  }

  body.page-referentie .ref-print-head p {
    margin: 0 0 4px;
    font-size: 10pt;
    color: #475569;
  }

  body.page-referentie .ref-print-gp-label {
    margin-top: 10px !important;
    font-weight: 600;
    color: #334155;
  }

  body.page-referentie .ref-print-foot {
    margin-top: 16px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
    font-size: 8.5pt;
    color: #94a3b8;
  }

  body.page-referentie .ref-print-foot p {
    margin: 0;
  }
}

/* Scherm: print-bijlage verborgen (main.css .print-only) */
body.page-referentie .ref-print-wrap {
  display: none;
}
