@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Palette pulled from the official 19th Charter Day seal & banner */
    --navy: #1B3B6F;
    --navy-dark: #10254A;
    --gold: #F2B705;
    --gold-light: #FCE9AE;
    --green: #1B8A5A;
    --green-dark: #12613F;
    --red: #D62828;
    --cream: #FFFBF2;
    --ink: #26241E;
    --muted: #8A8272;
    --rainbow: linear-gradient(90deg, #D62828 0%, #F2B705 25%, #1B8A5A 50%, #1B3B6F 75%, #7B2CBF 100%);
}

/* ---------- Splash Screen ---------- */

body:not(.splash-done) .invitation-container {
    opacity: 0;
    pointer-events: none;
}

body:not(.splash-done) .invitation-card .anim-item,
body:not(.splash-done) .invitation-card .anim-detail,
body:not(.splash-done) .invitation-card .anim-form,
body:not(.splash-done) .invitation-card .anim-logo {
    animation: none !important;
    opacity: 0;
}

body.splash-done .invitation-container {
    opacity: 1;
    pointer-events: auto;
}

body.splash-done .invitation-card {
    animation: cardIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.splash-done .hero-section .anim-logo {
    animation: logoIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

body.splash-done .hero-section .anim-item:nth-child(2) {
    animation: fadeUp 0.5s ease-out 0.4s both;
}

body.splash-done .hero-section .anim-item:nth-child(3) {
    animation: fadeUp 0.5s ease-out 0.55s both;
}

body.splash-done .hero-section .anim-item:nth-child(4) {
    animation: fadeUp 0.5s ease-out 0.7s both;
}

body.splash-done .hero-section .anim-item:nth-child(5) {
    animation: fadeUp 0.5s ease-out 0.85s both;
}

body.splash-done .hero-section .event-date {
    animation: fadeUp 0.5s ease-out 0.95s both, pulse 3s ease-in-out 2.2s infinite;
}

body.splash-done .event-details .anim-detail:nth-child(1) {
    animation: slideRight 0.5s ease-out 1.1s both;
}

body.splash-done .event-details .anim-detail:nth-child(2) {
    animation: slideRight 0.5s ease-out 1.25s both;
}

body.splash-done .event-details .anim-detail:nth-child(3) {
    animation: slideRight 0.5s ease-out 1.4s both;
}

body.splash-done .form-section.anim-form {
    animation: fadeUp 0.6s ease-out 1.55s both;
}

.thankyou-page.transition-done .invitation-container .invitation-card {
    opacity: 1;
    pointer-events: auto;
    animation: fadeUp 0.6s ease-out both;
}

.transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 30%, rgba(242, 183, 5, 0.18) 0%, transparent 50%),
        linear-gradient(160deg, #10254A 0%, #1B3B6F 55%, #0D1B36 100%);
    padding: 20px;
}

.transition-card {
    background: var(--cream);
    border-radius: 28px;
    padding: 50px 40px 40px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0,0,0,0.45);
    border: 1px solid rgba(242, 183, 5, 0.3);
    animation: splashCardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.transition-spinner {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 28px;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border: 5px solid #E8E2D0;
    border-top-color: var(--gold);
    border-right-color: var(--navy);
    border-radius: 50%;
    animation: spinRing 1s linear infinite;
}

@keyframes spinRing {
    to { transform: rotate(360deg); }
}

.spinner-check {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--green);
    opacity: 0;
    transform: scale(0.3);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.spinner-check.show {
    opacity: 1;
    transform: scale(1);
}

.spinner-check.show ~ .spinner-ring {
    border-color: var(--green);
    animation: none;
    border-width: 4px;
}

.transition-title {
    font-family: 'Baloo 2', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 10px;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.05);
}

.transition-sub {
    color: #7A7268;
    font-size: 14.5px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.transition-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.transition-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold);
    animation: dotPulse 1.4s ease-in-out infinite;
}

.transition-dots span:nth-child(2) { animation-delay: 0.2s; }
.transition-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.transition-hide {
    animation: splashFadeOut 0.6s ease-in forwards;
}

@media (max-width: 560px) {
    .transition-card {
        padding: 38px 26px 32px;
        border-radius: 22px;
    }

    .transition-spinner {
        width: 74px;
        height: 74px;
    }

    .spinner-check {
        font-size: 32px;
    }

    .transition-title {
        font-size: 22px;
    }
}

/* ---------- Splash Screen (index) ---------- */

