/* ==========================================================================
   ETERNAL PLAN - WEDDING PLANNER LUXURY DESIGN SYSTEM
   Palette: Rose Gold, Champagne Ivory, Blush & Deep Charcoal
   ========================================================================== */

:root {
  --primary-rose: #C88A83;
  --primary-rose-dark: #A8655E;
  --primary-rose-light: #FBF0EF;
  --gold-accent: #C5A059;
  --gold-gradient: linear-gradient(135deg, #DFBA73 0%, #C5A059 50%, #9F7B39 100%);
  --rose-gradient: linear-gradient(135deg, #E6A49D 0%, #C88A83 50%, #A8655E 100%);
  --hero-gradient: linear-gradient(135deg, rgba(254, 250, 248, 0.95) 0%, rgba(250, 240, 238, 0.9) 100%);
  
  --bg-main: #FBF8F5;
  --bg-card: #FFFFFF;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-subtle: #F6F1EC;
  
  --text-main: #2D2529;
  --text-muted: #7A7075;
  --text-light: #A49B9F;
  --border-color: #EFE6E0;
  --border-light: #F5EFEB;
  
  --success: #3D8569;
  --success-bg: #EAF5F0;
  --warning: #D9822B;
  --warning-bg: #FDF4EB;
  --danger: #C94A4A;
  --danger-bg: #FDF0F0;
  --info: #4A7BC9;
  --info-bg: #EFF4FC;
  
  --shadow-sm: 0 2px 8px rgba(160, 120, 110, 0.06);
  --shadow-md: 0 8px 24px rgba(160, 120, 110, 0.08);
  --shadow-lg: 0 16px 40px rgba(160, 120, 110, 0.12);
  --shadow-float: 0 20px 50px rgba(180, 130, 120, 0.18);
  
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --font-serif: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 0% 0%, rgba(246, 224, 220, 0.35) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(244, 230, 210, 0.3) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(246, 224, 220, 0.25) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(244, 230, 210, 0.2) 0px, transparent 50%);
  background-attachment: fixed;
}

/* Subtle Falling Petals Canvas */
#petals-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  opacity: 0.75;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.nav-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--rose-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(200, 138, 131, 0.35);
  font-size: 1.35rem;
}

.brand-text h1 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.brand-text p {
  font-size: 0.75rem;
  color: var(--gold-accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

/* Header Middle: Couple Names & Countdown Mini */
.couple-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 1.15rem;
  background: var(--primary-rose-light);
  border: 1px solid rgba(200, 138, 131, 0.25);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.couple-badge:hover {
  background: #f8e5e3;
  transform: translateY(-1px);
}

.couple-names {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary-rose-dark);
}

.couple-heart {
  color: #E25B6C;
  animation: heartPulse 1.8s infinite ease-in-out;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.22); }
}

.nav-countdown-mini {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-accent);
  background: #FFF;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* Header Right: Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-trigger-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
}

.search-trigger-btn:hover {
  background: #FFF;
  border-color: var(--primary-rose);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.search-shortcut {
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  background: #FFF;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  font-weight: 600;
  color: var(--text-muted);
}

.btn-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  background: #FFF;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon-circle:hover {
  color: var(--primary-rose);
  border-color: var(--primary-rose);
  transform: scale(1.05);
}

/* ==========================================================================
   HERO HEADER & COUNTDOWN
   ========================================================================== */
.hero-section {
  max-width: 1360px;
  margin: 1.5rem auto 1.25rem;
  padding: 0 1.5rem;
}

.hero-banner {
  background: var(--hero-gradient);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 2rem;
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 138, 131, 0.15), transparent 70%);
  pointer-events: none;
}

.hero-content h2 {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.hero-content h2 span {
  background: var(--rose-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-quote {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-main);
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: #FFF;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.hero-meta-item i {
  color: var(--primary-rose);
}

/* Countdown Visualizer */
.countdown-box {
  background: #FFF;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  text-align: center;
  position: relative;
}

.countdown-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-accent);
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.countdown-unit {
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.35rem;
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.countdown-unit:hover {
  transform: translateY(-2px);
  background: var(--primary-rose-light);
}

.countdown-num {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--primary-rose-dark);
  line-height: 1;
}

.countdown-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 0.35rem;
}

