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

:root {
  --gold: #c9993a;
  --gold-light: #f0d080;
  --navy: #1a2744;
  --navy-mid: #243360;
  --white: #ffffff;
  --bg: #f4f1eb;
  --card: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --green: #16a34a;
  --green-light: #dcfce7;
  --red: #dc2626;
  --red-light: #fee2e2;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.10);
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  direction: rtl;
}

/* ===== Guest Page Layout ===== */
.page { max-width: 480px; margin: 0 auto; padding: 0 0 48px; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-mid) 60%, #2d4a8a 100%);
  color: var(--white);
  text-align: center;
  padding: 48px 24px 56px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -24px; left: 0; right: 0;
  height: 48px;
  background: var(--bg);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.hero--small { padding: 32px 24px 48px; }

.star-of-david {
  font-size: 48px;
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 8px rgba(201,153,58,0.6));
  color: var(--gold-light);
}
.event-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.invite-text { font-size: 1rem; opacity: 0.85; letter-spacing: 0.03em; }

/* ===== Cards ===== */
.details-card, .form-card, .success-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 16px 16px 0;
  padding: 24px;
}

/* ===== Details ===== */
.detail-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #f0ece4;
}
.detail-row:last-child { border-bottom: none; }
.detail-icon { font-size: 1.3rem; margin-top: 2px; flex-shrink: 0; }
.detail-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.detail-value { font-size: 1rem; font-weight: 600; color: var(--text); margin-top: 2px; }
.detail-sub { font-size: 0.88rem; color: var(--text-muted); margin-top: 2px; }
.extra-note-row .detail-value { color: var(--navy-mid); font-style: italic; font-weight: 400; }

/* ===== Form ===== */
.form-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold-light);
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}
input[type="text"], input[type="email"], input[type="tel"],
input[type="date"], input[type="time"], input[type="password"], textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  direction: rtl;
  transition: border-color 0.2s;
  background: #fafafa;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus,
input[type="date"]:focus, input[type="time"]:focus, input[type="password"]:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: #fff;
}
textarea { resize: vertical; }

/* ===== Radio Cards ===== */
.radio-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}
.radio-card input { display: none; }
.radio-card:hover { border-color: var(--gold); background: #fdf9f0; }
.radio-card.selected { border-color: var(--gold); background: #fdf5e0; color: var(--navy); }
.radio-icon { font-size: 1.8rem; }

/* ===== Counter ===== */
.counter {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  background: #f8f6f1;
  border-radius: 12px;
  padding: 12px;
}
.counter-btn {
  width: 40px; height: 40px;
  border: none; border-radius: 50%;
  background: var(--navy); color: white;
  font-size: 1.4rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.counter-btn:hover { background: var(--navy-mid); }
.counter-value { font-size: 1.6rem; font-weight: 700; min-width: 32px; text-align: center; }

/* ===== Buttons ===== */
.submit-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--gold) 0%, #b8841e 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 6px;
}
.submit-btn:hover { opacity: 0.92; }
.submit-btn:active { transform: scale(0.98); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.outline-btn {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 12px;
}
.outline-btn:hover { background: var(--gold); color: white; }

/* ===== Success Card (RSVP page) ===== */
.success-card { text-align: center; padding: 36px 24px; }
.success-icon { font-size: 4rem; margin-bottom: 16px; }
.success-card h2 { font-size: 1.4rem; color: var(--navy); margin-bottom: 8px; }
.success-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }

/* ===== Error Banner ===== */
.error-banner {
  position: fixed;
  bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--red);
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  z-index: 999;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(220,38,38,0.3);
}

/* ===== Footer (RSVP page) ===== */
.footer { text-align: center; margin-top: 32px; }
.dashboard-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  opacity: 0.6;
}
.dashboard-link:hover { opacity: 1; }

/* ===== Dashboard ===== */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--navy);
  padding: 20px 28px;
  color: white;
}
.dash-title { font-size: 1.3rem; font-weight: 700; color: var(--gold-light); }
.dash-sub { font-size: 0.85rem; opacity: 0.7; margin-top: 2px; }
.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.icon-btn {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.icon-btn:hover { background: rgba(255,255,255,0.22); }

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 20px 20px 0;
}
@media (max-width: 600px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 18px 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  border-top: 4px solid transparent;
}
.stat-total { border-color: var(--navy-mid); }
.stat-yes { border-color: var(--green); }
.stat-no { border-color: var(--red); }
.stat-guests { border-color: var(--gold); }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--navy); }
.stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; font-weight: 600; }

