:root {
    --bg-primary: #07111e;
    --bg-secondary: #0b1b2e;
    --card-surface: rgba(9, 20, 35, 0.88);
    --gold: #d4af37;
    --gold-soft: #f1d27a;
    --ivory: #f8f4e8;
    --muted: #c8c2b3;
    --emerald: #0faf9a;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

body {
    background:
        radial-gradient(circle at top left, rgba(212, 175, 55, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(15, 175, 154, 0.15), transparent 22%),
        linear-gradient(180deg, #07111e 0%, #09192d 45%, #07111e 100%);
    color: var(--ivory);
    font-family: "Inter", sans-serif;
    min-height: 100vh;
    position: relative;
}

main {
    min-height: calc(100dvh - 72px);
}

h1, h2, h3, h4, .navbar-brand {
    font-family: "Playfair Display", serif;
}

a {
    color: var(--gold-soft);
}

.ambient-glow {
    position: fixed;
    width: 28rem;
    height: 28rem;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    pointer-events: none;
    z-index: -1;
}

.ambient-glow-one {
    top: 4rem;
    left: -8rem;
    background: rgba(212, 175, 55, 0.28);
}

.ambient-glow-two {
    right: -8rem;
    bottom: 8rem;
    background: rgba(15, 175, 154, 0.18);
}

.announcement-bar {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.16), rgba(212, 175, 55, 0.04));
    color: var(--gold-soft);
    border-bottom: 1px solid rgba(241, 210, 122, 0.18);
    font-size: 0.92rem;
}

.site-navbar {
    backdrop-filter: blur(18px);
    background: rgba(7, 17, 30, 0.82);
    border-bottom: 1px solid rgba(241, 210, 122, 0.12);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28248,244,232,0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-brand, .nav-link {
    color: var(--ivory) !important;
}

.nav-link {
    opacity: 0.86;
}

.nav-link:hover {
    color: var(--gold-soft) !important;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
    color: #09111d;
    border: 0;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.28);
}

.btn-gold:hover {
    color: #09111d;
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(212, 175, 55, 0.34);
}

.btn-profile {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(241, 210, 122, 0.16);
    color: var(--ivory);
}

.btn-profile svg {
    width: 18px;
    height: 18px;
}

.hero-section,
.page-hero,
.content-section,
.quote-section {
    padding: 4rem 0;
}

.viewport-page {
    min-height: calc(100dvh - 150px);
    display: flex;
    align-items: center;
    padding: 1rem 0 1.5rem;
}

.landing-hero {
    position: relative;
    overflow: hidden;
}

.member-hero {
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(7, 17, 30, 0.45) 0%, rgba(7, 17, 30, 0.72) 100%),
        linear-gradient(90deg, rgba(7, 17, 30, 0.78) 0%, rgba(7, 17, 30, 0.28) 55%, rgba(7, 17, 30, 0.72) 100%),
        url("../images/invite-background.png") center center / cover no-repeat;
    z-index: 0;
}

.member-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(5, 11, 20, 0.70) 0%, rgba(5, 11, 20, 0.86) 100%),
        linear-gradient(90deg, rgba(7, 17, 30, 0.58) 0%, rgba(7, 17, 30, 0.22) 52%, rgba(7, 17, 30, 0.68) 100%),
        radial-gradient(circle at 18% 16%, rgba(212, 175, 55, 0.20), transparent 32%),
        radial-gradient(circle at 84% 12%, rgba(241, 210, 122, 0.14), transparent 28%),
        radial-gradient(circle at 55% 88%, rgba(15, 175, 154, 0.10), transparent 30%),
        url("../images/member-background.png") center center / cover no-repeat;
    z-index: 0;
}

.landing-hero .container {
    position: relative;
    z-index: 1;
}

.member-hero .container {
    position: relative;
    z-index: 1;
}

.viewport-page .container {
    width: 100%;
}

.viewport-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.screen-card {
    padding: 1.35rem;
}

.screen-card h3,
.screen-card p:last-child {
    margin-bottom: 0;
}

.fit-panel {
    max-height: 32vh;
    overflow: auto;
    padding-right: 0.35rem;
}

.fit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.member-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.35fr) minmax(280px, 0.75fr);
    gap: 1rem;
    align-items: stretch;
}

