:root {
    /* Evento palette - deep celebratory plum + warm gold, festive but premium. */
    --primary: #A8286B;
    --primary-dark: #7A1B4E;
    --primary-light: #C8447F;
    --accent: #F2B134;
    --accent-dark: #D68E1F;
    --ink: #241623;
    --muted: #7C6E79;
    --bg: #FDF8F4;
    --bg-alt: #F6E9F0;
    --card: #ffffff;
    --border: #EFE1E8;
    --success: #1f9d55;
    --error: #c0392b;
    --radius: 16px;
    --radius-lg: 26px;
    --shadow: 0 4px 18px rgba(122, 27, 78, .08);
    --shadow-lg: 0 16px 46px rgba(122, 27, 78, .16);
    --gradient-brand: linear-gradient(135deg, var(--primary) 0%, #C43C7A 45%, var(--accent) 100%);
    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand, .btn, .pkg-price, .stat-box .num {
    font-family: var(--font-heading);
}
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -.01em; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
    /* NOTE: deliberately no backdrop-filter/filter/transform here - any of those on this
       ancestor would create a containing block for the fixed-position .main-nav mobile
       drawer below, breaking it into a tiny box instead of a full-screen overlay. */
    background: rgba(253, 248, 244, .97);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 12px; }

/* ---------- Admin impersonation bar ("login as user") ---------- */
.impersonation-bar { background: var(--accent-dark); color: #fff; font-size: .85rem; }
.impersonation-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 20px; flex-wrap: wrap; }
.impersonation-bar form { margin: 0; }
.impersonation-bar .btn { background: #fff; color: var(--accent-dark); padding: 4px 14px; font-size: .8rem; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 36px; height: 36px; flex-shrink: 0; border-radius: 11px; box-shadow: var(--shadow); }
.brand-word { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

.main-nav { display: flex; align-items: center; gap: 20px; }
.main-nav a:not(.btn-nav) { color: var(--ink); font-weight: 500; font-size: .95rem; }
.main-nav a:not(.btn-nav):hover { color: var(--primary-dark); text-decoration: none; }
.btn-nav {
    background: var(--gradient-brand); color: #fff !important; padding: 9px 20px; border-radius: 999px;
    font-weight: 600; box-shadow: var(--shadow);
}
.btn-nav:hover { filter: brightness(1.06); text-decoration: none; }

.lang-switch { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.lang-switch a { color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.lang-switch a.lang-active { color: var(--primary-dark); }
.lang-switch a:hover { text-decoration: underline; }
.flag-icon { width: 18px; height: 12px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.1); flex-shrink: 0; }

.nav-toggle {
    display: none; background: none; border: 1px solid var(--border); border-radius: 10px;
    width: 42px; height: 42px; cursor: pointer; align-items: center; justify-content: center;
    color: var(--ink);
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; }
    .main-nav {
        position: fixed; inset: 68px 0 0 0; background: var(--bg); flex-direction: column;
        align-items: flex-start; padding: 24px 20px; gap: 16px; overflow-y: auto;
        transform: translateX(100%); transition: transform .25s ease; z-index: 40;
    }
    .main-nav.nav-open { transform: translateX(0); }
    .main-nav a { width: 100%; padding: 6px 0; }
    .btn-nav { width: 100%; text-align: center; }
    .lang-switch { padding-top: 10px; border-top: 1px solid var(--border); width: 100%; }
}

.page-main { padding: 40px 20px 72px; min-height: 60vh; }

.alert { padding: 13px 16px; border-radius: 12px; margin-bottom: 20px; font-weight: 500; }
.alert-success { background: #e6f6ec; color: var(--success); border: 1px solid #bfe8cc; }
.alert-error { background: #fbe9e7; color: var(--error); border: 1px solid #f3c6bf; }

/* ---------- Hero ---------- */
.hero {
    background: var(--gradient-brand);
    background-size: 160% 160%;
    color: #fff; border-radius: var(--radius-lg); padding: 72px 32px; text-align: center;
    margin-bottom: 48px; position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
}
.hero::before, .hero::after {
    content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.12);
}
.hero::before { width: 280px; height: 280px; top: -120px; right: -80px; }
.hero::after { width: 200px; height: 200px; bottom: -100px; left: -60px; background: rgba(255,255,255,.08); }
.hero > * { position: relative; z-index: 1; }
.hero .eyebrow {
    display: inline-block; background: rgba(255,255,255,.18); padding: 6px 16px; border-radius: 999px;
    font-size: .82rem; font-weight: 700; letter-spacing: .03em; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin: 0 0 16px; font-weight: 800; }
.hero p { font-size: clamp(1rem, 2vw, 1.2rem); opacity: .95; max-width: 640px; margin: 0 auto 28px; }
.hero .btn { background: #fff; color: var(--primary-dark); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn-outline { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.hero-actions .btn-outline:hover { background: rgba(255,255,255,.15); color: #fff; }

.section-head { text-align: center; max-width: 620px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 10px; }
.section-head p { color: var(--muted); margin: 0; }
.section-eyebrow {
    display: inline-block; color: var(--primary-dark); font-weight: 700; font-size: .78rem;
    letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px;
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 800px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }
@media (min-width: 801px) and (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
/* Packages grid - flexes to however many packages the admin has configured (not a fixed count). */
.grid-pkg { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }

.card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; box-shadow: var(--shadow);
}

/* Feature showcase */
.feature-card { text-align: left; transition: transform .18s ease, box-shadow .18s ease; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature-icon {
    width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; background: var(--bg-alt); margin-bottom: 14px;
}
.feature-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: .92rem; }

/* How it works */
.step-card { text-align: center; position: relative; }
.step-num {
    width: 40px; height: 40px; border-radius: 999px; background: var(--gradient-brand); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; margin: 0 auto 14px;
    box-shadow: var(--shadow);
}
.step-card h3 { font-size: 1.05rem; margin: 0 0 8px; }

.pkg-card { text-align: center; position: relative; display: flex; flex-direction: column; }
.pkg-card.best { border: 2px solid var(--primary); }
.pkg-card > .btn { margin-top: auto; }
.pkg-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--gradient-brand); color: #fff; font-size: .75rem; padding: 4px 14px; border-radius: 999px;
    font-weight: 700; box-shadow: var(--shadow);
}
.pkg-price { font-size: 2rem; font-weight: 800; color: var(--primary-dark); margin: 8px 0; }
.pkg-price small { font-size: 1rem; font-weight: 400; color: var(--muted); }
.pkg-eyebrow { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-dark); }
.pkg-blurb { margin: 0 0 14px; }
.pkg-features-head {
    text-align: left; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: var(--muted); border-top: 1px solid var(--border); padding-top: 14px; margin-top: 6px; margin-bottom: 10px;
}
.pkg-features { list-style: none; margin: 0 0 20px; padding: 0; text-align: left; }
.pkg-features li {
    display: flex; align-items: flex-start; gap: 8px; font-size: .88rem; color: var(--ink);
    padding: 5px 0; line-height: 1.4;
}
.pkg-features li::before {
    content: "✓"; flex-shrink: 0; width: 20px; height: 20px; border-radius: 999px;
    background: var(--gradient-brand); color: #fff; font-size: .68rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center; margin-top: 1px;
}

.cta-band {
    background: var(--bg-alt); border-radius: var(--radius-lg); padding: 52px 32px; text-align: center;
    margin: 56px 0 8px;
}
.cta-band h2 { margin: 0 0 12px; }
.cta-band p { color: var(--muted); max-width: 520px; margin: 0 auto 24px; }

.btn {
    display: inline-block; background: var(--gradient-brand); color: #fff; border: none;
    padding: 13px 26px; border-radius: 999px; font-weight: 600; cursor: pointer; font-size: 1rem;
    box-shadow: var(--shadow); transition: filter .15s ease, transform .15s ease;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary-dark); border: 2px solid var(--primary); box-shadow: none; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-secondary { background: var(--ink); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-sm { padding: 7px 16px; font-size: .85rem; }
.btn-danger { background: var(--error); }

form .form-group { margin-bottom: 18px; }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date],
input[type=time], input[type=number], textarea, select {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px;
    font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink); transition: border-color .15s ease;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); }
