/* ============================================
   SHAADI EVENTS – Global Styles
   ============================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --gold: #C9A84C;
    --gold-light: #E8C96A;
    --gold-dark: #96732A;
    --red: #8B1A1A;
    --red-deep: #5C0F0F;
    --cream: #FDF6EC;
    --dark: #1A0A0A;
    --mid: #3D1515;
    --text: #3D2020;
    --muted: #8B6B6B;
    --white: #FFFFFF;
    --shadow: rgba(139, 26, 26, 0.18);
    --glass: rgba(253, 246, 236, 0.85);
    --radius: 16px;
    --radius-sm: 10px;
}

body {
    font-family: 'Lato', sans-serif;
    background: var(--cream);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---- Petals Background ---- */
.petals-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.petal {
    position: absolute;
    top: -60px;
    font-size: 22px;
    opacity: 0.55;
    animation: petalFall linear infinite;
}

@keyframes petalFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.55;
    }

    100% {
        transform: translateY(110vh) rotate(720deg);
        opacity: 0;
    }
}

/* ---- Navbar ---- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--red-deep) 0%, var(--red) 100%);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.nav-logo {
    font-family: 'Cinzel', serif;
    color: var(--gold-light);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.nav-admin-btn {
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--red-deep);
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border: none;
    border-radius: 24px;
    padding: 8px 20px;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.nav-admin-btn:hover {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ---- Admin Nav Right ---- */
.admin-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-greeting {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    font-family: 'Lato', sans-serif;
    letter-spacing: 0.3px;
}

.nav-outline {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    font-size: 0.82rem;
    padding: 7px 14px;
}

.nav-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: none;
}

.nav-logout {
    background: linear-gradient(135deg, #b91c1c, #7f1d1d);
    color: var(--white);
    font-size: 0.82rem;
    padding: 7px 16px;
    border-radius: 24px;
    text-decoration: none;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.nav-logout:hover {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(185, 28, 28, 0.4);
}

@media (max-width: 600px) {
    .admin-greeting {
        display: none;
    }

    .admin-nav-right {
        gap: 8px;
    }

    .nav-outline,
    .nav-logout {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
}

/* ---- Hero ---- */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--red-deep) 0%, var(--red) 50%, var(--mid) 100%);
    padding: 70px 24px 80px;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='%23C9A84C' opacity='0.25'/%3E%3C/svg%3E");
    z-index: 0;
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 0.95rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.hero-title {
    font-family: 'Cinzel', serif;
    color: var(--white);
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    margin-bottom: 18px;
}

.hero-desc {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    letter-spacing: 0.5px;
}

/* ---- Form Wrapper ---- */
.form-wrapper {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: -48px auto 60px;
    padding: 0 20px;
}

.form-card {
    background: var(--white);
    border-radius: 24px;
    padding: 48px 44px;
    box-shadow: 0 20px 60px var(--shadow), 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.2);
    position: relative;
    overflow: hidden;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold-dark));
}

.form-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 36px;
}

.form-card-header h2 {
    font-family: 'Cinzel', serif;
    color: var(--red);
    font-size: 1.6rem;
    font-weight: 700;
}

.form-card-icon {
    font-size: 1.4rem;
}

/* ---- Form Grid ---- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--red);
    letter-spacing: 0.5px;
}

.optional {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    color: var(--muted);
    font-size: 0.78rem;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 1rem;
    z-index: 1;
    pointer-events: none;
}

.textarea-icon {
    top: 14px;
    align-self: flex-start;
}

.textarea-wrap {
    align-items: flex-start;
}

.input-wrap input,
.input-wrap select,
.input-wrap textarea {
    width: 100%;
    padding: 13px 16px 13px 42px;
    border: 2px solid #E8D5C4;
    border-radius: var(--radius-sm);
    font-family: 'Lato', sans-serif;
    font-size: 0.97rem;
    color: var(--text);
    background: var(--cream);
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
    outline: none;
    appearance: none;
}

.input-wrap textarea {
    resize: vertical;
    min-height: 90px;
}

.input-wrap input:focus,
.input-wrap select:focus,
.input-wrap textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.15);
    background: var(--white);
}

/* Dropdown arrow */
.input-wrap select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0l6 8 6-8z' fill='%23C9A84C'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* ---- Submit Button ---- */
.submit-btn {
    position: relative;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
    color: var(--gold-light);
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 6px 24px var(--shadow);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--shadow);
}

