﻿/* ==========================================================
   CHHATH PUJA FESTIVE MASTER THEME (master.css - Final A to Z)
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --cp-sindoor-red: #d93822;
    --cp-sindoor-dark: #b82813;
    --cp-festive-gold: #f59e0b;
    --cp-festive-gold-dark: #d97706;
    --cp-ganga-blue: #0f766e;
    --cp-card-bg: rgba(255, 255, 255, 0.78);
    --cp-body-bg: linear-gradient(135deg, #fffcf5 0%, #fff5f5 50%, #f3fcf6 100%);
}

/* Global HTML & Body Setup */
html, body {
    font-family: 'Poppins', sans-serif;
    background: var(--cp-body-bg) !important;
    min-height: 100vh;
    color: #374151;
    font-weight: 400;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
}

    /* ==========================================================
   BOTTOM FIXED SVG WAVES & RISING SUN (Background Effect)
   ========================================================== */
    body::after {
        content: '';
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 35vh;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ea580c' fill-opacity='0.12' d='M0,160L48,176C96,192,192,224,288,229.3C384,235,480,213,576,192C672,171,768,149,864,154.7C960,160,1056,192,1152,186.7C1248,181,1344,139,1392,117.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3Cpath fill='%23891316' fill-opacity='0.08' d='M0,256L48,240C96,224,192,192,288,197.3C384,203,480,245,576,256C672,267,768,245,864,213.3C960,181,1056,139,1152,133.3C1248,128,1344,160,1392,176L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3Ccircle cx='1100' cy='160' r='55' fill='%23f59e0b' fill-opacity='0.15'/%3E%3C/svg%3E");
        background-size: cover;
        background-position: bottom center;
        background-repeat: no-repeat;
        z-index: 0;
        pointer-events: none;
    }

/* ==========================================================
   MAIN LAYOUT & RESPONSIVE SIDEBAR (Flex Container Logic)
   ========================================================== */
.cp-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Top Bar */
.cp-topbar {
    height: 60px;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid #fed7aa;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    backdrop-filter: blur(10px);
}

.cp-toggle-btn {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 1.2rem;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

    .cp-toggle-btn:hover {
        background: #fde68a;
    }

/* Fixed Sidebar Drawer */
.cp-sidebar {
    position: fixed;
    top: 60px;
    bottom: 0;
    left: 0;
    width: 260px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-right: 1px solid #e5e7eb;
    transition: left 0.3s ease;
    z-index: 1025;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.03);
}

/* When sidebar is closed (off-screen) */
@media (min-width: 992px) {
    .cp-sidebar {
        left: 0; /* Visible by default on desktop */
    }
    /* If we want toggle control on desktop, we can handle via class if needed, 
       currently sliding logic handles mobile & desktop seamlessly */
}

@media (max-width: 991.98px) {
    .cp-sidebar {
        left: -260px; /* Hidden on mobile by default */
    }

        .cp-sidebar.sidebar-open {
            left: 0 !important;
        }
}

/* Main Content Wrapper - Flex Expansion based on sidebar */
.cp-main {
    margin-top: 60px;
    margin-left: 260px; /* Pushes content right to make space for sidebar */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 80px;
    position: relative;
    z-index: 1;
    transition: margin-left 0.3s ease;
}

@media (max-width: 991.98px) {
    .cp-main {
        margin-left: 0 !important; /* Full width on mobile */
    }
}

.cp-content-area {
    flex-grow: 1;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1020;
    backdrop-filter: blur(2px);
}

/* Brand Header Inside Sidebar (With Animated Sun Badge) */
.cp-brand-box {
    height: 70px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-bottom: 1px solid #fed7aa;
}

.cp-brand-title {
    font-weight: 700;
    color: #9a1c12;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.cp-brand-subtitle {
    font-weight: 600;
    color: var(--cp-festive-gold-dark);
    font-size: 0.65rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

/* Menu Category Label */
.cp-menu-category {
    font-size: 0.7rem;
    font-weight: 700;
    color: #9ca3af;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Navigation Links */
.cp-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #4b5563;
    font-weight: 500;
    font-size: 0.88rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    text-decoration: none;
}

    .cp-nav-link i {
        font-size: 1.1rem;
        color: #9a1c12;
        transition: transform 0.2s ease;
    }

    .cp-nav-link:hover {
        background-color: #fef2f2;
        color: #9a1c12;
    }

        .cp-nav-link:hover i {
            transform: scale(1.1);
        }

    .cp-nav-link.active {
        background: linear-gradient(135deg, var(--cp-sindoor-red), #b82813);
        color: #ffffff !important;
        font-weight: 600;
        box-shadow: 0 4px 12px rgba(217, 56, 34, 0.25);
    }

        .cp-nav-link.active i {
            color: #ffffff !important;
        }

/* Sidebar Footer Mantra */
.cp-sidebar-footer {
    border-top: 1px solid #f3f4f6;
    background: rgba(255, 255, 255, 0.6);
}

.cp-mantra {
    font-weight: 600;
    color: #b45309;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* Main Container Layout (Flexible and responsive) */
.cp-main-container {
    max-width: 100% !important;
    width: 100%;
    position: relative;
    z-index: 2;
}

@media (min-width: 992px) {
    .cp-main-container {
        max-width: 960px !important;
        margin: 0 auto;
    }
}

/* Hero Section */
.cp-hero-anim-container {
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.85) 0%, rgba(255, 255, 255, 0.8) 100%);
    border: 1px solid rgba(254, 215, 170, 0.7);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.08);
    backdrop-filter: blur(8px);
}

