/* ============================================================
   WEDDING PLANNER — Design System & Global Styles
   Nabil & Nazhifa | 2026
============================================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  --rose-gold: #C9956A;
  --rose-gold-light: #E8C5A5;
  --rose-gold-dark: #A06840;
  --ivory: #FAF6F0;
  --ivory-dark: #F0E8DC;
  --blush: #F5E8DC;
  --espresso: #2D1B12;
  --espresso-mid: #5A3A28;
  --espresso-light: #8B6855;
  --cream: #FFF9F4;
  --white: #FFFFFF;
  --gold: #D4AF37;
  --gold-light: #F0D97A;
  --sage: #7A9E7E;
  --mauve: #9B7FA6;

  /* Neutrals */
  --text-primary: #2D1B12;
  --text-secondary: #6B4C38;
  --text-muted: #9E8070;
  --border: rgba(201, 149, 106, 0.25);
  --border-strong: rgba(201, 149, 106, 0.5);
  --shadow-sm: 0 2px 8px rgba(45, 27, 18, 0.08);
  --shadow-md: 0 4px 20px rgba(45, 27, 18, 0.12);
  --shadow-lg: 0 8px 40px rgba(45, 27, 18, 0.16);
  --shadow-glow: 0 0 30px rgba(201, 149, 106, 0.2);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Gradients & Backgrounds */
  --hero-bg-gradient: linear-gradient(135deg, #2D1B12 0%, #5A3A28 40%, #8B4513 70%, #C9956A 100%);
  --hero-overlay-gradient: linear-gradient(180deg, rgba(45, 27, 18, 0.4) 0%, rgba(45, 27, 18, 0.6) 50%, rgba(45, 27, 18, 0.8) 100%);
  --header-table-gradient: linear-gradient(135deg, #2D1B12, #5A3A28);
  --nav-bg-rgba: rgba(250, 246, 240, 0.95);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--ivory);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--ivory-dark); }
::-webkit-scrollbar-thumb { background: var(--rose-gold); border-radius: 3px; }

/* === HERO SECTION === */
.hero {
  position: relative;
  background: var(--hero-bg-gradient);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 60px 24px 80px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('hero-bg.png') center/cover no-repeat;
  opacity: 0.15;
  mix-blend-mode: luminosity;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-overlay-gradient);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-ornament {
  font-size: 1.2rem;
  color: var(--rose-gold-light);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0.9;
  animation: fadeInDown 0.8s ease;
}

.hero-names {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
  line-height: 1.1;
  animation: fadeInUp 0.8s ease 0.1s both;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero-names .ampersand {
  color: var(--rose-gold-light);
  font-style: italic;
  font-weight: 400;
  display: inline-block;
  margin: 0 16px;
}

.hero-tagline {
  font-size: 1rem;
  color: var(--rose-gold-light);
  letter-spacing: 0.2em;
  margin: 16px 0 28px;
  text-transform: uppercase;
  font-weight: 300;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-events {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-event-card {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(201, 149, 106, 0.4);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: 14px 24px;
  text-align: center;
  min-width: 180px;
}

.hero-event-card .event-label {
  font-size: 0.7rem;
  color: var(--rose-gold-light);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.hero-event-card .event-date {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--white);
  font-weight: 600;
}

.hero-event-card .event-location {
  font-size: 0.75rem;
  color: var(--ivory-dark);
  margin-top: 4px;
}

/* Countdown */
.hero-countdown {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.countdown-unit {
  text-align: center;
  min-width: 56px;
}

.countdown-unit .num {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--rose-gold-light);
  line-height: 1;
}

.countdown-unit .label {
  display: block;
  font-size: 0.6rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 4px;
}

.countdown-sep {
  font-size: 1.5rem;
  color: var(--rose-gold-light);
  align-self: center;
  margin-top: -8px;
  opacity: 0.6;
}

/* === NAV TABS === */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg-rgba);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 10px 0;
}

.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.nav-tab:hover {
  border-color: var(--rose-gold);
  color: var(--rose-gold-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.nav-tab.active {
  background: var(--espresso);
  color: var(--white);
  border-color: var(--espresso);
  font-weight: 600;
}

.nav-tab .tab-icon { font-size: 1.1rem; }

/* === MAIN CONTENT === */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.tab-panel { display: none; animation: fadeIn 0.4s ease; }
.tab-panel.active { display: block; }

/* === CARDS === */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.card-glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong);
}

/* === STAT CARDS === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--rose-gold), var(--gold));
}

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

.stat-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
}

.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--rose-gold-dark);
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 6px;
  display: block;
}

/* === SECTION HEADER === */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--espresso);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--rose-gold), var(--gold));
  border-radius: 2px;
  flex-shrink: 0;
}

