/* ========================================
   baosao — Design System
   ======================================== */

:root {
  /* Gold */
  --gold-50: #FDFBF3;
  --gold-100: #FAF4DC;
  --gold-200: #F0DCA8;
  --gold-300: #DFC070;
  --gold-400: #C9A857;
  --gold-500: #B8860B;
  --gold-600: #967008;
  --gold-700: #7A5B06;

  /* Rose */
  --rose-50: #FEF5F4;
  --rose-100: #FBEAE8;
  --rose-200: #F0C5C1;
  --rose-300: #D99B97;
  --rose-400: #C47A76;
  --rose-500: #A85B57;

  /* Sage */
  --sage-50: #F2F7F1;
  --sage-100: #DFF0DC;
  --sage-200: #BAD4B7;
  --sage-300: #8FAF8B;
  --sage-400: #6B9067;
  --sage-500: #4F7249;

  /* Neutrals */
  --cream: #FBF8F3;
  --cream-dark: #F5EFE4;
  --ivory: #FFFEF9;
  --charcoal: #1F1F1F;
  --charcoal-light: #2D2D2D;
  --text-primary: #1A1A1A;
  --text-secondary: #6B6857;
  --text-muted: #9E9B8E;
  --border: rgba(184, 134, 11, 0.18);
  --border-light: rgba(184, 134, 11, 0.10);

  --font-display: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --font-display-thai: 'Mitr', 'Sarabun', sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-thai: 'Sarabun', 'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

body.thai-mode { font-family: var(--font-thai); }

/* In Thai mode, swap the display serif (which doesn't have Thai glyphs)
   for Bai Jamjuree — a headless Thai display font with italic variants. */
body.thai-mode .display,
body.thai-mode .hero-title,
body.thai-mode .section-title,
body.thai-mode .view-title,
body.thai-mode .modal-title,
body.thai-mode .wedding-title,
body.thai-mode .feature-card h3,
body.thai-mode .plan-name,
body.thai-mode .settings-card-title,
body.thai-mode .card-title,
body.thai-mode .countdown-days,
body.thai-mode .stat-value,
body.thai-mode .ring-center .big,
body.thai-mode .price-amount,
body.thai-mode .budget-amount-big,
body.thai-mode .vendor-name,
body.thai-mode .timeline-time,
body.thai-mode .trust-number {
  font-family: var(--font-display-thai);
  letter-spacing: -0.005em;
  font-weight: 500;
}

body.thai-mode .hero-title em {
  font-style: normal;
  font-weight: 700;
}

.display { font-family: var(--font-display); }
.thai { font-family: var(--font-thai); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gold-200); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-300); }

/* Grain texture overlay */
.grain-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ LANDING PAGE ============ */

.landing-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(251, 248, 243, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
}

.logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--charcoal);
  letter-spacing: -0.02em;
  line-height: 1;
}

.logo span { color: var(--gold-500); font-style: italic; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links > a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.nav-links > a:hover { color: var(--gold-600); }

.lang-toggle {
  display: flex;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  padding: 2px;
}

.lang-toggle.compact { padding: 2px; }

.lang-btn {
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.15s;
  letter-spacing: 0.06em;
  border-radius: 6px;
}

.lang-btn.active {
  background: var(--gold-500);
  color: white;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  white-space: nowrap;
}

.btn-primary.small, .btn-secondary.small {
  padding: 9px 18px;
  font-size: 13px;
}

.btn-primary {
  background: var(--gold-500);
  color: white;
}

.btn-primary:hover {
  background: var(--gold-600);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(184, 134, 11, 0.28);
}

.btn-secondary {
  background: transparent;
  color: var(--charcoal);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--gold-400);
  color: var(--gold-600);
  background: var(--gold-50);
}

.btn-secondary.dark {
  border-color: rgba(255,255,255,0.2);
  color: white;
  background: transparent;
}

.btn-secondary.dark:hover {
  border-color: var(--gold-400);
  color: var(--gold-300);
}

.btn-light {
  background: white;
  color: var(--charcoal);
}