.cp-hero-title-premium {
    font-weight: 700;
    color: var(--cp-sindoor-red);
    font-size: 1.6rem;
    letter-spacing: 0.3px;
}

.cp-hero-subtitle-premium {
    font-weight: 500;
    color: var(--cp-festive-gold-dark);
    font-size: 0.9rem;
}

.hero-divider {
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--cp-sindoor-red), var(--cp-festive-gold));
    border-radius: 2px;
}

/* Sunset Mini Animation Badge (Used inside Sidebar Brand Header) */
.sunset-card {
    background: #1e1b4b;
    overflow: hidden;
    border: 1.5px solid #f59e0b;
    position: relative;
    border-radius: 50%;
}

.sky-background {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #f97316 0%, #db2777 60%, #1e1b4b 100%);
}

.sun-aura {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(252, 211, 77, 0.4);
    border-radius: 50%;
    top: 4px;
    left: 8px;
    filter: blur(2px);
}

.dipping-sun {
    position: absolute;
    top: 6px;
    left: 11px;
    width: 14px;
    height: 14px;
    background: radial-gradient(circle, #fef08a 0%, #f59e0b 100%);
    border-radius: 50%;
    box-shadow: 0 0 6px #fbbf24;
}

.water-horizon {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 12px;
    background: rgba(15, 118, 110, 0.85);
}

.water-reflection {
    position: absolute;
    top: 0;
    left: 14px;
    width: 6px;
    height: 6px;
    background: rgba(253, 224, 71, 0.6);
    filter: blur(1px);
}

/* Card Styling */
.cp-card {
    background: var(--cp-card-bg) !important;
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.25s ease;
}

.cp-card-highlight {
    border: 1.5px solid var(--cp-festive-gold) !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.18) !important;
}

/* Tabs Styling */
.cp-tabs {
    display: flex;
    background: rgba(254, 243, 199, 0.85);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid #fde68a;
    max-width: 380px;
    backdrop-filter: blur(5px);
}

.cp-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 12px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #92400e;
    transition: all 0.25s ease;
}

    .cp-tab-btn.active {
        background: var(--cp-sindoor-red);
        color: #ffffff;
        box-shadow: 0 3px 8px rgba(217, 56, 34, 0.25);
    }

/* Buttons */
.btn-cp-primary, .btn-cp-sindoor {
    background: var(--cp-sindoor-red);
    color: white;
    border: none;
    transition: background 0.2s;
}

    .btn-cp-primary:hover, .btn-cp-sindoor:hover {
        background: var(--cp-sindoor-dark);
        color: white;
    }

.text-sindoor {
    color: var(--cp-sindoor-red) !important;
}

/* Stat Cards */
.cp-stat-card {
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
}

.stat-green {
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.85) 0%, rgba(220, 252, 231, 0.85) 100%);
    border-left: 3.5px solid #22c55e;
}

.stat-gold {
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.85) 0%, rgba(254, 243, 199, 0.85) 100%);
    border-left: 3.5px solid var(--cp-festive-gold);
}

.stat-red {
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.85) 0%, rgba(254, 226, 226, 0.85) 100%);
    border-left: 3.5px solid var(--cp-sindoor-red);
}

.cp-stat-icon-wrapper {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.8);
}

/* Inputs & Form */
.cp-input {
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    padding: 7px 12px;
    font-size: 0.88rem;
    height: calc(1.5em + 0.75rem + 2px);
    background-color: rgba(255, 255, 255, 0.85);
}

    .cp-input:focus {
        border-color: var(--cp-festive-gold);
        box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
    }

.cp-input-group-text {
    background: rgba(248, 250, 252, 0.9);
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
    border-color: #cbd5e1;
    font-size: 0.88rem;
}

