﻿/* ================================================================
   Plekkie Design System
   Display: Fraunces · Body: Outfit
   Palette: Warm dark / Off-white / Coral accent
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  --c-bg:       #FAF5EF;
  --c-surface:  #FFFFFF;
  --c-header:   #111827;
  --c-accent:   #F4623A;
  --c-accent-h: #D94E28;
  --c-teal:     #1A7F64;
  --c-text:     #1C1917;
  --c-text-2:   #6B7280;
  --c-border:   #E5E3DF;

  --sh-xs: 0 1px 2px rgba(0,0,0,.05);
  --sh-sm: 0 1px 4px rgba(0,0,0,.06), 0 2px 10px rgba(0,0,0,.05);
  --sh-md: 0 4px 24px rgba(0,0,0,.09), 0 1px 4px rgba(0,0,0,.05);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;

  --ff-display: 'Fraunces', Georgia, serif;
  --ff-body:    'Outfit', system-ui, sans-serif;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-body);
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ── Banner ──────────────────────────────────────────────── */
.banner {
  background: var(--c-surface);
  padding: .85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 var(--c-border);
}

.banner h1 {
  font-family: var(--ff-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--c-text);
  line-height: 1;
}

.banner p {
  display: none;
}

/* ── Banner layout ───────────────────────────────────────── */
.banner-top {
  display: contents;
}
.banner-top > div:first-child { display: contents; }

.auth-nav {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.auth-email { font-size: .78rem; color: rgba(255,255,255,.45); }

.btn-auth {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.85);
  padding: .35rem .85rem;
  border-radius: var(--r-sm);
  font-size: .82rem;
  font-family: var(--ff-body);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}
.btn-auth:hover { background: rgba(255,255,255,.18); }

.btn-auth--primary {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
  font-weight: 600;
}
.btn-auth--primary:hover { background: var(--c-accent-h); border-color: var(--c-accent-h); }

/* ================================================================
   Map Page
   ================================================================ */

/* Toolbar — sticky boven de kaart, blijft zichtbaar bij scroll */
.map-controls {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  padding: .6rem 1.1rem;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  font-family: var(--ff-body);
}

