:root {
    --bg: #26312f;
    --bg-2: #303b38;
    --panel: #ede7dc;
    --panel-2: #e4ddd0;
    --text: #1f2b29;
    --muted: #65736f;
    --cream: #f3ece2;
    --sage: #66877d;
    --sage-dark: #41665d;
    --terracotta: #b77857;
    --line: rgba(31, 43, 41, 0.14);
    --line-light: rgba(255,255,255,.18);
    --shadow: 0 20px 55px rgba(0, 0, 0, 0.24);
    --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(102, 135, 125, 0.28), transparent 34rem),
        radial-gradient(circle at bottom right, rgba(183, 120, 87, 0.16), transparent 32rem),
        linear-gradient(135deg, var(--bg) 0%, #2f3a36 55%, var(--bg-2) 100%);
}

a { color: inherit; }
code { background: rgba(31, 43, 41, 0.08); padding: .25rem .45rem; border-radius: .5rem; }

.topbar {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem 4vw;
    background: rgba(237, 231, 220, 0.96);
    border-bottom: 1px solid rgba(255,255,255,0.24);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; font-weight: 850; color: #26322f; }
.brand-mark {
    width: 34px; height: 34px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    color: white; background: var(--sage-dark); box-shadow: 0 8px 20px rgba(63,98,89,.25);
}
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .75rem; font-size: .95rem; font-weight: 750; }
.nav a { text-decoration: none; color: #31413d; opacity: .9; }
.nav a:hover { opacity: 1; color: var(--sage-dark); }
.nav-pill { border: 1px solid var(--line); border-radius: 999px; padding: .65rem 1rem; background: rgba(255,255,255,.45); }

.page { width: min(1180px, 92vw); margin: 0 auto; padding: 4rem 0 5rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 1.5rem; }
.compact-gap { gap: 1.5rem; }

h1, h2, h3 { line-height: 1.02; margin: 0 0 1rem; color: #182521; }
h1 { font-size: clamp(2.25rem, 5vw, 5.2rem); letter-spacing: -.065em; }
h2 { font-size: clamp(1.4rem, 2vw, 1.95rem); letter-spacing: -.035em; }
p { line-height: 1.65; }
.lead { font-size: 1.1rem; color: rgba(243,236,226,.82); max-width: 760px; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-weight: 900; color: var(--terracotta); font-size: .78rem; margin: 0 0 .65rem; }
.muted { color: var(--muted); }

.panel {
    background: linear-gradient(180deg, rgba(237,231,220,0.97), rgba(228,221,208,0.94));
    border: 1px solid rgba(255,255,255,.42);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.panel-title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }

.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }
.btn, button.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: .8rem 1.2rem;
    border: 0; border-radius: 999px; cursor: pointer;
    color: white; background: var(--sage-dark); text-decoration: none;
    font-weight: 850; box-shadow: 0 14px 30px rgba(63, 98, 89, .25);
}
.btn:hover { filter: brightness(1.05); }
.btn.secondary { color: var(--text); background: var(--cream); }
.text-link { color: var(--sage-dark); font-weight: 850; text-decoration: none; border-bottom: 2px solid rgba(93,128,118,.35); }
.small-btn {
    border: 1px solid var(--line); background: rgba(255,255,255,.58); border-radius: 999px;
    padding: .5rem .8rem; font-weight: 800; cursor: pointer; color: var(--text); white-space: nowrap;
}
.small-btn.danger, .danger { color: #8b2f25; border-color: rgba(139,47,37,.24); }

.section-head { text-align: center; margin: 0 auto 2.2rem; max-width: 780px; }
.section-head .lead { color: rgba(243,236,226,.78); margin-left: auto; margin-right: auto; }
.section-head h1 { color: var(--cream); }
.admin-head { text-align: left; max-width: none; }

.timeline { max-width: 860px; margin: 0 auto 2.5rem; position: relative; }
.timeline::before { content: ''; position: absolute; top: 0; bottom: 0; left: 24px; width: 2px; background: rgba(243,236,226,.26); }
.timeline-item { position: relative; padding-left: 4.4rem; margin-bottom: 1rem; }
.timeline-dot { position: absolute; left: 13px; top: 1.35rem; width: 24px; height: 24px; border-radius: 50%; background: var(--sage); border: 5px solid var(--cream); box-shadow: 0 0 0 6px rgba(102,135,125,.18); }
.timeline-card { background: var(--panel); border: 1px solid rgba(255,255,255,.55); border-radius: 20px; padding: 1.25rem; box-shadow: 0 14px 34px rgba(0,0,0,.16); }
.timeline-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; color: var(--muted); font-weight: 800; margin-bottom: .6rem; }
.timeline-meta strong { color: var(--terracotta); }
.place-label { font-weight: 850; color: var(--sage-dark); margin: -.4rem 0 .2rem; }
.bring-panel { max-width: 980px; margin: 0 auto; }
.bring-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.bring-grid div { background: rgba(255,255,255,.38); border: 1px solid var(--line); border-radius: 16px; padding: 1rem; }