.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px 0;
  flex-wrap: wrap;
}
.filter-btn {
  background: white;
  border: 1.5px solid #ddd;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn.active { background: var(--navy); border-color: var(--navy); color: white; }
.filter-btn:hover:not(.active) { border-color: var(--navy); }
.search-input {
  margin-right: auto;
  padding: 7px 14px;
  border: 1.5px solid #ddd;
  border-radius: 20px;
  font-size: 0.88rem;
  font-family: inherit;
  width: 200px;
  direction: rtl;
}
.search-input:focus { outline: none; border-color: var(--gold); }

.table-wrap { padding: 16px 20px 32px; overflow-x: auto; }
.rsvp-table { width: 100%; border-collapse: collapse; background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.rsvp-table thead { background: var(--navy); color: white; }
.rsvp-table th { padding: 12px 14px; font-size: 0.85rem; font-weight: 600; text-align: right; white-space: nowrap; }
.rsvp-table td { padding: 12px 14px; font-size: 0.9rem; border-bottom: 1px solid #f0ece4; vertical-align: middle; }
.rsvp-table tr:last-child td { border-bottom: none; }
.rsvp-table tr:hover td { background: #fdf9f0; }
.cell-num { color: var(--text-muted); font-size: 0.8rem; width: 40px; text-align: center; }
.cell-name { font-weight: 600; }
.cell-center { text-align: center; }
.cell-notes { color: var(--text-muted); font-size: 0.85rem; max-width: 180px; }
.cell-time { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 0.82rem; font-weight: 700; }
.badge-yes { background: var(--green-light); color: var(--green); }
.badge-no { background: var(--red-light); color: var(--red); }

.loading, .empty-state { text-align: center; padding: 40px; color: var(--text-muted); font-size: 1rem; }

.delete-btn {
  background: none; border: none; cursor: pointer;
  font-size: 1rem; opacity: 0.35; transition: opacity 0.15s;
  padding: 2px 6px; border-radius: 6px;
}
.delete-btn:hover { opacity: 1; background: var(--red-light); }

/* ===== Landing Page ===== */
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: var(--navy);
  position: sticky; top: 0; z-index: 100;
}
.landing-nav .logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gold-light);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-cta {
  background: var(--gold);
  color: white;
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.88; }

.landing-hero {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-mid) 60%, #2d4a8a 100%);
  color: white;
  text-align: center;
  padding: 80px 24px 100px;
  position: relative;
}
.landing-hero::after {
  content: '';
  position: absolute;
  bottom: -32px; left: 0; right: 0;
  height: 64px;
  background: var(--bg);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.hero-star { font-size: 56px; color: var(--gold-light); margin-bottom: 16px; filter: drop-shadow(0 2px 12px rgba(201,153,58,0.5)); }
.hero-tagline { font-size: 2.4rem; font-weight: 800; color: var(--gold-light); margin-bottom: 14px; line-height: 1.2; }
.hero-sub { font-size: 1.1rem; opacity: 0.85; max-width: 480px; margin: 0 auto 36px; line-height: 1.6; }
.cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold), #b8841e);
  color: white;
  padding: 16px 44px;
  border-radius: 14px;
  font-size: 1.15rem;
  font-weight: 800;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.1s;
  box-shadow: 0 4px 20px rgba(201,153,58,0.4);
}
.cta-btn:hover { opacity: 0.92; transform: translateY(-1px); }