.splash-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 30%, rgba(242, 183, 5, 0.18) 0%, transparent 50%),
        linear-gradient(160deg, #10254A 0%, #1B3B6F 55%, #0D1B36 100%);
    padding: 20px;
    animation: splashBgIn 0.8s ease-out both;
}

body:not(.splash-done) .invitation-container {
    opacity: 0;
    pointer-events: none;
}

body.splash-done .invitation-container {
    opacity: 1;
    pointer-events: auto;
    animation: fadeUp 0.6s ease-out both;
}

@keyframes splashBgIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.splash-card {
    background: var(--cream);
    border-radius: 28px;
    padding: 50px 40px 40px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0,0,0,0.45);
    border: 1px solid rgba(242, 183, 5, 0.3);
    animation: splashCardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

@keyframes splashCardIn {
    from { opacity: 0; transform: translateY(50px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.splash-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid var(--gold);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    margin-bottom: 24px;
    animation: logoIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both;
}

.splash-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.splash-divider {
    width: 100%;
    max-width: 180px;
    height: 3px;
    margin: 0 auto 24px;
    background: var(--rainbow);
    border-radius: 3px;
    opacity: 0.85;
    animation: fadeUp 0.6s ease-out 0.7s both;
}

.splash-title {
    font-family: 'Baloo 2', sans-serif;
    font-size: 34px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 16px;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.05);
    animation: fadeUp 0.6s ease-out 0.8s both;
}

.splash-message {
    color: #5C5647;
    font-size: 15.5px;
    line-height: 1.7;
    margin-bottom: 10px;
    animation: fadeUp 0.6s ease-out 0.9s both;
}

.splash-submessage {
    color: #7A7268;
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 30px;
    animation: fadeUp 0.6s ease-out 1s both;
}

.splash-btn {
    display: inline-block;
    padding: 14px 42px;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'Baloo 2', sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: background 0.25s, transform 0.15s, box-shadow 0.25s;
    box-shadow: 0 6px 20px rgba(27, 59, 111, 0.35);
    animation: popIn 0.5s ease-out 1.1s both;
}

.splash-btn:hover {
    background: var(--navy-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(27, 59, 111, 0.45);
}

.splash-btn:active {
    transform: translateY(0);
}

.splash-footer {
    margin-top: 28px;
    font-size: 11.5px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.4px;
    animation: fadeUp 0.6s ease-out 1.2s both;
}

.splash-hide {
    animation: splashFadeOut 0.6s ease-in forwards;
}

@keyframes splashFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; pointer-events: none; }
}

@media (max-width: 560px) {
    .splash-card {
        padding: 38px 26px 32px;
        border-radius: 22px;
    }

    .splash-logo {
        width: 90px;
        height: 90px;
        margin-bottom: 18px;
    }

    .splash-title {
        font-size: 28px;
    }

    .splash-message {
        font-size: 14px;
    }

    .splash-submessage {
        font-size: 13px;
    }
}

/* ---------- Animations ---------- */

