/* ==========================================================================
   Aadishree Yatra Admin - Modern Devotional UI Design System
   Color Palette Extracted Directly from Aadishree Trust Logo
   Primary: Royal Mandir Maroon (#5c1126) | Accent: Temple Antique Gold (#c29443)
   ========================================================================== */

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

:root {
    /* Royal Mandir Maroon from Logo */
    --primary: #5c1126;
    --primary-dark: #400a18;
    --primary-light: #fdf5f6;
    --primary-glow: rgba(92, 17, 38, 0.22);
    --maroon: #5c1126;
    --maroon-dark: #400a18;
    
    /* Temple Antique Gold from Logo */
    --gold: #c29443;
    --gold-dark: #966f27;
    --gold-light: #fbf7ee;
    --gold-glow: rgba(194, 148, 67, 0.25);
    
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    
    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #c29443;
    --warning-bg: #fbf7ee;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --info: #2563eb;
    --info-bg: #eff6ff;
    
    --male-seat: #2563eb;
    --female-seat: #db2777;
    --senior-seat: #7c3aed;
    --available-seat: #10b981;
    --selected-seat: #c29443;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f7f8fa;
    color: var(--slate-800);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Layout Structure */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar - Deep Noble Maroon & Gold */
.admin-sidebar {
    width: 270px;
    background: linear-gradient(180deg, #240913 0%, #150309 100%);
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 50;
    border-right: 1px solid rgba(194, 148, 67, 0.15);
    transition: transform 0.3s ease;
}

/* Sidebar Backdrop Overlay for Mobile Drawer */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidebar-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-close-btn {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: var(--radius-sm);
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.sidebar-brand {
    padding: 1.25rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: #fff;
    padding: 2px;
    object-fit: contain;
    box-shadow: 0 0 15px rgba(194, 148, 67, 0.35);
    border: 1px solid rgba(194, 148, 67, 0.25);
}

.brand-info h1 {
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    line-height: 1.2;
}

.brand-info span {
    font-size: 0.72rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.sidebar-menu {
    padding: 1.25rem 0.85rem;
    list-style: none;
    flex: 1;
    overflow-y: auto;
}

.menu-category {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #a87d89;
    padding: 0.75rem 0.75rem 0.35rem;
    font-weight: 700;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-md);
    color: #f1dde2;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
}

.menu-item a:hover {
    background: rgba(194, 148, 67, 0.15);
    color: #fff;
    transform: translateX(3px);
}

.menu-item.active a {
    background: linear-gradient(135deg, #6c162e 0%, #450c1b 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(92, 17, 38, 0.4);
    border-left: 3px solid var(--gold);
}

.menu-badge {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.menu-badge.live {
    background: var(--danger);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.user-meta .name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
}

.user-meta .role {
    font-size: 0.7rem;
    color: var(--slate-400);
}

/* Main Content Area */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top Navbar */
.top-navbar {
    background: #fff;
    border-bottom: 1px solid var(--slate-200);
    padding: 0.85rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: var(--shadow-sm);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--slate-700);
}

.page-title h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--slate-900);
}

.page-title p {
    font-size: 0.8rem;
    color: var(--slate-500);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.btn,
.quick-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1.15rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    line-height: 1.4;
    font-family: inherit;
    white-space: nowrap;
}

.btn:hover,
.quick-btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 3px 8px var(--primary-glow);
    border-color: var(--primary-dark);
}

.btn-primary:hover {
    box-shadow: 0 6px 14px var(--primary-glow);
    transform: translateY(-1px);
    color: #fff;
}

.btn-secondary {
    background: #fff;
    color: var(--slate-700);
    border: 1px solid var(--slate-300);
}

.btn-secondary:hover {
    background: var(--slate-50);
    border-color: var(--slate-400);
    color: var(--slate-900);
}

.btn-outline {
    background: transparent;
    color: var(--slate-700);
    border: 1px solid var(--slate-300);
}

.btn-outline:hover {
    background: var(--slate-100);
    border-color: var(--slate-400);
    color: var(--slate-900);
}

.btn-outline-white,
.btn-outline-light {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(4px);
}

.btn-outline-white:hover,
.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.btn-maroon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-color: var(--primary-dark);
    box-shadow: 0 3px 8px var(--primary-glow);
}

