:root {
  --leaf: #2f6b3f;
  --leaf-2: #5f8f4f;
  --moss: #dfead4;
  --cream: #fffaf0;
  --wood: #8a5a33;
  --rose: #d97973;
  --text: #3b332b;
  --muted: #756a5c;
  --line: #eadfce;
  --card: rgba(255,255,255,.92);
  --shadow: 0 18px 50px rgba(47, 80, 50, .15);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Poppins, system-ui, sans-serif; color: var(--text); background: var(--cream); }
a { color: var(--leaf); text-decoration: none; }
button, input, select, textarea { font: inherit; }
.public-page { min-height: 100vh; padding: 28px 18px 48px; background:
  radial-gradient(circle at top left, rgba(147, 190, 116, .35), transparent 34rem),
  radial-gradient(circle at bottom right, rgba(217, 121, 115, .22), transparent 30rem),
  var(--cream); }
.center-page { display: grid; place-items: center; }
.forest-bg { position: fixed; inset: auto 0 20px; text-align: center; font-size: clamp(2rem, 8vw, 5rem); opacity: .08; pointer-events: none; letter-spacing: 1rem; }
.hero { max-width: 980px; margin: 0 auto 24px; text-align: center; padding: 36px 10px 18px; }
.hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(2.6rem, 8vw, 5.8rem); line-height: .95; margin: 8px 0; color: var(--leaf); }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; color: var(--wood); font-weight: 800; font-size: .82rem; }
.hero-text { max-width: 720px; margin: 0 auto; color: var(--muted); font-size: 1.08rem; }
.compact-hero h1 { font-size: clamp(2rem, 6vw, 4rem); }
.card { max-width: 980px; margin: 18px auto; background: var(--card); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); padding: clamp(18px, 4vw, 32px); }
.wood-card { display: grid; grid-template-columns: 1fr auto; gap: 22px; border-color: rgba(138,90,51,.22); background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(232, 240, 218, .95)); }
.badge { display: inline-block; padding: 7px 12px; border-radius: 999px; background: var(--moss); color: var(--leaf); font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.badge.atual { background: #2f6b3f; color: #fff; }
.badge.passado { background: #efe1cf; color: #7d542d; }
.badge.proximo { background: #dfead4; color: var(--leaf); }
.badge.cancelado { background: #f1d1cd; color: #94352f; }
.theme { color: var(--wood); font-weight: 700; }
.event-details { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.event-details span { background: rgba(255,255,255,.75); border: 1px solid var(--line); border-radius: 16px; padding: 9px 12px; }
.event-details.compact span { font-size: .9rem; }
.hero-stamp { width: 150px; height: 150px; border-radius: 50%; background: var(--leaf); color: #fff; display: grid; place-items: center; text-align: center; padding: 18px; box-shadow: 0 16px 30px rgba(47,107,63,.25); }
.hero-stamp strong { font-family: 'Playfair Display', serif; font-size: 2rem; display: block; }
.hero-stamp span { display: block; font-size: .8rem; }
.timeline-wrap { max-width: 980px; margin: 34px auto; }
.timeline-wrap h2, .card h2 { color: var(--leaf); margin-top: 0; }
.timeline { position: relative; margin-left: 18px; }
.timeline:before { content: ''; position: absolute; left: 14px; top: 10px; bottom: 10px; width: 4px; background: var(--moss); border-radius: 999px; }
.timeline-item { position: relative; padding-left: 44px; margin: 24px 0; }
.timeline-dot { position: absolute; left: 4px; top: 30px; width: 24px; height: 24px; border-radius: 50%; background: var(--leaf-2); border: 5px solid var(--cream); z-index: 1; }
.timeline-item.active .timeline-dot { background: var(--rose); }
.timeline-card { margin: 0; }
.timeline-top, .section-head, .family-head, .actions-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.invite-access { text-align: center; }
.inline-form { display: flex; gap: 12px; max-width: 520px; margin: 18px auto 0; }
.inline-form input { flex: 1; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; color: var(--text); }
label { display: grid; gap: 7px; font-weight: 700; color: var(--text); }
.check { display: flex; align-items: center; gap: 9px; }
.check input { width: auto; }
.btn { border: 0; border-radius: 999px; padding: 11px 18px; cursor: pointer; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.btn.primary { background: var(--leaf); color: #fff; }
.btn.secondary { background: var(--moss); color: var(--leaf); }
.btn.warning { background: #fff0cc; color: #7a5300; }
.btn.danger { background: #ffe0dc; color: #982c25; }
.btn.light { background: rgba(255,255,255,.18); color: #fff; width: 100%; }
.btn.mini { padding: 7px 11px; font-size: .82rem; }
.alert { max-width: 980px; margin: 14px auto; padding: 14px 18px; border-radius: 16px; font-weight: 700; }
.alert.success { background: #e5f4df; color: var(--leaf); }
.alert.danger { background: #ffe1de; color: #8c2a25; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-stack { display: grid; gap: 15px; }
.span-2 { grid-column: 1 / -1; }
.gift-grid, .photo-grid, .photo-admin-grid, .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.gift-card, .stat, .family-admin-card, .photo-admin-card { border: 1px solid var(--line); border-radius: 20px; padding: 16px; background: #fff; }
.reserved { display: inline-block; padding: 8px 11px; border-radius: 999px; background: #f1e4d5; color: var(--wood); font-weight: 800; }
.photo-grid figure, .photo-admin-card { margin: 0; overflow: hidden; }
.photo-grid img, .photo-admin-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 18px; background: var(--moss); }
figcaption { display: grid; gap: 7px; padding-top: 10px; color: var(--muted); }
.upload-box { display: grid; gap: 14px; border: 1px dashed var(--leaf-2); border-radius: 18px; padding: 16px; margin-bottom: 18px; background: #fbfff7; }
.chip-list { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.chip.active { background: var(--leaf); color: #fff; }
.public-footer { text-align: center; margin-top: 38px; color: var(--wood); }
.public-footer strong { display: block; color: var(--leaf); font-size: 1.2rem; }
.empty-state { text-align: center; }
.emoji { font-size: 3rem; }
.error-box { text-align: left; white-space: pre-wrap; background: #241f1a; color: #fff; padding: 14px; border-radius: 14px; overflow: auto; }
.admin-page { min-height: 100vh; display: grid; grid-template-columns: 270px 1fr; background: #f7f3ea; }
.admin-sidebar { background: linear-gradient(180deg, #255735, #173520); color: #fff; padding: 24px; position: sticky; top: 0; height: 100vh; }
.admin-sidebar h2 { margin-top: 0; }
.admin-sidebar nav { display: grid; gap: 8px; margin: 26px 0; }
.admin-sidebar a { color: #fff; padding: 11px 12px; border-radius: 14px; background: rgba(255,255,255,.08); }
.admin-content { padding: 28px; max-width: 1280px; width: 100%; }
.admin-content h1 { color: var(--leaf); font-size: clamp(1.8rem, 4vw, 3rem); }
.stat strong { display: block; font-size: 2.2rem; color: var(--leaf); }
.stat span { color: var(--muted); font-weight: 700; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 12px; vertical-align: top; }
th { color: var(--leaf); font-size: .84rem; text-transform: uppercase; letter-spacing: .06em; }
.actions-cell { display: flex; gap: 8px; flex-wrap: wrap; }
.family-list-admin { display: grid; gap: 16px; }
.access-grid { display: grid; gap: 10px; margin-top: 12px; }
.access-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: #faf8f1; }
.info-box { margin-top: 18px; background: #f4f0e5; border-radius: 16px; padding: 14px; word-break: break-all; }
code { background: #f4f0e5; padding: 3px 6px; border-radius: 7px; }
.muted { color: var(--muted); }
.login-card { width: min(420px, 100%); }
@media (max-width: 820px) {
  .wood-card { grid-template-columns: 1fr; }
  .hero-stamp { width: 120px; height: 120px; }
  .inline-form, .timeline-top, .section-head { align-items: stretch; flex-direction: column; }
  .admin-page { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; }
  .admin-sidebar nav { grid-template-columns: repeat(2, 1fr); }
  .form-grid, .access-row { grid-template-columns: 1fr; }
}

/* Refinamento cerimonial da página pública */
.celebration-home {
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 229, 196, .75), transparent 22rem),
    radial-gradient(circle at 88% 18%, rgba(179, 213, 151, .45), transparent 24rem),
    linear-gradient(180deg, #fffaf0 0%, #f8f0df 55%, #f4ead7 100%);
}
.ceremonial-hero {
  padding-top: clamp(34px, 7vw, 74px);
  padding-bottom: 26px;
}
.ceremonial-hero h1 {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  color: #315f3b;
  letter-spacing: -0.045em;
}
.ceremonial-hero .hero-text {
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.75;
  max-width: 800px;
}
.hero-ribbon {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.hero-ribbon span {
  border: 1px solid rgba(138, 90, 51, .18);
  background: rgba(255, 255, 255, .62);
  backdrop-filter: blur(6px);
  color: #8a5a33;
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 800;
  font-size: .86rem;
}
.featured-moment {
  position: relative;
  overflow: hidden;
}
.featured-moment:before {
  content: '🌿';
  position: absolute;
  right: 20px;
  top: -18px;
  font-size: 5rem;
  opacity: .12;
  transform: rotate(22deg);
}
.featured-moment h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin: 14px 0 8px;
}
.ceremonial-stamp {
  background: radial-gradient(circle at 35% 28%, #6f9a55, #2f6b3f 72%);
}
.family-gate h2,
.section-title h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.05;
}
.family-gate p,
.section-title p {
  color: var(--muted);
  line-height: 1.65;
}
.section-title {
  max-width: 760px;
  margin: 0 auto 22px;
  text-align: center;
}
.moments-gallery .timeline-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  margin: 12px 0 6px;
}
.moments-gallery .timeline-card p {
  line-height: 1.6;
}

.admin-user-box { margin: 14px 0; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.2); color: inherit; font-size: .9rem; }
.admin-user-box strong { display: inline-block; margin-top: 3px; }
.inline-help { color: var(--muted); font-size: .9rem; }