.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.place-card p:last-child { margin-bottom: 0; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; margin: 0 0 1.5rem; }
.stats-grid.inside { margin: 0 0 1rem; }
.stat { background: rgba(237,231,220,.96); border: 1px solid rgba(255,255,255,.44); border-radius: 20px; padding: 1.15rem; box-shadow: 0 10px 25px rgba(0,0,0,.14); }
.stat span { display: block; color: var(--muted); font-weight: 750; margin-bottom: .4rem; }
.stat strong { display: block; color: #182521; font-size: 1.65rem; letter-spacing: -.04em; }
.stat .ref-text { font-size: 1.05rem; letter-spacing: 0; overflow-wrap: anywhere; }

.grid-form { display: grid; gap: 1rem; }
.grid-form label, .inline-form label { display: grid; gap: .45rem; font-weight: 800; color: #2d3c38; }
input, textarea, select {
    width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: .82rem .9rem;
    background: rgba(255,255,255,.72); color: var(--text); font: inherit;
}
textarea { resize: vertical; }
.auth-card, .install-panel { max-width: 580px; margin: 0 auto; }
.install-wrap { width: min(780px, 92vw); margin: 0 auto; padding: 4rem 0; }
.code-box { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.alert { border-radius: 16px; padding: .9rem 1rem; margin: 0 0 1rem; font-weight: 750; }
.alert-success { background: rgba(99, 145, 121, .18); color: #24493b; border: 1px solid rgba(99,145,121,.28); }
.alert-danger { background: rgba(177, 77, 66, .15); color: #7d2f27; border: 1px solid rgba(177,77,66,.25); }
.alert-warning { background: rgba(182, 116, 75, .14); color: #855634; border: 1px solid rgba(182,116,75,.25); }

.simple-table { width: 100%; border-collapse: collapse; }
.simple-table th, .simple-table td { padding: .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.simple-table th { color: var(--muted); font-size: .9rem; width: 190px; }
.simple-table .total-row th, .simple-table .total-row td { background: rgba(102,135,125,.10); }
.table-scroll { overflow-x: auto; }
.wide { min-width: 850px; }
.copy-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.copy-row code { overflow-wrap: anywhere; }
.bank-details { margin-top: 1rem; }
.progress { height: 16px; background: rgba(36,48,45,.12); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--sage), var(--terracotta)); border-radius: inherit; }
.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; margin-top: 1.4rem; }
.payment-box { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }

.tabs { display: flex; flex-wrap: wrap; gap: .65rem; margin: 0 0 1.4rem; }
.tabs a { text-decoration: none; background: rgba(237,231,220,.15); color: var(--cream); border: 1px solid rgba(255,255,255,.16); padding: .7rem 1rem; border-radius: 999px; font-weight: 850; }
.tabs a.active { background: var(--cream); color: var(--sage-dark); }
.admin-add-grid { display: grid; grid-template-columns: 1.4fr .8fr .9fr .9fr 1.2fr auto; gap: .8rem; align-items: center; }
.form-row.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .8rem; }
.add-guest-form { display: grid; gap: 1rem; }
.option-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .6rem; }
.option-grid label {
    display: flex; align-items: center; gap: .45rem;
    padding: .62rem .7rem; border: 1px solid var(--line); border-radius: 14px;
    background: rgba(255,255,255,.38); font-weight: 800; font-size: .92rem;
}
.option-grid input { width: auto; accent-color: var(--sage-dark); }
.option-grid.compact { grid-template-columns: repeat(7, minmax(0, 1fr)); margin-top: .75rem; }
.guest-rows { display: grid; gap: .8rem; }
.guest-row-card { background: rgba(255,255,255,.30); border: 1px solid var(--line); border-radius: 18px; padding: .9rem; }
.guest-row-top { display: grid; grid-template-columns: minmax(210px, .9fr) minmax(260px, 1.4fr) auto; gap: .8rem; align-items: center; }
.guest-identity { display: grid; gap: .4rem; }
.login-hint { color: var(--muted); font-weight: 800; font-size: .85rem; padding-left: .15rem; }
.guest-login-tools { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.guest-actions { display: flex; gap: .5rem; justify-content: flex-end; }
.diet-box { margin-top: .75rem; color: var(--muted); background: rgba(255,255,255,.28); border: 1px solid var(--line); border-radius: 14px; padding: .7rem; }
.tag { display: inline-block; padding: .15rem .4rem; border-radius: 999px; background: rgba(183,120,87,.16); color: #815333; font-size: .75rem; font-weight: 900; }

.landing-body { display: flex; align-items: center; justify-content: center; padding: clamp(1.25rem, 4vw, 3rem); }
.minimal-landing {
    width: min(620px, 100%); text-align: center; padding: clamp(2rem, 6vw, 4rem);
    border-radius: 30px; background: rgba(237, 231, 220, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.35); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}
.minimal-mark {
    width: 52px; height: 52px; margin: 0 auto 1.25rem; border-radius: 18px;
    display: flex; align-items: center; justify-content: center; background: var(--sage-dark); color: #fff; font-weight: 900;
    box-shadow: 0 14px 34px rgba(63, 98, 89, 0.28);
}
.minimal-landing h1 { margin-bottom: .85rem; font-size: clamp(2rem, 6vw, 4.2rem); color: #182521; }
.minimal-date { margin: 0 0 1.75rem; color: var(--muted); font-size: clamp(1.05rem, 2.5vw, 1.35rem); font-weight: 850; }
.minimal-note { margin: 1.25rem 0 0; color: var(--muted); font-size: .95rem; }

@media (max-width: 1050px) {
    .option-grid, .option-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .guest-row-top { grid-template-columns: 1fr; }
    .guest-actions { justify-content: flex-start; }
    .admin-add-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .topbar { align-items: flex-start; flex-direction: column; }
    .nav { justify-content: flex-start; }
    .two-col, .card-grid, .bring-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-row.three, .guest-login-tools { grid-template-columns: 1fr; }
    h1 { font-size: clamp(2.25rem, 12vw, 4rem); }
}
@media (max-width: 560px) {
    .page { width: min(94vw, 1180px); padding: 2rem 0 4rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .timeline::before { left: 15px; }
    .timeline-item { padding-left: 3rem; }
    .timeline-dot { left: 5px; }
    .panel { padding: 1.1rem; }
    .nav { gap: .55rem; font-size: .88rem; }
    .option-grid, .option-grid.compact, .admin-add-grid { grid-template-columns: 1fr; }
    .copy-row { grid-template-columns: 1fr; align-items: start; }
}
