/* ═══════════════════════════════════════════════════════════════
   Boda Youssef & Fatima — 24 Octubre 2026
   Diseño tradicional marroquí · Cálido · Íntimo · Mobile-first
   ═══════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Paleta cálida inspirada en la foto de la pedida */
  --ivory:        #FAF3E6;
  --ivory-soft:   #F5EAD4;
  --cream:        #EFDEBF;
  --cream-deep:   #E5CFA6;
  --parchment:    #FBF6EC;

  /* Dorado del anillo */
  --gold:         #B8893C;
  --gold-warm:    #C9A257;
  --gold-light:   #E4C987;
  --gold-pale:    #F1DFB5;
  --gold-deep:    #8F6A27;
  --gradient-gold: linear-gradient(135deg, #C9A257 0%, #E4C987 45%, #B8893C 100%);
  --gradient-gold-soft: linear-gradient(135deg, rgba(201,162,87,0.18) 0%, rgba(228,201,135,0.08) 100%);

  /* Henna — de las manos de Fatima */
  --henna:        #9E3B2A;
  --henna-warm:   #B85542;
  --henna-soft:   #D08A7C;
  --henna-pale:   #EBC9BF;

  /* Sage — serenidad del ramo */
  --sage:         #6B8464;
  --sage-soft:    #9BB395;
  --sage-pale:    #D6E2CF;

  /* Azul marroquí tradicional (zellige) */
  --zellige:      #3F7A7A;
  --zellige-soft: #7BA8A5;

  /* Estados */
  --status-confirmed: #6B8464;
  --status-pending:   #C9A257;
  --status-declined:  #9E3B2A;

  /* Texto */
  --text-primary:   #2B1F16;
  --text-secondary: #5F4A36;
  --text-muted:     #8A7866;
  --text-on-dark:   #FAF3E6;
  --text-on-gold:   #2B1F16;

  /* Superficies */
  --surface:        rgba(255, 252, 245, 0.75);
  --surface-solid:  #FFFCF5;
  --surface-hover:  rgba(255, 252, 245, 0.92);
  --surface-warm:   rgba(245, 234, 212, 0.55);
  --surface-deep:   #FFF8EB;

  /* Bordes */
  --border-soft:  rgba(184, 137, 60, 0.18);
  --border-mid:   rgba(184, 137, 60, 0.32);
  --border-gold:  rgba(184, 137, 60, 0.55);

  /* Glass */
  --glass-blur: blur(22px);

  /* Shadows */
  --shadow-soft:   0 2px 12px rgba(94, 65, 30, 0.08);
  --shadow-mid:    0 8px 28px rgba(94, 65, 30, 0.12);
  --shadow-gold:   0 6px 24px rgba(184, 137, 60, 0.22);
  --shadow-glow:   0 0 40px rgba(228, 201, 135, 0.35);
  --shadow-heavy:  0 16px 48px rgba(94, 65, 30, 0.22);

  /* Tipografía */
  --font-display: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-arabic:  'Noto Naskh Arabic', 'Noto Sans Arabic', 'Amiri', serif;

  /* Espaciado */
  --sp-2xs: 2px;
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-2xl: 48px;
  --sp-3xl: 64px;

  /* Radios */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-full: 9999px;

  /* Transiciones */
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-spring:  cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --t-fast:       180ms var(--ease-out);
  --t-normal:     320ms var(--ease-out);
  --t-slow:       500ms var(--ease-out);
  --t-dramatic:   750ms var(--ease-out);

  /* Layout */
  --header-height: 60px;
  --fab-size: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 16px);
  --safe-top: env(safe-area-inset-top, 0px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--ivory);
  min-height: 100%;
  overflow: hidden;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Fondo global con textura sutil tipo pergamino */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(228, 201, 135, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 80%, rgba(158, 59, 42, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, rgba(250, 243, 230, 1) 0%, rgba(245, 234, 212, 1) 100%);
  z-index: 0;
  pointer-events: none;
}

input, button, select, textarea {
  font-family: inherit;
  font-size: inherit;
  -webkit-appearance: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--gold-warm);
  border-radius: var(--r-full);
  opacity: 0.5;
}

::selection {
  background: var(--gold-pale);
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════
   Patrón zellige SVG — elemento decorativo reutilizable
   ═══════════════════════════════════════════════════════════════ */
.zellige-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: var(--sp-md) 0;
  opacity: 0.55;
}

.zellige-divider .line {
  flex: 0 1 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-warm), transparent);
}

.zellige-divider .star {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--gold-warm);
}

/* ═══════════════════════════════════════════════════════════════
   SCREEN SYSTEM
   ═══════════════════════════════════════════════════════════════ */
.screen {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 600ms var(--ease-out), visibility 0s linear 600ms;
}

.screen.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 600ms var(--ease-out), visibility 0s;
}

/* ═══════════════════════════════════════════════════════════════
   SCREEN: PIN — La bienvenida
   ═══════════════════════════════════════════════════════════════ */
