@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,600&family=Great+Vibes&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap');

/* ── Variáveis ────────────────────────────────────────────── */
:root {
  --cream:       #FDF8F0;
  --cream-dark:  #F5EDDF;
  --blush:       #F2C4CE;
  --rose:        #CE8A9B;
  --wine:        #8B3A52;
  --wine-light:  #A85570;
  --gold:        #C9A84C;
  --gold-light:  #E8D08A;
  --gold-dark:   #8B6914;
  --sage:        #7A9E7E;
  --text-dark:   #2C1A25;
  --text-mid:    #6B4A58;
  --text-light:  #9B7B89;
  --white:       #FFFFFF;
  --shadow:      rgba(44, 26, 37, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  background-color: var(--cream);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.7;
}

/* ── Tipografia ───────────────────────────────────────────── */
h1, h2, h3 { font-family: 'Playfair Display', serif; line-height: 1.3; }
.script { font-family: 'Great Vibes', cursive; }

/* ── Pétalas Animadas ─────────────────────────────────────── */
.petals-wrap {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.petal {
  position: absolute;
  top: -60px;
  border-radius: 150% 0 150% 0;
  opacity: 0;
  animation: petalFall linear infinite;
}

.petal:nth-child(odd)  { border-radius: 0 150% 0 150%; }

@keyframes petalFall {
  0%   { transform: translateY(-60px) rotate(0deg)   translateX(0);   opacity: 0; }
  5%   { opacity: 0.75; }
  85%  { opacity: 0.6; }
  100% { transform: translateY(105vh) rotate(540deg) translateX(40px); opacity: 0; }
}

/* Gera 14 pétalas com posições, tamanhos e durações variadas */
.petal:nth-child(1)  { left:4%;   width:14px; height:18px; background:var(--blush);     animation-duration:9s;  animation-delay:0s;   }
.petal:nth-child(2)  { left:12%;  width:10px; height:13px; background:var(--rose);      animation-duration:11s; animation-delay:1.2s; }
.petal:nth-child(3)  { left:20%;  width:18px; height:22px; background:var(--blush);     animation-duration:8s;  animation-delay:2.5s; }
.petal:nth-child(4)  { left:30%;  width:12px; height:16px; background:var(--gold-light);animation-duration:13s; animation-delay:0.7s; }
.petal:nth-child(5)  { left:40%;  width:16px; height:20px; background:var(--blush);     animation-duration:10s; animation-delay:3.1s; }
.petal:nth-child(6)  { left:52%;  width:9px;  height:12px; background:var(--rose);      animation-duration:12s; animation-delay:1.8s; }
.petal:nth-child(7)  { left:60%;  width:20px; height:24px; background:var(--blush);     animation-duration:7s;  animation-delay:4.0s; }
.petal:nth-child(8)  { left:68%;  width:11px; height:15px; background:var(--gold-light);animation-duration:14s; animation-delay:0.3s; }
.petal:nth-child(9)  { left:74%;  width:15px; height:19px; background:var(--rose);      animation-duration:9.5s;animation-delay:2.9s; }
.petal:nth-child(10) { left:82%;  width:13px; height:17px; background:var(--blush);     animation-duration:11s; animation-delay:1.5s; }
.petal:nth-child(11) { left:88%;  width:8px;  height:11px; background:var(--rose);      animation-duration:15s; animation-delay:3.7s; }
.petal:nth-child(12) { left:7%;   width:17px; height:21px; background:var(--gold-light);animation-duration:10s; animation-delay:5.2s; }
.petal:nth-child(13) { left:47%;  width:12px; height:15px; background:var(--blush);     animation-duration:8.5s;animation-delay:0.9s; }
.petal:nth-child(14) { left:94%;  width:16px; height:20px; background:var(--rose);      animation-duration:12s; animation-delay:4.5s; }

/* ── Ornamentos SVG ───────────────────────────────────────── */
.ornament {
  display: block;
  margin: 0 auto;
  fill: var(--gold);
  opacity: 0.75;
}

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--gold);
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}
.divider-icon { font-size: 1.3rem; }