.btn-light:hover {
  background: var(--cream);
  transform: translateY(-1px);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 140px 40px 80px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.hero-bg-deco {
  position: absolute;
  top: 50%;
  right: -200px;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

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

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--gold-100);
  border: 1px solid var(--gold-200);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-600);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  background: var(--gold-500);
  border-radius: 50%;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 84px);
  line-height: 1;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 28px;
  letter-spacing: -0.015em;
}

.hero-title em {
  font-style: italic;
  color: var(--gold-500);
  font-weight: 500;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.65;
  max-width: 480px;
}

body.thai-mode .hero-subtitle { font-size: 16px; }

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
}

.trust-stat { text-align: left; }
.trust-number {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  color: var(--charcoal);
  line-height: 1;
}
.trust-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.04em;
}
.trust-divider {
  width: 1px;
  height: 42px;
  background: var(--border);
}

/* Hero mockup */
.hero-mockup {
  position: relative;
  z-index: 1;
}

.mockup-window {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(31, 31, 31, 0.18), 0 12px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
  transition: transform 0.6s;
}

.mockup-window:hover {
  transform: perspective(1400px) rotateY(-3deg) rotateX(1deg);
}

.mockup-titlebar {
  background: var(--cream-dark);
  padding: 10px 14px;
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-light);
}

.mockup-titlebar .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.mockup-titlebar .dot.red { background: #FF6058; }
.mockup-titlebar .dot.yellow { background: #FDBC2C; }
.mockup-titlebar .dot.green { background: #27C840; }

.mockup-app {
  display: grid;
  grid-template-columns: 56px 1fr;
  min-height: 360px;
}

.mockup-sidebar {
  background: var(--charcoal-light);
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.mockup-logo {
  font-family: var(--font-display);
  color: white;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.mockup-logo em { color: var(--gold-300); font-style: normal; }

.mockup-nav-item {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  font-size: 14px;
}
.mockup-nav-item.active {
  background: rgba(201, 168, 87, 0.18);
  color: var(--gold-300);
}

.mockup-content {
  padding: 18px;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mockup-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--charcoal);
}

.mockup-badge {
  padding: 3px 10px;
  background: var(--charcoal);
  color: var(--gold-300);
  border-radius: 100px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.mockup-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mockup-stat {
  background: white;
  border-radius: 8px;
  padding: 10px;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid;
}
.mockup-stat.gold { border-color: var(--gold-400); }
.mockup-stat.rose { border-color: var(--rose-300); }
.mockup-stat.sage { border-color: var(--sage-300); }

.mockup-stat .big {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--charcoal);
  margin-top: 2px;
  letter-spacing: -0.02em;
}

.mockup-chart {
  background: white;
  border-radius: 8px;
  padding: 12px;
  height: 70px;
}

.mockup-rows {
  background: white;
  border-radius: 8px;
  padding: 8px;
}

.mockup-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  font-size: 12px;
  color: var(--charcoal);
  border-bottom: 1px solid var(--border-light);
}
.mockup-row:last-child { border-bottom: none; }

.mockup-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-300), var(--rose-300));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: white;
}

.mockup-row > span:nth-child(2) { flex: 1; }

.mockup-pill {
  padding: 2px 7px;
  border-radius: 100px;
  font-size: 9px;
  font-weight: 600;
}
.mockup-pill.green { background: #E8F5E9; color: #2E7D32; }
.mockup-pill.yellow { background: var(--gold-100); color: var(--gold-600); }

/* Sections */
.features-section {
  padding: 120px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-label {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 16px;
}

.section-label.light { color: var(--gold-300); }

.section-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 64px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.section-title.light { color: white; }

.section-divider {
  text-align: center;
  padding: 30px;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--gold-300);
  letter-spacing: 0.4em;
  font-style: italic;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 36px 32px;
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--gold-300);
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(184, 134, 11, 0.10);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 26px;
  font-weight: 400;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--charcoal);
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Pricing */
.pricing-section {
  padding: 120px 40px;
  background: var(--charcoal);
  position: relative;
  overflow: hidden;
}

.pricing-section::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(201, 168, 87, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.pricing-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.pricing-card {
  padding: 40px 32px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
  position: relative;
  transition: all 0.3s;
}

.pricing-card.featured {
  background: linear-gradient(180deg, var(--gold-500), var(--gold-600));
  border-color: var(--gold-400);
  transform: translateY(-12px);
  box-shadow: 0 32px 64px rgba(184, 134, 11, 0.4);
}

.pricing-card:hover:not(.featured) {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.16);
}