#screen-pin {
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.pin-bg-photo {
  position: absolute;
  inset: 0;
  background: url('../assets/pedida.jpg') center 30% / cover no-repeat;
  opacity: 0.28;
  filter: saturate(0.9) brightness(1.08);
  transform: scale(1.06);
  animation: subtleZoom 24s ease-in-out infinite alternate;
}

@keyframes subtleZoom {
  0%   { transform: scale(1.06); }
  100% { transform: scale(1.14); }
}

.pin-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(250, 243, 230, 0.55) 0%, rgba(250, 243, 230, 0.92) 70%),
    linear-gradient(180deg, rgba(250, 243, 230, 0.7) 0%, rgba(239, 222, 191, 0.95) 100%);
}

/* Marco zellige decorativo */
.pin-frame {
  position: absolute;
  inset: 20px;
  border: 1px solid var(--border-gold);
  border-radius: var(--r-xl);
  pointer-events: none;
  opacity: 0.45;
}

.pin-frame::before,
.pin-frame::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--gold-warm);
}

.pin-frame::before {
  top: -6px; left: -6px;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: var(--r-xl);
}

.pin-frame::after {
  bottom: -6px; right: -6px;
  border-left: none;
  border-top: none;
  border-bottom-right-radius: var(--r-xl);
}

.pin-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--gold-warm);
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 6px var(--gold-light);
  animation: sparkle 5s ease-in-out infinite;
}

.particle:nth-child(1) { left: 15%; top: 20%; animation-delay: 0s; }
.particle:nth-child(2) { left: 80%; top: 15%; animation-delay: 0.7s; }
.particle:nth-child(3) { left: 40%; top: 70%; animation-delay: 1.2s; }
.particle:nth-child(4) { left: 70%; top: 60%; animation-delay: 2s; }
.particle:nth-child(5) { left: 25%; top: 85%; animation-delay: 2.8s; }
.particle:nth-child(6) { left: 60%; top: 35%; animation-delay: 1.5s; }
.particle:nth-child(7) { left: 90%; top: 80%; animation-delay: 3.2s; }
.particle:nth-child(8) { left: 10%; top: 50%; animation-delay: 0.4s; }

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50%      { opacity: 0.8; transform: scale(1.6); }
}

.pin-container {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--sp-xl);
  max-width: 400px;
  width: 100%;
  transition: transform var(--t-dramatic), opacity var(--t-dramatic);
}

.pin-container.pin-success {
  transform: scale(0.94) translateY(-20px);
  opacity: 0;
}

/* Anillo decorativo (imagen) */
.pin-ring-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto var(--sp-md);
  animation: ringFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 4px 16px rgba(184, 137, 60, 0.4));
  object-fit: contain;
  display: block;
  border-radius: 50%;
}

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

.pin-container h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 1px;
  margin-bottom: var(--sp-xs);
  line-height: 1.25;
}

.pin-ampersand {
  color: var(--gold-warm);
  font-style: italic;
  font-weight: 400;
}

.pin-names-arabic {
  display: block;
  font-family: var(--font-arabic);
  font-size: 1.2rem;
  color: var(--gold-deep);
  margin-top: var(--sp-xs);
  direction: rtl;
  opacity: 0.85;
}

.pin-date {
  font-size: 0.75rem;
  color: var(--gold-deep);
  letter-spacing: 5px;
  font-weight: 500;
  text-transform: uppercase;
  margin: var(--sp-md) 0 var(--sp-2xl);
}

.pin-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-lg);
  font-weight: 400;
}

.pin-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--text-secondary);
  opacity: 0.75;
  margin-top: var(--sp-2xl);
  line-height: 1.7;
  padding: 0 var(--sp-md);
}

[dir="rtl"] .pin-quote {
  font-family: var(--font-arabic);
  font-style: normal;
  font-size: 0.95rem;
}

/* PIN Inputs */
.pin-inputs {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: var(--sp-lg);
}

.pin-digit {
  width: 54px;
  height: 64px;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  text-align: center;
  outline: none;
  transition: all var(--t-fast);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-soft);
  -moz-appearance: textfield;
}

.pin-digit::-webkit-outer-spin-button,
.pin-digit::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pin-digit:focus {
  border-color: var(--gold-warm);
  box-shadow: 0 0 0 4px rgba(201, 162, 87, 0.15), var(--shadow-gold);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.pin-digit.filled {
  border-color: var(--gold-warm);
  color: var(--gold-deep);
  background: var(--gold-pale);
}

.pin-digit.success {
  border-color: var(--status-confirmed);
  background: var(--sage-pale);
  color: var(--sage);
  animation: pinSuccessPop 0.35s var(--ease-bounce);
}

@keyframes pinSuccessPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.pin-digit.error {
  border-color: var(--status-declined);
  background: var(--henna-pale);
}

.pin-error {
  color: var(--status-declined);
  font-size: 0.82rem;
  transition: opacity var(--t-fast);
  height: 20px;
  font-weight: 500;
}

.pin-error.hidden { opacity: 0; }

.shake { animation: shake 0.5s ease; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15%, 55%, 85% { transform: translateX(-6px); }
  35%, 65% { transform: translateX(6px); }
}

/* ═══════════════════════════════════════════════════════════════
   SCREEN: SELECCIÓN DE USUARIO
   ═══════════════════════════════════════════════════════════════ */
#screen-user {
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.user-container {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--sp-xl);
  width: 100%;
  max-width: 420px;
}