/* ==========================================================================
   NAVIGATION TABS
   ========================================================================== */
.main-tabs-nav {
  max-width: 1360px;
  margin: 0 auto 1.5rem;
  padding: 0 1.5rem;
}

.tabs-list {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: #FFF;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-list::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.tab-btn i {
  font-size: 1.05rem;
}

.tab-btn:hover {
  color: var(--primary-rose);
  background: var(--primary-rose-light);
}

.tab-btn.active {
  background: var(--rose-gradient);
  color: #FFF;
  box-shadow: 0 4px 12px rgba(200, 138, 131, 0.3);
}

.tab-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.tab-btn.active .tab-badge {
  background: rgba(255, 255, 255, 0.28);
  color: #FFF;
}

/* ==========================================================================
   TAB CONTENT SECTIONS
   ========================================================================== */
.app-container {
  max-width: 1360px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   SHARED UI COMPONENTS & CARDS
   ========================================================================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.card-title-group h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-title-group p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--rose-gradient);
  color: #FFF;
  box-shadow: 0 4px 14px rgba(200, 138, 131, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 18px rgba(200, 138, 131, 0.45);
}

.btn-secondary {
  background: #FFF;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--primary-rose);
  color: var(--primary-rose);
  background: var(--primary-rose-light);
}

.btn-gold {
  background: var(--gold-gradient);
  color: #FFF;
  box-shadow: 0 4px 14px rgba(197, 160, 89, 0.35);
}

.btn-gold:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 18px rgba(197, 160, 89, 0.45);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

.btn-danger-soft {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(201, 74, 74, 0.2);
}

.btn-danger-soft:hover {
  background: var(--danger);
  color: #FFF;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-main);
  background: #FFF;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary-rose);
  box-shadow: 0 0 0 3px rgba(200, 138, 131, 0.15);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* ==========================================================================
   FEATURE 1: BUDGET & EXPENSES SECTION
   ========================================================================== */
.budget-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: #FFF;
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-rose);
}

.kpi-card.gold::before { background: var(--gold-accent); }
.kpi-card.success::before { background: var(--success); }
.kpi-card.warning::before { background: var(--warning); }
.kpi-card.info::before { background: var(--info); }

.kpi-info p {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.kpi-info h4 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.kpi-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.kpi-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--primary-rose);
}

.kpi-card.gold .kpi-icon-wrap { color: var(--gold-accent); background: #FAF5EB; }
.kpi-card.success .kpi-icon-wrap { color: var(--success); background: var(--success-bg); }
.kpi-card.warning .kpi-icon-wrap { color: var(--warning); background: var(--warning-bg); }

/* Progress bar */
.budget-progress-card {
  margin-bottom: 1.5rem;
  background: #FFF;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
}

.progress-track {
  width: 100%;
  height: 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--rose-gradient);
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Expenses Table Controls */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pill-filter-btn {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: #FFF;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.pill-filter-btn:hover {
  border-color: var(--primary-rose);
  color: var(--primary-rose);
}

.pill-filter-btn.active {
  background: var(--primary-rose-light);
  border-color: var(--primary-rose);
  color: var(--primary-rose-dark);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.custom-table th {
  background: var(--bg-subtle);
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.custom-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.custom-table tbody tr {
  transition: background 0.15s;
}

.custom-table tbody tr:hover {
  background: rgba(251, 240, 239, 0.35);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-paid { background: var(--success-bg); color: var(--success); }
.badge-pending { background: var(--warning-bg); color: var(--warning); }
.badge-parent { background: #F3EDFB; color: #7B4DB7; }
.badge-category { background: var(--bg-subtle); color: var(--text-muted); }

.cell-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.action-btn-mini {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  background: #FFF;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.action-btn-mini:hover {
  border-color: var(--primary-rose);
  color: var(--primary-rose);
  transform: scale(1.08);
}

.action-btn-mini.delete:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-bg);
}

.action-btn-mini.telegram {
  color: #0088cc;
  border-color: rgba(0, 136, 204, 0.35);
}

.action-btn-mini.telegram:hover {
  background: #0088cc;
  color: #FFF;
  border-color: #0088cc;
}

.btn-telegram {
  background: #0088cc;
  color: #FFF;
  box-shadow: 0 4px 14px rgba(0, 136, 204, 0.3);
}

.btn-telegram:hover {
  background: #0077b5;
  color: #FFF;
  transform: translateY(-1.5px);
  box-shadow: 0 6px 18px rgba(0, 136, 204, 0.45);
}

.telegram-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #C5A059;
  position: absolute;
  top: 3px;
  right: 3px;
  border: 2px solid #FFF;
  transition: var(--transition);
}

/* ==========================================================================
   FEATURE 2: APPOINTMENTS & REMINDERS SECTION
   ========================================================================== */
.appointments-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
}

.appointments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.appointment-card {
  background: #FFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  position: relative;
  transition: var(--transition);
}

.appointment-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(200, 138, 131, 0.4);
}