.features-section { padding: 80px 24px 60px; background: var(--bg); }
.section-title { text-align: center; font-size: 1.7rem; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.section-sub { text-align: center; color: var(--text-muted); margin-bottom: 40px; font-size: 1rem; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
}
@media (max-width: 640px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
.feature-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.feature-card:hover { transform: translateY(-3px); }
.feature-icon { font-size: 2.4rem; margin-bottom: 10px; }
.feature-label { font-size: 1rem; font-weight: 700; color: var(--navy); }

.steps-section { padding: 60px 24px; background: white; }
.steps-row {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  max-width: 760px;
  margin: 0 auto;
}
.step-item { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 200px; }
.step-number {
  width: 52px; height: 52px;
  background: var(--navy);
  color: var(--gold-light);
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(26,39,68,0.25);
}
.step-title { font-weight: 700; font-size: 1rem; color: var(--navy); margin-bottom: 6px; }
.step-desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; }

.pricing-section { background: var(--navy); padding: 70px 24px; text-align: center; }
.pricing-section .section-title { color: var(--gold-light); }
.pricing-section .section-sub { color: rgba(255,255,255,0.7); margin-bottom: 36px; }
.pricing-card {
  background: white;
  border-radius: 20px;
  max-width: 360px;
  margin: 0 auto;
  padding: 40px 32px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}
.price-row { margin-bottom: 24px; }
.price-currency { font-size: 1.6rem; font-weight: 700; color: var(--navy); vertical-align: top; margin-top: 10px; display: inline-block; }
.price-amount { font-size: 3.5rem; font-weight: 900; color: var(--navy); line-height: 1; }
.price-period { font-size: 0.9rem; color: var(--text-muted); margin-top: 4px; }
.pricing-features { list-style: none; text-align: right; margin-bottom: 28px; }
.pricing-features li { padding: 8px 0; border-bottom: 1px solid #f0ece4; font-size: 0.95rem; color: var(--text); }
.pricing-features li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.pricing-cta {
  display: block;
  background: linear-gradient(135deg, var(--gold), #b8841e);
  color: white;
  padding: 15px;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s;
}
.pricing-cta:hover { opacity: 0.9; }

.landing-footer { background: #111827; padding: 28px 24px; text-align: center; color: #6b7280; font-size: 0.85rem; }

/* ===== Register Page ===== */
.register-page { max-width: 560px; margin: 0 auto; padding: 32px 16px 64px; }
.register-header { text-align: center; margin-bottom: 32px; }
.register-header h1 { font-size: 1.6rem; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.register-header p { color: var(--text-muted); font-size: .95rem; }

.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 36px;
}
.wizard-step {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  color: #9ca3af;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .95rem;
  transition: all 0.3s;
  position: relative;
  z-index: 1;
  background: white;
}
.wizard-step.active { border-color: var(--navy); background: var(--navy); color: white; }
.wizard-step.done { border-color: var(--gold); background: var(--gold); color: white; }
.wizard-connector { width: 56px; height: 2px; background: #d1d5db; transition: background 0.3s; }
.wizard-connector.done { background: var(--gold); }

.step-panel { display: none; }
.step-panel.active { display: block; }

.event-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 4px;
}
@media (max-width: 460px) { .event-type-grid { grid-template-columns: repeat(2, 1fr); } }
.event-type-card {
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
  user-select: none;
}
.event-type-card:hover { border-color: var(--gold); background: #fdf9f0; }
.event-type-card.selected { border-color: var(--navy); background: #f0f4ff; }
.event-type-card .et-icon { font-size: 1.8rem; margin-bottom: 6px; }
.event-type-card .et-label { font-size: .88rem; font-weight: 700; color: var(--navy); }

.reg-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  margin-bottom: 16px;
}
.reg-card h2 { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--gold-light); }

.btn-row { display: flex; gap: 12px; margin-top: 8px; }
.back-btn {
  flex: 0 0 auto;
  border: 2px solid var(--navy);
  color: var(--navy);
  background: none;
  padding: 13px 22px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.back-btn:hover { background: var(--navy); color: white; }
.next-btn { flex: 1; }

.preview-card {
  background: #f8faff;
  border: 2px solid var(--navy);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}
.preview-card .preview-title { font-size: 1.2rem; font-weight: 800; color: var(--navy); margin-bottom: 14px; }
.preview-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid #e5e7eb; font-size: .92rem; }
.preview-row:last-child { border-bottom: none; }
.preview-lbl { color: var(--text-muted); font-weight: 600; min-width: 80px; }
.preview-val { color: var(--text); font-weight: 600; }

/* ===== Success Page ===== */
.success-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}
.success-page .big-check { font-size: 5rem; margin-bottom: 16px; }
.success-page h1 { font-size: 2rem; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.success-page .sub { color: var(--text-muted); font-size: 1rem; max-width: 400px; line-height: 1.6; margin-bottom: 32px; }
.success-links { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 380px; }
.success-link-btn {
  display: block;
  padding: 15px 20px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s;
}
.success-link-btn.gold { background: linear-gradient(135deg, var(--gold), #b8841e); color: white; }
.success-link-btn.navy { background: var(--navy); color: white; }
.success-link-btn.whatsapp { background: #25D366; color: white; }
.success-link-btn:hover { opacity: 0.88; }
.pending-state { color: var(--text-muted); font-size: 1.1rem; }
.spinner { display: inline-block; width: 24px; height: 24px; border: 3px solid #e5e7eb; border-top-color: var(--navy); border-radius: 50%; animation: spin 0.8s linear infinite; margin-left: 8px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