.featured-badge {
  position: absolute;
  top: -12px;
  right: 24px;
  padding: 5px 12px;
  background: white;
  color: var(--gold-600);
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.plan-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 8px;
}

.price-amount {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 400;
  line-height: 1;
  margin: 16px 0 6px;
  letter-spacing: -0.02em;
}

.price-period {
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 32px;
}

.plan-features {
  list-style: none;
  margin-bottom: 32px;
}

.plan-features li {
  padding: 10px 0;
  font-size: 13.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  padding-left: 22px;
  opacity: 0.85;
}

.plan-features.dark-list li { border-bottom: 1px solid rgba(255, 255, 255, 0.15); }

.plan-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--gold-300);
  font-weight: 600;
}

.pricing-card.featured .plan-features li::before {
  color: white;
}

/* Footer */
.landing-footer {
  padding: 48px 40px 32px;
  background: var(--cream);
  border-top: 1px solid var(--border-light);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--gold-600); }

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============ APP SHELL ============ */
#app {
  display: none;
  height: 100vh;
  overflow: hidden;
}

#app.active { display: block; }

.app-layout {
  display: grid;
  grid-template-columns: 252px 1fr;
  grid-template-rows: 68px 1fr;
  height: 100vh;
  grid-template-areas:
    "sidebar header"
    "sidebar main";
}

/* Sidebar */
.sidebar {
  grid-area: sidebar;
  background: var(--charcoal-light);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: relative;
}

.sidebar::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 260px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg opacity='0.05' fill='%23C9A857'%3E%3Cpath d='M100 30 Q88 50 70 60 Q88 70 100 90 Q112 70 130 60 Q112 50 100 30Z'/%3E%3Cpath d='M100 80 Q80 110 50 120 Q80 130 100 160 Q120 130 150 120 Q120 110 100 80Z'/%3E%3Ccircle cx='100' cy='30' r='8'/%3E%3Ccircle cx='100' cy='170' r='6'/%3E%3Cellipse cx='100' cy='180' rx='50' ry='6'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 240px;
  pointer-events: none;
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-logo .logo {
  color: white;
  font-size: 22px;
}

.wedding-selector {
  margin: 14px 12px 12px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.wedding-selector:hover {
  background: rgba(255, 255, 255, 0.06);
}

.wedding-selector-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(255, 255, 255, 0.5);
}

.wedding-name {
  font-size: 14px;
  font-weight: 500;
  color: white;
  line-height: 1.2;
}

.wedding-date {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}

.wedding-picker {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--charcoal);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 6px;
  z-index: 50;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

.wedding-picker.open { display: block; animation: fadeInUp 0.18s ease; }

.picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 7px;
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  transition: background 0.15s;
}

.picker-item:hover { background: rgba(255,255,255,0.06); }

.picker-item.active { background: rgba(201, 168, 87, 0.14); }

.picker-name { font-size: 13px; font-weight: 500; color: white; }
.picker-sub { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 2px; }

.picker-badge {
  padding: 2px 8px;
  background: var(--gold-500);
  color: white;
  font-size: 9px;
  font-weight: 600;
  border-radius: 100px;
  letter-spacing: 0.04em;
}

.picker-action {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--gold-300);
  cursor: pointer;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 4px;
}

.nav-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  padding: 16px 24px 6px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 400;
  margin: 1px 10px;
  border-radius: 8px;
  position: relative;
  transition: all 0.15s;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
}

.nav-item.active {
  background: rgba(201, 168, 87, 0.14);
  color: var(--gold-300);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--gold-400);
  border-radius: 0 2px 2px 0;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-count {
  margin-left: auto;
  font-size: 11px;
  padding: 1px 7px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  font-weight: 500;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 14px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 1;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.user-profile:hover { background: rgba(255, 255, 255, 0.05); }

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-400), var(--rose-300));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

/* App Header */
.app-header {
  grid-area: header;
  background: var(--ivory);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  gap: 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wedding-title {
  font-size: 22px;
  font-weight: 500;
  color: var(--charcoal);
  line-height: 1;
  letter-spacing: -0.01em;
}

.date-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  background: var(--gold-100);
  border: 1px solid var(--gold-200);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-600);
  letter-spacing: 0.03em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.countdown-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--charcoal);
  border-radius: 100px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.02em;
}