.btn-maroon:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 5px 12px var(--primary-glow);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #fff;
    border-color: var(--gold-dark);
    box-shadow: 0 3px 8px var(--gold-glow);
}

.btn-gold:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 5px 12px var(--gold-glow);
}

.btn-emerald,
.btn-success {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    border-color: #047857;
    box-shadow: 0 3px 8px rgba(5, 150, 105, 0.25);
}

.btn-emerald:hover,
.btn-success:hover {
    background: #047857;
    color: #fff;
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
    border-color: #b91c1c;
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.25);
}

.btn-danger:hover {
    background: #b91c1c;
    color: #fff;
    transform: translateY(-1px);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
}

.btn-outline-emerald,
.btn-outline-success {
    background: transparent;
    color: #059669;
    border-color: #059669;
}

.btn-outline-emerald:hover,
.btn-outline-success:hover {
    background: #059669;
    color: #fff;
}

.btn-outline-danger {
    background: transparent;
    color: #dc2626;
    border-color: #dc2626;
}

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

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Page Body */
.page-content {
    padding: 1.75rem;
    flex: 1;
}

/* Flash Messages */
.alert {
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: var(--success-bg);
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: var(--danger-bg);
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: var(--warning-bg);
    color: #92400e;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: var(--info-bg);
    color: #1e40af;
    border-left: 4px solid var(--info);
}

/* Stats Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1.1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.icon-maroon, .icon-orange {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(92, 17, 38, 0.12);
}

.icon-gold, .icon-amber {
    background: var(--gold-light);
    color: var(--gold);
    border: 1px solid rgba(194, 148, 67, 0.25);
}

.icon-green {
    background: var(--success-bg);
    color: var(--success);
}

.icon-blue {
    background: var(--info-bg);
    color: var(--info);
}

.icon-purple {
    background: #f5f3ff;
    color: #7c3aed;
}

.stat-info,
.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-info .stat-value,
.stat-content .stat-value,
.stat-card .stat-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--slate-900);
    line-height: 1.2;
    margin: 0.15rem 0 0.2rem;
}

.stat-info .stat-label,
.stat-content .stat-label,
.stat-card .stat-label {
    font-size: 0.78rem;
    color: var(--slate-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: block;
}

/* Cards & Sections */
.card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--slate-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}

.card-title,
.card-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--slate-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.card-header p {
    font-size: 0.8rem;
    color: var(--slate-500);
    margin-top: 2px;
}

.card-body {
    padding: 1.5rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table,
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.table th,
.data-table th {
    background: var(--slate-50);
    color: var(--slate-700);
    font-weight: 600;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--slate-200);
    white-space: nowrap;
}

.table td,
.data-table td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid var(--slate-100);
    color: var(--slate-800);
    vertical-align: middle;
}

.table tr:hover,
.data-table tr:hover {
    background: #fafbfc;
}