@keyframes cardIn {
    from { opacity: 0; transform: translateY(40px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes logoIn {
    0%  { opacity: 0; transform: scale(0.3) rotate(-15deg); }
    60% { opacity: 1; transform: scale(1.1) rotate(3deg); }
    100%{ opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    0%  { opacity: 0; transform: scale(0.6); }
    70% { opacity: 1; transform: scale(1.08); }
    100%{ opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes slideRight {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes ribbonIn {
    from { transform: rotate(-2deg) scaleX(0); }
    to   { transform: rotate(-2deg) scaleX(1); }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(0,0,0,0.25); }
    50%      { box-shadow: 0 4px 22px rgba(242, 183, 5, 0.5); }
}

.anim-card {
    animation: cardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.anim-logo {
    animation: logoIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.anim-item {
    opacity: 0;
    animation: fadeUp 0.6s ease-out var(--d, 0s) both;
}

.hero-section::after {
    transform-origin: center;
    animation: ribbonIn 0.8s ease-out 0.7s both;
}

.anim-detail {
    opacity: 0;
    animation: slideRight 0.7s ease-out var(--d, 0s) both;
}

.anim-form {
    opacity: 0;
    animation: fadeUp 0.6s ease-out 0.9s both;
}

.anim-btn {
    position: relative;
    overflow: hidden;
}

.anim-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        transparent 25%,
        rgba(255,255,255,0.18) 50%,
        transparent 75%
    );
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out 1.5s infinite;
}

.hero-section .event-date {
    animation: fadeUp 0.6s ease-out 0.55s both, pulse 3s ease-in-out 1.8s infinite;
}

@media (prefers-reduced-motion: reduce) {
    .anim-card, .anim-logo, .anim-item, .anim-detail,
    .anim-form, .anim-btn, .hero-section .event-date,
    .hero-section::after,
    .splash-overlay, .splash-card, .splash-logo, .splash-divider,
    .splash-title, .splash-message, .splash-submessage,
    .splash-btn, .splash-footer, .splash-hide,
    .transition-overlay, .transition-card, .transition-spinner,
    .spinner-ring, .spinner-check, .transition-title,
    .transition-sub, .transition-dots, .transition-hide {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .spinner-ring { border-color: var(--green) !important; }
    body:not(.splash-done) .invitation-container,
    body:not(.splash-done) .invitation-card .anim-item,
    body:not(.splash-done) .invitation-card .anim-detail,
    body:not(.splash-done) .invitation-card .anim-form,
    body:not(.splash-done) .invitation-card .anim-logo,
    .thankyou-page:not(.transition-done) .invitation-container .invitation-card {
        opacity: 0;
    }
    body.splash-done .invitation-container {
        opacity: 1 !important;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--navy-dark);
    background-image:
        radial-gradient(circle at 15% 20%, rgba(242, 183, 5, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(27, 138, 90, 0.15) 0%, transparent 45%),
        linear-gradient(135deg, #10254A 0%, #1B3B6F 55%, #0D1B36 100%);
    min-height: 100vh;
    color: var(--ink);
}

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

.invitation-card {
    background: var(--cream);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0,0,0,0.4);
    margin: 30px 0;
    border: 1px solid rgba(242, 183, 5, 0.25);
}

/* ---------- Hero ---------- */

.hero-section {
    position: relative;
    background:
        radial-gradient(circle at 50% 0%, rgba(242, 183, 5, 0.25) 0%, transparent 55%),
        linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
    padding: 46px 30px 34px;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

/* confetti ribbon signature element — echoes the swoosh under the "19" in the seal */
.hero-section::after {
    content: "";
    position: absolute;
    left: -10%;
    right: -10%;
    bottom: -30px;
    height: 60px;
    background: var(--rainbow);
    transform: rotate(-2deg);
    opacity: 0.9;
    filter: blur(0.3px);
}

.logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    padding: 8px;
}

.hero-section .logo-badge {
    width: 128px;
    height: 128px;
    border: 4px solid var(--gold);
    margin-bottom: 18px;
}

.logo-badge img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.hero-section .logo-text {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold-light);
    font-weight: 600;
    margin-bottom: 10px;
}

.hero-section h1 {
    font-family: 'Baloo 2', sans-serif;
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

.hero-section .subtitle {
    font-family: 'Baloo 2', sans-serif;
    font-size: 19px;
    font-weight: 500;
    margin-bottom: 18px;
    color: var(--gold-light);
}

.hero-section .event-date {
    display: inline-block;
    background: var(--gold);
    color: var(--navy-dark);
    padding: 9px 26px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

/* ---------- Event details strip ---------- */

.event-details {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 34px 30px 22px;
    background: var(--cream);
    border-bottom: 1px solid #efe8d6;
}

.event-details .detail-item {
    text-align: center;
    flex: 1;
}

.event-details .detail-item .icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    border-radius: 50%;
    font-size: 20px;
    background: var(--gold-light);
}

.event-details .detail-item:nth-child(1) .icon { background: #DFF3E8; }
.event-details .detail-item:nth-child(2) .icon { background: #FCE9AE; }
.event-details .detail-item:nth-child(3) .icon { background: #FADADA; }

.event-details .detail-item .label {
    font-size: 10.5px;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 1px;
    font-weight: 600;
}

.event-details .detail-item .value {
    font-family: 'Baloo 2', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    margin-top: 2px;
}

/* ---------- Form ---------- */

.form-section {
    padding: 30px;
}

.form-section .intro {
    text-align: center;
    margin-bottom: 26px;
    color: #5C5647;
    line-height: 1.65;
    font-size: 14.5px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
}

.form-group label .required {
    color: var(--red);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E8E2D0;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.25s, box-shadow 0.25s;
    font-family: inherit;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(27, 59, 111, 0.12);
}

.radio-group {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.radio-option {
    flex: 1;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.radio-option label {
    display: block;
    padding: 13px 16px;
    border: 2px solid #E8E2D0;
    border-radius: 10px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}

.radio-option input[type="radio"]:checked + label.attending {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}

.radio-option input[type="radio"]:checked + label.not-attending {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

.btn {
    width: 100%;
    padding: 15px;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Baloo 2', sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.25s, transform 0.15s;
}

.btn:hover {
    background: var(--navy-dark);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.form-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 18px;
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.3px;
    position: relative;
}

.form-footer::before {
    content: "";
    display: block;
    width: 100%;
    max-width: 240px;
    height: 3px;
    margin: 0 auto 14px;
    background: var(--rainbow);
    border-radius: 3px;
    opacity: 0.85;
}

/* ---------- Thank-you / seating ---------- */

.thankyou-section {
    padding: 50px 30px;
    text-align: center;
}

.thankyou-section .check-icon {
    font-size: 60px;
    margin-bottom: 18px;
}

.thankyou-section h2 {
    font-family: 'Baloo 2', sans-serif;
    font-size: 28px;
    color: var(--green-dark);
    margin-bottom: 10px;
}

.thankyou-section p {
    color: #665F4F;
    line-height: 1.6;
    font-size: 16px;
    max-width: 450px;
    margin: 0 auto;
}

.seating-card {
    position: relative;
    background: linear-gradient(160deg, #FFF9EB 0%, var(--gold-light) 50%, #FFF3D0 100%);
    border: 3px solid var(--gold);
    border-radius: 20px;
    padding: 32px 24px 28px;
    margin: 25px auto;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(242, 183, 5, 0.25), inset 0 1px 0 rgba(255,255,255,0.6);
    overflow: visible;
}

.seating-card::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 28px;
    background: var(--gold);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 10px rgba(242, 183, 5, 0.3);
}

.seating-card::after {
    content: "\2605";
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.seating-card .seat-icon {
    font-size: 40px;
    margin-bottom: 6px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.seating-card h3 {
    font-family: 'Baloo 2', sans-serif;
    font-size: 15px;
    color: #8E6B1A;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.seating-card .table-number {
    font-family: 'Baloo 2', sans-serif;
    font-size: 52px;
    font-weight: 800;
    color: var(--navy);
    margin: 4px 0;
    line-height: 1;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
}

.seating-card .seat-label {
    font-size: 13px;
    color: #8E6B1A;
    font-weight: 600;
    padding: 4px 14px;
    background: rgba(255,255,255,0.6);
    border-radius: 20px;
    display: inline-block;
    margin-top: 4px;
}

.not-found-section {
    padding: 40px 30px;
    text-align: center;
}

.not-found-section .icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.not-found-section h3 {
    font-family: 'Baloo 2', sans-serif;
    font-size: 21px;
    color: #C77317;
    margin-bottom: 10px;
}

.not-found-section p {
    color: #7A7268;
    line-height: 1.6;
}

/* ---------- Admin ---------- */

.admin-body {
    background: #F1F2F6;
}

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

.admin-header {
    background: #fff;
    border-radius: 14px;
    padding: 20px 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 4px solid var(--navy);
}

.admin-header h1 {
    font-family: 'Baloo 2', sans-serif;
    font-size: 23px;
    color: var(--navy-dark);
}

.admin-header .admin-nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

.admin-header .admin-nav a {
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.25s;
}

.admin-header .admin-nav a:hover,
.admin-header .admin-nav a.active {
    background: var(--navy);
    color: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    text-align: center;
    border-bottom: 3px solid var(--gold);
}

.stat-card .stat-number {
    font-family: 'Baloo 2', sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: var(--navy);
}

.stat-card .stat-label {
    font-size: 13px;
    color: #8A8A8A;
    margin-top: 5px;
    font-weight: 600;
}

.data-table {
    width: 100%;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--navy);
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    color: #fff;
    letter-spacing: 0.6px;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.data-table tr:hover td {
    background: #FBF9F2;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.badge-attending {
    background: #D9F0E3;
    color: var(--green-dark);
}

.badge-not-attending {
    background: #FADADA;
    color: #A31E1E;
}

.login-container {
    max-width: 420px;
    margin: 100px auto;
    padding: 40px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    border-top: 5px solid var(--gold);
}

.login-container h1 {
    font-family: 'Baloo 2', sans-serif;
    text-align: center;
    color: var(--navy-dark);
    margin-bottom: 30px;
    font-size: 27px;
}

.form-error {
    background: #FADADA;
    color: #A31E1E;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert {
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #D9F0E3;
    color: var(--green-dark);
    border: 1px solid #B7E2CA;
}

.alert-info {
    background: #DCE8F5;
    color: var(--navy);
    border: 1px solid #C0D6EE;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

/* ---------- Filter bar ---------- */

.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-btn {
    text-decoration: none;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.25s;
    background: var(--muted);
    color: #fff;
}

.filter-btn:hover {
    opacity: 0.85;
}

.filter-btn.active-all {
    background: var(--navy);
}

.filter-btn.active-attending {
    background: var(--green);
}

.filter-btn.active-not {
    background: var(--red);
}

.search-form {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.search-form input {
    padding: 8px 16px;
    border: 2px solid #E8E2D0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}

.search-form input:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(27, 59, 111, 0.12);
}

/* ---------- Table grid (guests) ---------- */

.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.table-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.table-card h3 {
    background: var(--navy);
    color: #fff;
    padding: 12px 20px;
    font-size: 15px;
    font-family: 'Baloo 2', sans-serif;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.3px;
}

.table-card table {
    width: 100%;
    border-collapse: collapse;
}

.table-card th {
    background: var(--cream);
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.table-card td {
    padding: 6px 10px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    vertical-align: middle;
}

.table-card tr:last-child td {
    border-bottom: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    .invitation-container {
        padding: 12px;
    }

    .invitation-card {
        border-radius: 18px;
        margin: 16px 0;
    }

    .hero-section {
        padding: 36px 20px 30px;
    }

    .hero-section::after {
        bottom: -20px;
        height: 45px;
    }

    .hero-section .logo-badge {
        width: 100px;
        height: 100px;
        border-width: 3px;
        margin-bottom: 14px;
    }

    .hero-section .logo-text {
        font-size: 11px;
        letter-spacing: 2px;
    }

    .hero-section h1 {
        font-size: 28px;
    }

    .hero-section .subtitle {
        font-size: 16px;
        margin-bottom: 14px;
    }

    .hero-section .event-date {
        font-size: 13px;
        padding: 7px 20px;
    }

    .event-details {
        flex-direction: row;
        gap: 10px;
        padding: 18px 16px 14px;
    }

    .event-details .detail-item {
        text-align: center;
        flex: 1;
    }

    .event-details .detail-item .icon {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 15px;
        margin-bottom: 4px;
    }

    .event-details .detail-item .label {
        font-size: 9px;
        letter-spacing: 0.5px;
        margin-bottom: 1px;
    }

    .event-details .detail-item .value {
        font-size: 12px;
        line-height: 1.3;
    }

    .form-section {
        padding: 22px 18px;
    }

    .form-section .intro {
        font-size: 13.5px;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .radio-option label {
        padding: 12px 14px;
        font-size: 14px;
    }

    .thankyou-section {
        padding: 36px 20px;
    }

    .thankyou-section h2 {
        font-size: 24px;
    }

    .thankyou-section p {
        font-size: 14px;
    }

    .seating-card {
        margin: 20px 14px;
        padding: 28px 18px 22px;
    }

    .seating-card .table-number {
        font-size: 42px;
    }

    .not-found-section {
        padding: 30px 20px;
    }

    /* ---------- Admin Mobile ---------- */

    .admin-container {
        padding: 12px;
    }

    .admin-header {
        flex-direction: column;
        gap: 14px;
        padding: 16px 18px;
        border-radius: 12px;
    }

    .admin-header > div:first-child {
        width: 100%;
        justify-content: center;
    }

    .admin-header h1 {
        font-size: 18px;
        text-align: center;
    }

    .admin-header .admin-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .admin-header .admin-nav a {
        font-size: 12px;
        padding: 6px 12px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }

    .stat-card {
        padding: 18px 12px;
        border-radius: 12px;
    }

    .stat-card .stat-number {
        font-size: 28px;
    }

    .stat-card .stat-label {
        font-size: 11px;
    }

    .data-table {
        border-radius: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table table {
        min-width: 700px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 12px;
        font-size: 12px;
        white-space: nowrap;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-btn {
        text-align: center;
    }

    .search-form {
        margin-left: 0;
        flex-direction: column;
    }

    .search-form input {
        width: 100%;
    }

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

    .table-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .login-container {
        margin: 40px 16px;
        padding: 28px 22px;
        border-radius: 18px;
    }

    .login-container h1 {
        font-size: 22px;
    }
}

@media (max-width: 400px) {
    .hero-section {
        padding: 28px 16px 24px;
    }

    .hero-section .logo-badge {
        width: 80px;
        height: 80px;
    }

    .hero-section h1 {
        font-size: 24px;
    }

    .hero-section .subtitle {
        font-size: 14px;
    }

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

    .admin-header .admin-nav a {
        font-size: 11px;
        padding: 5px 10px;
    }
}