/* === FILTER & SEARCH BAR === */
.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-box input {
  width: 100%;
  padding: 10px 40px 10px 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  background: var(--white);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--rose-gold);
  box-shadow: 0 0 0 3px rgba(201, 149, 106, 0.15);
}

.search-box .search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.filter-select {
  padding: 10px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  background: var(--white);
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.filter-select:focus {
  border-color: var(--rose-gold);
  box-shadow: 0 0 0 3px rgba(201, 149, 106, 0.15);
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--rose-gold), var(--rose-gold-dark));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(201, 149, 106, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 149, 106, 0.4);
}

.btn-secondary {
  background: var(--ivory-dark);
  color: var(--espresso-mid);
  border: 1.5px solid var(--border-strong);
}

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

.btn-success {
  background: linear-gradient(135deg, #5aa05d, #3d7a40);
  color: var(--white);
}

.btn-danger {
  background: transparent;
  color: #c0392b;
  border: 1.5px solid #e0a0a0;
  padding: 6px 10px;
  font-size: 0.75rem;
}

.btn-danger:hover { background: #ffeaea; border-color: #c0392b; }

.btn-icon {
  background: transparent;
  color: var(--rose-gold-dark);
  border: 1.5px solid var(--border);
  padding: 6px 10px;
  font-size: 0.8rem;
}

.btn-icon:hover { background: var(--blush); border-color: var(--rose-gold); }

/* === TABLE === */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 700px;
}

thead tr {
  background: var(--header-table-gradient);
}

thead th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--rose-gold-light);
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

tbody tr:hover { background: var(--blush); }
tbody tr:last-child { border-bottom: none; }

tbody td {
  padding: 12px 16px;
  color: var(--text-primary);
  vertical-align: middle;
}

/* === BADGES === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge-family   { background: #FFF0E6; color: #C9956A; border: 1px solid #F5C9A3; }
.badge-saudara  { background: #FFF5E0; color: #B8880A; border: 1px solid #F0D070; }
.badge-sahabat  { background: #E8F0FF; color: #3060B0; border: 1px solid #B0C8F8; }
.badge-rekan    { background: #EDF8EE; color: #2D7A34; border: 1px solid #A0D8A5; }
.badge-other    { background: #F5F0FF; color: #6840C0; border: 1px solid #C0A8F0; }

.badge-wanita   { background: #FFE8F4; color: #C0407A; border: 1px solid #F0A0C8; }
.badge-pria     { background: #E8F4FF; color: #2860A0; border: 1px solid #90C4F0; }
.badge-both     { background: #F0E8FF; color: #6840B0; border: 1px solid #C0A0E8; }

.badge-yes      { background: #E8F8EA; color: #276B2C; border: 1px solid #8ED494; }
.badge-no       { background: #F5F5F5; color: #999; border: 1px solid #DDD; }

/* === PAGINATION === */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-info { font-size: 0.8rem; color: var(--text-muted); }

.pagination-btns {
  display: flex;
  gap: 6px;
  align-items: center;
}

.page-btn {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover, .page-btn.active {
  background: var(--rose-gold);
  color: var(--white);
  border-color: var(--rose-gold);
}

.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* === CHARTS === */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.chart-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.chart-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--espresso);
  margin-bottom: 16px;
  text-align: center;
}

.chart-container {
  position: relative;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === MODAL === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 27, 18, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-start; /* Menggunakan flex-start agar bagian atas modal tidak terpotong */
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto; /* Mengizinkan seluruh overlay di-scroll jika viewport sangat kecil */
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 82vh; /* Membatasi tinggi agar header + footer tetap di layar */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: scale(0.9) translateY(20px);
  transition: var(--transition);
  margin-top: auto;
  margin-bottom: auto; /* Centering vertikal dengan margin auto selama muat di layar */
}