.appointment-card.completed {
  opacity: 0.65;
  background: #FAFAFA;
}

.appointment-card.completed h4 {
  text-decoration: line-through;
}

.apt-date-badge {
  background: var(--primary-rose-light);
  border: 1px solid rgba(200, 138, 131, 0.3);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  text-align: center;
  min-width: 72px;
}

.apt-date-badge .day {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-rose-dark);
  line-height: 1;
}

.apt-date-badge .month {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold-accent);
  margin-top: 0.2rem;
}

.apt-details {
  flex: 1;
}

.apt-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin: 0.4rem 0 0.6rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.apt-meta-row span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.apt-notes-box {
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text-main);
  border-left: 3px solid var(--gold-accent);
  margin-top: 0.5rem;
}

/* Appointment reminder sidebar */
.apt-sidebar-box {
  background: #FFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
}

.notification-banner {
  background: var(--primary-rose-light);
  border: 1px solid rgba(200, 138, 131, 0.3);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.notification-banner i {
  font-size: 1.8rem;
  color: var(--primary-rose);
  margin-bottom: 0.4rem;
}

.notification-banner p {
  font-size: 0.82rem;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   FEATURE 3: CHECKLIST ROADMAP SECTION
   ========================================================================== */
.checklist-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeframe-group {
  background: #FFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.timeframe-header {
  background: var(--bg-subtle);
  padding: 0.95rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.timeframe-header h4 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timeframe-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: #FFF;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.task-list {
  list-style: none;
}

.task-item {
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}

.task-item:last-child {
  border-bottom: none;
}

.task-item:hover {
  background: rgba(251, 240, 239, 0.25);
}

.task-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
}

.custom-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  background: #FFF;
}

.custom-checkbox.checked {
  background: var(--primary-rose);
  border-color: var(--primary-rose);
  color: #FFF;
}

.task-title {
  font-size: 0.9rem;
  color: var(--text-main);
  font-weight: 500;
  transition: var(--transition);
}

.task-item.completed .task-title {
  text-decoration: line-through;
  color: var(--text-light);
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ==========================================================================
   FEATURE 4: MOODBOARD & PHOTO GALLERY (INDEXEDDB)
   ========================================================================== */
.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.upload-dropzone {
  background: #FFF;
  border: 2px dashed rgba(200, 138, 131, 0.4);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 1.5rem;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--primary-rose);
  background: var(--primary-rose-light);
  transform: translateY(-2px);
}

.upload-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--primary-rose-light);
  color: var(--primary-rose);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  margin: 0 auto 0.75rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}

.photo-card {
  background: #FFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  group: photo;
}

.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-float);
}

.photo-thumbnail-wrap {
  width: 100%;
  height: 230px;
  position: relative;
  overflow: hidden;
  background: #eee;
  cursor: pointer;
}

.photo-thumbnail-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.photo-card:hover .photo-thumbnail-wrap img {
  transform: scale(1.06);
}

.photo-category-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  color: #FFF;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
}

.photo-card-info {
  padding: 1.15rem;
}

.photo-card-info h4 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-card-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.photo-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 0.65rem;
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ==========================================================================
   FEATURE 5: GUEST LIST SECTION
   ========================================================================== */
.guest-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.guest-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   FEATURE 6: INSTANT GLOBAL SEARCH MODAL (Ctrl + K)
   ========================================================================== */
.search-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(45, 37, 41, 0.6);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  padding-inline: 1.5rem;
}

.search-modal-backdrop.open {
  display: flex;
}

.search-modal-card {
  width: 100%;
  max-width: 680px;
  background: #FFF;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-float);
  border: 1px solid var(--border-color);
  overflow: hidden;
  animation: searchScale 0.22s ease-out;
}

