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

:root {
    --saffron: #ff9933;
    --saffron-dark: #cc5200;
    --gold: #d4af37;
    --gold-light: #f3e5ab;
    --white: #ffffff;
    --dark-bg: #061f13; /* Deep premium forest green from Hunger Free theme */
    --dark-card: #0c2b1c; /* Lighter forest green for card containers */
    --light-bg: #ffffff; /* Pure white background */
    --light-card: #ffffff;
    --text-primary-light: #052617;
    --text-secondary-light: #486a59;
    --text-primary-dark: #edf7f2;
    --text-secondary-dark: #9bbda9;
    
    --primary-gradient: linear-gradient(135deg, #ff9933 0%, #cc5200 100%);
    --gold-gradient: linear-gradient(135deg, #f3e5ab 0%, #d4af37 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --glass-border: rgba(255, 153, 51, 0.15); /* Saffron glass border accent */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .display-font {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Premium Spiritual Headers & Cards */
.hero-section {
    background: var(--primary-gradient);
    color: white;
    padding: 4rem 2rem;
    border-radius: 0 0 2.5rem 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(204, 82, 0, 0.25);
    border-bottom: 5px solid var(--gold);
}

.hero-section::before {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    background: rgba(212, 175, 55, 0.15);
    border-radius: 50%;
    top: -30px;
    right: -30px;
    filter: blur(40px);
}

.premium-card {
    background: var(--light-card);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 1.5rem;
    box-shadow: 0 15px 35px -5px rgba(110, 86, 59, 0.08), 0 5px 15px -5px rgba(110, 86, 59, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -5px rgba(110, 86, 59, 0.15), 0 10px 20px -5px rgba(110, 86, 59, 0.08);
    border-color: var(--gold);
}

/* Custom Text and Button Accents */
.text-saffron {
    color: var(--saffron);
}

.text-gold {
    color: var(--gold);
}

.bg-saffron {
    background-color: var(--saffron);
}

.bg-gold {
    background-color: var(--gold);
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    color: white;
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #cc5200 0%, #993d00 100%);
    box-shadow: 0 5px 15px rgba(204, 82, 0, 0.3);
}

.btn-warning {
    background: var(--gold-gradient);
    border: 1px solid var(--gold);
    color: #3b2a00;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d4af37 0%, #b39025 100%);
    color: #fff;
}

/* Admin Styling overrides (Light/White Theme) */
body.admin-body {
    background-color: #ffffff;
    color: #052617;
}

.admin-sidebar {
    background-color: #ffffff;
    border-right: 1px solid rgba(255, 153, 51, 0.15);
    min-height: 100vh;
}

/* Sidebar links */
body.admin-body .admin-sidebar .nav-link {
    color: #486a59 !important;
    font-weight: 500;
}
body.admin-body .admin-sidebar .nav-link:hover {
    color: var(--saffron) !important;
    background-color: rgba(255, 153, 51, 0.05);
}
body.admin-body .admin-sidebar .nav-link.active {
    color: #ffffff !important;
    background: var(--primary-gradient) !important;
}

/* Override text white colors in admin mode to keep them dark/readable */
body.admin-body .text-white, 
body.admin-body h1.text-white, 
body.admin-body h2.text-white, 
body.admin-body h3.text-white, 
body.admin-body h4.text-white,
body.admin-body h5.text-white {
    color: #052617 !important;
}
body.admin-body .text-light {
    color: #486a59 !important;
}
body.admin-body .text-white-50 {
    color: rgba(72, 106, 89, 0.8) !important;
}

/* Light Card styling */
.admin-card {
    background: #ffffff;
    border: 1px solid rgba(255, 153, 51, 0.15);
    border-radius: 1.25rem;
    color: #052617;
    box-shadow: 0 4px 20px rgba(5, 38, 23, 0.03);
}

/* Form Controls */
body.admin-body .form-control, 
body.admin-body .form-select {
    background-color: #ffffff !important;
    color: #052617 !important;
    border: 1px solid #ced4da !important;
}
body.admin-body .form-control:focus, 
body.admin-body .form-select:focus {
    border-color: var(--saffron) !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 153, 51, 0.2) !important;
}
body.admin-body .input-group-text {
    background-color: #f1f5f3 !important;
    border-color: #ced4da !important;
    color: #486a59 !important;
}

/* Overriding bootstrap dark table components */
body.admin-body .table-dark {
    --bs-table-bg: #ffffff !important;
    --bs-table-color: #052617 !important;
    --bs-table-hover-color: #052617 !important;
    --bs-table-hover-bg: #f9fafb !important;
    border-color: rgba(255, 153, 51, 0.15) !important;
}
body.admin-body .table-dark th {
    color: #486a59 !important;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 153, 51, 0.15) !important;
}
body.admin-body .table-dark td {
    border-bottom: 1px solid rgba(5, 38, 23, 0.05) !important;
}

body.admin-body hr {
    border-color: rgba(255, 153, 51, 0.15) !important;
    opacity: 0.6;
}
body.admin-body .bg-dark-subtle {
    background-color: #f8f9fa !important;
    border: 1px solid rgba(255, 153, 51, 0.15) !important;
}
body.admin-body .progress {
    background-color: #e9ecef !important;
}
body.admin-body .border-secondary {
    border-color: rgba(255, 153, 51, 0.15) !important;
}
body.admin-body .modal-content {
    background-color: #ffffff !important;
    color: #052617 !important;
    border: 1px solid rgba(255, 153, 51, 0.2) !important;
}
body.admin-body .btn-close-white {
    filter: none !important; /* normal dark close button */
}

.metric-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* PVR Premium Ticket Layout */
.ticket-wrapper {
    background: white;
    border-radius: 2rem;
    box-shadow: 0 25px 60px -15px rgba(110, 86, 59, 0.15);
    overflow: hidden;
    max-width: 580px;
    margin: 2.5rem auto;
    border: 2px solid var(--gold-light);
    position: relative;
}

.ticket-header {
    background: var(--primary-gradient);
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    border-bottom: 4px solid var(--gold);
}

.ticket-logos-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.ticket-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    border-radius: 5px;
    background: white;
    padding: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.ticket-body {
    padding: 3.5rem 2.5rem;
    text-align: center;
    background: #ffffff;
    color: var(--text-primary-light);
}

.ticket-divider {
    border-top: 3px dashed var(--gold-light);
    margin: 2.5rem 0;
    position: relative;
}

.ticket-divider::before, .ticket-divider::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    background: var(--light-bg);
    border: 2px solid var(--gold-light);
    border-radius: 50%;
    top: -15px;
    z-index: 10;
}

.ticket-divider::before {
    left: -39px;
    box-shadow: inset -5px 0 5px rgba(0,0,0,0.03);
}

.ticket-divider::after {
    right: -39px;
    box-shadow: inset 5px 0 5px rgba(0,0,0,0.03);
}

.ticket-instructions {
    background: #fffcf8;
    border: 1px solid #f3e5ab;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: left;
    margin-top: 2rem;
}

/* Scanner styles */
.scanner-viewport {
    position: relative;
    border-radius: 2rem;
    overflow: hidden;
    border: 4px solid var(--gold);
    box-shadow: 0 25px 50px -12px rgba(28, 17, 5, 0.6);
    background: #000;
    aspect-ratio: 1;
    max-width: 450px;
    margin: 0 auto;
}

.scanner-target-box {
    position: absolute;
    top: 15%;
    left: 15%;
    right: 15%;
    bottom: 15%;
    border: 3px dashed var(--gold);
    border-radius: 1.5rem;
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
}

.scanner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    animation: fadeIn 0.25s forwards ease-out;
}

.scanner-overlay.success {
    background: var(--success-gradient);
    color: white;
}

.scanner-overlay.error {
    background: var(--danger-gradient);
    color: white;
}

.overlay-content {
    max-width: 500px;
    transform: scale(0.9);
    animation: scaleIn 0.3s forwards cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Mobile Viewport Optimization for Tickets */
@media (max-width: 576px) {
    .ticket-wrapper {
        margin: 1.5rem auto;
        border-radius: 1.5rem;
        width: 100%;
    }
    .ticket-header {
        padding: 2rem 1.25rem;
    }
    .ticket-logos-container {
        gap: 0.8rem;
        margin-bottom: 1rem;
    }
    .ticket-logo {
        height: 38px;
    }
    .ticket-body {
        padding: 2.25rem 1.5rem;
    }
    .ticket-divider::before {
        left: -32px;
    }
    .ticket-divider::after {
        right: -32px;
    }
    .ticket-instructions {
        padding: 1.25rem 1rem;
        border-radius: 0.75rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white !important;
        color: black !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        min-height: auto !important;
        height: auto !important;
    }
    .no-print {
        display: none !important;
    }
    .container {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        max-width: 100% !important;
    }
    .row {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    .ticket-wrapper {
        box-shadow: none !important;
        border: 2px solid var(--gold-light) !important;
        margin: 0 auto !important;
        max-width: 410px !important;
        border-radius: 1rem !important;
        zoom: 0.93 !important;
    }
    .ticket-header {
        padding: 0.6rem 1rem !important;
    }
    .ticket-logos-container {
        margin-bottom: 0.4rem !important;
        gap: 0.6rem !important;
    }
    .ticket-logo {
        height: 28px !important;
    }
    .ticket-body {
        padding: 0.75rem 1.5rem !important;
    }
    .ticket-body img {
        max-height: 85px !important;
    }
    .qr-wrapper {
        margin-top: 0.2rem !important;
        margin-bottom: 0.2rem !important;
    }
    .qr-code-container {
        width: 125px !important;
        height: 125px !important;
        padding: 0.35rem !important;
        border-radius: 0.5rem !important;
    }
    .ticket-divider {
        margin: 0.5rem 0 !important;
    }
    .ticket-instructions {
        margin-top: 0.35rem !important;
        padding: 0.4rem 0.6rem !important;
        border-radius: 0.5rem !important;
    }
    .ticket-instructions ul {
        margin-bottom: 0 !important;
        padding-left: 0.75rem !important;
    }
    .ticket-instructions li {
        margin-bottom: 0.15rem !important;
        line-height: 1.3 !important;
        font-size: 0.72rem !important;
    }
    .badge {
        font-size: 0.7rem !important;
        padding: 0.15rem 0.35rem !important;
    }
    @page {
        size: auto;
        margin: 4mm;
    }
}

/* Footer styling overrides for pure white theme */
footer {
    background-color: #ffffff !important;
    color: #486a59 !important;
    border-top: 1px solid rgba(255, 153, 51, 0.15) !important;
}