/* ── Hero / Capa ──────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background:
    radial-gradient(ellipse at 50% 0%,   rgba(242,196,206,0.55) 0%, transparent 60%),
    radial-gradient(ellipse at 0%  100%, rgba(122,158,126,0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 50%, rgba(201,168,76,0.15)  0%, transparent 50%),
    var(--cream);
  z-index: 1;
}

.hero-badge {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  font-style: italic;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 24px;
  animation: fadeInDown 1s ease both;
}

.hero-names {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(4rem, 12vw, 9rem);
  color: var(--wine);
  line-height: 1.1;
  text-shadow: 2px 4px 20px rgba(139,58,82,0.2);
  animation: fadeInUp 1.2s ease both;
}

.hero-ampersand {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--gold);
  display: block;
  margin: -16px 0;
}

.hero-date {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-top: 24px;
  animation: fadeInUp 1.4s ease both;
}

.hero-location {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-light);
  margin-top: 8px;
  animation: fadeInUp 1.5s ease both;
}

/* Corner florals */
.corner-floral {
  position: absolute;
  width: 220px;
  opacity: 0.55;
  pointer-events: none;
}
.corner-floral.tl { top: 0;    left: 0;    transform: rotate(0deg); }
.corner-floral.tr { top: 0;    right: 0;   transform: scaleX(-1); }
.corner-floral.bl { bottom: 0; left: 0;    transform: scaleY(-1); }
.corner-floral.br { bottom: 0; right: 0;   transform: rotate(180deg); }

/* ── Seções ───────────────────────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 60px 24px;
  text-align: center;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--wine);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-mid);
  font-style: italic;
  margin-bottom: 32px;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 16px;
  padding: 36px 40px;
  box-shadow: 0 8px 40px var(--shadow);
  position: relative;
  overflow: hidden;
}

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

/* Stats cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.stat-card {
  background: var(--white);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 4px 20px var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px var(--shadow); }

.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  color: var(--wine);
  font-weight: 700;
}

.stat-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ── Botões ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-decoration: none;
  transition: all .3s ease;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  opacity: 0;
  transition: opacity .3s;
}
.btn:hover::after { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--wine) 0%, var(--wine-light) 100%);
  color: var(--white);
  box-shadow: 0 6px 24px rgba(139,58,82,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(139,58,82,0.45); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%);
  color: var(--white);
  box-shadow: 0 6px 24px rgba(139,105,20,0.35);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(139,105,20,0.45); }

.btn-outline {
  background: transparent;
  color: var(--wine);
  border: 2px solid var(--wine);
}
.btn-outline:hover { background: var(--wine); color: var(--white); }

.btn-sm { padding: 8px 20px; font-size: 0.9rem; }

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Formulários ──────────────────────────────────────────── */
.form-group { margin-bottom: 20px; text-align: left; }

.form-label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-mid);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 8px;
  background: var(--cream);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: var(--text-dark);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

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

.form-input::placeholder { color: var(--text-light); }

/* ── Tabelas ──────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(201,168,76,0.2);
  box-shadow: 0 4px 20px var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}

thead tr {
  background: linear-gradient(135deg, var(--wine) 0%, var(--wine-light) 100%);
  color: var(--white);
}

th {
  padding: 14px 16px;
  text-align: left;
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(201,168,76,0.12);
  font-size: 0.97rem;
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(242,196,206,0.1); }

/* Badges de status */
.badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.badge-success  { background: #d4edda; color: #2d6a4f; }
.badge-warning  { background: #fff3cd; color: #856404; }
.badge-danger   { background: #f8d7da; color: #842029; }
.badge-info     { background: #cce5ff; color: #004085; }

/* ── Seção PIX ────────────────────────────────────────────── */
.pix-box {
  background: linear-gradient(135deg, #f8fdf8 0%, #edfaed 100%);
  border: 2px solid rgba(122,158,126,0.4);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  margin-top: 24px;
}

.qr-code {
  width: 200px;
  height: 200px;
  margin: 16px auto;
  border: 4px solid var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 20px var(--shadow);
}

.pix-code-wrap {
  position: relative;
  margin-top: 16px;
}

.pix-code-text {
  background: var(--white);
  border: 1px solid rgba(122,158,126,0.4);
  border-radius: 8px;
  padding: 12px 48px 12px 16px;
  font-family: monospace;
  font-size: 0.78rem;
  word-break: break-all;
  color: var(--text-mid);
  text-align: left;
}

.copy-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--sage);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background .2s;
}
.copy-btn:hover { background: #5e8063; }

/* ── Invite page ──────────────────────────────────────────── */
.invite-wrap {
  max-width: 680px;
  margin: 40px auto;
  padding: 0 20px 80px;
  position: relative;
  z-index: 1;
}

.invite-card {
  background: var(--white);
  border-radius: 20px;
  padding: 52px 48px;
  box-shadow: 0 16px 60px rgba(44,26,37,0.15);
  border: 1px solid rgba(201,168,76,0.2);
  position: relative;
  overflow: hidden;
}

.invite-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--blush), var(--gold), var(--rose), var(--blush));
  background-size: 200% 100%;
  animation: shimmerBar 4s linear infinite;
}

@keyframes shimmerBar {
  0%   { background-position: 0%   0%; }
  100% { background-position: 200% 0%; }
}

.invite-guest-name {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.4rem, 7vw, 3.8rem);
  color: var(--wine);
  line-height: 1.2;
  margin-bottom: 8px;
}

