/* ==========================================================================
   ANZOLLIE KIDS CHORES & ALLOWANCE APP - MODERN DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Core brand colors */
  --brand-primary: #6366f1;
  --brand-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  
  /* Zoe's Theme (Sunset Rose / Fuchsia) */
  --zoe-primary: #ec4899;
  --zoe-secondary: #f43f5e;
  --zoe-gradient: linear-gradient(135deg, #ec4899 0%, #f43f5e 50%, #fb923c 100%);
  --zoe-light-bg: #fff1f2;
  --zoe-card-border: rgba(236, 72, 153, 0.25);
  --zoe-badge: #fce7f3;
  --zoe-badge-text: #be185d;
  --zoe-glow: rgba(236, 72, 153, 0.35);

  /* Oliver's Theme (Ocean Blue / Cyan) */
  --oliver-primary: #3b82f6;
  --oliver-secondary: #06b6d4;
  --oliver-gradient: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #10b981 100%);
  --oliver-light-bg: #f0f9ff;
  --oliver-card-border: rgba(59, 130, 246, 0.25);
  --oliver-badge: #e0f2fe;
  --oliver-badge-text: #0369a1;
  --oliver-glow: rgba(59, 130, 246, 0.35);

  /* Parent Zone Theme (Deep Slate & Gold / Emerald) */
  --parent-primary: #0f172a;
  --parent-card-bg: #1e293b;
  --parent-accent: #10b981;
  --parent-gold: #f59e0b;

  /* BVSD Lunch Theme (Fresh Tangerine / Emerald Green) */
  --lunch-primary: #f59e0b;
  --lunch-secondary: #10b981;
  --lunch-gradient: linear-gradient(135deg, #f59e0b 0%, #f97316 40%, #10b981 100%);
  --lunch-light-bg: #fffbeb;
  --lunch-card-border: rgba(245, 158, 11, 0.25);
  --lunch-badge: #fef3c7;
  --lunch-badge-text: #b45309;
  --lunch-glow: rgba(245, 158, 11, 0.35);

  /* Neutral UI system */
  --bg-main: #f8fafc;
  --surface-card: #ffffff;
  --surface-card-subtle: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-subtle: #e2e8f0;
  --border-card: rgba(226, 232, 240, 0.8);
  
  /* Status Colors */
  --success: #10b981;
  --success-light: #d1fae5;
  --success-dark: #065f46;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-light: #fee2e2;

  /* Typography */
  --font-heading: 'Fredoka', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Elevation Shadows */
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 16px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 14px 28px -4px rgba(15, 23, 42, 0.1), 0 8px 12px -3px rgba(15, 23, 42, 0.05);
  --shadow-glow: 0 8px 25px -4px var(--active-glow, rgba(99, 102, 241, 0.3));

  /* Spacing & Radius */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 9999px;

  /* Active dynamic token defaults */
  --active-primary: var(--brand-primary);
  --active-gradient: var(--brand-gradient);
  --active-glow: rgba(99, 102, 241, 0.3);
  --active-light-bg: #eef2ff;
  --active-badge: #e0e7ff;
  --active-badge-text: #4338ca;
}

/* Theme Switching Overrides */
body[data-active-tab="zoe"] {
  --active-primary: var(--zoe-primary);
  --active-gradient: var(--zoe-gradient);
  --active-glow: var(--zoe-glow);
  --active-light-bg: var(--zoe-light-bg);
  --active-badge: var(--zoe-badge);
  --active-badge-text: var(--zoe-badge-text);
}

body[data-active-tab="oliver"] {
  --active-primary: var(--oliver-primary);
  --active-gradient: var(--oliver-gradient);
  --active-glow: var(--oliver-glow);
  --active-light-bg: var(--oliver-light-bg);
  --active-badge: var(--oliver-badge);
  --active-badge-text: var(--oliver-badge-text);
}

body[data-active-tab="both"] {
  --active-primary: #8b5cf6;
  --active-gradient: linear-gradient(135deg, #ec4899 0%, #a855f7 50%, #3b82f6 100%);
  --active-glow: rgba(139, 92, 246, 0.35);
  --active-light-bg: #f5f3ff;
  --active-badge: #ede9fe;
  --active-badge-text: #6d28d9;
}

body[data-active-tab="lunch"] {
  --active-primary: var(--lunch-primary);
  --active-gradient: var(--lunch-gradient);
  --active-glow: var(--lunch-glow);
  --active-light-bg: var(--lunch-light-bg);
  --active-badge: var(--lunch-badge);
  --active-badge-text: var(--lunch-badge-text);
}

/* --- Base & Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  background-image: 
    radial-gradient(at 0% 0%, rgba(236, 72, 153, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(99, 102, 241, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

/* --- App Container Layout --- */
.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1rem 6rem 1rem;
}

@media (min-width: 768px) {
  .app-wrapper {
    padding: 0 1.5rem 3rem 1.5rem;
  }
}

/* --- Top Navigation Header --- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  margin: 0 -1rem 1.5rem -1rem;
  padding: 0.75rem 1rem;
}

@media (min-width: 768px) {
  .app-header {
    margin: 0 -1.5rem 2rem -1.5rem;
    padding: 1rem 1.5rem;
  }
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-main);
  user-select: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  transform: rotate(-3deg);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover .brand-icon {
  transform: rotate(6deg) scale(1.08);
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-nav-tabs {
  display: none; /* Desktop only */
  background: var(--surface-card-subtle);
  padding: 0.3rem;
  border-radius: var(--radius-pill);
  gap: 0.3rem;
}