.user-greeting {
  font-size: 0.75rem;
  color: var(--gold-deep);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: var(--sp-sm);
  font-weight: 500;
}

.user-container h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--sp-xs);
  line-height: 1.4;
}

.user-container h2 + .user-subtitle-ar {
  font-family: var(--font-arabic);
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-2xl);
  direction: rtl;
}

.user-cards {
  display: flex;
  gap: var(--sp-md);
  justify-content: center;
  margin-top: var(--sp-xl);
}

.user-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-xl) var(--sp-md);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: all var(--t-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.user-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--gradient-gold);
  border-radius: 0 0 var(--r-full) var(--r-full);
  opacity: 0.6;
  transition: opacity var(--t-normal);
}

.user-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--gold-pale) 0%, transparent 60%);
  opacity: 0.5;
  pointer-events: none;
}

.user-card:active {
  transform: scale(0.97);
}

.user-card.selected {
  border-color: var(--gold-warm);
  background: var(--surface-hover);
  box-shadow: var(--shadow-gold), var(--shadow-glow);
  transform: translateY(-2px);
}

.user-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-mid);
  overflow: hidden;
}

.user-card[data-user="youssef"] .user-avatar {
  background: linear-gradient(135deg, var(--sage) 0%, var(--sage-soft) 100%);
}

.user-card[data-user="fatima"] .user-avatar {
  background: linear-gradient(135deg, var(--henna) 0%, var(--henna-soft) 100%);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-avatar::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-warm);
  opacity: 0.45;
}

.user-name-latin {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}

.user-name-arabic {
  font-family: var(--font-arabic);
  font-size: 1.05rem;
  color: var(--gold-deep);
  font-weight: 500;
  direction: rtl;
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════
   SCREEN: DASHBOARD
   ═══════════════════════════════════════════════════════════════ */
#screen-dashboard {
  background: transparent;
}

/* ─── Header ────────────────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-sm) var(--sp-md);
  padding-top: calc(var(--sp-sm) + var(--safe-top));
  height: calc(var(--header-height) + var(--safe-top));
  background: rgba(250, 243, 230, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-soft);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  min-width: 0;
}

.header-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.header-date {
  font-size: 0.58rem;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  font-weight: 500;
}

.header-center {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  flex: 1;
  justify-content: center;
}

.header-user-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 4px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.header-user-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ivory);
  flex-shrink: 0;
}

.header-user-dot svg { width: 14px; height: 14px; }

.header-user-dot.user-youssef {
  background: linear-gradient(135deg, var(--sage), var(--sage-soft));
}

.header-user-dot.user-fatima {
  background: linear-gradient(135deg, var(--henna), var(--henna-soft));
}

.header-user-name {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.header-change-btn {
  font-size: 0.65rem;
  color: var(--gold-deep);
  padding: 3px 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-full);
  transition: all var(--t-fast);
  margin-left: var(--sp-xs);
  font-weight: 500;
}

.header-change-btn:active {
  background: var(--gold-pale);
  transform: scale(0.95);
}

.lang-toggle {
  font-size: 0.78rem;
  color: var(--gold-deep);
  padding: 5px 14px;
  border: 1px solid var(--border-mid);
  border-radius: var(--r-full);
  transition: all var(--t-fast);
  background: var(--surface);
  font-weight: 500;
  font-family: var(--font-body);
}

[dir="rtl"] .lang-toggle { font-family: var(--font-body); }
html[dir="ltr"] .lang-toggle { font-family: var(--font-arabic); font-size: 0.85rem; }

.lang-toggle:active {
  background: var(--gold-pale);
  transform: scale(0.95);
}

/* ─── Dashboard Content ─────────────────────────────────────── */
.dashboard-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--sp-md);
  padding-bottom: calc(var(--fab-size) + var(--sp-3xl) + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
  position: relative;
  z-index: 1;
}

/* ─── Welcome Banner ────────────────────────────────────────── */
.welcome-banner {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--sp-md);
  min-height: 170px;
  box-shadow: var(--shadow-mid);
  border: 1px solid var(--border-soft);
}

.welcome-bg {
  position: absolute;
  inset: 0;
  background: url('../assets/pedida.jpg') center 35% / cover no-repeat;
  filter: saturate(1.05) brightness(0.95);
}