.table tfoot tr,
.data-table tfoot tr {
    background: var(--slate-50);
    border-top: 2px solid var(--slate-200);
    font-weight: 700;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.badge-blue, .badge-info { background: var(--info-bg); color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-green, .badge-success { background: var(--success-bg); color: #047857; border: 1px solid #a7f3d0; }
.badge-amber, .badge-warning { background: var(--warning-bg); color: #b45309; border: 1px solid #fde68a; }
.badge-red, .badge-danger { background: var(--danger-bg); color: #b91c1c; border: 1px solid #fecaca; }
.badge-gray { background: var(--slate-100); color: var(--slate-600); border: 1px solid var(--slate-200); }
.badge-purple { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.badge-teal { background: #f0fdfa; color: #0f766e; border: 1px solid #99f6e4; }

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 1.25rem;
}

.modal.active,
.modal.show {
    display: flex;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 0.4rem;
}

.form-control, .form-select {
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-size: 0.9rem;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-md);
    background-color: #fff;
    color: var(--slate-800);
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    font-family: inherit;
}

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

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

/* Yatra Live Boarding Card */
.live-progress-box {
    background: linear-gradient(135deg, #182030 0%, #1e293b 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.live-progress-box .header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.live-progress-box h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.progress-bar-container {
    height: 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 0.75rem 0;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--slate-300);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: var(--radius-lg);
    max-width: 650px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--slate-200);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--slate-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--slate-400);
}

.modal-close:hover {
    color: var(--slate-700);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--slate-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: var(--slate-50);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Friendly UI Optimization
   ========================================================================== */

@media (max-width: 992px) {
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        height: 100dvh;
        width: 280px;
        max-width: 85vw;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }
    
    .sidebar-close-btn {
        display: inline-flex;
    }
    
    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #fff;
        border: 1px solid var(--slate-300);
        color: var(--slate-700);
        border-radius: var(--radius-md);
        width: 38px;
        height: 38px;
        cursor: pointer;
        transition: background 0.15s ease;
    }
    
    .mobile-toggle:hover {
        background: var(--slate-100);
        color: var(--primary);
    }
}

@media (max-width: 768px) {
    .top-navbar {
        padding: 0.65rem 1rem;
        gap: 0.5rem;
    }

    .page-title h2 {
        font-size: 1.05rem;
        line-height: 1.25;
    }

    .page-title p {
        display: none;
    }

    .navbar-right {
        gap: 0.4rem;
    }

    .navbar-right .quick-btn span {
        display: none;
    }

    .navbar-right .quick-btn {
        padding: 0.5rem 0.65rem;
        border-radius: var(--radius-sm);
    }

    .page-content {
        padding: 1rem 0.85rem;
        padding-bottom: 75px !important;
    }

    /* Sticky Mobile Bottom Navigation Bar */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 58px;
        background: #ffffff;
        border-top: 1px solid var(--slate-200);
        box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.08);
        z-index: 1000;
        align-items: stretch;
        justify-content: space-around;
        padding: 0 0.25rem;
    }

    .mobile-bottom-nav .nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        text-decoration: none;
        color: var(--slate-500);
        font-size: 0.7rem;
        font-weight: 600;
        transition: color 0.15s ease;
        padding: 4px 0;
        background: none;
        border: none;
        cursor: pointer;
    }

    .mobile-bottom-nav .nav-item i {
        width: 20px;
        height: 20px;
    }

    .mobile-bottom-nav .nav-item.active,
    .mobile-bottom-nav .nav-item:hover {
        color: var(--primary);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 0.9rem;
    }

    .stat-icon {
        width: 38px;
        height: 38px;
    }

    .stat-value {
        font-size: 1.35rem;
    }

    .stat-label {
        font-size: 0.72rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }
}

/* ==========================================================================
   Chartered Accountant (CA) & Professional Bookkeeping Accounting System
   Journal Entries, General Ledger (Khata Bahi), Trial Balance & P&L Statements
   ========================================================================== */

/* Report Navigation Tabs */
.report-nav-tabs {
    display: flex;
    gap: 0.5rem;
    background: #e2e8f0;
    padding: 0.35rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.report-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--slate-700);
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.report-tab-btn:hover {
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.6);
}

.report-tab-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    font-weight: 700;
}

.report-tab-btn .tab-badge {
    background: var(--slate-200);
    color: var(--slate-700);
    font-size: 0.72rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-weight: 700;
}

.report-tab-btn.active .tab-badge {
    background: var(--primary-light);
    color: var(--primary);
}

/* CA Statement Container & Letterhead */
.ca-statement-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 2rem;
}

