/* ================================================
   Qr-I — Administration Premium
   Design System: Dark Luxury + Glassmorphism
   ================================================ */

/* Auto-hide flash notifications after ~5 seconds */
@keyframes autoHideAlert {
    0% { opacity: 1; max-height: 500px; padding: 1rem; margin-bottom: 1rem; overflow: hidden; }
    80% { opacity: 1; max-height: 500px; padding: 1rem; margin-bottom: 1rem; overflow: hidden; }
    99% { opacity: 0; max-height: 500px; padding: 1rem; margin-bottom: 1rem; overflow: hidden; }
    100% { opacity: 0; max-height: 0; padding: 0; margin-bottom: 0; border: none; overflow: hidden; display: none; }
}

.alert-dismissible {
    animation: autoHideAlert 5s forwards;
}

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ---------- CSS VARIABLES ---------- */
:root {
    --nx-black:       #080706;
    --nx-black-light: #111009;
    --nx-black-soft:  #19170f;
    --nx-gold:        #c49a6c;
    --nx-gold-light:  #f0d878;
    --nx-gold-dark:   #a07a4a;
    --nx-gold-glow:   rgba(196, 154, 108, 0.30);
    --nx-text:        #f2ece4;
    --nx-text-muted:  #8a8070;
    --nx-border:      rgba(196, 154, 108, 0.15);
    --nx-border-soft: rgba(255, 255, 255, 0.07);
    --glass-bg:       rgba(255, 255, 255, 0.04);
    --glass-bg-md:    rgba(255, 255, 255, 0.07);
    --glass-blur:     blur(20px);
    --shadow-deep:    0 20px 60px rgba(0, 0, 0, 0.6);
    --shadow-card:    0 8px 32px rgba(0, 0, 0, 0.45);
    --radius-card:    20px;
    --radius-btn:     50px;
    --transition:     all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--nx-black);
    color: var(--nx-text);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--nx-text);
}

.text-muted { color: var(--nx-text-muted) !important; }

/* ---------- CURRENT USER BADGE ---------- */
.admin-current-user {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(196, 154, 108, 0.35);
    font-size: 0.78rem;
    color: var(--nx-text-muted);
}

.admin-current-user i {
    color: var(--nx-gold-light);
    font-size: 0.95rem;
}

.admin-current-user-label {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.7rem;
}

.admin-current-user-name {
    color: var(--nx-gold-light);
    font-weight: 600;
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--nx-black-light); }
::-webkit-scrollbar-thumb { background: var(--nx-gold-dark); border-radius: 3px; }

/* =========================================
   LOGIN PAGE
   ========================================= */
.admin-login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background:
        linear-gradient(160deg, rgba(8, 7, 6, 0.88) 0%, rgba(20, 15, 8, 0.80) 50%, rgba(8, 7, 6, 0.92) 100%),
        url('https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=1920') center/cover no-repeat fixed;
    position: relative;
    overflow-y: auto;
}

.admin-login-body::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(196, 154, 108, 0.07) 0%, transparent 65%);
    pointer-events: none;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.9s ease-out;
}

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

.login-logo-header {
    text-align: center;
}

.login-logo-main {
    max-width: 90px;
    height: auto;
    margin-bottom: 0.8rem;
    filter: drop-shadow(0 0 20px rgba(196, 154, 108, 0.4));
}

.login-brand-main {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 8px;
    background: linear-gradient(135deg, #f0d878, var(--nx-gold), #a07a4a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.4rem;
}

.login-tagline {
    color: var(--nx-text-muted);
    font-size: 0.78rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0;
    font-weight: 400;
}

.login-card {
    width: 100%;
    background: rgba(16, 13, 8, 0.82);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--nx-border);
    border-radius: 24px;
    padding: 2rem 2rem;
    box-shadow: var(--shadow-deep), 0 0 0 1px rgba(196, 154, 108, 0.08);
    transition: var(--transition);
}

.login-card:hover {
    border-color: rgba(196, 154, 108, 0.3);
    box-shadow: var(--shadow-deep), 0 0 40px rgba(196, 154, 108, 0.08);
}

/* =========================================
   ADMIN NAVBAR
   ========================================= */
.admin-navbar {
    background: rgba(8, 7, 6, 0.92) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--nx-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    padding: 0.7rem 0;
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--nx-gold) !important;
    transition: var(--transition);
}

.navbar-brand:hover { color: var(--nx-gold-light) !important; }

.navbar-logo { height: 26px; width: auto; }

.navbar-logo-text {
    font-size: 1.05rem;
    letter-spacing: 3px;
    color: var(--nx-gold);
    font-weight: 600;
}