.countdown-chip svg { color: var(--gold-300); }

.countdown-days {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--gold-300);
  font-weight: 600;
  letter-spacing: 0;
}

.notification-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.15s;
  color: var(--text-secondary);
}

.notification-btn:hover {
  background: var(--gold-50);
  border-color: var(--gold-300);
  color: var(--gold-600);
}

.notif-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  background: var(--rose-400);
  border-radius: 50%;
  border: 2px solid white;
}

/* App Main */
.app-main {
  grid-area: main;
  overflow-y: auto;
  background: var(--cream);
}

.view {
  padding: 32px;
  animation: fadeInUp 0.35s ease;
}

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

.view-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.view-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.view-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.view-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  font-family: inherit;
}

.action-btn.primary {
  background: var(--gold-500);
  color: white;
}

.action-btn.primary:hover {
  background: var(--gold-600);
  box-shadow: 0 6px 16px rgba(184, 134, 11, 0.28);
  transform: translateY(-1px);
}

.action-btn.secondary {
  background: white;
  color: var(--charcoal);
  border: 1.5px solid var(--border);
}

.action-btn.secondary:hover {
  border-color: var(--gold-300);
  color: var(--gold-600);
  background: var(--gold-50);
}

/* Cards */
.card {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  padding: 24px;
  transition: all 0.2s;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--charcoal);
  letter-spacing: -0.01em;
}

.card-link {
  font-size: 12px;
  color: var(--gold-500);
  font-weight: 500;
  cursor: pointer;
}

.card-link:hover { color: var(--gold-600); text-decoration: underline; }

/* Stat Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.stat-card.gold::after { background: linear-gradient(to right, var(--gold-300), var(--gold-500)); }
.stat-card.rose::after { background: linear-gradient(to right, var(--rose-200), var(--rose-400)); }
.stat-card.sage::after { background: linear-gradient(to right, var(--sage-200), var(--sage-400)); }
.stat-card.charcoal::after { background: linear-gradient(to right, #555, var(--charcoal)); }

.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-value .unit {
  font-size: 18px;
  color: var(--text-muted);
  margin-left: 4px;
}

.stat-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 10px;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
}

.stat-change.up { background: var(--sage-100); color: var(--sage-500); }
.stat-change.down { background: var(--rose-100); color: var(--rose-500); }

/* Dashboard grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}

.dashboard-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

/* RSVP Ring */
.rsvp-ring-wrap {
  display: flex;
  align-items: center;
  gap: 28px;
}

.ring-svg-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}

.ring-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.ring-center .big {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  color: var(--charcoal);
  line-height: 1;
}

.ring-center .small {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

.ring-legend {
  flex: 1;
}

.ring-legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.ring-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ring-legend-label {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
}

.ring-legend-value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--charcoal);
}

.ring-legend-pct {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
}

/* Activity feed */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
}

.activity-text {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

.activity-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Task list */
.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.task-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--border);
  background: white;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.task-checkbox:hover {
  border-color: var(--gold-400);
  background: var(--gold-50);
}

.task-checkbox.done {
  background: var(--sage-300);
  border-color: var(--sage-300);
  color: white;
}

.task-content { flex: 1; }

.task-title {
  font-size: 13.5px;
  color: var(--text-primary);
  font-weight: 500;
}

.task-due {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.task-priority {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 100px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.task-priority.high { background: var(--rose-100); color: var(--rose-500); }
.task-priority.med { background: var(--gold-100); color: var(--gold-600); }
.task-priority.low { background: var(--sage-100); color: var(--sage-500); }

/* Search bar */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  flex: 1;
  max-width: 340px;
  transition: all 0.15s;
}

.search-bar:focus-within {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.08);
}

.search-bar svg { color: var(--text-muted); flex-shrink: 0; }

.search-bar input {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-primary);
  background: transparent;
  width: 100%;
}

.search-bar input::placeholder { color: var(--text-muted); }

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.filter-tab:hover {
  border-color: var(--gold-300);
  color: var(--gold-600);
}