.invite-couple {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--gold-dark);
  margin: 8px 0;
}

.invite-text {
  font-size: 1.1rem;
  color: var(--text-mid);
  line-height: 1.8;
  margin: 20px 0;
}

.invite-details {
  background: linear-gradient(135deg, rgba(242,196,206,0.2), rgba(201,168,76,0.1));
  border-left: 4px solid var(--gold);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 24px 0;
  text-align: left;
}

.invite-detail-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
  font-size: 1rem;
  color: var(--text-dark);
}
.invite-detail-row:last-child { margin-bottom: 0; }
.invite-detail-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.invite-detail-label { font-weight: 600; color: var(--gold-dark); }

/* ── Navbar admin ─────────────────────────────────────────── */
.admin-nav {
  background: linear-gradient(135deg, var(--wine) 0%, #6B2A3E 100%);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(44,26,37,0.3);
}

.admin-nav-title {
  font-family: 'Great Vibes', cursive;
  font-size: 1.8rem;
  color: var(--white);
}

.admin-nav-actions { display: flex; gap: 12px; align-items: center; }
.admin-nav-user { color: rgba(255,255,255,0.8); font-size: 0.9rem; }

.admin-main { max-width: 1200px; margin: 0 auto; padding: 36px 24px; }

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44,26,37,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}

.modal-box {
  background: var(--white);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 24px 80px rgba(44,26,37,0.3);
  animation: slideUp .3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--wine);
  margin-bottom: 24px;
}

/* ── Animações utilitárias ────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.04); }
}

.animate-fade-in  { animation: fadeIn .6s ease both; }
.animate-fade-up  { animation: fadeInUp .7s ease both; }
.animate-pulse    { animation: pulse 2.5s ease-in-out infinite; }

/* ── Toasts ───────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 22px;
  border-radius: 10px;
  color: var(--white);
  font-size: 0.95rem;
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
  animation: slideUp .3s ease;
  max-width: 340px;
}
.toast-success { background: var(--sage); }
.toast-error   { background: #c0392b; }
.toast-info    { background: var(--gold-dark); }

/* ── Login page ───────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(242,196,206,0.6) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(201,168,76,0.2)  0%, transparent 50%),
    var(--cream);
  padding: 20px;
}

.login-card {
  background: var(--white);
  border-radius: 20px;
  padding: 52px 48px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(44,26,37,0.15);
  text-align: center;
  animation: fadeInUp .7s ease both;
}

.login-title {
  font-family: 'Great Vibes', cursive;
  font-size: 2.8rem;
  color: var(--wine);
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 36px;
}

/* ── Utilitários ──────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.hidden { display: none !important; }
.d-flex { display: flex; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }

/* ── Responsivo ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero-names    { font-size: 4rem; }
  .invite-card   { padding: 32px 24px; }
  .login-card    { padding: 36px 24px; }
  .corner-floral { width: 130px; }
  .stats-grid    { grid-template-columns: repeat(2, 1fr); }
}