@media (min-width: 768px) {
  .header-nav-tabs {
    display: flex;
  }
}

.nav-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.nav-tab-btn:hover {
  color: var(--text-main);
}

.nav-tab-btn.active {
  background: white;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.nav-tab-btn.zoe-tab.active {
  color: var(--zoe-primary);
}

.nav-tab-btn.oliver-tab.active {
  color: var(--oliver-primary);
}

.nav-tab-btn.dual-tab.active {
  color: #8b5cf6;
}

.nav-tab-btn.lunch-tab.active {
  color: var(--lunch-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: white;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}

.icon-btn:hover {
  background: var(--surface-card-subtle);
  color: var(--text-main);
  transform: translateY(-1px);
}

.parent-lock-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

.parent-lock-btn:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.cloud-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-pill);
  background: rgba(241, 245, 249, 0.85);
  border: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s ease;
  user-select: none;
}

.cloud-sync-badge .sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd5e1;
  display: inline-block;
}

.cloud-sync-badge.synced .sync-dot {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.cloud-sync-badge.connecting .sync-dot {
  background: #f59e0b;
  animation: pulse 1.5s infinite;
}

.cloud-sync-badge.offline .sync-dot {
  background: #94a3b8;
}

@media (max-width: 640px) {
  .cloud-sync-badge .sync-text {
    display: none;
  }
  .cloud-sync-badge {
    padding: 0.4rem;
    min-width: 26px;
    justify-content: center;
  }
}


/* --- Mobile Bottom Navigation --- */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom, 0px)) 0.5rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .mobile-bottom-nav {
    display: none;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  flex: 1;
}

.mobile-nav-item .nav-icon {
  font-size: 1.35rem;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-nav-item.active {
  color: var(--active-primary);
}

.mobile-nav-item.active .nav-icon {
  transform: scale(1.2);
}

/* --- Kid Profile Hero Banner --- */
.kid-hero-banner {
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border-card);
  position: relative;
  overflow: hidden;
  margin-bottom: 1.75rem;
  transition: all 0.3s ease;
}

.kid-hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--active-gradient);
}

.hero-main-row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .hero-main-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.hero-profile-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar-wrapper {
  position: relative;
}

.kid-avatar-badge {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-xl);
  background: var(--active-light-bg);
  border: 3px solid white;
  box-shadow: var(--shadow-md), 0 0 0 2px var(--active-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  user-select: none;
}

.streak-pill {
  position: absolute;
  bottom: -6px;
  right: -8px;
  background: #ff5722;
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  border: 2px solid white;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.greeting-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

.kid-name-display {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-main);
}

/* Big Balance Tracker Card */
.hero-earnings-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--active-light-bg);
  border: 1px solid var(--border-card);
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-lg);
}

.earnings-metric {
  display: flex;
  flex-direction: column;
}

.earnings-metric .metric-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.earnings-metric .metric-value {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--active-primary);
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.earnings-metric .metric-subvalue {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted);
}

.earnings-divider {
  width: 1px;
  height: 42px;
  background: rgba(0, 0, 0, 0.08);
}

/* Savings Goal Meter */
.hero-goal-container {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.goal-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
}

.goal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--text-main);
}

