:root {
    --theme-primary: #1d6dbd;
    --theme-secondary: #f78637;
    --theme-success: #10b981;
    --theme-danger: #dc2626;
    --theme-warning: #f59e0b;
    --theme-info: #3b82f6;
    --theme-dark: #1a1c23;
    --theme-light: #f8f9fc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #f0f2f5 100%);
    font-weight: 400;
    color: #2d3748;
    min-height: 100vh;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #1a202c;
}

/* ============================================
   TOP BAR - THEME SECONDARY
   ============================================ */
.top-bar {
    background: linear-gradient(135deg, var(--theme-dark) 0%, #2d3748 100%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    padding: 10px 0;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-bar i {
    margin-right: 6px;
    color: var(--theme-secondary);
}

/* ============================================
   NAVBAR - THEME PRIMARY
   ============================================ */
.navbar {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #155a9e 100%) !important;
    padding: 12px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: -0.5px;
}

.navbar-brand i {
    font-size: 1.8rem;
    margin-right: 8px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 8px 18px;
    border-radius: 10px;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.9);
}

.navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.navbar-nav .btn-primary {
    background: white;
    color: var(--theme-primary);
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar-nav .btn-primary:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ============================================
   SIDEBAR - IMPROVED DROPDOWN WITH ICONS (KEEP THIS ONE)
   ============================================ */

/* Mobile Top Bar */
.mobile-top-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.mobile-menu-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
}

.mobile-logo {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.mobile-logo i {
    margin-right: 8px;
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: linear-gradient(180deg, #1a1c23 0%, #2d3748 100%);
    z-index: 1050;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: 5px 0 25px rgba(0,0,0,0.2);
}

.mobile-sidebar.open {
    left: 0;
}

.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    display: none;
    backdrop-filter: blur(2px);
}

.mobile-sidebar-overlay.active {
    display: block;
}

.mobile-sidebar-header h5 {
    color: white;
    margin: 10px 0 5px;
    font-size: 18px;
    font-weight: 600;
}

.mobile-sidebar-header small {
    color: rgba(255,255,255,0.85);
    font-size: 12px;
}

.mobile-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.15);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-close-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: rotate(90deg);
}

/* Mobile Navigation */
.mobile-nav {
    padding: 15px;
}

.mobile-nav .nav-item {
    margin-bottom: 5px;
}