.filter-tab.active {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: white;
}

/* Data Table */
.table-wrapper {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 14px 18px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  background: var(--cream);
  border-bottom: 1px solid var(--border-light);
}

.data-table td {
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.data-table tr:hover td { background: var(--gold-50); }
.data-table tr:last-child td { border-bottom: none; }

.guest-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.guest-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge.confirmed { background: var(--sage-100); color: var(--sage-500); }
.badge.pending { background: var(--gold-100); color: var(--gold-600); }
.badge.declined { background: var(--rose-100); color: var(--rose-500); }
.badge.vip { background: var(--gold-200); color: var(--gold-700); }
.badge.bride { background: var(--rose-100); color: var(--rose-500); }
.badge.groom { background: var(--sage-100); color: var(--sage-500); }
.badge.in-progress { background: #E3F2FD; color: #1565C0; }
.badge.completed { background: var(--sage-100); color: var(--sage-500); }
.badge.upcoming { background: var(--cream-dark); color: var(--text-secondary); }
.badge.delayed { background: #FFF8E1; color: #F57F17; }
.badge.dim { background: var(--cream-dark); color: var(--text-muted); }

/* Seating two-column layout (floor plan + unseated panel) */
.seating-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  align-items: stretch;
}

.unseated-panel {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  min-height: 580px;
  max-height: 720px;
  overflow: hidden;
}

.unseated-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, var(--gold-50), white);
}

.unseated-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--charcoal);
  letter-spacing: -0.01em;
}

body.thai-mode .unseated-title { font-family: var(--font-display-thai); }

.unseated-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.unseated-count {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--gold-600);
  line-height: 1;
}

body.thai-mode .unseated-count { font-family: var(--font-display-thai); }

.unseated-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.unseated-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.guest-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  cursor: grab;
  user-select: none;
  transition: all 0.15s;
  touch-action: none;
}

.guest-chip:hover {
  border-color: var(--gold-300);
  background: var(--gold-50);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(184, 134, 11, 0.10);
}

.guest-chip:active { cursor: grabbing; }

.chip-info {
  flex: 1;
  min-width: 0;
}

.chip-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--charcoal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.chip-grip {
  color: var(--text-muted);
  opacity: 0.5;
  flex-shrink: 0;
}

.guest-chip.chip-source-dragging {
  opacity: 0.35;
  pointer-events: none;
}

.chip-dragging {
  cursor: grabbing !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  transform: rotate(-2deg) scale(1.04);
  background: var(--gold-50);
  border-color: var(--gold-400);
}

/* Table drop-target visual feedback */
.table-circle.drag-over {
  border-color: var(--sage-400);
  background: var(--sage-100);
  transform: scale(1.15);
  box-shadow: 0 0 0 6px rgba(143, 175, 139, 0.25), 0 8px 20px rgba(143, 175, 139, 0.3);
}

.table-circle.drag-over-invalid {
  border-color: var(--rose-400);
  background: var(--rose-100);
  transform: scale(1.05);
  box-shadow: 0 0 0 6px rgba(196, 122, 118, 0.18);
  animation: shake 0.4s ease infinite;
}

@keyframes shake {
  0%, 100% { transform: scale(1.05) translateX(0); }
  25% { transform: scale(1.05) translateX(-3px); }
  75% { transform: scale(1.05) translateX(3px); }
}

/* Toast */
.flash-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(120%);
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  color: white;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  white-space: nowrap;
}

.flash-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.flash-toast.success { background: var(--sage-400); }
.flash-toast.error { background: var(--rose-500); }
.flash-toast.info { background: var(--charcoal); }

@media (max-width: 900px) {
  .seating-layout { grid-template-columns: 1fr; }
  .unseated-panel { min-height: 360px; max-height: 480px; }
}