.goal-progress-numbers {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.goal-progress-bar-track {
  width: 100%;
  height: 12px;
  background: var(--surface-card-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}

.goal-progress-bar-fill {
  height: 100%;
  background: var(--active-gradient);
  border-radius: var(--radius-pill);
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Chores Sections & Layout --- */
.chores-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

@media (min-width: 960px) {
  .chores-layout-grid {
    grid-template-columns: 1.4fr 1fr;
  }
}

.section-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 500;
}

.completion-counter-badge {
  background: white;
  border: 1px solid var(--border-card);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.completion-counter-badge.all-done {
  background: var(--success-light);
  color: var(--success-dark);
  border-color: rgba(16, 185, 129, 0.3);
}

/* Time Filter Chips */
.time-filter-row {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}
.time-filter-row::-webkit-scrollbar { display: none; }

.filter-chip {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  background: white;
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-chip:hover {
  background: var(--surface-card-subtle);
  color: var(--text-main);
}

.filter-chip.active {
  background: var(--text-main);
  color: white;
  border-color: var(--text-main);
}

/* --- Chore Cards List --- */
.chores-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chore-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-card);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  user-select: none;
}

.chore-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.3);
}

.chore-card.completed {
  background: #f8fafc;
  border-color: rgba(16, 185, 129, 0.35);
  opacity: 0.88;
}

.chore-card-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex: 1;
  min-width: 0;
}

.chore-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--surface-card-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.chore-card:hover .chore-icon-box {
  transform: scale(1.08) rotate(3deg);
}

.chore-card.completed .chore-icon-box {
  background: var(--success-light);
}

.chore-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.chore-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chore-card.completed .chore-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.chore-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chore-meta-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.2rem;
  flex-wrap: wrap;
}

.chore-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--surface-card-subtle);
  color: var(--text-muted);
}

.points-badge {
  background: #fef3c7;
  color: #b45309;
  font-weight: 800;
}

.weekly-target-badge {
  background: #e0f2fe;
  color: #0369a1;
}

/* Chore Action Check Button */
.chore-check-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border-subtle);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chore-check-btn:hover {
  border-color: var(--active-primary);
  transform: scale(1.1);
  color: rgba(99, 102, 241, 0.4);
}

.chore-card.completed .chore-check-btn {
  background: var(--success);
  border-color: var(--success);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  transform: scale(1.05);
}

.undo-btn {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--surface-card-subtle);
  margin-left: auto;
}

.undo-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* --- Weekly Chores Card Progress --- */
.weekly-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.weekly-steps-row {
  display: flex;
  gap: 0.3rem;
}

.weekly-step-pip {
  flex: 1;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--border-subtle);
}

.weekly-step-pip.filled {
  background: var(--active-primary);
}

/* --- Empty States --- */
.empty-state-card {
  background: white;
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.empty-icon {
  font-size: 2.5rem;
}

.empty-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.empty-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 320px;
}

/* --- Side-by-Side Dual Kids View --- */
.dual-kids-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 960px) {
  .dual-kids-container {
    grid-template-columns: 1fr 1fr;
  }
}

.dual-column-panel {
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  border: 2px solid var(--border-card);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dual-column-panel.zoe-panel {
  border-color: var(--zoe-card-border);
}

.dual-column-panel.oliver-panel {
  border-color: var(--oliver-card-border);
}

/* --- Parent Zone Styles --- */
.parent-zone-container {
  background: #0f172a;
  color: #f8fafc;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  margin-top: 0.5rem;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .parent-zone-container {
    padding: 2rem;
  }
}

/* PIN Lock Screen */
.pin-screen-wrap {
  max-width: 380px;
  margin: 2rem auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.pin-lock-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #f59e0b;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.pin-screen-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
}

.pin-screen-subtitle {
  font-size: 0.88rem;
  color: #94a3b8;
}

.pin-dots-row {
  display: flex;
  gap: 0.8rem;
  margin: 0.5rem 0;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  transition: all 0.2s ease;
}

.pin-dot.filled {
  background: #10b981;
  border-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
  transform: scale(1.2);
}

.pin-keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  width: 100%;
  max-width: 280px;
}

.pin-key-btn {
  height: 60px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-key-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.05);
}

.pin-key-btn:active {
  transform: scale(0.95);
}

.pin-hint-text {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.5rem;
}

