:root {
  --font-head: 'Inter', 'SF Pro Display', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-surface: #ffffff;
  --color-card: #f4f6fb;
  --color-border: #e5e7eb;
  --color-muted: #6b7280;
  --color-dark: #111827;
  --color-accent: #bfa27a;
  --color-success: #15803d;
  --color-warning: #b45309;
  --color-danger: #b91c1c;
  --shadow-soft: 0 10px 30px rgba(17, 24, 39, 0.08);
  --radius-base: 16px;
  --radius-pill: 999px;
  --header-height: 74px;
  --transition-base: 250ms ease;
}

/* We DO NOT auto-switch to dark mode from OS; theme always light */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--color-dark);
  background:
    radial-gradient(circle at top, rgba(191, 162, 122, 0.08), transparent 60%),
    var(--color-bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(191, 162, 122, 0.4);
  outline-offset: 2px;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

main {
  min-height: calc(100vh - 220px);
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

/* Sections & headings */

.section {
  padding: 4rem 0;
}

.section__header {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.section__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: var(--color-muted);
}

.section__title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 3vw, 3rem);
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

ul {
  padding-left: 1.2rem;
}

/* Cards & grids */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-base);
  padding: 1.75rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(17, 24, 39, 0.16);
}

/* Horizontal divider inside cards */
.card-divider {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 1rem 0;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: var(--radius-pill);
  padding: 0.85rem 1.7rem;
  font-weight: 600;
  transition:
    background var(--transition-base),
    color var(--transition-base),
    transform var(--transition-base);
}

.btn-primary {
  background: var(--color-dark);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--color-card);
  color: var(--color-dark);
  border: 1px solid var(--color-border);
}

.btn-danger {
  background: rgba(185, 28, 28, 0.1);
  color: var(--color-danger);
}

/* Badges */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.8rem;
  border-radius: var(--radius-pill);
  background: var(--color-card);
  color: var(--color-dark);
  font-size: 0.8rem;
  text-transform: capitalize;
}

.badge-success {
  background: rgba(21, 128, 61, 0.15);
  color: var(--color-success);
}

.badge-warning {
  background: rgba(180, 83, 9, 0.15);
  color: var(--color-warning);
}

.badge-danger {
  background: rgba(185, 28, 28, 0.15);
  color: var(--color-danger);
}

/* =========================
   HEADER / NAV
   ========================= */

header {
  
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(229, 231, 235, 0.7);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-height);
}

.brand {
  font-weight: 700;
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-links a {
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  color: var(--color-muted);
  font-weight: 600;
  transition: background var(--transition-base), color var(--transition-base);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-dark);
  background: rgba(191, 162, 122, 0.15);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  align-items: center;
  justify-content: center;
}

/* ===== HERO ===== */

.hero {
  padding: 5rem 0 3rem;
}

.hero__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: center;
}

.hero__title {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 4vw, 3.6rem);
  margin: 0 0 1rem;
}

.hero__subtitle {
  color: var(--color-muted);
  font-size: 1.1rem;
}

.hero__media {
  position: relative;
}

.hero__media img {
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-soft);
}

/* Stats on home hero */

.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.stat {
  background: var(--color-card);
  border-radius: var(--radius-base);
  padding: 1rem;
  text-align: center;
}

/* Steps */

.highlight-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.step {
  padding: 1rem;
  border-radius: var(--radius-base);
  background: var(--color-surface);
  border: 1px dashed rgba(191, 162, 122, 0.4);
}

/* Litter & gallery grids */

.litter-grid,
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.litter-card img,
.gallery-grid img {
  border-radius: var(--radius-base);
}

/* Tables */

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-base);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

thead {
  background: var(--color-bg-alt);
}

th,
td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

tr:last-child td {
  border-bottom: none;
}

/* Forms */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