.admin-navbar .nav-link {
    color: var(--nx-text-muted) !important;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition);
}

.admin-navbar .nav-link:hover {
    color: var(--nx-gold) !important;
    background: rgba(196, 154, 108, 0.08);
}

.admin-navbar .nav-link.active {
    color: var(--nx-gold) !important;
    background: rgba(196, 154, 108, 0.1);
}

/* =========================================
   CARDS
   ========================================= */
.card {
    background: var(--glass-bg-md);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--nx-border-soft);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    color: var(--nx-text);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--nx-border);
}

.card-header {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--nx-border-soft);
    color: var(--nx-gold);
    font-weight: 600;
    font-size: 1rem;
    padding: 1rem 1.5rem;
    border-radius: calc(var(--radius-card) - 1px) calc(var(--radius-card) - 1px) 0 0 !important;
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.5px;
}

/* Wedding cards on dashboard */
.wedding-card {
    background: var(--glass-bg-md);
    border: 1px solid var(--nx-border-soft);
    border-radius: var(--radius-card);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.wedding-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, var(--nx-gold), transparent);
    opacity: 0;
    transition: var(--transition);
}

/* =========================================
   QR CODES HEADER
   ========================================= */
.qr-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1.4rem 1.8rem;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(196,154,108,0.16), rgba(8,7,6,0.9));
    border: 1px solid rgba(196,154,108,0.35);
    box-shadow: var(--shadow-card);
}

.qr-hero-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.qr-hero-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: rgba(8,7,6,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(196,154,108,0.4);
    box-shadow: 0 0 18px rgba(196,154,108,0.35);
}

.qr-hero-icon i {
    font-size: 1.7rem;
    color: var(--nx-gold-light);
}

.qr-hero-title {
    font-size: 1.7rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin: 0;
}

.qr-hero-subtitle {
    margin: 0.15rem 0 0;
    font-size: 0.9rem;
    color: var(--nx-text-muted);
    letter-spacing: 1px;
}

.qr-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

@media (max-width: 768px) {
    .qr-hero {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .qr-hero-title {
        font-size: 1.4rem;
        letter-spacing: 3px;
    }
}

/* Empty state highlight for QR Codes */
.qr-empty-highlight {
    display: inline-block;
    padding: 1rem 1.8rem;
    border-radius: 999px;
    border: 1px solid rgba(196,154,108,0.45);
    background: radial-gradient(circle at top left, rgba(196,154,108,0.18), transparent 60%);
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}

.qr-empty-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--nx-gold-light);
}

.qr-empty-names {
    margin-top: 0.25rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: var(--nx-text);
    letter-spacing: 2px;
}

.wedding-card:hover {
    border-color: var(--nx-border);
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--nx-border);
}

.wedding-card:hover::before { opacity: 1; }

.wedding-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--nx-gold-light), var(--nx-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.wedding-date {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--nx-text-muted);
}

.wedding-date i { color: var(--nx-gold); }
.wedding-actions { margin-top: 1.5rem; }

/* =========================================
   STATS
   ========================================= */
.stats-row {
    padding: 1rem 0;
    border-top: 1px solid var(--nx-border-soft);
    border-bottom: 1px solid var(--nx-border-soft);
    margin: 1rem 0;
}

.stats-number {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--nx-gold-light), var(--nx-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card {
    border-left: 2px solid var(--nx-gold);
    background: var(--glass-bg-md);
}

.stat-card h3 {
    background: linear-gradient(135deg, var(--nx-gold-light), var(--nx-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    border-radius: var(--radius-btn);
    letter-spacing: 0.3px;
    transition: var(--transition);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--nx-gold) 0%, var(--nx-gold-dark) 100%);
    border: none;
    color: #0a0805;
    font-weight: 700;
    box-shadow: 0 4px 16px var(--nx-gold-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--nx-gold-light) 0%, var(--nx-gold) 100%);
    color: #0a0805;
    box-shadow: 0 8px 24px rgba(196, 154, 108, 0.5);
}

.btn-outline-primary {
    color: var(--nx-gold);
    border: 1.5px solid var(--nx-gold);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--nx-gold);
    border-color: var(--nx-gold);
    color: #0a0805;
    box-shadow: 0 6px 20px var(--nx-gold-glow);
}

.btn-outline-secondary {
    color: var(--nx-text-muted);
    border: 1.5px solid var(--nx-border-soft);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--glass-bg-md);
    border-color: var(--nx-gold);
    color: var(--nx-gold);
}

