@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ============================================================
   gemiddeldweekend — licht thema, saffierblauw accent
   ============================================================ */
:root {
  color-scheme: light;

  /* Grond en vlakken */
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --surface-3: #eef0f3;
  --border: #e5e7eb;
  --border-strong: #d5d9e0;

  /* Tekst */
  --text: #1f2937;
  --text-muted: #6b7280;
  --text-soft: #9ca3af;

  /* Accent */
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #eff6ff;
  --accent-border: #bfdbfe;
  --accent-ring: rgba(37, 99, 235, 0.16);

  /* Betekenis */
  --green: #047857;
  --green-soft: #ecfdf5;
  --green-border: #a7f3d0;
  --red: #b91c1c;
  --red-soft: #fef2f2;
  --red-border: #fecaca;
  --amber: #b45309;
  --amber-soft: #fffbeb;
  --amber-border: #fde68a;
  --star: #f59e0b;

  /* Rood als tweede huisstijlkleur, voor de hoogtepunten. Los van het
     semantische rood hierboven, dat "kan niet" en "weghalen" betekent. */
  --highlight: #dc2626;
  --highlight-soft: #fef2f2;
  --highlight-border: #fecaca;

  /* Vorm */
  --radius: 18px;
  --radius-sm: 12px;
  --pill: 999px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-card: 0 1px 3px rgba(16, 24, 40, 0.06), 0 14px 30px -20px rgba(16, 24, 40, 0.28);
  --shadow-pop: 0 12px 32px -12px rgba(16, 24, 40, 0.24);
  --shadow-accent: 0 8px 20px -8px rgba(37, 99, 235, 0.55);

  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg);
}

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.hidden { display: none !important; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 20px 6px;
}
.topbar img.logo { height: 30px; }

/* ---------- Onboarding ---------- */
.onboarding {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  gap: 0;
}
.onboarding .logo-big { width: 230px; margin-bottom: 22px; }
.onboarding p.tagline {
  color: var(--text-muted);
  margin: 0 0 30px;
  font-size: 16px;
  max-width: 34ch;
}
.onboarding form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px 20px;
}

/* ---------- Formuliervelden ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.field input,
.field textarea,
.field select {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-soft); }
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}
.field input:disabled, .field select:disabled {
  background: var(--surface-2);
  color: var(--text-soft);
  cursor: not-allowed;
}
.field textarea { resize: vertical; min-height: 84px; line-height: 1.6; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.field-hint { font-size: 13px; color: var(--text-muted); margin: -2px 0 0; }

/* ---------- Knoppen ---------- */
.btn {
  border: 1px solid transparent;
  border-radius: var(--pill);
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  transition: background 140ms ease, border-color 140ms ease, transform 90ms ease, box-shadow 140ms ease;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-primary:disabled { background: var(--accent-border); border-color: var(--accent-border); box-shadow: none; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text-muted);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-small { padding: 8px 16px; font-size: 13px; }

.status-msg { font-size: 13px; margin: 0; min-height: 18px; color: var(--text-muted); }
.status-msg.error { color: var(--red); }
.status-msg.success { color: var(--green); }

/* ---------- Hoofdindeling ---------- */
.view {
  flex: 1;
  /* Onderin extra ruimte, zodat de +-knop nooit blijvend over een kaart
     of over de knoppen van een uitje heen staat. */
  padding: 4px 18px 120px;
  overflow-y: auto;
}
.view h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 12px 0 6px;
  text-wrap: balance;
}
.view .subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0 0 22px;
  max-width: 42ch;
}

/* ---------- Kaarten ---------- */
.activity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.activity-card .meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}
.activity-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.activity-card .when {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--pill);
  padding: 3px 10px;
  white-space: nowrap;
  margin-top: 2px;
}
.activity-card .by { font-size: 13px; color: var(--text-soft); margin: 0 0 10px; }
.activity-card .description { margin: 0 0 12px; font-size: 15px; color: var(--text); }
.activity-card .location { font-size: 13px; color: var(--text-muted); margin: 0 0 14px; }
.location-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
}
.location-link:hover, .location-link:active { border-bottom-color: var(--accent-border); }

