/* ============================================================
   Vale of Clwyd Scout District — Booking System Stylesheet
   ============================================================ */

/* ── Custom properties ─────────────────────────────────────── */
:root {
  --purple-dark:  #6B0000;
  --purple:       #E3000B;
  --purple-light: #FF8A80;
  --purple-pale:  #FFF0F0;
  --teal:         #00897B;
  --teal-light:   #E0F2F1;
  --amber:        #E65100;
  --amber-light:  #FFF3E0;
  --green:        #2E7D32;
  --green-light:  #E8F5E9;
  --red:          #C62828;
  --red-light:    #FFEBEE;
  --blue:         #1565C0;
  --blue-light:   #E3F2FD;
  --grey-50:      #FAFAFA;
  --grey-100:     #F5F5F5;
  --grey-200:     #EEEEEE;
  --grey-300:     #E0E0E0;
  --grey-500:     #9E9E9E;
  --grey-700:     #616161;
  --grey-900:     #212121;

  --radius:       12px;
  --radius-sm:    6px;
  --shadow:       0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:    0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --transition:   0.15s ease;
  --max-width:    1100px;
  --nav-height:   56px;
}

/* ── Reset & base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--grey-900);
  background: var(--grey-50);
  min-height: 100vh;
}

a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: 'Arial Black', 'Arial Bold', system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.25;
  color: var(--purple-dark);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

hr.divider { border: none; border-top: 1px solid var(--grey-200); margin: 1.5rem 0; }
.section-heading { font-size: 0.95rem; font-weight: 700; color: var(--grey-700); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.text-muted { color: var(--grey-500); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }

/* ── Layout ────────────────────────────────────────────────── */
--sidebar-width: 240px;

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width, 240px);
  min-height: 100vh;
  background: var(--purple-dark);
  position: fixed;
  left: 0; top: 0; bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

.sidebar__brand {
  padding: 1.25rem 1rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  flex-shrink: 0;
}
.sidebar__brand-link {
  color: #fff;
  text-decoration: none;
  font-family: 'Arial Black', system-ui, sans-serif;
  font-weight: 900;
  font-size: 1rem;
  line-height: 1.3;
  display: block;
}
.sidebar__brand-link:hover { color: var(--purple-light); text-decoration: none; }

.sidebar__nav { flex: 1; padding: 0.75rem 0 1rem; }

.sidebar__group { margin-bottom: 0.25rem; }