.welcome-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg,
      rgba(250, 243, 230, 0.12) 0%,
      rgba(43, 31, 22, 0.55) 60%,
      rgba(43, 31, 22, 0.78) 100%);
}

.welcome-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--sp-lg);
  gap: 4px;
}

.welcome-greeting {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--gold-light);
  margin-bottom: 2px;
  letter-spacing: 0.3px;
}

[dir="rtl"] .welcome-greeting {
  font-family: var(--font-arabic);
  font-style: normal;
  font-size: 1rem;
}

.welcome-names {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ivory);
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.welcome-names .ampersand {
  color: var(--gold-light);
  font-style: italic;
  margin: 0 4px;
}

.welcome-darija {
  font-family: var(--font-arabic);
  font-size: 0.9rem;
  color: var(--gold-pale);
  direction: rtl;
  opacity: 0.9;
}

.welcome-countdown {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-top: var(--sp-sm);
  padding: 6px 14px;
  background: rgba(201, 162, 87, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(228, 201, 135, 0.45);
  border-radius: var(--r-full);
  align-self: flex-start;
  font-size: 0.72rem;
  color: var(--gold-pale);
  letter-spacing: 0.5px;
}

.countdown-number {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ivory);
}

/* ─── Stats Grid ────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--sp-md) var(--sp-sm);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  transition: all var(--t-fast);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  background: var(--gradient-gold);
  opacity: 0.35;
  border-radius: var(--r-full) var(--r-full) 0 0;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-sm);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.stat-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.stat-icon svg { width: 22px; height: 22px; color: var(--ivory); }

.stat-icon.icon-total { background: transparent; }
.stat-icon.icon-men { background: transparent; }
.stat-icon.icon-women { background: transparent; }
.stat-icon.icon-tables { background: transparent; }

.stat-number {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: var(--sp-xs);
  text-align: center;
  font-weight: 500;
}

/* Split stats */
.stats-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
}

.stat-card-split {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-md);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-soft);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.split-indicator {
  width: 4px;
  height: 32px;
  border-radius: var(--r-full);
  flex-shrink: 0;
}

.stat-card-split.youssef .split-indicator { background: linear-gradient(180deg, var(--sage), var(--sage-soft)); }
.stat-card-split.fatima .split-indicator { background: linear-gradient(180deg, var(--henna), var(--henna-soft)); }

.stat-card-split .stat-number {
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-primary);
}

.stat-card-split .stat-label {
  font-size: 0.62rem;
  margin-top: 3px;
  color: var(--text-muted);
}

/* ─── Verification Progress ─────────────────────────────────── */
.verification-bar {
  margin-bottom: var(--sp-md);
  padding: var(--sp-md);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-soft);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.verification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-sm);
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.verification-header span:last-child {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--gold-deep);
}

.progress-bar {
  display: flex;
  height: 7px;
  border-radius: var(--r-full);
  background: var(--cream);
  overflow: hidden;
  margin-bottom: var(--sp-sm);
  border: 1px solid var(--border-soft);
}

.progress-confirmed {
  background: linear-gradient(90deg, var(--status-confirmed), var(--sage-soft));
  height: 100%;
  transition: width var(--t-dramatic);
  position: relative;
}

.progress-pending {
  background: linear-gradient(90deg, var(--status-pending), var(--gold-light));
  height: 100%;
  transition: width var(--t-dramatic);
  opacity: 0.75;
}

.progress-declined {
  background: linear-gradient(90deg, var(--henna-soft), var(--status-declined));
  height: 100%;
  transition: width var(--t-dramatic);
  opacity: 0.7;
}

.verification-legend {
  display: flex;
  gap: var(--sp-md);
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.legend-item.confirmed .legend-dot { background: var(--status-confirmed); box-shadow: 0 0 4px var(--sage-soft); }
.legend-item.pending .legend-dot { background: var(--status-pending); box-shadow: 0 0 4px var(--gold-light); }
.legend-item.declined .legend-dot { background: var(--status-declined); }

/* ─── Filters ───────────────────────────────────────────────── */
.filters-section {
  margin-bottom: var(--sp-md);
}

.filters-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: var(--sp-sm);
  margin-bottom: var(--sp-sm);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filters-scroll::-webkit-scrollbar { display: none; }

.filter-pill {
  flex-shrink: 0;
  padding: 7px 15px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-full);
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--surface);
  transition: all var(--t-fast);
  white-space: nowrap;
  letter-spacing: 0.3px;
  font-weight: 500;
}

.filter-pill:active { transform: scale(0.95); }

.filter-pill.active {
  background: var(--gradient-gold);
  border-color: var(--gold-warm);
  color: var(--text-on-gold);
  box-shadow: var(--shadow-gold);
  font-weight: 600;
}

.search-bar {
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 11px var(--sp-md);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 0.86rem;
  outline: none;
  transition: all var(--t-fast);
  box-shadow: var(--shadow-soft);
}