textarea { resize: vertical; min-height: 90px; }
.form-hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.form-narrow { max-width: 480px; margin: 0 auto; }

.auth-card { max-width: 420px; margin: 20px auto; }
.auth-card h1 { text-align: center; font-size: 1.5rem; }
.auth-switch { text-align: center; margin-top: 16px; font-size: .92rem; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: .92rem; }
th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: .74rem; letter-spacing: .04em; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.badge-yes { background: #e6f6ec; color: var(--success); }
.badge-no { background: #fbe9e7; color: var(--error); }
.badge-pending { background: #fff3e0; color: #b5730a; }
.badge-active { background: #e6f6ec; color: var(--success); }
.badge-draft { background: #eee; color: var(--muted); }
.badge-pending_payment { background: #fff3e0; color: #b5730a; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
@media (max-width: 700px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: var(--shadow); }
.stat-box .num { font-size: 1.7rem; font-weight: 800; color: var(--primary-dark); }
.stat-box .label { font-size: .82rem; color: var(--muted); }

.event-list { display: grid; gap: 16px; }
.event-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; border-left: 4px solid var(--primary); }
.event-row h3 { margin: 0 0 4px; }
.event-row .meta { color: var(--muted); font-size: .9rem; }

.invite-page { max-width: 560px; margin: 0 auto; }
.invite-cover {
    border-radius: var(--radius); overflow: hidden; margin-bottom: 20px;
    background: var(--gradient-brand); color: #fff; padding: 48px 24px; text-align: center;
}
.invite-cover h1 { margin: 0 0 8px; font-size: 1.8rem; }
.invite-details { display: grid; gap: 10px; margin: 20px 0; }
.invite-details .row { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; border-bottom: 1px dashed var(--border); padding-bottom: 8px; }
.invite-details .row span { color: var(--muted); font-weight: 600; font-size: .85rem; }
.invite-details .row strong { text-align: right; }

.rsvp-options { display: flex; gap: 12px; margin: 20px 0; }
.rsvp-options .btn { flex: 1; }

.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 20px; }
.mb-0 { margin-bottom: 0; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }

.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }

.site-footer { border-top: 1px solid var(--border); padding: 32px 0; margin-top: 48px; color: var(--muted); font-size: .85rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.footer-brand .brand-mark { width: 26px; height: 26px; border-radius: 8px; }

.search-box { margin-bottom: 20px; }
.checkin-result { padding: 16px; border-radius: 10px; border: 1px solid var(--border); margin-top: 16px; }

code.copy-link { display: block; background: var(--bg-alt); padding: 10px 12px; border-radius: 8px; font-size: .85rem; word-break: break-all; }

.report-page { max-width: 900px; margin: 0 auto; }
.report-page table { font-size: .9rem; }

@media (max-width: 600px) {
    .hero { padding: 48px 20px; border-radius: 20px; }
    .cta-band { padding: 40px 20px; }
    .page-main { padding: 28px 16px 56px; }
}

@media print {
    .no-print { display: none !important; }
    body { background: #fff; }
    .site-header, .site-footer { display: none !important; }
    .page-main { padding: 0; }
    .card { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
}
