/* ==========================================================
   STELLAR WEDDING INVITATIONS — Design System
   Palette: ivory #faf6ee · ink #1a1410 · gold #c9a24a
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Inter:wght@300;400;500;600&family=Great+Vibes&display=swap');

:root {
  --ivory: #faf6ee;
  --ivory-deep: #f3ecdf;
  --ink: #1a1410;
  --ink-soft: #3d342b;
  --muted: #8a7f70;
  --gold: #c9a24a;
  --gold-deep: #a3801e;
  --gold-light: #e8c98a;
  --line: rgba(26, 20, 16, 0.08);
  --shadow-sm: 0 2px 10px rgba(26, 20, 16, 0.04);
  --shadow-md: 0 8px 30px rgba(26, 20, 16, 0.08);
  --shadow-lg: 0 24px 60px rgba(26, 20, 16, 0.12);
  --radius: 14px;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-script: 'Great Vibes', cursive;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--gold-deep); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--gold); }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 500; line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 3.5vw, 2.75rem); }
h3 { font-size: 1.35rem; }

/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem 2.5rem;
  background: rgba(250, 246, 238, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav .logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .01em;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.nav .logo::before {
  content: '✦';
  color: var(--gold);
  font-size: 1rem;
}

.nav nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav nav a {
  color: var(--ink-soft);
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .01em;
}

.nav nav a:hover { color: var(--gold-deep); }

.nav .btn-nav {
  background: var(--ink);
  color: var(--ivory) !important;
  padding: .6rem 1.3rem;
  border-radius: 999px;
  font-size: .88rem;
  transition: background .25s ease, transform .25s ease;
}

.nav .btn-nav:hover {
  background: var(--gold-deep);
  transform: translateY(-1px);
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .95rem 2rem;
  font-family: var(--font-sans);
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .02em;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: all .25s cubic-bezier(.2,.8,.2,1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: var(--ivory);
}

.btn-primary:hover {
  background: var(--gold-deep);
  color: var(--ivory);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(163, 128, 30, 0.25);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: #fff;
}

.btn-gold:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(201, 162, 74, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--ivory);
}

.btn-lg { padding: 1.1rem 2.4rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 20%, rgba(201, 162, 74, 0.12), transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(201, 162, 74, 0.08), transparent 70%);
  z-index: -1;
}

.hero-inner {
  max-width: 900px;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 1.5rem;
  padding: .5rem 1.2rem;
  background: rgba(201, 162, 74, 0.08);
  border: 1px solid rgba(201, 162, 74, 0.2);
  border-radius: 999px;
}

.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
}

.hero h1 {
  font-size: clamp(2.75rem, 6.5vw, 5.25rem);
  font-weight: 500;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 1.5rem;
  letter-spacing: -.015em;
}

.hero h1 .script {
  font-family: var(--font-script);
  color: var(--gold);
  font-weight: 400;
  display: inline-block;
  padding: 0 .15em;
}

.hero-sub {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-decor {
  position: absolute;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(201, 162, 74, 0.18);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

.hero-decor.left { left: -170px; top: 15%; }
.hero-decor.right { right: -170px; bottom: 10%; }

/* ============ SECTIONS ============ */
.section {
  padding: 6rem 1.5rem;
  max-width: 1180px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.section-eyebrow {
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 1rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--muted);
  font-size: 1.05rem;
}

/* ============ HOW IT WORKS ============ */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.step {
  position: relative;
  padding: 2.5rem 2rem;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: transform .3s ease, box-shadow .3s ease;
}

.step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step-num {
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 1rem;
  font-weight: 500;
}

.step h3 { margin-bottom: .75rem; }

.step p {
  color: var(--muted);
  font-size: .95rem;
}

/* ============ TEMPLATE PREVIEW GRID ============ */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.tpl-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  transition: transform .35s ease, box-shadow .35s ease;
  cursor: pointer;
}

.tpl-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.tpl-card .img-wrap {
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--ivory-deep);
}

.tpl-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.tpl-card:hover .img-wrap img {
  transform: scale(1.06);
}

.tpl-card .meta {
  padding: 1.25rem 1.35rem;
}

.tpl-card h3 {
  font-size: 1.15rem;
  margin-bottom: .25rem;
}

.tpl-card .tier {
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 500;
}

