/* ── Portaal layout ───────────────────────────────────────────────────────── */
:root {
  --gold: #C9A84C;
  --gold-dim: #a8893d;
  --bg-1: #10100f;
  --bg-2: #1a1a18;
  --surface: #222220;
  --line: #2e2e2b;
  --text: #f0ede6;
  --muted: #7a7870;
  --red: #c0392b;
  --green: #27ae60;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.portaal-page {
  background: var(--bg-1);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
}

/* ── Gate (niet ingelogd) ─────────────────────────────────────────────────── */
.portaal-gate {
  min-height: calc(100vh - 64px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
}
.portaal-gate__box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 36px;
  width: 100%; max-width: 420px;
  text-align: center;
}
.portaal-gate__box img { margin-bottom: 20px; }
.portaal-gate__box h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 28px; margin-bottom: 8px;
}
.portaal-gate__box p { margin-bottom: 20px; }
.gate-form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }

/* ── Portaal inner (ingelogd) ─────────────────────────────────────────────── */
.portaal {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}
.portaal-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 16px;
}
@media (max-width: 768px) {
  .portaal-inner { grid-template-columns: 1fr; }
  .portaal-sidebar { display: flex; flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .portaal-nav { flex-direction: row; flex-wrap: wrap; flex: 1; }
  .portaal-logout { align-self: center; }
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.portaal-sidebar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 16px;
  display: flex; flex-direction: column; gap: 20px;
  position: sticky; top: 80px;
}
.portaal-profile-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.portaal-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--bg-2); border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Oswald', sans-serif; font-size: 26px; color: var(--gold);
  overflow: hidden; flex-shrink: 0;
}
.portaal-avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.portaal-avatar--lg {
  width: 96px; height: 96px; font-size: 38px;
}
.portaal-profile-name {
  font-family: 'Oswald', sans-serif; font-size: 17px; text-align: center;
}
.portaal-profile-email { font-size: 12px; text-align: center; }

.portaal-nav {
  display: flex; flex-direction: column; gap: 4px;
}
.portaal-nav__item {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; color: var(--text);
  font-family: 'Inter', sans-serif; font-size: 14px;
  padding: 10px 14px; border-radius: 8px;
  cursor: pointer; text-align: left; transition: background .15s;
}
.portaal-nav__item:hover { background: var(--line); }
.portaal-nav__item.is-active {
  background: var(--gold); color: #10100f; font-weight: 600;
}
.portaal-nav__icon { font-size: 16px; }

.portaal-logout {
  background: none; border: 1px solid var(--line);
  color: var(--muted); font-size: 13px; padding: 8px 14px;
  border-radius: 8px; cursor: pointer; transition: all .15s;
  margin-top: auto;
}
.portaal-logout:hover { color: var(--red); border-color: var(--red); }

/* ── Content ──────────────────────────────────────────────────────────────── */
.portaal-content {
  display: flex; flex-direction: column; gap: 24px;
  min-width: 0;
}
.portaal-tab { display: flex; flex-direction: column; gap: 24px; }
.portaal-tab[hidden] { display: none; }
.portaal-gate[hidden] { display: none !important; }
.portaal-inner[hidden] { display: none !important; }

.portaal-tab__header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.portaal-tab__header h1 {
  font-family: 'Oswald', sans-serif; font-size: 28px;
}

/* ── Dashboard cards ──────────────────────────────────────────────────────── */
.portaal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.portaal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.portaal-card--next { border-left: 3px solid var(--gold); }
.portaal-card--cta { border-left: 3px solid var(--green); }
.portaal-card__label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin-bottom: 8px;
}
.portaal-card__value {
  font-family: 'Oswald', sans-serif; font-size: 22px;
}
.portaal-card__sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ── Portaal section ──────────────────────────────────────────────────────── */
.portaal-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.portaal-section h3 {
  font-family: 'Oswald', sans-serif; font-size: 17px;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

/* ── Afspraken filter ─────────────────────────────────────────────────────── */
.portaal-filter {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.filter-btn {
  background: var(--surface); border: 1px solid var(--line);
  color: var(--muted); font-size: 13px; padding: 7px 16px;
  border-radius: 20px; cursor: pointer; transition: all .15s;
}
.filter-btn:hover { color: var(--text); border-color: var(--text); }
.filter-btn.is-active {
  background: var(--gold); border-color: var(--gold);
  color: #10100f; font-weight: 600;
}

/* ── Afspraak item ────────────────────────────────────────────────────────── */
.appt-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.appt-item--cancelled { opacity: .6; }
.appt-item__head {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.appt-item__svc {
  font-family: 'Oswald', sans-serif; font-size: 17px;
}
.appt-item__meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.appt-item__meta span { display: flex; align-items: center; gap: 5px; }
.appt-item__actions {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.appt-item__note { font-size: 12px; color: var(--muted); }

/* ── Badge ────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  background: var(--line); color: var(--muted);
}
.badge--ok { background: rgba(39,174,96,.15); color: var(--green); }
.badge--off { background: rgba(192,57,43,.15); color: var(--red); }
.badge--warn { background: rgba(201,168,76,.15); color: var(--gold); }

/* ── Inspiratiefoto's ─────────────────────────────────────────────────────── */
.insp-section { margin-top: 8px; }
.insp-section__title {
  font-size: 12px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); margin-bottom: 8px;
}
.insp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px; margin-bottom: 8px;
}
.insp-photo {
  position: relative; border-radius: 8px; overflow: hidden;
  aspect-ratio: 1; background: var(--bg-2); border: 1px solid var(--line);
  cursor: pointer;
}
.insp-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.insp-photo__del {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,.7); color: #fff;
  border: none; border-radius: 50%; width: 22px; height: 22px;
  font-size: 11px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.insp-photo__del:hover { background: var(--red); }

/* ── Profiel form ─────────────────────────────────────────────────────────── */
.profile-photo-section {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.profile-form {
  display: flex; flex-direction: column; gap: 14px; max-width: 480px;
}
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 13px; color: var(--muted); }
.form-row input {
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--text); border-radius: 8px; padding: 10px 14px; font-size: 14px;
  outline: none; transition: border-color .15s;
}
.form-row input:focus { border-color: var(--gold); }

/* ── Lightbox ─────────────────────────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.9);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out;
}
.lightbox-overlay img {
  max-width: 90vw; max-height: 90vh;
  border-radius: 8px; object-fit: contain;
}

/* ── Modal flat aliases (ook gebruikt door portaal) ───────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.75);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 5vh; overflow-y: auto;
}
.modal-overlay .modal {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); width: 100%; max-width: 500px;
  margin: 0 16px 40px;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-family: 'Oswald', sans-serif; font-size: 20px; margin: 0; }
.modal-body { padding: 20px 24px; }
.modal-foot { padding: 0 24px 20px; display: flex; justify-content: flex-end; gap: 10px; }
.modal-close {
  background: none; border: none; color: var(--muted); font-size: 20px;
  cursor: pointer; line-height: 1; padding: 0;
}
.modal-close:hover { color: var(--text); }

/* ── Utility ──────────────────────────────────────────────────────────────── */
.muted { color: var(--muted); }
.notice {
  padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-top: 8px;
}
.notice--error { background: rgba(192,57,43,.15); color: #e74c3c; border: 1px solid rgba(192,57,43,.3); }
.notice--ok { background: rgba(39,174,96,.15); color: var(--green); border: 1px solid rgba(39,174,96,.3); }
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--muted); font-size: 14px;
}
.empty-state__icon { font-size: 36px; margin-bottom: 12px; }