/* Tables */
.cp-table {
    width: 100% !important;
    margin-bottom: 0;
    background: transparent;
}

    .cp-table th {
        font-weight: 600;
        color: #4b5563;
        background-color: rgba(249, 250, 251, 0.85);
        padding: 12px 14px;
        white-space: nowrap;
    }

    .cp-table td {
        padding: 12px 14px;
        vertical-align: middle;
        background: rgba(255, 255, 255, 0.5);
    }

/* Status Badges */
.badge-pending {
    background-color: #fef3c7;
    color: #92400e;
    font-weight: 500;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #fde68a;
}

.badge-verified {
    background-color: #dcfce7;
    color: #166534;
    font-weight: 500;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #bbf7d0;
}

/* Global Footer */
.cp-global-footer {
    background: rgba(255, 255, 255, 0.8);
    border-top: 1px solid #fed7aa;
    font-size: 0.8rem;
    backdrop-filter: blur(8px);
}

.footer-copyright-text {
    color: #4b5563;
    font-weight: 500;
}

.dev-compact-pill {
    background: rgba(255, 251, 235, 0.9);
    border: 1px solid #fde68a;
    padding: 2px 10px;
    border-radius: 20px;
}

.dev-label {
    color: #78350f;
    font-size: 0.72rem;
}

.dev-signature-link {
    color: var(--cp-sindoor-red);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.75rem;
}

    .dev-signature-link:hover {
        color: var(--cp-sindoor-dark);
    }

/* Professional Admin Login Button & Modal */
.cp-pro-login-btn {
    background: #ffffff;
    color: var(--cp-sindoor-red);
    border: 1.5px solid #fed7aa;
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

    .cp-pro-login-btn:hover {
        background: var(--cp-sindoor-red);
        color: #ffffff;
        border-color: var(--cp-sindoor-red);
    }

.cp-admin-chip {
    background: rgba(220, 252, 231, 0.9);
    border: 1px solid #bbf7d0;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

    .cp-admin-chip:hover {
        background: rgba(187, 247, 208, 1);
    }

.cp-chip-icon {
    width: 28px;
    height: 28px;
    background: #166534;
    color: #ffffff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

/* Modals & Backdrop */
.cp-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 15px;
}

.cp-qr-modal-card, .cp-modal-content.premium-modal, .cp-pro-modal {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 14px;
    width: 100%;
    max-width: 350px;
    padding: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    animation: cpModalFade 0.25s ease;
    border: 1px solid rgba(254, 215, 170, 0.8);
}

@keyframes cpModalFade {
    from {
        transform: scale(0.92);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-icon-wrapper, .cp-modal-icon-badge {
    width: 38px;
    height: 38px;
    background: #fef2f2;
    color: var(--cp-sindoor-red);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 1px solid #fee2e2;
}

.premium-input, .cp-modal-input {
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    padding: 8px 12px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.9);
}

    .premium-input:focus, .cp-modal-input:focus {
        border-color: var(--cp-festive-gold);
        box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
    }

.qr-wrapper {
    width: 170px;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.qr-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}


/* Responsive Sidebar Header for Small Screens */
@media (max-width: 575.98px) {
    .cp-brand-text-wrap {
        display: none !important;
    }

    .cp-brand-box {
        justify-content: center;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}
/* Update Alert Box in Sidebar */
.cp-update-alert {
    background: rgba(254, 243, 199, 0.9);
    border: 1.5px dashed #f59e0b;
    backdrop-filter: blur(8px);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.spin-icon {
    display: inline-block;
    animation: spin 2s linear infinite;
}
/* ==========================================================
   UNIFIED RESPONSIVE SIDEBAR & LAYOUT FIX
   ========================================================== */
.cp-sidebar {
    position: fixed;
    top: 60px;
    bottom: 0;
    left: 0; /* Default visible */
    width: 260px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-right: 1px solid #e5e7eb;
    transition: left 0.3s ease;
    z-index: 1025;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.03);
}

/* On Mobile/Small screens, hide sidebar by default */
@media (max-width: 991.98px) {
    .cp-sidebar {
        left: -260px !important;
    }

        .cp-sidebar.sidebar-open {
            left: 0 !important;
        }
}

/* Main Content Wrapper */
.cp-main {
    margin-top: 60px;
    margin-left: 260px; /* Space for desktop sidebar by default */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 0px;
    position: relative;
    z-index: 1;
    transition: margin-left 0.3s ease;
}

@media (max-width: 991.98px) {
    .cp-main {
        margin-left: 0 !important; /* Full width on mobile */
    }
}