/**
 * Maa Kali Puja Records - Main Stylesheet
 * Modern Light Mode, Festive Theme, Bootstrap 5 Enhancements & PWA Optimization
 * 100% Professional English Interface
 */

:root {
    --primary-color: #b91c1c;
    /* Auspicious Crimson */
    --primary-hover: #991b1b;
    --primary-light: #fef2f2;
    --primary-border: #fecaca;

    --accent-gold: #d97706;
    /* Puja Saffron Gold */
    --accent-gold-light: #fffbeb;
    --accent-gold-border: #fde68a;

    --success-color: #15803d;
    /* Income Green */
    --success-light: #f0fdf4;
    --success-border: #bbf7d0;

    --danger-color: #dc2626;
    /* Expense Red */
    --danger-light: #fef2f2;

    --info-color: #0284c7;
    /* Bank/Info Blue */
    --info-light: #f0f9ff;

    --bg-page: #f8fafc;
    /* Crisp clean light background */
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    /* High readability deep slate */
    --text-secondary: #475569;
    --text-muted: #64748b;

    --border-subtle: #e2e8f0;
    --border-focus: #b91c1c;

    --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    --card-shadow-hover: 0 10px 25px -3px rgba(185, 28, 28, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
}

/* Global Reset & Base */
html {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
    padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    /* Clearance for mobile bottom navigation */
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

/* Typography Enhancements */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Indian Rupee Symbol (₹) Rendering & Bulletproof Font Stack */
.currency-symbol,
.rupee-symbol,
.kpi-value,
.amount-cell,
.receipt-amount-box {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'DejaVu Sans', Arial, sans-serif !important;
    font-feature-settings: "liga" 0;
    font-variant-numeric: tabular-nums;
}

/* Fullscreen Private Portal Login View */
#view_login_screen {
    min-height: 82vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-auth-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px -10px rgba(185, 28, 28, 0.12), 0 4px 15px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    max-width: 440px;
    width: 100%;
}

.login-auth-header {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    padding: 32px 24px;
    text-align: center;
    color: #ffffff;
}

.login-auth-header h2 {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 800;
    margin: 8px 0 2px 0;
}

.login-auth-header p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.88);
    margin: 0;
}

/* Top Navbar */
.navbar-custom {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 1020;
    transition: all 0.3s ease;
}

.navbar-brand-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b91c1c 0%, #d97706 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.3);
}

.brand-title {
    font-weight: 800;
    font-size: 1.15rem;
    color: #991b1b;
    line-height: 1.2;
    margin: 0;
}

.brand-subtitle {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin: 0;
    font-weight: 500;
}

.nav-link {
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px 16px !important;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
    background-color: var(--primary-light);
}

/* Mode Status Pill */
.mode-badge {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
}