.ca-letterhead {
    text-align: center;
    padding: 1.75rem 2rem 1.25rem;
    background: linear-gradient(180deg, #fbf7ee 0%, #ffffff 100%);
    border-bottom: 2px solid rgba(194, 148, 67, 0.35);
}

.ca-trust-name {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: 0.75px;
    margin-bottom: 0.25rem;
}

.ca-trust-sub {
    font-size: 0.85rem;
    color: var(--slate-600);
    margin-bottom: 0.2rem;
}

.ca-statement-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--slate-900);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--slate-300);
    display: inline-block;
}

.ca-period-badge {
    font-size: 0.82rem;
    color: var(--slate-500);
    font-weight: 600;
    display: block;
    margin-top: 0.25rem;
}

/* Double-Entry Journal Table */
.journal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.journal-table th {
    background: #f8fafc;
    color: var(--slate-800);
    font-weight: 700;
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--slate-200);
    border-bottom: 2px solid var(--slate-300);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.journal-table td {
    padding: 0.75rem 1rem;
    vertical-align: top;
    border-bottom: 1px solid var(--slate-100);
}

.journal-entry-row {
    background: #ffffff;
}

.journal-entry-row:hover {
    background: #fbfcfe;
}

.journal-entry-divider {
    border-bottom: 2px solid #e2e8f0;
}

.dr-account-line {
    font-weight: 700;
    color: var(--slate-900);
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.2rem;
}

.cr-account-line {
    font-weight: 700;
    color: var(--slate-800);
    padding-left: 2rem;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.journal-narration {
    padding-left: 2rem;
    font-size: 0.8rem;
    font-style: italic;
    color: var(--slate-500);
    line-height: 1.35;
}

.dr-amount {
    font-family: monospace, ui-monospace;
    font-weight: 800;
    color: #065f46;
    text-align: right;
    font-size: 0.95rem;
}

.cr-amount {
    font-family: monospace, ui-monospace;
    font-weight: 800;
    color: #991b1b;
    text-align: right;
    font-size: 0.95rem;
}

/* General Ledger (Khata Bahi) Sheet */
.ledger-header-panel {
    background: #f8fafc;
    border-bottom: 1px solid var(--slate-200);
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.ledger-account-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.ledger-balance-box {
    text-align: right;
}

.ledger-balance-box .lbl {
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--slate-500);
    letter-spacing: 0.5px;
}

.ledger-balance-box .val {
    font-size: 1.35rem;
    font-weight: 800;
    font-family: monospace;
    color: var(--primary);
}

.ledger-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.ledger-table th {
    background: #f1f5f9;
    color: var(--slate-700);
    font-weight: 700;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--slate-200);
    white-space: nowrap;
}

.ledger-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--slate-100);
    vertical-align: middle;
}

.ledger-table tr.opening-row {
    background: #fffbeb;
    font-weight: 700;
}

.ledger-table tr.closing-row {
    background: #f8fafc;
    font-weight: 800;
    border-top: 2px solid var(--slate-300);
    border-bottom: 2px double var(--slate-400);
}

/* Classical T-Format P&L / Income & Expenditure Statement */
.pl-t-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--slate-300);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.pl-t-side {
    background: #fff;
}

.pl-t-side:first-child {
    border-right: 2px solid var(--slate-300);
}

.pl-side-header {
    background: #f8fafc;
    padding: 0.85rem 1.25rem;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--slate-800);
    border-bottom: 2px solid var(--slate-300);
    display: flex;
    justify-content: space-between;
}

.pl-item-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--slate-100);
    font-size: 0.88rem;
}

.pl-item-row:hover {
    background: #fafbfc;
}

.pl-item-title {
    color: var(--slate-800);
    font-weight: 600;
}

.pl-item-amount {
    font-family: monospace;
    font-weight: 700;
    font-size: 0.92rem;
    white-space: nowrap;
}

.pl-total-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-top: 2px solid var(--slate-300);
    border-bottom: 2px double var(--slate-400);
    font-weight: 800;
    font-size: 1.05rem;
}

/* CA Verification & Signatures Block */
.ca-audit-signatures {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2.5rem 2rem 1.5rem;
    border-top: 1px solid var(--slate-200);
    background: #ffffff;
}