.search-bar input:focus {
  border-color: var(--gold-warm);
  box-shadow: 0 0 0 3px rgba(201, 162, 87, 0.15);
}

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

.search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  pointer-events: none;
  color: var(--gold-deep);
}

[dir="rtl"] .search-icon { left: auto; right: 14px; }
[dir="rtl"] .search-bar input { padding-left: var(--sp-md); padding-right: 40px; }

/* ─── Guest Cards ───────────────────────────────────────────── */
.guest-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.guest-card {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--t-fast);
  box-shadow: var(--shadow-soft);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  -webkit-tap-highlight-color: transparent;
}

.guest-card:active {
  transform: scale(0.98);
  background: var(--surface-hover);
  box-shadow: var(--shadow-mid);
}

.guest-card-status {
  width: 4px;
  flex-shrink: 0;
  transition: background var(--t-normal);
}

.guest-card-status.status-pending { background: var(--status-pending); }
.guest-card-status.status-confirmed { background: var(--status-confirmed); }
.guest-card-status.status-declined { background: var(--status-declined); }

.guest-card-content {
  flex: 1;
  padding: 12px 14px;
  min-width: 0;
}

.guest-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-sm);
}

.guest-card-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.guest-name-primary {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}

.guest-family-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.guest-family-icons svg { width: 12px; height: 12px; }
.guest-family-icons .gi-male { color: var(--sage); }
.guest-family-icons .gi-female { color: var(--henna); }
.guest-family-icons .gi-separator { opacity: 0.5; }

.guest-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.62rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0;
}

.badge-youssef {
  background: var(--sage-pale);
  color: var(--sage);
  border: 1px solid rgba(107, 132, 100, 0.35);
}

.badge-fatima {
  background: var(--henna-pale);
  color: var(--henna);
  border: 1px solid rgba(158, 59, 42, 0.3);
}

.verification-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transition: all var(--t-fast);
}

.verification-indicator.v-pending { background: var(--status-pending); box-shadow: 0 0 5px var(--gold-light); }
.verification-indicator.v-confirmed { background: var(--status-confirmed); box-shadow: 0 0 6px var(--sage-soft); }
.verification-indicator.v-declined { background: var(--status-declined); }

.guest-card-meta {
  display: flex;
  gap: var(--sp-sm);
  margin-top: 6px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.guest-people-count {
  font-weight: 500;
  color: var(--gold-deep);
}

/* ─── Empty State ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--sp-3xl) var(--sp-lg);
  color: var(--text-muted);
}

.empty-state.hidden { display: none; }

.empty-state::before {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--gradient-gold);
  margin: 0 auto var(--sp-lg);
  border-radius: var(--r-full);
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-xs);
  font-family: var(--font-display);
  font-style: italic;
}

.empty-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-style: normal;
}

/* ─── FAB ───────────────────────────────────────────────────── */
.fab {
  position: fixed;
  bottom: calc(var(--sp-lg) + var(--safe-bottom));
  right: var(--sp-lg);
  width: var(--fab-size);
  height: var(--fab-size);
  border-radius: 50%;
  background: var(--gradient-gold);
  color: var(--text-on-gold);
  border: none;
  box-shadow: var(--shadow-gold), var(--shadow-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  transition: all var(--t-fast);
}

[dir="rtl"] .fab { right: auto; left: var(--sp-lg); }

.fab:active {
  transform: scale(0.9);
  box-shadow: 0 2px 12px rgba(184, 137, 60, 0.3);
}

.fab svg {
  width: 26px;
  height: 26px;
  stroke: var(--text-on-gold);
  stroke-width: 2;
}

.fab-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--gold-warm);
  animation: fabPulse 2.5s ease-out infinite;
  pointer-events: none;
}

@keyframes fabPulse {
  0%   { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-normal);
}

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

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(43, 31, 22, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 92vh;
  background: var(--surface-deep);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  border-top: 2px solid var(--gold-warm);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform var(--t-normal);
  box-shadow: var(--shadow-heavy);
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: var(--border-mid);
  border-radius: var(--r-full);
  z-index: 2;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-xl) var(--sp-lg) var(--sp-md);
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-primary);
}

[dir="rtl"] .modal-header h2 { font-family: var(--font-arabic); }

.modal-close {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  background: var(--cream);
  transition: all var(--t-fast);
}

.modal-close svg { width: 16px; height: 16px; stroke-width: 2.5; }

.modal-close:active {
  background: var(--cream-deep);
  transform: scale(0.9);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-lg);
  -webkit-overflow-scrolling: touch;
}

.modal-footer {
  display: flex;
  gap: var(--sp-sm);
  padding: var(--sp-md) var(--sp-lg) calc(var(--sp-lg) + var(--safe-bottom));
  border-top: 1px solid var(--border-soft);
  flex-shrink: 0;
  background: var(--cream);
}

.modal-footer .btn { flex: 1; }