/* Locate button — primary action */
.map-btn {
  padding: .38rem .9rem;
  border: 1.5px solid var(--c-border);
  border-radius: 100px;
  background: var(--c-surface);
  font-family: var(--ff-body);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
  box-shadow: var(--sh-xs);
}
.map-btn:hover    { border-color: var(--c-accent); color: var(--c-accent); background: #FFF8F6; }
.map-btn:disabled { opacity: .48; cursor: not-allowed; box-shadow: none; }

/* Pill — herbruikbare pill-knop (active/disabled states) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  padding: .38rem .9rem;
  border: 1.5px solid var(--c-border);
  border-radius: 100px;
  background: var(--c-surface);
  font-family: var(--ff-body);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
  box-shadow: var(--sh-xs);
  text-decoration: none;
  color: var(--c-text);
}
.pill:hover          { border-color: var(--c-accent); color: var(--c-accent); background: #FFF8F6; }
.pill.is-active      {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(244,98,58,.28);
}
.pill.is-active:hover { background: var(--c-accent-h); border-color: var(--c-accent-h); color: #fff; }
.pill.is-disabled    { opacity: .45; cursor: not-allowed; pointer-events: none; box-shadow: none; }

/* Toggle — checkbox + label */
.map-toggle {
  display: flex;
  align-items: center;
  gap: .28rem;
  font-size: .82rem;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  color: var(--c-text);
}
.map-toggle input { accent-color: var(--c-accent); cursor: pointer; width: 15px; height: 15px; }
.map-toggle:hover { color: var(--c-accent); }

/* Dropdown select */
.map-select {
  padding: .35rem .6rem;
  border: 1.5px solid var(--c-border);
  border-radius: 8px;
  font-family: var(--ff-body);
  font-size: .82rem;
  background: var(--c-surface);
  color: var(--c-text);
  cursor: pointer;
  outline: none;
  transition: border-color .15s;
  box-shadow: var(--sh-xs);
}
.map-select:focus { border-color: var(--c-accent); }
.map-select:hover { border-color: rgba(244,98,58,.5); }

/* Dividers + status message */
.map-divider { width: 1px; height: 1.15rem; background: var(--c-border); flex-shrink: 0; }
.map-geo-msg { font-size: .78rem; color: #DC2626; }

/* Map status line (algemeen bruikbaar voor meldingen) */
.map-status {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .78rem;
  font-weight: 500;
  padding: .22rem .6rem;
  border-radius: 100px;
}
.map-status--error { color: #DC2626; background: #FEF2F2; border: 1px solid #FECACA; }
.map-status--info  { color: #2563EB; background: #EFF6FF; border: 1px solid #BFDBFE; }
.map-status--ok    { color: #15803D; background: #F0FDF4; border: 1px solid #BBF7D0; }

/* Toast — tijdelijke melding rechtsonder (optioneel) */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9000;
  background: var(--c-header);
  color: #fff;
  padding: .65rem 1.1rem;
  border-radius: var(--r-md);
  font-size: .86rem;
  font-weight: 500;
  box-shadow: var(--sh-md);
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }

/* Small badge variant */
.badge-sm {
  font-size: .6rem;
  padding: .15rem .45rem;
  letter-spacing: .03em;
}

/* Leaflet popup polish */
.leaflet-popup-content   { margin: .65rem .8rem; line-height: 1.6; }
.leaflet-popup-content a { text-decoration: none; }
.leaflet-popup-content a:hover { text-decoration: underline; }
.leaflet-popup-tip-container { margin-top: -1px; }

/* Mobile: wrap naar 2 regels, dividers verbergen */
@media (max-width: 600px) {
  .map-controls {
    gap: .38rem;
    padding: .5rem .75rem;
  }
  .map-divider { display: none; }
  .map-btn, .pill { font-size: .8rem; padding: .33rem .75rem; }
  .map-toggle    { font-size: .8rem; }
  .map-select    { font-size: .8rem; padding: .3rem .5rem; }
}

/* ── Main layout ─────────────────────────────────────────── */
main {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 0 5rem;
}

/* ── Section title ───────────────────────────────────────── */
.section-title {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 1rem;
}

/* ── Trending sectie ─────────────────────────────────────── */
.trending-section {
  background: linear-gradient(135deg, #FFF7F4 0%, #FEF3E2 100%);
  border: 1.5px solid rgba(244,98,58,.18);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.25rem 1.1rem;
  margin-bottom: 2rem;
}

.trending-title {
  font-family: var(--ff-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: .9rem;
}

/* Grid op desktop, horizontale scroll op mobiel */
.trending-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: .65rem;
}

@media (max-width: 600px) {
  .trending-list {
    display: flex;
    overflow-x: auto;
    gap: .65rem;
    padding-bottom: .4rem;
    scrollbar-width: none;
  }
  .trending-list::-webkit-scrollbar { display: none; }
}

.trending-card {
  display: block;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  padding: .8rem .9rem;
  box-shadow: var(--sh-xs);
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s, border-color .15s;
  min-width: 180px;
}
.trending-card:hover {
  box-shadow: var(--sh-sm);
  border-color: rgba(244,98,58,.35);
}

.trending-card-top {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: .35rem;
}

.trending-rank {
  font-size: .7rem;
  font-weight: 700;
  color: var(--c-accent);
  background: rgba(244,98,58,.1);
  border-radius: 5px;
  padding: .05rem .3rem;
  flex-shrink: 0;
}

.trending-card-name {
  font-size: .88rem;
  font-weight: 600;
  color: var(--c-text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trending-reason {
  font-size: .72rem;
  color: var(--c-text-2);
  margin: 0;
  line-height: 1.4;
}

.trending-conf {
  font-size: .68rem;
  color: var(--c-text-2);
  margin: .15rem 0 0;
  opacity: .75;
}

.trending-empty {
  font-size: .88rem;
  color: var(--c-text-2);
  margin: 0;
  padding: .5rem 0;
}

/* ── Controls ────────────────────────────────────────────── */
.controls {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 0;
}

#search {
  width: 100%;
  padding: .78rem 1.1rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: .95rem;
  font-family: var(--ff-body);
  background: var(--c-surface);
  color: var(--c-text);
  outline: none;
  box-shadow: var(--sh-xs);
  transition: border-color .15s, box-shadow .15s;
}
#search:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(244,98,58,.12);
}
#search::placeholder { color: var(--c-text-2); }

.filters {
  display: flex;
  gap: .5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: .75rem 1.25rem 1rem;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }

.filter-btn {
  padding: .42rem 1rem;
  border: 1.5px solid var(--c-border);
  border-radius: 100px;
  background: var(--c-surface);
  color: var(--c-text-2);
  font-family: var(--ff-body);
  font-size: .84rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--sh-xs);
  transition: all .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.filter-btn:hover { border-color: var(--c-accent); color: var(--c-accent); }
.filter-btn.active {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
  box-shadow: 0 2px 10px rgba(244,98,58,.28);
}

/* ── Card grid ───────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .85rem;
  padding: 0 1.25rem;
}
@media (min-width: 960px)  { .card-grid { grid-template-columns: repeat(3, 1fr); } }

/* ── Card ────────────────────────────────────────────────── */
.card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow .22s ease, transform .22s ease;
}
.card:hover { box-shadow: var(--sh-md); transform: translateY(-3px); }

.card-link-overlay { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }

/* Card image */
.card-img {
  height: 130px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-img::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(to bottom, rgba(0,0,0,.45), rgba(0,0,0,.15), rgba(0,0,0,0));
  pointer-events: none;
  z-index: 1;
}
.card-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1C2B3A 0%, #243B55 100%);
}
.card-img--placeholder span {
  font-family: var(--ff-display);
  font-size: 5rem;
  color: rgba(255,255,255,.1);
  line-height: 1;
  user-select: none;
}

/* Card body */
.card-body {
  padding: .65rem .75rem .75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .6rem;
}

.card-title {
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--c-text);
}

/* Card meta chips */
.card-meta {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-top: .55rem;
  flex-wrap: wrap;
}
.meta-chip {
  font-size: .76rem;
  color: var(--c-text-2);
  background: var(--c-bg);
  padding: .18rem .55rem;
  border-radius: 100px;
  border: 1px solid var(--c-border);
}
.vote-count { font-size: .76rem; color: var(--c-text-2); }
.meta-chip--closed { color: #B45309; border-color: #FCD34D; }

/* Legacy .meta for other pages */
.meta { margin-top: .5rem; font-size: .85rem; color: var(--c-text-2); }

.special-tag, .special {
  margin-top: .5rem;
  font-size: .8rem;
  color: var(--c-teal);
  font-weight: 500;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--c-text-2);
  padding: 4rem 0;
  font-size: .95rem;
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  font-size: .69rem;
  font-weight: 700;
  padding: .28rem .65rem;
  border-radius: 100px;
  white-space: nowrap;
  letter-spacing: .04em;
  text-transform: uppercase;
  flex-shrink: 0;
}
/* Status kleuren: groen / oranje / rood / grijs */
.badge--rustig,
.badge--gezellig,
.badge--normaal  { background: #DCFCE7; color: #15803D; } /* groen (legacy aliases) */
.badge--rustig   { background: #DCFCE7; color: #15803D; }
.badge--gemiddeld { background: #FEF0E0; color: #C2410C; } /* oranje */
.badge--druk,
.badge--vol      { background: #FEE2E2; color: #B91C1C; } /* rood (vol → druk alias) */
.badge--closed,
.badge--gesloten { background: #E5E7EB; color: #374151; border: 1.5px solid #9CA3AF; font-weight: 700; }

/* Vote pill status-kleuren (active = status-kleur; default = neutraal) */
.vote-pill--rustig.active    { background: #16A34A; border-color: #16A34A; color: #fff; }
.vote-pill--gemiddeld.active { background: #EA580C; border-color: #EA580C; color: #fff; }
.vote-pill--druk.active      { background: #DC2626; border-color: #DC2626; color: #fff; }

.badge-wrap    { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; flex-shrink: 0; }
.source-label  { font-size: .67rem; color: var(--c-text-2); white-space: nowrap; display: flex; align-items: center; gap: .2rem; }
.conf-dots     { display: inline-flex; gap: 2px; }
.conf-dot      { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.conf-dot--on  { background: var(--c-accent); }
.conf-dot--off { background: var(--c-border); }

/* Status meta — confidence text */
.status-meta        { font-size: .62rem; white-space: nowrap; text-align: right; }
.confidence-none    { color: var(--c-text-2); }
.confidence-low     { color: #D97706; }
.confidence-medium  { color: var(--c-text-2); }
.confidence-high    { color: #15803D; }

/* Source label variants */
.status-source-live     { color: var(--c-accent); font-weight: 600; }
.status-source-baseline { color: var(--c-text-2); font-style: italic; }

/* Pulsing dot for live status */
.live-pulse {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
  margin-right: 2px;
  vertical-align: middle;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .45; transform: scale(.65); }
}

.detail-source-label {
  font-size: .75rem;
  color: rgba(255,255,255,.75);
  margin-top: .35rem;
  display: flex;
  align-items: center;
  gap: .25rem;
}
.detail-source-label .conf-dots { display: inline-flex; }
.detail-source-label .conf-dot--on  { background: rgba(255,255,255,.9); }
.detail-source-label .conf-dot--off { background: rgba(255,255,255,.3); }

.live-tag {
  font-size: .55rem;
  background: var(--c-accent);
  color: #fff;
  padding: .1rem .3rem;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: .2rem;
  letter-spacing: .05em;
  font-weight: 700;
}

/* ── Vote bar ────────────────────────────────────────────── */
.vote-bar {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .4rem;
  margin-top: auto;
  padding-top: .85rem;
}
.vote-btns { display: flex; align-items: center; gap: .3rem; }

.vote-rows {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.vote-row {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.vote-label {
  font-size: .75rem;
  color: var(--c-text-2);
  font-weight: 500;
  min-width: 46px;
  flex-shrink: 0;
}
.vote-select {
  flex: 1;
  min-width: 0;
  font-size: .78rem;
  padding: .28rem .45rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-bg);
  color: var(--c-text);
  cursor: pointer;
}
.vote-select:disabled { opacity: .5; cursor: not-allowed; }
.vote-submit {
  width: 100%;
  padding: .38rem 0;
  background: var(--c-accent);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.vote-submit:hover:not(:disabled) { background: #d44d35; }
.vote-submit:disabled { opacity: .5; cursor: not-allowed; }

.vote-btn {
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: .22rem .48rem;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  transition: border-color .15s, background .15s;
}
.vote-btn:hover:not(:disabled) { border-color: var(--c-accent); background: #FFF1EE; }
.vote-btn:disabled { opacity: .35; cursor: not-allowed; }
.voted-msg { font-size: .78rem; color: var(--c-teal); font-weight: 600; }
.voted-msg--closed { color: #6B7280; }
.vote-geo-msg { font-size: .75rem; color: #B45309; display: block; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .55rem 1.1rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-family: var(--ff-body);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  background: var(--c-surface);
  color: var(--c-text);
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--c-bg); }
.btn--primary { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.btn--primary:hover { background: var(--c-accent-h); border-color: var(--c-accent-h); }
.btn--danger  { background: #DC2626; color: #fff; border-color: #DC2626; }
.btn--danger:hover  { background: #B91C1C; border-color: #B91C1C; }
.btn--small   { padding: .28rem .65rem; font-size: .8rem; }
.btn--report  { background: #F0FDF4; border-color: #BBF7D0; color: #15803D; }
.btn--report:hover { background: #DCFCE7; }

/* ── Flash / alerts ──────────────────────────────────────── */
.flash {
  padding: .75rem 1rem;
  border-radius: var(--r-sm);
  margin-bottom: 1rem;
  font-size: .88rem;
  font-weight: 500;
  border-width: 1px;
  border-style: solid;
}
.flash--error { background: #FEF2F2; color: #DC2626; border-color: #FECACA; }
.flash--ok    { background: #F0FDF4; color: #15803D; border-color: #BBF7D0; }

/* ── Admin header ────────────────────────────────────────── */
.admin-header {
  background: var(--c-header);
  color: #fff;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.admin-header h1 { font-size: 1.05rem; font-weight: 600; }

.btn-logout {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.85);
  padding: .35rem .85rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: .82rem;
  font-family: var(--ff-body);
  text-decoration: none;
  transition: background .15s;
}
.btn-logout:hover { background: rgba(255,255,255,.18); }

/* ── Admin main & table ──────────────────────────────────── */
.admin-main { max-width: 960px; margin: 1.75rem auto; padding: 0 1.25rem; }
.admin-main h2 { margin-bottom: 1rem; font-size: 1.05rem; font-weight: 600; }

.table-wrap { overflow-x: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--c-surface);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  font-size: .875rem;
}
.admin-table th, .admin-table td { padding: .7rem .9rem; text-align: left; }
.admin-table th {
  background: var(--c-bg);
  font-size: .75rem;
  font-weight: 700;
  color: var(--c-text-2);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.admin-table tr:not(:last-child) td { border-bottom: 1px solid var(--c-bg); }
.admin-table tbody tr:hover { background: #FAFAF8; }

/* ── Add section ─────────────────────────────────────────── */
.add-section {
  background: var(--c-surface);
  border-radius: var(--r-md);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--sh-sm);
  border: 1.5px solid var(--c-border);
  margin-bottom: 1.5rem;
}
.add-section summary { cursor: pointer; font-size: .95rem; font-weight: 600; }

/* ── Admin form ──────────────────────────────────────────── */
.admin-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-top: .85rem;
}
.admin-form label {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  font-size: .82rem;
  font-weight: 500;
  color: var(--c-text-2);
}
.admin-form input, .admin-form select {
  padding: .5rem .75rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  font-size: .9rem;
  font-family: var(--ff-body);
  color: var(--c-text);
  background: var(--c-bg);
  outline: none;
  transition: border-color .15s, background .15s;
}
.admin-form input:focus, .admin-form select:focus {
  border-color: var(--c-accent);
  background: var(--c-surface);
}
.admin-form > button, .form-actions { grid-column: 1 / -1; }
.form-actions { display: flex; gap: .5rem; }
.actions { display: flex; gap: .4rem; align-items: center; }
.actions form { margin: 0; }

/* ── Images ──────────────────────────────────────────────── */
.thumb    { width: 48px; height: 36px; object-fit: cover; border-radius: 6px; }
.thumb-lg { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; }
.image-field { grid-column: 1 / -1; }
.image-preview { display: flex; align-items: center; gap: .75rem; margin-top: .5rem; }
.remove-label { font-size: .85rem; color: var(--c-text-2); cursor: pointer; }

/* ── Reports ─────────────────────────────────────────────── */
.live-dot { color: #22C55E; font-size: .7rem; margin-left: .25rem; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

.latest-row { background: #F0FDF4; }

.report-form { display: flex; flex-direction: column; gap: .75rem; margin-top: .75rem; }
.status-options { display: flex; gap: .5rem; flex-wrap: wrap; }
.status-radio { cursor: pointer; }
.status-radio input { display: none; }
.status-radio .badge {
  padding: .5rem 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s;
}
.status-radio input:checked + .badge {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(244,98,58,.15);
}
.report-form textarea {
  padding: .55rem .75rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  font-size: .9rem;
  font-family: var(--ff-body);
  resize: vertical;
  outline: none;
  color: var(--c-text);
}
.report-form textarea:focus { border-color: var(--c-accent); }

/* ── Login card (admin) ──────────────────────────────────── */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
  background: var(--c-bg);
}
.login-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: 2.25rem 1.75rem;
  box-shadow: var(--sh-md);
  width: 100%;
  max-width: 360px;
  text-align: center;
}
.login-card h1 { margin-bottom: 1.25rem; font-size: 1.25rem; font-weight: 700; }
.login-card input {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  font-size: .95rem;
  font-family: var(--ff-body);
  margin-bottom: .75rem;
  outline: none;
  background: var(--c-bg);
  color: var(--c-text);
  transition: border-color .15s;
}
.login-card input:focus { border-color: var(--c-accent); background: var(--c-surface); }
.login-card button {
  width: 100%;
  padding: .72rem;
  border: none;
  border-radius: var(--r-sm);
  background: var(--c-accent);
  color: #fff;
  font-size: .95rem;
  font-family: var(--ff-body);
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.login-card button:hover { background: var(--c-accent-h); }
.login-error {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
  padding: .6rem .9rem;
  border-radius: var(--r-sm);
  margin-bottom: .75rem;
  font-size: .88rem;
}

/* ── Auth form (signup / login / forgot) ─────────────────── */
.auth-form { display: flex; flex-direction: column; gap: .85rem; }
.auth-form label {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  font-size: .88rem;
  font-weight: 500;
  color: var(--c-text);
}
.auth-form label small { font-weight: 400; color: var(--c-text-2); }
.auth-form input {
  padding: .65rem .9rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  font-size: .95rem;
  font-family: var(--ff-body);
  outline: none;
  background: var(--c-bg);
  color: var(--c-text);
  transition: border-color .15s, box-shadow .15s;
}
.auth-form input:focus {
  border-color: var(--c-accent);
  background: var(--c-surface);
  box-shadow: 0 0 0 3px rgba(244,98,58,.1);
}

/* ── Detail page ─────────────────────────────────────────── */
/* Hero */
.detail-hero { position: relative; height: 320px; background: var(--c-header); overflow: hidden; }
.detail-hero-img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .85; }
.detail-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.15) 60%, transparent 100%);
}
.detail-hero-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 1.5rem 1.75rem;
  display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap;
}
.detail-hero-title {
  margin: 0; flex: 1 1 auto;
  font-family: var(--ff-display);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700; color: #fff;
  line-height: 1.1; letter-spacing: -.5px;
}
.detail-hero-badges { display: flex; gap: .5rem; align-items: center; flex-shrink: 0; }

/* Main content */
.detail-main { max-width: 700px; margin: 2rem auto; padding: 0 1.25rem 4rem; }

.detail-meta-row {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.detail-meta-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .82rem; font-weight: 500; color: var(--c-text-2);
  background: var(--c-surface); border: 1px solid var(--c-border);
  padding: .28rem .65rem; border-radius: 99px;
}

/* Vote section */
.detail-vote {
  margin: 1.75rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--c-surface);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  border: 1.5px solid var(--c-border);
}
.detail-vote > strong { display: block; margin-bottom: .85rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c-text-2); }
.vote-feedback { margin-top: .6rem; font-size: .83rem; color: var(--c-text-2); min-height: 1.2em; }

.vote-btn--lg {
  padding: .55rem 1.25rem;
  font-size: .95rem;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--c-border);
  background: var(--c-bg);
  cursor: pointer;
  font-family: var(--ff-body);
  font-weight: 500;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.vote-btn--lg:hover:not(:disabled) {
  background: var(--c-surface); border-color: var(--c-accent);
  transform: translateY(-1px); box-shadow: var(--sh-xs);
}
.vote-btn--lg:disabled { opacity: .45; cursor: not-allowed; }

/* Chart */
.chart-block { margin: 1.75rem 0; }
.chart-block > strong { display: block; margin-bottom: .75rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c-text-2); }
.chart-row { display: flex; gap: .5rem; align-items: flex-end; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.chart-bar-wrap {
  width: 100%; height: 80px;
  display: flex; align-items: flex-end; justify-content: center;
  background: var(--c-bg); border-radius: var(--r-sm) var(--r-sm) 0 0;
  border: 1px solid var(--c-border); border-bottom: none;
}
.chart-bar { width: 100%; border-radius: var(--r-sm) var(--r-sm) 0 0; min-height: 4px; }
.chart-bar--rustig  { background: #22C55E; }
.chart-bar--normaal { background: #F59E0B; }
.chart-bar--druk    { background: #EF4444; }
.chart-bar--empty   { background: var(--c-border); opacity: .5; }
.chart-count { font-size: .72rem; color: var(--c-text-2); }
.chart-label { font-size: .65rem; color: var(--c-text-2); text-align: center; }

/* Prediction */
.prediction-block {
  margin: 1.75rem 0;
  padding: 1.1rem 1.25rem;
  background: #FFFBEB;
  border-left: 3px solid #F59E0B;
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.prediction-block strong {
  display: block;
  margin-bottom: .4rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--c-text-2);
  font-weight: 700;
}
.prediction-block p {
  margin: 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}
.conf-badge { font-size: .7rem; padding: .15rem .45rem; border-radius: 4px; font-weight: 700; }
.conf--laag   { background: #FEF9C3; color: #A16207; }
.conf--midden { background: #DCFCE7; color: #15803D; }
.conf--hoog   { background: var(--c-accent); color: #fff; }
.pred-meta { font-size: .75rem; color: var(--c-text-2); }

.claim-hint { margin-top: 2rem; font-size: .85rem; color: var(--c-text-2); }

/* ── Auth page layout ────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--c-bg);
  background-image: radial-gradient(circle, rgba(0,0,0,.045) 1px, transparent 1px);
  background-size: 22px 22px;
}

.auth-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}

.auth-card-header {
  background: var(--c-header);
  padding: 1.6rem 2rem 1.5rem;
  text-align: center;
}
.auth-card-header .logo-link {
  font-family: var(--ff-display);
  font-size: 2.1rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.5px;
  display: block;
  line-height: 1;
}
.auth-card-header .logo-sub {
  color: rgba(255,255,255,.42);
  font-size: .82rem;
  margin-top: .35rem;
}

.auth-card-body { padding: 1.75rem 2rem 2rem; }

.auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  margin-top: 1.25rem;
}
.auth-links a { font-size: .87rem; color: var(--c-accent); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-links span { font-size: .85rem; color: var(--c-text-2); }
.auth-links span a { color: var(--c-text); }

/* ── Reset token box ─────────────────────────────────────── */
.reset-token-box {
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: .85rem 1rem;
  word-break: break-all;
  font-family: 'Courier New', monospace;
  font-size: .83rem;
  margin-top: .5rem;
  color: var(--c-text);
}

/* ================================================================
   Homepage Redesign
   ================================================================ */

/* ── Banner logo ─────────────────────────────────────────── */
.banner-logo {
  display: flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
}
.banner-logo-icon {
  width: 34px; height: 34px;
  background: var(--c-accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
}
.banner-bell {
  width: 36px; height: 36px;
  border: 1.5px solid var(--c-border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  background: var(--c-surface);
  text-decoration: none;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  padding: 1.5rem 1.25rem .25rem;
}
.hero-title {
  font-family: var(--ff-display);
  font-size: clamp(2.2rem, 8vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.5px;
  color: var(--c-text);
  margin-bottom: 1.1rem;
}

/* ── Search wrap ─────────────────────────────────────────── */
.search-wrap {
  position: relative;
  padding: 0 1.25rem .25rem;
}
.search-wrap-icon {
  position: absolute;
  left: 2.1rem; top: 50%; transform: translateY(-55%);
  color: var(--c-accent);
  font-size: 1rem;
  pointer-events: none;
}
#search {
  padding-left: 2.6rem !important;
  border-radius: 14px !important;
  border-color: transparent !important;
  box-shadow: var(--sh-sm) !important;
}

/* ── Trending sectie ─────────────────────────────────────── */
.trending-section {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0 0 .5rem;
}
.trending-title {
  padding: 1.1rem 1.25rem .5rem;
  margin: 0;
}
.trending-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem .6rem;
}
.trending-header h3 {
  font-family: var(--ff-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-text);
  margin: 0;
}
.trending-header a {
  font-size: .82rem;
  color: var(--c-accent);
  text-decoration: none;
  font-weight: 500;
}
.trending-list {
  display: flex !important;
  gap: .85rem;
  overflow-x: auto;
  padding: 0 1.25rem .25rem;
  scrollbar-width: none;
  grid-template-columns: unset !important;
}
.trending-list::-webkit-scrollbar { display: none; }
.trending-card {
  min-width: 185px;
  max-width: 185px;
  background: var(--c-surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border: none;
  padding: 0;
}
.trending-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); transition: all .2s; }
.trending-card-photo {
  height: 120px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg,#1C2B3A,#243B55);
}
.trending-card-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.trending-card-photo-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display);
  font-size: 3rem; color: rgba(255,255,255,.15);
}
.trending-card-rank {
  position: absolute;
  top: .5rem; left: .5rem;
  background: var(--c-accent);
  color: #fff;
  font-size: .65rem; font-weight: 700;
  padding: .18rem .45rem;
  border-radius: 100px;
  z-index: 2;
}
.trending-card-body {
  padding: .65rem .75rem .7rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.trending-card-name {
  font-size: .86rem;
  font-weight: 600;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: unset;
  margin: 0;
}
.trending-card-live {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  color: var(--c-teal);
  font-weight: 600;
}
.trending-card-live::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--c-teal);
  border-radius: 50%;
  display: inline-block;
}
.trending-card-top { display: none; }
.trending-reason, .trending-conf { display: none; }
.trending-rank { display: none; }

/* ── Terrassen sectie ────────────────────────────────────── */
.terrassen-section {
  margin: .5rem 1.25rem 1.25rem;
  background: #FEF9E7;
  border-radius: var(--r-lg);
  padding: 1rem 1rem .75rem;
}
.terrassen-section .trending-header {
  padding: 0 0 .6rem;
}
.terrassen-section .trending-list {
  padding: 0;
}
.terrassen-card {
  min-width: 120px;
  max-width: 120px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.terrassen-card-photo {
  width: 120px; height: 90px;
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: .4rem;
  background: linear-gradient(135deg,#2d4a1e,#3a6b28);
}
.terrassen-card-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.terrassen-card-photo-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}
.terrassen-card-name {
  font-size: .78rem;
  font-weight: 600;
  color: var(--c-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.terrassen-card-sub {
  font-size: .68rem;
  color: var(--c-text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Sectie kop ──────────────────────────────────────────── */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem .6rem;
}
.section-heading h3 {
  font-family: var(--ff-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-text);
  margin: 0;
}

/* ── Card overlay badge (LIVE) ───────────────────────────── */
.card-img-badge {
  position: absolute;
  top: .5rem; right: .5rem;
  background: rgba(255,255,255,.92);
  border-radius: 100px;
  padding: .18rem .48rem;
  font-size: .65rem;
  font-weight: 700;
  display: flex; align-items: center; gap: .28rem;
  z-index: 2;
  backdrop-filter: blur(4px);
}
.card-img-badge::before {
  content: '';
  width: 5px; height: 5px;
  background: #16A34A;
  border-radius: 50%;
}
.card-img-heart {
  position: absolute;
  top: .5rem; right: .5rem;
  background: rgba(255,255,255,.85);
  border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  z-index: 3;
  backdrop-filter: blur(4px);
}
.card-status-pill {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .68rem;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: 100px;
  margin-top: .35rem;
}
.card-status-pill--rustig                      { background: #DCFCE7; color: #15803D; }
.card-status-pill--gemiddeld,
.card-status-pill--gezellig                    { background: #FEF0E0; color: #C2410C; }
.card-status-pill--druk,
.card-status-pill--vol                         { background: #FEE2E2; color: #B91C1C; }
.card-status-pill--gesloten,
.card-status-pill--closed                      { background: #F3F4F6; color: #6B7280; }
.card--closed { opacity: .65; }
.card-addr {
  font-size: .72rem;
  color: var(--c-text-2);
  margin-top: .1rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Bottom nav ──────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom));
  z-index: 100;
  max-width: 640px;
  margin: 0 auto;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .18rem;
  font-size: .62rem;
  color: var(--c-text-2);
  text-decoration: none;
  font-weight: 500;
  min-width: 44px;
}
.bottom-nav-item.active { color: var(--c-accent); }
.bottom-nav-icon { font-size: 1.25rem; line-height: 1; }
.bottom-nav-fab {
  width: 50px; height: 50px;
  background: var(--c-accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.5rem;
  margin-top: -1.4rem;
  box-shadow: 0 4px 18px rgba(244,98,58,.45);
  text-decoration: none;
  flex-shrink: 0;
}