label {
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.4rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: #fff;
  font: inherit;
  transition: border var(--transition-base), box-shadow var(--transition-base);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(191, 162, 122, 0.2);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* Screen-reader only */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ===== FOOTER ===== */

.footer,
.site-footer {
  background: #020617;
  color: #e5e7eb;
  padding: 3rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.footer h3,
.footer h4,
.footer p,
.footer li,
.site-footer h3,
.site-footer h4,
.site-footer p,
.site-footer li {
  color: #e5e7eb;
}

.footer a,
.site-footer a {
  color: #e5e7eb;
}

.footer a:hover,
.site-footer a:hover {
  color: #fbbf24;
}

.policy-block {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-base);
  padding: 1.5rem;
}

/* Accordion (FAQ) */

.accordion {
  border-radius: var(--radius-base);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.accordion-item + .accordion-item {
  border-top: 1px solid var(--color-border);
}

.accordion button {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion p {
  padding: 0 1.25rem 1.25rem;
  margin: 0;
}

/* Gallery tabs on public page */

.gallery-tabs {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.gallery-tabs button {
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-muted);
}

.gallery-tabs button[aria-pressed="true"] {
  background: var(--color-dark);
  color: #fff;
}

/* Toast notifications */

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-base);
  background: var(--color-dark);
  color: #fff;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity var(--transition-base), transform var(--transition-base);
  z-index: 40;
}

.toast[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
}

/* Login portal */

.login-portal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.login-card {
  border-radius: var(--radius-base);
  border: 1px solid var(--color-border);
  padding: 2rem;
  background: var(--color-surface);
}

/* Tabbed login buttons */

.tabs {
  display: inline-flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
}

.tabs button {
  flex: 1;
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  font-weight: 600;
  color: var(--color-muted);
}

.tabs button[aria-selected="true"] {
  background: var(--color-dark);
  color: #fff;
}

/* Family & admin dashboard layout */

.dashboard {
  display: grid;
  gap: 2rem;
}

.dashboard-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.portal-table img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--color-border);
}

.reservation-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.log-panel {
  min-height: 120px;
  border-radius: var(--radius-base);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 1rem;
  font-size: 0.9rem;
}

/* Timeline (messages) */

.timeline {
  border-left: 3px solid rgba(191, 162, 122, 0.4);
  padding-left: 1.5rem;
  list-style: none;
}

.timeline li {
  margin-bottom: 1rem;
}

/* Map embed */

.map-embed {
  border: 0;
  width: 100%;
  height: 320px;
  border-radius: var(--radius-base);
}

/* =========================
   MOBILE BREAKPOINTS
   ========================= */

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  /* Hide desktop nav by default on mobile */
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    display: none;               /* hidden until opened */
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.98);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
    border-bottom: 1px solid var(--color-border);
    z-index: 50;                 /* above everything, including admin cards */
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .nav-links[data-open="true"] {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }

  header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #f9fafb;
  }
}

/* Small phones */

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  header .navbar {
    padding-block: 0.5rem;
  }

  .hero {
    padding: 3rem 0 2rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  .container {
    padding-inline: 1.25rem;
  }

  .login-portal {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .login-card,
  .card {
    padding: 1.25rem;
  }

  .dashboard-panels,
  .reservation-tools {
    grid-template-columns: 1fr;
  }

  .portal-table {
    font-size: 0.9rem;
  }

  .portal-table th,
  .portal-table td {
    padding: 0.5rem 0.4rem;
    white-space: normal;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero__inner {
    grid-template-columns: 1fr;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}

/* ===== Stud services pill checkboxes ===== */

.services-fieldset {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.75rem 0.75rem 0.5rem;
}

.pill-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pill-checkbox {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  background: #f3f4f6;
  font-size: 0.9rem;
}

.pill-checkbox input[type="checkbox"] {
  margin: 0;
}

.pill-label-text {
  white-space: nowrap;
}

.pill-remove-service {
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  justify-self: end;
  color: #9ca3af;
}

.pill-remove-service:hover {
  color: #ef4444;
}

/* "+ Add service" button style */

#add-service-btn.btn.btn-ghost {
  margin-top: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  font-size: 0.85rem;
}

#add-service-btn.btn.btn-ghost:hover {
  background: #f9fafb;
}

/* ===== Gallery layout & viewer ===== */

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-start;
}