.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  background: linear-gradient(135deg, #2D1B12, #5A3A28);
  padding: 24px 28px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  /* Fixed at top — always visible */
  flex-shrink: 0;
  position: relative;
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--white);
  font-weight: 600;
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--rose-gold-light);
  margin-top: 4px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: var(--white);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover { background: rgba(255,255,255,0.3); }

.modal form {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  min-height: 0; /* Mengizinkan flex child mengecil di bawah tinggi kontennya */
}

.modal-body {
  padding: 28px;
  /* This part scrolls if content is taller than modal */
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 20px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  /* Fixed at bottom — always visible */
  flex-shrink: 0;
  background: var(--white);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full { grid-column: 1 / -1; }

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--espresso-mid);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-input {
  padding: 10px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  background: var(--white);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--rose-gold);
  box-shadow: 0 0 0 3px rgba(201, 149, 106, 0.15);
}

@media (max-width: 560px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .modal-body {
    padding: 20px;
  }
  .modal-header {
    padding: 16px 20px;
  }
  .modal-footer {
    padding: 16px 20px;
  }
  .modal {
    max-height: 92vh;
  }
}

/* === VENDOR TABLE === */
.vendor-section { margin-bottom: 32px; }

.vendor-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--espresso);
  margin-bottom: 12px;
  padding: 8px 16px;
  background: var(--ivory-dark);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--rose-gold);
}

/* === SESERAHAN === */
.seserahan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.seserahan-category {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.seserahan-cat-header {
  background: linear-gradient(135deg, var(--rose-gold), var(--rose-gold-dark));
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.seserahan-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.seserahan-item:last-child { border-bottom: none; }
.seserahan-item:hover { background: var(--blush); }

.seserahan-item-name { font-size: 0.875rem; color: var(--text-primary); }

.seserahan-done {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}

.seserahan-done.checked {
  background: #4CAF50;
  border-color: #4CAF50;
  color: white;
}

/* === ANIMATIONS === */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 0.95rem; }

/* === TOAST NOTIFICATION === */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--espresso);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--rose-gold);
  animation: fadeInUp 0.3s ease;
  max-width: 320px;
}

.toast.success { border-left-color: #4CAF50; }
.toast.error   { border-left-color: #e74c3c; }

/* === PROGRESS BAR === */
.progress-bar-wrap {
  background: var(--ivory-dark);
  border-radius: 100px;
  height: 8px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--rose-gold), var(--gold));
  border-radius: 100px;
  transition: width 0.5s ease;
}

/* === BUDGET OVERVIEW === */
.budget-stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.budget-stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.budget-stat-card iconify-icon {
  font-size: 1.8rem;
  padding: 10px;
  border-radius: 50%;
}

