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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    color: #334155;
    line-height: 1.6;
    padding-top: 80px;
    padding-left: 250px;
}

body.auth-page {
    padding: 0;
}

body.question-page {
    padding-top: 0;
    padding-left: 0;
}

.sidebar {
    position: fixed;
    top: 80px;
    left: 0;
    width: 250px;
    height: calc(100vh - 80px);
    background: white;
    border-right: 1px solid #e2e8f0;
    padding: 24px 0;
    z-index: 999;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 4px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-nav a:hover {
    background: #f1f5f9;
    color: #334155;
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, #667eea, #3b82f6);
    color: white;
}

.sidebar-nav .nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.logo i {
    margin-right: 8px;
    color: #667eea;
}

.container {
    max-width: none;
    margin: 0;
    padding: 24px;
}

/* Header Styles */
.main-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 80px;
    box-sizing: border-box;
}

.question-page .main-header {
    padding: 20px 0;
}

body {
    padding-top: 80px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.header-left, .header-right {
    flex: 0 0 auto;
}

.header-center {
    flex: 1;
    text-align: center;
}

.exam-info {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.header-center h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
    line-height: 1.2;
}

.exam-stats {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #64748b;
}

.exam-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: #1e293b;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.hamburger-menu:hover {
    background: #f1f5f9;
    color: #667eea;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

/* Dashboard Layout */
.dashboard {
    display: grid;
    gap: 24px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.stat-icon.exams {
    background: #dbeafe;
    color: #3b82f6;
}

.stat-icon.students {
    background: #dcfce7;
    color: #16a34a;
}

.stat-icon.submissions {
    background: #fef3c7;
    color: #d97706;
}

.stat-icon.average {
    background: #f3e8ff;
    color: #7c3aed;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.stat-label {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.dashboard-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.section-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.section-content {
    padding: 24px;
}

/* Button Components */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #3b82f6);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: #64748b;
}

.btn-outline:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f8fafc;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: 2px solid #f59e0b;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    border-color: #d97706;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: 12px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Exam Cards */
.exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 24px;
}

.exam-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.exam-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #3b82f6);
}

.exam-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.exam-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.exam-subject {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.exam-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-draft {
    background: #fef3c7;
    color: #92400e;
}

.status-published {
    background: #dcfce7;
    color: #166534;
}

.status-ended {
    background: #fee2e2;
    color: #991b1b;
}

.status-live {
    background: #dcfce7;
    color: #166534;
    animation: pulse 2s infinite;
}

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

.exam-description {
    margin: 16px 0;
    padding: 12px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.exam-description p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.exam-description i {
    color: #667eea;
    margin-right: 8px;
}

.score-item {
    background: #f0fdf4;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #bbf7d0;
}

.exam-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 14px;
}

.meta-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    margin-right: 4px;
    color: #667eea;
}