.sidebar__group-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,.4);
  padding: 0.75rem 1rem 0.25rem;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  color: rgba(255,255,255,.8);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  text-align: left;
  border-radius: 0;
}
.sidebar__link:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.sidebar__link--active { background: rgba(255,255,255,.15); color: #fff; font-weight: 600; }
.sidebar__link--active:hover { background: rgba(255,255,255,.2); }
.sidebar__link--logout { color: rgba(255,120,120,.9); }
.sidebar__link--logout:hover { background: rgba(255,80,80,.15); color: #ff8080; }

.sidebar__icon { font-size: 1rem; width: 1.25rem; text-align: center; flex-shrink: 0; }

.sidebar__version {
  padding: 0.75rem 1rem;
  font-size: 0.7rem;
  color: rgba(255,255,255,.25);
  flex-shrink: 0;
}

/* Overlay (mobile) */
.sidebar__overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 199;
  backdrop-filter: blur(2px);
}

/* ── App body ──────────────────────────────────────────────── */
.app-body {
  margin-left: 240px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ── Topbar (mobile only) ──────────────────────────────────── */
.topbar {
  display: none;
  align-items: center;
  gap: 0.75rem;
  background: var(--purple-dark);
  padding: 0 1rem;
  height: 52px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  flex-shrink: 0;
}
.topbar__toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.topbar__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.topbar__brand {
  color: #fff;
  font-family: 'Arial Black', system-ui, sans-serif;
  font-weight: 900;
  font-size: 0.95rem;
  flex: 1;
  text-decoration: none;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.topbar__brand:hover { color: var(--purple-light); text-decoration: none; }
.topbar__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  flex-shrink: 0;
  overflow: hidden;
}
.topbar__avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Sidebar collapse (desktop) ────────────────────────────── */
.sidebar__collapse-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  background: none;
  border: none;
  border-top: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.5);
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-family: inherit;
  margin-top: 0.5rem;
  transition: color var(--transition), background var(--transition);
}
.sidebar__collapse-btn:hover { color: #fff; background: rgba(255,255,255,.07); }
.sidebar__collapse-btn svg { transition: transform 0.25s ease; flex-shrink: 0; }

.sidebar__logo-full  { display: block; }
.sidebar__logo-icon  { display: none; }

/* Collapsed state — applied to <html> to avoid FOUC */
.sidebar-collapsed .sidebar {
  width: 56px;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-collapsed .sidebar .sidebar__brand {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex;
  justify-content: center;
}
.sidebar-collapsed .sidebar .sidebar__logo-full { display: none; }
.sidebar-collapsed .sidebar .sidebar__logo-icon { display: block; height: 30px; width: auto; }
.sidebar-collapsed .sidebar .sidebar__group-label { display: none; }
.sidebar-collapsed .sidebar .sidebar__group { margin-bottom: 0; }
.sidebar-collapsed .sidebar .sidebar__nav { padding: 0.5rem 0; }
.sidebar-collapsed .sidebar .sidebar__link {
  justify-content: center;
  padding: 0.625rem 0;
  gap: 0;
  font-size: 0; /* collapses text nodes */
}
.sidebar-collapsed .sidebar .sidebar__icon {
  font-size: 1rem;
  width: 56px;
  text-align: center;
}
.sidebar-collapsed .sidebar .sidebar__link span:not(.sidebar__icon) { display: none; }
.sidebar-collapsed .sidebar .sidebar__viewswitcher { display: none; }
.sidebar-collapsed .sidebar .sidebar__version { display: none; }
.sidebar-collapsed .sidebar .sidebar__collapse-btn {
  justify-content: center;
  padding: 0.5rem 0;
}
.sidebar-collapsed .sidebar .sidebar__collapse-btn svg { transform: rotate(180deg); }
.sidebar-collapsed .sidebar .sidebar__collapse-label { display: none; }

/* Sidebar tooltip (JS-driven) */
.sidebar-tooltip {
  position: fixed;
  left: 62px;
  background: #1a1a1a;
  color: #fff;
  padding: 0.3rem 0.65rem;
  border-radius: 5px;
  font-size: 0.8rem;
  white-space: nowrap;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.1s ease;
}

.sidebar-collapsed .app-body { margin-left: 56px; }
.sidebar-collapsed .sidebar__brand-link { justify-content: center; }

@media (max-width: 768px) {
  /* Disable collapse on mobile */
  .sidebar-collapsed .sidebar { width: 240px; overflow-y: auto; overflow-x: hidden; }
  .sidebar-collapsed .sidebar .sidebar__brand { padding: 1.25rem 1rem 1rem; justify-content: flex-start; }
  .sidebar-collapsed .sidebar .sidebar__logo-full { display: block; }
  .sidebar-collapsed .sidebar .sidebar__logo-icon { display: none; }
  .sidebar-collapsed .sidebar .sidebar__group-label { display: block; }
  .sidebar-collapsed .sidebar .sidebar__link { justify-content: flex-start; padding: 0.5rem 1rem; gap: 0.6rem; font-size: 0.875rem; }
  .sidebar-collapsed .sidebar .sidebar__link span:not(.sidebar__icon) { display: flex; }
  .sidebar-collapsed .sidebar .sidebar__icon { font-size: 1rem; width: 1.25rem; }
  .sidebar-collapsed .sidebar .sidebar__version { display: block; }
  .sidebar-collapsed .sidebar .sidebar__collapse-btn { display: none; }
  .sidebar-collapsed .sidebar .sidebar__collapse-label { display: inline; }
  .sidebar-collapsed .app-body { margin-left: 0; }
}

/* ── Mobile breakpoint ─────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,.4);
  }
  .sidebar__overlay.open { display: block; }
  .app-body { margin-left: 0; }
  .topbar { display: flex; }
}

/* ── Main content ──────────────────────────────────────────── */
.main-content {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--purple-dark);
  color: rgba(255,255,255,.7);
  font-size: 0.875rem;
  padding: 1rem 1.5rem;
  margin-top: auto;
}
.footer__inner { max-width: var(--max-width); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.footer__links { display: flex; gap: 1rem; }
.footer__links a { color: rgba(255,255,255,.7); }
.footer__links a:hover { color: #fff; }

/* ── Auth layout ───────────────────────────────────────────── */
.auth-wrap { display: flex; justify-content: center; padding-top: 2rem; }
.auth-card { width: 100%; max-width: 440px; }

/* ── Card ──────────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--grey-200);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card__header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--grey-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.card__title { font-size: 1.05rem; font-weight: 800; color: var(--purple-dark); margin: 0; }
.card__action { font-size: 0.875rem; color: var(--purple); font-weight: 600; white-space: nowrap; }
.card__body { padding: 1.25rem; }
.card__footer { padding: 0.75rem 1.25rem; border-top: 1px solid var(--grey-200); background: var(--grey-50); font-size: 0.9rem; }
.card__footer p { margin: 0.25rem 0; }

/* ── Page header ───────────────────────────────────────────── */
.page-header { margin-bottom: 1.5rem; }
.page-header__eyebrow { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--purple); margin-bottom: 0.25rem; }
.page-header__eyebrow a { color: var(--purple); }
.page-header__title { font-size: 2rem; font-weight: 900; color: var(--purple-dark); }
.page-header__subtitle { color: var(--grey-700); margin-top: 0.25rem; }
.page-header__actions { margin-top: 0.75rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Stat cards ────────────────────────────────────────────── */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--grey-200);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-card__value { font-family: 'Arial Black', system-ui, sans-serif; font-size: 2.25rem; font-weight: 900; color: var(--purple-dark); line-height: 1; }
.stat-card__label { font-size: 0.85rem; color: var(--grey-700); margin-top: 0.25rem; font-weight: 600; }
.stat-card--amber .stat-card__value { color: var(--amber); }
.stat-card--red .stat-card__value { color: var(--red); }
.stat-card--green .stat-card__value { color: var(--green); }

/* ── Event cards ───────────────────────────────────────────── */
.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.event-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--grey-200);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-top: 4px solid var(--purple);
  transition: box-shadow var(--transition), transform var(--transition);
}
.event-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.event-card--district { border-top-color: var(--purple); }
.event-card--county   { border-top-color: var(--teal); }
.event-card--camp     { border-top-color: var(--green); }
.event-card--residential { border-top-color: var(--amber); }
.event-card__body { padding: 1rem 1.125rem 1rem; }
.event-card__meta-top { display: flex; gap: 0.4rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.event-card__title { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.35rem; }
.event-card__title a { color: var(--purple-dark); }
.event-card__meta { font-size: 0.875rem; color: var(--grey-700); margin: 0.2rem 0; }
.event-card__cost { font-size: 0.875rem; margin-top: 0.5rem; }
.event-card__footer { padding: 0.75rem 1.125rem; border-top: 1px solid var(--grey-100); display: flex; gap: 0.5rem; }

/* ── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
  white-space: nowrap;
}
.badge--purple  { background: var(--purple-pale); color: var(--purple); }
.badge--teal    { background: var(--teal-light);  color: var(--teal); }
.badge--amber   { background: var(--amber-light); color: var(--amber); }
.badge--red     { background: var(--red-light);   color: var(--red); }
.badge--green   { background: var(--green-light); color: var(--green); }
.badge--blue    { background: var(--blue-light);  color: var(--blue); }
.badge--grey    { background: var(--grey-200);    color: var(--grey-700); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:focus { outline: 3px solid var(--purple-light); outline-offset: 2px; }
.btn--primary   { background: var(--purple); color: #fff; border-color: var(--purple); }
.btn--primary:hover { background: var(--purple-dark); border-color: var(--purple-dark); }
.btn--outline   { background: transparent; color: var(--purple); border-color: var(--purple); }
.btn--outline:hover { background: var(--purple-pale); }
.btn--teal      { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn--teal:hover { background: #00695C; border-color: #00695C; }
.btn--danger    { background: var(--red);   color: #fff; border-color: var(--red); }
.btn--danger:hover  { background: #B71C1C; border-color: #B71C1C; }
.btn--green     { background: var(--green); color: #fff; border-color: var(--green); }
.btn--green:hover   { background: #1B5E20; border-color: #1B5E20; }
.btn--ghost     { background: transparent; color: var(--grey-700); border-color: var(--grey-300); }
.btn--ghost:hover { background: var(--grey-100); }
.btn--grey      { background: var(--grey-200); color: var(--grey-900); border-color: var(--grey-200); }
.btn--amber     { background: var(--amber); color: #fff; border-color: var(--amber); }
.btn--sm        { padding: 0.3rem 0.75rem; font-size: 0.82rem; }
.btn--block     { width: 100%; }
.btn[disabled], .btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 500px) { .form-row { grid-template-columns: 1fr; } }
.form-label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.3rem; color: var(--grey-900); }
.form-hint  { font-size: 0.8rem; color: var(--grey-500); margin-top: 0.25rem; }
.form-control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--grey-300);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--grey-900);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: auto;
}
.form-control:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(123,31,162,.15);
}
.form-control[disabled] { background: var(--grey-100); color: var(--grey-500); cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-check { display: flex; align-items: flex-start; gap: 0.5rem; cursor: pointer; font-size: 0.9rem; }
.form-select--sm,
.form-input--sm {
  padding: 0.25rem 0.4rem;
  border: 1.5px solid var(--grey-300);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--grey-900);
  background: #fff;
  appearance: auto;
}
.form-select--sm:focus,
.form-input--sm:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(123,31,162,.15);
}
.form-check input[type="checkbox"] { margin-top: 0.2rem; flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--purple); }
.form-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.4rem; }

/* ── Alerts ────────────────────────────────────────────────── */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  border-left: 4px solid transparent;
}
.alert--success { background: var(--green-light); border-color: var(--green); color: #1B5E20; }
.alert--error   { background: var(--red-light);   border-color: var(--red);   color: #7F0000; }
.alert--warning { background: var(--amber-light); border-color: var(--amber); color: #BF360C; }
.alert--info    { background: var(--blue-light);  border-color: var(--blue);  color: #0D47A1; }

/* ── Tables ────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { background: var(--grey-100); color: var(--grey-700); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.6rem 0.75rem; text-align: left; border-bottom: 2px solid var(--grey-200); white-space: nowrap; }
th.sortable:hover { background: var(--grey-200); color: var(--purple-dark); cursor: pointer; }
td { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--grey-100); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--grey-50); }

/* ── Detail list ───────────────────────────────────────────── */
.detail-list { display: grid; grid-template-columns: 150px 1fr; gap: 0.35rem 1rem; font-size: 0.9rem; margin-bottom: 1rem; }
.detail-list dt { color: var(--grey-500); font-weight: 600; }
.detail-list dd { margin: 0; }
@media (max-width: 480px) { .detail-list { grid-template-columns: 1fr; } .detail-list dt { margin-top: 0.5rem; } }

/* ── Empty state ───────────────────────────────────────────── */
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--grey-500); font-size: 0.95rem; }

/* ── Tabs ──────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--grey-200); margin-bottom: 1.25rem; }
.tab {
  padding: 0.6rem 1.25rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--grey-700);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
  font-family: inherit;
}
.tab:hover { color: var(--purple); }
.tab--active { color: var(--purple); border-bottom-color: var(--purple); }

/* ── Pagination ────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 1.25rem; font-size: 0.9rem; }

/* ── Young person list item ────────────────────────────────── */
.yp-list { display: flex; flex-direction: column; gap: 0.75rem; }
.yp-item { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem; background: var(--grey-50); border-radius: var(--radius-sm); border: 1px solid var(--grey-200); gap: 1rem; flex-wrap: wrap; }
.yp-item__info { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.yp-item__actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

/* ── Invite item ───────────────────────────────────────────── */
.invite-item { padding: 0.75rem 0; border-bottom: 1px solid var(--grey-100); }
.invite-item:last-child { border-bottom: none; }
.invite-item--revoked { opacity: 0.5; }
.invite-item__info { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.25rem; }
.invite-code { background: var(--grey-100); padding: 0.15rem 0.4rem; border-radius: 4px; font-family: monospace; }

/* ── Event description ─────────────────────────────────────── */
.event-description { font-size: 0.95rem; line-height: 1.7; color: var(--grey-700); margin: 1rem 0; white-space: pre-line; }

/* ── Code ──────────────────────────────────────────────────── */
code { background: var(--grey-100); padding: 0.1em 0.4em; border-radius: 4px; font-family: monospace; font-size: 0.9em; }
pre { background: var(--grey-100); padding: 0.75rem; border-radius: var(--radius-sm); overflow-x: auto; font-size: 0.85rem; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
  h1 { font-size: 1.5rem; }
  .page-header__title { font-size: 1.5rem; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .events-grid { grid-template-columns: 1fr; }
  .main-content { padding: 1rem 1rem 2rem; }
  .card__body { padding: 1rem; }
}
