        .modern-dashboard {
            display: flex;
            min-height: 100vh;
            background: #f5f5f5;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        }
        .level-title{
            cursor: pointer;
        }

        /* Subject Section Styles */
        .subject-section {
            margin-bottom: 30px;
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            overflow: hidden;
        }

        .subject-title {
            padding: 15px 20px;
            background: #f8f9fa;
            margin: 0;
            font-size: 18px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            transition: background-color 0.3s;
        }

        .subject-title:hover {
            background: #e9ecef;
        }

        .subject-content {
            padding: 15px;
        }

        .subject-progress-container {
            display: flex;
            align-items: center;
            margin-left: 15px;
            flex: 1;
            max-width: 300px;
        }

        .subject-progress-bar {
            height: 8px;
            background: #e9ecef;
            border-radius: 4px;
            overflow: hidden;
            flex: 1;
            margin-right: 10px;
        }

        .subject-progress-fill {
            height: 100%;
            background: #28a745;
            border-radius: 4px;
        }

        .subject-progress-text {
            font-size: 14px;
            color: #6c757d;
            white-space: nowrap;
        }

        .subject-divider {
            height: 1px;
            background: #e9ecef;
            margin: 20px 0;
        }

        /* Level Section Styles within Subject */
        .subject-content .level-section {
            margin-bottom: 15px;
            background: #f8f9fa;
            border-radius: 6px;
            overflow: hidden;
        }

        .subject-content .level-title {
            padding: 10px 15px;
            margin: 0;
            font-size: 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: #e9ecef;
        }

        .level-section .level-content {
            display: none;
            flex-wrap: wrap;
            padding: 15px;
        }

        /* Sidebar Styles */
        .sidebar {
            width: 250px;
            background: #235390;
            color: white;
            border-right: 1px solid rgba(255, 255, 255, 0.1);
            padding: 20px 0;
            position: fixed;
            height: 100vh;
            left: 0;
            top: 0;
            display: flex;
            flex-direction: column;
        }

        /* Site Logo Styles */
        .site-logo {
            padding: 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            margin-bottom: 20px;
            text-align: center;
        }

        .site-logo img {
            max-width: 180px;
            height: auto;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.2);
            background: white;
        }

        .nav-menu {
            display: flex;
            flex-direction: column;
            padding: 0 15px;
            flex-grow: 1;
        }

        .nav-link {
            padding: 12px 20px;
            color: white;
            text-decoration: none;
            font-size: 16px;
            margin-bottom: 5px;
            border-radius: 5px;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .nav-link:hover {
            background: rgba(255, 255, 255, 0.1);
            color: white;
        }

        .nav-link.active {
            background: rgba(255, 255, 255, 0.2);
            color: white;
        }

        .nav-link i {
            font-size: 20px;
            width: 24px;
        }

        .nav-link.logout {
            /* margin-top: auto; */
            color: #ff4b4b;
        }
        .profile-info {
            display: flex;
            gap: 40px;
            align-items: flex-start;
            margin-bottom: 30px;
        }

        .profile-left {
            flex: 0 0 auto;
        }

        .profile-right {
            flex: 1;
            padding-top: 20px;
        }

        .profile-right h2 {
            font-size: 32px;
            margin-bottom: 20px;
            color: #235390;
        }

        .user-stats {
            display: flex;
            flex-direction: column;
            gap: 15px;
            margin-top: 20px;
        }

        .stat-item {
            background: #f0f7ff;
            padding: 12px 20px;
            border-radius: 12px;
            font-size: 16px;
            width: 200px;
        }

        .stat-item i {
            color: #235390;
            margin-right: 10px;
            font-size: 20px;
        }

        .achievement-badges {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }

        .badge {
            background: linear-gradient(145deg, #ffffff, #f0f0f0);
            padding: 20px;
            border-radius: 15px;
            text-align: center;
            box-shadow: 5px 5px 15px rgba(0,0,0,0.1);
            transition: transform 0.3s ease;
        }

        .badge:hover {
            transform: translateY(-5px);
        }

        .badge i {
            font-size: 30px;
            color: #ffd700;
            margin-bottom: 10px;
            display: block;
        }

        .badge span {
            font-size: 14px;
            font-weight: 500;
            color: #333;
        }
        /* Main Content Styles */
        .main-content {
            flex: 1;
            margin-left: 250px;
            padding: 40px;
            background: #f8f9fa;
        }

        .content-section {
            display: none;
        }

        .content-section.active {
            display: block;
        }

        /* Profile Card Styles */
        .profile-card {
            background: white;
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        }

        .profile-image img {
            width: 150px;
            height: 150px;
            border-radius: 50%;
            object-fit: contain;
            border: 5px solid #58cc02;
        }

        .progress-stats {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-top: 30px;
        }

        .stat-box {
            background: white;
            padding: 30px;
            border-radius: 20px;
            text-align: center;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        }

        .stat-box:hover {
            transform: translateY(-5px);
        }

        .stat-icon {
            font-size: 40px;
            color: #58cc02;
            margin-bottom: 15px;
        }

        /* Section Title Styles */
        .section-title {
            font-size: 24px;
            color: #235390;
            margin-bottom: 30px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        /* Attendance Styles */
        .attendance-card {
            background: white;
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
            margin-bottom: 30px;
        }

        .attendance-stats {
            display: flex;
            gap: 30px;
            margin: 30px 0;
        }

        .attendance-stat {
            flex: 1;
            text-align: center;
            padding: 25px;
            background: #f0f7ff;
            border-radius: 15px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        }

        .stat-number {
            font-size: 36px;
            font-weight: bold;
            color: #235390;
            margin-bottom: 5px;
        }

        .stat-label {
            color: #666;
            font-size: 14px;
        }

        .attendance-calendar {
            background: white;
            padding: 30px;
            border-radius: 15px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            margin-top: 30px;
        }

        .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 15px;
            margin-top: 20px;
        }

        .day {
            width: 80px;
            height: 80px;
            text-align: center;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            background: white;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            margin: 0 auto;
        }

        .attendance-stats {
            display: flex;
            justify-content: center;
            gap: 40px;
            margin: 30px 0;
        }

        .attendance-stat {
            text-align: center;
            padding: 20px;
            background: #f0f7ff;
            border-radius: 15px;
            min-width: 150px;
        }

        .stat-number {
            font-size: 36px;
            font-weight: bold;
            color: #235390;
            margin-bottom: 5px;
        }

        .stat-label {
            color: #666;
            font-size: 14px;
        }

        .attendance-calendar {
            margin-top: 30px;
            background: #f8f9fa;
            padding: 20px;
            border-radius: 15px;
        }

        .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 5px;
            margin-top: 15px;
        }

        .day-header {
            text-align: center;
            font-weight: bold;
            padding: 5px;
            color: #666;
        }

        .day {
            text-align: center;
            padding: 10px;
            border-radius: 50%;
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
        }

        .day.present {
            background: #58cc02;
            color: white;
        }

        .day.empty {
            background: none;
        }

        /* Lessons Path Styles */
        .lessons-path {
            display: flex;
            flex-wrap: wrap;
            gap: 30px;
            justify-content: start;
            padding: 40px;
            margin: 0 auto;
            padding-left: 0;
            padding-top: 20px;
        }
        a.lesson-link{
            text-decoration: none;
        }
        .lesson-link-locked, .quiz-link-locked {
            text-decoration: none;
            display: inline-block;
        }
        /* Lesson title, shown above a lesson circle only while it's hovered.
           Fixed, so the subject/level cards' overflow: hidden can't clip it;
           dashboard.js places it (vosPlaceLessonTitle()). */
        .lesson-hover-title {
            position: fixed;
            top: 0;
            left: 0;
            width: max-content;
            max-width: 200px;
            padding: 8px 10px;
            border-radius: 8px;
            background: #235390;
            color: #fff;
            font-size: 13px;
            font-weight: 600;
            line-height: 1.3;
            text-align: center;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: opacity 0.2s ease, visibility 0.2s ease;
            z-index: 10;
        }
        .lesson-hover-title::after {
            content: "";
            position: absolute;
            top: 100%;
            left: var(--arrow-x, 50%);
            transform: translateX(-50%);
            border: 6px solid transparent;
            border-top-color: #235390;
        }
        .lesson-hover-title small {
            display: block;
            margin-top: 4px;
            font-size: 11px;
            font-weight: 400;
            opacity: 0.85;
        }
        .lesson-link:hover .lesson-hover-title {
            opacity: 1;
            visibility: visible;
        }
        .lesson-circle.locked, .quiz-circle.locked {
            background: #f0f0f0;
            cursor: not-allowed;
            box-shadow: none;
            opacity: 0.7;
        }
        .lesson-circle.locked:hover {
            transform: none;
            box-shadow: none;
        }
        .lesson-circle.locked .lesson-content,
        .quiz-circle.locked .quiz-content {
            opacity: 0.35;
        }
        .lesson-lock-icon {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 26px;
            color: #8a97a0;
            z-index: 2;
        }
        .quiz-circle .lesson-lock-icon {
            font-size: 20px;
        }
        .lesson-circle {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background: white;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .lesson-circle:hover {
            transform: translateY(-5px);
            box-shadow: 0 6px 20px rgba(0,0,0,0.15);
        }

        .lesson-circle.completed {
            background: #58cc02;
            color: white;
        }

        .lesson-content {
            text-align: center;
            z-index: 1;
        }

        .lesson-number {
            display: block;
            font-size: 28px;
            font-weight: bold;
            color: #333;
            margin-bottom: 5px;
        }

        .lesson-circle.completed .lesson-number {
            color: white;
        }

        .lesson-title {
            font-size: 12px;
            cursor: pointer;
            display: block;
            color: #666;
        }
        .subject-section {
    margin-bottom: 20px;
}

        .subject-title {
            background-color: #f0f0f0;
            padding: 10px 15px;
            border-radius: 5px;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: background-color 0.3s;
        }

        .subject-title:hover {
            background-color: #e0e0e0;
        }

        .subject-content {
            display: none;
            padding: 10px;
        }

        .subject-divider {
            height: 1px;
            background-color: #ddd;
            margin: 20px 0;
        }

        .no-lessons-message {
            text-align: center;
            padding: 30px;
            background-color: #f9f9f9;
            border-radius: 5px;
            margin: 20px 0;
        }
      .level-section {border-top: 3px solid #009fe3;position: relative;  
            .fas {
                position: absolute;
                right: 20px;
            }
        }
        .level-divider {border-bottom: 2px solid #58cc02;}
        .lesson-circle.completed .lesson-title {
            color: white;
        }

        .lesson-circle.completed .fa-check {
            position: absolute;
            top: -5px;
            right: -5px;
            background: white;
            color: #58cc02;
            border-radius: 50%;
            padding: 5px;
            font-size: 12px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }
        .progress-line {
            height: 10px;
            background: #e0e0e0;
            border-radius: 5px;
            overflow: hidden;
        }

        .progress-filled {
            height: 100%;
            background: #235390;
            width: 0;
            transition: width 0.3s ease;
        }

        .progress-text {
            text-align: center;
            margin-top: 10px;
            font-weight: 500;
        }

        @keyframes blink {
            0% { opacity: 1; }
            50% { opacity: 0.3; }
            100% { opacity: 1; }
        }

        .nav-btn.blink {
            animation: blink 1s infinite;
        }
        a.quiz-link {text-decoration: none;color: unset;}
            /* Add these styles for quizzes */
        .quizzes-path {
                display: flex;
                flex-wrap: wrap;
                gap: 20px;
                padding: 20px;
                justify-content: start;
            }

            .quiz-circle {
                width: 120px;  /* Match lesson circle size */
                height: 120px;
                border-radius: 50%;
                background: white;
                display: flex;
                align-items: center;
                justify-content: center;
                box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
                position: relative;
                cursor: pointer;
                transition: all 0.3s ease;
            }
           /* In-progress status */
            .in-progress {
                position: absolute;
                bottom: -20px;
                left: 50%;
                transform: translateX(-50%);
                font-size: 12px;
                color: #666;
                white-space: nowrap;
            }

            .quiz-circle.available {
                background: #fff;
                border: 2px solid #235390;
            }

            .quiz-circle.completed {
                background: #e8f5e9;
                border: 2px solid #4caf50;
            }


        /* Responsive Design */
        @media (max-width: 768px) {
            .modern-dashboard {
                flex-direction: column;
            }

            .sidebar {
                position: relative;
                width: 100%;
                height: auto;
                padding: 10px 0;
            }

            .nav-menu {
                flex-direction: row;
                overflow-x: auto;
                padding: 0 15px 10px;
                gap: 10px;
                -webkit-overflow-scrolling: touch;
            }

            .nav-menu::-webkit-scrollbar {
                height: 4px;
            }

            .nav-menu::-webkit-scrollbar-thumb {
                background: rgba(255,255,255,0.3);
                border-radius: 2px;
            }

            .nav-link {
                margin-bottom: 0;
                white-space: nowrap;
                font-size: 14px;
                padding: 8px 15px;
                background: rgba(255,255,255,0.1);
                flex: 0 0 auto;
            }

            .main-content {
                margin-left: 0;
                padding: 15px;
            }

            .profile-info {
                flex-direction: column;
                align-items: center;
                gap: 20px;
            }

            .profile-left {
                margin-right: 0;
            }

            .profile-right {
                padding-top: 0;
                text-align: center;
                width: 100%;
            }

            .profile-right h2 {
                font-size: 24px;
                margin-bottom: 15px;
            }

            .user-stats {
                align-items: center;
                width: 100%;
            }

            .stat-item {
                width: 100%;
                max-width: none;
                box-sizing: border-box;
            }

            .progress-stats {
                grid-template-columns: 1fr;
                gap: 15px;
            }

            .stat-box {
                padding: 20px;
            }

            .attendance-stats {
                flex-direction: column;
                gap: 15px;
                margin: 20px 0;
            }

            .attendance-stat {
                width: 100%;
                box-sizing: border-box;
                min-width: 0;
                padding: 15px;
            }

            .attendance-calendar {
                padding: 10px;
            }

            .calendar-grid {
                gap: 2px;
            }

            .day-header {
                font-size: 12px;
                padding: 2px;
            }

            .day {
                width: auto;
                height: auto;
                aspect-ratio: 1;
                font-size: 11px;
                padding: 0;
            }

            .lessons-path, .quizzes-path {
                justify-content: center;
                padding: 10px 0;
                gap: 15px;
            }

            .lesson-circle, .quiz-circle {
                width: 80px;
                height: 80px;
            }

            .lesson-number {
                font-size: 20px;
            }

            .site-logo {
                padding: 10px;
                margin-bottom: 10px;
            }

            .site-logo img {
                max-width: 120px;
            }

            .achievement-badges {
                grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
                gap: 15px;
            }

            .subject-title {
                gap: 10px;
                font-size: 16px;
            }

            .subject-progress-container {
                margin-left: 5px;
                margin-right: 5px;
                width: auto;
            }

            .subject-progress-text {
                font-size: 11px;
            }

            .subject-title .fa-chevron-down,
            .subject-title .fa-chevron-up {
                min-width: 15px; /* Prevent shrinking */
                text-align: center;
            }
        }


    /* Print Result Card Styles */
    @media print {
        @page {
            margin: 0;
            size: auto;
        }

        html, body {
            margin: 0 !important;
            padding: 0 !important;
            background: white !important;
        }

        /* Scoped to .printing-mode - this used to be unconditional ("body *"),
           which hid every element on ANY print from this page (visibility, not
           display, so it still reserved layout space) whenever this stylesheet
           was loaded. dashboard.php always loads this file, including for its
           self-hosted registration modal, whose "Generate Fee Challan" print
           uses a completely different wrapper (#qr-print-wrapper, gated by its
           own .qr-printing-mode class in quick-registration.css) - so that
           print was rendering as correctly-paginated but entirely blank pages. */
        body.printing-mode * {
            visibility: hidden;
        }

        /* Specific override for our print wrapper */
        body.printing-mode #print-wrapper,
        body.printing-mode #print-wrapper * {
            visibility: visible !important;
        }

        /* Hide everything else when in printing mode */
        body.printing-mode > *:not(#print-wrapper) {
            display: none !important;
        }

        body.printing-mode {
            height: auto !important;
            overflow: visible !important;
            position: relative !important;
        }

        body.printing-mode #print-wrapper {
            display: block !important;
            position: absolute !important;
            left: 0 !important;
            top: 0 !important;
            width: 100% !important;
            margin: 0 !important;
            padding: 20px !important; /* Give some breathing room */
            box-sizing: border-box !important;
            z-index: 999999 !important;
        }

        .rupehli-result-card {
            border: 2px solid #000 !important;
            page-break-after: avoid !important;
            break-after: avoid !important;
        }

        .no-print {
            display: none !important;
        }
    }
