:root {
  --saffron: #E8873C;
  --saffron-dark: #C96A24;
  --maroon: #7A2E1D;
  --cream: #FBF3E7;
  --cream-alt: #F5E8D6;
  --text: #2E2420;
  --text-muted: #6B5C52;
  --border: #E7D6BF;
  --danger: #B23B2E;
  --success: #3B7A3E;
  --font-heading: 'Lora', Georgia, serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
}

a { color: var(--maroon); }
a:hover { color: var(--saffron-dark); }
::placeholder { color: #A6968A; }

.page { min-height: 100vh; display: flex; flex-direction: column; }

/* Header / nav */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px clamp(20px, 5vw, 48px);
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}
.header-brand-block { display: flex; flex-direction: column; }
.header-top-row { display: flex; align-items: center; gap: 10px; }
.brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(18px, 2.4vw, 23px);
  color: var(--maroon);
  text-decoration: none;
}
.header-info { display: flex; flex-direction: column; margin-top: 5px; }
.header-info-line { font-size: 16px; color: var(--text-muted); line-height: 1.5; }
#headerDateTime { font-size: clamp(18px, 2.4vw, 23px); font-weight: 700; color: var(--maroon); line-height: 1.4; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(14px, 3vw, 32px); font-size: clamp(14px, 1.7vw, 17px); font-weight: 500; }
.site-nav a { text-decoration: none; color: var(--text); }
.site-nav a.active { color: var(--maroon); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFFFFF;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--maroon); border-radius: 2px; }

.nav-close { display: none; }

/* Fixed dim layer behind the mobile slide-in menu; inert (opacity 0, no pointer
   events) until JS adds .open, so it's harmless outside the mobile breakpoint. */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(46, 36, 32, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
  z-index: 40;
}
.nav-backdrop.open { opacity: 1; pointer-events: auto; }

@media (max-width: 640px) {
  .nav-toggle { display: flex; }

  .nav-close {
    display: block;
    align-self: flex-end;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px 18px;
  }

  /* Off-canvas panel sliding in from the right; transform (not display) is what
     animates, so the transition runs instead of snapping open/closed. */
  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: #FFFFFF;
    box-shadow: -12px 0 32px rgba(46, 36, 32, 0.18);
    padding: 24px 28px;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.32s ease;
    z-index: 50;
  }
  .site-nav.open { transform: translateX(0); }
  .site-nav a { padding: 12px 4px; width: 100%; }
}

/* Hero */
.hero {
  background:
    linear-gradient(135deg, rgba(122, 46, 29, 0.87), rgba(201, 106, 36, 0.8)),
    url('/img/hero-temple.jpg') center 58% / cover no-repeat;
  padding: clamp(36px, 6vw, 60px) clamp(20px, 5vw, 48px);
  text-align: center;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 700;
  color: #FFF9F1;
  margin: 0 0 18px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.hero p {
  max-width: 640px;
  margin: 0 auto 28px;
  font-size: clamp(16px, 2.4vw, 19px);
  line-height: 1.6;
  color: #FDEEDD;
  text-wrap: pretty;
}

/* Buttons */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 16px 36px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--maroon); color: var(--cream); }
.btn-secondary {
  background: var(--cream);
  color: var(--maroon);
  border: 1px solid var(--border);
  font-size: 15px;
  padding: 13px 28px;
}