@keyframes searchScale {
  from { opacity: 0; transform: scale(0.96) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.search-input-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--border-color);
}

.search-input-header i {
  font-size: 1.3rem;
  color: var(--primary-rose);
}

.search-input-box {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  color: var(--text-main);
  background: transparent;
}

.search-results-list {
  max-height: 480px;
  overflow-y: auto;
  padding: 0.75rem 0;
}

.search-category-group {
  margin-bottom: 0.75rem;
}

.search-category-title {
  padding: 0.4rem 1.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-accent);
  font-weight: 700;
}

.search-result-item {
  padding: 0.75rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.15s;
}

.search-result-item:hover, .search-result-item.highlighted {
  background: var(--primary-rose-light);
}

.search-result-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
}

.search-result-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.search-footer {
  padding: 0.75rem 1.35rem;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   GENERAL MODALS (Add/Edit Forms & Lightbox)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(45, 37, 41, 0.65);
  backdrop-filter: blur(6px);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background: #FFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-float);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalPop 0.25s ease-out;
}

.modal-dialog.wide {
  max-width: 780px;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

.modal-header h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

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

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.15rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background: var(--bg-subtle);
}

/* Lightbox Modal */
.lightbox-dialog {
  background: transparent;
  box-shadow: none;
  border: none;
  max-width: 900px;
  width: 95vw;
  text-align: center;
}

.lightbox-img-wrap {
  position: relative;
  max-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 1rem;
  color: #FFF;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

.lightbox-caption h4 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.toast {
  background: #FFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 0.9rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  max-width: 380px;
  animation: toastIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast i { font-size: 1.2rem; }
.toast.success i { color: var(--success); }
.toast.warning i { color: var(--warning); }
.toast.danger i { color: var(--danger); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.app-footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: #FFF;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.app-footer p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION & HINTS
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
}

.mobile-table-hint {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary-rose-dark);
  background: var(--primary-rose-light);
  border: 1px dashed rgba(200, 138, 131, 0.4);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  margin-bottom: 0.65rem;
  animation: pulseHint 2.4s infinite ease-in-out;
}

@keyframes pulseHint {
  0%, 100% { opacity: 0.88; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.01); }
}

.mobile-table-hint i {
  color: var(--primary-rose);
  animation: slideArrows 1.5s infinite ease-in-out;
}