/* ─── Forms ─────────────────────────────────────────────────── */
.form-section {
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: var(--sp-md);
  margin-bottom: var(--sp-md);
  background: var(--parchment);
}

.form-section legend {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--gold-deep);
  padding: 0 var(--sp-sm);
  letter-spacing: 0.3px;
}

[dir="rtl"] .form-section legend { font-family: var(--font-arabic); font-size: 0.95rem; }

.form-group {
  position: relative;
  margin-top: var(--sp-md);
}

.form-group input {
  width: 100%;
  padding: var(--sp-md);
  padding-top: 22px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  background: var(--surface-solid);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--t-fast);
}

.form-group input:focus {
  border-color: var(--gold-warm);
  box-shadow: 0 0 0 3px rgba(201, 162, 87, 0.15);
}

.form-group label {
  position: absolute;
  top: 15px;
  left: var(--sp-md);
  font-size: 0.82rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: all var(--t-fast);
  transform-origin: left;
}

[dir="rtl"] .form-group label {
  left: auto;
  right: var(--sp-md);
  transform-origin: right;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
  top: 5px;
  font-size: 0.58rem;
  color: var(--gold-deep);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 600;
}

/* Gender Selector */
.gender-selector {
  display: flex;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-xs);
}

.gender-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 10px var(--sp-md);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r-sm);
  font-size: 0.86rem;
  color: var(--text-secondary);
  background: var(--surface-solid);
  transition: all var(--t-fast);
  font-weight: 500;
}

.gender-btn:active { transform: scale(0.96); }

.gender-btn.active {
  border-color: var(--gold-warm);
  background: var(--gold-pale);
  color: var(--gold-deep);
  box-shadow: var(--shadow-soft);
}

.gender-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ivory);
  flex-shrink: 0;
}

.gender-icon svg { width: 16px; height: 16px; }

.gender-btn[data-gender="male"] .gender-icon {
  background: linear-gradient(135deg, var(--sage), var(--sage-soft));
}

.gender-btn[data-gender="female"] .gender-icon {
  background: linear-gradient(135deg, var(--henna), var(--henna-soft));
}

.gender-btn.mini {
  padding: var(--sp-xs);
  width: 40px;
  height: 40px;
  gap: 0;
}

.gender-btn.mini .gender-icon { width: 22px; height: 22px; }
.gender-btn.mini .gender-icon svg { width: 12px; height: 12px; }

/* Toggle Switches */
.toggle-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-sm) var(--sp-xs);
  margin-bottom: var(--sp-xs);
  background: var(--surface);
  border-radius: var(--r-sm);
  border: 1px solid var(--border-soft);
  padding: 10px 14px;
}

.toggle-label {
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 500;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-full);
  transition: all var(--t-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background: var(--surface-solid);
  border-radius: 50%;
  transition: all var(--t-fast);
  box-shadow: var(--shadow-soft);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--gradient-gold);
  border-color: var(--gold-warm);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: var(--ivory);
}

/* Children */
.child-row { margin-bottom: var(--sp-sm); }

.child-row-content {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.child-gender-selector {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.child-name-group {
  flex: 1;
  margin-top: 0 !important;
}

.child-name-group input {
  padding: 10px var(--sp-md) !important;
  padding-top: 10px !important;
  font-size: 0.88rem !important;
}

.btn-remove-child {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--t-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove-child svg { width: 14px; height: 14px; }

.btn-remove-child:active {
  background: var(--henna-pale);
  color: var(--status-declined);
}

.btn-add-child {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  width: 100%;
  padding: 10px var(--sp-md);
  border: 1.5px dashed var(--border-mid);
  border-radius: var(--r-sm);
  color: var(--gold-deep);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all var(--t-fast);
  background: transparent;
}

.btn-add-child svg { width: 16px; height: 16px; }

.btn-add-child:active {
  border-color: var(--gold-warm);
  background: var(--gold-pale);
  color: var(--text-on-gold);
}

/* Autocomplete */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--surface-solid);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  margin-top: 4px;
  max-height: 180px;
  overflow-y: auto;
  box-shadow: var(--shadow-heavy);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all var(--t-fast);
}

.autocomplete-dropdown.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.autocomplete-item {
  padding: 10px var(--sp-md);
  font-size: 0.86rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--t-fast);
  border-bottom: 1px solid var(--border-soft);
}

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

.autocomplete-item:active {
  background: var(--gold-pale);
  color: var(--gold-deep);
}

/* Buttons */
.btn {
  padding: 13px var(--sp-lg);
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--t-fast);
  border: none;
  cursor: pointer;
  text-align: center;
  letter-spacing: 0.3px;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--gradient-gold);
  color: var(--text-on-gold);
  box-shadow: var(--shadow-gold);
}

.btn-primary:active {
  box-shadow: var(--shadow-soft);
}

.btn-secondary {
  background: var(--surface-solid);
  border: 1px solid var(--border-mid);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--henna-pale);
  border: 1px solid rgba(158, 59, 42, 0.3);
  color: var(--status-declined);
}