.mode-badge.master {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.mode-badge.viewer {
    background: #f0f9ff;
    color: #0369a1;
    border-color: #bae6fd;
}

/* Metric / KPI Cards */
.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 22px 20px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.kpi-card.income::before {
    background: linear-gradient(90deg, #15803d, #22c55e);
}

.kpi-card.expense::before {
    background: linear-gradient(90deg, #dc2626, #f87171);
}

.kpi-card.balance::before {
    background: linear-gradient(90deg, #7c3aed, #0284c7);
}

.kpi-card.donors::before {
    background: linear-gradient(90deg, #d97706, #fbbf24);
}

.kpi-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.kpi-card.income .kpi-icon-box {
    background: var(--success-light);
    color: var(--success-color);
}

.kpi-card.expense .kpi-icon-box {
    background: var(--danger-light);
    color: var(--danger-color);
}

.kpi-card.balance .kpi-icon-box {
    background: #f5f3ff;
    color: #7c3aed;
}

.kpi-card.donors .kpi-icon-box {
    background: var(--accent-gold-light);
    color: var(--accent-gold);
}

.kpi-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.kpi-value {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.1;
}

.kpi-subtext {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 6px;
    margin-bottom: 0;
}

/* General Modern Cards */
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    overflow: hidden;
}

.content-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    flex-wrap: wrap;
    gap: 12px;
}

.content-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.content-card-body {
    padding: 20px;
}

/* Custom Buttons */
.btn-puja {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    color: #ffffff;
    border: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 9px 18px;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.25);
    transition: all 0.2s ease;
    display: block;
    align-items: center;
    gap: 8px;
}

.btn-puja:hover,
.btn-puja:focus {
    background: linear-gradient(135deg, #991b1b 0%, #b91c1c 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(185, 28, 28, 0.35);
}

.btn-puja-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-puja-outline:hover {
    background: var(--primary-light);
    color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-puja-gold {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    color: #ffffff;
    border: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 9px 18px;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-puja-gold:hover {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
    color: #ffffff;
}

/* Fast Entry Button (Save & Add Another) */
.btn-save-another {
    background: #f1f5f9;
    color: #334155;
    border: 1.5px solid #cbd5e1;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-save-another:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Tables & Data */
.table-puja {
    margin: 0;
    vertical-align: middle;
}

.table-puja thead th {
    background-color: #f8fafc;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 14px;
    border-bottom: 2px solid var(--border-subtle);
    white-space: nowrap;
}

.table-puja tbody td {
    padding: 14px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.9rem;
}

.table-puja tbody tr:hover {
    background-color: #fef2f2 !important;
}

.badge-bill {
    font-family: monospace;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 5px 8px;
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}

.amount-cell {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
}

.amount-income {
    color: var(--success-color);
}

.amount-expense {
    color: var(--danger-color);
}

/* Bill / Voucher Image Gallery in Expense Table */
.bill-thumbnail-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.bill-thumb {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bill-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.bill-count-pill {
    font-size: 0.75rem;
    font-weight: 600;
    background: #e0e7ff;
    color: #4338ca;
    padding: 4px 8px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

/* Image Upload Preview Box */
.image-upload-box {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.image-upload-box:hover,
.image-upload-box.dragover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.preview-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    aspect-ratio: 1;
    background: #f1f5f9;
}

.preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-card .btn-remove-preview {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.85);
    color: #fff;
    border: none;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Search and Filter Toolbar (Collapsible) */
.filter-bar {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-bottom: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.filter-bar .collapse {
    transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* PWA App Install Banner (Ultra-Compact) */
.pwa-install-banner {
    background: linear-gradient(135deg, #fffbeb 0%, #fef2f2 100%);
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.08);
}

/* Mobile Offcanvas Sidebar Drawer */
.mobile-sidebar-drawer {
    width: 300px !important;
    max-width: 85vw;
    border-right: 1px solid var(--border-subtle);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
}

.mobile-sidebar-drawer .offcanvas-header {
    background: linear-gradient(135deg, #991b1b 0%, #b91c1c 100%);
}

.sidebar-user-card {
    background: #f8fafc;
}

.sidebar-nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.18s ease;
}

.sidebar-nav-item:hover {
    background: rgba(185, 28, 28, 0.05);
    color: var(--primary-color);
}

.sidebar-nav-item.active {
    background: linear-gradient(90deg, rgba(185, 28, 28, 0.1) 0%, rgba(185, 28, 28, 0.03) 100%);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
    font-weight: 700;
}

.sidebar-nav-item i {
    width: 24px;
    font-size: 1.05rem;
}

/* Mobile Drawer Hamburger Button in Navbar */
.mobile-drawer-toggle {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--primary-color);
    background: rgba(185, 28, 28, 0.06);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.mobile-drawer-toggle:hover {
    background: rgba(185, 28, 28, 0.14);
}

.mobile-drawer-toggle:active {
    transform: scale(0.92);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-subtle);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
    z-index: 1030;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 600;
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 2px 0;
    transition: all 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item i {
    font-size: 1.18rem;
    margin-bottom: 2px;
}

.mobile-nav-item.active {
    color: var(--primary-color);
    font-weight: 700;
    position: relative;
}

.mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 0 0 3px 3px;
}

.mobile-nav-item:active {
    transform: scale(0.92);
}

/* STRICT AUTHENTICATION VISIBILITY RULES */
/* When unauthenticated or on login page: HIDE all navigation and action controls */
body:not(.is-authenticated) #navbarMain,
body:not(.is-authenticated) #authBadgeContainer,
body:not(.is-authenticated) #btnOpenMobileDrawer,
body:not(.is-authenticated) .btn-logout-action,
body:not(.is-authenticated) .mobile-bottom-nav,
body:not(.is-authenticated) .fab-quick-add,
body.is-unauthenticated #navbarMain,
body.is-unauthenticated #authBadgeContainer,
body.is-unauthenticated #btnOpenMobileDrawer,
body.is-unauthenticated .btn-logout-action,
body.is-unauthenticated .mobile-bottom-nav,
body.is-unauthenticated .fab-quick-add {
    display: none !important;
    visibility: hidden !important;
}

/* DESKTOP (>= 992px): Mobile bottom nav & mobile drawer button are NEVER visible */
@media (min-width: 992px) {

    .mobile-bottom-nav,
    nav.mobile-bottom-nav,
    #btnOpenMobileDrawer {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        pointer-events: none !important;
    }

    body.is-authenticated #navbarMain {
        display: flex !important;
        visibility: visible !important;
    }

    body.is-authenticated #authBadgeContainer {
        display: flex !important;
        visibility: visible !important;
    }
}

/* MOBILE (< 992px): When authenticated, show mobile bottom nav and drawer button */
@media (max-width: 991px) {
    #navbarMain {
        display: none !important;
    }

    body.is-authenticated .mobile-bottom-nav {
        display: flex !important;
        visibility: visible !important;
    }

    body.is-authenticated #btnOpenMobileDrawer {
        display: flex !important;
        visibility: visible !important;
    }

    body.is-authenticated #authBadgeContainer {
        display: flex !important;
        visibility: visible !important;
    }
}

/* Floating Action Button for Mobile */
.fab-quick-add {
    display: none;
    position: fixed;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    color: #fff;
    border: none;
    box-shadow: 0 6px 18px rgba(185, 28, 28, 0.42);
    align-items: center;
    justify-content: center;
    font-size: 22px;
    z-index: 1025;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.fab-quick-add:active {
    transform: scale(0.9);
}

@media (max-width: 991px) {
    .fab-quick-add {
        display: flex;
    }
}

/* Lightbox Modal */
.lightbox-modal .modal-content {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.lightbox-img-wrapper {
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    padding: 10px;
}

.lightbox-img-wrapper img {
    max-height: 68vh;
    max-width: 100%;
    object-fit: contain;
    border-radius: 6px;
}

/* Digital Receipt Card (Traditional Elegant English Style) */
.receipt-wrapper {
    background: #fffdfa;
    border: 3px double #b91c1c;
    border-radius: 12px;
    padding: 26px 30px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.receipt-border-decor {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border: 1px dashed rgba(185, 28, 28, 0.35);
    pointer-events: none;
    border-radius: 8px;
}

.receipt-header {
    text-align: center;
    border-bottom: 2px solid #b91c1c;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.receipt-om {
    font-size: 16px;
    color: #b91c1c;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.receipt-puja-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #991b1b;
    margin: 4px 0;
}

.receipt-tagline {
    font-size: 0.85rem;
    color: #475569;
    font-weight: 500;
}

.receipt-meta-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 600;
}

.receipt-body-line {
    font-size: 0.95rem;
    line-height: 1.9;
    margin-bottom: 12px;
}

.receipt-fill-data {
    font-weight: 700;
    color: #0f172a;
    border-bottom: 1px dotted #94a3b8;
    padding: 0 6px;
}

.receipt-amount-box {
    display: inline-block;
    background: #fef2f2;
    border: 2px solid #b91c1c;
    padding: 6px 18px;
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: 800;
    color: #b91c1c;
}

.receipt-signatures {
    display: flex;
    justify-content: space-between;
    margin-top: 36px;
    padding-top: 12px;
}

.sign-box {
    text-align: center;
    border-top: 1px dashed #64748b;
    flex: 1 1 0;
    min-width: 70px;
    max-width: 160px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    padding-top: 4px;
    word-break: break-word;
}

/* Form Styles */
.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-control,
.form-select {
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-subtle);
    padding: 9px 12px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}

/* ======================================================== */
/* COMPREHENSIVE MOBILE RESPONSIVE SYSTEM                   */
/* ======================================================== */

/* Mobile Record Cards for Chanda & Expenses */
.mobile-record-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
}

.mobile-record-card:active {
    background-color: #fbfbfb;
}

.mobile-record-card.chanda-card {
    border-left: 4px solid var(--success-color);
}

.mobile-record-card.expense-card {
    border-left: 4px solid var(--danger-color);
}

.mobile-record-card .card-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.mobile-record-card .donor-name,
.mobile-record-card .expense-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 2px;
}

.mobile-record-card .amount-cell {
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.mobile-record-card .donor-details-row,
.mobile-record-card .expense-meta-box {
    background: #f8fafc;
    border-radius: 6px;
    padding: 6px 8px;
    margin-top: 6px;
    margin-bottom: 6px;
    font-size: 0.76rem;
    color: var(--text-secondary);
    border: 1px solid #edf2f7;
}

.mobile-record-card .mobile-bill-gallery {
    background: #f8fafc;
    border-radius: 6px;
    padding: 6px 8px;
    margin-top: 6px;
    margin-bottom: 6px;
    border: 1px solid #edf2f7;
}

.mobile-record-card .card-footer-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 8px;
    margin-top: 6px;
    border-top: 1px dashed var(--border-subtle);
}

/* Airavat Web Consultancy Preloader */
#appPreloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.preloader-content {
    text-align: center;
    animation: preloaderPulse 1.8s ease-in-out infinite;
    padding: 20px;
}

.preloader-logo {
    max-width: 280px;
    width: 80%;
    height: auto;
    margin-bottom: 22px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
}

.preloader-spinner {
    width: 36px;
    height: 36px;
    border: 3.5px solid #e2e8f0;
    border-top-color: #b91c1c;
    border-radius: 50%;
    animation: preloaderSpin 0.75s linear infinite;
    margin: 0 auto 12px auto;
}

.preloader-text {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

@keyframes preloaderSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes preloaderPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.02);
        opacity: 0.94;
    }
}