/* Floor plan */
.floor-plan {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  padding: 40px;
  min-height: 580px;
  position: relative;
  background-image:
    linear-gradient(rgba(184, 134, 11, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184, 134, 11, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

.floor-label {
  position: absolute;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.7;
}

.stage {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 56px;
  background: linear-gradient(180deg, var(--gold-100), var(--gold-200));
  border: 1.5px solid var(--gold-300);
  border-radius: 8px 8px 28px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-700);
  letter-spacing: 0.18em;
}

.table-item {
  position: absolute;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.table-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: 11px;
  font-weight: 600;
  color: var(--charcoal);
  transition: all 0.2s;
  margin: 0 auto;
}

.table-circle.vip {
  border-color: var(--gold-500);
  background: var(--gold-100);
  color: var(--gold-700);
  box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.08);
}

.table-circle.full {
  background: var(--sage-50);
  border-color: var(--sage-300);
  color: var(--sage-500);
}

.table-circle.empty {
  background: var(--cream);
  border-style: dashed;
  color: var(--text-muted);
}

.table-item:hover .table-circle {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(184, 134, 11, 0.25);
  border-color: var(--gold-500);
}

.table-tag {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
}

.table-seats {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 1px;
  letter-spacing: 0.04em;
}

.table-item.vip .table-seats { color: var(--gold-600); }
.table-item.full .table-seats { color: var(--sage-500); }

.table-name {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 6px;
  max-width: 80px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Floor legend */
.floor-legend {
  display: flex;
  gap: 18px;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  align-items: center;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid;
}

.legend-circle.empty-style { background: var(--cream); border-color: var(--border); border-style: dashed; }
.legend-circle.partial { background: white; border-color: var(--border); }
.legend-circle.full { background: var(--sage-50); border-color: var(--sage-300); }
.legend-circle.vip-style { background: var(--gold-100); border-color: var(--gold-500); }

/* Timeline */
.timeline-list {
  position: relative;
  padding-left: 4px;
}

.timeline-list::before {
  content: '';
  position: absolute;
  left: 21px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border-light);
}

.timeline-item {
  display: flex;
  gap: 18px;
  padding: 0 0 20px 0;
  position: relative;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.timeline-dot.completed {
  background: var(--sage-300);
  border-color: var(--sage-300);
  color: white;
}

.timeline-dot.in-progress {
  background: var(--gold-400);
  border-color: var(--gold-400);
  color: white;
  animation: pulse-gold 2s infinite;
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 87, 0.5); }
  50% { box-shadow: 0 0 0 12px rgba(201, 168, 87, 0); }
}

.timeline-content {
  flex: 1;
  padding: 14px 20px;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  position: relative;
}

.timeline-time {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--gold-600);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.timeline-title {
  font-weight: 500;
  font-size: 15px;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-light);
  font-size: 12px;
  color: var(--text-muted);
}

/* Budget */
.budget-summary {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.budget-progress-ring {
  display: flex;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, var(--charcoal), var(--charcoal-light));
  color: white;
  padding: 28px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.budget-progress-ring::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(201, 168, 87, 0.12), transparent 70%);
}

.budget-ring {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.budget-summary-info {
  flex: 1;
  position: relative;
  z-index: 1;
}

.budget-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 10px;
}