.form-actions {
  display: flex;
  gap: var(--sp-sm);
  margin-top: var(--sp-xl);
}

.form-actions .btn { flex: 1; }

/* ─── Detail Modal ──────────────────────────────────────────── */
.detail-section-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--gold-deep);
  margin-top: var(--sp-lg);
  margin-bottom: var(--sp-sm);
  padding-bottom: var(--sp-xs);
  border-bottom: 1px solid var(--border-soft);
  font-weight: 500;
  letter-spacing: 0.3px;
}

[dir="rtl"] .detail-section-title { font-family: var(--font-arabic); }

.detail-person {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  background: var(--parchment);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-sm);
  box-shadow: var(--shadow-soft);
}

.detail-person-header {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  flex: 1;
  min-width: 0;
}

.detail-person-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ivory);
  flex-shrink: 0;
  box-shadow: var(--shadow-soft);
}

.detail-person-icon svg { width: 22px; height: 22px; }

.detail-person-icon.icon-male {
  background: linear-gradient(135deg, var(--sage), var(--sage-soft));
}

.detail-person-icon.icon-female {
  background: linear-gradient(135deg, var(--henna), var(--henna-soft));
}

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

.detail-person-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-primary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-person-label {
  font-size: 0.68rem;
  color: var(--gold-deep);
  display: block;
  margin-top: 2px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.detail-verification {
  display: flex;
  gap: 4px;
}

.verification-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid transparent;
  background: var(--surface-solid);
  transition: all var(--t-fast);
  opacity: 0.45;
}

.verification-btn svg { width: 16px; height: 16px; stroke-width: 2.5; }

.verification-btn:active { transform: scale(0.88); }

.verification-btn[data-status="pending"] { color: var(--status-pending); }
.verification-btn[data-status="confirmed"] { color: var(--status-confirmed); }
.verification-btn[data-status="declined"] { color: var(--status-declined); }

.verification-btn.active {
  opacity: 1;
  border-color: currentColor;
  background: var(--ivory);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.04), var(--shadow-soft);
}

.verification-btn.active[data-status="confirmed"] {
  background: var(--sage-pale);
  animation: confirmCelebrate 0.5s var(--ease-bounce);
}

.verification-btn.active[data-status="pending"] { background: var(--gold-pale); }
.verification-btn.active[data-status="declined"] { background: var(--henna-pale); }

@keyframes confirmCelebrate {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.25) rotate(-8deg); }
  60%  { transform: scale(0.94) rotate(4deg); }
  100% { transform: scale(1) rotate(0); }
}

.detail-meta {
  margin-top: var(--sp-lg);
  padding-top: var(--sp-md);
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.detail-meta-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.detail-meta-label { color: var(--text-muted); font-weight: 500; }

.detail-meta-value {
  color: var(--text-primary);
  font-weight: 600;
}

.detail-meta-value.badge {
  font-size: 0.68rem;
  padding: 3px 10px;
  border-radius: var(--r-full);
  width: auto;
  height: auto;
}

/* ─── Toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(var(--fab-size) + var(--sp-2xl) + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  z-index: 200;
  padding: 11px var(--sp-xl);
  background: var(--text-primary);
  color: var(--ivory);
  border: 1px solid var(--gold-warm);
  border-radius: var(--r-full);
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: var(--shadow-heavy);
  opacity: 0;
  transition: all var(--t-normal);
  white-space: nowrap;
  max-width: 90vw;
}

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

.toast.hidden { display: none; }

/* ─── Animations ────────────────────────────────────────────── */
.fade-in-up {
  animation: fadeInUp 0.5s var(--ease-out) both;
}

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

.fade-out {
  animation: fadeOut 0.25s var(--ease-out) forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(-8px);
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
  }
}

.stagger-1 { animation-delay: 40ms; }
.stagger-2 { animation-delay: 80ms; }
.stagger-3 { animation-delay: 120ms; }
.stagger-4 { animation-delay: 160ms; }
.stagger-5 { animation-delay: 200ms; }
.stagger-6 { animation-delay: 240ms; }

/* ─── Utility ───────────────────────────────────────────────── */
.hidden { display: none !important; }
.modal-open { overflow: hidden; }

/* ─── RTL ───────────────────────────────────────────────────── */
[dir="rtl"] body { font-family: var(--font-arabic); }
[dir="rtl"] h1, [dir="rtl"] h2,
[dir="rtl"] .header-title,
[dir="rtl"] .pin-container h1,
[dir="rtl"] .welcome-names,
[dir="rtl"] .modal-header h2 { font-family: var(--font-arabic); }
[dir="rtl"] .guest-card:active { transform: scale(0.98); }
[dir="rtl"] .split-indicator { order: 1; }

/* ─── Desktop ───────────────────────────────────────────────── */
@media (min-width: 600px) {
  .dashboard-content { max-width: 520px; margin: 0 auto; }
  .modal-content { max-width: 520px; margin: 0 auto; }
}