/* Footer Styling */
.app-footer {
    background: #ffffff;
    border-top: 1px solid var(--border-subtle);
    padding: 18px 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: auto;
}

.app-footer a {
    color: #0284c7;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.app-footer a:hover {
    color: #b91c1c;
    text-decoration: underline;
}

.app-footer .footer-company-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
    margin-left: 4px;
    text-decoration: none !important;
}

.app-footer .footer-company-badge:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.app-footer .footer-company-badge img {
    height: 18px;
    width: auto;
}

/* ======================================================== */
/* RESPONSIVE MEDIA QUERIES (TABLETS & MOBILE PHONES)      */
/* ======================================================== */

/* Tablet & Mobile Breakpoints (max-width: 991px) */
@media (max-width: 991px) {
    #navbarMain {
        display: none !important;
    }

    .navbar-custom {
        padding: 8px 0;
    }

    .content-card-body {
        padding: 16px;
    }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
    #navbarMain {
        display: none !important;
    }

    .navbar-brand-wrapper {
        gap: 8px;
        max-width: calc(100% - 120px);
        flex-grow: 1;
        min-width: 0;
    }

    .brand-icon-circle {
        width: 36px;
        height: 36px;
        font-size: 16px;
        flex-shrink: 0;
    }

    .brand-title {
        font-size: 0.9rem !important;
        line-height: 1.15;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        max-width: none !important;
        display: block;
    }

    .brand-subtitle {
        display: none !important;
    }

    #authBadgeContainer {
        gap: 4px !important;
    }

    .mode-badge {
        padding: 3px 8px;
        font-size: 0.72rem;
    }

    .btn-logout-action {
        padding: 4px 8px !important;
        font-size: 0.75rem !important;
    }

    .filter-bar {
        padding: 12px;
        margin-bottom: 16px;
    }
}

