/* --- Reset / base --- */
:root {
  /* Per-category and per-segment chip palette. Each token is a tinted
     background + readable foreground + matching border. Used by both
     filter chips (.chip.active) and activity-card badges (.badge). */
  --c-eat-bg: #fef3c7;       --c-eat-fg: #b45309;       --c-eat-bd: #fde68a;
  --c-party-bg: #fce7f3;     --c-party-fg: #be185d;     --c-party-bd: #fbcfe8;
  --c-sport-bg: #d1fae5;     --c-sport-fg: #047857;     --c-sport-bd: #a7f3d0;
  --c-play-bg: #dbeafe;      --c-play-fg: #1d4ed8;      --c-play-bd: #bfdbfe;
  --c-culture-bg: #ede9fe;   --c-culture-fg: #6d28d9;   --c-culture-bd: #ddd6fe;
  --c-music-bg: #fee2e2;     --c-music-fg: #b91c1c;     --c-music-bd: #fecaca;
  --c-market-bg: #ffedd5;    --c-market-fg: #c2410c;    --c-market-bd: #fed7aa;
  --c-education-bg: #cffafe; --c-education-fg: #0e7490; --c-education-bd: #a5f3fc;
  --c-other-bg: #f3f4f6;     --c-other-fg: #4b5563;     --c-other-bd: #d1d5db;

  --s-babies-bg: #fce7f3;    --s-babies-fg: #be185d;    --s-babies-bd: #fbcfe8;
  --s-kids-bg: #fef3c7;      --s-kids-fg: #b45309;      --s-kids-bd: #fde68a;
  --s-youngsters-bg: #d1fae5;--s-youngsters-fg: #047857;--s-youngsters-bd: #a7f3d0;
  --s-adults-bg: #dbeafe;    --s-adults-fg: #1d4ed8;    --s-adults-bd: #bfdbfe;
  --s-seniors-bg: #ede9fe;   --s-seniors-fg: #6d28d9;   --s-seniors-bd: #ddd6fe;
  --s-families-bg: #fee2e2;  --s-families-fg: #b91c1c;  --s-families-bd: #fecaca;
  --s-all-bg: #f3f4f6;       --s-all-fg: #4b5563;       --s-all-bd: #d1d5db;

  --d-morning-bg: #fef9c3;   --d-morning-fg: #a16207;   --d-morning-bd: #fef08a;
  --d-afternoon-bg: #dbeafe; --d-afternoon-fg: #1d4ed8; --d-afternoon-bd: #bfdbfe;
  --d-evening-bg: #ffedd5;   --d-evening-fg: #c2410c;   --d-evening-bd: #fed7aa;
  --d-night-bg: #e0e7ff;     --d-night-fg: #4338ca;     --d-night-bd: #c7d2fe;
}

*, *::before, *::after { box-sizing: border-box; }
/* overflow-x: hidden guards against any single element (a long word, a
   wide image) pushing the page wider than the viewport, which on mobile
   would otherwise let the page scroll sideways / look "zoomed out". */
html, body { margin: 0; padding: 0; width: 100%; max-width: 100%; overflow-x: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  color: #1f2937;
  background: #f7f7f5;
  line-height: 1.45;
}
button { font: inherit; cursor: pointer; }
a { color: #b8336a; }

/* ---- Default button look ------------------------------------------------
   Applies to every <button> and every anchor used as a button inside the
   page body or any modal. `:where()` keeps the specificity at 0, so any
   container-specific rule (.nav, .card .actions, .partner-card .actions,
   .admin-actions, form.stacked button[type=submit], .sidebar .ghost, …)
   still wins automatically without needing !important. */
:where(main, .modal) button,
:where(main, .modal) a[role="button"] {
  background: white; color: #374151; border: 1px solid #e5e7eb;
  padding: 7px 12px; border-radius: 8px; font: inherit; cursor: pointer;
  text-decoration: none; display: inline-block; line-height: 1.2;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
:where(main, .modal) button:hover,
:where(main, .modal) a[role="button"]:hover {
  border-color: #b8336a; color: #b8336a;
}

/* Primary (pink) — the same brand colour as .nav .primary. */
:where(main, .modal) button.primary,
:where(main, .modal) a.primary[role="button"] {
  background: #b8336a; color: white; border-color: #b8336a;
}
:where(main, .modal) button.primary:hover,
:where(main, .modal) a.primary[role="button"]:hover {
  background: #9a285a; border-color: #9a285a; color: white;
}

/* Danger (soft red outline → filled on hover). */
:where(main, .modal) button.danger,
:where(main, .modal) a.danger[role="button"] {
  background: white; color: #b91c1c; border-color: #fecaca;
}
:where(main, .modal) button.danger:hover,
:where(main, .modal) a.danger[role="button"]:hover {
  background: #fef2f2; border-color: #b91c1c; color: #b91c1c;
}

/* Tertiary text-link style (no chrome, just coloured underline). Placed
   after .primary / .danger so combos like `class="link danger"` still get
   the colour but lose the button chrome. */
:where(main, .modal) button.link,
:where(main, .modal) a.link {
  background: none; border: none; color: #b8336a;
  padding: 0; text-decoration: underline; line-height: inherit;
}
:where(main, .modal) button.link:hover,
:where(main, .modal) a.link:hover {
  color: #9a285a; background: none;
}
:where(main, .modal) button.link.danger,
:where(main, .modal) a.link.danger {
  color: #b91c1c; border: none; background: none;
}
:where(main, .modal) button.link.danger:hover,
:where(main, .modal) a.link.danger:hover {
  color: #7f1d1d; background: none;
}

/* --- Topbar --- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky; top: 0; z-index: 10;
}

/* When an admin has set a header background image, paint it on a layer
   behind the topbar contents and overlay a subtle dark gradient so the
   title + nav stay readable. The image URL is delivered as a CSS custom
   property (`--header-bg`) from JS (see applyBranding()). The body
   class .has-header-bg lets us scope these rules without affecting the
   plain white default. */
body.has-header-bg .topbar {
  position: sticky;
  isolation: isolate; /* so ::before stacks below the children */
  color: white;
  background: #1f2937;
}
body.has-header-bg .topbar::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background-image: var(--header-bg);
  background-size: cover;
  background-position: center;
}
body.has-header-bg .topbar::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  /* Slightly stronger overlay at the right side so the nav (which uses
     white text on this layout) stays legible no matter the image. */
  background: linear-gradient(90deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.55) 100%);
}
body.has-header-bg .topbar .brand h1,
body.has-header-bg .topbar .brand p,
body.has-header-bg .topbar .nav .link,
body.has-header-bg .topbar .nav select {
  color: white;
}
body.has-header-bg .topbar .nav .link:hover {
  background: rgba(255,255,255,0.12);
}
body.has-header-bg .topbar .nav select {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.35);
}