.ca-sig-box {
    text-align: center;
}

.ca-sig-line {
    border-top: 1.5px dashed var(--slate-400);
    margin-bottom: 0.5rem;
    padding-top: 0.5rem;
}

.ca-sig-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--slate-800);
}

.ca-sig-sub {
    font-size: 0.75rem;
    color: var(--slate-500);
    margin-top: 2px;
}

/* Print Stylesheet for Auditor Documents */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 11pt !important;
    }
    
    .admin-sidebar,
    .top-navbar,
    .report-nav-tabs,
    .no-print,
    .btn,
    .sidebar-backdrop {
        display: none !important;
    }
    
    .admin-main {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .page-content {
        padding: 0 !important;
    }
    
    .ca-statement-card {
        border: none !important;
        box-shadow: none !important;
    }
    
    .journal-table th,
    .ledger-table th,
    .pl-side-header {
        background: #f1f5f9 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .pl-t-grid {
        border: 1px solid #000 !important;
    }
    
    .ca-audit-signatures {
        page-break-inside: avoid;
    }
}

/* ==========================================================================
   MODULAR SYSTEM & ACCORDION NAVIGATION STYLES
   ========================================================================== */

/* Sidebar Quick Search */
.sidebar-search-box {
    padding: 0.6rem 0.85rem 0.35rem;
}
.sidebar-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.sidebar-search-input-wrap .search-icon {
    position: absolute;
    left: 0.65rem;
    width: 14px;
    height: 14px;
    color: #a87d89;
    pointer-events: none;
}
.sidebar-search-input-wrap input {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 0.42rem 1.6rem 0.42rem 2rem;
    color: #fff;
    font-size: 0.78rem;
    outline: none;
    transition: all 0.2s ease;
}
.sidebar-search-input-wrap input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(194, 148, 67, 0.25);
}
.sidebar-search-input-wrap button {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: #a87d89;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}
.sidebar-menu-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0.75rem 1.5rem;
}
.sidebar-menu-scroll::-webkit-scrollbar {
    width: 4px;
}
.sidebar-menu-scroll::-webkit-scrollbar-thumb {
    background: rgba(194, 148, 67, 0.25);
    border-radius: 4px;
}