.budget-amount-big {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 400;
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.budget-amount-big .currency {
  font-size: 26px;
  color: var(--gold-300);
}

.budget-amount-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.budget-amount-sub strong { color: var(--gold-300); }

.budget-stat-mini {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.budget-stat-mini .label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.budget-stat-mini .value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  margin-top: 8px;
  color: var(--charcoal);
}

.budget-category {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.budget-category:last-child { border-bottom: none; }

.budget-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.budget-icon.gold { background: var(--gold-100); }
.budget-icon.rose { background: var(--rose-100); }
.budget-icon.sage { background: var(--sage-100); }

.budget-info { flex: 1.2; min-width: 0; }

.budget-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
}

.budget-amounts {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.budget-amounts strong { color: var(--charcoal); font-weight: 600; }

.budget-bar-wrapper { flex: 1; }

.progress-bar {
  height: 8px;
  background: var(--cream-dark);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-fill.gold { background: linear-gradient(to right, var(--gold-300), var(--gold-500)); }
.progress-fill.rose { background: linear-gradient(to right, var(--rose-200), var(--rose-400)); }
.progress-fill.sage { background: linear-gradient(to right, var(--sage-200), var(--sage-400)); }

.budget-pct {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--charcoal);
  min-width: 50px;
  text-align: right;
}

/* Vendor cards */
.vendor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.vendor-card {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  padding: 22px;
  transition: all 0.2s;
}

.vendor-card:hover {
  border-color: var(--gold-300);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(184, 134, 11, 0.10);
}

.vendor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.vendor-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.vendor-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  color: var(--charcoal);
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.vendor-category {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.vendor-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.vendor-price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--charcoal);
}

.vendor-contact {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Check-in layout */
.checkin-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 18px;
}

.qr-section {
  background: linear-gradient(135deg, var(--charcoal) 0%, #2D2D2D 100%);
  border-radius: 16px;
  padding: 36px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.qr-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg opacity='0.05' stroke='%23C9A857' stroke-width='1' fill='none'%3E%3Ccircle cx='100' cy='100' r='80'/%3E%3Ccircle cx='100' cy='100' r='60'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 280px;
  pointer-events: none;
}

.qr-section > * { position: relative; z-index: 1; }

.qr-frame {
  width: 200px;
  height: 200px;
  background: white;
  border-radius: 16px;
  margin: 22px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.qr-section h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.qr-section .sub {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-top: 6px;
}

.qr-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.qr-stat {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 12px 8px;
}

.qr-stat .num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  color: var(--gold-300);
  line-height: 1;
}

.qr-stat .lbl {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.arrivals-card {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  padding: 24px;
  max-height: 600px;
  overflow-y: auto;
}

.checkin-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.checkin-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage-300);
  box-shadow: 0 0 0 4px var(--sage-100);
  flex-shrink: 0;
}

.checkin-info { flex: 1; min-width: 0; }

.checkin-name {
  font-weight: 500;
  font-size: 14px;
  color: var(--charcoal);
}

.checkin-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.checkin-time {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--gold-600);
}

/* Gift tracker */
.gift-section {
  margin-top: 18px;
}

.gift-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.gift-amount {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--sage-500);
}

/* Helpers */
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }

/* Avatars by initials */
.avatar-1 { background: linear-gradient(135deg, var(--gold-300), var(--gold-500)); }
.avatar-2 { background: linear-gradient(135deg, var(--rose-300), var(--rose-400)); }
.avatar-3 { background: linear-gradient(135deg, var(--sage-300), var(--sage-400)); }
.avatar-4 { background: linear-gradient(135deg, #B89DC9, #9376AB); }
.avatar-5 { background: linear-gradient(135deg, #D4A678, #C28F58); }

/* Landing animations */
.landing-animate {
  animation: fadeInUp 0.7s ease both;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============ SETTINGS ============ */
.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 880px;
}

.settings-card {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  padding: 28px;
}

.settings-card.danger {
  border-color: var(--rose-200);
  background: var(--rose-50);
}

.settings-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
}

.settings-card.danger .settings-card-head {
  border-bottom-color: var(--rose-200);
}

.settings-card-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--charcoal);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.settings-card.danger .settings-card-title {
  color: var(--rose-500);
}

.settings-card-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

.settings-rows {
  display: flex;
  flex-direction: column;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.settings-row:last-child { border-bottom: none; }
.settings-row:first-child { padding-top: 0; }

.settings-card.danger .settings-row {
  border-bottom-color: var(--rose-200);
}

.settings-row-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--charcoal);
}

.settings-row-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.settings-row-value {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: right;
}

.settings-row-value.mono {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--cream);
  padding: 4px 10px;
  border-radius: 6px;
}

.settings-row-value.mono.small { font-size: 11px; }

@media (max-width: 720px) {
  .settings-grid { grid-template-columns: 1fr; }
  .settings-row { flex-direction: column; align-items: flex-start; }
  .settings-row-value { text-align: left; }
}

/* ============ MODALS ============ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 31, 31, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

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

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--ivory);
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  animation: modalIn 0.25s ease;
}

.modal.wide { max-width: 720px; }

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

.modal-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--charcoal);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.modal-close {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.modal-close:hover {
  background: var(--cream-dark);
  color: var(--charcoal);
}

.modal-body { padding: 24px 28px; }

.modal-footer {
  padding: 16px 28px 24px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* QR Modal specifics */
.qr-modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.qr-modal-canvas {
  width: 240px;
  height: 240px;
  border-radius: 14px;
  background: white;
  padding: 16px;
  border: 1px solid var(--border);
}