/* ============ PRICING ============ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.price-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  border: 1px solid var(--line);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.price-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(201, 162, 74, 0.4);
}

.price-card .tier-label {
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 500;
  margin-bottom: .75rem;
}

.price-card .amount {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 1rem;
}

.price-card .amount small {
  font-size: 1rem;
  color: var(--muted);
  font-family: var(--font-sans);
}

.price-card .tpl-list {
  list-style: none;
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.9;
}

/* ============ COMPARISON / FAQ ============ */
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 0;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--ink);
  font-weight: 500;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  color: var(--gold);
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform .25s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin-top: 1rem;
  color: var(--muted);
  max-width: 720px;
}

/* ============ CTA BANNER ============ */
.cta-banner {
  margin: 4rem auto;
  max-width: 1100px;
  padding: 4rem 2rem;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(201, 162, 74, 0.15), transparent 60%),
    linear-gradient(135deg, var(--ink) 0%, #2b2219 100%);
  color: var(--ivory);
  border-radius: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before,
.cta-banner::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border: 1px solid rgba(232, 201, 138, 0.15);
  border-radius: 50%;
}

.cta-banner::before { top: -100px; left: -60px; }
.cta-banner::after { bottom: -100px; right: -60px; }

.cta-banner h2 {
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.cta-banner p {
  color: rgba(250, 246, 238, 0.7);
  margin-bottom: 2rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--line);
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: .88rem;
  background: var(--ivory);
}

.footer .brand {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: .5rem;
}

/* ============ AUTH PAGES ============ */
.auth-wrap {
  min-height: calc(100vh - 70px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.auth-visual {
  position: relative;
  background:
    linear-gradient(135deg, rgba(26, 20, 16, 0.75), rgba(43, 34, 25, 0.85)),
    radial-gradient(ellipse at 30% 40%, rgba(201, 162, 74, 0.25), transparent 60%),
    linear-gradient(135deg, #2b2219, #1a1410);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 3rem;
  color: var(--ivory);
  overflow: hidden;
  isolation: isolate;
}

.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(232, 201, 138, 0.15) 0px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(232, 201, 138, 0.12) 0px, transparent 2px),
    radial-gradient(circle at 40% 80%, rgba(232, 201, 138, 0.1) 0px, transparent 2px);
  background-size: 200px 200px, 260px 260px, 300px 300px;
  animation: drift 40s linear infinite;
  z-index: -1;
}

@keyframes drift {
  from { background-position: 0 0, 0 0, 0 0; }
  to   { background-position: 200px 200px, -260px 260px, 300px -300px; }
}

.auth-visual-content {
  max-width: 400px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.auth-visual .script-mark {
  font-family: var(--font-script);
  font-size: 3.5rem;
  color: var(--gold-light);
  margin-bottom: 1rem;
  line-height: 1;
}

.auth-visual h2 {
  color: var(--ivory);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.auth-visual p {
  color: rgba(250, 246, 238, 0.7);
  font-size: .95rem;
  line-height: 1.7;
}

.auth-visual .bullets {
  margin-top: 2.5rem;
  text-align: left;
}

.auth-visual .bullets li {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 1rem;
  color: rgba(250, 246, 238, 0.85);
  font-size: .92rem;
}

.auth-visual .bullets li::before {
  content: '✦';
  color: var(--gold-light);
  font-size: .85rem;
  margin-top: .15rem;
  flex-shrink: 0;
}

.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  background: var(--ivory);
}

.auth-form {
  width: 100%;
  max-width: 420px;
}

.auth-form .eyebrow {
  font-size: .78rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: .75rem;
  font-weight: 500;
}

.auth-form h1 {
  font-size: 2.2rem;
  margin-bottom: .5rem;
}

.auth-form .lead {
  color: var(--muted);
  margin-bottom: 2rem;
  font-size: .95rem;
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: .5rem;
}

.field input {
  width: 100%;
  padding: .85rem 1rem;
  font-family: var(--font-sans);
  font-size: .95rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 162, 74, 0.12);
}

.field .hint {
  font-size: .78rem;
  color: var(--muted);
  margin-top: .35rem;
}

.auth-form .btn {
  margin-top: .5rem;
}

.auth-alt {
  text-align: center;
  margin-top: 1.75rem;
  font-size: .9rem;
  color: var(--muted);
}

.err {
  background: #fdf2f0;
  border: 1px solid #f3c9c2;
  color: #a83c2a;
  padding: .85rem 1rem;
  border-radius: 10px;
  font-size: .88rem;
  margin-bottom: 1.25rem;
}

.err ul { padding-left: 1.2rem; margin: .25rem 0 0; }

/* ============ ANIMATIONS ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.2,.8,.2,1), transform .9s cubic-bezier(.2,.8,.2,1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s ease, transform .8s ease;
}

.reveal-stagger.in > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.in > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .1s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .2s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .3s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .4s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .5s; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-visual { min-height: 280px; padding: 3rem 1.5rem; }
  .auth-visual h2 { font-size: 1.6rem; }
  .auth-visual .script-mark { font-size: 2.5rem; }
  .auth-form-side { padding: 3rem 1.5rem; }
}

@media (max-width: 640px) {
  .nav { padding: 1rem 1.25rem; }
  .nav nav { gap: 1rem; }
  .nav nav a:not(.btn-nav) { display: none; }
  .hero { min-height: 80vh; padding: 4rem 1.25rem 3rem; }
  .section { padding: 4rem 1.25rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-cta .btn { width: 100%; max-width: 300px; }
  .cta-banner { padding: 3rem 1.5rem; margin: 2rem 1rem; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
}

/* ==========================================================
   DASHBOARD
   ========================================================== */

.dash-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.dash-head .greeting {
  font-size: .82rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 500;
  margin-bottom: .5rem;
}

.dash-head h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.5rem);
  margin-bottom: .35rem;
}