/* ═══════════════════════════════════════════════════════════════
   FATIMA WELCOME OVERLAY
   ═══════════════════════════════════════════════════════════════ */
.fatima-welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 25, 18, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fatimaOverlayIn 0.6s ease-out;
}

.fatima-welcome-overlay.hidden {
  display: none !important;
}

.fatima-welcome-overlay.fade-out {
  animation: fatimaOverlayOut 0.8s ease-in forwards;
}

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

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

.fatima-welcome-card {
  text-align: center;
  direction: rtl;
  padding: var(--sp-3xl) var(--sp-2xl);
  max-width: 340px;
  width: 90%;
  background: linear-gradient(145deg, rgba(250, 243, 230, 0.95), rgba(240, 228, 210, 0.92));
  border-radius: var(--r-2xl);
  box-shadow:
    0 0 60px rgba(184, 137, 60, 0.25),
    0 20px 60px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  border: 1.5px solid rgba(201, 162, 87, 0.35);
  position: relative;
  overflow: hidden;
  animation: fatimaCardIn 0.7s var(--ease-bounce) 0.2s both;
}

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

.fatima-welcome-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(201, 162, 87, 0.12) 0%, transparent 55%);
  pointer-events: none;
  animation: fatimaGlow 3s ease-in-out infinite;
}

@keyframes fatimaGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.1); }
}

.fatima-welcome-bismillah {
  font-family: var(--font-arabic);
  font-size: 1rem;
  color: var(--gold-deep);
  opacity: 0.7;
  margin-bottom: var(--sp-lg);
  letter-spacing: 1px;
  position: relative;
}

.fatima-welcome-title {
  font-family: var(--font-arabic);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--sp-md);
  line-height: 1.6;
  position: relative;
}

.fatima-welcome-dua {
  font-family: var(--font-arabic);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--gold-warm);
  margin-bottom: var(--sp-sm);
  line-height: 1.8;
  position: relative;
}

.fatima-welcome-subtitle {
  font-family: var(--font-arabic);
  font-size: 0.95rem;
  color: var(--henna);
  opacity: 0.85;
  line-height: 1.6;
  position: relative;
}

/* ═══════════════════════════════════════════════════════════════
   PWA INSTALL BANNER
   ═══════════════════════════════════════════════════════════════ */
.pwa-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  padding: var(--sp-md);
  padding-bottom: calc(var(--sp-md) + env(safe-area-inset-bottom, 0px));
  animation: pwaBannerSlideUp 0.5s var(--ease-bounce) both;
}

.pwa-banner.hidden { display: none !important; }

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

.pwa-banner.pwa-fade-out {
  animation: pwaBannerSlideDown 0.4s ease-in forwards;
}

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

.pwa-banner-card {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-md) var(--sp-lg);
  background: linear-gradient(145deg, rgba(250, 243, 230, 0.97), rgba(240, 228, 210, 0.95));
  border-radius: var(--r-xl);
  border: 1px solid rgba(201, 162, 87, 0.3);
  box-shadow:
    0 -4px 30px rgba(0, 0, 0, 0.08),
    0 2px 10px rgba(184, 137, 60, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-width: 480px;
  margin: 0 auto;
}

.pwa-banner-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.pwa-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pwa-banner-text strong {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.pwa-banner-text span {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.pwa-banner-text em {
  font-style: normal;
  font-weight: 600;
  color: var(--gold-deep);
}

.pwa-banner-btn {
  flex-shrink: 0;
  padding: 8px 18px;
  background: var(--gradient-gold);
  color: var(--text-on-gold);
  border: none;
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all var(--t-fast);
  box-shadow: var(--shadow-soft);
}

.pwa-banner-btn:active {
  transform: scale(0.95);
}

.pwa-banner-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--t-fast);
}

.pwa-banner-close:active {
  background: var(--surface-hover);
}

.pwa-share-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  color: var(--gold-deep);
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ═══════════════════════════════════════════════════════════════
   PDF EXPORT BUTTON & LOADER
   ═══════════════════════════════════════════════════════════════ */
.header-pdf-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  color: var(--gold-deep);
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
  margin-left: 6px;
}

.header-pdf-btn svg {
  width: 14px;
  height: 14px;
}

.header-pdf-btn:active {
  transform: scale(0.9);
  background: rgba(184, 137, 60, 0.1);
}

/* PDF Loader Overlay */
.pdf-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(58, 52, 42, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.pdf-loader-overlay.hidden { display: none !important; }

.pdf-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-xl) var(--sp-xxl);
  background: var(--surface-card);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
}

.pdf-loader-card p {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.pdf-loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-soft);
  border-top-color: var(--gold-deep);
  border-radius: 50%;
  animation: pdfSpin 0.8s linear infinite;
}

@keyframes pdfSpin {
  to { transform: rotate(360deg); }
}
