:root {
  --rose: #c45c7a;
  --rose-deep: #9e3f5c;
  --sage: #7a9e8e;
  --sage-deep: #56786b;
  --ink: #3a2730;
  --muted: #7a6670;
  --paper: #fffafb;
  --line: rgba(58, 39, 48, 0.1);
  --shadow: 0 18px 40px rgba(58, 39, 48, 0.08);
  --radius: 22px;
  --sidebar: 270px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 60% 40% at 0% 0%, rgba(196, 92, 122, 0.18), transparent 60%),
    radial-gradient(ellipse 50% 35% at 100% 10%, rgba(122, 158, 142, 0.2), transparent 55%),
    radial-gradient(ellipse 40% 30% at 70% 100%, rgba(232, 196, 168, 0.25), transparent 50%),
    linear-gradient(160deg, #f7eef1 0%, #f3f6f4 48%, #f8f1eb 100%);
  background-attachment: fixed;
}

a { color: var(--rose-deep); }
img { max-width: 100%; display: block; }

.app-shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 1.5rem 1.1rem;
  background: rgba(255, 250, 251, 0.78); backdrop-filter: blur(14px);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 1.5rem;
  z-index: 30;
}
.brand { display: flex; gap: .9rem; align-items: center; padding: .4rem .5rem; }
.brand-mark {
  width: 48px; height: 48px; border-radius: 14px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 10px 24px rgba(196, 92, 122, 0.32);
}
.brand-kicker { margin: 0; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.brand-name { margin: .1rem 0 0; font-family: var(--font-display); font-size: 1.55rem; line-height: 1; }

.nav { display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.nav a {
  text-decoration: none; color: var(--ink); padding: .75rem 1rem; border-radius: 14px;
  font-weight: 700; transition: background .2s, transform .2s, color .2s;
}
.nav a:hover { background: rgba(196, 92, 122, 0.08); transform: translateX(3px); }
.nav a.active { background: linear-gradient(90deg, rgba(196,92,122,.16), rgba(122,158,142,.12)); color: var(--rose-deep); }

.sidebar-foot { display: flex; flex-direction: column; gap: .4rem; padding: .5rem; }
.ghost-link { color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 600; }
.ghost-link:hover { color: var(--rose-deep); }

.main-wrap { min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 1rem; padding: 1.3rem 1.6rem .4rem;
}
.menu-btn {
  display: none; border: 0; background: var(--paper); width: 44px; height: 44px; border-radius: 12px;
  box-shadow: var(--shadow); font-size: 1.2rem; cursor: pointer;
}
.top-kicker { margin: 0; color: var(--muted); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; }
.top-title { margin: .15rem 0 0; font-family: var(--font-display); font-size: clamp(1.3rem, 2vw, 1.8rem); font-weight: 600; }

.content { padding: 1rem 1.6rem 2.5rem; }

.admin-credit {
  text-align: center;
  padding: 0 1.4rem 1.15rem;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}
.admin-credit span { color: var(--rose); margin: 0 .12rem; }
.admin-credit strong { color: var(--ink); }

.flash {
  padding: .9rem 1.1rem; border-radius: 14px; margin-bottom: 1rem; font-weight: 700;
  animation: slideIn .35s ease;
}
.flash-ok { background: rgba(122,158,142,.18); color: var(--sage-deep); }
.flash-warn { background: rgba(232,196,168,.35); color: #8a5a2b; }
.flash-err { background: rgba(196,92,122,.15); color: var(--rose-deep); }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat, .panel, .product, .invite-card, .guest-row, .task-item {
  background: rgba(255, 250, 251, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat { padding: 1.15rem 1.2rem; position: relative; overflow: hidden; }
.stat::after {
  content: ""; position: absolute; right: -20px; top: -20px; width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(196,92,122,.15), transparent 70%);
}
.stat-label { margin: 0; color: var(--muted); font-size: .82rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.stat-value { margin: .35rem 0 0; font-family: var(--font-display); font-size: 1.85rem; }

.shop-cat {
  margin: 1rem 0 .45rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--rose-deep);
}
.shop-cat:first-child { margin-top: 0; }

.panel { padding: 1.25rem 1.35rem; }
.wa-preview {
  white-space: pre-wrap;
  font-family: var(--font-body);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  margin: .8rem 0 0;
  font-size: .92rem;
  line-height: 1.5;
}
.panel h3 { margin: 0 0 .85rem; font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; }
.panel-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: .9rem; flex-wrap: wrap; }
.panel-head h3 { margin: 0; }

.progress {
  height: 12px; background: rgba(58,39,48,.08); border-radius: 999px; overflow: hidden; margin-top: .8rem;
}
.progress > span {
  display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--rose), #e8a4b5 55%, var(--sage));
  transition: width 1.1s cubic-bezier(.2,.8,.2,1);
}

.btn, button.btn, input[type=submit].btn {
  appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep)); color: #fff; font-weight: 800;
  font-family: var(--font-body); padding: .75rem 1.15rem; border-radius: 999px; text-decoration: none;
  box-shadow: 0 10px 22px rgba(196,92,122,.28); transition: transform .15s, filter .15s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-sage { background: linear-gradient(135deg, var(--sage), var(--sage-deep)); box-shadow: 0 10px 22px rgba(122,158,142,.28); }
.btn-ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--line); box-shadow: none;
}
.btn-sm { padding: .45rem .85rem; font-size: .88rem; }
.btn-danger { background: linear-gradient(135deg, #c45c7a, #8b2f4a); }

.form-grid { display: grid; gap: .85rem; grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-grid .full { grid-column: 1 / -1; }
label { display: grid; gap: .35rem; font-weight: 700; font-size: .9rem; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 14px;
  padding: .75rem .9rem; font: inherit; color: inherit; outline: none; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(196,92,122,.45); box-shadow: 0 0 0 4px rgba(196,92,122,.12);
}
textarea { min-height: 110px; resize: vertical; }
.hint { color: var(--muted); font-size: .82rem; font-weight: 600; }

.table-wrap { overflow: auto; border-radius: 16px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: .85rem .9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #fbf5f7; }
tr:last-child td { border-bottom: 0; }

.badge {
  display: inline-flex; align-items: center; padding: .25rem .6rem; border-radius: 999px;
  font-size: .75rem; font-weight: 800; letter-spacing: .03em;
}
.badge-pendente { background: #f3e7dc; color: #8a5a2b; }
.badge-confirmado { background: rgba(122,158,142,.2); color: var(--sage-deep); }
.badge-recusado { background: rgba(196,92,122,.15); color: var(--rose-deep); }
.badge-talvez { background: #efe9f5; color: #6a4f8a; }
.badge-alta, .badge-essencial { background: rgba(196,92,122,.15); color: var(--rose-deep); }
.badge-media { background: #f3e7dc; color: #8a5a2b; }
.badge-baixa { background: rgba(122,158,142,.15); color: var(--sage-deep); }
.badge-desejado { background: #efe9f5; color: #6a4f8a; }
.badge-comprado, .badge-recebido { background: rgba(122,158,142,.2); color: var(--sage-deep); }
.badge-cancelado { background: #eee; color: #666; }

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.product { overflow: hidden; display: flex; flex-direction: column; transition: transform .2s; }
.product:hover { transform: translateY(-3px); }
.product-media {
  aspect-ratio: 1; background:
    linear-gradient(135deg, rgba(196,92,122,.08), rgba(122,158,142,.1)),
    #f3eef0;
  display: grid; place-items: center; overflow: hidden;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 1rem; display: grid; gap: .45rem; flex: 1; }
.product-body h4 { margin: 0; font-size: 1rem; line-height: 1.3; }
.product-meta { color: var(--muted); font-size: .85rem; font-weight: 600; }
.product-price { font-family: var(--font-display); font-size: 1.25rem; color: var(--rose-deep); }
.product-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }

.invite-preview {
  position: relative; border-radius: 28px; overflow: hidden; min-height: 520px;
  background:
    radial-gradient(circle at 12% 18%, rgba(232,140,164,.45), transparent 42%),
    radial-gradient(circle at 90% 80%, rgba(130,178,156,.4), transparent 40%),
    linear-gradient(165deg, #ffe8ef 0%, #f3f8f5 48%, #fff3ea 100%);
  border: 1px solid rgba(196,92,122,.18); box-shadow: var(--shadow);
  padding: 1.75rem; display: grid; place-items: center; text-align: center;
}
.invite-inner {
  max-width: 380px; width: 100%;
  background: rgba(255,252,251,.88);
  border: 1px solid rgba(196,92,122,.2);
  border-radius: 22px;
  padding: 1.75rem 1.4rem 1.5rem;
  backdrop-filter: blur(6px);
  animation: rise .7s ease both;
  box-shadow: 0 18px 40px rgba(58,39,48,.08);
}
.invite-mark {
  width: 56px; height: 56px; margin: 0 auto .85rem;
  border-radius: 16px; display: grid; place-items: center;
  background: var(--rose); color: #fff;
  font-family: var(--font-display); font-size: 1.7rem; font-weight: 700;
  box-shadow: 0 10px 22px rgba(196,92,122,.28);
}
.invite-inner .eyebrow { letter-spacing: .18em; text-transform: uppercase; font-size: .72rem; font-weight: 800; color: var(--muted); margin: 0; }
.invite-inner h2 {
  font-family: var(--font-display); font-size: clamp(2.4rem, 6vw, 3.4rem); margin: .35rem 0 .15rem;
  background: linear-gradient(120deg, var(--rose-deep), #d4899c 40%, var(--sage-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.invite-inner .script { font-family: var(--font-display); font-style: italic; font-size: 1.2rem; color: var(--sage-deep); margin: 0; }
.invite-divider {
  display: flex; align-items: center; justify-content: center; gap: .55rem;
  margin: 1rem auto .2rem; color: var(--rose); font-size: .7rem;
}
.invite-divider::before, .invite-divider::after {
  content: ""; width: 48px; height: 1px; background: rgba(196,92,122,.35);
}
.invite-details { margin-top: 1rem; display: grid; gap: .35rem; font-weight: 700; color: var(--ink); }
.invite-fralda {
  margin-top: .9rem; display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .55rem 1.15rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--rose), #9e3f5c); color: #fff; font-weight: 800;
  box-shadow: 0 10px 22px rgba(158,63,92,.22);
}

.milestone { display: flex; gap: .8rem; align-items: flex-start; padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.milestone:last-child { border-bottom: 0; }
.dot {
  width: 12px; height: 12px; margin-top: .35rem; border-radius: 50%;
  background: var(--sage); box-shadow: 0 0 0 4px rgba(122,158,142,.18); flex: 0 0 auto;
}
.dot.done { background: var(--rose); box-shadow: 0 0 0 4px rgba(196,92,122,.18); }
.dot.current { animation: pulse 1.6s ease infinite; }

.task-item { padding: .9rem 1rem; display: flex; gap: .8rem; align-items: flex-start; }
.task-item.done { opacity: .65; }
.task-item.done .task-title { text-decoration: line-through; }
.task-title { font-weight: 800; margin: 0; }
.task-meta { margin: .2rem 0 0; color: var(--muted); font-size: .85rem; }

.login-page, .public-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
}
.public-wrap {
  display: block;
  min-height: auto;
  padding: 0;
  place-items: unset;
}
.login-card, .public-card {
  width: min(440px, 100%); background: rgba(255,250,251,.86); border: 1px solid var(--line);
  border-radius: 28px; padding: 2rem; box-shadow: var(--shadow); text-align: center;
  backdrop-filter: blur(10px);
  position: relative; z-index: 1;
}
.login-card h1, .public-card h1 { font-family: var(--font-display); margin: .4rem 0 1rem; font-size: 2.2rem; }
.public-hero {
  width: min(980px, 100%); text-align: center; padding: 2.5rem 1.2rem 1rem;
  animation: rise .8s ease both;
}
.public-hero .brand-line { letter-spacing: .2em; text-transform: uppercase; font-weight: 800; color: var(--muted); font-size: .78rem; }
.public-hero h1 {
  font-family: var(--font-display); font-size: clamp(3rem, 10vw, 5.5rem); margin: .3rem 0;
  line-height: .95;
}
.public-hero p.lead { max-width: 540px; margin: .6rem auto 1.4rem; color: var(--muted); font-size: 1.1rem; font-weight: 600; }
.public-sections { width: min(1100px, 100%); display: grid; gap: 1.2rem; padding: 0 1rem 3rem; }

.empty {
  text-align: center; padding: 2rem 1rem; color: var(--muted); font-weight: 600;
}

.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1rem; }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(82vw, 300px); transform: translateX(-105%);
    transition: transform .25s ease; box-shadow: 20px 0 50px rgba(0,0,0,.12);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-btn { display: inline-grid; place-items: center; }
  .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
  .content, .topbar { padding-left: 1rem; padding-right: 1rem; }
}
@media print {
  .sidebar, .topbar, .btn, .flash, .menu-btn { display: none !important; }
  .app-shell { display: block; }
  .invite-preview { box-shadow: none; border: 0; min-height: 90vh; }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(196,92,122,.18); }
  50% { box-shadow: 0 0 0 8px rgba(196,92,122,.08); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Site público */
.public-wrap { display: block; min-height: auto; padding: 0; }
.public-hero-full {
  min-height: 92vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  padding: 2.5rem 1.2rem;
  background:
    linear-gradient(160deg, rgba(158,63,92,.72), rgba(86,120,107,.55)),
    radial-gradient(ellipse at 20% 20%, rgba(255,255,255,.25), transparent 50%),
    linear-gradient(160deg, #c45c7a, #7a9e8e 70%);
  animation: rise .8s ease both;
}
.public-hero-compact {
  min-height: auto;
  padding: 3rem 1.2rem 2.4rem;
}
@media (min-width: 861px) {
  .public-hero-compact { min-height: 58vh; padding: 4rem 1.2rem; }
}
.notice-panel {
  border-left: 4px solid var(--rose);
}
.faq-list { display: grid; gap: .55rem; margin-top: .7rem; }
.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .85rem 1rem;
}
.faq-item summary {
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin: .55rem 0 0; color: var(--muted); font-weight: 600; }
.public-foot {
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  padding: .5rem 0 1rem;
}
.public-foot a { color: var(--rose-deep); text-decoration: none; }

.rsvp-fralda {
  text-align: center;
  font-weight: 800;
  color: var(--rose-deep);
  background: rgba(196,92,122,.1);
  display: block;
  width: fit-content;
  margin: .4rem auto .8rem;
  padding: .45rem 1rem;
  border-radius: 999px;
}
.rsvp-label { font-weight: 800; margin: 1rem 0 .55rem; }
.rsvp-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .55rem;
}
.rsvp-choice {
  min-height: 52px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  color: var(--ink);
  transition: border-color .15s, background .15s, transform .12s;
}
.rsvp-choice.is-active {
  border-color: var(--rose);
  background: rgba(196,92,122,.12);
  color: var(--rose-deep);
  transform: translateY(-1px);
}
.rsvp-block { margin-top: 1.2rem; }
.acomp-list { display: grid; gap: .5rem; margin-top: .5rem; }
.acomp-row { display: flex; gap: .45rem; align-items: center; }
.acomp-row input { flex: 1; min-height: 48px; }
.acomp-remove { min-width: 44px; min-height: 44px; padding: 0; }
.rsvp-optional {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: .85rem 1rem;
  background: #fff;
}
.rsvp-optional summary {
  font-weight: 800;
  cursor: pointer;
}
.rsvp-submit {
  width: 100%;
  margin-top: 1.2rem;
  min-height: 52px;
  font-size: 1.05rem;
}
.rsvp-success { animation: rise .45s ease both; }

.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: .45rem .85rem;
  font-weight: 800;
  font-family: var(--font-body);
  cursor: pointer;
  min-height: 40px;
}
.chip input { display: none; }
.chip:has(input:checked),
.chip.is-on {
  background: rgba(196,92,122,.14);
  border-color: var(--rose);
  color: var(--rose-deep);
}
.quick-form {
  display: grid;
  gap: .75rem;
  grid-template-columns: 1.4fr 1fr auto;
  align-items: end;
}
@media (max-width: 860px) {
  .quick-form { grid-template-columns: 1fr; }
  .rsvp-choices { grid-template-columns: 1fr; }
  .public-hero-compact { padding-top: 2.2rem; padding-bottom: 1.8rem; }
}
.public-hero-inner { max-width: 720px; }
.public-hero-full .brand-line,
.public-hero .brand-line {
  letter-spacing: .22em; text-transform: uppercase; font-weight: 800; font-size: .78rem; margin: 0;
}
.public-hero-full h1 {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 12vw, 6rem);
  margin: .35rem 0;
  line-height: .92;
}
.script-line {
  font-family: var(--font-display); font-style: italic; font-size: 1.2rem; margin: 0; opacity: .95;
}
.public-hero-full .lead {
  max-width: 34rem; margin: .9rem auto 0; font-weight: 600; font-size: 1.08rem; opacity: .92;
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; justify-content: center;
  margin-top: 1.2rem; font-weight: 800;
}
.hero-meta span {
  background: rgba(255,255,255,.16); padding: .45rem .9rem; border-radius: 999px; backdrop-filter: blur(6px);
}
.public-sections { width: min(1100px, 100%); margin: 0 auto; display: grid; gap: 1.2rem; padding: 1.5rem 1rem 3rem; }
.public-hero {
  width: min(980px, 100%); text-align: center; padding: 2.5rem 1.2rem 1rem; margin: 0 auto;
  animation: rise .8s ease both;
}
.public-hero h1 {
  font-family: var(--font-display); font-size: clamp(2.6rem, 8vw, 4.5rem); margin: .3rem 0; line-height: .95;
}
.public-hero p.lead { max-width: 540px; margin: .6rem auto 1.2rem; color: var(--muted); font-size: 1.08rem; font-weight: 600; }
.rsvp-card { margin: 1.5rem auto; }
.badge-reservado { background: rgba(122,158,142,.2); color: var(--sage-deep); }
.badge-desejado { background: #efe9f5; color: #6a4f8a; }
.badge-recebido { background: rgba(122,158,142,.2); color: var(--sage-deep); }