.gallery-card {
  flex: 0 1 220px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #ffffff;
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gallery-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.gallery-card__thumb img {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 10px;
}

.gallery-card__meta h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.gallery-card__meta p {
  margin: 0;
  font-size: 0.85rem;
  color: #6b7280;
}

/* Popup viewer */

.gallery-viewer {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999;
}

.gallery-viewer.is-open {
  display: block;
}

.gallery-viewer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.gallery-viewer__dialog {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 3rem auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
  padding: 1.25rem 1.5rem 1.5rem;
}

.gallery-viewer__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-viewer__layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1.25rem;
}

.gallery-viewer__main {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-viewer__main-image {
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
}

.gallery-viewer__panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gallery-viewer__title {
  margin: 0;
}

.gallery-viewer__meta {
  margin: 0;
  font-size: 0.9rem;
  color: #6b7280;
}

.gallery-viewer__panel-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 420px;
  overflow: auto;
}

/* Puppies under litter in viewer */

.viewer-puppy-card {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  border-radius: 10px;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.viewer-puppy-card:hover {
  background: #f3f4f6;
}

.viewer-puppy-card img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
}

/* Thumbnail strip */

.viewer-thumb-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.viewer-thumb-strip img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.viewer-thumb-strip img:hover {
  opacity: 1;
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .gallery-viewer__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-viewer__dialog {
    margin: 1.5rem 1rem;
  }

  .gallery-card {
    flex: 0 1 calc(50% - 0.75rem);
  }
}

@media (max-width: 600px) {
  .gallery-card {
    flex: 0 1 100%;
  }
}

/* ===== Admin shell & tabs ===== */

.admin-shell {
  max-width: 1200px;
  margin: 2rem auto 3rem;
  padding: 0 1rem;
}

.admin-header {
  margin-bottom: 1rem;
}

.admin-header h1 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.admin-header__subtitle {
  margin-top: 0.25rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* Chrome-style admin tabs */

.admin-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
  scrollbar-width: thin;
}

.admin-tabs::-webkit-scrollbar {
  height: 6px;
}

.admin-tabs::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.7);
}

.admin-tab {

  border-radius: 12px 12px 0 0;
  padding: 0.55rem 1.1rem;
  background: linear-gradient(180deg, #e5e7eb, #d1d5db);
  border: 1px solid transparent;
  border-bottom: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease,
    color 0.16s ease,
    transform 0.1s ease;
}

.admin-tab__title {
  pointer-events: none;
}

.admin-tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
  color: var(--color-dark);
}

.admin-tab.is-active {
  background: var(--color-surface);
  color: var(--color-dark);
  border-color: var(--color-border);
  box-shadow:
    0 -1px 0 var(--color-surface),
    var(--shadow-soft);
  z-index: 1;
}

.admin-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--color-surface);
}

.admin-tab:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Admin panels */

.admin-panel {
  border-radius: 0 16px 16px 16px;
  border: 1px solid var(--color-border);
  padding: 1.25rem 1.5rem;
  margin-top: -1px;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.admin-panel[hidden] {
  display: none;
}

.admin-panel form {
  margin-bottom: 1.25rem;
}

.admin-panel h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

/* Family portal payment list */

.payment-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
}

.payment-list li {
  margin-bottom: 0.1rem;
}
/* --- HARD OVERRIDE: full-screen mobile nav overlay --- */
@media (max-width: 900px) {
  /* Make sure the header itself isn’t above the menu */
  header,
  .site-header {
    z-index: 60;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed !important;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    /* solid background so admin cards don't show through */
    background: #ffffff;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.5rem 2rem;
    /* overlay on top of all page content */
    z-index: 70;
    /* closed state */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, max-height 0.25s ease;
  }

  .nav-links[data-open="true"] {
    max-height: 100vh;   /* fully open */
    opacity: 1;
    transform: translateY(0);
    overflow-y: auto;
  }
}
/* --- Admin Tabs Layout Fix --- */
.admin-tabs {
  position: sticky;
  top: var(--header-height, 60px);
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  gap: 0.25rem;
  background: #fff;
  z-index: 50; /* ensures it's above panels but below mobile menu */
  border-bottom: 1px solid #e5e7eb;
}