/* Module Accordion Drawers */
.module-drawer {
    list-style: none;
    margin-bottom: 0.35rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    overflow: hidden;
}
.module-drawer.active-module {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(194, 148, 67, 0.2);
}
.drawer-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.75rem;
    background: transparent;
    border: none;
    color: #f1dde2;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-radius: var(--radius-md);
    transition: background 0.2s ease, color 0.2s ease;
    text-align: left;
}
.drawer-header:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}
.drawer-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
}
.drawer-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--gold);
}
.module-num-badge {
    font-size: 0.65rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mod-1 { background: rgba(217, 119, 6, 0.25); color: #fbbf24; border: 1px solid rgba(217, 119, 6, 0.4); }
.mod-2 { background: rgba(37, 99, 235, 0.25); color: #93c5fd; border: 1px solid rgba(37, 99, 235, 0.4); }
.mod-3 { background: rgba(5, 150, 105, 0.25); color: #6ee7b7; border: 1px solid rgba(5, 150, 105, 0.4); }
.mod-4 { background: rgba(124, 58, 237, 0.25); color: #c4b5fd; border: 1px solid rgba(124, 58, 237, 0.4); }

.drawer-trailing {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.drawer-arrow {
    width: 15px;
    height: 15px;
    color: #a87d89;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.module-drawer.drawer-open .drawer-arrow {
    transform: rotate(180deg);
    color: var(--gold);
}

.drawer-content {
    list-style: none;
    padding: 0.2rem 0 0.35rem 1.4rem;
    display: none;
    border-left: 2px solid rgba(194, 148, 67, 0.25);
    margin: 0 0 0.35rem 1.15rem;
}
.module-drawer.drawer-open .drawer-content {
    display: block;
}
.drawer-content .menu-item a {
    padding: 0.46rem 0.75rem;
    font-size: 0.82rem;
    gap: 0.65rem;
    color: #e5cbd2;
}
.drawer-content .menu-item a i {
    width: 14px;
    height: 14px;
}
.drawer-content .menu-item.active a {
    background: linear-gradient(135deg, #7c1a35 0%, #4a0d1e 100%);
    border-left: 3px solid var(--gold);
    color: #fff;
    font-weight: 600;
}

/* Module Header Tag in Top Navbar */
.module-header-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.module-header-tag i {
    width: 12px;
    height: 12px;
}
.tag-dashboard { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.tag-tours { background: #fffbeb; color: #b45309; border: 1px solid #fcd34d; }
.tag-yatris { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.tag-finance { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.tag-governance { background: #f5f3ff; color: #5b21b6; border: 1px solid #ddd6fe; }
.tag-auth { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Top Navbar Module Switcher Dropdown */
.module-switcher-dropdown {
    position: relative;
}
.module-switch-btn {
    gap: 0.4rem;
}
.module-switcher-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 290px;
    background: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0,0,0,0.06);
    padding: 0.5rem;
    z-index: 1050;
    display: none;
    animation: fadeInDown 0.15s ease-out;
}
.module-switcher-menu.show {
    display: block;
}
.module-switcher-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--slate-400);
    padding: 0.4rem 0.6rem 0.25rem;
}
.module-switch-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--slate-700);
    transition: background 0.15s ease;
}
.module-switch-item:hover {
    background: var(--slate-50);
}
.module-switch-item.active {
    background: #fdf6ea;
    border: 1px solid rgba(194, 148, 67, 0.3);
}
.switch-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.switch-icon i {
    width: 17px;
    height: 17px;
}
.switch-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-900);
    line-height: 1.2;
}
.switch-desc {
    font-size: 0.7rem;
    color: var(--slate-500);
}

/* Executive Module Hub Cards (Dashboard Launchpad) */
.module-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.module-hub-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--slate-200);
    padding: 1.4rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.module-hub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: rgba(194, 148, 67, 0.4);
}
.module-hub-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}
.card-mod-tours::before { background: linear-gradient(90deg, #d97706, #f59e0b); }
.card-mod-yatris::before { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.card-mod-finance::before { background: linear-gradient(90deg, #059669, #34d399); }
.card-mod-governance::before { background: linear-gradient(90deg, #7c3aed, #a78bfa); }

.module-hub-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
}
.module-hub-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.card-mod-tours .module-hub-icon { background: #fef3c7; color: #b45309; }
.card-mod-yatris .module-hub-icon { background: #dbeafe; color: #1e40af; }
.card-mod-finance .module-hub-icon { background: #d1fae5; color: #065f46; }
.card-mod-governance .module-hub-icon { background: #ede9fe; color: #5b21b6; }

.module-hub-title h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 0.15rem;
}
.module-hub-title span {
    font-size: 0.75rem;
    color: var(--slate-500);
}
.module-hub-metrics {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--slate-50);
    border-radius: var(--radius-md);
}
.module-hub-metrics .metric-val {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--slate-900);
    line-height: 1;
}
.module-hub-metrics .metric-lbl {
    font-size: 0.75rem;
    color: var(--slate-500);
}
.module-hub-links {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.module-hub-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--slate-700);
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.15s ease;
    background: #fff;
    border: 1px solid var(--slate-200);
}
.module-hub-link:hover {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary-dark) !important;
    box-shadow: 0 4px 12px var(--primary-glow);
    transform: translateX(3px);
}
.module-hub-link:hover span,
.module-hub-link:hover i {
    color: #ffffff !important;
}
.module-hub-link i {
    width: 14px;
    height: 14px;
    transition: transform 0.15s ease;
}
.module-hub-link:hover i {
    transform: translateX(2px);
}

/* Ensure links styled as badges maintain legible text on hover */
a.badge:hover {
    opacity: 0.88;
    text-decoration: none;
}