/* ---------- Stemmen ---------- */
.rsvp-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.rsvp-btn {
  flex: 1;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: var(--pill);
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 600;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.rsvp-btn:hover { background: var(--surface-2); color: var(--text); }
.rsvp-btn.active-ja {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.rsvp-btn.active-misschien {
  background: var(--amber-soft);
  border-color: var(--amber-border);
  color: var(--amber);
}
.rsvp-btn.active-nee {
  background: var(--red-soft);
  border-color: var(--red-border);
  color: var(--red);
}

/* ---------- Bijdrage ---------- */
.contribution-row { display: flex; gap: 8px; margin-bottom: 12px; }
.contribution-row input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--pill);
  padding: 10px 16px;
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.contribution-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.contribute-toggle { margin-bottom: 12px; }
.pen-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  padding: 9px 16px;
  color: var(--text-muted);
  font-size: 13px;
}
.pen-btn:hover { background: var(--surface-3); }
.pen-btn .icon { font-size: 14px; flex: none; }
.pen-btn .preview { color: var(--text); font-weight: 500; }
.pen-btn .hint { color: var(--text-soft); }

/* ---------- Deelnemers ---------- */
.participants {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.participant {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}
.participant .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.participant .dot.ja { background: var(--green); }
.participant .dot.nee { background: var(--red); }
.participant .dot.misschien { background: var(--star); }
.participant .contrib { color: var(--text-muted); font-size: 13px; }

.status-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  margin-top: 2px;
  border-top: 1px solid var(--border);
}
.avatar-stack { display: flex; }
.avatar-chip {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  border: 2px solid var(--surface);
  margin-left: -8px;
  background: var(--text-soft);
}
.avatar-chip:first-child { margin-left: 0; }
.avatar-chip.ja { background: var(--accent); }
.avatar-chip.nee { background: #ef4444; }
.avatar-chip.misschien { background: var(--star); }
.status-counts-text { font-size: 13px; color: var(--text-muted); flex: 1; min-width: 90px; }
.details-toggle-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 0;
}
.card-details { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.card-details.hidden { display: none; }

/* ---------- Lege staat ---------- */
.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 20px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  font-size: 14px;
}
.empty-state .big { font-size: 30px; display: block; margin-bottom: 10px; opacity: 0.6; }

.month-heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 26px 0 12px;
}
.month-heading:first-child { margin-top: 4px; }

/* ---------- Zwevende knop ---------- */
.fab {
  position: fixed;
  right: calc(50% - 240px + 20px);
  bottom: calc(28px + var(--safe-bottom));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 26px;
  font-weight: 400;
  border: none;
  box-shadow: 0 10px 24px -8px rgba(37, 99, 235, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: background 140ms ease, transform 90ms ease;
}
.fab:hover { background: var(--accent-strong); }
.fab:active { transform: translateY(1px); }
@media (max-width: 480px) {
  .fab { right: 20px; }
}
/* Is er naast de kolom ruimte? Zet de knop er dan buiten, zodat 'ie op een
   groot scherm niet over de kaarten heen zweeft. */
@media (min-width: 680px) {
  .fab { right: calc(50% - 240px - 72px); }
}

/* ---------- Navigatiebalk (boven) ---------- */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 15;
  padding: 6px 14px 12px;
  background: linear-gradient(var(--bg) 72%, rgba(249, 250, 251, 0));
}
.top-nav__track {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 5px;
  box-shadow: var(--shadow-sm);
}
.nav-btn {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 1px 7px;
  border-radius: 14px;
  transition: color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.nav-btn .icon { display: flex; }
.nav-btn .icon svg { width: 22px; height: 22px; display: block; }
.nav-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.6); }
.nav-btn.active {
  color: var(--accent);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 10px -6px rgba(16, 24, 40, 0.25);
}
.nav-btn.active .icon svg { stroke-width: 2; }