/* Brand logo tile takes its content from JS — either gradient "NOH"
   text or a real <img>. When an image is set we drop the gradient and
   round-corner the image instead. */
.logo.has-image { background: transparent !important; padding: 0 !important; }
/* While the logo image is still downloading, keep a neutral gray tile
   rather than a transparent gap or a broken-image placeholder. */
.logo.has-image.is-loading { background: #e5e7eb !important; }
.logo.has-image img { display: block; }
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: inherit;
  border-radius: 10px;
}
.brand:hover { opacity: 0.92; }
.brand:focus-visible { outline: 2px solid #b8336a; outline-offset: 4px; }
.brand h1 { font-size: 1.05rem; margin: 0; color: #1f2937; }
.brand p  { font-size: 0.8rem; margin: 0; color: #6b7280; }
.logo {
  width: 40px; height: 40px; border-radius: 10px;
  /* Neutral gray placeholder shown until branding is applied (see
     applyBranding). The pink "NOH" gradient fallback is set inline by JS
     only when no logo image is configured. */
  background: #e5e7eb;
  color: white; display: grid; place-items: center;
  font-weight: 700; font-size: 0.85rem;
}

.nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nav .link {
  background: none; border: none; padding: 8px 10px; border-radius: 8px;
  color: #374151;
}
.nav .link:hover { background: #f3f4f6; }
.nav .primary {
  background: #b8336a; color: white; border: none; border-radius: 8px;
  padding: 8px 14px;
}
.nav .primary:hover { background: #9a285a; }
.nav select {
  border: 1px solid #e5e7eb; background: white; border-radius: 8px;
  padding: 6px 8px;
}

.hidden { display: none !important; }

/* ---- CSS tooltip ---------------------------------------------------------
   Native `title` attributes are unreliable on macOS Chrome (slow to
   appear, sometimes silently dropped). i18n.js mirrors every translated
   tooltip into a `data-tooltip` attribute and the rules below render it
   instantly via a pseudo-element on hover/focus. */
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute; left: 50%; bottom: calc(100% + 6px);
  transform: translateX(-50%);
  background: rgba(17, 24, 39, 0.95); color: #fff;
  padding: 4px 8px; border-radius: 6px;
  font-size: 0.75rem; font-weight: 500; line-height: 1.2;
  white-space: nowrap; pointer-events: none;
  z-index: 100;
  box-shadow: 0 4px 8px rgba(0,0,0,0.18);
}
[data-tooltip]:hover::before,
[data-tooltip]:focus-visible::before {
  content: '';
  position: absolute; left: 50%; bottom: calc(100% + 1px);
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(17, 24, 39, 0.95);
  pointer-events: none;
  z-index: 100;
}
/* Empty tooltip → nothing renders. */
[data-tooltip=""]:hover::after,
[data-tooltip=""]:focus-visible::after,
[data-tooltip=""]:hover::before,
[data-tooltip=""]:focus-visible::before { content: none; display: none; }

/* Visibility utilities controlled from JS via setAuthVisibility() */
.auth-only, .guest-only, .buurtbouwer-only, .admin-only {
  /* default state set by the .hidden class toggled in JS */
}

/* --- Main layout --- */
main {
  max-width: 1100px; margin: 24px auto; padding: 0 16px;
  display: grid; grid-template-columns: 280px 1fr; gap: 24px;
}
@media (max-width: 800px) { main { grid-template-columns: 1fr; } }

.sidebar {
  background: white; border-radius: 12px; padding: 18px;
  border: 1px solid #e5e7eb; height: fit-content;
  display: flex; flex-direction: column; gap: 14px;
}
.sidebar h3 { margin: 0; font-size: 0.95rem; }
.sidebar .field { display: flex; flex-direction: column; gap: 6px; }
.sidebar .field-label {
  font-size: 0.78rem; color: #6b7280;
  text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600;
}
.sidebar input[type="text"], .sidebar input[type="search"] {
  width: 100%; padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 8px;
  background: white; font: inherit;
}
.sidebar input[type="text"]:focus, .sidebar input[type="search"]:focus {
  outline: none; border-color: #b8336a; box-shadow: 0 0 0 3px rgba(184, 51, 106, 0.15);
}

/* Date picker styled to match the theme.  Native date inputs can't be fully
   restyled, but accent-color tints the picker UI to match the brand color. */
.sidebar input[type="date"] {
  width: 100%; padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 8px;
  background: white; font: inherit; color: #374151;
  accent-color: #b8336a; color-scheme: light;
}
.sidebar input[type="date"]:focus {
  outline: none; border-color: #b8336a; box-shadow: 0 0 0 3px rgba(184, 51, 106, 0.15);
}
.sidebar input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer; opacity: 0.7; filter: invert(0.2) sepia(1) hue-rotate(310deg) saturate(3);
}
.sidebar .date-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Pill toggle chips for category / segment filters and activity-card
   badges. Inactive chips are grey; when active, each category and segment
   gets its own unique tone. The `.badge` class on activity cards always
   uses the tinted "active" appearance. */
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: #f3f4f6; color: #4b5563;
  border: 1px solid transparent;
  padding: 5px 11px; border-radius: 999px;
  font: inherit; font-size: 0.82rem;
  cursor: pointer; transition: background 0.12s, color 0.12s, border-color 0.12s;
  user-select: none;
}
.chip:hover  { background: #e5e7eb; }
.chip:focus  { outline: none; box-shadow: 0 0 0 3px rgba(184, 51, 106, 0.18); }

/* Active filter chip + activity-card badge share the same per-tone styles. */
.chip.active, .badge {
  font-weight: 600;
  border-style: solid;
}

/* Categories + segments now key off data-cat-slug / data-seg-slug because
   the labels are admin-editable and no longer come from the locale files.
   Slugs not in the seeded set fall back to the neutral grey base style. */
.chip.active[data-cat-slug="eat"],       .badge[data-cat-slug="eat"]       { background: var(--c-eat-bg);       color: var(--c-eat-fg);       border-color: var(--c-eat-bd); }
.chip.active[data-cat-slug="party"],     .badge[data-cat-slug="party"]     { background: var(--c-party-bg);     color: var(--c-party-fg);     border-color: var(--c-party-bd); }
.chip.active[data-cat-slug="sport"],     .badge[data-cat-slug="sport"]     { background: var(--c-sport-bg);     color: var(--c-sport-fg);     border-color: var(--c-sport-bd); }
.chip.active[data-cat-slug="play"],      .badge[data-cat-slug="play"]      { background: var(--c-play-bg);      color: var(--c-play-fg);      border-color: var(--c-play-bd); }
.chip.active[data-cat-slug="culture"],   .badge[data-cat-slug="culture"]   { background: var(--c-culture-bg);   color: var(--c-culture-fg);   border-color: var(--c-culture-bd); }
.chip.active[data-cat-slug="music"],     .badge[data-cat-slug="music"]     { background: var(--c-music-bg);     color: var(--c-music-fg);     border-color: var(--c-music-bd); }
.chip.active[data-cat-slug="market"],    .badge[data-cat-slug="market"]    { background: var(--c-market-bg);    color: var(--c-market-fg);    border-color: var(--c-market-bd); }
.chip.active[data-cat-slug="education"], .badge[data-cat-slug="education"] { background: var(--c-education-bg); color: var(--c-education-fg); border-color: var(--c-education-bd); }
.chip.active[data-cat-slug="other"],     .badge[data-cat-slug="other"]     { background: var(--c-other-bg);     color: var(--c-other-fg);     border-color: var(--c-other-bd); }

.chip.active[data-seg-slug="babies"],     .badge[data-seg-slug="babies"]     { background: var(--s-babies-bg);     color: var(--s-babies-fg);     border-color: var(--s-babies-bd); }
.chip.active[data-seg-slug="kids"],       .badge[data-seg-slug="kids"]       { background: var(--s-kids-bg);       color: var(--s-kids-fg);       border-color: var(--s-kids-bd); }
.chip.active[data-seg-slug="youngsters"], .badge[data-seg-slug="youngsters"] { background: var(--s-youngsters-bg); color: var(--s-youngsters-fg); border-color: var(--s-youngsters-bd); }
.chip.active[data-seg-slug="adults"],     .badge[data-seg-slug="adults"]     { background: var(--s-adults-bg);     color: var(--s-adults-fg);     border-color: var(--s-adults-bd); }
.chip.active[data-seg-slug="seniors"],    .badge[data-seg-slug="seniors"]    { background: var(--s-seniors-bg);    color: var(--s-seniors-fg);    border-color: var(--s-seniors-bd); }
.chip.active[data-seg-slug="families"],   .badge[data-seg-slug="families"]   { background: var(--s-families-bg);   color: var(--s-families-fg);   border-color: var(--s-families-bd); }
.chip.active[data-seg-slug="all"],        .badge[data-seg-slug="all"]        { background: var(--s-all-bg);        color: var(--s-all-fg);        border-color: var(--s-all-bd); }

/* Conversation-language filter chips — same palette as the corner chip on
   organisation cards (.partner-card-lang) so the user instantly recognises
   the filter as "the language of the organisation/activity". */
.chip.active[data-i18n="partners.conversation_lang.nl"]    { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.chip.active[data-i18n="partners.conversation_lang.fr"]    { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.chip.active[data-i18n="partners.conversation_lang.multi"] { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }
.chip.active[data-i18n="partners.conversation_lang.other"] { background: #fef3c7; color: #92400e; border-color: #fde68a; }

.chip.active[data-i18n="daypart.morning"]   { background: var(--d-morning-bg);   color: var(--d-morning-fg);   border-color: var(--d-morning-bd); }
.chip.active[data-i18n="daypart.afternoon"] { background: var(--d-afternoon-bg); color: var(--d-afternoon-fg); border-color: var(--d-afternoon-bd); }
.chip.active[data-i18n="daypart.evening"]   { background: var(--d-evening-bg);   color: var(--d-evening-fg);   border-color: var(--d-evening-bd); }
.chip.active[data-i18n="daypart.night"]     { background: var(--d-night-bg);     color: var(--d-night-fg);     border-color: var(--d-night-bd); }

.sidebar .ghost {
  width: 100%; background: none; border: 1px solid #e5e7eb;
  padding: 8px 12px; border-radius: 8px; color: #6b7280;
  font: inherit; cursor: pointer; transition: background 0.12s, color 0.12s;
}
.sidebar .ghost:hover { background: #f9fafb; color: #b8336a; }

/* --- Activity cards --- */
.section-title {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.cards { display: grid; gap: 12px; }
.card {
  background: white; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px;
  display: grid; grid-template-columns: 80px 1fr; gap: 16px;
}
.date-block {
  background: #fdf2f5; border-radius: 10px; padding: 10px 0; text-align: center;
  align-self: start;
}
.date-block .day   { font-size: 1.5rem; font-weight: 700; color: #b8336a; line-height: 1; }
.date-block .month { font-size: 0.75rem; text-transform: uppercase; color: #b8336a; letter-spacing: 0.04em; }
.date-block .time  { font-size: 0.75rem; color: #6b7280; margin-top: 4px; }

/* Grid children default to min-width:auto, which lets a long unbroken word
   or URL in the body blow the 1fr track past the viewport. min-width:0 +
   overflow-wrap lets the text wrap and the card stay within the screen. */
.card > * { min-width: 0; }
.card h3 { margin: 0 0 4px; font-size: 1.05rem; overflow-wrap: anywhere; }
.card .meta { font-size: 0.8rem; color: #6b7280; margin-bottom: 8px; overflow-wrap: anywhere; }
.card .description { white-space: pre-wrap; color: #374151; overflow-wrap: anywhere; }
/* Activity-card badges share the same look as filter chips. Each badge's
   actual colour comes from the per-tone rules above. Default styling here
   provides shape + sizing for items that don't match a known category /
   segment tone. */
.card .badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge {
  font-size: 0.82rem; padding: 4px 11px; border-radius: 999px;
  background: #f3f4f6; color: #4b5563;
  border: 1px solid transparent;
}
.card .actions {
  display: flex; gap: 8px; margin-top: 8px; font-size: 0.85rem;
}
.card .actions button {
  background: none; border: none; color: #6b7280; padding: 0; text-decoration: underline;
}
.card .actions button:hover { color: #b8336a; }

/* Whole activity card is clickable to its detail page, with a red hover
   border — same behaviour as the people cards. The title's <a> provides a
   stretched overlay (::after covering the card). The author link and the
   action buttons are lifted above the overlay via z-index so they keep
   their own, separate click targets. Scoped to .activity-card so the
   reused .card chrome on detail-page headers is unaffected. */
.activity-card { position: relative; }
.activity-card:hover { border-color: #b8336a; }
.activity-card h3 a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.activity-card .meta a,
.activity-card .actions { position: relative; z-index: 2; }

/* Poster thumbnail on the right of an activity card. Only present when the
   activity has a poster (JS adds .has-poster + the third grid cell). The
   image is small and cropped to a consistent portrait box so cards stay
   tidy regardless of the source aspect ratio. */
.card.has-poster { grid-template-columns: 80px 1fr auto; }
.card-poster-link { display: block; line-height: 0; align-self: start; }
.card-poster {
  width: 84px; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: 8px; border: 1px solid #e5e7eb; background: #f9fafb;
  display: block;
}
@media (max-width: 600px) {
  .card.has-poster { gap: 10px; }
  .card-poster { width: 60px; }
}

.empty {
  background: white; padding: 24px; border-radius: 12px; text-align: center; color: #6b7280;
  border: 1px dashed #e5e7eb;
}

/* --- Profiles list --- */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.profile-card {
  background: white; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; cursor: pointer;
}
.profile-card:hover { border-color: #b8336a; }
.profile-card .type {
  display: inline-block; font-size: 0.7rem; padding: 2px 8px; border-radius: 999px;
  background: #f3f4f6; color: #4b5563; margin-bottom: 6px;
}
.profile-card h4 { margin: 0; font-size: 1rem; }
.profile-card p  { margin: 4px 0 0; color: #6b7280; font-size: 0.85rem; }

/* --- Forms --- */
form.stacked { display: grid; gap: 12px; }
form.stacked label, form.stacked .form-field { font-size: 0.85rem; color: #4b5563; display: grid; gap: 4px; }
form.stacked input, form.stacked textarea, form.stacked select {
  padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 8px; background: white; font: inherit;
}
form.stacked textarea { min-height: 100px; resize: vertical; }
form.stacked .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
form.stacked button[type="submit"] {
  background: #b8336a; color: white; border: none; padding: 10px 14px; border-radius: 8px;
}
form.stacked .errors { color: #b91c1c; font-size: 0.85rem; }

/* Post-registration choice step (modal) */
.post-register-actions {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}
.post-register-actions button {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  background: white;
  color: #374151;
}
.post-register-actions button:hover {
  border-color: #b8336a;
  color: #b8336a;
}
.post-register-actions button.primary {
  background: #b8336a;
  color: white;
  border-color: #b8336a;
}
.post-register-actions button.primary:hover {
  background: #9a285a;
  border-color: #9a285a;
  color: white;
}

/* --- Modal --- */
.modal-root { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.modal {
  position: relative; background: white; border-radius: 14px; padding: 20px;
  max-width: 520px; width: 92%; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
.modal h2 { margin-top: 0; }
.modal .close {
  position: absolute; top: 12px; right: 12px; background: none; border: none; font-size: 1.4rem; color: #6b7280;
}

/* --- Footer --- */
.footer { text-align: center; color: #9ca3af; padding: 24px 0; }

/* utilities */
.muted { color: #6b7280; }
.flex  { display: flex; gap: 8px; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; }
.pill { font-size: 0.7rem; padding: 2px 8px; border-radius: 999px; background: #f3f4f6; color: #4b5563; }

/* Active state for nav links (both desktop top nav and mobile page-tabs) */
.nav .link.active, .page-tabs a.active { color: #b8336a; font-weight: 600; }

/* Page tabs — a horizontal scrollable strip below the topbar, used as the
   primary navigation on mobile. Hidden on desktop. */
.page-tabs {
  display: none;   /* shown via media query */
  gap: 4px;
  padding: 0 8px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky; top: 64px; z-index: 9;
  /* Static strip: no sideways scrolling. The tabs share the width evenly
     and never overflow the screen. */
  justify-content: space-around;
}
.page-tabs a {
  flex: 1 1 0; min-width: 0;
  text-align: center;
  padding: 10px 6px;
  color: #6b7280; text-decoration: none; font-size: 0.9rem; font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.page-tabs a:hover  { color: #b8336a; }
.page-tabs a.active { color: #b8336a; border-bottom-color: #b8336a; font-weight: 600; }

/* Mobile filter toggle — a button to expand/collapse the calendar sidebar */
.filter-toggle {
  display: none;
  align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px;
  background: white; border: 1px solid #e5e7eb;
  font: inherit; color: #374151; cursor: pointer;
  margin-bottom: 12px;
}
.filter-toggle:hover { border-color: #b8336a; color: #b8336a; }
.filter-toggle .arrow { transition: transform 0.15s; }
.filter-toggle[aria-expanded="true"] .arrow { transform: rotate(180deg); }

/* ===========================================================================
   Mobile breakpoints
   =========================================================================== */
.mobile-only  { display: none !important; }
.desktop-only { display: inline-flex; }

@media (max-width: 800px) {
  /* iOS Safari auto-zooms the whole page when a focused input has a
     font-size below 16px, and never zooms back out — which is exactly
     the "everything looks zoomed in after login" symptom. Forcing 16px
     on every form control on mobile prevents that zoom entirely. */
  input, textarea, select { font-size: 16px; }

  /* Topbar: tighter padding, brand p hidden to save space */
  .topbar { padding: 10px 12px; gap: 8px; }
  .brand p { display: none; }
  .brand h1 { font-size: 0.95rem; }

  /* Show mobile-only elements, hide desktop-only ones. The :not(.hidden)
     guard makes sure auth-toggled elements still respect the .hidden flag
     (otherwise this !important would override .hidden's). */
  .desktop-only { display: none !important; }
  .mobile-only:not(.hidden)  { display: inline-flex !important; }
  .page-tabs:not(.hidden)    { display: flex !important; }

  /* Compact nav (only language switcher + auth button + new-activity remain) */
  .nav { gap: 6px; }

  /* Calendar layout: single column. Sidebar collapses behind the toggle. */
  main { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
  .filter-toggle { display: inline-flex; }
  .sidebar { display: none; }
  .sidebar.open { display: flex; }

  /* Tighter cards */
  .card { grid-template-columns: 70px 1fr; gap: 12px; padding: 14px; }
  .card.has-poster { grid-template-columns: 70px 1fr auto; }
  .partner-grid, .profile-grid { grid-template-columns: 1fr; }

  /* Modal full-width-ish on mobile */
  .modal { width: 96%; padding: 16px; }

  /* Form rows collapse to one column */
  form.stacked .row { grid-template-columns: 1fr; }
}
.pill.admin       { background: #fff7ed; color: #b45309; border: 1px solid #fed7aa; }
.pill.buurtbouwer { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.pill.hidden      { background: #f3f4f6; color: #6b7280; border: 1px solid #d1d5db; }

/* Inline horizontal filter bar (used on Organisaties page).
   The Categorie filter has by far the most + longest chips (14 long
   labels), Doelgroep has 7 short ones, and Omgangstaal only 3 tiny
   ones. So instead of equal flex columns (which produced one very tall
   column next to two mostly-empty ones), we use a 5/3/2 grid that gives
   each filter group room proportional to its content. The clear button,
   when present, sits on its own row underneath, right-aligned. */
.inline-filters {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 2fr);
  gap: 14px 20px; align-items: flex-start;
  background: white; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px;
  margin-top: 8px;
}
.inline-filter-field {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
}
.inline-filter-field .field-label {
  font-size: 0.78rem; color: #6b7280;
  text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600;
}
.inline-filters > .ghost.small {
  grid-column: 1 / -1;
  justify-self: end;
  align-self: center;
}
.ghost.small { padding: 6px 10px; font-size: 0.85rem; }

@media (max-width: 800px) {
  .inline-filters {
    grid-template-columns: 1fr;
  }
  .inline-filters > .ghost.small {
    justify-self: stretch;
  }
}

/* Tabs (used on profile list) */
.tabs {
  display: flex; gap: 4px; border-bottom: 1px solid #e5e7eb; margin-bottom: 16px;
}
.tabs a {
  padding: 8px 14px; border-radius: 8px 8px 0 0;
  color: #6b7280; text-decoration: none; font-size: 0.9rem; font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover  { color: #b8336a; }
.tabs a.active { color: #b8336a; border-bottom-color: #b8336a; }

/* Card / row that's hidden by an admin: dim it slightly */
.is-hidden { opacity: 0.55; }

/* Admin user-management table */
.admin-table-wrap { background: white; border: 1px solid #e5e7eb; border-radius: 12px; overflow-x: auto; }
.admin-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table th, .admin-table td {
  padding: 10px 12px; text-align: left; vertical-align: middle;
  border-bottom: 1px solid #f3f4f6;
}
.admin-table th {
  background: #f9fafb; font-weight: 600; color: #4b5563;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr.is-hidden { opacity: 0.55; }
.admin-table .admin-actions {
  margin-top: 0; padding-top: 0; border-top: none;
}

.admin-actions {
  display: flex; gap: 8px; flex-wrap: wrap; padding-top: 8px;
  border-top: 1px dashed #e5e7eb; margin-top: 8px;
  font-size: 0.8rem;
}
.admin-actions button {
  background: none; border: none; padding: 0;
  text-decoration: underline; color: #6b7280; cursor: pointer;
}
.admin-actions button:hover { color: #b8336a; }
.admin-actions .danger:hover { color: #b91c1c; }

/* nav links should look like buttons */
.nav a.link { text-decoration: none; }

/* Partner cards */
/* Max 3 columns on desktop; a single full-width card below that. Two
   cards side-by-side on tablet/mobile leaves too little room per card
   (chip labels wrap, descriptions get cramped) so we go straight from
   three-across to one-across. */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px) {
  .partner-grid { grid-template-columns: 1fr; }
}
.partner-card {
  position: relative;
  background: white; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.partner-card > a {
  display: block;
  min-width: 0;
  padding-right: 44px;
}
/* Whole card is clickable to the detail page, with a red hover border —
   same behaviour as the people cards. The content <a> gets a stretched
   overlay (::after covering the card); the actions row and the admin
   control strip sit above it via z-index so their buttons keep working. */
.partner-card:hover { border-color: #b8336a; }
.partner-card > a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.partner-card .actions { position: relative; z-index: 2; }
.partner-card-lang {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 3px 9px;
  line-height: 1.2;
  pointer-events: none;
  /* Defaults (overridden per-language below). */
  color: #4b5563;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}
.partner-card-lang[data-lang="nl"]    { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.partner-card-lang[data-lang="fr"]    { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.partner-card-lang[data-lang="multi"] { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }
.partner-card-lang[data-lang="other"] { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.partner-detail-card { position: relative; padding-right: 60px; }
.partner-detail-lang { top: 16px; right: 16px; font-size: 0.8rem; padding: 4px 11px; }
.partner-card img { max-height: 60px; max-width: 100%; object-fit: contain; align-self: flex-start; }
.partner-card h4 { margin: 0; }
.partner-card p { margin: 0; color: #4b5563; font-size: 0.9rem; }
/* "… toon meer" inside a truncated description. The whole card is
   already wrapped in an <a> so clicking anywhere navigates to the
   detail page — this span just gives the affordance. */
.partner-card .read-more {
  margin-left: 4px;
  color: #b8336a; font-weight: 500;
  white-space: nowrap;
}
.partner-card a:hover .read-more { text-decoration: underline; }
.partner-card a:hover h4 { color: #b8336a; }
/* Chip block on org cards. The org-category label can be long ("Studie-
   begeleiding & Huiswerkbegeleiding"), so the badge has to (a) stay inside
   the card, (b) wrap onto multiple lines when needed, and (c) never
   collide with the language chip in the top-right corner.

   `.card .badges` further up only matches activity cards, so org cards
   need their own rule. We use a softer rounded-rect (10px) instead of a
   full pill so wrapped labels look intentional. */
.partner-card .badges {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 4px; max-width: 100%;
}
.partner-card .badges .badge {
  max-width: 100%;
  white-space: normal;
  line-height: 1.3;
  border-radius: 10px;
  /* Slightly tighter padding than the default activity-card chip so long
     labels feel proportional to the card. */
  padding: 3px 9px;
  font-size: 0.78rem;
}
.partner-card .actions { margin-top: auto; display: flex; gap: 8px; font-size: 0.85rem; }

/* ===========================================================================
   Maps (Leaflet) — overview map view, detail mini-map, form location picker
   =========================================================================== */
/* Overview: list/map view toggle sits just under the filter bar. */
.view-toggle {
  display: inline-flex; margin-top: 12px;
  border: 1px solid #e5e7eb; border-radius: 999px; overflow: hidden; background: #fff;
}
.view-toggle-btn {
  background: none; border: none; padding: 7px 18px; font: inherit; font-size: 0.9rem;
  color: #6b7280; cursor: pointer;
}
.view-toggle-btn.active { background: #b8336a; color: #fff; }
.view-toggle-btn:not(.active):hover { background: #f3f4f6; color: #b8336a; }

/* Overview map. Tall enough to be useful, capped so it doesn't dominate. */
.partner-map {
  height: 60vh; min-height: 360px; max-height: 640px; width: 100%;
  border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden;
}
/* Detail-page mini-map + form picker map. */
.partner-detail-map,
.location-picker-map {
  height: 260px; width: 100%;
  border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden;
}
.location-picker-map { margin-top: 8px; background: #f3f4f6; }

/* Form location picker: address search row + controls. */
.location-search-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.location-search-row input[type="text"] {
  flex: 1 1 200px; min-width: 0; padding: 8px 10px;
  border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; font: inherit;
}
.location-search-row input[type="text"]:focus {
  outline: none; border-color: #b8336a; box-shadow: 0 0 0 3px rgba(184, 51, 106, 0.15);
}
.location-picker-controls {
  display: flex; gap: 12px; align-items: center; margin-top: 6px; flex-wrap: wrap;
}

/* Hover popup on the overview map: logo thumbnail + org name, clickable. */
.map-popup { display: flex; align-items: center; gap: 8px; }
.map-popup-logo {
  width: 34px; height: 34px; object-fit: contain; border-radius: 6px;
  background: #f9fafb; border: 1px solid #e5e7eb; flex: 0 0 auto;
}
.map-popup-name { font-weight: 600; color: #1f2937; }
/* Leaflet paints controls/panes above our sticky topbar (z-index 10) by
   default; keep the map stack below it so pins never overlap the header. */
.leaflet-container { z-index: 0; }

/* ---- Partner edit page ---------------------------------------------------
   Full-page editor for organisations (was a modal until v20260701).
   Each logical group of fields sits in its own card so a long form is
   easy to scan. `form-card` provides the card chrome; `partner-edit-form`
   spaces the cards apart and constrains the max width for readability. */
.partner-edit-page {
  max-width: 780px;
  margin: 0 auto;
}
.partner-edit-form {
  display: grid; gap: 16px; margin-top: 12px;
}
.form-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
.form-card-header {
  padding: 14px 18px 6px;
  border-bottom: 1px solid #f3f4f6;
}
.form-card-header h3 {
  margin: 0; font-size: 0.95rem; font-weight: 600; color: #111827;
}
.form-card-header p {
  margin: 4px 0 0; font-size: 0.82rem;
}
.form-card-body {
  padding: 14px 18px 18px;
  display: grid; gap: 14px;
}
.partner-edit-form .row {
  grid-template-columns: 1fr 1fr; gap: 14px;
  /* Do NOT stretch children to the tallest cell — otherwise the Website
     input's grid parent (a <label>) grows to match the taller Logo cell
     next to it and its own row-track balloons, pushing the input taller
     than expected. Stretch is the CSS grid default; we override here. */
  align-items: start;
}
@media (max-width: 720px) {
  .partner-edit-form .row { grid-template-columns: 1fr; }
}
/* Same reason inside a row's <label> containers: keep the input at its
   intrinsic height regardless of neighbouring cell height. */
.partner-edit-form .row > label,
.partner-edit-form .row > .form-field {
  align-self: start;
}

/* Logo field: URL input on top, then a small row containing a file
   picker and a live preview thumbnail. Users get instant visual
   feedback whether the URL (typed or uploaded) actually resolves. */
.logo-field-controls {
  display: flex; gap: 12px; align-items: center; margin-top: 6px;
  flex-wrap: wrap;
}
.logo-preview {
  width: 48px; height: 48px; object-fit: contain;
  border: 1px solid #e5e7eb; border-radius: 8px;
  background: #f9fafb; padding: 4px;
  display: block;
}
.logo-preview-link {
  display: inline-block; line-height: 0;
  border-radius: 8px;
  transition: transform 0.12s, border-color 0.12s;
}
.logo-preview-link:hover { transform: scale(1.06); }
.logo-preview-link:hover .logo-preview { border-color: #b8336a; }

/* Activity poster form field — mirrors the logo field. Preview is a bit
   wider (posters are usually portrait flyers rather than square logos). */
.poster-field-controls {
  display: flex; gap: 12px; align-items: center; margin-top: 6px;
  flex-wrap: wrap;
}
.poster-preview {
  width: 64px; height: 84px; object-fit: cover;
  border: 1px solid #e5e7eb; border-radius: 8px;
  background: #f9fafb; display: block;
}
.poster-preview-link {
  display: inline-block; line-height: 0;
  border-radius: 8px;
  transition: transform 0.12s, border-color 0.12s;
}
.poster-preview-link:hover { transform: scale(1.06); }
.poster-preview-link:hover .poster-preview { border-color: #b8336a; }

/* Calendar-external toggle: the caption sits inline with the pill. */
.form-card .toggle-row .checkbox-label {
  padding-top: 0;
  gap: 12px;
  align-items: center;
}
.toggle-caption {
  font-size: 0.9rem; color: #374151; line-height: 1.4;
}

/* Modernised input chrome inside the partner edit page. Subtle default,
   pink focus ring matching the rest of the app. Applies to inputs,
   textareas and selects; the pill toggle for the calendar_external
   checkbox is styled separately. */
.partner-edit-form input[type="text"],
.partner-edit-form input[type="email"],
.partner-edit-form input[type="tel"],
.partner-edit-form input[type="url"],
.partner-edit-form textarea,
.partner-edit-form select {
  padding: 9px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  font: inherit;
  color: #111827;
  transition: border-color 0.12s, box-shadow 0.12s;
  width: 100%;
}
.partner-edit-form textarea { line-height: 1.5; resize: vertical; }
.partner-edit-form input[type="text"]:focus,
.partner-edit-form input[type="email"]:focus,
.partner-edit-form input[type="tel"]:focus,
.partner-edit-form input[type="url"]:focus,
.partner-edit-form textarea:focus,
.partner-edit-form select:focus {
  outline: none;
  border-color: #b8336a;
  box-shadow: 0 0 0 3px rgba(184, 51, 106, 0.15);
}
.partner-edit-form label > span:first-child,
.partner-edit-form .form-field > span:first-child {
  font-size: 0.82rem;
  font-weight: 600;
  color: #4b5563;
  letter-spacing: 0.02em;
}

/* Small in-flow row that pairs the "Vertaal lege velden" button with
   its hint text. Only used on the partner + activity edit pages. */
.inline-hint {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: -4px;
}
.inline-hint p { margin: 0; font-size: 0.8rem; }

/* Sticky-style action bar at the bottom of the partner edit page. */
.partner-edit-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 0 4px;
}

/* Repeatable input list (used by the partner form for multiple contact
   emails / phone numbers). Each row stacks an <input> next to a small
   × button; an "Add" link at the bottom appends another row. */
.repeatable { display: flex; flex-direction: column; gap: 6px; }
.repeatable-row { display: flex; gap: 6px; align-items: center; }
.repeatable-row > input { flex: 1; min-width: 0; }
.repeatable-remove {
  background: none; border: none; cursor: pointer;
  color: #9ca3af; font-size: 1.2rem; line-height: 1;
  padding: 4px 8px; border-radius: 6px;
}
.repeatable-remove:hover { color: #b91c1c; background: #fef2f2; }
.repeatable-add {
  align-self: flex-start; margin-top: 2px;
  font-size: 0.85rem; padding: 0 !important;
}

/* Horizontal "or" divider between Google Sign-In and the email/password
   fields in the login modal. */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  color: #9ca3af; font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.06em;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: #e5e7eb;
}
#google-signin-slot {
  display: flex; justify-content: center;
}

form.stacked label.checkbox-label {
  /* The base rule `form.stacked label` sets display: grid, which would
     stack the checkbox + caption in two grid rows. Explicit `display:
     flex` keeps them side-by-side. */
  display: flex; flex-direction: row; align-items: center; gap: 10px;
  padding-top: 18px;
  cursor: pointer; user-select: none;
}

/* Pill-style toggle for every native checkbox inside a .checkbox-label.
   We keep the real <input type="checkbox">  in the markup (so the click
   behaviour, form submission and `checked` state stay native), but
   replace its visuals with a 36×20 track + 16×16 thumb that slides
   right when checked. `appearance: none` strips the OS chrome on all
   modern browsers; the existing form.stacked input width rule is
   overridden by the explicit width below. */
form.stacked label.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 36px; height: 20px; flex-shrink: 0;
  margin: 0; padding: 0;
  background: #d1d5db;
  border: none; border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease;
}
form.stacked label.checkbox-label input[type="checkbox"]::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18);
  transition: transform 0.18s ease;
}
form.stacked label.checkbox-label input[type="checkbox"]:checked {
  background: #b8336a;
}
form.stacked label.checkbox-label input[type="checkbox"]:checked::after {
  transform: translateX(16px);
}
form.stacked label.checkbox-label input[type="checkbox"]:focus-visible {
  outline: 2px solid #b8336a;
  outline-offset: 2px;
}
form.stacked label.checkbox-label input[type="checkbox"]:disabled {
  opacity: 0.5; cursor: not-allowed;
}
.partner-card .actions button { background: none; border: none; color: #6b7280; padding: 0; text-decoration: underline; cursor: pointer; }
.partner-card .actions button:hover { color: #b8336a; }

/* Admin-only control strip on each partner card. Floats top-left so it
   doesn't clash with the language corner chip at top-right. Buttons
   sit on a translucent background that pops on hover. */
.partner-card-admin {
  position: absolute; top: 8px; left: 8px;
  display: flex; gap: 4px; align-items: center;
  background: rgba(255,255,255,0.92);
  border-radius: 8px; padding: 2px 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  z-index: 2;
}
.partner-card-grip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; color: #6b7280;
  cursor: grab;
}
.partner-card-grip:active { cursor: grabbing; }
.partner-card-eye {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; padding: 0; border-radius: 6px;
  background: none; border: 1px solid transparent; color: #4b5563; cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.partner-card-eye:hover { background: #f3f4f6; color: #b8336a; border-color: #e5e7eb; }
/* Hidden orgs get a faint red tint on the eye so the admin spots them. */
.partner-card.is-hidden .partner-card-eye { color: #b91c1c; }

/* Drag affordance. The whole card becomes a drag handle for admins, and
   the cursor reflects that. While being dragged it dims; the drop
   target gets an obvious dashed outline. */
.partner-card[draggable="true"] { cursor: grab; }
.partner-card[draggable="true"]:active { cursor: grabbing; }
.partner-card.is-dragging { opacity: 0.45; }
.partner-card.drag-over   { outline: 2px dashed #b8336a; outline-offset: -2px; }

/* Drag-reorder UI for the admin taxonomy tables. Each row gets a grip
   icon in the leading cell and the whole row becomes the drag handle
   (so the OS handles cursor + ghost preview natively). */
.admin-table tr[draggable="true"]            { cursor: grab; }
.admin-table tr[draggable="true"]:active     { cursor: grabbing; }
.admin-table tr[draggable="true"].is-dragging { opacity: 0.45; }
.admin-table tr[draggable="true"].drag-over   { background: #fef3c7; }
.admin-table .tax-grip-cell { width: 32px; text-align: center; color: #9ca3af; }
.admin-table .tax-grip      { display: inline-flex; align-items: center; justify-content: center; }
.admin-table tr[draggable="true"]:hover .tax-grip { color: #6b7280; }

/* --- Orgs overview: mobile "Acties" dropdown ------------------------------
   On desktop the two buttons (Aanpassen + Organisatie toevoegen) sit
   inline; on mobile they collapse behind a single "Acties ▾" trigger to
   keep the page header tidy. */
.actions-wrap { position: relative; display: inline-flex; }
.actions-menu { display: flex; gap: 8px; }
.actions-trigger {
  background: white; color: #374151;
  border: 1px solid #e5e7eb; border-radius: 8px;
  padding: 7px 12px; font: inherit; cursor: pointer;
}
.actions-trigger::after { content: ' ▾'; }
.actions-trigger:hover { border-color: #b8336a; color: #b8336a; }
@media (max-width: 800px) {
  .actions-menu {
    display: none;
    position: absolute; right: 0; top: calc(100% + 6px);
    flex-direction: column; gap: 6px;
    background: white; border: 1px solid #e5e7eb;
    border-radius: 10px; padding: 8px;
    min-width: 220px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    z-index: 20;
  }
  .actions-wrap.open .actions-menu { display: flex; }
  .actions-menu > button { width: 100%; text-align: left; }
}

/* --- Orgs overview: mobile filters toggle ---------------------------------
   Same pattern as the calendar-page sidebar toggle. On desktop the
   trigger is hidden and .inline-filters stays visible; on mobile the
   trigger toggles a collapsed state. */
.filters-mobile-toggle {
  display: none;
  align-items: center; justify-content: space-between;
  gap: 8px; width: 100%;
  background: white; color: #374151;
  border: 1px solid #e5e7eb; border-radius: 8px;
  padding: 10px 14px; font: inherit; font-weight: 500; cursor: pointer;
  margin-top: 8px;
}
.filters-mobile-toggle .arrow { transition: transform 0.15s; }
.filters-wrap.open .filters-mobile-toggle .arrow { transform: rotate(180deg); }
.filters-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  background: #b8336a; color: white; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600;
  margin-left: auto;
}
@media (max-width: 800px) {
  .filters-mobile-toggle { display: flex; }
  .filters-wrap .inline-filters { display: none; }
  .filters-wrap.open .inline-filters { display: grid; }
}

/* Admin "modify" toggle on the org overview. Off state mirrors the
   default button look; on state turns pink to make it obvious that
   editing affordances are active. */
.modify-toggle.is-on {
  background: #fef3c7 !important;
  border-color: #fcd34d !important;
  color: #92400e !important;
}
.modify-toggle.is-on:hover {
  background: #fde68a !important;
  border-color: #f59e0b !important;
}

/* Activity detail page */
.activity-detail { background: white; border: 1px solid #e5e7eb; border-radius: 12px; padding: 24px; }
.activity-detail h1 { margin: 0 0 8px 0; }
.activity-detail .meta { color: #6b7280; margin-bottom: 16px; }
.activity-poster-link { display: block; line-height: 0; margin: 16px 0 0; }
.activity-poster {
  max-width: 100%; max-height: 460px; height: auto;
  border-radius: 12px; border: 1px solid #e5e7eb; display: block;
}
.activity-detail .description { white-space: pre-wrap; margin: 16px 0; line-height: 1.6; }
.activity-detail .external-link {
  display: inline-block; background: #b8336a; color: white; padding: 8px 14px;
  border-radius: 8px; text-decoration: none; margin-top: 8px;
}
.activity-detail .external-link:hover { background: #9a285a; }
.activity-detail .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

.translated-note {
  font-size: 0.75rem; color: #92400e; background: #fef3c7;
  padding: 2px 8px; border-radius: 999px; display: inline-block; margin-left: 6px;
}