/* Buttons (portaal-local copy so portaal.html is self-contained) */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 11px 22px; border-radius: 8px;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; text-decoration: none; transition: all .15s;
}
.btn--gold { background: var(--gold); color: #10100f; }
.btn--gold:hover { background: var(--gold-dim); }
.btn--outline { background: transparent; border: 1px solid var(--gold); color: var(--gold); }
.btn--outline:hover { background: var(--gold); color: #10100f; }
.btn--ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--text); }
.btn--danger { background: transparent; border: 1px solid var(--red); color: var(--red); }
.btn--danger:hover { background: var(--red); color: #fff; }
.btn--sm { padding: 7px 14px; font-size: 13px; }

/* Auth form inside portaal */
.auth-tabs { display: flex; gap: 4px; margin-bottom: 4px; }
.tab {
  flex: 1; padding: 9px; border-radius: 8px;
  border: 1px solid var(--line); background: none;
  color: var(--muted); font-size: 13px; cursor: pointer; transition: all .15s;
}
.tab.is-active { background: var(--gold); border-color: var(--gold); color: #10100f; font-weight: 600; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form input {
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--text); border-radius: 8px; padding: 10px 14px; font-size: 14px; outline: none;
}
.auth-form input:focus { border-color: var(--gold); }

/* Nav for portaal page */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(16,16,15,.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 64px;
}
.nav__logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav__brand { font-family: 'Oswald', sans-serif; font-size: 20px; color: var(--gold); letter-spacing: .1em; }
.nav__links { display: flex; gap: 20px; }
.nav__link { color: var(--muted); text-decoration: none; font-size: 14px; }
.nav__link:hover { color: var(--text); }
.nav__auth { display: flex; align-items: center; gap: 10px; }

/* ── Klantenkaart ─────────────────────────────────────────────────────────── */
.loyalty-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}
.loyalty-card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.loyalty-card__title {
  font-family: 'Oswald', sans-serif;
  font-size: 20px;
  color: var(--gold);
  letter-spacing: .05em;
}
.loyalty-card__meta {
  font-size: 13px;
  color: var(--muted);
}
.loyalty-card__stamps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
@media (min-width: 480px) {
  .loyalty-card__stamps { grid-template-columns: repeat(10, 1fr); }
}
.stamp {
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 2px solid var(--border);
  transition: transform .15s;
}
.stamp--filled {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(196,155,79,.35);
}
.stamp--empty {
  background: var(--surface);
  opacity: .5;
}
.loyalty-card__footer {
  font-size: 13px;
  color: var(--muted);
}
.loyalty-badge--done {
  color: #4caf7d;
  font-weight: 600;
}

/* ── Promoties ───────────────────────────────────────────────────────────── */
.loyalty-section-title {
  font-family: 'Oswald', sans-serif;
  font-size: 16px;
  color: var(--gold);
  letter-spacing: .05em;
  margin: 0 0 12px;
}
.promo-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.promo-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.promo-card--available {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(196,155,79,.15);
}
.promo-card__badge {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}
.promo-card__body {
  flex: 1;
  min-width: 0;
}
.promo-card__title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}
.promo-card__desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.promo-card__discount {
  display: inline-block;
  background: rgba(196,155,79,.15);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 6px;
}
.promo-card__btn {
  flex-shrink: 0;
  align-self: center;
  padding: 8px 16px;
  font-size: 13px;
}
.promo-progress {
  height: 6px;
  background: var(--surface);
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0 4px;
}
.promo-progress__bar {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  transition: width .4s ease;
}
.promo-progress__label {
  font-size: 12px;
  color: var(--muted);
}
.loading-text {
  color: var(--muted);
  padding: 24px 0;
  font-size: 14px;
}