.side-stack {
    display: grid;
    gap: 0.85rem;
    align-content: start;
    align-self: start;
}

.side-box {
    padding: 1rem 1rem 0.95rem;
}

.side-box h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.mini-copy {
    font-size: 0.92rem;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 1px solid rgba(241, 210, 122, 0.18);
    color: var(--gold-soft);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
}

.inline-edit-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 180px;
}

.inline-edit-form .form-control {
    min-width: 0;
}

.compact-hero {
    padding-bottom: 2rem;
}

.eyebrow,
.section-kicker {
    color: var(--gold-soft);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    margin-bottom: 1rem;
}

.display-title {
    font-size: clamp(2.6rem, 8vw, 5.4rem);
    line-height: 0.98;
    margin-bottom: 1.25rem;
}

.hero-copy,
.muted-text,
p,
li,
.form-text {
    color: var(--muted);
}

.hero-copy {
    max-width: 38rem;
    font-size: 1rem;
    margin-bottom: 1.25rem;
}

.hero-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.meta-card,
.countdown-card,
.lux-card,
.gallery-card,
.summary-card,
.success-banner {
    background: var(--card-surface);
    border: 1px solid rgba(241, 210, 122, 0.12);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.meta-card {
    padding: 1rem;
}

.meta-label {
    display: block;
    font-size: 0.78rem;
    color: var(--gold-soft);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 0.35rem;
}

.countdown-card,
.lux-card {
    padding: 1.75rem;
}

.rsvp-toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.toggle-card {
    display: block;
    cursor: pointer;
}

.toggle-card input {
    display: none;
}

.toggle-card span {
    display: flex;
    align-items: center;
    min-height: 140px;
    padding: 1.4rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(241, 210, 122, 0.14);
    border-radius: 20px;
    color: var(--ivory);
    font-weight: 600;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.toggle-card input:checked + span {
    border-color: rgba(241, 210, 122, 0.6);
    box-shadow: 0 16px 32px rgba(212, 175, 55, 0.16);
    transform: translateY(-2px);
}

.compact-rsvp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.compact-toggle span {
    min-height: 90px;
    padding: 0.9rem;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.compact-toggle strong {
    font-size: 1rem;
}

.compact-toggle small {
    color: var(--muted);
    margin-top: 0.2rem;
}

.happy-toggle span {
    background:
        linear-gradient(rgba(7, 17, 30, 0.55), rgba(7, 17, 30, 0.65)),
        radial-gradient(circle at top, rgba(241, 210, 122, 0.38), transparent 45%);
}

.mellow-toggle span {
    background:
        linear-gradient(rgba(7, 17, 30, 0.65), rgba(7, 17, 30, 0.72)),
        radial-gradient(circle at bottom, rgba(200, 194, 179, 0.16), transparent 38%);
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.countdown-grid div {
    padding: 1rem 0.5rem;
    text-align: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
}

.countdown-grid span {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ivory);
}

.countdown-grid small {
    color: var(--muted);
}

.quote-card {
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(241, 210, 122, 0.2);
    border-bottom: 1px solid rgba(241, 210, 122, 0.2);
}

.quote-mark {
    font-size: 4rem;
    line-height: 1;
    color: var(--gold);
    margin-bottom: 1rem;
}

blockquote {
    font-family: "Playfair Display", serif;
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    color: var(--ivory);
    max-width: 52rem;
    margin: 0 auto;
}

.amount-pill {
    font-size: 2.6rem;
    color: var(--gold-soft);
    font-family: "Playfair Display", serif;
    margin-bottom: 1rem;
}

.gold-divider {
    border-color: rgba(241, 210, 122, 0.16);
    opacity: 1;
}

.content-list li {
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.gallery-card {
    overflow: hidden;
    height: 100%;
}

.gallery-visual {
    height: 140px;
    background:
        radial-gradient(circle at 20% 20%, rgba(241, 210, 122, 0.28), transparent 25%),
        radial-gradient(circle at 78% 30%, rgba(15, 175, 154, 0.18), transparent 20%),
        linear-gradient(135deg, rgba(12, 28, 46, 0.92), rgba(8, 15, 28, 0.92));
}

.table-fit {
    max-height: 20vh;
    overflow: auto;
}

.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(241, 210, 122, 0.14);
    color: var(--ivory);
    border-radius: 16px;
    padding: 0.9rem 1rem;
}

.form-control:focus,
.form-select:focus {
    background: rgba(255, 255, 255, 0.05);
    color: var(--ivory);
    border-color: rgba(241, 210, 122, 0.42);
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.12);
}

.form-label {
    color: var(--ivory);
}

.summary-card {
    padding: 1rem 1.2rem;
    min-height: 100%;
}

.summary-card span {
    display: block;
    color: var(--muted);
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
}

.summary-card strong {
    font-size: 1.7rem;
    color: var(--ivory);
}

.admin-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ivory);
    --bs-table-border-color: rgba(255, 255, 255, 0.08);
}