.exam-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Auth Styles */
.auth-page {
    padding: 0;
    background: url('../images/image.png') center/cover no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.auth-background {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 480px;
    gap: 60px;
    align-items: center;
    width: 100%;
    max-width: 1000px;
}

.auth-header {
    text-align: center;
    color: white;
}

.logo-section i {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.logo-section h1 {
    font-size: 64px;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo-section p {
    font-size: 24px;
    opacity: 0.8;
    margin: 0;
    font-weight: 300;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.auth-tabs {
    display: flex;
    background: #f8fafc;
}

.tab-btn {
    flex: 1;
    padding: 18px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #64748b;
    position: relative;
}

.tab-btn.active {
    color: #3b82f6;
    background: white;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea, #3b82f6);
}

.auth-form {
    padding: 48px;
}

.auth-form.hidden {
    display: none;
}

.auth-form h2 {
    margin: 0 0 8px 0;
    color: #1e293b;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
}

.form-subtitle {
    text-align: center;
    color: #64748b;
    margin: 0 0 32px 0;
    font-size: 16px;
}

.input-group {
    position: relative;
    margin-bottom: 24px;
}

.input-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s ease;
    background: white;
    padding: 0 4px;
    z-index: 1;
}

.auth-form input {
    width: 100%;
    padding: 18px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.auth-form input:focus,
.auth-form input:not(:placeholder-shown) {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.auth-form input:focus + .input-label,
.auth-form input:not(:placeholder-shown) + .input-label {
    top: -1px;
    left: 12px;
    font-size: 12px;
    color: #3b82f6;
    font-weight: 500;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.password-toggle:hover {
    color: #3b82f6;
    background: #f3f4f6;
}

.auth-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea, #3b82f6);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.auth-links {
    text-align: center;
    margin-top: 24px;
}

.auth-links a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.auth-links a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.auth-credits {
    text-align: center;
    margin-top: 20px;
    padding: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.powered-by {
    font-size: 16px;
    margin: 8px 0;
    font-weight: 500;
}

.developer {
    font-size: 14px;
    margin: 8px 0;
}

.auth-credits a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-credits a:hover {
    color: white;
    text-decoration: underline;
}

.auth-credits i {
    font-size: 12px;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 350px;
    border-left: 4px solid #16a34a;
}

.toast.toast-error {
    border-left-color: #ef4444;
}

.toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #1e293b;
    font-weight: 500;
}

.toast-content i {
    font-size: 18px;
}

.toast-success .toast-content i {
    color: #16a34a;
}

.toast-error .toast-content i {
    color: #ef4444;
}

@media (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .auth-header {
        order: 1;
    }
    
    .auth-card {
        order: 2;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .logo-section i {
        font-size: 60px;
    }
    
    .logo-section h1 {
        font-size: 36px;
    }
    
    .auth-form {
        padding: 30px;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}

/* Notification Toast */
.notification-toast {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 16px;
    z-index: 1001;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification-toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    color: #16a34a;
    font-size: 18px;
}

.toast-message {
    color: #1e293b;
    font-weight: 500;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Exam Interface Styles */
.exam-header {
    background: white;
    border-bottom: 2px solid #e2e8f0;
    padding: 16px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.exam-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.exam-info h1 {
    margin: 0;
    color: #1e293b;
    font-size: 24px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.exam-meta {
    display: flex;
    gap: 32px;
    margin-top: 8px;
    color: #64748b;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
}

.exam-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* Hide exam header on non-exam pages */
body:not(.exam-taking) .exam-header {
    display: none;
}

/* Fullscreen exam styles */
body.exam-taking:fullscreen,
body.exam-taking:-webkit-full-screen,
body.exam-taking:-moz-full-screen {
    background: #f8fafc;
    overflow: hidden;
}

body.exam-taking:fullscreen .exam-container,
body.exam-taking:-webkit-full-screen .exam-container,
body.exam-taking:-moz-full-screen .exam-container {
    height: 100vh;
    margin-top: 0;
}

body.exam-taking:fullscreen .exam-header,
body.exam-taking:-webkit-full-screen .exam-header,
body.exam-taking:-moz-full-screen .exam-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
}

.timer-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
}

.timer-display {
    text-align: center;
}

.timer-display #timer {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.timer-label {
    font-size: 12px;
    opacity: 0.9;
}

.exam-container {
    display: flex;
    margin-top: 100px;
    min-height: calc(100vh - 100px);
}

.question-sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e2e8f0;
    padding: 24px;
    position: fixed;
    height: calc(100vh - 100px);
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 24px;
}

.sidebar-header h3 {
    margin: 0 0 16px 0;
    color: #1e293b;
    font-size: 18px;
}

.legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid;
}

.legend-dot.answered {
    background: #16a34a;
    border-color: #16a34a;
}

.legend-dot.current {
    background: #3b82f6;
    border-color: #3b82f6;
}

.legend-dot.unanswered {
    background: transparent;
    border-color: #d1d5db;
}

.question-nav {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
}

.question-nav-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #d1d5db;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.question-nav-btn:hover {
    border-color: #667eea;
}

.question-nav-btn.answered {
    background: #16a34a;
    border-color: #16a34a;
    color: white;
}

.question-nav-btn.current {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.question-nav-btn.flagged {
    background: #f59e0b;
    border-color: #f59e0b;
    color: white;
}

.exam-main {
    flex: 1;
    margin-left: 280px;
    padding: 24px;
}

.question-container {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 32px;
    margin-bottom: 24px;
    min-height: 400px;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #64748b;
}

.loading-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #667eea;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.question-number {
    background: linear-gradient(135deg, #667eea, #3b82f6);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.question-marks {
    color: #64748b;
    font-weight: 500;
}

.question-text {
    font-size: 18px;
    line-height: 1.6;
    color: #1e293b;
    margin-bottom: 24px;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-item:hover {
    border-color: #667eea;
    background: #f8fafc;
}

.option-item.selected {
    border-color: #667eea;
    background: #f0f4ff;
}

.option-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    position: relative;
}

.option-item.selected .option-radio {
    border-color: #667eea;
    background: #667eea;
}

.option-item.selected .option-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.exam-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.control-center {
    display: flex;
    gap: 12px;
}

.submit-summary {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.summary-item:last-child {
    margin-bottom: 0;
}

/* Enhanced Filter and Search Controls */
.filter-controls {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.filter-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.filter-select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-select:hover {
    border-color: #c7d2fe;
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-input:hover {
    border-color: #c7d2fe;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.search-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}



.clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.2s ease;
}

.search-container:hover .clear-search {
    opacity: 1;
}

.clear-search:hover {
    color: #ef4444;
    background: #fef2f2;
}

.filter-actions {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.clear-filters {
    padding: 12px 16px;
    background: transparent;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clear-filters:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

.results-count {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 0;
}

/* Enhanced Dropdown Styles */
select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

select:hover {
    border-color: #c7d2fe;
}

/* Input Field Enhancements */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
textarea {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
    width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="datetime-local"]:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="datetime-local"]:hover,
textarea:hover {
    border-color: #c7d2fe;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    
    .header-content {
        padding: 0 16px;
        gap: 12px;
    }
    
    .exam-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .header-center h1 {
        font-size: 16px;
        max-width: none;
    }
    
    .exam-stats {
        gap: 12px;
        font-size: 13px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .user-menu > div:nth-child(2) {
        display: none;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .exam-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .exam-card {
        padding: 16px;
    }
    
    .exam-meta {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .exam-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-body {
        max-height: 70vh;
        padding: 16px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    body {
        padding-left: 0;
        padding-top: 70px;
    }
    
    .main-header {
        padding: 12px 0;
    }
    
    .hamburger-menu {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        width: 280px;
        padding: 16px;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    .sidebar-nav a {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .notification-toast {
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
        top: 80px;
    }
    
    .notification-toast.show {
        transform: translateY(0);
    }
    
    /* Exam Taking Mobile */
    .exam-header {
        padding: 12px 0;
    }
    
    .exam-container {
        flex-direction: column;
        margin-top: 80px;
    }
    
    .question-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 16px;
    }
    
    .question-nav {
        grid-template-columns: repeat(10, 1fr);
        gap: 4px;
    }
    
    .question-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .exam-main {
        margin-left: 0;
        padding: 16px;
    }
    
    .question-container {
        padding: 20px;
        min-height: 300px;
    }
    
    .exam-header-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .exam-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .exam-info h1 {
        font-size: 16px;
        max-width: none;
    }
    
    .exam-stats {
        gap: 12px;
        font-size: 13px;
    }
    
    .timer-container {
        padding: 8px 16px;
    }
    
    .timer-display #timer {
        font-size: 20px;
    }
    
    .exam-controls {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .control-center {
        order: -1;
        justify-content: center;
    }
    
    /* Filter Mobile */
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 12px;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .search-container {
        min-width: auto;
    }
    
    .filter-actions {
        flex-direction: row;
        justify-content: space-between;
        gap: 8px;
    }
    
    .clear-filters {
        flex: 1;
        justify-content: center;
    }
    
    .results-count {
        text-align: center;
        padding: 8px 0;
    }
    
    /* Dashboard Mobile */
    .dashboard-section {
        margin-bottom: 16px;
    }
    
    .section-content {
        padding: 16px;
    }
    
    /* Button Mobile */
    .btn-lg {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
        margin-bottom: 8px;
    }
}

/* Profile Styles */
.profile-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.profile-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 32px;
}

.profile-info h3 {
    margin: 0 0 4px 0;
    color: #1e293b;
    font-size: 24px;
}

.profile-info p {
    margin: 0 0 8px 0;
    color: #64748b;
    font-size: 16px;
}

.profile-role {
    background: #dbeafe;
    color: #3b82f6;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.profile-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 600px;
}

.profile-form .form-group {
    width: 100%;
}

.profile-form input {
    width: 100%;
    max-width: 100%;
}

.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    width: 100%;
}

.profile-actions .btn {
    flex: 1;
    justify-content: center;
    font-weight: 600;
    padding: 14px 24px;
}

.profile-stats {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    height: fit-content;
}

.profile-stats h3 {
    margin: 0 0 20px 0;
    color: #1e293b;
    font-size: 18px;
}

.stats-grid {
    display: grid;
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.stat-label {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

/* Confirmation Modal Styles */
.confirmation-modal {
    width: 380px;
    height: auto;
    min-height: 200px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.confirmation-modal .modal-header {
    background: linear-gradient(135deg, #667eea, #3b82f6);
    color: white;
    border-bottom: none;
    padding: 24px 32px 20px;
}

.confirmation-modal .modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.confirmation-modal .modal-header i {
    font-size: 20px;
    opacity: 0.9;
}

.confirmation-modal .modal-body {
    padding: 32px;
    text-align: center;
}

.confirmation-modal .modal-body p {
    font-size: 16px;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}

.confirmation-modal .modal-footer {
    padding: 24px 32px 32px;
    border-top: none;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
}

.modal-header.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-bottom: none;
}

.warning-box {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.warning-box i {
    color: #d97706;
    font-size: 24px;
    margin-top: 4px;
}

.warning-box h4 {
    margin: 0 0 8px 0;
    color: #92400e;
    font-size: 16px;
}

.warning-box p {
    margin: 0 0 8px 0;
    color: #92400e;
}

.warning-box ul {
    margin: 0;
    padding-left: 20px;
    color: #92400e;
}

.warning-box li {
    margin-bottom: 4px;
}

    /* Profile Mobile */
    .profile-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .profile-avatar {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .profile-actions {
        flex-direction: column;
        gap: 12px;
        max-width: none;
    }
    
    .profile-form .form-group,
    .profile-form input {
        max-width: none;
    }
    
    /* Modal Mobile */
    .confirmation-modal {
        max-width: 95%;
        margin: 20px;
        border-radius: 12px;
    }
    
    .confirmation-modal .modal-header {
        padding: 20px 24px 16px;
    }
    
    .confirmation-modal .modal-body {
        padding: 24px;
    }
    
    .confirmation-modal .modal-footer {
        padding: 20px 24px 24px;
        flex-direction: column;
        gap: 12px;
    }
    
    .warning-box {
        flex-direction: column;
        text-align: left;
        padding: 12px;
    }
    
    .warning-box i {
        align-self: center;
        margin-bottom: 8px;
    }
    
    /* Students Grid Mobile */
    .students-grid {
        gap: 12px;
    }
    
    .student-card {
        padding: 12px;
    }
    
    /* Results Mobile */
    .results-grid {
        gap: 12px;
    }
    
    .result-card {
        padding: 16px;
    }
    
    .leaderboard-header,
    .leaderboard-row {
        grid-template-columns: 60px 1fr 80px;
        gap: 8px;
        padding: 12px;
        font-size: 14px;
    }
}

/* Leaderboard Styles */
.leaderboard-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 80px 1fr 120px;
    background: linear-gradient(135deg, #667eea, #3b82f6);
    color: white;
    font-weight: 600;
    padding: 16px;
    gap: 16px;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 80px 1fr 120px;
    padding: 16px;
    gap: 16px;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
    transition: background 0.2s ease;
}

.leaderboard-row:hover {
    background: #f8fafc;
}

.leaderboard-row:last-child {
    border-bottom: none;
}



/* Question Management Layout */
.question-management {
    display: flex;
    min-height: calc(100vh - 80px);
    margin-top: 80px;
    position: relative;
    z-index: 1;
}

.question-sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e2e8f0;
    padding: 24px;
    position: fixed;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.question-main {
    flex: 1;
    margin-left: 280px;
    padding: 24px;
    background: #f8fafc;
}

.sidebar-section {
    margin-bottom: 32px;
}

.sidebar-section h3 {
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.action-btn:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.action-btn i {
    color: #667eea;
    font-size: 18px;
}

.action-btn span {
    color: #374151;
    font-weight: 500;
}

.stats-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-mini {
    text-align: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.stat-label {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.content-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 8px 12px 8px 36px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    width: 200px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.question-form {
    padding: 24px;
}

.form-row {
    display: flex;
    gap: 20px;
    align-items: end;
    margin-bottom: 20px;
}

.form-section {
    margin-bottom: 24px;
}

.form-section label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.option-group:hover {
    border-color: #c7d2fe;
}

.option-group input[type="radio"] {
    margin: 0;
}

.option-group input[type="text"] {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
}

.radio-label {
    background: #667eea;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.tf-options {
    display: flex;
    gap: 16px;
}

.tf-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.tf-label {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tf-label.true {
    background: #dcfce7;
    color: #166534;
}

.tf-label.false {
    background: #fee2e2;
    color: #991b1b;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

.questions-container {
    overflow-y: visible;
    padding-bottom: 40px;
}

.question-item {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.question-item:hover {
    background: #f8fafc;
}

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

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.question-meta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.question-type {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.type-mcq {
    background: #dbeafe;
    color: #1e40af;
}

.type-tf {
    background: #dcfce7;
    color: #166534;
}

.type-short {
    background: #fef3c7;
    color: #92400e;
}

.short-answer-info {
    padding: 12px;
    background: #fef9e7;
    border-radius: 6px;
    border-left: 4px solid #f59e0b;
}

.answer-type {
    font-weight: 500;
    color: #92400e;
    margin-bottom: 8px;
}

.sample-answer {
    font-size: 14px;
    color: #78716c;
    font-style: italic;
}

.question-marks {
    color: #64748b;
    font-size: 14px;
}

.question-text {
    color: #1e293b;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.question-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.option-display {
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid #e2e8f0;
}

.option-display.correct {
    background: #dcfce7;
    border-color: #16a34a;
    color: #166534;
    font-weight: 500;
}

.question-actions {
    display: flex;
    gap: 8px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #c7d2fe;
}

.empty-state h4 {
    margin: 0 0 8px 0;
    color: #374151;
}

.empty-state p {
    margin: 0;
}

/* Import Modal Enhancements */
.large-modal {
    max-width: 800px;
}

.import-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 500;
    color: #64748b;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    min-height: 200px;
}

.upload-zone {
    border: 2px dashed #c7d2fe;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.upload-zone:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-zone i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 16px;
}

.upload-zone h4 {
    margin: 0 0 8px 0;
    color: #1e293b;
}

.upload-zone p {
    margin: 0 0 4px 0;
    color: #64748b;
}

.upload-zone small {
    color: #9ca3af;
}

.manual-import label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.manual-import textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 12px;
    font-family: monospace;
    margin-bottom: 12px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .question-management {
        flex-direction: column;
    }
    
    .question-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .question-main {
        margin-left: 0;
        padding: 16px;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .question-options {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .search-box input {
        width: 100%;
    }
}



/* Exam Creation Styles */
.exam-creation-form {
    max-width: 1000px;
}

.exam-details-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.exam-details-section h3 {
    margin: 0 0 20px 0;
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
}

.questions-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.questions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.questions-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
}

.question-actions {
    display: flex;
    gap: 12px;
}

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.no-questions {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.no-questions i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #c7d2fe;
}

.question-editor {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    background: #f8fafc;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.question-header h4 {
    margin: 0;
    color: #1e293b;
    font-size: 16px;
}

.question-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.question-controls label {
    font-size: 14px;
    color: #64748b;
}

.question-controls input[type="number"] {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}

.question-content label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
    margin-top: 16px;
}

.question-content label:first-child {
    margin-top: 0;
}

.question-content textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    resize: vertical;
}

.mcq-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.option-row input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.tf-options {
    display: flex;
    gap: 20px;
}

.tf-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    margin: 0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 0;
}

/* Floating Add Question Buttons */
.floating-question-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.floating-btn:hover {
    background: #2563eb;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.floating-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 8px;
    min-width: 180px;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.floating-menu.show {
    transform: translateY(0);
    opacity: 1;
}

.menu-btn {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #374151;
}

.menu-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.menu-btn i {
    color: #3b82f6;
    width: 16px;
}

/* DoS Dashboard Styles */
.dos-dashboard {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.dos-navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.dos-sidebar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.dos-sidebar .sidebar-nav a {
    color: #374151;
}

.dos-sidebar .sidebar-nav a.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.approval-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

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

.approval-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.approval-header h4 {
    margin: 0;
    color: #1e293b;
    font-size: 18px;
}

.exam-subject {
    background: #dbeafe;
    color: #1e40af;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.approval-details {
    margin-bottom: 20px;
    color: #64748b;
}

.approval-details p {
    margin: 4px 0;
}

.approval-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
}

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

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin: 0 0 4px 0;
    color: #1e293b;
    font-weight: 500;
}

.activity-content small {
    color: #64748b;
    font-size: 12px;
}

.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f8fafc;
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e2e8f0;
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #64748b;
}

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

.status-badge {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.status-badge.active {
    background: #dcfce7;
    color: #166534;
}

.status-badge.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.report-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.settings-form {
    max-width: 600px;
}

.settings-form .form-group {
    margin-bottom: 20px;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #64748b;
    font-style: italic;
}

/* DoS Mobile Styles */
@media (max-width: 768px) {
    .approval-card {
        padding: 16px;
    }
    
    .approval-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .approval-actions {
        justify-content: stretch;
        flex-direction: column;
    }
    
    .data-table {
        font-size: 14px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 8px;
    }
    
    .report-options {
        grid-template-columns: 1fr;
    }
}
/* Password Toggle Styles */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    padding-right: 40px;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 12px;
    cursor: pointer;
    color: #64748b;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #3b82f6;
}
/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 24px;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #64748b;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #3b82f6;
}

.tab-btn.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.settings-tab {
    display: none;
}

.settings-tab.active {
    display: block;
}

/* Class Management */
.class-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 12px;
    background: white;
}

.class-info h4 {
    margin: 0 0 4px 0;
    color: #1e293b;
}

.class-info p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.class-actions {
    display: flex;
    gap: 8px;
}
/* Class Management Styles */
.class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.class-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.class-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.class-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.class-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.class-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 20px;
    font-weight: 600;
}

.class-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
}

.class-stats .stat {
    text-align: center;
}

.class-stats .stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.class-stats .stat-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.class-actions {
    display: flex;
    gap: 8px;
}

.empty-state, .error-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.empty-state h3 {
    margin: 0 0 8px 0;
    color: #1e293b;
    font-size: 18px;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

.error-state {
    color: #ef4444;
}

.class-details-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.class-details-tabs .tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.class-details-tabs .tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.class-details-tabs .tab-btn:hover {
    color: #1e293b;
}
/* Reports Styling */
.report-filters {
    display: flex;
    gap: 12px;
    align-items: center;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.report-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.report-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-color: #3b82f6;
}

.report-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 24px;
    color: white;
}

.report-icon.performance { background: linear-gradient(135deg, #10b981, #059669); }
.report-icon.activity { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.report-icon.security { background: linear-gradient(135deg, #ef4444, #dc2626); }
.report-icon.teachers { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.report-content h3 {
    margin: 0 0 8px 0;
    color: #1e293b;
    font-size: 18px;
}

.report-content p {
    margin: 0 0 16px 0;
    color: #64748b;
    font-size: 14px;
}

.report-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #475569;
}

.report-stats span {
    font-weight: 600;
    color: #1e293b;
}

.report-results {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.summary-card {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #e2e8f0;
}

.summary-number {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.summary-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.security-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.security-item.safe {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.security-item i {
    font-size: 24px;
    color: #10b981;
}

.security-item h4 {
    margin: 0 0 4px 0;
    color: #1e293b;
}

.security-item p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.role-badge.dos { background: #fef3c7; color: #92400e; }
.role-badge.teacher { background: #dbeafe; color: #1e40af; }
.role-badge.student { background: #dcfce7; color: #166534; }

/* Exam Preview Styling */
.exam-preview {
    max-height: 500px;
    overflow-y: auto;
}

.exam-info {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.questions-preview h4 {
    margin-bottom: 16px;
    color: #1e293b;
}

.question-preview {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.question-preview h5 {
    margin: 0 0 12px 0;
    color: #1e293b;
}

.options-preview {
    list-style: none;
    padding: 0;
    margin: 0;
}

.options-preview li {
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 14px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.error-message {
    text-align: center;
    padding: 40px;
    color: #ef4444;
    background: #fef2f2;
    border-radius: 8px;
}
/* Approval Card Styling */
.approval-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.approval-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.approval-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.approval-header h4 {
    margin: 0;
    color: #1e293b;
    font-size: 18px;
}

.exam-subject {
    background: #3b82f6;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.approval-details {
    margin-bottom: 20px;
}

.approval-details p {
    margin: 8px 0;
    color: #64748b;
    font-size: 14px;
}

.approval-details strong {
    color: #1e293b;
}

.approval-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.approval-actions .btn {
    padding: 8px 16px;
    font-size: 14px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.empty-state i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
    display: block;
}

.empty-state h3 {
    margin: 0 0 8px 0;
    color: #1e293b;
}

.empty-state p {
    margin: 0;
    color: #64748b;
}
/* Language Selector Styles */
.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.language-flags {
    display: flex;
    gap: 8px;
    align-items: center;
}

.flag-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 60px;
    justify-content: center;
}

.flag-btn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.flag-btn.active {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-color: #0056b3;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
    transform: translateY(-2px);
    font-weight: 700;
}

.flag-btn.active:hover {
    background: #0056b3;
}

/* Responsive language selector */
@media (max-width: 768px) {
    .language-selector {
        top: 10px;
        right: 10px;
    }
    
    .language-flags {
        gap: 4px;
    }
    
    .flag-btn {
        padding: 3px 6px;
        font-size: 10px;
        min-width: 40px;
        gap: 2px;
    }
    
    /* Mobile header layout */
    .main-header .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 10px 15px;
    }
    
    .main-header .logo {
        font-size: 18px;
    }
    
    .main-header .user-menu {
        align-self: flex-end;
        margin-top: -35px;
    }
    
    .main-header .language-selector {
        position: relative;
        top: auto;
        right: auto;
        margin: 5px 0 0 0;
        align-self: flex-start;
    }
    
    .auth-container {
        padding: 20px 15px;
        margin: 20px auto;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
    
    .auth-card {
        padding: 20px;
        margin-top: 20px;
    }
    
    .logo-section h1 {
        font-size: 2rem;
        margin-bottom: 8px;
    }
    
    .logo-section p {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .logo-section i {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    
    .auth-credits {
        margin-top: 20px;
        font-size: 12px;
    }
}

/* Dashboard language selector */
.main-header .language-selector {
    position: relative;
    top: auto;
    right: auto;
    margin-left: auto;
}

.main-header .flag-btn {
    background: #fff;
    border: 1px solid #e0e0e0;
}

/* Profile modal language selector */
.modal-body .language-flags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.modal-body .flag-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    font-size: 12px;
}

.modal-body .flag-btn.active {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-color: #0056b3;
}

/* Exam page language selector */
.exam-header .language-selector {
    position: relative;
    top: auto;
    right: auto;
    margin-left: 16px;
}

.exam-header .flag-btn {
    background: rgba(255, 255, 255, 0.95);
    font-size: 11px;
    padding: 4px 8px;
    min-width: 50px;
}