.dash-head .sub {
  color: var(--muted);
  font-size: .95rem;
}

.dash-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

/* Stats strip */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.35rem;
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

.stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  opacity: .8;
}

.stat-label {
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: .5rem;
}

.stat-value {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  color: var(--ink);
  line-height: 1;
  font-weight: 500;
}

.stat-sub {
  font-size: .82rem;
  color: var(--muted);
  margin-top: .4rem;
}

/* Invitation cards */
.invite-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.invite-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
}

.invite-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.invite-card .banner {
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  background-color: var(--ivory-deep);
  position: relative;
}

.invite-card .banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.35) 100%);
}

.invite-card .status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: .35rem .75rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  z-index: 1;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.status-draft {
  background: rgba(255, 255, 255, 0.92);
  color: #8a7f70;
}

.status-published {
  background: rgba(26, 127, 71, 0.92);
  color: #fff;
}

.status-expired {
  background: rgba(160, 32, 32, 0.9);
  color: #fff;
}

.invite-card .body {
  padding: 1.5rem 1.5rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.invite-card h3 {
  font-size: 1.3rem;
  margin-bottom: .25rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-card .template-name {
  font-size: .78rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 500;
  margin-bottom: 1rem;
}

.invite-card .meta-row {
  display: flex;
  gap: 1.25rem;
  padding: .85rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
  font-size: .82rem;
  color: var(--muted);
}

.invite-card .meta-row span strong {
  color: var(--ink);
  font-weight: 600;
}

.invite-card .card-actions {
  display: flex;
  gap: .5rem;
  margin-top: auto;
  flex-wrap: wrap;
}

.invite-card .card-actions .btn {
  padding: .6rem 1rem;
  font-size: .82rem;
  flex: 1;
  min-width: 0;
}

/* Empty state */
.empty-state {
  background: #fff;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 4rem 2rem;
  text-align: center;
  max-width: 560px;
  margin: 3rem auto;
}

.empty-state .icon {
  font-family: var(--font-script);
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 1rem;
  line-height: 1;
}

.empty-state h2 {
  font-size: 1.6rem;
  margin-bottom: .5rem;
}

.empty-state p {
  color: var(--muted);
  margin-bottom: 1.75rem;
}

/* Flash success */
.flash-success {
  background: #e7f5ec;
  border: 1px solid #a8dcbe;
  color: #1a7f47;
  padding: .9rem 1.2rem;
  border-radius: 10px;
  font-size: .9rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.flash-success::before {
  content: '✓';
  font-weight: bold;
}

/* ==========================================================
   TEMPLATE GALLERY
   ========================================================== */

.gallery-hero {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  max-width: 780px;
  margin: 0 auto;
  position: relative;
}

.gallery-hero .eyebrow {
  font-size: .78rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 1rem;
  font-weight: 500;
}

.gallery-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}

.gallery-hero p {
  color: var(--muted);
  font-size: 1.05rem;
}

/* Filter bar */
.tier-filters {
  display: flex;
  gap: .5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2.5rem auto 3rem;
  padding: 0 1rem;
  max-width: 800px;
}

.tier-filter {
  padding: .55rem 1.2rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s ease;
  font-family: var(--font-sans);
}

.tier-filter:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
}

.tier-filter.active {
  background: var(--ink);
  color: var(--ivory);
  border-color: var(--ink);
}

/* Tier section */
.tier-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  scroll-margin-top: 90px;
}