/* Hide scrollbar but still allow horizontal scroll */
.admin-tabs::-webkit-scrollbar {
  display: none;
}
.admin-tabs {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.admin-tab {
  flex-shrink: 0;
  border: none;
  background: none;
  font-weight: 500;
  color: #444;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 2px solid transparent;
}
.admin-tab.is-active {
  border-bottom-color: var(--accent, #bfa27a);
  color: #000;
  background: #f9fafb;
}
.admin-tab:hover {
  background: #f3f4f6;
}
/* --- Admin Tabs: non-sticky version --- */
.admin-tabs {
  position: relative;       /* remove sticky behavior */
  top: auto;
  background: #fff;
  z-index: 10;              /* normal stacking */
  display: flex;
  overflow-x: auto;
  gap: 0.25rem;
  border-bottom: 1px solid #e5e7eb;
  -webkit-overflow-scrolling: touch;
}

/* keep scrollbar hidden for mobile polish */
.admin-tabs::-webkit-scrollbar {
  display: none;
}
.admin-tabs {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
/* --- Dashboard Summary Bar --- */
.admin-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.summary-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease;
}
.summary-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.summary-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 0.3rem;
}
.summary-card p {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}
/* --- Admin Portal --- */

.page-admin {
  background-color: #fff;
  color: #111;
  font-family: "Inter", system-ui, sans-serif;
}

.admin-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.admin-header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 1px solid #ddd;
  background: #fafafa;
  padding: 0.25rem 1rem;
}

.admin-tab {
  border: none;
  background: transparent;
  padding: 0.5rem 1rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: background 0.2s ease;
}

.admin-tab.is-active {
  background: #fff;
  border: 1px solid #ddd;
  border-bottom: none;
}

.admin-panel {
  padding: 1.5rem 2rem;
}

.admin-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 1.5rem;
  background: #f9fafb;
  border-bottom: 1px solid #eee;
}

.summary-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  flex: 1 1 160px;
  min-width: 160px;
  text-align: center;
  padding: 1rem 0.5rem;
}

.summary-label {
  color: #555;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.summary-value {
  font-weight: 700;
  font-size: 1.25rem;
  color: #111;
}

/* Grid for panels and forms */
.admin-panel__content.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.card h3 {
  margin-top: 0;
  font-size: 1.15rem;
}

.table-wrapper {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table th, .table td {
  border-bottom: 1px solid #eee;
  padding: 0.5rem 0.75rem;
}

.table th {
  text-align: left;
  font-weight: 600;
  background: #fafafa;
}

.table td button.btn {
  font-size: 0.8rem;
}

/* Tag pills */
.tag-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.tag-pill {
  background: #f3f4f6;
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.tag-pill button {
  background: none;
  border: none;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
}

.album-photos-inner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Buttons */
.btn {
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  padding: 0.5rem 1rem;
}

.btn-primary {
  background-color: #111827;
  color: #fff;
}

.btn-secondary {
  background-color: #e5e7eb;
  color: #111;
}

.btn-danger {
  background-color: #dc2626;
  color: #fff;
}

.form-grid .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.form-row label {
  flex: 1 1 45%;
  display: flex;
  flex-direction: column;
}

.form-row input,
.form-row select,
.form-row textarea {
  margin-top: 0.25rem;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.form-footnote {
  font-size: 0.85rem;
  color: #666;
}
/* --- Pupdates timeline (admin + family) --- */

.timeline-list {
  margin-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.timeline-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.timeline-meta {
  min-width: 110px;
  font-size: 0.8rem;
  color: #6b7280;
}

.timeline-date {
  font-weight: 600;
}

.timeline-type {
  margin-top: 0.15rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  display: inline-block;
}

.timeline-body {
  flex: 1;
}

.timeline-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.timeline-notes {
  margin: 0.25rem 0 0.4rem;
  font-size: 0.9rem;
}

.timeline-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.timeline-photo-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.btn-xs {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}
.report-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--color-card);
  border-radius: var(--radius-base);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-soft);
}

.stat-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-muted);
}

