/* ============================================================
   Emerald Lake KidPasses — Main Stylesheet
   Playful, nature-meets-water-park aesthetic
   Fonts: Baloo 2 (display) + Nunito (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;600;700;800&family=Nunito:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --emerald:       #007A5E;
  --emerald-dark:  #005A45;
  --emerald-light: #00A878;
  --water:         #1B9BE0;
  --water-light:   #5BC8F5;
  --water-pale:    #E0F4FD;
  --sand:          #F5E6C8;
  --sand-dark:     #E8C97A;
  --otter:         #8B5E3C;
  --otter-light:   #C4956A;
  --coral:         #FF6B6B;
  --sunshine:      #FFD166;
  --white:         #FFFFFF;
  --off-white:     #F7FFFE;
  --text-dark:     #1A2E2A;
  --text-mid:      #3D5A52;
  --text-light:    #6B8F87;
  --border:        #C8E8E0;
  --success:       #00C896;
  --warning:       #FFB020;
  --danger:        #FF4757;
  --shadow-sm:     0 2px 8px rgba(0,122,94,0.10);
  --shadow-md:     0 6px 24px rgba(0,122,94,0.14);
  --shadow-lg:     0 16px 48px rgba(0,122,94,0.18);
  --radius-sm:     10px;
  --radius-md:     18px;
  --radius-lg:     28px;
  --radius-xl:     40px;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Nunito', sans-serif;
  color: var(--text-dark);
  background: var(--off-white);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Baloo 2', sans-serif;
  line-height: 1.2;
  color: var(--emerald-dark);
}

a { color: var(--water); text-decoration: none; transition: color .2s; }
a:hover { color: var(--water-light); }

img { max-width: 100%; display: block; }

/* ── Layout ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.container--narrow { max-width: 680px; }
.container--wide   { max-width: 1400px; }

/* ── Nav ───────────────────────────────────────────────────── */
.nav {
  background: var(--emerald-dark);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}

.nav__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--white);
  text-decoration: none;
}

.nav__logo-icon { font-size: 1.6rem; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav__links a {
  color: rgba(255,255,255,.85);
  font-weight: 600;
  font-size: .9rem;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all .2s;
}

.nav__links a:hover,
.nav__links a.active {
  background: rgba(255,255,255,.15);
  color: var(--white);
}

.nav__cta {
  background: var(--sunshine) !important;
  color: var(--emerald-dark) !important;
  font-weight: 800 !important;
}

.nav__cta:hover { background: #ffc733 !important; }

/* Hamburger button (hidden on desktop) */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 6px 8px;
  background: none;
  border: none;
  border-radius: 6px;
  transition: background .2s;
}
.nav__hamburger:hover { background: rgba(255,255,255,.1); }
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav__hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav__hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile dropdown menu */
.nav__mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--emerald-dark);
  padding: 10px 16px 20px;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 99;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  border-top: 1px solid rgba(255,255,255,.1);
}
.nav__mobile-menu.is-open { display: flex; }
.nav__mobile-menu a {
  color: rgba(255,255,255,.88);
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background .2s;
}
.nav__mobile-menu a:hover { background: rgba(255,255,255,.12); color: var(--white); }
.nav__mobile-menu .nav__cta-mobile {
  background: var(--sunshine);
  color: var(--emerald-dark) !important;
  margin-top: 8px;
  text-align: center;
  font-weight: 800;
  border-radius: var(--radius-md);
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--emerald-dark) 0%, var(--emerald) 40%, var(--water) 100%);
  padding: 80px 20px 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--off-white);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero__waves {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
}

.hero__title {
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
  text-shadow: 0 3px 12px rgba(0,0,0,.25);
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: rgba(255,255,255,.88);
  max-width: 580px;
  margin: 0 auto 36px;
  font-weight: 500;
}

.hero__mascot {
  font-size: 5rem;
  margin-bottom: 20px;
  display: block;
  animation: bobbing 3s ease-in-out infinite;
}

@keyframes bobbing {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  line-height: 1;
}

.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn--primary {
  background: var(--emerald);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(0,122,94,.35);
}
.btn--primary:hover:not(:disabled) {
  background: var(--emerald-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,122,94,.4);
  color: var(--white);
}

.btn--water {
  background: var(--water);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(27,155,224,.3);
}
.btn--water:hover:not(:disabled) {
  background: #1588c8;
  transform: translateY(-2px);
  color: var(--white);
}

.btn--sunshine {
  background: var(--sunshine);
  color: var(--emerald-dark);
  box-shadow: 0 4px 16px rgba(255,209,102,.4);
}
.btn--sunshine:hover:not(:disabled) {
  background: #ffc733;
  transform: translateY(-2px);
  color: var(--emerald-dark);
}