.tier-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.tier-section-head .tier-title {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--ink);
}

.tier-section-head .tier-price {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--gold-deep);
}

.tier-section-head .tier-count {
  font-size: .82rem;
  color: var(--muted);
  letter-spacing: .08em;
}

/* Template gallery cards (extends .tpl-card) */
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.tpl-card-v2 {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .35s ease, box-shadow .35s ease;
  display: flex;
  flex-direction: column;
}

.tpl-card-v2:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.tpl-card-v2 .img-wrap {
  aspect-ratio: 3/4;
  overflow: hidden;
  position: relative;
  background: var(--ivory-deep);
}

.tpl-card-v2 .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2,.8,.2,1);
}

.tpl-card-v2:hover .img-wrap img {
  transform: scale(1.08);
}

.tpl-card-v2 .img-wrap::after {
  content: 'Preview';
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: .4rem .9rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s ease, transform .3s ease;
}

.tpl-card-v2:hover .img-wrap::after {
  opacity: 1;
  transform: translateY(0);
}

.tpl-card-v2 .meta {
  padding: 1.15rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tpl-card-v2 h3 {
  font-size: 1.1rem;
  margin-bottom: .2rem;
  color: var(--ink);
}

.tpl-card-v2 .desc {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.5;
  flex: 1;
}

.tpl-card-v2 .actions {
  display: flex;
  gap: .5rem;
}

.tpl-card-v2 .actions .btn {
  padding: .55rem .85rem;
  font-size: .78rem;
  flex: 1;
}

/* Sticky back-to-top within gallery */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold-light);
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 8px 24px rgba(26, 20, 16, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 50;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  transform: translateY(-3px);
  background: var(--gold-deep);
}

/* ============ RESPONSIVE (dashboard + gallery) ============ */
@media (max-width: 640px) {
  .dash-head { flex-direction: column; align-items: flex-start; }
  .dash-actions { width: 100%; }
  .dash-actions .btn { flex: 1; }
  .invite-card .card-actions .btn { flex-basis: 50%; }
  .tier-section-head { flex-direction: column; gap: .25rem; }
  .tier-filters { gap: .4rem; }
  .tier-filter { padding: .45rem .9rem; font-size: .8rem; }
}

/* ==========================================================
   RSVP PAGE
   ========================================================== */

.rsvp-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.rsvp-head .eyebrow {
  font-size: .78rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 500;
  margin-bottom: .5rem;
}

.rsvp-head h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.5rem);
  margin-bottom: .35rem;
}

.rsvp-head .sub {
  color: var(--muted);
  font-size: .95rem;
}

/* Table wrapper */
.rsvp-table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.rsvp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

.rsvp-table thead {
  background: var(--ivory-deep);
}

.rsvp-table th {
  text-align: left;
  padding: 1rem 1.25rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.rsvp-table td {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-soft);
}

.rsvp-table tbody tr {
  transition: background .2s ease;
}

.rsvp-table tbody tr:hover {
  background: rgba(201, 162, 74, 0.04);
}

.rsvp-table tbody tr:last-child td {
  border-bottom: 0;
}

.rsvp-table .guest-name {
  font-weight: 500;
  color: var(--ink);
  display: block;
  margin-bottom: .15rem;
}

.rsvp-table .guest-email {
  font-size: .8rem;
  color: var(--muted);
}

.rsvp-table .message-cell {
  max-width: 280px;
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.5;
  font-style: italic;
}