.submit-btn:active {
    transform: translateY(0);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
}

.submit-btn:hover .btn-shine {
    left: 150%;
}

/* ---- Toast ---- */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: linear-gradient(135deg, var(--red), var(--red-deep));
    color: var(--gold-light);
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    padding: 14px 32px;
    border-radius: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---- Footer ---- */
.footer {
    text-align: center;
    padding: 24px;
    background: var(--red-deep);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.footer a {
    color: var(--gold);
    text-decoration: none;
}

/* ============================================
   ADMIN STYLES
   ============================================ */

.admin-body {
    background: #0F0608;
}

.admin-nav {
    background: linear-gradient(135deg, #0A0305 0%, var(--red-deep) 100%);
}

.admin-header {
    text-align: center;
    padding: 56px 24px 40px;
    background: linear-gradient(135deg, #0F0608 0%, var(--red-deep) 60%, #0F0608 100%);
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
    position: relative;
    overflow: hidden;
}

.admin-header::before {
    content: '👑';
    font-size: 160px;
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.04;
    pointer-events: none;
}

.admin-header h1 {
    font-family: 'Cinzel', serif;
    color: var(--gold-light);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    text-shadow: 0 4px 20px rgba(201, 168, 76, 0.4);
    margin-bottom: 10px;
}

.admin-header p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 1rem;
    letter-spacing: 1px;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* ---- Stats ---- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.08), rgba(139, 26, 26, 0.12));
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.stat-icon {
    font-size: 2rem;
}

.stat-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.78rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.stat-value {
    color: var(--gold-light);
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    font-weight: 700;
}

/* ---- Search Bar ---- */
.search-bar-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}

.search-icon {
    position: absolute;
    left: 16px;
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 1;
}

#searchInput {
    width: 100%;
    padding: 13px 50px 13px 48px;
    background: rgba(255, 255, 255, 0.07);
    border: 1.5px solid rgba(201, 168, 76, 0.3);
    border-radius: 30px;
    color: var(--white);
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

#searchInput:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.12);
}

.clear-btn {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    transition: color 0.2s;
}

.clear-btn:hover {
    color: var(--gold);
}

.filter-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-row select,
.filter-row input[type="date"] {
    background: rgba(255, 255, 255, 0.07);
    border: 1.5px solid rgba(201, 168, 76, 0.3);
    border-radius: 20px;
    color: var(--white);
    padding: 9px 18px;
    font-size: 0.88rem;
    font-family: 'Lato', sans-serif;
    outline: none;
    cursor: pointer;
    transition: border-color 0.3s;
}

.filter-row select option {
    background: #1A0A0A;
}

.filter-row select:focus,
.filter-row input[type="date"]:focus {
    border-color: var(--gold);
}

.filter-row input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(70%) sepia(40%) saturate(400%) hue-rotate(10deg);
    cursor: pointer;
}

.reset-btn,
.export-btn {
    padding: 9px 18px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid;
    transition: all 0.2s;
}

.reset-btn {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
}

.export-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-color: var(--gold);
    color: var(--red-deep);
    margin-left: auto;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 168, 76, 0.3);
}