.btn--coral {
  background: var(--coral);
  color: var(--white);
}
.btn--coral:hover:not(:disabled) {
  background: #e85555;
  transform: translateY(-2px);
  color: var(--white);
}

.btn--outline {
  background: transparent;
  color: var(--emerald);
  border: 2.5px solid var(--emerald);
}
.btn--outline:hover:not(:disabled) {
  background: var(--emerald);
  color: var(--white);
}

.btn--ghost {
  background: rgba(255,255,255,.12);
  color: var(--white);
  border: 2px solid rgba(255,255,255,.3);
}
.btn--ghost:hover:not(:disabled) { background: rgba(255,255,255,.22); color: var(--white); }

.btn--sm  { font-size: .85rem; padding: 7px 16px; }
.btn--lg  { font-size: 1.15rem; padding: 16px 36px; border-radius: var(--radius-lg); }
.btn--full { width: 100%; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.card__header {
  padding: 24px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card__body { padding: 24px 28px; }
.card__footer {
  padding: 16px 28px;
  border-top: 1.5px solid var(--border);
  background: rgba(0,122,94,.03);
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-weight: 700;
  font-size: .9rem;
  color: var(--text-mid);
  margin-bottom: 6px;
  font-family: 'Baloo 2', sans-serif;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--emerald-light);
  box-shadow: 0 0 0 3px rgba(0,168,120,.15);
}

.form-control::placeholder { color: var(--text-light); }

select.form-control { cursor: pointer; }

.form-hint {
  font-size: .82rem;
  color: var(--text-light);
  margin-top: 4px;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* ── Alerts ────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.alert--success { background: #D4F5E9; color: #016B44; border-left: 4px solid var(--success); }
.alert--error   { background: #FFE5E5; color: #C0392B; border-left: 4px solid var(--danger); }
.alert--warning { background: #FFF3CD; color: #856404; border-left: 4px solid var(--warning); }
.alert--info    { background: var(--water-pale); color: #0066AA; border-left: 4px solid var(--water); }

/* ── Badge Pills ───────────────────────────────────────────── */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  font-family: 'Baloo 2', sans-serif;
}

.badge-pill--active  { background: #D4F5E9; color: #016B44; }
.badge-pill--warning { background: #FFF3CD; color: #856404; }
.badge-pill--danger  { background: #FFE5E5; color: #C0392B; }
.badge-pill--info    { background: var(--water-pale); color: #0066AA; }
.badge-pill--muted   { background: #F0F0F0; color: #888; }

/* ── Pass Card ─────────────────────────────────────────────── */
.pass-card {
  background: linear-gradient(135deg, var(--emerald-dark) 0%, var(--emerald) 60%, var(--water) 100%);
  border-radius: var(--radius-lg);
  color: var(--white);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.pass-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}

.pass-card::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: -30px;
  width: 150px;
  height: 150px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}

.pass-card__header {
  padding: 24px 28px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.pass-card__logo {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  opacity: .9;
}

.pass-card__type {
  background: rgba(255,255,255,.2);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.pass-card__body {
  padding: 0 28px 24px;
  position: relative;
  z-index: 1;
}

.pass-card__name {
  font-family: 'Baloo 2', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.pass-card__meta {
  font-size: .9rem;
  opacity: .85;
  margin-bottom: 20px;
}

.pass-card__qr {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  display: inline-block;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}

.pass-card__qr img { width: 180px; height: 180px; display: block; }

.pass-card__footer {
  padding: 16px 28px;
  background: rgba(0,0,0,.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  font-size: .85rem;
  opacity: .88;
}

/* ── Visit Dots ────────────────────────────────────────────── */
.visit-dots {
  display: flex;
  gap: 10px;
  align-items: center;
}

.visit-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all .3s;
}

.visit-dot--used {
  background: var(--sunshine);
  border-color: var(--sunshine);
  box-shadow: 0 0 12px rgba(255,209,102,.6);
}

.visit-dot--empty {
  background: rgba(255,255,255,.12);
}

/* ── Badge Grid ────────────────────────────────────────────── */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 14px;
}

.badge-item {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  border: 2.5px solid var(--border);
  transition: all .25s;
  cursor: default;
}

.badge-item--earned {
  border-color: var(--sunshine);
  background: linear-gradient(135deg, #FFFBEA, #FFF5C2);
  box-shadow: 0 4px 16px rgba(255,209,102,.3);
  animation: badge-pop .4s ease;
}

.badge-item--locked {
  opacity: .45;
  filter: grayscale(0.7);
}

@keyframes badge-pop {
  0%   { transform: scale(.8); }
  60%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.badge-item__icon { font-size: 2.2rem; margin-bottom: 6px; }
.badge-item__name {
  font-family: 'Baloo 2', sans-serif;
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-mid);
  line-height: 1.2;
}

/* ── Scanner UI ────────────────────────────────────────────── */
.scanner-wrapper {
  background: var(--emerald-dark);
  min-height: 100vh;
  padding: 0;
}

.scanner-header {
  background: rgba(0,0,0,.3);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--white);
}

.scanner-viewport {
  position: relative;
  background: #000;
  aspect-ratio: 1;
  max-width: 420px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.scanner-viewport video { width: 100%; height: 100%; object-fit: cover; }

.scanner-crosshair {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.scanner-crosshair__box {
  width: 220px;
  height: 220px;
  border: 3px solid var(--sunshine);
  border-radius: 16px;
  box-shadow: 0 0 0 2000px rgba(0,0,0,.5);
  animation: scanner-pulse 2s ease-in-out infinite;
}

@keyframes scanner-pulse {
  0%, 100% { border-color: var(--sunshine); box-shadow: 0 0 0 2000px rgba(0,0,0,.5), 0 0 20px rgba(255,209,102,.4); }
  50% { border-color: var(--water-light); box-shadow: 0 0 0 2000px rgba(0,0,0,.5), 0 0 30px rgba(91,200,245,.6); }
}

.scanner-result {
  max-width: 420px;
  margin: 16px auto 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  animation: slide-up .3s ease;
}

@keyframes slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.scanner-result--valid   { background: #D4F5E9; border: 3px solid var(--success); }
.scanner-result--invalid { background: #FFE5E5; border: 3px solid var(--danger); }
.scanner-result--warning { background: #FFF3CD; border: 3px solid var(--warning); }

.scanner-result__inner {
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.scanner-result__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  border: 3px solid var(--white);
  box-shadow: var(--shadow-sm);
}

.scanner-result__avatar--placeholder {
  background: var(--emerald-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--white);
}

/* ── Stats Row ─────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.stat-box {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border);
}

.stat-box__number {
  font-family: 'Baloo 2', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--emerald);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-box__label {
  font-size: .82rem;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Table ─────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: .92rem;
}

thead th {
  background: var(--emerald-dark);
  color: var(--white);
  padding: 13px 16px;
  text-align: left;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  white-space: nowrap;
}

tbody tr { border-bottom: 1.5px solid var(--border); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(0,122,94,.03); }
tbody td { padding: 12px 16px; vertical-align: middle; }

/* ── Avatar Selector ───────────────────────────────────────── */
.avatar-selector {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.avatar-option { display: none; }

.avatar-option + label {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: var(--white);
  transition: all .2s;
  box-shadow: var(--shadow-sm);
}

.avatar-option:checked + label {
  border-color: var(--emerald-light);
  background: var(--water-pale);
  box-shadow: 0 0 0 3px rgba(0,168,120,.25);
  transform: scale(1.12);
}

.avatar-option + label:hover { transform: scale(1.08); }

/* ── Section Divider ───────────────────────────────────────── */
.section { padding: 60px 20px; }
.section--alt { background: var(--water-pale); }
.section__title {
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--emerald-dark);
  margin-bottom: 8px;
}
.section__subtitle {
  color: var(--text-mid);
  font-size: 1.05rem;
  margin-bottom: 36px;
}

/* ── Utilities ─────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 36px; }
.mt-5 { margin-top: 52px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 36px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.relative { position: relative; }
.hidden { display: none !important; }

/* ── Animations ────────────────────────────────────────────── */
.fade-in  { animation: fade-in .4s ease both; }
.slide-up { animation: slide-up .4s ease both; }

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Confetti overlay (JS-triggered) ──────────────────────── */
#confetti-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--emerald-dark);
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 28px 20px;
  font-size: .88rem;
  margin-top: auto;
}

.footer a { color: rgba(255,255,255,.8); }
.footer a:hover { color: var(--white); }

/* ── Responsive Grid Utilities ─────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.grid-2-1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.grid-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 768px) {
  .grid-feature {
    grid-template-columns: 1fr;
  }
}

/* ── Admin Sidebar ─────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: var(--emerald-dark);
  color: var(--white);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar__logo {
  padding: 24px 20px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.sidebar__nav { padding: 16px 12px; flex: 1; }

.sidebar__nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.78);
  font-weight: 600;
  font-size: .92rem;
  margin-bottom: 4px;
  transition: all .18s;
  text-decoration: none;
}

.sidebar__nav a:hover,
.sidebar__nav a.active {
  background: rgba(255,255,255,.14);
  color: var(--white);
}

.sidebar__nav a.active { background: var(--emerald-light); }

.sidebar__footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.1);
}

.sidebar__footer a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.68);
  font-weight: 600;
  font-size: .88rem;
  margin-bottom: 2px;
  text-decoration: none;
  transition: all .18s;
}

.sidebar__footer a:hover { background: rgba(255,255,255,.1); color: var(--white); }
.sidebar__footer .sidebar__signout { color: rgba(255,120,120,.85); }
.sidebar__footer .sidebar__signout:hover { color: #ff8080; }

.admin-main {
  flex: 1;
  overflow: auto;
  background: #F0F7F5;
  min-width: 0;
}

.admin-topbar {
  background: var(--white);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 10px;
}

.admin-content { padding: 28px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* ─ Public nav → hamburger ─ */
  .nav__links    { display: none; }
  .nav__hamburger { display: flex; }

  /* ─ Admin sidebar → horizontal scroll tab bar ─ */
  .admin-layout { flex-direction: column; }

  .sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 90;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .sidebar::-webkit-scrollbar { display: none; }

  .sidebar__logo  { display: none; }
  .sidebar__footer { display: none; }

  .sidebar__nav {
    display: flex;
    flex-direction: row;
    padding: 0;
    width: 100%;
    flex: 1;
    align-items: stretch;
  }

  .sidebar__nav a {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px 14px;
    border-radius: 0;
    margin: 0;
    border-bottom: 3px solid transparent;
    font-size: .68rem;
    white-space: nowrap;
    flex: 1;
    min-width: 56px;
  }

  .sidebar__nav a.active {
    background: rgba(255,255,255,.12);
    border-bottom-color: var(--sunshine);
  }

  /* ─ Admin layout ─ */
  .admin-topbar {
    padding: 12px 16px;
    position: sticky;
    top: 48px;
    z-index: 80;
  }
  .admin-topbar h1 { font-size: 1.1rem !important; }
  .admin-content { padding: 14px 14px 40px; }

  /* ─ Responsive grid utilities ─ */
  .grid-2,
  .grid-2-1 { grid-template-columns: 1fr; }

  /* ─ Forms ─ */
  .form-grid { grid-template-columns: 1fr; }

  .admin-inline-form {
    flex-direction: column !important;
  }
  .admin-inline-form > *,
  .admin-inline-form input,
  .admin-inline-form select,
  .admin-inline-form button,
  .admin-inline-form .btn {
    width: 100% !important;
    flex: none !important;
    min-width: unset !important;
  }

  /* ─ Cards ─ */
  .card__header { padding: 16px 16px 0; flex-wrap: wrap; gap: 8px; }
  .card__body   { padding: 16px; }
  .card__footer { padding: 12px 16px; }

  /* ─ Hero ─ */
  .hero { padding: 40px 16px 64px; }

  /* ─ Section ─ */
  .section { padding: 36px 16px; }

  /* ─ Stats ─ */
  .stats-row { grid-template-columns: repeat(2, 1fr); }

  /* ─ Badges ─ */
  .badge-grid { grid-template-columns: repeat(4, 1fr); }

  /* ─ Pass card ─ */
  .pass-card__header { padding: 16px 18px 12px; }
  .pass-card__footer { flex-wrap: wrap; gap: 8px; }

  /* ─ Pass card inner flex (info + QR stacked) ─ */
  .pass-inner-flex {
    flex-direction: column !important;
    padding: 0 18px 18px !important;
  }
  .pass-inner-flex > div[style*="flex-shrink:0"] {
    align-self: flex-start;
  }

  /* ─ Filter forms ─ */
  .filter-form {
    flex-direction: column !important;
  }
  .filter-form .form-control {
    width: 100% !important;
  }
  .filter-form .filter-actions {
    display: flex;
    gap: 8px;
  }

  /* ─ Reports / dashboard export buttons ─ */
  .topbar-actions {
    flex-wrap: wrap;
    gap: 6px;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .stats-row   { grid-template-columns: repeat(2, 1fr); }
  .badge-grid  { grid-template-columns: repeat(3, 1fr); }
  .sidebar__nav a { padding: 10px 10px; font-size: .65rem; min-width: 48px; }
  .admin-content { padding: 10px 10px 40px; }
  .pass-card__name { font-size: 1.5rem !important; }
}

/* ── Print (for pass printing) ─────────────────────────────── */
@media print {
  .nav, .footer, .btn, .no-print { display: none !important; }
  .pass-card { box-shadow: none; max-width: 380px; }
  body { background: white; }
}