.mobile-nav .nav-link {
    color: rgba(255,255,255,0.85);
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-nav .nav-link i:first-child {
    width: 24px;
    margin-right: 10px;
    font-size: 16px;
}

.mobile-nav .nav-link .ms-auto {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.mobile-nav .nav-link[aria-expanded="true"] .ms-auto {
    transform: rotate(180deg);
}

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

.mobile-nav .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

.mobile-nav .collapse .nav-link {
    padding-left: 45px;
    font-size: 13px;
}

.mobile-nav .collapse .nav-link i {
    width: 20px;
    font-size: 12px;
}

.mobile-nav .nav-link.text-danger {
    color: #f56565 !important;
}

.mobile-nav .nav-link.text-danger:hover {
    background: rgba(245,101,101,0.15);
}

.mobile-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 15px 0;
}

/* Desktop Sidebar - Improved */
.desktop-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-modern {
    background: linear-gradient(180deg, #1a1c23 0%, #2d3748 100%);
    height: 100%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.sidebar-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h5 {
    color: white;
    font-weight: 700;
    margin: 0;
    font-size: 18px;
}

.sidebar-header h5 i {
    margin-right: 8px;
}

.sidebar-header small {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    display: block;
    margin-top: 8px;
}

.sidebar-nav-modern {
    padding: 15px 0;
}

.sidebar-nav-modern .nav-item {
    margin-bottom: 2px;
}

.sidebar-nav-modern .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    margin: 0 15px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-nav-modern .nav-link .menu-text {
    display: flex;
    align-items: center;
}

.sidebar-nav-modern .nav-link .menu-text i:first-child {
    width: 25px;
    margin-right: 10px;
    font-size: 16px;
}

.sidebar-nav-modern .nav-link .chevron {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.sidebar-nav-modern .nav-link[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
}

.sidebar-nav-modern .nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: translateX(3px);
}

.sidebar-nav-modern .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

.sidebar-nav-modern .nav-link.text-danger {
    color: #f56565 !important;
}

.sidebar-nav-modern .nav-link.text-danger:hover {
    background: rgba(245,101,101,0.1);
    color: #f56565 !important;
}

.sidebar-nav-modern .collapse .nav-link {
    padding: 10px 20px 10px 45px;
    margin: 2px 15px;
    font-size: 13px;
}

.sidebar-nav-modern .collapse .nav-link i {
    width: 20px;
    margin-right: 8px;
    font-size: 12px;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 15px;
}

/* Responsive */
@media (max-width: 991px) {
    .desktop-sidebar {
        display: none !important;
    }
    
    .mobile-top-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .col-md-10 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding: 70px 8px 8px !important;
    }
}

@media (min-width: 992px) {
    .mobile-top-bar, .mobile-sidebar, .mobile-sidebar-overlay {
        display: none !important;
    }
    .desktop-sidebar {
        display: block !important;
    }
}

/* Scrollbar Styling */
.sidebar-modern::-webkit-scrollbar,
.mobile-sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar-modern::-webkit-scrollbar-track,
.mobile-sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.sidebar-modern::-webkit-scrollbar-thumb,
.mobile-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
}

.sidebar-modern::-webkit-scrollbar-thumb:hover,
.mobile-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* Ensure proper accordion behavior */
.mobile-nav .collapse.show {
    display: block;
}

.mobile-nav .collapsing {
    transition: height 0.3s ease;
}

/* Desktop Sidebar */
.desktop-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-modern {
    background: linear-gradient(180deg, #1a1c23 0%, #2d3748 100%);
    height: 100%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.sidebar-header {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #155a9e 100%);
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h5 {
    color: white;
    font-weight: 700;
    margin: 0;
    font-size: 18px;
}

.sidebar-header h5 i {
    margin-right: 8px;
}

.sidebar-header small {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    display: block;
    margin-top: 8px;
}

.sidebar-nav-modern {
    padding: 15px 0;
}

.sidebar-nav-modern .nav-item {
    margin-bottom: 2px;
}

.sidebar-nav-modern .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    margin: 0 15px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-nav-modern .nav-link .menu-text {
    display: flex;
    align-items: center;
}

.sidebar-nav-modern .nav-link .menu-text i:first-child {
    width: 25px;
    margin-right: 10px;
    font-size: 16px;
}

.sidebar-nav-modern .nav-link .chevron {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.sidebar-nav-modern .nav-link[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
}

.sidebar-nav-modern .nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: translateX(3px);
}

.sidebar-nav-modern .nav-link.active {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #155a9e 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(29, 109, 189, 0.3);
}

.sidebar-nav-modern .nav-link.text-danger {
    color: #f56565 !important;
}

.sidebar-nav-modern .nav-link.text-danger:hover {
    background: rgba(245,101,101,0.1);
    color: #f56565 !important;
}

.sidebar-nav-modern .collapse .nav-link {
    padding: 10px 20px 10px 45px;
    margin: 2px 15px;
    font-size: 13px;
}

.sidebar-nav-modern .collapse .nav-link i:first-child {
    width: 20px;
    margin-right: 8px;
    font-size: 12px;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 15px;
}

/* Scrollbar Styling */
.sidebar-modern::-webkit-scrollbar,
.mobile-sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar-modern::-webkit-scrollbar-track,
.mobile-sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.sidebar-modern::-webkit-scrollbar-thumb,
.mobile-sidebar::-webkit-scrollbar-thumb {
    background: var(--theme-primary);
    border-radius: 4px;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background:var(--theme-primary);
    color: #fff;
    padding: 15px 0;
    font-weight: 500;
}

footer a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}


/* ============================================
   CARDS
   ============================================ */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    font-weight: 600;
    border: none;
    padding: 15px 20px;
}

.card-header.bg-primary,
.card-header.bg-gradient-primary {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #155a9e 100%) !important;
}

.card-header.bg-success {
    background: linear-gradient(135deg, var(--theme-success) 0%, #0e9f6e 100%) !important;
}

.card-header.bg-danger {
    background: linear-gradient(135deg, var(--theme-danger) 0%, #b91c1c 100%) !important;
}

.card-header.bg-warning {
    background: linear-gradient(135deg, var(--theme-warning) 0%, #d97706 100%) !important;
}

.card-header.bg-info {
    background: linear-gradient(135deg, var(--theme-info) 0%, #2563eb 100%) !important;
}

.card-header.bg-secondary {
    background: linear-gradient(135deg, var(--theme-secondary) 0%, #e67e22 100%) !important;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 8px 22px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #155a9e 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(29, 109, 189, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--theme-success) 0%, #0e9f6e 100%);
    border: none;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--theme-danger) 0%, #b91c1c 100%);
    border: none;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 38, 38, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--theme-warning) 0%, #d97706 100%);
    border: none;
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--theme-secondary) 0%, #e67e22 100%);
    border: none;
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d97706 100%);
    transform: translateY(-2px);
    color: white;
}

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

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #155a9e 100%);
    border-color: transparent;
    transform: translateY(-2px);
}

.btn-group .btn {
    margin: 0 2px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-group .btn:hover {
    transform: translateY(-2px);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

/* ============================================
   TABLES
   ============================================ */
.table {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0;
}

.table thead th {
    background: var(--theme-light);
    color: #4a5568;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
    padding: 15px;
}

.table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
}

.table tbody tr:hover {
    background: #f7fafc;
}

/* ============================================
   FORM CONTROLS
   ============================================ */
.form-control,
.form-select {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px rgba(29, 109, 189, 0.1);
    outline: none;
}

.form-label {
    font-weight: 500;
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 8px;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    border-radius: 12px;
    border: none;
    font-weight: 500;
    padding: 15px 20px;
}

.alert-success {
    background: #d1fae5;
    color: #059669;
}

.alert-danger {
    background: #fee2e2;
    color: var(--theme-danger);
}

.alert-warning {
    background: #fef3c7;
    color: #d97706;
}

.alert-info {
    background: #dbeafe;
    color: var(--theme-primary);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge.bg-success {
    background: #d1fae5 !important;
    color: #059669;
}

.badge.bg-danger {
    background: #fee2e2 !important;
    color: var(--theme-danger);
}

.badge.bg-warning {
    background: #fef3c7 !important;
    color: #d97706;
}

.badge.bg-info {
    background: #dbeafe !important;
    color: var(--theme-primary);
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #155a9e 100%) !important;
    color: white;
}

.badge.bg-secondary {
    background: linear-gradient(135deg, var(--theme-secondary) 0%, #e67e22 100%) !important;
    color: white;
}

.badge i {
    font-size: 10px;
    margin-right: 3px;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header-modern {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #155a9e 100%);
    padding: 25px 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.page-header-modern h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    color: white;
}

.page-header-modern p {
    font-size: 14px;
    margin: 8px 0 0 0;
    color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   STATS CARDS
   ============================================ */
.stats-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.stats-card .icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--theme-primary) 0%, #155a9e 100%);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.stats-card .icon i {
    font-size: 28px;
    color: white;
}

.stats-card h3 {
    font-size: 32px;
    font-weight: 700;
    margin: 10px 0 5px;
    color: #2d3748;
}

.stats-card p {
    font-size: 14px;
    font-weight: 500;
    color: #718096;
    margin: 0;
}

.stats-card-mini {
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    background: white;
}

.stats-card-mini:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.stats-card-compact {
    background: white;
    border-radius: 12px;
    padding: 12px 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.stats-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stats-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.stats-icon i {
    font-size: 22px;
    color: white;
}

.stats-info h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #2d3748;
}

.stats-info p {
    font-size: 12px;
    color: #718096;
    margin: 0;
}

/* ============================================
   RESULT PAGE
   ============================================ */
.result-summary {
    background: var(--theme-light);
    border: 1px solid #e2e8f0;
}

.stat-box {
    padding: 8px;
}

.stat-box h4 {
    font-weight: 700;
}

.question-review {
    background: var(--theme-light);
    transition: all 0.2s ease;
}

.question-review:hover {
    background: #f0f2f5;
}

.question-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--theme-primary) 0%, #155a9e 100%);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    flex-shrink: 0;
}

.options-row {
    font-size: 14px;
}

.options-row .option {
    padding: 2px 6px;
    border-radius: 4px;
}

.border-success {
    border-left-color: var(--theme-success) !important;
}

.border-danger {
    border-left-color: var(--theme-danger) !important;
}

/* ============================================
   LESSON CONTENT
   ============================================ */
.lesson-content {
    background: #ffffff;
    padding: 0px;
}

.lesson-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

.lesson-content pre, 
.lesson-content code {
    background: var(--theme-dark);
    color: #e2e8f0;
    padding: 12px 15px;
    border-radius: 10px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

/* ============================================
   COURSE & EXAM CARDS
   ============================================ */
.exam-card {
    transition: all 0.3s ease;
}

.exam-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.exam-info {
    background: #f8f9fc;
    padding: 10px;
    border-radius: 10px;
}

.course-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.course-icon {
    text-align: center;
    transition: all 0.3s ease;
}

.course-card:hover .course-icon i {
    transform: scale(1.05);
}

/* ============================================
   LESSON LIST
   ============================================ */
.list-group-item {
    border: none;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item:hover {
    background: #f7fafc;
}

.lesson-item {
    padding: 15px 20px;
    transition: all 0.2s ease;
}

.lesson-item:hover {
    background: #f7fafc;
    transform: translateX(5px);
}

.lesson-status {
    width: 32px;
    text-align: center;
    font-size: 18px;
}

.lesson-status.completed i {
    color: var(--theme-success);
}

.lesson-status.pending i {
    color: #cbd5e1;
}

.lesson-title {
    font-weight: 500;
    color: #2d3748;
}

.lesson-item:hover .lesson-title {
    color: var(--theme-primary);
}

/* ============================================
   INFO CARD
   ============================================ */
.info-card {
    transition: all 0.2s;
}

.info-card:hover {
    background: #e9ecef !important;
    transform: translateY(-2px);
}

/* ============================================
   EXAM SPECIFIC
   ============================================ */
.exam-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.exit-exam-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

.auto-save-status {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 999;
    font-size: 7px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 6px 9px;
    display: none;
}

.question-box {
    transition: all 0.2s ease;
}

.question-box.not-answered {
    border-left: 4px solid var(--theme-danger) !important;
    background: #fef2f2;
}

.question-box.answered {
    border-left: 4px solid var(--theme-success) !important;
    background: #f0fdf4;
}

/* ============================================
   HISTORY PAGE RESPONSIVE
   ============================================ */
.mobile-history-cards {
    display: none;
}

.desktop-history-table {
    display: block;
}

@media (max-width: 768px) {
    
    .lesson-content li,
    .lesson-content p{
    font-size: 14px;
    }


    footer {
    display: none;
    }
    .desktop-history-table {
        display: none;
    }
    
    .mobile-history-cards {
        display: block;
    }
    
    .history-card .card {
        border-radius: 12px;
        overflow: hidden;
    }
    
    .history-card .card-header {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    .history-card .card-body {
        padding: 12px 15px;
    }
    
    .history-card .row {
        margin-bottom: 8px;
        font-size: 13px;
    }
}

@media (min-width: 992px) {
    .mobile-top-bar, .mobile-sidebar, .mobile-sidebar-overlay {
        display: none !important;
    }
    .desktop-sidebar {
        display: block !important;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-brand i {
        font-size: 1.4rem;
    }
    
    .stats-card h3 {
        font-size: 24px;
    }
    
    .page-header-modern h1 {
        font-size: 22px;
    }
    
    .stats-card .icon {
        width: 45px;
        height: 45px;
    }
    
    .stats-card .icon i {
        font-size: 20px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .stats-card-mini h3,
    .stats-card-mini h5 {
        font-size: 22px;
    }
    
    .stats-icon {
        width: 40px;
        height: 40px;
    }
    
    .stats-icon i {
        font-size: 18px;
    }
    
    .stats-info h3 {
        font-size: 20px;
    }
    
    .stats-info p {
        font-size: 11px;
    }
    
    .stats-card-compact {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .page-header-modern h1 {
        font-size: 20px;
    }
    
    .page-header-modern p {
        font-size: 12px;
    }
    
    .stats-card-mini h3,
    .stats-card-mini h5 {
        font-size: 18px;
    }
}

/* ============================================
   LOGIN & REGISTER PAGES
   ============================================ */
.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 450px;
    margin: auto;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #155a9e 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.login-body {
    padding: 40px;
}

.btn-login {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #155a9e 100%);
    border: none;
    padding: 12px;
    font-weight: bold;
    width: 100%;
}

.register-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: auto;
}

.register-header {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #155a9e 100%);
    color: white;
    padding: 25px;
    text-align: center;
    border-radius: 20px 20px 0 0;
}

.register-body {
    padding: 30px;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .top-bar,
    .navbar,
    .sidebar,
    .sidebar-modern,
    .desktop-sidebar,
    .mobile-top-bar,
    footer,
    .no-print,
    .btn,
    .pagination,
    .search-box,
    .action-buttons {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

}
    /* Timer Fixed - Top Right Corner */
    .timer-fixed {
        position: fixed;
        top: 10px;
        right: 0;
        z-index: 9999;
        background: #1963ac;
        font-weight: bold;
        font-size: 18px;
        color: white;
        align-items: center;
        width: auto;
        padding: 3px 13px;
        text-align: center;
        border-radius: 5px;
    }
            
    .timer-fixed i {
        font-size: 16px;
        color: #fbbf24;
    }
    
    .timer-fixed span {
        font-family: monospace;
        font-size: 16px;
        letter-spacing: 1px;
    }
    
    /* Exit Button - Fixed Bottom Right */
    .exit-exam-btn {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 999;
    }
    
    /* Auto Save Status - Fixed Bottom Left */
    .auto-save-status {
        position: fixed;
        bottom: 20px;
        left: 20px;
        z-index: 999;
        font-size: 12px;
        background: rgba(0,0,0,0.7);
        color: white;
        padding: 5px 10px;
        border-radius: 20px;
    }
    
    /* Question Box */
    .question-box {
        transition: all 0.2s ease;
    }
    .question-box.not-answered {
        border-left: 4px solid #dc2626 !important;
        background: #fef2f2;
    }
    .question-box.answered {
        border-left: 4px solid #10b981 !important;
        background: #f0fdf4;
    }

    
    /* Disable Print */
    @media print {
        body {
            display: none;
        }
    }
    
    /* Content Margin */
    .content-wrapper {
        padding: 0px;
    }
    /* ============================================
   ADMIN LOGIN PAGE - PROFESSIONAL UI
   ============================================ */

/* Body Background */
.login-page {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #0f4c75 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Poppins', sans-serif;
}

/* Login Card */
.login-card {
    max-width: 450px;
    width: 100%;
    margin: auto;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Header */
.login-header {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #0f4c75 100%);
    padding: 40px 20px;
    text-align: center;
    color: white;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.logo-icon i {
    font-size: 38px;
    color: white;
}

.logo-icon:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.25);
}

.login-header h3 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 5px;
    letter-spacing: -0.5px;
}

.login-header p {
    font-size: 14px;
    opacity: 0.85;
    margin: 0;
}

/* Login Body */
.login-body {
    padding: 35px;
}

/* Form Labels */
.login-body .form-label {
    font-weight: 600;
    font-size: 13px;
    color: #4a5568;
    margin-bottom: 8px;
}

/* Input Groups */
.login-body .input-group {
    border-radius: 12px;
    overflow: hidden;
}

.login-body .input-group-text {
    background: var(--theme-light);
    border: 1px solid #e2e8f0;
    border-right: none;
    color: var(--theme-primary);
}

.login-body .form-control {
    border-radius: 0 12px 12px 0;
    border: 1px solid #e2e8f0;
    border-left: none;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.login-body .form-control:focus {
    border-color: var(--theme-primary);
    box-shadow: none;
}

.input-group:focus-within {
    box-shadow: 0 0 0 3px rgba(29, 109, 189, 0.15);
    border-radius: 12px;
}

/* Login Button */
.btn-login {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #0f4c75 100%);
    border: none;
    padding: 12px;
    font-weight: 600;
    font-size: 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(29, 109, 189, 0.35);
}

.btn-login i {
    font-size: 14px;
}

/* Divider */
.divider {
    text-align: center;
    position: relative;
    margin: 10px 0 6px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #e2e8f0;
}

.divider span {
    background: white;
    padding: 0 15px;
    color: #a0aec0;
    font-size: 13px;
    position: relative;
    z-index: 1;
}

/* Login Footer */
.login-footer {
    margin-top: 20px;
}

.login-footer a {
    color: var(--theme-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-footer a:hover {
    color: #0f4c75;
    text-decoration: underline;
}

/* Alert */
.alert {
    border-radius: 12px;
    border: none;
    font-size: 13px;
    padding: 12px 15px;
}

.alert-danger {
    background: #fee2e2;
    color: var(--theme-danger);
}

/* Responsive */
@media (max-width: 576px) {
    .login-card {
        max-width: 100%;
    }
    
    .login-header {
        padding: 30px 20px;
    }
    
    .logo-icon {
        width: 65px;
        height: 65px;
    }
    
    .logo-icon i {
        font-size: 30px;
    }
    
    .login-header h3 {
        font-size: 22px;
    }
    
    .login-body {
        padding: 25px;
    }
    
    .login-body .form-control {
        padding: 10px 12px;
    }
    
    .btn-login {
        padding: 10px;
    }
}

/* ============================================
   STUDENT LOGIN PAGE - PROFESSIONAL UI
   ============================================ */

/* Body Background */
.student-login-page {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #0f4c75 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
}

/* Student Login Card */
.student-login-card {
    max-width: 450px;
    width: 100%;
    margin: auto;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

/* Student Login Header */
.student-login-header {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #0f4c75 100%);
    padding: 20px 20px;
    text-align: center;
    color: white;
    border: 1px solid #fff;
}

.student-login-header .logo-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.student-login-header .logo-icon i {
    font-size: 38px;
    color: white;
}

.student-login-header .logo-icon:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.25);
}

.student-login-header h3 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 5px;
    letter-spacing: -0.5px;
}

.student-login-header p {
    font-size: 14px;
    opacity: 0.85;
    margin: 0;
}

/* Student Login Body */
.student-login-body {
    padding: 25px;
}

/* Form Labels */
.student-login-body .form-label {
    font-weight: 600;
    font-size: 13px;
    color: #4a5568;
    margin-bottom: 8px;
}

/* Input Groups */
.student-login-body .input-group {
    border-radius: 12px;
    overflow: hidden;
}

.student-login-body .input-group-text {
    background: var(--theme-light);
    border: 1px solid #e2e8f0;
    border-right: none;
    color: var(--theme-primary);
}

.student-login-body .form-control {
    border-radius: 0 12px 12px 0;
    border: 1px solid #e2e8f0;
    border-left: none;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.student-login-body .form-control:focus {
    border-color: var(--theme-primary);
    box-shadow: none;
}

.input-group:focus-within {
    box-shadow: 0 0 0 3px rgba(29, 109, 189, 0.15);
    border-radius: 12px;
}

/* Student Login Button */
.btn-student-login {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #0f4c75 100%);
    border: none;
    padding: 12px;
    font-weight: 600;
    font-size: 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-student-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(29, 109, 189, 0.35);
}

.btn-student-login i {
    font-size: 14px;
}

/* Divider */
.divider {
    text-align: center;
    position: relative;
    margin: 10px 0 10px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #e2e8f0;
}

.divider span {
    background: white;
    padding: 0 15px;
    color: #a0aec0;
    font-size: 13px;
    position: relative;
    z-index: 1;
}

/* Student Links */
.student-link {
    color: var(--theme-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.student-link:hover {
    color: #0f4c75;
    text-decoration: underline;
}

/* Alert */
.alert {
    border-radius: 12px;
    border: none;
    font-size: 13px;
    padding: 12px 15px;
}

.alert-danger {
    background: #fee2e2;
    color: var(--theme-danger);
}

/* Responsive */
@media (max-width: 576px) {
    .mobile_dashboard .col-xl-3.col-lg-4.col-md-6.col-sm-6 {
        width: 50%;
    }
    .student-login-card {
        max-width: 100%;
    }

    .student-login-header .logo-icon {
        width: 65px;
        height: 65px;
    }
    
    .student-login-header .logo-icon i {
        font-size: 30px;
    }
    
    .student-login-header h3 {
        font-size: 22px;
    }
    
    .student-login-body {
        padding: 15px;
    }
    
    .student-login-body .form-control {
        padding: 10px 12px;
    }
    
    .btn-student-login {
        padding: 10px;
    }
}
/* ============================================
   STUDENT REGISTRATION PAGE - PROFESSIONAL UI
   ============================================ */

/* Body Background */
.student-register-page {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #0f4c75 100%);
    min-height: 100vh;
    padding: 5px 0;
    font-family: 'Poppins', sans-serif;
}

/* Student Register Card */
.student-register-card {
    max-width: 900px;
    width: 100%;
    margin: auto;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

/* Student Register Header */
.student-register-header {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #0f4c75 100%);
    padding: 25px 20px;
    text-align: center;
    color: white;
    border: 1px solid #fff;
}

.student-register-header .logo-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    transition: all 0.3s ease;
}

.student-register-header .logo-icon i {
    font-size: 32px;
    color: white;
}

.student-register-header .logo-icon:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.25);
}

.student-register-header h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 5px;
}

.student-register-header p {
    font-size: 14px;
    opacity: 0.85;
    margin: 0;
}

/* Student Register Body */
.student-register-body {
    padding: 35px;
}

/* Form Labels */
.student-register-body .form-label {
    font-weight: 600;
    font-size: 13px;
    color: #4a5568;
    margin-bottom: 8px;
}

/* Input Groups */
.student-register-body .input-group {
    border-radius: 12px;
    overflow: hidden;
}

.student-register-body .input-group-text {
    background: var(--theme-light);
    border: 1px solid #e2e8f0;
    border-right: none;
    color: var(--theme-primary);
}

.student-register-body .form-control,
.student-register-body .form-select {
    border-radius: 0 12px 12px 0;
    border: 1px solid #e2e8f0;
    border-left: none;
    padding: 10px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.student-register-body .form-control:focus,
.student-register-body .form-select:focus {
    border-color: var(--theme-primary);
    box-shadow: none;
}

.student-register-body .input-group:focus-within {
    box-shadow: 0 0 0 3px rgba(29, 109, 189, 0.15);
    border-radius: 12px;
}

/* Register Button */
.btn-student-register {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #0f4c75 100%);
    border: none;
    padding: 12px;
    font-weight: 600;
    font-size: 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-student-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(29, 109, 189, 0.35);
}

/* Alert */
.alert {
    border-radius: 12px;
    border: none;
    font-size: 13px;
    padding: 12px 15px;
}

.alert-success {
    background: #d1fae5;
    color: #059669;
}

.alert-danger {
    background: #fee2e2;
    color: var(--theme-danger);
}

/* Divider */
.divider {
    text-align: center;
    position: relative;
    margin: 10px 0 10px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #e2e8f0;
}

.divider span {
    background: white;
    padding: 0 15px;
    color: #a0aec0;
    font-size: 13px;
    position: relative;
    z-index: 1;
}

/* Links */
.student-link {
    color: var(--theme-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.student-link:hover {
    color: #0f4c75;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .form-check label {
        font-size: 14px;
    }
    span.answer-status.float-end span {
    font-size: 10px;
    position: absolute;
    right: 20px;
    margin-top: 24px;
    }
    .question-box h6 {
    font-size: 15px;
    }
    h1, h2, h3, h4, h5 
    {
    font-size: 16px;
    }
    .lesson-item {
    padding: 5px 15px 5px 0px;
    }
    .lesson-title {
    font-size: 15px;
    }
    .lesson-content.p-4.bg-light.rounded {
    padding: 5px 13px !important;
    }
    h6
    {
       font-size: 13px;  
    }

    .student-register-card {
        max-width: 100%;
    }
    
    .student-register-header {
        padding: 12px 5px;
    }
    .student-register-header .logo-icon {
        width: 55px;
        height: 55px;
    }
    
    .student-register-header .logo-icon i {
        font-size: 26px;
    }
    
    .student-register-header h3 {
        font-size: 20px;
    }
    
    .student-register-body {
        padding: 15px;
    }
    
    .btn-student-register {
        padding: 10px;
    }
}

/* ============================================
   STUDENT SIDEBAR - PROPER ALIGNMENT
   ============================================ */

/* Mobile Navigation */
.mobile-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-nav .nav-link i {
    width: 22px;
    text-align: center;
}

.mobile-nav .nav-link span {
    flex: 1;
}

/* Desktop Sidebar Navigation */
.sidebar-nav-modern .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-nav-modern .nav-link i {
    width: 25px;
    text-align: center;
}

.sidebar-nav-modern .nav-link span {
    flex: 1;
}

/* Mobile Top Bar */
.mobile-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--theme-primary) 0%, #155a9e 100%);
    padding: 0 15px;
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: white;
}

/* Mobile Sidebar Header */
.mobile-sidebar-header {
    text-align: center;
    /* padding: 20px; */
    background: linear-gradient(135deg, var(--theme-primary) 0%, #155a9e 100%);
}

/* Desktop Sidebar Header */
.sidebar-header {
    text-align: center;
    padding: 25px 20px;
    background: linear-gradient(135deg, var(--theme-primary) 0%, #155a9e 100%);
}

/* Sidebar Divider */
.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 15px;
}

/* Logout Link */
.nav-link.text-danger {
    color: var(--theme-danger) !important;
}

.nav-link.text-danger:hover {
    background: rgba(220, 38, 38, 0.1) !important;
}
.lesson-content ol,
.lesson-content ul
{
    padding: 0;
    padding-left: 15px;
    margin-bottom: 0;
    margin-top: 0;
}
.lesson-content p {
    margin: 0;
}