/* ---------- Modaal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 40;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--surface);
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px calc(28px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-pop);
}
.modal h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }
.modal .close-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.modal .close-btn {
  background: var(--surface-2);
  border: none;
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 15px;
  flex: none;
}
.modal .close-btn:hover { background: var(--surface-3); color: var(--text); }
.modal > form { display: flex; flex-direction: column; gap: 18px; }
.modal-section { display: flex; flex-direction: column; gap: 16px; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
}
.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--accent);
  flex: none;
}
.checkbox-row label { font-size: 14px; color: var(--text-muted); line-height: 1.5; }

/* ---------- Instellingen ---------- */
.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.settings-card h3 { margin: 0; font-size: 16px; font-weight: 700; }
.settings-card p { margin: 0; font-size: 14px; color: var(--text-muted); }
.push-status {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--pill);
  padding: 3px 12px;
}
.push-status.on { background: var(--green-soft); border: 1px solid var(--green-border); color: var(--green); }
.push-status.off { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); }

/* ---------- Ledenbeheer ---------- */
.member-list { display: flex; flex-direction: column; gap: 8px; }
.member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  padding: 8px 8px 8px 16px;
  font-size: 14px;
  font-weight: 500;
}
.member-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-row .remove-btn {
  flex: none;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 14px;
  line-height: 1;
}
.member-row .remove-btn:hover { background: var(--red-soft); border-color: var(--red-border); color: var(--red); }
.member-empty {
  font-size: 14px;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}