/* ---- Results Info ---- */
.results-info {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

/* ---- Table ---- */
.table-wrapper {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(201, 168, 76, 0.15);
    border-radius: var(--radius);
    overflow: hidden;
}

.events-table {
    width: 100%;
    border-collapse: collapse;
}

.events-table thead {
    background: linear-gradient(135deg, rgba(139, 26, 26, 0.6), rgba(92, 15, 15, 0.6));
}

.events-table th {
    padding: 14px 16px;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 1px;
    text-align: left;
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
    white-space: nowrap;
}

.events-table td {
    padding: 13px 16px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.events-table tbody tr {
    transition: background 0.2s;
}

.events-table tbody tr:hover {
    background: rgba(201, 168, 76, 0.07);
}

.events-table tbody tr:last-child td {
    border-bottom: none;
}

/* Row number */
.events-table td:first-child {
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Function badge */
.fn-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(201, 168, 76, 0.15);
    color: var(--gold-light);
    border: 1px solid rgba(201, 168, 76, 0.3);
    white-space: nowrap;
}

/* Action buttons */
.action-btns {
    display: flex;
    gap: 8px;
}

.btn-view,
.btn-del {
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
}

.btn-view {
    background: rgba(201, 168, 76, 0.15);
    color: var(--gold-light);
    border: 1px solid rgba(201, 168, 76, 0.3);
}

.btn-view:hover {
    background: rgba(201, 168, 76, 0.3);
    transform: translateY(-2px);
}

.btn-del {
    background: rgba(220, 50, 50, 0.12);
    color: #FF8080;
    border: 1px solid rgba(220, 50, 50, 0.2);
}

.btn-del:hover {
    background: rgba(220, 50, 50, 0.25);
    transform: translateY(-2px);
}

/* ---- Empty State ---- */
.empty-state {
    padding: 60px 24px;
    text-align: center;
}

.empty-state p {
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.empty-state small {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.88rem;
}

/* ---- Modals ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-card {
    background: linear-gradient(135deg, #1A0808, #2A0D0D);
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 20px;
    padding: 40px 36px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        transform: scale(0.88);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.modal-card h3 {
    font-family: 'Cinzel', serif;
    color: var(--gold-light);
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.modal-card p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.95rem;
    margin-bottom: 28px;
}

.modal-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
}

.modal-cancel,
.modal-delete {
    padding: 10px 28px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.modal-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.modal-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

.modal-delete {
    background: linear-gradient(135deg, #C0392B, #8B0000);
    color: var(--white);
}

.modal-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(192, 57, 43, 0.4);
}

/* ---- View Modal ---- */
.view-modal {
    max-width: 520px;
    text-align: left;
    padding: 32px 36px;
}

.view-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.view-modal-header h3 {
    font-family: 'Cinzel', serif;
    color: var(--gold-light);
    font-size: 1.3rem;
    text-align: left;
}

.modal-close {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
}

.view-detail-row {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    align-items: flex-start;
}

.view-detail-row:last-child {
    border-bottom: none;
}

.view-detail-label {
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    color: var(--gold);
    letter-spacing: 0.5px;
    min-width: 120px;
    padding-top: 1px;
}

.view-detail-val {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    flex: 1;
}

/* ---- Highlight search match ---- */
mark {
    background: rgba(201, 168, 76, 0.35);
    color: var(--gold-light);
    border-radius: 3px;
    padding: 0 2px;
}

/* ---- Form error message ---- */
.form-error {
    background: rgba(220, 50, 50, 0.1);
    border: 1px solid rgba(220, 50, 50, 0.3);
    color: #FF8080;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.9rem;
    margin-bottom: 16px;
    text-align: center;
}

/* ---- Disabled submit button ---- */
.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* ---- Admin filter text input ---- */
.filter-text-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-text-icon {
    position: absolute;
    left: 12px;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1;
}

#filterFunction {
    background: rgba(255, 255, 255, 0.07);
    border: 1.5px solid rgba(201, 168, 76, 0.3);
    border-radius: 20px;
    color: var(--white);
    padding: 9px 18px 9px 36px;
    font-size: 0.88rem;
    font-family: 'Lato', sans-serif;
    outline: none;
    transition: border-color 0.3s;
    width: 200px;
}

#filterFunction::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

#filterFunction:focus {
    border-color: var(--gold);
}

/* ---- Loading state ---- */
.loading-state {
    padding: 60px 24px;
    text-align: center;
}

.loading-state p {
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

/* ============================================
   RESPONSIVE – Mobile First
   ============================================ */

/* ── Tablet (≤ 900px) ── */
@media (max-width: 900px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Hide Registered At on large tablet */
    .events-table th:nth-child(8),
    .events-table td:nth-child(8) {
        display: none;
    }
}

/* ── Tablet / Large Mobile (≤ 768px) ── */
@media (max-width: 768px) {

    /* Navbar */
    .navbar {
        padding: 12px 16px;
        gap: 10px;
    }

    .nav-logo {
        font-size: 1.1rem;
    }

    .nav-admin-btn {
        font-size: 0.78rem;
        padding: 7px 14px;
    }

    /* Hero */
    .hero {
        padding: 48px 16px 64px;
    }

    .hero-title {
        font-size: clamp(1.6rem, 7vw, 2.4rem);
    }

    .hero-subtitle {
        font-size: 0.8rem;
        letter-spacing: 2px;
    }

    .hero-desc {
        font-size: 0.9rem;
    }

    /* Form */
    .form-wrapper {
        margin-top: -40px;
        padding: 0 12px;
        margin-bottom: 40px;
    }

    .form-card {
        padding: 28px 18px;
        border-radius: 18px;
    }

    .form-card-header h2 {
        font-size: 1.3rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-bottom: 24px;
    }

    .input-wrap input,
    .input-wrap select,
    .input-wrap textarea {
        font-size: 0.93rem;
        padding: 12px 14px 12px 40px;
    }

    .submit-btn {
        font-size: 1rem;
        padding: 14px 20px;
    }

    /* Admin header */
    .admin-header {
        padding: 40px 16px 28px;
    }

    .admin-header h1 {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
    }

    /* Stats */
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 24px;
    }

    .stat-card {
        padding: 16px;
        gap: 10px;
    }

    .stat-icon {
        font-size: 1.5rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    /* Search bar */
    .search-bar-wrapper {
        padding: 16px;
    }

    .filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    #filterFunction {
        width: 100%;
    }

    .filter-row input[type="date"] {
        width: 100%;
    }

    .reset-btn,
    .export-btn {
        width: 100%;
        text-align: center;
        margin-left: 0;
        padding: 10px;
    }

    /* Table – hide Registered At on tablet (keep Notes visible) */
    .events-table th:nth-child(7),
    .events-table td:nth-child(7),
    .events-table th:nth-child(8),
    .events-table td:nth-child(8) {
        display: none;
    }

    .events-table th,
    .events-table td {
        padding: 11px 10px;
        font-size: 0.82rem;
    }

    .action-btns {
        flex-direction: column;
        gap: 5px;
    }

    .btn-view,
    .btn-del {
        font-size: 0.74rem;
        padding: 5px 8px;
    }

    /* Admin container */
    .admin-container {
        padding: 24px 12px 60px;
    }

    /* Modals */
    .modal-card {
        padding: 28px 20px;
    }

    .view-modal {
        padding: 24px 18px;
    }

    .view-detail-label {
        min-width: 90px;
        font-size: 0.72rem;
    }

    /* Footer */
    .footer {
        padding: 18px 12px;
        font-size: 0.8rem;
    }

    /* Toast */
    .toast {
        font-size: 0.88rem;
        padding: 12px 22px;
        max-width: calc(100vw - 40px);
        text-align: center;
        white-space: normal;
    }
}

/* ── Mobile (≤ 480px) ── */
@media (max-width: 480px) {

    /* Navbar stacks on very small screens */
    .navbar {
        flex-wrap: wrap;
        padding: 10px 14px;
    }

    /* Stats – 2 columns but more compact */
    .stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 14px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    /* Table – hide Date, Time, Notes, Reg At on mobile */
    .events-table th:nth-child(4),
    .events-table td:nth-child(4),
    .events-table th:nth-child(5),
    .events-table td:nth-child(5),
    .events-table th:nth-child(7),
    .events-table td:nth-child(7),
    .events-table th:nth-child(8),
    .events-table td:nth-child(8) {
        display: none;
    }

    /* Table scrolls horizontally on tiny screens */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .events-table {
        min-width: 400px;
    }

    /* Form card tighter */
    .form-card {
        padding: 22px 14px;
        border-radius: 14px;
    }

    .form-card-header {
        gap: 10px;
        margin-bottom: 24px;
    }

    .form-card-header h2 {
        font-size: 1.1rem;
    }

    /* Modal full-width */
    .modal-card {
        border-radius: 14px;
        padding: 24px 16px;
    }

    .modal-card h3 {
        font-size: 1.2rem;
    }

    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }

    .modal-cancel,
    .modal-delete {
        width: 100%;
    }

    /* Hero tighter */
    .hero {
        padding: 40px 14px 56px;
    }

    .hero-subtitle {
        letter-spacing: 1.5px;
    }
}

/* ── Very Small Mobile (≤ 360px) ── */
@media (max-width: 360px) {
    .nav-logo {
        font-size: 0.95rem;
    }

    .nav-admin-btn {
        font-size: 0.72rem;
        padding: 6px 12px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .submit-btn {
        font-size: 0.9rem;
    }

    #searchInput {
        font-size: 0.88rem;
    }
}