.member-table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(241, 210, 122, 0.55) rgba(255, 255, 255, 0.06);
}

.member-table-wrap::-webkit-scrollbar {
    height: 12px;
}

.member-table-wrap::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
}

.member-table-wrap::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.85), rgba(241, 210, 122, 0.85));
    border-radius: 999px;
    border: 2px solid rgba(7, 17, 30, 0.2);
}

.member-table-wrap .admin-table {
    min-width: 1280px;
}

.admin-table thead th {
    color: var(--gold-soft);
    font-weight: 600;
    border-bottom-width: 1px;
    white-space: nowrap;
}

.admin-table td {
    vertical-align: middle;
}

.activity-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.activity-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(241, 210, 122, 0.14);
    color: var(--ivory);
    line-height: 1.2;
}

.action-pill {
    border-radius: 999px;
    padding: 0.5rem 0.9rem;
    white-space: nowrap;
    font-weight: 600;
    min-height: 42px;
}

.flash-stack {
    position: relative;
    z-index: 2;
}

.success-banner {
    padding: 1rem 1.25rem;
    color: var(--ivory);
}

.mobile-cta,
.whatsapp-float {
    position: fixed;
    z-index: 20;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: var(--shadow);
}

.mobile-cta {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    background: linear-gradient(135deg, var(--gold), var(--gold-soft));
    color: #07111e;
    text-align: center;
    font-weight: 700;
    padding: 0.95rem 1rem;
}

.whatsapp-float {
    right: 1rem;
    bottom: 5rem;
    background: rgba(15, 175, 154, 0.9);
    color: white;
    padding: 0.85rem 1rem;
}

.site-footer {
    padding: 1rem 0 4.5rem;
    border-top: 1px solid rgba(241, 210, 122, 0.08);
    margin-top: 0;
}

.fade-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.success-modal .modal-content {
    background: transparent;
    border: 0;
}

.profile-modal-card {
    background: var(--card-surface);
    border: 1px solid rgba(241, 210, 122, 0.12);
    border-radius: var(--radius);
    color: var(--ivory);
}

.debug-output {
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--ivory);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(241, 210, 122, 0.1);
    border-radius: 16px;
    padding: 1rem;
    font-size: 0.92rem;
}

@media (min-width: 992px) {
    .hero-section {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .page-hero {
        padding-top: 1rem;
        padding-bottom: 0.75rem;
    }

    .display-title {
        max-width: 9ch;
        font-size: clamp(2.3rem, 4.4vw, 4.2rem);
    }

    .countdown-card,
    .lux-card {
        padding: 1.35rem;
    }

    .fit-panel {
        max-height: 52vh;
    }

    .member-layout .lux-card.fit-panel {
        min-height: 62vh;
    }

    .mobile-cta {
        display: none;
    }

    .whatsapp-float {
        bottom: 2rem;
    }

    .site-footer {
        padding: 0.85rem 0;
    }
}

@media (max-width: 576px) {
    main {
        min-height: calc(100dvh - 60px);
    }

    .viewport-page {
        min-height: calc(100dvh - 132px);
        align-items: stretch;
        padding: 0.5rem 0 1rem;
    }

    .countdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rsvp-toggle-grid {
        grid-template-columns: 1fr;
    }

    .fit-grid {
        grid-template-columns: 1fr;
    }

    .member-layout {
        grid-template-columns: 1fr;
    }

    .fit-panel,
    .table-fit {
        max-height: none;
    }

    .quote-card,
    .countdown-card,
    .lux-card {
        padding: 1.05rem;
    }
}