.add-member-row { display: flex; gap: 8px; }
.add-member-row input {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--pill);
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text);
  outline: none;
}
.add-member-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 6px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Kalender ---------- */
.cal-picker {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.cal-nav {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
}
.cal-nav:hover { background: var(--surface-3); color: var(--text); }
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  text-align: center;
  margin-bottom: 6px;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day {
  aspect-ratio: 1 / 1;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}
.cal-day:hover:not(:disabled) { border-color: var(--accent-border); }
.cal-day:disabled { color: var(--text-soft); background: transparent; cursor: default; }
.cal-day.today { border-color: var(--border-strong); font-weight: 700; }
.cal-day.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}
.cal-time-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.cal-time-row select {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.cal-time-row .btn { margin-left: auto; }
.cal-selected-label { font-size: 13px; color: var(--text-muted); margin: 10px 0 0; }

/* ---------- Sterren ---------- */
.star-row {
  position: relative;
  display: inline-block;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 3px;
}
.star-row .star-bg { color: var(--border-strong); }
.star-row .star-fg {
  color: var(--star);
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  white-space: nowrap;
}
.star-row.interactive .star-click-layer { position: absolute; inset: 0; display: flex; }
.star-row.interactive .star-click-layer .seg { flex: 1; background: none; border: none; padding: 0; }

.rating-block { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.rating-avg { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); }
.rating-avg b { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.rate-yours { margin-top: 14px; }
.rate-yours .label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}
.rate-value { font-size: 13px; color: var(--text-muted); margin-left: 10px; font-variant-numeric: tabular-nums; }

/* ---------- Segmentkeuze ---------- */
.sort-toggle {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  padding: 4px;
  margin-bottom: 22px;
}
.sort-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  border-radius: var(--pill);
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}
.sort-btn svg { width: 15px; height: 15px; flex: none; }
.sort-btn:hover { color: var(--text); }
.sort-btn.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* ---------- Terugblik ---------- */
.rank-badge {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}
.rank-badge.top1 { background: var(--star); border-color: var(--star); color: #fff; }

/* ---------- Spelers ---------- */
.player-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.player-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.player-header h3 { margin: 0; font-size: 17px; font-weight: 700; }
.you-tag { font-size: 12px; color: var(--text-soft); font-weight: 500; margin-left: 6px; }
.player-stats { display: flex; flex-direction: column; gap: 14px; }
.player-stat-row { display: flex; flex-direction: column; gap: 6px; }
.player-stat-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.player-stat-value { display: flex; align-items: center; gap: 10px; }
.player-stat-sub { font-size: 13px; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.star-display-slot.empty-score { opacity: 0.45; }

/* ---------- Datumpoll ---------- */
.date-mode-toggle { margin-bottom: 0; }
.poll-draft-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.poll-draft-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  padding: 8px 8px 8px 16px;
  font-size: 14px;
}
.poll-draft-item .remove-btn {
  margin-left: auto;
  flex: none;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 13px;
  line-height: 1;
}
.poll-draft-item .remove-btn:hover { background: var(--red-soft); border-color: var(--red-border); color: var(--red); }
.poll-draft-empty { font-size: 13px; color: var(--text-soft); margin-top: 10px; }

.poll-options { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.poll-option-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.poll-option-btn:hover { border-color: var(--accent-border); background: var(--accent-soft); }
.poll-option-btn .votes { font-size: 13px; color: var(--text-muted); flex: none; font-variant-numeric: tabular-nums; }
.poll-option-btn.voted {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.poll-option-btn.voted .votes { color: var(--accent); }
.poll-hint { font-size: 13px; color: var(--text-muted); margin: 0 0 4px; }
.poll-close-btn { margin-top: 6px; }

/* ---------- Man of the Match ---------- */
.motm-block { margin-top: 14px; }
.motm-hint { font-size: 13px; color: var(--text-muted); margin: 0 0 4px; }
.motm-options { margin-top: 8px; }

/* ---------- Inline icoontjes ---------- */
.i { flex: none; }
.btn, .rsvp-btn, .sort-btn, .poll-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.activity-card .when { display: inline-flex; align-items: center; gap: 5px; }
.activity-card .location, .location-link { display: inline-flex; align-items: center; gap: 6px; }
.rate-yours .label { display: flex; align-items: center; gap: 7px; }
.pen-btn .icon { display: inline-flex; }
.empty-state .big { color: var(--text-soft); display: flex; justify-content: center; margin-bottom: 12px; }
.empty-state .big .i { width: 30px; height: 30px; }
.participant .dot { font-size: 0; overflow: hidden; }
.rsvp-btn { white-space: nowrap; padding: 10px 6px; gap: 6px; }
/* Lange datumreeksen mogen de titel niet platdrukken. */
.activity-card .meta-row { flex-wrap: wrap; }
.activity-card h3 { flex: 1 1 200px; }
.activity-card .when { margin-left: auto; }

/* ---------- Beheerblok (in Instellingen of op het startscherm) ---------- */
.admin-block {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 2px;
}
.onboarding .admin-block { border-top: none; padding-top: 0; text-align: left; }
.admin-section { display: flex; flex-direction: column; gap: 14px; }
.admin-heading {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.demo-banner {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.member-sub {
  flex: none;
  font-size: 12px;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}
#admin-activities-section { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Datumpoll: wie stemde waarop ---------- */
.poll-option-label { display: flex; align-items: center; gap: 10px; min-width: 0; }
.poll-voters .avatar-chip {
  width: 22px;
  height: 22px;
  font-size: 9px;
  margin-left: -6px;
  border-width: 2px;
}
.poll-voters .avatar-chip:first-child { margin-left: 0; }

/* ---------- Nog niet gereageerd ---------- */
.participant.pending { color: var(--text-muted); }
.participant.pending .dot { background: var(--border-strong); }

/* ---------- Terugblik schrijven ---------- */
.summary-block { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.summary-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.summary-text.empty { color: var(--text-soft); font-style: italic; }
.summary-by { color: var(--text-soft); font-style: normal; font-size: 13px; }
.summary-edit { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.summary-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}
.summary-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.summary-actions { display: flex; gap: 8px; }
.summary-status { width: 100%; }

/* ---------- Eerstvolgende uitje ---------- */
.next-up {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "label arrow" "title arrow" "meta arrow";
  align-items: center;
  gap: 2px 12px;
  width: 100%;
  text-align: left;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
  color: var(--text);
  transition: background 140ms ease, border-color 140ms ease, transform 90ms ease;
}
.next-up:hover { background: #e6efff; border-color: var(--accent); }
.next-up:active { transform: translateY(1px); }
.next-up__label {
  grid-area: label;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.next-up__title {
  grid-area: title;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.next-up__meta { grid-area: meta; font-size: 13px; color: var(--text-muted); }
.next-up__arrow { grid-area: arrow; width: 20px; height: 20px; color: var(--accent); }
.next-up.is-now { background: var(--green-soft); border-color: var(--green-border); }
.next-up.is-now .next-up__label,
.next-up.is-now .next-up__arrow { color: var(--green); }
.next-up.is-now:hover { background: #dcfce7; border-color: var(--green); }

.activity-card.highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring), var(--shadow-card);
}
@media (prefers-reduced-motion: no-preference) {
  .activity-card { transition: box-shadow 300ms ease, border-color 300ms ease; }
}

/* ---------- Kop gecentreerd, logo wat groter ---------- */
.topbar { padding: 20px 20px 4px; }
.topbar img.logo { height: 44px; }

.view h1 { text-align: center; }
.view .subtitle {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}


/* ---------- Jouw naam in Instellingen ---------- */
.current-name { font-size: 15px; color: var(--text-muted); }
.current-name strong { color: var(--text); font-weight: 700; }
#change-name-row { display: flex; flex-direction: column; gap: 14px; }

/* ---------- Kalender: begin- en einddatum ---------- */
.cal-time-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  min-width: 26px;
}
.cal-hint { font-size: 13px; color: var(--text-soft); margin: 4px 0 0; }

.cal-day.in-range {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
}
.cal-day.range-start { border-radius: 10px 4px 4px 10px; }
.cal-day.range-end { border-radius: 4px 10px 10px 4px; }
.cal-day.range-start.range-end { border-radius: 10px; }
/* Op smalle telefoons moeten alle vijf de labels heel blijven. */
@media (max-width: 420px) {
  .top-nav { padding-left: 10px; padding-right: 10px; }
  .nav-btn { font-size: 9.5px; padding-left: 0; padding-right: 0; }
  .nav-btn .icon svg { width: 20px; height: 20px; }
}

/* ---------- Uitnodiging ---------- */
.invite-checking { font-size: 14px; color: var(--text-muted); margin: 0; }
.invite-intro {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  text-align: left;
}
.invite-row { flex-wrap: wrap; gap: 8px; }
.invite-row .name { flex: 1 1 140px; }
.invite-status {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--pill);
  padding: 3px 10px;
}
.invite-status--open { background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--accent); }
.invite-status--geaccepteerd {
  background: var(--green-soft);
  border: 1px solid var(--green-border);
  color: var(--green);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}
.invite-status--verlopen { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-soft); }
#admin-invites-section { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Rode hoogtepunten ---------- */
.rank-badge.top1 {
  background: var(--highlight);
  border-color: var(--highlight);
  color: #fff;
  box-shadow: 0 4px 10px -4px rgba(220, 38, 38, 0.7);
}
.motm-block .label { color: var(--highlight); }
.poll-option-btn.motm-leader {
  background: var(--highlight-soft);
  border-color: var(--highlight-border);
  color: var(--highlight);
  font-weight: 700;
}
.poll-option-btn.motm-leader .votes { color: var(--highlight); }
.poll-option-btn.motm-leader:hover { background: #fee2e2; border-color: var(--highlight); }
.poll-option-btn.motm-leader.voted { border-color: var(--highlight); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12); }

/* ---------- Groepsfoto op het startscherm ---------- */
.crew-banner {
  margin: 4px 0 22px;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  line-height: 0;
}
.crew-banner img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  object-position: center 38%;
  display: block;
}
@media (min-width: 480px) {
  .crew-banner img { height: 170px; }
}
.view-banner { margin: 8px 0 20px; }
.view-banner img { height: 165px; }
@media (min-width: 480px) {
  .view-banner img { height: 185px; }
}