.qr-modal-canvas canvas, .qr-modal-canvas svg { width: 100%; height: 100%; }

.qr-link {
  width: 100%;
  padding: 12px;
  background: var(--cream);
  border-radius: 10px;
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  word-break: break-all;
  border: 1px solid var(--border-light);
}

/* ============ SCANNER ============ */
.scanner-wrap {
  background: var(--charcoal);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scanner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scanner-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scanner-frame {
  width: 70%;
  max-width: 280px;
  aspect-ratio: 1;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  position: relative;
}

.scanner-frame::before,
.scanner-frame::after,
.scanner-corners::before,
.scanner-corners::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--gold-300);
  border-style: solid;
  border-width: 0;
}

.scanner-frame::before { top: -2px; left: -2px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 16px; }
.scanner-frame::after { top: -2px; right: -2px; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 16px; }
.scanner-corners::before { bottom: -2px; left: -2px; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 16px; }
.scanner-corners::after { bottom: -2px; right: -2px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 16px; }

.scanner-line {
  position: absolute;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-300), transparent);
  top: 50%;
  animation: scanLine 2.2s ease-in-out infinite;
}

@keyframes scanLine {
  0%, 100% { top: 18%; opacity: 0.4; }
  50% { top: 82%; opacity: 1; }
}

.scanner-placeholder {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  padding: 40px;
}

.scanner-placeholder .icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.scanner-status {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.scanner-result {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: white;
  display: none;
}

.scanner-result.success { background: var(--sage-50); border-color: var(--sage-300); }
.scanner-result.duplicate { background: var(--gold-100); border-color: var(--gold-300); }
.scanner-result.error { background: var(--rose-100); border-color: var(--rose-400); }
.scanner-result.visible { display: flex; gap: 14px; align-items: center; }

.scanner-result-text { flex: 1; }
.scanner-result-name { font-weight: 600; font-size: 15px; color: var(--charcoal); }
.scanner-result-status { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ============ GUEST QR LINK ============ */
.qr-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text-secondary);
}

.qr-mini-btn:hover {
  border-color: var(--gold-400);
  color: var(--gold-600);
  background: var(--gold-50);
}

/* ============ SEATING ASSIGNMENTS ============ */
.assign-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  margin-top: 8px;
}

.assign-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: white;
  transition: all 0.15s;
}

.assign-row:hover { border-color: var(--gold-300); background: var(--gold-50); }

.assign-row .name { flex: 1; font-size: 13px; }
.assign-row .action {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.assign-row .action.add { background: var(--sage-100); color: var(--sage-500); }
.assign-row .action.add:hover { background: var(--sage-300); color: white; }
.assign-row .action.remove { background: var(--rose-100); color: var(--rose-500); }
.assign-row .action.remove:hover { background: var(--rose-400); color: white; }

.table-item.draggable .table-circle { cursor: grab; }
.table-item.dragging .table-circle { cursor: grabbing; opacity: 0.7; }

/* ============ FORM FIELDS (used in modals) ============ */
.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 8px;
}

body.thai-mode .field label {
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  transition: all 0.15s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold-400);
  box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.08);
}

.field textarea {
  resize: vertical;
  min-height: 80px;
}

/* ============ AUTH MODAL ============ */
.auth-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: var(--cream);
  border-radius: 10px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 9px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 7px;
  transition: all 0.15s;
}

.auth-tab.active {
  background: white;
  color: var(--charcoal);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Responsive */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .vendor-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .checkin-layout { grid-template-columns: 1fr; }
  .budget-summary { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .landing-nav { padding: 14px 20px; }
  .nav-links > a, .nav-links > .lang-toggle { display: none; }
  .hero {
    grid-template-columns: 1fr;
    padding: 120px 20px 60px;
    gap: 40px;
  }
  .hero-bg-deco { display: none; }
  .features-section, .pricing-section { padding: 80px 20px; }
  .feature-grid, .pricing-grid, .vendor-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .dashboard-grid-3 { grid-template-columns: 1fr; }
  .app-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "header" "main";
  }
  .sidebar { display: none; }
  .view { padding: 20px; }
  .view-title { font-size: 28px; }
  .pricing-card.featured { transform: none; }
  .floor-plan { padding: 20px; min-height: 420px; }
}