.btn-outline-danger { color: #e74c3c; border-color: #e74c3c; }
.btn-outline-danger:hover { background: #e74c3c; color: #fff; border-color: #e74c3c; }

.btn-outline-success { color: #2ecc71; border-color: #2ecc71; }
.btn-outline-success:hover { background: #2ecc71; color: #fff; border-color: #2ecc71; }

.btn-outline-warning { color: #f39c12; border-color: #f39c12; }
.btn-outline-warning:hover { background: #f39c12; color: #fff; border-color: #f39c12; }

.btn-outline-info { color: #3498db; border-color: #3498db; }
.btn-outline-info:hover { background: #3498db; color: #fff; border-color: #3498db; }

.btn-sm { padding: 0.35rem 0.9rem; font-size: 0.82rem; }
.btn-lg { padding: 0.85rem 2.2rem; font-size: 1rem; }

/* =========================================
   FORMS
   ========================================= */
.form-control, .form-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--nx-border-soft);
    color: var(--nx-text);
    border-radius: 12px;
    padding: 0.75rem 1.1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--nx-gold);
    color: var(--nx-text);
    box-shadow: 0 0 0 3px rgba(196, 154, 108, 0.15);
    outline: none;
}

.form-control::placeholder { color: var(--nx-text-muted); }

.form-select option { background: var(--nx-black-soft); color: var(--nx-text); }

.form-label {
    color: var(--nx-text-muted);
    font-weight: 500;
    font-size: 0.88rem;
    letter-spacing: 0.3px;
}

.form-check-input {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1.5px solid var(--nx-border);
}

.form-check-input:checked {
    background-color: var(--nx-gold);
    border-color: var(--nx-gold);
}

/* =========================================
   TABLES
   ========================================= */
.table {
    color: var(--nx-text);
    border-color: var(--nx-border-soft);
    font-size: 0.9rem;
}

.table thead th {
    color: var(--nx-gold);
    border-bottom: 1px solid var(--nx-border);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.02);
}

.table tbody td {
    border-color: var(--nx-border-soft);
    padding: 0.85rem 1rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background: rgba(196, 154, 108, 0.05);
    --bs-table-hover-bg: transparent;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    color: var(--nx-text);
    background-color: rgba(255, 255, 255, 0.02);
}

/* =========================================
   ALERTS
   ========================================= */
.alert {
    border: none;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 500;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInFadeAlert 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: currentColor;
    border-radius: 16px 0 0 16px;
}

.alert-success {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.25);
}

.alert-danger {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.25);
}

.alert-warning {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.25);
}

.alert-info {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.25);
}

.alert .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.7;
    margin-left: auto;
    position: relative;
    z-index: 2;
}

.alert .btn-close:hover {
    opacity: 1;
}

@keyframes slideInFadeAlert {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================================
   BADGES
   ========================================= */
.badge.bg-light {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--nx-text) !important;
    border: 1px solid var(--nx-border-soft);
}

/* =========================================
   QR CODE SECTION
   ========================================= */
.qr-card {
    text-align: center;
    background: #fff;
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.qr-card img { max-height: 180px; }

/* =========================================
   TIMELINE & MEAL OPTIONS (admin/wedding.php)
   ========================================= */
.timeline-event, .meal-option-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--nx-border-soft) !important;
    border-radius: 14px !important;
}

/* =========================================
   LIST GROUPS
   ========================================= */
.list-group-item {
    background: var(--glass-bg);
    border-color: var(--nx-border-soft);
    color: var(--nx-text);
    transition: var(--transition);
}

.list-group-item:hover {
    background: var(--glass-bg-md);
    border-color: var(--nx-border);
}

/* =========================================
   UTILITY
   ========================================= */
.table-responsive { border-radius: var(--radius-card); }

code {
    background: rgba(196, 154, 108, 0.12);
    color: var(--nx-gold);
    padding: 0.2em 0.5em;
    border-radius: 6px;
    font-size: 0.88em;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .admin-login-body {
        background-attachment: scroll !important;
        align-items: flex-start;
        padding: 2rem 0.85rem 1.5rem;
    }

    .login-wrapper {
        max-width: 100%;
    }

    .login-brand-main {
        letter-spacing: 4px !important;
        line-height: 1.2;
        padding: 0 0.25rem;
    }

    .login-tagline {
        font-size: 0.7rem;
        letter-spacing: 1.5px;
    }

    .login-card { padding: 1.75rem 1.25rem; }
    .admin-navbar .nav-link { padding: 0.4rem 0.7rem !important; }
}

@media (max-width: 576px) {
    .login-brand-main {
        font-size: 1.65rem !important;
        letter-spacing: 3px !important;
    }

    .login-card {
        border-radius: 18px;
        padding: 1.5rem 1rem;
    }

    .login-card .btn-primary {
        width: 100%;
    }
}