.stat-value {
  margin: 0.1rem 0;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--color-dark);
}

.stat-caption {
  margin: 0.1rem 0 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}
/* --- Family portal tabs --- */

.family-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
  scrollbar-width: thin;
}

.family-tabs::-webkit-scrollbar {
  height: 6px;
}

.family-tabs::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.7);
}

.family-tabs [role="tab"] {
  border: none;
  background: transparent;
  padding: 0.6rem 1.1rem;
  border-radius: 999px 999px 0 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-muted);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.family-tabs [role="tab"].is-active {
  background: var(--color-surface);
  color: var(--color-dark);
  box-shadow: 0 -1px 0 var(--color-surface), var(--shadow-soft);
}

.family-tab-panels {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.family-tab-panels > .card {
  animation: family-fadein 0.22s ease-out;
}

@keyframes family-fadein {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* small helpers for headings in cards on family portal */
.card__title {
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.card__lede {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}
/* Checklist cards (admin + family) */
.checklist-card {
  background: #ffffff;
  border: 1px solid #e5e7eb; /* gray-200 */
  border-radius: 0.75rem;    /* rounded-xl vibe */
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06); /* subtle shadow */
}

.checklist-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #111827; /* gray-900 */
}

.checklist-list {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.checklist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f3f4f6; /* gray-100 */
}

.checklist-item:last-child {
  border-bottom: none;
}

.checklist-item-main {
  flex: 1 1 auto;
}

.checklist-item-text {
  display: inline-block;
  font-size: 0.95rem;
  color: #111827;
  word-break: break-word;
}

.checklist-item-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Status buttons */
.checklist-status-btn {
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  border: none;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease;
}

.checklist-status-btn.status-done {
  background-color: #dcfce7; /* green-100 */
  color: #166534;            /* green-700 */
  box-shadow: 0 0 0 1px rgba(22, 101, 52, 0.15);
}

.checklist-status-btn.status-pending {
  background-color: #fee2e2; /* red-100 */
  color: #b91c1c;            /* red-700 */
  box-shadow: 0 0 0 1px rgba(185, 28, 28, 0.15);
}

.checklist-status-btn:hover {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); /* blue-ish focus hover */
}

/* Delete button */
.checklist-delete-btn {
  border: none;
  background: transparent;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 999px;
  line-height: 1;
  transition: background-color 0.15s ease;
}

.checklist-delete-btn:hover {
  background-color: #fee2e2;
}

/* Add row */
.checklist-add-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.checklist-add-row input[type="text"],
.checklist-add-row input[type="search"] {
  flex: 1 1 auto;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db; /* gray-300 */
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
}

.checklist-add-row input:focus {
  outline: none;
  border-color: #2563eb; /* blue-600 */
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.checklist-add-row button {
  border-radius: 0.5rem;
  border: none;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  background: #2563eb; /* blue-600 */
  color: #ffffff;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.checklist-add-row button:hover {
  background: #1d4ed8; /* blue-700 */
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

/* Hint text */
.checklist-hint {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: #6b7280; /* gray-500 */
}

/* Loading / error / empty states */
.checklist-loading,
.checklist-error,
.checklist-empty {
  font-size: 0.9rem;
  color: #6b7280;
}

/* Family view tweaks */
#family-checklist-list .checklist-item {
  justify-content: flex-start;
}
.checklist-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checklist-res-row {
  margin-bottom: 0.5rem;
}

.checklist-res-row label {
  display: inline-flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
  color: #111827;
}

.checklist-res-row select {
  padding: 0.35rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
}

.checklist-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checklist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  font-size: 0.9rem;
}

.checklist-item-main {
  flex: 1;
  margin-right: 0.75rem;
}

.checklist-item-text {
  word-break: break-word;
}

.checklist-item-text.is-complete {
  text-decoration: line-through;
  color: #6b7280;
}

.checklist-item-actions {
  display: flex;
  gap: 0.4rem;
}