@keyframes slideArrows {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

/* ==========================================================================
   TABLET RESPONSIVENESS (max-width: 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-banner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem;
  }
  
  .budget-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .appointments-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.15rem;
  }
  
  .guest-stats-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

/* ==========================================================================
   MOBILE PHONE RESPONSIVENESS (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Prevent horizontal scroll */
  html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    -webkit-text-size-adjust: 100%;
  }

  /* Safe Area & App Container Spacing */
  .app-container {
    padding: 0 0.85rem;
    margin-bottom: 6rem; /* Extra space for fixed bottom nav bar */
  }

  /* -------------------------------------------------------------------------
     1. NAVBAR ON MOBILE
     ------------------------------------------------------------------------- */
  .navbar {
    padding: 0;
  }

  .nav-container {
    padding: 0.65rem 0.85rem;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }

  .brand-wrapper {
    gap: 0.55rem;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    border-radius: 10px;
  }

  .brand-text h1 {
    font-size: 1.1rem;
    letter-spacing: 0.2px;
  }

  .brand-text p {
    font-size: 0.62rem;
    letter-spacing: 1px;
  }

  /* Nav Right Actions */
  .nav-actions {
    gap: 0.35rem;
  }

  .search-trigger-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: var(--radius-full);
  }

  .search-trigger-btn span,
  .search-shortcut {
    display: none !important;
  }

  .search-trigger-btn i {
    font-size: 0.95rem;
  }

  .btn-icon-circle {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }

  /* Couple Badge (Pill below brand & actions) */
  .couple-badge {
    order: 3;
    width: 100%;
    justify-content: space-between;
    margin-top: 0.35rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    background: linear-gradient(135deg, rgba(251, 240, 239, 0.95), rgba(254, 250, 248, 0.95));
  }

  .couple-names {
    font-size: 0.9rem;
  }

  .nav-countdown-mini {
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
  }

  /* -------------------------------------------------------------------------
     2. HERO BANNER & COUNTDOWN
     ------------------------------------------------------------------------- */
  .hero-section {
    margin: 0.75rem auto 1rem;
    padding: 0 0.85rem;
  }

  .hero-banner {
    grid-template-columns: 1fr;
    padding: 1.35rem 1rem;
    gap: 1.25rem;
    border-radius: var(--radius-md);
    text-align: center;
  }

  .hero-banner::after {
    width: 140px;
    height: 140px;
    top: -20px;
    right: -20px;
  }

  .hero-content h2 {
    font-size: clamp(1.35rem, 5.5vw, 1.7rem);
    line-height: 1.3;
    margin-bottom: 0.4rem;
  }

  .hero-quote {
    font-size: 0.82rem;
    justify-content: center;
    text-align: center;
    margin-bottom: 0.85rem;
    line-height: 1.45;
  }

  .hero-meta-row {
    justify-content: center;
    gap: 0.45rem;
  }

  .hero-meta-item {
    font-size: 0.78rem;
    padding: 0.35rem 0.75rem;
  }

  .countdown-box {
    padding: 1rem 0.75rem;
    border-radius: var(--radius-sm);
  }

  .countdown-title {
    font-size: 0.68rem;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
  }

  .countdown-grid {
    gap: 0.4rem;
  }

  .countdown-unit {
    padding: 0.55rem 0.2rem;
    border-radius: 8px;
  }

  .countdown-num {
    font-size: 1.35rem;
  }

  .countdown-label {
    font-size: 0.65rem;
    margin-top: 0.2rem;
  }

  /* -------------------------------------------------------------------------
     3. MAIN TOP TABS ON MOBILE
     ------------------------------------------------------------------------- */
  .main-tabs-nav {
    margin: 0 auto 1rem;
    padding: 0 0.85rem;
  }

  .tabs-list {
    padding: 0.35rem;
    gap: 0.4rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .tab-btn {
    scroll-snap-align: start;
    padding: 0.55rem 0.85rem;
    font-size: 0.8rem;
    gap: 0.4rem;
  }

  .tab-btn i {
    font-size: 0.95rem;
  }

  .tab-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.45rem;
  }

  /* -------------------------------------------------------------------------
     4. MOBILE FIXED BOTTOM NAVIGATION BAR
     ------------------------------------------------------------------------- */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 950;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(160, 120, 110, 0.12);
    padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
    align-items: center;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem 0;
    transition: var(--transition);
    border-radius: var(--radius-sm);
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 24px;
    font-size: 1.15rem;
    transition: transform 0.2s ease;
  }

  .mobile-nav-item span {
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1;
  }

  .mobile-nav-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    background: var(--primary-rose);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    padding: 1px 4px;
    min-width: 14px;
    text-align: center;
    border: 1.5px solid #fff;
    line-height: 1.1;
  }

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

  .mobile-nav-item.active .mobile-nav-icon-wrap {
    color: var(--primary-rose);
    transform: translateY(-2px);
  }

  .mobile-nav-item.active span {
    font-weight: 700;
    color: var(--primary-rose-dark);
  }

  /* -------------------------------------------------------------------------
     5. BUDGET & EXPENSES TAB
     ------------------------------------------------------------------------- */
  .budget-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    margin-bottom: 1rem;
  }

  .kpi-card {
    padding: 0.85rem 0.8rem;
    border-radius: var(--radius-sm);
  }

  .kpi-info p {
    font-size: 0.68rem;
    letter-spacing: 0.2px;
    margin-bottom: 0.15rem;
  }

  .kpi-info h4 {
    font-size: 1.15rem;
    line-height: 1.15;
  }

  .kpi-info span {
    display: none; /* Hide subtitle to keep cards sleek and clean */
  }

  .kpi-icon-wrap {
    width: 34px;
    height: 34px;
    font-size: 1rem;
    border-radius: 8px;
  }

  .budget-progress-card {
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-sm);
  }

  .progress-header {
    font-size: 0.78rem;
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .card {
    padding: 1rem 0.85rem;
    border-radius: var(--radius-sm);
  }

  .card-header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .card-header-row > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    width: 100%;
  }

  .card-header-row .btn-primary {
    width: 100%;
    order: -1;
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
  }

  .card-header-row .btn-secondary {
    flex: 1 1 calc(50% - 0.25rem);
    text-align: center;
    padding: 0.45rem 0.65rem;
    font-size: 0.78rem;
  }

  .card-title-group h3 {
    font-size: 1.15rem;
  }

  .card-title-group p {
    font-size: 0.78rem;
  }

  /* Filter Pills Horizontal Scroll */
  .table-toolbar {
    margin-bottom: 0.75rem;
    gap: 0.5rem;
  }

  .filter-pills {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    width: 100%;
    gap: 0.4rem;
  }

  .filter-pills::-webkit-scrollbar {
    display: none;
  }

  .pill-filter-btn {
    flex-shrink: 0;
    padding: 0.35rem 0.75rem;
    font-size: 0.76rem;
  }

  /* Table Hint & Responsive Table */
  .mobile-table-hint {
    display: flex;
  }

  .table-responsive {
    border-radius: var(--radius-sm);
    -webkit-overflow-scrolling: touch;
  }

  .custom-table {
    min-width: 680px;
    font-size: 0.82rem;
  }

  .custom-table th {
    padding: 0.7rem 0.75rem;
    font-size: 0.8rem;
  }

  .custom-table td {
    padding: 0.7rem 0.75rem;
  }

  .cell-actions .action-btn-mini {
    width: 32px;
    height: 32px;
  }

  /* -------------------------------------------------------------------------
     6. APPOINTMENTS TAB
     ------------------------------------------------------------------------- */
  .appointment-card {
    padding: 0.95rem 1rem;
    gap: 0.85rem;
    border-radius: var(--radius-sm);
  }

  .apt-date-badge {
    min-width: 56px;
    padding: 0.5rem 0.45rem;
    border-radius: var(--radius-sm);
  }

  .apt-date-badge .day {
    font-size: 1.35rem;
  }

  .apt-date-badge .month {
    font-size: 0.65rem;
  }

  .apt-details h4 {
    font-size: 1.05rem;
  }

  .apt-meta-row {
    gap: 0.45rem;
    font-size: 0.78rem;
    margin: 0.35rem 0 0.5rem;
  }

  .apt-notes-box {
    font-size: 0.78rem;
    padding: 0.5rem 0.75rem;
  }

  .apt-sidebar-box {
    padding: 1.15rem 1rem;
    border-radius: var(--radius-sm);
  }

  /* -------------------------------------------------------------------------
     7. CHECKLIST TAB
     ------------------------------------------------------------------------- */
  .timeframe-header {
    padding: 0.75rem 1rem;
  }

  .timeframe-header h4 {
    font-size: 1rem;
  }

  .timeframe-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
  }

  .task-item {
    padding: 0.75rem 0.85rem;
    gap: 0.5rem;
  }

  .task-left {
    gap: 0.65rem;
  }

  .custom-checkbox {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 6px;
  }

  .task-title {
    font-size: 0.86rem;
    line-height: 1.4;
  }

  .task-meta {
    gap: 0.35rem;
    flex-shrink: 0;
  }

  .task-meta .badge {
    font-size: 0.68rem;
    padding: 0.15rem 0.45rem;
  }

  /* -------------------------------------------------------------------------
     8. MOODBOARD & PHOTO GALLERY
     ------------------------------------------------------------------------- */
  .upload-dropzone {
    padding: 1.35rem 1rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-sm);
  }

  .upload-icon {
    width: 44px;
    height: 44px;
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
  }

  .upload-dropzone h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
  }

  .upload-dropzone p {
    font-size: 0.75rem;
  }

  .gallery-toolbar {
    margin-bottom: 1rem;
  }

  /* 2-Column Photo Grid on Mobile (Instagram / Pinterest style) */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .photo-card {
    border-radius: var(--radius-sm);
  }

  .photo-thumbnail-wrap {
    height: 155px;
  }

  .photo-card-info {
    padding: 0.75rem;
  }

  .photo-card-info h4 {
    font-size: 0.88rem;
  }

  .photo-card-info p {
    font-size: 0.72rem;
    -webkit-line-clamp: 1;
    margin-bottom: 0.5rem;
  }

  .photo-category-pill {
    top: 6px;
    left: 6px;
    padding: 0.2rem 0.5rem;
    font-size: 0.65rem;
  }

  .photo-actions-row {
    font-size: 0.72rem;
    padding-top: 0.45rem;
  }

  /* -------------------------------------------------------------------------
     9. GUEST LIST TAB
     ------------------------------------------------------------------------- */
  .guest-stats-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .guest-stats-row .kpi-card {
    padding: 0.75rem 0.65rem;
  }

  .guest-stats-row .kpi-icon-wrap {
    display: none; /* Hide icon to preserve space for text */
  }

  .guest-stats-row .kpi-info h4 {
    font-size: 1.05rem;
  }

  .guest-tabs {
    width: 100%;
    margin-bottom: 0.85rem;
  }

  .guest-tabs .pill-filter-btn {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 0.45rem 0.65rem;
  }

  /* -------------------------------------------------------------------------
     10. MOBILE BOTTOM SHEET MODALS
     ------------------------------------------------------------------------- */
  .modal-backdrop {
    padding: 0;
    align-items: flex-end; /* Slide up bottom sheet style */
  }

  .modal-dialog {
    max-width: 100%;
    width: 100%;
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
    margin: 0;
    border-bottom: none;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
    animation: modalSheetUp 0.28s cubic-bezier(0.18, 0.89, 0.32, 1.15);
  }

  @keyframes modalSheetUp {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
  }

  .modal-header {
    padding: 1rem 1.25rem 0.85rem;
    position: relative;
  }

  /* Grab Handle Bar */
  .modal-header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #DDD0C8;
    border-radius: 99px;
  }

  .modal-header h3 {
    font-size: 1.15rem;
  }

  .modal-body {
    padding: 1rem 1.15rem;
  }

  .modal-footer {
    padding: 0.85rem 1.15rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .modal-footer button,
  .modal-footer .btn {
    flex: 1;
    min-height: 44px; /* Apple HIG standard */
  }

  /* Mobile Form Fields: Font-size 16px to prevent iOS Safari auto-zoom! */
  .form-input, .form-select, .form-textarea {
    font-size: 16px !important;
    padding: 0.7rem 0.85rem;
    min-height: 44px;
    border-radius: 10px;
  }

  .form-grid-2, .form-grid-3 {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .form-group {
    margin-bottom: 0.85rem;
  }

  /* Search Modal on Mobile */
  .search-modal-backdrop {
    padding-top: 1rem;
    padding-inline: 0.75rem;
    align-items: flex-start;
  }

  .search-modal-card {
    border-radius: var(--radius-md);
    max-height: 85vh;
  }

  .search-input-header {
    padding: 0.85rem 1rem;
  }

  .search-input-box {
    font-size: 16px !important;
  }

  .search-results-list {
    max-height: 60vh;
  }

  .search-footer {
    font-size: 0.72rem;
    padding: 0.6rem 1rem;
  }

  /* Lightbox on Mobile */
  .lightbox-dialog {
    padding: 0.5rem;
    width: 96vw;
  }

  .lightbox-img-wrap {
    max-height: 60vh;
  }

  .lightbox-img-wrap img {
    max-height: 60vh;
    border-radius: var(--radius-sm);
  }

  .lightbox-caption h4 {
    font-size: 1.15rem;
  }

  /* Toast Notifications on Mobile */
  .toast-container {
    bottom: 5rem; /* Above bottom nav */
    right: 1rem;
    left: 1rem;
    align-items: center;
  }

  .toast {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.8rem 1rem;
  }

  /* Footer on Mobile */
  .app-footer {
    padding: 1.5rem 1rem;
    font-size: 0.78rem;
  }
}

/* ==========================================================================
   EXTRA SMALL SCREENS (max-width: 380px: iPhone SE, Galaxy Mini)
   ========================================================================== */
@media (max-width: 380px) {
  html {
    font-size: 14px;
  }

  .brand-text p {
    display: none; /* Hide subtitle to preserve header layout */
  }

  .couple-badge {
    padding: 0.3rem 0.6rem;
  }

  .couple-names {
    font-size: 0.82rem;
  }

  .kpi-info h4 {
    font-size: 1.02rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr; /* Single column on tiny screens */
  }

  .photo-thumbnail-wrap {
    height: 190px;
  }

  .guest-stats-row {
    grid-template-columns: 1fr;
  }
}