/* Small Smart Phones (max-width: 576px) */
@media (max-width: 576px) {

    html,
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    .container-fluid {
        padding-left: 8px !important;
        padding-right: 8px !important;
        overflow-x: hidden !important;
        max-width: 100% !important;
    }

    /* Prevent iOS auto-zoom on input focus */
    .form-control,
    .form-select {
        font-size: 16px !important;
        padding: 8px 10px;
    }

    .form-label {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }

    /* Top Header */
    .navbar-brand-wrapper {
        gap: 6px;
        flex: 1 1 auto;
        min-width: 0;
        max-width: calc(100% - 90px);
    }

    .brand-icon-circle {
        width: 34px;
        height: 34px;
        font-size: 15px;
        flex-shrink: 0;
    }

    .brand-title {
        font-size: 0.85rem !important;
        font-weight: 800;
        line-height: 1.15;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        max-width: none !important;
        display: block;
    }

    .brand-subtitle {
        display: none !important;
    }

    #authBadgeContainer .mode-badge {
        padding: 3px 6px;
        font-size: 0.7rem;
    }

    #authBadgeContainer .btn-logout-action {
        padding: 4px 7px !important;
        font-size: 0.72rem !important;
    }

    /* PWA Banner */
    .pwa-install-banner {
        width: 100%;
        box-sizing: border-box;
        padding: 6px 10px !important;
        margin-bottom: 12px;
    }

    /* Dedicated Login Screen */
    #view_login_screen {
        min-height: 75vh;
        padding: 10px 0;
    }

    .login-auth-card {
        border-radius: var(--radius-md);
        margin: 16px auto !important;
        max-width: calc(100% - 20px) !important;
    }

    .login-auth-header {
        padding: 24px 16px;
    }

    .login-auth-header h2 {
        font-size: 1.2rem;
    }

    /* Welcome Header Card in Dashboard */
    #view_dashboard .content-card-body {
        padding: 12px 14px !important;
    }

    #view_dashboard .content-card-body>.d-flex.gap-2,
    #view_dashboard .welcome-actions-row {
        width: 100%;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        gap: 6px !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }

    #view_dashboard .content-card-body>.d-flex.gap-2>.btn,
    #view_dashboard .welcome-actions-row>.btn {
        flex: 1 1 0;
        white-space: nowrap !important;
        text-align: center;
        padding: 6px 8px !important;
        font-size: 0.78rem !important;
    }

    /* KPI Metric Cards on Phone */
    .kpi-card {
        padding: 10px 8px !important;
        border-radius: 10px;
    }

    .kpi-icon-box {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
        border-radius: 6px !important;
        margin-left: 4px;
    }

    .kpi-label {
        font-size: 0.65rem !important;
        letter-spacing: 0.02em !important;
        margin-bottom: 2px !important;
        line-height: 1.2;
    }

    .kpi-value {
        font-size: 1.1rem !important;
        line-height: 1.2 !important;
        margin: 2px 0 !important;
    }

    .kpi-subtext {
        font-size: 0.65rem !important;
        margin-top: 2px !important;
        margin-bottom: 0 !important;
    }

    /* Filter Bar on Mobile */
    .filter-bar {
        padding: 8px 10px !important;
        margin-bottom: 12px !important;
    }

    .filter-bar .row {
        --bs-gutter-y: 0.35rem;
        --bs-gutter-x: 0.35rem;
    }

    .filter-bar .form-control,
    .filter-bar .form-select {
        font-size: 0.8rem !important;
        padding: 6px 8px !important;
    }

    /* View Headers (Chanda, Expenses, Reports) - SINGLE LINE, COMPACT */
    .app-view-section>.d-flex.justify-content-between {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
    }

    .app-view-section>.d-flex.justify-content-between h2 {
        font-size: 1rem !important;
        margin-bottom: 0 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .app-view-section>.d-flex.justify-content-between p {
        display: none !important;
    }

    .app-view-section>.d-flex.justify-content-between>.d-flex.gap-2,
    .app-view-section>.d-flex.justify-content-between>.header-action-group {
        width: auto !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        flex-shrink: 0 !important;
    }

    .app-view-section>.d-flex.justify-content-between .btn {
        width: auto !important;
        padding: 5px 10px !important;
        font-size: 0.76rem !important;
        white-space: nowrap !important;
    }

    /* Content Cards & Padding */
    .content-card-body {
        padding: 10px !important;
    }

    .content-card-header {
        padding: 10px 12px !important;
    }

    .content-card-title {
        font-size: 0.9rem;
    }

    /* Lists padding bottom so floating button or nav never covers cards */
    #chandaCardsList,
    #expenseCardsList {
        padding-bottom: 60px !important;
    }

    /* Floating Action Button for Mobile */
    .fab-quick-add {
        width: 44px !important;
        height: 44px !important;
        font-size: 18px !important;
        bottom: calc(66px + env(safe-area-inset-bottom, 0px)) !important;
        right: 14px !important;
        box-shadow: 0 4px 12px rgba(185, 28, 28, 0.35) !important;
    }

    /* Modal Dialogs - ULTRA RESPONSIVE & COMPACT */
    .modal-dialog {
        margin: 8px auto !important;
        max-width: calc(100vw - 16px) !important;
        width: calc(100vw - 16px) !important;
    }

    .modal-content {
        background-color: #ffffff !important;
        border-radius: 14px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .modal-header {
        position: sticky;
        top: 0;
        background: #ffffff;
        z-index: 1055;
    }

    .modal-body {
        padding: 10px 12px !important;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-body .form-label {
        font-size: 0.74rem !important;
        font-weight: 600;
        margin-bottom: 2px !important;
    }

    .modal-body .form-control,
    .modal-body .form-select {
        font-size: 0.8rem !important;
        padding: 5px 8px !important;
    }

    .modal-body .input-group-text {
        font-size: 0.8rem !important;
        padding: 5px 8px !important;
    }

    .modal-header {
        padding: 10px 14px !important;
    }

    .modal-header .modal-title {
        font-size: 0.95rem !important;
    }

    .modal-footer {
        padding: 8px 12px !important;
    }

    .modal-dialog .border-top.d-flex {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 6px !important;
        margin-top: 10px !important;
        padding-top: 8px !important;
    }

    .modal-dialog .border-top.d-flex>button {
        width: auto !important;
        padding: 6px 12px !important;
        font-size: 0.78rem !important;
        flex-shrink: 0 !important;
    }

    .modal-dialog .border-top.d-flex>.d-flex {
        width: auto !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        justify-content: center !important;
    }

    .modal-dialog .border-top.d-flex>.d-flex>button {
        width: auto !important;
        padding: 6px 10px !important;
        font-size: 0.76rem !important;
        white-space: nowrap !important;
    }

    #btnSaveSettings,
    #btnSeedDemoData {
        width: auto !important;
        padding: 7px 14px !important;
        font-size: 0.82rem !important;
    }

    .image-upload-box {
        padding: 8px 10px !important;
    }

    .image-upload-box i {
        font-size: 1.3rem !important;
        margin-bottom: 4px !important;
    }

    .image-upload-box h6 {
        font-size: 0.78rem !important;
        margin-bottom: 2px !important;
    }

    .image-upload-box p {
        font-size: 0.68rem !important;
    }

    .image-upload-box h6 {
        font-size: 0.85rem !important;
    }

    /* Digital Receipt Slip */
    .receipt-wrapper {
        padding: 14px 12px !important;
        border-width: 2px !important;
        border-radius: 10px !important;
    }

    .receipt-om {
        font-size: 0.68rem !important;
        letter-spacing: 0.04em !important;
    }

    .receipt-puja-title {
        font-size: 1.12rem !important;
        line-height: 1.25 !important;
    }

    .receipt-tagline {
        font-size: 0.74rem !important;
    }

    .receipt-meta-row {
        flex-direction: column;
        gap: 4px;
        margin-bottom: 12px !important;
        font-size: 0.82rem !important;
    }

    .receipt-body-line {
        font-size: 0.86rem !important;
        line-height: 1.6 !important;
        margin-bottom: 8px !important;
    }

    .receipt-amount-box {
        font-size: 1.15rem !important;
        padding: 4px 12px !important;
    }

    .receipt-signatures {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 6px;
        justify-content: space-around;
        margin-top: 20px !important;
    }

    .sign-box {
        min-width: 80px !important;
        flex: 1 1 30%;
        font-size: 0.7rem !important;
        padding-top: 2px !important;
    }

    /* Reports / Balance Sheet */
    .print-report-container {
        padding: 14px !important;
        max-width: 100% !important;
        overflow-x: hidden;
    }

    #auditPujaName {
        font-size: 1.15rem !important;
    }

    /* Footer Clearance on Mobile (Avoid bottom nav overlap) */
    .app-footer {
        margin-bottom: 0px !important;
        padding: 14px 12px !important;
        font-size: 0.76rem !important;
    }
}