/* What to Expect */
.section { padding: clamp(40px, 7vw, 72px) clamp(20px, 5vw, 48px); max-width: 1100px; margin: 0 auto; }
.section h2 {
  font-family: var(--font-heading);
  font-size: clamp(30px, 4.5vw, 44px);
  color: var(--maroon);
  text-align: center;
  margin: 0 0 12px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.section-lede { text-align: center; color: var(--text-muted); font-size: 16px; max-width: 560px; margin: 0 auto 32px; line-height: 1.6; }

.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card {
  background: var(--cream-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: clamp(18px, 3vw, 22px);
}
.card h3 { font-family: var(--font-heading); font-size: 21px; color: var(--text); margin: 0 0 8px; line-height: 1.25; }
.card p { font-size: 15px; line-height: 1.6; color: var(--text-muted); margin: 0; }

/* Secondary CTA band */
.cta-band {
  background: var(--cream-alt);
  padding: clamp(32px, 6vw, 56px) clamp(20px, 5vw, 48px);
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-band h2 { font-family: var(--font-heading); font-size: clamp(24px, 4vw, 36px); color: var(--maroon); margin: 0 0 10px; line-height: 1.15; }
.cta-band p { color: var(--text-muted); font-size: 16px; margin: 0 0 20px; line-height: 1.6; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

/* Footer */
.site-footer {
  background: var(--maroon);
  color: var(--cream-alt);
  padding: 32px clamp(20px, 5vw, 48px);
  text-align: center;
  font-size: 14px;
  line-height: 1.7;
  margin-top: auto;
}
.site-footer .org { font-family: var(--font-heading); font-weight: 600; font-size: 16px; margin-bottom: 8px; }
.site-footer .muted { opacity: 0.7; }
.site-footer .contact { opacity: 0.85; }
.site-footer .contact a { color: inherit; text-decoration: underline; }
.site-footer .contact a:hover { opacity: 0.8; }
.site-footer .copyright { opacity: 0.6; margin-top: 12px; }
.site-footer .admin-link { margin-top: 10px; }
.site-footer .admin-link a { color: var(--cream-alt); opacity: 0.5; font-size: 12px; text-decoration: none; }
.site-footer .admin-link a:hover { opacity: 0.85; }

/* About page */
.prose-section { padding: clamp(40px, 8vw, 72px) clamp(20px, 5vw, 48px) 48px; max-width: 760px; margin: 0 auto; }
.prose-section h1 { font-family: var(--font-heading); font-size: clamp(34px, 6vw, 56px); color: var(--maroon); margin: 0 0 20px; text-align: center; line-height: 1.05; letter-spacing: -0.01em; }
.prose-section p { font-size: clamp(16px, 2.2vw, 18px); line-height: 1.75; color: var(--text); margin: 0 0 18px; text-wrap: pretty; }
.info-box { background: var(--cream-alt); border: 1px solid var(--border); border-radius: 12px; padding: clamp(20px, 3vw, 28px); margin-bottom: 16px; }
.info-box h2 { font-family: var(--font-heading); font-size: 23px; color: var(--maroon); margin: 0 0 14px; }
.info-box .row { font-size: 16px; line-height: 1.8; color: var(--text); }
.info-box .row + .row { margin-top: 10px; }

.guruji-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(14px, 3vw, 24px);
  margin: 4px 0 32px;
}
/* Home page intro: narrow primary photo sits beside the heading/text on one
   row, with the second photo spanning full width beneath on mobile so the
   section reads as a compact photo+text card instead of two huge stacked
   images. Desktop (>=760px) regroups both photos beside the text instead. */
.guruji-intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 34%) 1fr;
  gap: 16px;
  align-items: center;
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}
.guruji-intro-layout .gp-primary { grid-column: 1; grid-row: 1; margin: 0; }
.guruji-intro-layout .guruji-intro-text { grid-column: 2; grid-row: 1; }
.guruji-intro-layout .gp-secondary { grid-column: 1 / -1; grid-row: 2; margin: 4px 0 0; }
.guruji-intro-layout .gp-primary img { aspect-ratio: 3 / 4; }
.guruji-intro-text h2 { text-align: left; font-size: clamp(24px, 6vw, 32px); margin: 0 0 8px; }
.guruji-intro-text p { color: var(--text-muted); font-size: 15px; line-height: 1.6; margin: 0 0 16px; }

@media (min-width: 760px) {
  .guruji-intro-layout {
    grid-template-columns: minmax(0, 190px) minmax(0, 190px) minmax(220px, 1fr);
    gap: clamp(16px, 2vw, 24px);
    max-width: 1000px;
  }
  .guruji-intro-layout .gp-primary { grid-column: 1; grid-row: 1; }
  .guruji-intro-layout .gp-secondary { grid-column: 2; grid-row: 1; margin: 0; }
  .guruji-intro-layout .guruji-intro-text { grid-column: 3; grid-row: 1; }
  .guruji-intro-layout .gp-primary img { aspect-ratio: 3 / 4; }
  .guruji-intro-text h2 { font-size: clamp(30px, 3vw, 36px); }
  .guruji-intro-text p { font-size: 16px; line-height: 1.7; margin: 16px 0 26px; }
}
.guruji-photo {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 14px 30px rgba(122, 46, 29, 0.16);
}
.guruji-photo img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
/* This particular photo has a lot of empty carpet below him and his head near
   the top of the frame, so a plain center crop was cutting into his head. */
.guruji-photo img[src="/img/guruji-throne.jpg"] { object-position: center 8%; }
@media (max-width: 560px) {
  .guruji-gallery { grid-template-columns: 1fr; }
  .guruji-photo img { aspect-ratio: 4 / 3; }
  /* The 4:3 box is much shorter relative to this photo than the 3:4 desktop
     box, so it needs a lot more cropped off; push it all the way to the top. */
  .guruji-photo img[src="/img/guruji-throne.jpg"] { object-position: center top; }
}
.muted-inline { color: var(--text-muted); }
.center-cta { text-align: center; margin-top: 32px; }

/* Forms */
.form-stack { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.field input, .field textarea {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #FFF;
}
.field textarea { resize: vertical; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.error-text { color: var(--danger); font-size: 14px; }
.success-box {
  background: var(--cream-alt);
  border: 1px solid var(--success);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}
.success-box .headline { font-family: var(--font-heading); font-size: 23px; color: var(--success); margin-bottom: 8px; }
.success-box p { color: var(--text); font-size: 15px; margin: 0; }

/* Inquire page */
.narrow-section { padding: clamp(36px, 7vw, 64px) clamp(20px, 5vw, 48px); max-width: 560px; margin: 0 auto; }
.narrow-section h1 { font-family: var(--font-heading); font-size: clamp(32px, 5.5vw, 46px); color: var(--maroon); margin: 0 0 10px; text-align: center; line-height: 1.08; letter-spacing: -0.01em; }
.narrow-section .lede { text-align: center; color: var(--text-muted); font-size: 16px; line-height: 1.6; margin: 0 0 28px; }

/* RSVP / Our Gathering page */
.rsvp-hero { padding: clamp(32px, 6vw, 56px) clamp(20px, 5vw, 48px) 20px; max-width: 1080px; margin: 0 auto; text-align: center; }
.rsvp-hero h1 { font-family: var(--font-heading); font-size: clamp(32px, 5.5vw, 50px); color: var(--maroon); margin: 0 0 10px; line-height: 1.08; letter-spacing: -0.01em; }
.rsvp-hero p { color: var(--text-muted); font-size: 16px; line-height: 1.6; max-width: 600px; margin: 0 auto; }

.rsvp-layout {
  padding: 20px clamp(20px, 5vw, 48px) 72px;
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: flex-start;
}
@media (max-width: 860px) {
  .rsvp-layout { grid-template-columns: 1fr; gap: 24px; }
}

.event-picker { display: flex; flex-direction: column; gap: 16px; }
.event-card {
  cursor: pointer;
  background: #FFFFFF;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: none;
}
.event-card.selected {
  border-color: var(--saffron);
  box-shadow: 0 0 0 4px rgba(232, 135, 60, 0.18);
}
.event-card .title { font-family: var(--font-heading); font-weight: 600; font-size: 20px; color: var(--maroon); margin-bottom: 6px; }
.event-card .line1 { font-size: 14px; color: var(--text); margin-bottom: 2px; }
.event-card .line2 { font-size: 13px; color: var(--text-muted); margin-bottom: 2px; }
.event-card .availability { font-size: 13px; color: var(--success); font-weight: 600; margin-top: 10px; }
.event-card .availability.full { color: var(--danger); }
.empty-note {
  color: var(--text-muted);
  font-size: 14px;
  padding: 20px;
  background: var(--cream-alt);
  border-radius: 12px;
}

.rsvp-form-panel { background: #FFFFFF; border: 1px solid var(--border); border-radius: 12px; padding: clamp(18px, 4vw, 32px); }
.rsvp-form-panel .placeholder { color: var(--text-muted); font-size: 15px; text-align: center; padding: 40px 0; }
.rsvp-form-panel h2 { font-family: var(--font-heading); font-size: clamp(21px, 3vw, 26px); color: var(--maroon); margin: 0 0 18px; }
.num-attendees-input { width: 120px; }
.btn-submit-rsvp { margin-top: 8px; }

.sewa-section-title { font-family: var(--font-heading); font-size: 16px; color: var(--maroon); margin: 8px 0 12px; }
/* CSS multi-column (not grid) so cards pack top-to-bottom within each column
   independently, like masonry: a tall card in column 1 no longer reserves
   matching empty space below its shorter neighbor in column 2. A plain grid
   row's height is always set by its tallest cell, which left dead space
   under short cards whenever a sewa item's time/notes text ran long. */
.sewa-grid { columns: 2; column-gap: 12px; }
.sewa-card {
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 12px;
  border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: var(--cream-alt);
}
.sewa-card .name { font-weight: 700; font-size: 14px; color: var(--text); margin-bottom: 4px; line-height: 1.3; }
.sewa-card .sewa-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; line-height: 1.4; }
.sewa-card .avail { font-size: 12.5px; font-weight: 600; margin: 2px 0 10px; color: var(--success); }
.sewa-card .avail.full { color: var(--danger); }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%;
  border: 1px solid var(--border); background: #FFFFFF;
  font-size: 16px; cursor: pointer;
}
.stepper button:disabled { opacity: 0.4; cursor: not-allowed; }
.stepper .qty { font-size: 15px; font-weight: 600; min-width: 16px; text-align: center; }

@media (max-width: 420px) {
  .sewa-grid { columns: 1; }
  .sewa-card { padding: 12px; }
}

/* Admin login */
.admin-login-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.admin-login-card { width: 360px; background: #FFFFFF; border: 1px solid var(--border); border-radius: 14px; padding: 40px; }
.admin-login-card .brand-block { text-align: center; margin-bottom: 28px; }
.admin-login-card .brand-block .name { font-family: var(--font-heading); font-weight: 700; font-size: 19px; color: var(--maroon); }
.admin-login-card .brand-block .subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.btn-block { padding: 14px; font-size: 15px; margin-top: 4px; width: 100%; }
.error-text.sm { font-size: 13px; }

/* Admin dashboard — sidebar layout */
.admin-shell { flex: 1; display: flex; align-items: flex-start; }

.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  min-height: 100vh;
  position: sticky;
  top: 0;
  background: var(--maroon);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
}
.admin-sidebar-brand {
  font-family: var(--font-heading); font-weight: 700; font-size: 16px; line-height: 1.4;
  margin-bottom: 28px; padding: 0 6px;
}
.admin-sidebar-brand .sub { display: block; font-size: 12px; font-weight: 500; opacity: 0.7; margin-top: 3px; font-family: var(--font-body); }
.admin-sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.admin-sidebar-nav button {
  text-align: left; background: transparent; border: none; color: var(--cream-alt);
  font-size: 14px; font-weight: 600; font-family: inherit;
  padding: 11px 14px; border-radius: 8px; cursor: pointer;
}
.admin-sidebar-nav button:hover { background: rgba(255, 255, 255, 0.08); }
.admin-sidebar-nav button.active { background: #FFFFFF; color: var(--maroon); }
.admin-sidebar-footer { border-top: 1px solid rgba(255, 255, 255, 0.18); padding-top: 16px; margin-top: 16px; }
.admin-sidebar-footer .signed-in { font-size: 12px; color: var(--cream-alt); opacity: 0.85; margin-bottom: 10px; padding: 0 6px; }
.admin-sidebar-footer .btn-logout { width: 100%; }
.btn-logout {
  background: transparent; border: 1px solid var(--saffron); color: var(--cream);
  font-size: 13px; font-weight: 600; padding: 9px 16px; border-radius: 999px; cursor: pointer; font-family: inherit;
}

.admin-main { flex: 1; min-width: 0; max-width: 1600px; margin: 0 auto; padding: 32px clamp(20px, 3vw, 44px) 80px; }

@media (max-width: 880px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar {
    width: 100%; min-height: auto; position: static;
    flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px;
    padding: 14px 20px;
  }
  .admin-sidebar-brand { margin-bottom: 0; margin-right: auto; padding: 0; }
  .admin-sidebar-nav { flex-direction: row; flex: none; overflow-x: auto; gap: 6px; }
  .admin-sidebar-nav button { white-space: nowrap; padding: 8px 14px; }
  .admin-sidebar-footer {
    border-top: none; margin-top: 0; padding-top: 0;
    display: flex; align-items: center; gap: 12px;
  }
  .admin-sidebar-footer .signed-in { margin-bottom: 0; padding: 0; }
  .admin-sidebar-footer .btn-logout { width: auto; }
}

.panel { background: #FFFFFF; border: 1px solid var(--border); border-radius: 12px; padding: clamp(18px, 3vw, 28px); margin-bottom: 32px; }
.panel h2 { font-family: var(--font-heading); font-size: 19px; color: var(--maroon); margin: 0; }
.panel-head-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.btn-include-defaults {
  background: var(--cream-alt); border: 1px solid var(--border); color: var(--maroon);
  font-weight: 600; font-size: 13px; padding: 8px 16px; border-radius: 999px; cursor: pointer; font-family: inherit;
}
.form-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 260px)); gap: 14px; margin-bottom: 14px; }
@media (max-width: 480px) {
  .form-grid-3 { grid-template-columns: 1fr; }
}
.field-sm { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.field-sm input {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit;
}

/* Sewa item edit cards — compact grid so many items don't force a huge vertical scroll */
.sewa-edit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.sewa-edit-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: var(--cream-alt); display: flex; flex-direction: column; gap: 6px; }
.sewa-edit-card-top { display: flex; gap: 8px; align-items: center; }
.sewa-edit-card-top .new-sewa-name { flex: 1; min-width: 0; }
.sewa-edit-card input {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; font-size: 13px; font-family: inherit; background: #FFF;
}
.sewa-edit-card .new-sewa-time, .sewa-edit-card .new-sewa-notes {
  border-style: dashed; color: var(--text-muted); font-size: 12.5px;
}
.btn-remove {
  flex-shrink: 0; width: 26px; height: 26px; line-height: 1; display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--border); color: var(--danger); border-radius: 50%; cursor: pointer; font-size: 16px; padding: 0;
}
.field-sm.mb-18 { margin-bottom: 18px; }
.sewa-items-label { font-size: 14px; font-weight: 600; color: var(--maroon); margin-bottom: 10px; }
.mb-12 { margin-bottom: 12px; }
.btn-create-gathering { padding: 13px 28px; font-size: 15px; }
.empty-note-sm { color: var(--text-muted); font-size: 14px; }
.default-badge { color: var(--saffron-dark); font-size: 12px; font-weight: 700; margin-left: 4px; }
.subheading { font-family: var(--font-heading); font-size: 19px; color: var(--maroon); margin: 24px 0 16px; }
.comments-cell { max-width: 320px; }
.rsvp-success { text-align: center; padding: 40px 0; }
.rsvp-success .headline { font-family: var(--font-heading); font-size: 22px; color: var(--success); margin-bottom: 10px; }
.rsvp-success p { color: var(--text); font-size: 15px; margin: 0; }
.btn-add-sewa {
  background: var(--cream-alt); border: 1px solid var(--border); color: var(--maroon);
  font-weight: 600; font-size: 13px; padding: 9px 16px; border-radius: 999px; cursor: pointer; margin-bottom: 20px;
}