/* Parent Dashboard UI */
.parent-dash-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .parent-dash-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.parent-dash-title {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.parent-nav-tabs {
  display: flex;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.3rem;
  border-radius: var(--radius-pill);
  overflow-x: auto;
}

.parent-tab-btn {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

.parent-tab-btn:hover {
  color: white;
}

.parent-tab-btn.active {
  background: #10b981;
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

/* Unpaid Balances Cards */
.parent-balances-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .parent-balances-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.balance-card {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  position: relative;
  overflow: hidden;
}

.balance-card.zoe-card {
  border-top: 4px solid var(--zoe-primary);
}

.balance-card.oliver-card {
  border-top: 4px solid var(--oliver-primary);
}

.balance-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.balance-kid-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.balance-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.balance-kid-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
}

.balance-amount-box {
  display: flex;
  flex-direction: column;
}

.balance-amount-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
}

.balance-amount-val {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: #10b981;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.balance-amount-pts {
  font-size: 1.1rem;
  color: #f59e0b;
  font-weight: 600;
}

.balance-actions-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-primary-action {
  background: #10b981;
  color: white;
  font-weight: 700;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex: 1;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.btn-primary-action:hover {
  background: #059669;
  transform: translateY(-1px);
}

.btn-secondary-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  font-weight: 600;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-secondary-action:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Parent Chore Management Table & List */
.parent-chores-manager {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.manager-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .manager-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.search-input-wrap {
  position: relative;
  flex: 1;
  max-width: 360px;
}

.search-input {
  width: 100%;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  padding: 0.6rem 1rem 0.6rem 2.4rem;
  color: white;
  font-size: 0.9rem;
}

.search-input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.search-icon-pos {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.parent-chore-item {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.2s ease;
}

.parent-chore-item:hover {
  background: #273549;
  border-color: rgba(255, 255, 255, 0.18);
}

.parent-chore-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  flex: 1;
}

.parent-chore-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.action-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.action-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.action-icon-btn.delete-btn:hover {
  background: #dc2626;
  color: white;
}

/* --- Modals & Overlays --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: white;
  color: var(--text-main);
  border-radius: var(--radius-xl);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.open .modal-card {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
}

.modal-close-btn {
  font-size: 1.5rem;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background: var(--surface-card-subtle);
  color: var(--text-main);
}

/* Form Controls inside Modals */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.15rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: white;
  color: var(--text-main);
  transition: border-color 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Emoji Picker Grid */
.emoji-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
  max-height: 140px;
  overflow-y: auto;
  background: var(--surface-card-subtle);
  padding: 0.5rem;
  border-radius: var(--radius-md);
}

.emoji-select-btn {
  font-size: 1.4rem;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.emoji-select-btn:hover {
  background: white;
  transform: scale(1.15);
}

.emoji-select-btn.selected {
  background: var(--brand-primary);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Checkbox Toggle Group */
.checkbox-group-row {
  display: flex;
  gap: 0.75rem;
}

.custom-checkbox-btn {
  flex: 1;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-subtle);
  background: white;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.custom-checkbox-btn.checked {
  border-color: var(--brand-primary);
  background: var(--active-light-bg);
  color: var(--brand-primary);
}

/* Modal Actions Footer */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

/* --- Printable Payout Receipt --- */
.payout-receipt {
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  position: relative;
  margin: 1rem 0;
}

.receipt-stamp {
  display: inline-block;
  border: 3px solid #10b981;
  color: #10b981;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  padding: 0.25rem 1rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  transform: rotate(-6deg);
  margin-bottom: 1rem;
}

.receipt-kid-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
}

.receipt-amount-display {
  font-size: 2.5rem;
  font-weight: 800;
  color: #10b981;
  margin: 0.5rem 0;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  width: 90%;
  max-width: 400px;
}

@media (min-width: 768px) {
  .toast-container {
    bottom: 2rem;
    right: 2rem;
    left: auto;
    transform: none;
  }
}

.toast-item {
  background: #0f172a;
  color: white;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  pointer-events: auto;
  animation: toastSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.toast-item.success {
  background: #065f46;
  border: 1px solid #10b981;
}

.toast-item.info {
  background: #1e1b4b;
  border: 1px solid #6366f1;
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Pulse animation for high-five / celebration */
@keyframes pulseGlow {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.pulse-celebrate {
  animation: pulseGlow 0.4s ease-in-out;
}

/* ==========================================================================
   BVSD SCHOOL LUNCH TAB STYLES
   ========================================================================== */

.lunch-view-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lunch-hero-banner {
  background: white;
  border-color: var(--lunch-card-border);
}

.lunch-badge-icon {
  background: var(--lunch-light-bg);
  box-shadow: var(--shadow-md), 0 0 0 2px var(--lunch-primary);
}

.lunch-source-subtitle {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.lunch-source-subtitle a {
  color: var(--lunch-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.lunch-source-subtitle a:hover {
  color: #047857;
  text-decoration: underline;
}

.lunch-header-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.lunch-header-controls .btn-secondary-action,
.lunch-info-card .btn-secondary-action {
  background: white;
  border: 1px solid var(--border-card);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  text-decoration: none;
}

.lunch-header-controls .btn-secondary-action:hover,
.lunch-info-card .btn-secondary-action:hover {
  background: var(--lunch-light-bg);
  border-color: var(--lunch-primary);
  color: var(--lunch-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.lunch-sync-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--lunch-light-bg);
  border: 1px solid var(--lunch-card-border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--lunch-badge-text);
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.sync-dot.syncing {
  background: #f59e0b;
  animation: pulseSync 1s infinite alternate;
}

@keyframes pulseSync {
  from { opacity: 0.4; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.3); }
}

.spin-anim {
  display: inline-block;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* Spotlight Card */
.lunch-today-spotlight {
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.45) 0%, rgba(209, 250, 229, 0.45) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.spotlight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.spotlight-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.spotlight-badge {
  background: var(--lunch-gradient);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.spotlight-badge.badge-next-weekday {
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.spotlight-badge.badge-today {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.btn-reset-next-day {
  background: white;
  border: 1px solid #10b981;
  color: #047857;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-reset-next-day:hover {
  background: #d1fae5;
  transform: translateY(-1px);
}

.spotlight-sub-caption {
  font-size: 0.85rem;
  font-weight: 600;
  color: #065f46;
  margin-top: -0.35rem;
}

.spotlight-date {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.spotlight-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.lunch-week-tag {
  display: inline-block;
  background: #fef3c7;
  color: #b45309;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.spotlight-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}

.spotlight-item-chip {
  background: white;
  border: 1.5px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.spotlight-item-chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--lunch-primary);
}

.spotlight-item-chip.is-favorited {
  background: #fffbeb;
  border-color: #f59e0b;
}

.spotlight-item-emoji {
  font-size: 1.85rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.spotlight-item-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.spotlight-item-main {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.spotlight-sides,
.lunch-dish-sides {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.35;
}

.spotlight-dietary-row {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

.dietary-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.dietary-badge.gf {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.dietary-badge.df {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.dietary-badge.v {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.lunch-fav-star-btn {
  font-size: 1.2rem;
  color: #cbd5e1;
  padding: 0.2rem;
  border-radius: var(--radius-sm);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lunch-fav-star-btn:hover {
  transform: scale(1.25);
  color: #f59e0b;
}

.lunch-fav-star-btn.active {
  color: #f59e0b;
  transform: scale(1.1);
}

.lunch-plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(245, 158, 11, 0.3);
  flex-wrap: wrap;
}

.plan-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.kid-plan-toggles {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.kid-choice-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.kid-choice-name {
  font-weight: 700;
  font-size: 0.88rem;
}

.choice-pill-buttons {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.2rem;
  border-radius: var(--radius-pill);
  gap: 0.2rem;
}

.choice-btn {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.choice-btn.selected {
  background: white;
  color: #047857;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.choice-btn.selected.pack {
  color: #b45309;
}

/* Weekly Days Grid */
.lunch-days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .lunch-days-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.lunch-day-card {
  background: white;
  border: 2px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.lunch-day-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--lunch-card-border);
}

.lunch-day-card.is-today {
  border-color: var(--lunch-primary);
  box-shadow: 0 8px 24px -4px rgba(245, 158, 11, 0.25);
}

.lunch-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.lunch-card-date-badge {
  display: flex;
  flex-direction: column;
}

.lunch-card-date-badge .day-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.lunch-card-date-badge .day-num {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.today-ribbon {
  background: var(--lunch-gradient);
  color: white;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.05em;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
}

.lunch-items-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-card-subtle);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
}

/* Card Items List */
.lunch-card-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.lunch-card-item {
  background: var(--surface-card-subtle);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 0.65rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.2s ease;
}

.lunch-card-item:hover {
  background: white;
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: var(--shadow-sm);
}

.lunch-card-item.favorited {
  background: #fffbeb;
  border-color: rgba(245, 158, 11, 0.4);
}

.lunch-card-item.highlight-dish {
  border-left: 3px solid var(--lunch-primary);
}

.lunch-item-icon-box {
  font-size: 1.4rem;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  flex-shrink: 0;
}

.lunch-item-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.lunch-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.lunch-item-tags {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.micro-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-pill);
}

.main-badge {
  background: #e0e7ff;
  color: #4338ca;
}

.alt-badge {
  background: #f1f5f9;
  color: #64748b;
}

.popular-badge {
  background: #fef3c7;
  color: #b45309;
}

.lunch-fav-btn {
  font-size: 1.1rem;
  opacity: 0.5;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 0.2rem;
  border-radius: var(--radius-sm);
}

.lunch-fav-btn:hover {
  opacity: 1;
  transform: scale(1.2);
}

.lunch-fav-btn.active {
  opacity: 1;
  transform: scale(1.1);
}

/* No School Card */
.no-school-card {
  background: #f8fafc;
  border-style: dashed;
}

.no-school-body {
  text-align: center;
  padding: 1.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: center;
}

.no-school-icon {
  font-size: 2.5rem;
  animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.no-school-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}

.no-school-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 240px;
}

/* Kid Lunch Planner inside Card */
.lunch-card-kid-planner {
  background: var(--surface-card-subtle);
  border-radius: var(--radius-lg);
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.planner-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.kid-planner-controls {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.kid-plan-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.kid-plan-avatar {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.segmented-control {
  display: flex;
  background: white;
  padding: 0.15rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  gap: 0.15rem;
}

.seg-btn {
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.seg-btn.active-school {
  background: #10b981;
  color: white;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.seg-btn.active-pack {
  background: #f59e0b;
  color: white;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

/* Info Banner */
.lunch-info-card {
  background: white;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.info-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: #d1fae5;
  color: #065f46;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.info-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.info-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* 5-Day Weekly Visual Strip */
.lunch-week-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
}

@media (max-width: 768px) {
  .lunch-week-strip {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.6rem;
    gap: 0.6rem;
  }
  
  .week-strip-day {
    min-width: 130px;
    scroll-snap-align: start;
    flex-shrink: 0;
  }
}

.week-strip-day {
  background: white;
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 0.75rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.week-strip-day:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--lunch-primary);
}

.week-strip-day.is-selected {
  border-color: #10b981;
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
  transform: translateY(-2px);
}

.week-strip-day.is-today {
  border-color: var(--lunch-primary);
}

.week-strip-day.is-next {
  border-color: #10b981;
}

.strip-day-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.strip-day-name {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.strip-day-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.strip-day-emoji {
  font-size: 1.6rem;
  margin: 0.15rem 0;
  transition: transform 0.2s ease;
}

.week-strip-day:hover .strip-day-emoji {
  transform: scale(1.15);
}

.strip-day-dish {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.1em;
  line-height: 1.05;
}

.strip-day-choices {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.2rem;
  font-size: 0.7rem;
}

.mini-choice-dot {
  background: var(--surface-card-subtle);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
}

.mini-choice-dot.school {
  background: #d1fae5;
  color: #065f46;
}

.mini-choice-dot.pack {
  background: #fef3c7;
  color: #92400e;
}

.strip-indicator {
  position: absolute;
  top: -8px;
  right: 6px;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
}

.next-pill {
  background: #10b981;
  color: white;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.4);
}

.today-pill {
  background: #f59e0b;
  color: white;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.4);
}

/* Card Ribbons */
.next-weekday-ribbon {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: white;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

.lunch-day-card.is-next-weekday-card {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 6px 20px -4px rgba(16, 185, 129, 0.15);
}

/* Weekly Summary Box */
.lunch-week-summary-box {
  background: white;
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.4rem;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.summary-box-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.summary-box-icon {
  font-size: 1.8rem;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: #fef3c7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.summary-box-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.summary-box-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.summary-stats-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.kid-summary-pill {
  background: var(--surface-card-subtle);
  border: 1px solid var(--border-subtle);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.kid-summary-name {
  font-weight: 700;
  color: var(--text-main);
}

.stat-count {
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
}

.stat-count.school {
  background: #d1fae5;
  color: #065f46;
}

.stat-count.pack {
  background: #fef3c7;
  color: #92400e;
}