/* Status pills */
.pill {
  display: inline-block;
  padding: .3rem .75rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pill-yes {
  background: rgba(26, 127, 71, 0.1);
  color: #1a7f47;
}

.pill-no {
  background: rgba(160, 32, 32, 0.08);
  color: #a02020;
}

.pill-maybe {
  background: rgba(201, 162, 74, 0.15);
  color: var(--gold-deep);
}

.side-badge {
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* Empty state (reuses .empty-state from dashboard) */
.rsvp-empty {
  background: #fff;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 4rem 2rem;
  text-align: center;
  max-width: 560px;
  margin: 2rem auto;
}

.rsvp-empty .icon {
  font-family: var(--font-script);
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 1rem;
  line-height: 1;
}

.rsvp-empty h2 {
  font-size: 1.6rem;
  margin-bottom: .5rem;
}

.rsvp-empty p {
  color: var(--muted);
  margin-bottom: 1.75rem;
}

/* Mobile: card-style rows */
@media (max-width: 720px) {
  .rsvp-head { flex-direction: column; align-items: flex-start; }
  .rsvp-head .btn { width: 100%; }

  .rsvp-table thead { display: none; }

  .rsvp-table,
  .rsvp-table tbody,
  .rsvp-table tr,
  .rsvp-table td {
    display: block;
    width: 100%;
  }

  .rsvp-table tr {
    padding: 1.25rem;
    border-bottom: 1px solid var(--line);
  }

  .rsvp-table tbody tr:last-child { border-bottom: 0; }

  .rsvp-table td {
    padding: .35rem 0;
    border: 0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
  }

  .rsvp-table td::before {
    content: attr(data-label);
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--muted);
    flex-shrink: 0;
    padding-top: .15rem;
  }

  .rsvp-table td.message-cell { max-width: none; }
}

/* ==========================================================
   EDITOR (invitation editor with live preview)
   ========================================================== */

.editor-wrap {
  display: grid;
  grid-template-columns: minmax(340px, 420px) 1fr;
  gap: 2rem;
  max-width: 1500px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  align-items: start;
}

/* ---------- Sidebar ---------- */
.editor-side {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.editor-side::-webkit-scrollbar {
  width: 6px;
}
.editor-side::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
}

.editor-side h2 {
  font-size: 1.55rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

/* ---------- Form fields ---------- */
.editor-side label {
  display: block;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.15rem;
}

.editor-side label input,
.editor-side label textarea {
  display: block;
  width: 100%;
  margin-top: .45rem;
  padding: .75rem .9rem;
  font-family: var(--font-sans);
  font-size: .92rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.editor-side label input:focus,
.editor-side label textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 162, 74, 0.12);
}

.editor-side label textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

/* File inputs — style the wrapper, not the button (browser varies) */
.editor-side label input[type="file"] {
  padding: .55rem .75rem;
  font-size: .82rem;
  color: var(--muted);
  cursor: pointer;
  background: var(--ivory-deep);
  border-style: dashed;
}

.editor-side label input[type="file"]::file-selector-button {
  margin-right: .75rem;
  padding: .45rem .9rem;
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .05em;
  color: var(--ivory);
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s ease;
}

.editor-side label input[type="file"]::file-selector-button:hover {
  background: var(--gold-deep);
}

/* Datetime input — normalize appearance */
.editor-side input[type="datetime-local"] {
  font-family: var(--font-sans);
}

/* ---------- Action row ---------- */
.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.editor-actions .btn {
  flex: 1 1 auto;
  padding: .75rem 1.1rem;
  font-size: .85rem;
  min-width: 0;
}

.editor-actions .btn:first-child {
  flex-basis: 100%;
}

/* ---------- Preview pane ---------- */
.editor-preview {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ivory-deep);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 90px;
  height: calc(100vh - 110px);
  min-height: 560px;
}

.editor-preview iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

/* Subtle frame label */
.editor-preview::before {
  content: 'Live preview';
  position: absolute;
  top: .75rem;
  left: .75rem;
  z-index: 2;
  padding: .3rem .75rem;
  background: rgba(26, 20, 16, 0.82);
  color: var(--gold-light);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .editor-wrap {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .editor-side {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .editor-preview {
    position: static;
    height: 70vh;
    min-height: 480px;
  }
}

@media (max-width: 640px) {
  .editor-wrap {
    padding: 1.5rem 1rem 3rem;
    gap: 1.25rem;
  }

  .editor-side {
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .editor-side h2 {
    font-size: 1.3rem;
  }

  .editor-actions {
    flex-direction: column;
  }

  .editor-actions .btn {
    width: 100%;
    flex-basis: auto;
  }

  .editor-preview {
    height: 60vh;
    min-height: 400px;
  }
}

.editor-save-status {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: .55rem 1.15rem;
  background: var(--ink);
  color: var(--gold-light);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 200;
}

.editor-save-status.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}