.budget-stat-card.est iconify-icon { background: #faf0e6; color: var(--rose-gold-dark); }
.budget-stat-card.real iconify-icon { background: #eef2ff; color: #3b82f6; }
.budget-stat-card.sisa iconify-icon { background: #f0fdf4; color: #22c55e; }
.budget-stat-card.over iconify-icon { background: #fef2f2; color: #ef4444; }

.bstat-label { display: block; font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.bstat-value { display: block; font-size: 1.25rem; font-weight: 700; color: var(--espresso); font-family: 'Playfair Display', serif; margin-top: 2px; }

.progress-bar.over { background: #ef4444; }

/* === LAPORAN KEUANGAN === */
.laporan-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.laporan-sum-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.laporan-sum-card iconify-icon {
  font-size: 2.2rem;
  padding: 12px;
  border-radius: 50%;
}

.laporan-est iconify-icon { background: #faf0e6; color: var(--rose-gold-dark); }
.laporan-real iconify-icon { background: #eef2ff; color: #3b82f6; }
.laporan-sisa iconify-icon { background: #f0fdf4; color: #22c55e; }
.laporan-over iconify-icon { background: #fef2f2; color: #ef4444; }

.lsum-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 0; }
.lsum-value { font-size: 1.5rem; font-weight: 700; color: var(--espresso); font-family: 'Playfair Display', serif; margin: 4px 0 0; }

.laporan-progress-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.laporan-details {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.laporan-details-summary {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  font-weight: 600;
  color: var(--espresso);
  cursor: pointer;
  background: var(--ivory);
  user-select: none;
}

.laporan-details-summary:hover { background: var(--blush-light); }

.laporan-details[open] { border-color: var(--rose-gold-dark); }
.laporan-details[open] .laporan-details-summary { background: var(--blush); border-bottom: 1px solid var(--border); }

/* Inline Inputs inside table */
.inline-num-edit {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-family: inherit;
  font-size: 0.85rem;
  background: var(--white);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.inline-num-edit:focus {
  border-color: var(--rose-gold);
  background: var(--blush-light);
}

.btn-sm {
  padding: 4px 8px;
  font-size: 0.75rem;
  min-height: 28px;
}

.btn-icon.btn-sm {
  padding: 4px;
  width: 28px;
  height: 28px;
}

/* === SETTINGS PANEL === */
.settings-form {
  display: grid;
  gap: 20px;
  max-width: 500px;
}

.settings-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}

/* Checkin badge */
.badge-checkin { background: #e8f8ea; color: #2e7d32; border: 1px solid #a5d6a7; }
.badge-uncheckin { background: #ffeaea; color: #c62828; border: 1px solid #ef9a9a; }

/* === MOBILE FILTER TOGGLE === */
.filter-toggle-btn {
  display: none;
  width: 100%;
  padding: 12px 16px;
  background: var(--white);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--espresso-mid);
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  gap: 8px;
  align-items: center;
}

.filter-toggle-btn:hover { background: var(--blush); }

.filter-panel {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}

/* === BOTTOM NAVIGATION (Mobile) === */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(250, 246, 240, 0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(45,27,18,0.1);
}

.bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 8px;
  background: none;
  border: none;
  cursor: pointer;
  min-width: 52px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  color: var(--text-muted);
}

.bottom-nav-item.active { color: var(--rose-gold-dark); }

.bottom-nav-item .bnav-icon { font-size: 1.3rem; line-height: 1; }
.bottom-nav-item .bnav-label { font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

/* === MOBILE TABLE: Card view for small screens === */
.mobile-card-list { display: none; }

/* ============================================================
   RESPONSIVE BREAKPOINTS
============================================================ */

/* Tablet: 768px and below */
@media (max-width: 768px) {
  /* Hero */
  .hero { min-height: 260px; padding: 32px 16px 48px; }
  .hero-ornament { font-size: 0.7rem; letter-spacing: 0.2em; }
  .hero-names { font-size: 2.4rem; }
  .hero-tagline { font-size: 0.8rem; margin: 10px 0 16px; }
  .hero-events { gap: 10px; }
  .hero-event-card { min-width: 140px; padding: 10px 14px; }
  .hero-event-card .event-date { font-size: 1rem; }
  .hero-countdown { gap: 8px; margin-top: 14px; }
  .countdown-unit .num { font-size: 1.6rem; }
  .countdown-sep { font-size: 1.2rem; }

  /* Nav — hide on mobile, use bottom nav */
  .main-nav { display: none; }
  .bottom-nav { display: block; }
  .main-content { padding: 16px 14px 88px; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
  .stat-card { padding: 14px 12px; }
  .stat-icon { font-size: 1.4rem; margin-bottom: 4px; }
  .stat-value { font-size: 1.7rem; }
  .stat-label { font-size: 0.65rem; }

  /* Section header */
  .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .section-title { font-size: 1.2rem; }
  .section-header > div { width: 100%; display: flex; gap: 8px; flex-wrap: wrap; }
  .section-header .btn { flex: 1; justify-content: center; font-size: 0.8rem; padding: 10px 12px; min-height: 42px; }

  /* Toolbar: collapse filters behind toggle */
  .toolbar { flex-direction: column; gap: 10px; }
  .filter-toggle-btn { display: flex; }
  .filter-panel { display: none; flex-direction: column; }
  .filter-panel.open { display: flex; }
  .filter-select, .search-box { width: 100%; min-width: unset; }
  .search-box { min-width: unset; }

  /* Table: hide less important columns */
  table { font-size: 0.78rem; min-width: 0; }
  thead th, tbody td { padding: 9px 10px; }
  .col-hubungan, .col-mempelai, .col-fisik, .col-seragam { display: none; }

  /* Charts */
  .charts-grid { grid-template-columns: 1fr; }
  .chart-container { height: 200px; }

  /* Form grid */
  .form-grid { grid-template-columns: 1fr; }

  /* Modal */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 92vh;
    width: 100%;
    max-width: 100%;
  }
  .modal-header { border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: 20px 20px 16px; }
  .modal-body { padding: 20px; }
  .modal-footer { padding: 16px 20px; }

  /* Vendor table */
  .vendor-section-title { font-size: 0.95rem; }

  /* Settings */
  .settings-form { max-width: 100%; }

  /* Dashboard progress cards */
  .card { padding: 16px; }

  /* Toast */
  .toast-container { bottom: 80px; right: 12px; left: 12px; }
  .toast { max-width: 100%; }

  /* Seserahan grid */
  .seserahan-grid { grid-template-columns: 1fr; }

  /* Pagination */
  .pagination { flex-direction: column; gap: 8px; align-items: center; }
  .pagination-btns { flex-wrap: wrap; justify-content: center; }
  .page-btn { min-width: 36px; min-height: 36px; }
}

/* Mobile: 480px and below */
@media (max-width: 480px) {
  /* Hero */
  .hero { padding: 24px 12px 40px; min-height: 220px; }
  .hero-names { font-size: 1.9rem; }
  .hero-names .ampersand { margin: 0 8px; }
  .hero-events { flex-direction: column; align-items: center; }
  .hero-event-card { width: 100%; max-width: 260px; }
  .hero-countdown { gap: 6px; }
  .countdown-unit .num { font-size: 1.4rem; }
  .countdown-unit .label { font-size: 0.5rem; }
  .countdown-sep { font-size: 1rem; }

  /* Main content */
  .main-content { padding: 12px 12px 84px; }

  /* Stats: 2x3 grid */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-value { font-size: 1.5rem; }

  /* Table: show minimal columns only */
  .col-pax { display: none; }
  thead th, tbody td { padding: 8px 8px; }

  /* Buttons: full-width on tiny screens */
  .btn { font-size: 0.8rem; }

  /* Bottom nav label */
  .bottom-nav-item { min-width: 68px; min-height: 48px; }
  .bottom-nav-item .bnav-icon { font-size: 1.3rem; }

  /* Charts */
  .chart-card { padding: 16px; }
  .chart-container { height: 180px; }
}

/* Very small: 360px and below */
@media (max-width: 360px) {
  .hero-names { font-size: 1.6rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .stat-card { padding: 10px 8px; }
  .stat-value { font-size: 1.3rem; }
  .main-content { padding: 10px 10px 80px; }
}

/* === BOTTOM NAVIGATION (Mobile) === */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(74,38,22,0.08);
}

.bottom-nav-inner {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  height: 60px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.bottom-nav-inner::-webkit-scrollbar {
  display: none;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 0 0 68px; /* Fixed width so they line up and scroll horizontally */
  padding: 6px 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  transition: color 0.2s;
}

.bottom-nav-item.active {
  color: var(--espresso);
  font-weight: 600;
}

.bottom-nav-item .bnav-icon {
  font-size: 1.3rem;
}

.bottom-nav-item .bnav-label {
  font-size: 0.58rem;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .bottom-nav { display: block; }
  .main-nav { display: none; }
  .main-content { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
}

/* === MOBILE BOTTOM SHEET GRID MENU === */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.menu-card-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 8px;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
  box-shadow: var(--shadow-sm);
}

.menu-card-btn:hover {
  transform: translateY(-2px);
  border-color: var(--rose-gold);
  box-shadow: var(--shadow-md);
}

.menu-card-btn .mcard-icon {
  font-size: 1.8rem;
}

.menu-card-btn .mcard-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
}

.menu-card-btn.active {
  border-color: var(--rose-gold-dark);
  background: var(--cream);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* === BTN SMALL === */
.btn-sm {
  padding: 4px 8px !important;
  font-size: 0.75rem !important;
}


/* === RSVP BADGES === */
.badge-rsvp-hadir  { background:#e8f8ea; color:#2e7d32; border:1px solid #a5d6a7; }
.badge-rsvp-tidak  { background:#ffeaea; color:#c62828; border:1px solid #ef9a9a; }
.badge-rsvp-ragu   { background:#fff8e1; color:#e65100; border:1px solid #ffe082; }
.badge-rsvp-belum  { background:#f5f5f5; color:#757575; border:1px solid #e0e0e0; }

/* === VENDOR PAYMENT BADGES === */
.badge-pay-lunas  { background:#e8f8ea; color:#2e7d32; border:1px solid #a5d6a7; font-weight:600; }
.badge-pay-dp     { background:#fff8e1; color:#e65100; border:1px solid #ffe082; font-weight:600; }
.badge-pay-belum  { background:#ffeaea; color:#c62828; border:1px solid #ef9a9a; font-weight:600; }

.pay-warning { color:#c62828; font-size:0.72rem; font-weight:600; }

/* === RUNDOWN TABLE === */
.rundown-acara-tab {
  padding: 8px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.rundown-acara-tab.active {
  background: var(--espresso);
  color: var(--white);
  border-color: var(--espresso);
}

.rundown-acara-tab:hover:not(.active) {
  border-color: var(--espresso-mid);
  color: var(--espresso-mid);
}

.rundown-row {
  display: grid;
  grid-template-columns: 70px 1fr 120px 1fr 80px 80px;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  transition: background 0.15s;
}

.rundown-row:hover { background: var(--ivory-light); }

.rundown-row.done { opacity: 0.55; }
.rundown-row.done .rundown-kegiatan { text-decoration: line-through; }

.rundown-waktu {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--espresso);
}

.rundown-kegiatan { font-weight: 600; color: var(--text-primary); }
.rundown-pic { font-size: 0.78rem; color: var(--text-muted); }

.rundown-done-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.rundown-done-btn.checked {
  background: var(--espresso);
  border-color: var(--espresso);
  color: white;
}

.rundown-done-btn:hover:not(.checked) { border-color: var(--espresso-mid); }

.rundown-header-row {
  display: grid;
  grid-template-columns: 70px 1fr 120px 1fr 80px 80px;
  gap: 12px;
  padding: 10px 16px;
  background: var(--ivory);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* === IMPORT CSV PREVIEW === */
.import-preview-info {
  background: var(--blush-light);
  border: 1px solid var(--rose-gold-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--espresso-mid);
  margin-bottom: 16px;
}

.import-preview-table {
  width: 100%;
  font-size: 0.8rem;
  border-collapse: collapse;
}

.import-preview-table th {
  background: var(--ivory);
  padding: 8px 10px;
  text-align: left;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}

.import-preview-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.import-preview-table tr:nth-child(even) td { background: var(--ivory-light); }

/* ============================================================
   THEMES SYSTEM
   ============================================================ */
body.theme-sage {
  --rose-gold: #7A9E7E;
  --rose-gold-light: #C3D5C4;
  --rose-gold-dark: #4A6E4E;
  --ivory: #F4F7F4;
  --ivory-dark: #E1E8E1;
  --blush: #E8EFE8;
  --espresso: #1B2D1B;
  --espresso-mid: #385A3A;
  --espresso-light: #558B58;
  --cream: #F9FCF9;
  --text-primary: #1B2D1B;
  --text-secondary: #385A38;
  --text-muted: #709E73;
  --border: rgba(122, 158, 126, 0.25);
  --border-strong: rgba(122, 158, 126, 0.5);
  --shadow-glow: 0 0 30px rgba(122, 158, 126, 0.2);
  --hero-bg-gradient: linear-gradient(135deg, #1B2D1B 0%, #385A3A 40%, #4A6E4E 70%, #7A9E7E 100%);
  --hero-overlay-gradient: linear-gradient(180deg, rgba(27, 45, 27, 0.4) 0%, rgba(27, 45, 27, 0.6) 50%, rgba(27, 45, 27, 0.8) 100%);
  --header-table-gradient: linear-gradient(135deg, #1B2D1B, #385A3A);
  --nav-bg-rgba: rgba(244, 247, 244, 0.95);
}

body.theme-rose {
  --rose-gold: #C68B8B;
  --rose-gold-light: #E8CFCF;
  --rose-gold-dark: #9D5B5B;
  --ivory: #FAF5F5;
  --ivory-dark: #F2E3E3;
  --blush: #F7EAEA;
  --espresso: #301E1E;
  --espresso-mid: #5E3C3C;
  --espresso-light: #8E5D5D;
  --cream: #FFFBFB;
  --text-primary: #301E1E;
  --text-secondary: #5E3C3C;
  --text-muted: #A07373;
  --border: rgba(198, 139, 139, 0.25);
  --border-strong: rgba(198, 139, 139, 0.5);
  --shadow-glow: 0 0 30px rgba(198, 139, 139, 0.2);
  --hero-bg-gradient: linear-gradient(135deg, #301E1E 0%, #5E3C3C 40%, #9D5B5B 70%, #C68B8B 100%);
  --hero-overlay-gradient: linear-gradient(180deg, rgba(48, 30, 30, 0.4) 0%, rgba(48, 30, 30, 0.6) 50%, rgba(48, 30, 30, 0.8) 100%);
  --header-table-gradient: linear-gradient(135deg, #301E1E, #5E3C3C);
  --nav-bg-rgba: rgba(250, 245, 245, 0.95);
}

body.theme-blue {
  --rose-gold: #6A8BB5;
  --rose-gold-light: #B4C6DC;
  --rose-gold-dark: #405F8A;
  --ivory: #F2F5FA;
  --ivory-dark: #E3E9F2;
  --blush: #EAF0F7;
  --espresso: #121F2D;
  --espresso-mid: #283E5A;
  --espresso-light: #526C8D;
  --cream: #F8FAFD;
  --text-primary: #121F2D;
  --text-secondary: #283E58;
  --text-muted: #708CAE;
  --border: rgba(106, 139, 181, 0.25);
  --border-strong: rgba(106, 139, 181, 0.5);
  --shadow-glow: 0 0 30px rgba(106, 139, 181, 0.2);
  --hero-bg-gradient: linear-gradient(135deg, #121F2D 0%, #283E5A 40%, #405F8A 70%, #6A8BB5 100%);
  --hero-overlay-gradient: linear-gradient(180deg, rgba(18, 31, 45, 0.4) 0%, rgba(18, 31, 45, 0.6) 50%, rgba(18, 31, 45, 0.8) 100%);
  --header-table-gradient: linear-gradient(135deg, #121F2D, #283E5A);
  --nav-bg-rgba: rgba(242, 245, 250, 0.95);
}

/* Media query for mobile responsive rundown */
@media (max-width: 768px) {
  .rundown-header-row {
    display: none !important;
  }
  .rundown-row {
    display: grid !important;
    grid-template-columns: 85px 1fr !important;
    grid-template-rows: auto auto auto !important;
    gap: 4px 12px !important;
    padding: 14px 16px !important;
    align-items: start !important;
    position: relative !important;
  }
  .rundown-waktu {
    grid-column: 1 !important;
    grid-row: 1 / span 3 !important;
    font-size: 0.95rem !important;
    color: var(--espresso) !important;
  }
  .rundown-kegiatan {
    grid-column: 2 !important;
    grid-row: 1 !important;
    font-size: 0.9rem !important;
    padding-right: 80px !important; /* Leave space for Done and Actions button */
  }
  .rundown-pic {
    grid-column: 2 !important;
    grid-row: 2 !important;
    font-size: 0.78rem !important;
    margin-top: 2px !important;
  }
  .rundown-ket {
    grid-column: 2 !important;
    grid-row: 3 !important;
    font-size: 0.8rem !important;
    margin-top: 2px !important;
  }
  .rundown-done-wrap {
    position: absolute !important;
    top: 12px !important;
    right: 56px !important;
  }
  .rundown-actions-wrap {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
  }
}