.checklist-status-btn {
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  border: none;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease;
}

.checklist-status-btn.status-done {
  background-color: #dcfce7; /* green-100 */
  color: #166534;            /* green-700 */
  box-shadow: 0 0 0 1px rgba(22, 101, 52, 0.15);
}

.checklist-status-btn.status-pending {
  background-color: #fee2e2; /* red-100 */
  color: #b91c1c;            /* red-700 */
  box-shadow: 0 0 0 1px rgba(185, 28, 28, 0.15);
}

.checklist-status-btn:hover {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.checklist-delete-btn {
  border: none;
  background: transparent;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 999px;
  line-height: 1;
  transition: background-color 0.15s ease;
}

.checklist-delete-btn:hover {
  background-color: #fee2e2;
}

.checklist-add-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.checklist-add-row input[type="text"] {
  flex: 1;
}

.checklist-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.checklist-status-text {
  font-size: 0.8rem;
  color: #6b7280;
}

.checklist-hint {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0;
}
.checklist-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: #6b7280;
}

.checklist-due-input {
  font-size: 0.8rem;
  padding: 0.15rem 0.35rem;
  border-radius: 0.35rem;
  border: 1px solid #d1d5db;
}

.checklist-due-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.checklist-status-pill {
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Row background tints */
.checklist-item--done {
  background-color: #ecfdf3; /* green-50 */
}

.checklist-item--overdue {
  background-color: #fef2f2; /* red-50 */
}

.checklist-item--upcoming {
  background-color: #fffbeb; /* amber-50 */
}

.checklist-item--no-date {
  background-color: #f9fafb; /* gray-50 */
}

/* Status pill colors */
.status-done,
.checklist-status-pill.status-done {
  background-color: #dcfce7;
  color: #166534;
}

.checklist-status-pill.status-overdue {
  background-color: #fee2e2;
  color: #b91c1c;
}

.checklist-status-pill.status-upcoming {
  background-color: #fef3c7;
  color: #92400e;
}

.checklist-status-pill.status-no-date {
  background-color: #e5e7eb;
  color: #374151;
}
.checklist-progress {
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.checklist-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #374151; /* gray-700 */
}

.checklist-progress-bar {
  width: 100%;
  height: 0.5rem;
  background-color: #e5e7eb; /* gray-200 */
  border-radius: 999px;
  overflow: hidden;
}

.checklist-progress-bar-inner {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #22c55e, #16a34a); /* green */
  transition: width 0.25s ease;
}

/* Ready for pickup badge */
.ready-badge {
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background-color: #dcfce7; /* green-100 */
  color: #166534;            /* green-700 */
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(22, 101, 52, 0.35);
  white-space: nowrap;
}
.checklist-reservation-select {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checklist-reservation-select select {
  flex: 1;
  padding: 0.35rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 0.9rem;
}

/* =========================
   FAMILY PHOTOS + LIGHTBOX
   ========================= */

.family-photo-official-block {
  margin-bottom: 1.25rem;
}

.family-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}

.family-photo-tile {
  padding: 0;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  cursor: pointer;
}

.family-photo-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.family-photo-gallery-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.family-photo-thumb {
  width: 80px;
  height: 80px;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
}

.family-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lightbox */

.photo-lightbox[hidden] {
  display: none;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.photo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
}

.photo-lightbox-inner {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.photo-lightbox-figure {
  margin: 0;
  max-width: 80vw;
  max-height: 80vh;
}

.photo-lightbox-figure img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 0.75rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.5);
}

.photo-lightbox-figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #e5e7eb;
  text-align: center;
}

.photo-lightbox-close,
.photo-lightbox-prev,
.photo-lightbox-next {
  position: relative;
  z-index: 2;
  border: none;
  background: rgba(15, 23, 42, 0.7);
  color: #f9fafb;
  cursor: pointer;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-lightbox-close {
  position: absolute;
  top: -0.75rem;
  right: -0.75rem;
}

.photo-lightbox-prev,
.photo-lightbox-next {
  height: 2.2rem;
  width: 2.2rem;
}
