:root {
  /* Paleta inspirada no save the date: papel aquarelado, dourado e céu. */
  --cream: #f6eddc;
  --paper: #fffaf0;
  --ink: #5b4631;
  --muted: #9b8468;
  --gold: #b08a57;
  --gold-dark: #8c6a3f;
  --gold-soft: rgba(176, 138, 87, 0.14);
  --sky: #a9c4de;
  --leaf: #7f8f62;
  --line: #e8d9bf;
  --danger: #a8543b;
  --ok: #6d7f4f;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(120, 90, 50, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse at 10% 0%, rgba(169, 196, 222, 0.28), transparent 40%),
    radial-gradient(ellipse at 95% 10%, rgba(169, 196, 222, 0.20), transparent 35%),
    var(--cream);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

[hidden] { display: none !important; }

h1, h2, h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; margin: 0; }

.muted { color: var(--muted); }
.link { color: var(--gold-dark); font-weight: 500; }

.demo-banner {
  background: #fff4d6;
  color: #6b5720;
  text-align: center;
  font-size: 0.85rem;
  padding: 8px 16px;
}

/* Navegação */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 14px 16px;
  background: rgba(246, 237, 220, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.nav a:hover { color: var(--gold-dark); }

/* Hero */
.hero {
  min-height: 88vh;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  padding: 56px 24px;
}
.hero-text { text-align: center; }
.hero-art { margin: 0; }
.hero-art img {
  display: block;
  width: 100%;
  max-width: 440px;
  height: auto;
  margin: 0 auto;
  border-radius: 6px;
  box-shadow: 0 24px 50px rgba(120, 90, 50, 0.22);
  transform: rotate(1.5deg);
}
.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.78rem;
  color: var(--gold-dark);
  margin: 0 0 12px;
}
.hero-names {
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: clamp(3.2rem, 9vw, 6.2rem);
  line-height: 1.1;
  color: var(--gold-dark);
}
.hero-names .amp { color: var(--gold); font-size: 0.8em; }
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 22px auto;
  color: var(--gold);
}
.divider::before, .divider::after {
  content: "";
  width: 90px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}
.hero-date {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 28px;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 36px;
}
.countdown div {
  min-width: 72px;
  padding: 12px 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.countdown span {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  line-height: 1.1;
  color: var(--gold-dark);
}
.countdown small {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* Botões */
.btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 30px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { background: var(--gold-dark); }
.btn-ghost { background: transparent; color: var(--gold-dark); border-color: var(--gold); }
.btn-ghost:hover { background: var(--gold); color: #fff; }
.btn-block { width: 100%; }

/* Seções */
.section {
  max-width: 980px;
  margin: 0 auto;
  padding: 80px 16px;
  text-align: center;
}
.section-title {
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  color: var(--gold-dark);
  margin-bottom: 12px;
}
.section-sub { color: var(--muted); max-width: 560px; margin: 0 auto 36px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 36px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
}
.card h3 {
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 10px;
}
.card p { margin: 4px 0; }

/* Formulário */
.section-rsvp { max-width: 640px; }
.rsvp-form, .rsvp-done, .login-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px;
  text-align: left;
}
.field { margin-bottom: 20px; border: 0; padding: 0; }
.field label, .field legend {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

input[type="text"], input[type="tel"], input[type="email"], input[type="password"],
input[type="search"], select, textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
textarea { resize: vertical; }

.choice { display: grid; gap: 10px; }
.choice-opt {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 400 !important;
  font-size: 0.95rem !important;
}
.choice-opt:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.choice-opt input { accent-color: var(--gold); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { min-height: 1.4em; margin: 14px 0 0; font-size: 0.9rem; text-align: center; }
.form-status.error { color: var(--danger); }

.rsvp-done { text-align: center; }
.rsvp-done h3 { font-size: 2rem; margin: 8px 0; }
.done-icon { font-size: 2.4rem; color: var(--gold); }

/* Rodapé */
.footer {
  text-align: center;
  padding: 48px 16px;
  border-top: 1px solid var(--line);
}
.footer p { margin: 4px 0; }
.footer-names { font-family: "Great Vibes", cursive; font-size: 2.2rem; color: var(--gold); }
.footer-admin {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Área dos noivos */
.login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.login-card { width: 100%; max-width: 400px; text-align: center; }
.login-card form { text-align: left; margin: 24px 0 18px; }

.dash { max-width: 1280px; margin: 0 auto; padding: 32px 16px 64px; }
.dash-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
}
.dash-header p { margin: 0; }
.dash-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-actions .btn { padding: 10px 18px; font-size: 0.72rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.stat span { display: block; font-family: "Cormorant Garamond", serif; font-size: 2.4rem; line-height: 1.1; }
.stat:not(.stat-main) span { color: var(--gold-dark); }
.stat small { color: var(--muted); font-size: 0.78rem; }
.stat-main { background: var(--gold); border-color: var(--gold); color: #fff; }
.stat-main small { color: rgba(255, 255, 255, 0.85); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.tabs { display: flex; gap: 6px; }
.tab {
  font: inherit;
  font-size: 0.82rem;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.tab.active { background: var(--gold); color: #fff; border-color: var(--gold); }
.search { max-width: 320px; }

.table-wrap {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
}
.table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
.table th, .table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table th {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(246, 237, 220, 0.6); }
.table td.strong { font-weight: 600; white-space: nowrap; }
.table td.num { text-align: center; }
.table td.msg { max-width: 280px; white-space: pre-wrap; }
.table td.muted { white-space: nowrap; }
.table td { white-space: pre-wrap; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 500; white-space: nowrap; }
.badge-yes { background: rgba(127, 143, 98, 0.18); color: var(--ok); }
.badge-no { background: rgba(168, 84, 59, 0.12); color: var(--danger); }

.empty { text-align: center; color: var(--muted); padding: 32px; margin: 0; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 36px; min-height: auto; padding-top: 48px; }
  .hero-art img { max-width: 340px; transform: none; }
}

@media (max-width: 600px) {
  .nav { gap: 16px; }
  .nav a { font-size: 0.7rem; letter-spacing: 0.08em; }
  .countdown { gap: 8px; }
  .countdown div { min-width: 64px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .rsvp-form, .rsvp-done, .login-card { padding: 28px 20px; }
  .search { max-width: none; width: 100%; }
}