/* ======================================================== */
/* ANIMATED AJAX CONFIRMATION & ALERT MODAL                */
/* ======================================================== */
.animated-confirm-modal .modal-sm-custom {
    max-width: 380px !important;
    margin: 20px auto !important;
    width: calc(100vw - 32px) !important;
}

.animated-confirm-modal .modal-content {
    background: #ffffff !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.06) !important;
    border: none !important;
}

.animated-confirm-modal.show .animated-confirm-card {
    animation: confirmScaleBounce 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes confirmScaleBounce {
    0% {
        transform: scale(0.75) translateY(24px);
        opacity: 0;
    }

    70% {
        transform: scale(1.03) translateY(-4px);
        opacity: 1;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.animated-icon-container {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 6px auto 14px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.pulse-ring {
    position: absolute;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    z-index: 1;
    opacity: 0.8;
    animation: pulseRingAnim 1.6s ease-out infinite;
}

@keyframes pulseRingAnim {
    0% {
        transform: scale(0.85);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Icon Color Variants */
.icon-variant-danger .icon-circle {
    background: #fef2f2;
    color: #dc2626;
    border: 2px solid #fecaca;
}

.icon-variant-danger .pulse-ring {
    border: 2px solid rgba(220, 38, 38, 0.5);
}

.icon-variant-warning .icon-circle {
    background: #fffbeb;
    color: #d97706;
    border: 2px solid #fde68a;
}

.icon-variant-warning .pulse-ring {
    border: 2px solid rgba(217, 119, 6, 0.5);
}

.icon-variant-info .icon-circle {
    background: #f0f9ff;
    color: #0284c7;
    border: 2px solid #bae6fd;
}

.icon-variant-info .pulse-ring {
    border: 2px solid rgba(2, 132, 199, 0.5);
}

.icon-variant-success .icon-circle {
    background: #f0fdf4;
    color: #16a34a;
    border: 2px solid #bbf7d0;
}

.icon-variant-success .pulse-ring {
    border: 2px solid rgba(22, 163, 74, 0.5);
}

.confirm-detail-box {
    background: #f8fafc;
    border: 1px dashed var(--border-subtle);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.45;
}

.confirm-shake {
    animation: confirmShake 0.4s ease-in-out;
}

@keyframes confirmShake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-6px);
    }

    40%,
    80% {
        transform: translateX(6px);
    }
}

.modal-content {
    background-color: #ffffff !important;
    opacity: 1 !important;
}

.modal.show {
    opacity: 1 !important;
}

.offcanvas.show {
    visibility: visible !important;
}

/* ======================================================== */
/* COMMITTEE MEMBERS DIRECTORY CARDS & STYLES               */
/* ======================================================== */
.committee-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.committee-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -4px rgba(185, 28, 28, 0.1), 0 4px 8px -2px rgba(15, 23, 42, 0.05);
    border-color: #fca5a5;
}

.committee-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #b91c1c, #d97706, #b91c1c);
    opacity: 0.9;
}

.member-avatar-wrap {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
    padding: 3px;
    background: linear-gradient(135deg, #f59e0b, #b91c1c);
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.member-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #ffffff;
    display: block;
}

.member-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #b91c1c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.member-role-badge {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.28rem 0.65rem;
    border-radius: 9999px;
    display: inline-block;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-badge-president {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.role-badge-secretary {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.role-badge-treasurer {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.role-badge-default {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-whatsapp {
    background-color: #25D366;
    color: #ffffff;
    border: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-whatsapp:hover,
.btn-whatsapp:focus {
    background-color: #1ebc57;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.btn-call {
    background-color: #f0fdf4;
    color: #15803d;
    border: 1px solid #86efac;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-call:hover,
.btn-call:focus {
    background-color: #15803d;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(21, 128, 61, 0.2);
}

/* ======================================================== */
/* 1-TIME FESTIVE SPLASH / INTRO ANIMATION ("ALAG LEVEL")   */
/* ======================================================== */
.festive-splash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999999;
    background: radial-gradient(circle at 50% 38%, #36070a 0%, #170205 60%, #070002 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 1.25rem;
    box-sizing: border-box;
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.festive-splash-overlay.splash-exit {
    opacity: 0;
    transform: scale(1.08);
    pointer-events: none;
}

/* Sacred Spinning Mandala Aura in Background */
.festive-mandala-bg {
    position: absolute;
    width: min(850px, 140vw);
    height: min(850px, 140vw);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.15) 0%, rgba(185, 28, 28, 0.08) 45%, transparent 70%);
    border: 1px dashed rgba(245, 158, 11, 0.2);
    animation: festiveMandalaSpin 50s linear infinite;
    pointer-events: none;
    z-index: 1;
}

.festive-mandala-bg::after {
    content: '';
    position: absolute;
    inset: 30px;
    border-radius: 50%;
    border: 1px dotted rgba(254, 240, 138, 0.15);
    animation: festiveMandalaSpinRev 35s linear infinite;
}

@keyframes festiveMandalaSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes festiveMandalaSpinRev {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

/* Shimmering Divine Particles */
.festive-particles-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.festive-particle {
    position: absolute;
    background: radial-gradient(circle, #fde047 20%, rgba(245, 158, 11, 0.4) 60%, transparent 100%);
    border-radius: 50%;
    opacity: 0.8;
    animation: festiveParticleFloat 4s ease-in-out infinite alternate;
}

@keyframes festiveParticleFloat {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 0.3;
    }

    100% {
        transform: translateY(-28px) scale(1.2);
        opacity: 0.9;
    }
}

/* Center Content Glass Card */
.festive-splash-card {
    position: relative;
    z-index: 10;
    max-width: 580px;
    width: 100%;
    background: rgba(28, 5, 8, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    border-radius: 28px;
    padding: 2.25rem 1.5rem;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 0 0 50px rgba(185, 28, 28, 0.3), inset 0 1px 0 rgba(254, 240, 138, 0.3);
    text-align: center;
    animation: festiveCardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes festiveCardEntrance {
    0% {
        opacity: 0;
        transform: scale(0.85) translateY(25px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Auspicious Diya & Om Icon */
.festive-divine-symbol {
    position: relative;
    width: 84px;
    height: 84px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.festive-symbol-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.6), inset 0 0 15px rgba(185, 28, 28, 0.5);
    animation: festiveRingPulse 2s ease-in-out infinite;
}

@keyframes festiveRingPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.08);
        opacity: 1;
        box-shadow: 0 0 35px rgba(245, 158, 11, 0.9), inset 0 0 20px rgba(220, 38, 38, 0.7);
    }
}

.festive-symbol-icon {
    font-size: 2.6rem;
    color: #fef08a;
    text-shadow: 0 0 20px rgba(254, 240, 138, 0.8), 0 0 40px rgba(245, 158, 11, 0.6);
}

.festive-sanskrit-chant {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, #fef08a 0%, #facc15 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 24px rgba(250, 204, 21, 0.4);
    margin-bottom: 0.6rem;
}

.festive-club-title {
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.2rem, 4.5vw, 1.7rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-bottom: 0.4rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.festive-puja-heading {
    font-size: clamp(0.95rem, 3.5vw, 1.15rem);
    font-weight: 600;
    color: #fca5a5;
    margin-bottom: 0.85rem;
}

.festive-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 1rem auto;
    color: #f59e0b;
    opacity: 0.8;
}

.festive-divider::before,
.festive-divider::after {
    content: '';
    height: 1px;
    width: 60px;
    background: linear-gradient(90deg, transparent, #f59e0b, transparent);
}

.festive-welcome-msg {
    color: #e2e8f0;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    opacity: 0.92;
}

.btn-festive-enter {
    background: linear-gradient(135deg, #b91c1c 0%, #d97706 100%);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.75rem 1.8rem;
    border-radius: 9999px;
    border: 1px solid rgba(254, 240, 138, 0.4);
    box-shadow: 0 10px 25px -4px rgba(185, 28, 28, 0.6), 0 0 20px rgba(217, 119, 6, 0.4);
    transition: all 0.25s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-festive-enter:hover {
    background: linear-gradient(135deg, #991b1b 0%, #b45309 100%);
    color: #ffffff;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 14px 30px -4px rgba(185, 28, 28, 0.8), 0 0 30px rgba(245, 158, 11, 0.6);
}

.festive-auto-progress-wrapper {
    margin-top: 1.25rem;
    width: 100%;
    max-width: 240px;
    margin-left: auto;
    margin-right: auto;
}

.festive-progress-track {
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.festive-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    border-radius: 3px;
    transition: width 0.1s linear;
}

.festive-auto-hint {
    font-size: 0.72rem;
    color: #cbd5e1;
    margin-top: 0.4rem;
    opacity: 0.75;
}

/* ======================================================== */
/* USER MANAGEMENT MODAL STYLES                             */
/* ======================================================== */
/* ======================================================== */
/* ENHANCED PASSWORD & USER SECURITY MODAL STYLES          */
/* ======================================================== */
#userManagementModal .modal-dialog {
    max-width: 520px !important;
}

#userManagementModal .modal-content {
    background: #ffffff !important;
    border-radius: 20px !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
    overflow: hidden;
}

.security-modal-badge {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #b91c1c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    border: 1px solid #fecaca;
    box-shadow: 0 2px 6px rgba(185, 28, 28, 0.12);
}

.security-segment-wrapper {
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.security-pills-nav .nav-link {
    border-radius: 8px !important;
    color: #64748b !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    padding: 7px 12px !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border: none !important;
    background: transparent !important;
}

.security-pills-nav .nav-link.active {
    background: #ffffff !important;
    color: #b91c1c !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
}

.security-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.security-input-group {
    border-radius: 10px !important;
    overflow: hidden;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    transition: all 0.2s ease;
}

.security-input-group:focus-within {
    border-color: #b91c1c !important;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12) !important;
}

.security-input-group .input-group-text {
    background-color: transparent !important;
    border: none !important;
    color: #64748b !important;
    padding-left: 12px;
}

.security-input-group .form-control {
    border: none !important;
    box-shadow: none !important;
    font-size: 0.88rem;
    padding: 8px 10px;
    background-color: transparent !important;
}

.security-input-group .form-control:focus {
    box-shadow: none !important;
    border: none !important;
}

.security-input-group .btn-toggle-password {
    background-color: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    padding: 0 12px !important;
    font-size: 0.85rem !important;
    transition: all 0.2s ease;
}

.security-input-group .btn-toggle-password:hover {
    color: #b91c1c !important;
    background-color: transparent !important;
}

.viewer-account-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.viewer-account-card:hover {
    border-color: #fca5a5;
    background: #fffafa;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(185, 28, 28, 0.06);
}

.viewer-avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #b91c1c;
    font-weight: 700;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fecaca;
    flex-shrink: 0;
}