/* Mobile-only gathering sub-views: list / create / detail (see admin-dashboard.js) */
.btn-back {
  display: inline-flex; align-items: center; background: none; border: none; color: var(--maroon);
  font-weight: 600; font-size: 14px; padding: 4px 0; margin-bottom: 14px; cursor: pointer; font-family: inherit;
}
.btn-new-gathering { width: 100%; }
.gathering-row-list { display: flex; flex-direction: column; gap: 10px; }
.gathering-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #FFFFFF; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; cursor: pointer;
}
.gathering-row:active { background: var(--cream-alt); }
.row-title { font-family: var(--font-heading); font-weight: 600; font-size: 15px; color: var(--text); }
.row-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }
.row-chevron { font-size: 22px; color: var(--text-muted); flex-shrink: 0; line-height: 1; }

.gathering-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 20px; align-items: start; }
.gathering-card { background: #FFFFFF; border: 1px solid var(--border); border-radius: 12px; padding: clamp(16px, 3vw, 24px); }
.gathering-card.hidden-event { opacity: 0.6; }
.gathering-card .head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.gathering-card .name-line { font-family: var(--font-heading); font-weight: 600; font-size: 17px; color: var(--text); }
.gathering-card .sub-line { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.gathering-card .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.status-label { font-size: 12px; font-weight: 600; }
.status-label.visible { color: var(--success); }
.status-label.hidden { color: var(--danger); }
.btn-toggle {
  background: var(--cream-alt); border: 1px solid var(--border); color: var(--maroon);
  font-size: 12px; font-weight: 600; padding: 7px 14px; border-radius: 999px; cursor: pointer;
}
.btn-delete {
  background: #FFF; border: 1px solid var(--danger); color: var(--danger);
  font-size: 12px; font-weight: 600; padding: 7px 14px; border-radius: 999px; cursor: pointer;
}
.rsvp-count-line { font-size: 13px; color: var(--text); margin-bottom: 14px; }
.event-capacity-input {
  width: 70px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; font-family: inherit; text-align: center; background: #FFF;
}

.mini-sewa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 12px; }
.mini-sewa-card { border: 1px solid var(--border); border-radius: 8px; padding: 12px; background: var(--cream-alt); }
.mini-sewa-card .mini-sewa-name-input {
  display: block; width: 100%; box-sizing: border-box; margin-bottom: 4px;
  padding: 4px 6px; border: 1px solid transparent; border-radius: 6px;
  font-family: inherit; font-weight: 600; font-size: 13px; background: transparent;
}
.mini-sewa-card .mini-sewa-name-input:hover,
.mini-sewa-card .mini-sewa-name-input:focus { border-color: var(--border); background: #FFF; }
.mini-sewa-card .claimed { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.mini-sewa-card .row { display: flex; gap: 8px; align-items: center; }
.mini-sewa-card input { width: 70px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 12px; font-family: inherit; }
.mini-sewa-card .link-delete { background: none; border: none; color: var(--danger); font-size: 12px; cursor: pointer; }
.mini-sewa-card .mini-sewa-optional-input {
  display: block; width: 100%; box-sizing: border-box; margin-top: 6px;
  padding: 5px 7px; border: 1px dashed var(--border); border-radius: 6px;
  font-size: 11.5px; font-family: inherit; color: var(--text-muted); background: #FFF;
}

.add-sewa-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.add-sewa-inline input[type="text"] { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; font-family: inherit; width: 180px; }
.add-sewa-inline input[type="number"] { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; font-family: inherit; width: 120px; }
.add-sewa-inline button {
  background: var(--cream-alt); border: 1px solid var(--border); color: var(--maroon);
  font-size: 12px; font-weight: 600; padding: 8px 14px; border-radius: 999px; cursor: pointer;
}
.add-sewa-inline-secondary { margin-top: 8px; }
.add-sewa-inline-secondary input[type="text"] {
  flex: 1; width: auto; font-size: 12.5px; color: var(--text-muted); border-style: dashed;
}

@media (max-width: 480px) {
  .add-sewa-inline-secondary { flex-direction: column; align-items: stretch; }
  .add-sewa-inline-secondary input[type="text"] { min-width: 0; width: 100%; }
}

.data-table-wrap { background: #FFFFFF; border: 1px solid var(--border); border-radius: 12px; overflow-x: auto; overflow-y: hidden; }
table.data-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
table.data-table thead tr { background: var(--cream-alt); text-align: left; }
table.data-table th { padding: 12px 16px; font-size: 12px; color: var(--text-muted); }
table.data-table td { padding: 12px 16px; }
table.data-table tbody tr { border-top: 1px solid var(--border); }
.timestamp-cell { color: var(--text-muted); font-size: 13px; }
.empty-table-note { color: var(--text-muted); font-size: 14px; padding: 24px; }

@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .site-header { flex-direction: column; align-items: flex-start; }
}

/* In-app confirm dialog (replaces window.confirm) */
.confirm-overlay {
  position: fixed; inset: 0; background: rgba(46, 36, 32, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 1000;
}
.confirm-box {
  background: #FFFFFF; border-radius: 14px; padding: 28px; max-width: 400px; width: 100%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}
.confirm-message { font-size: 15px; color: var(--text); line-height: 1.6; margin: 0 0 24px; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.confirm-actions button:focus-visible { outline: 2px solid var(--saffron); outline-offset: 2px; }
