/**
 * AdaptiveLearn - Unified CSS System
 * Single comprehensive stylesheet for the entire application
 * Eliminates redundancy and provides consistent styling
 */

/* Import unified app styles for consistent glassmorphism design */
@import url('unified-app-styles.css');

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 0;
    color: #2d3748;
    margin: 0;
}

/* ===== LAYOUT CONTAINERS ===== */
.container {
    background: white;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
}

.dashboard-container {
    max-width: none;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== DESKTOP LAYOUT SYSTEM ===== */
@media (min-width: 1024px) {
    body {
        padding: 20px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    
    .container {
        border-radius: 16px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.15);
        max-width: 1400px;
        margin: 0 auto;
        min-height: calc(100vh - 40px);
    }
    
    .dashboard-container {
        min-height: calc(100vh - 40px);
    }
    
    /* Desktop Grid Layout */
    .main-content {
        display: grid;
        grid-template-columns: 300px 1fr;
        gap: 20px;
        flex: 1;
        overflow: hidden;
        padding: 20px;
    }
    
    .sidebar {
        background: #f8fafc;
        border-radius: 12px;
        padding: 20px;
        overflow-y: auto;
        border: 1px solid #e2e8f0;
    }
    
    .main-panel {
        background: white;
        border-radius: 12px;
        padding: 20px;
        overflow-y: auto;
        border: 1px solid #e2e8f0;
    }
    
    /* Three Column Layout for Analytics */
    .analytics-layout {
        display: grid;
        grid-template-columns: 250px 1fr 300px;
        gap: 20px;
    }
    
    .analytics-sidebar {
        background: #f8fafc;
        border-radius: 12px;
        padding: 20px;
        border: 1px solid #e2e8f0;
    }
    
    .analytics-main {
        background: white;
        border-radius: 12px;
        padding: 20px;
        border: 1px solid #e2e8f0;
    }
    
    .analytics-panel {
        background: #f8fafc;
        border-radius: 12px;
        padding: 20px;
        border: 1px solid #e2e8f0;
    }
}

@media (min-width: 1440px) {
    .container {
        max-width: 1600px;
    }
    
    .main-content {
        grid-template-columns: 350px 1fr;
        gap: 30px;
        padding: 30px;
    }
    
    .analytics-layout {
        grid-template-columns: 280px 1fr 350px;
        gap: 30px;
    }
}

/* ===== HEADER STYLES ===== */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 100;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: #4facfe;
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: 600;
    color: #2d3748;
}

.help-btn {
    background: #38a169;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.help-btn:hover {
    background: #2f855a;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.logout-btn {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #c53030;
    transform: translateY(-1px);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ===== SECTION STYLES ===== */
.section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== NAVIGATION STYLES ===== */
.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.nav-tab {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #e2e8f0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-tab.active {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
    border: 1px solid rgba(79, 172, 254, 0.3);
}

.nav-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-decoration: none;
    color: #e2e8f0;
}

.nav-link {
    color: #4a5568;
}

.nav-link:hover {
    color: #3182ce;
}

.nav-link.active {
    color: #3182ce;
    background: #f7fafc;
}

.tab-content {
    display: none;
}

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

/* ===== BUTTON STYLES ===== */
.btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 8px;
    border: 1px solid transparent;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.3);
}

.btn-primary {
    background: #3182ce;
    color: #ffffff;
    border-color: #3182ce;
}

.btn-primary:hover {
    background: #2c5aa0;
    color: #ffffff;
    border-color: #2c5aa0;
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
    border-color: #e2e8f0;
}

.btn-secondary:hover {
    background: #cbd5e0;
    color: #1a202c;
    border-color: #cbd5e0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background: #38a169;
    color: #ffffff;
    border-color: #38a169;
}

.btn-success:hover {
    background: #2f855a;
    color: #ffffff;
    border-color: #2f855a;
}

.btn-danger {
    background: #e53e3e;
    color: #ffffff;
    border-color: #e53e3e;
}

.btn-danger:hover {
    background: #c53030;
    color: #ffffff;
    border-color: #c53030;
}

.btn-warning {
    background: #d69e2e;
    color: #ffffff;
    border-color: #d69e2e;
}

.btn-warning:hover {
    background: #b7791f;
    color: #ffffff;
    border-color: #b7791f;
}

.btn-info {
    background: #3182ce;
    color: #ffffff;
    border-color: #3182ce;
}

.btn-info:hover {
    background: #2c5aa0;
    color: #ffffff;
    border-color: #2c5aa0;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #a0aec0;
    transform: none;
}

.btn:disabled:hover {
    background: #a0aec0;
    transform: none;
}

/* ===== ACTION BUTTONS ===== */
.action-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin: 0;
    width: auto;
    min-height: auto;
}

.action-btn.edit {
    background: #4299e1;
    color: white;
}

.action-btn.edit:hover {
    background: #3182ce;
    transform: translateY(-1px);
}

.action-btn.delete {
    background: #e53e3e;
    color: white;
}

.action-btn.delete:hover {
    background: #c53030;
    transform: translateY(-1px);
}

.action-btn.view {
    background: #48bb78;
    color: white;
}

.action-btn.view:hover {
    background: #38a169;
    transform: translateY(-1px);
}

.details-btn {
    background: #4299e1;
    color: white;
}

.details-btn:hover {
    background: #3182ce;
}

.edit-btn {
    background: #38a169;
    color: white;
}

.edit-btn:hover {
    background: #2f855a;
}

.publish-btn {
    background: #ed8936;
    color: white;
}

.publish-btn:hover {
    background: #dd6b20;
}

.unpublish-btn {
    background: #718096;
    color: white;
}

.unpublish-btn:hover {
    background: #4a5568;
}

.cancel-btn {
    background: #e53e3e;
    color: white;
}

.view-btn {
    background: #4299e1;
    color: white;
}

.view-btn:hover {
    background: #3182ce;
}

.performance-btn {
    background: #ed8936;
    color: white;
}

.performance-btn:hover {
    background: #dd6b20;
}

.export-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease;
}

.export-btn:hover {
    background: #059669;
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #4a5568;
    font-size: 0.9rem;
}

/* Form styles moved to form-styles.css - DO NOT ADD FORM STYLES HERE */

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

.form-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #2d3748;
}

.form-checkbox input {
    margin-right: 8px;
}

.form-help {
    color: #718096;
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #e2e8f0;
}

/* ===== ENHANCED MODAL SYSTEM ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: modalFadeIn 0.3s ease-out;
    padding: 20px;
    box-sizing: border-box;
}

.modal.show,
.modal[style*="display: block"],
.modal[style*="display: flex"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    color: #1a202c;
    position: relative;
    z-index: 1001;
    animation: modalSlideIn 0.3s ease-out;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    
    /* Responsive sizing */
    width: 95%;
    max-width: 500px;
}

/* Modal size variants */
.modal-sm .modal-content {
    max-width: 400px;
}

.modal-md .modal-content {
    max-width: 600px;
}

.modal-lg .modal-content {
    max-width: 900px;
}

.modal-xl .modal-content {
    max-width: 1200px;
}

.modal-fullscreen .modal-content {
    width: calc(100% - 40px);
    height: calc(100% - 40px);
    max-width: none;
    max-height: none;
    border-radius: 12px;
}

.modal-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    border-radius: 16px 16px 0 0;
    position: relative;
}

.modal-header.success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.modal-header.warning {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.modal-header.danger {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
}

.modal-header.info {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 4px;
    font-weight: 400;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-close:active {
    transform: scale(0.95);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    color: #1a202c;
    line-height: 1.6;
}

.modal-body.no-padding {
    padding: 0;
}

.modal-body.compact {
    padding: 15px 25px;
}

.modal-footer {
    padding: 20px 25px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
    border-radius: 0 0 16px 16px;
}

.modal-footer.center {
    justify-content: center;
}

.modal-footer.space-between {
    justify-content: space-between;
}

.modal-footer.start {
    justify-content: flex-start;
}

/* Modal animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal.closing {
    animation: modalFadeOut 0.2s ease-in;
}

.modal.closing .modal-content {
    animation: modalSlideOut 0.2s ease-in;
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
}

/* Modal content types */
.modal-form {
    display: grid;
    gap: 20px;
}

.modal-form .form-group {
    margin-bottom: 0;
}

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

.modal-confirmation .modal-body {
    padding: 30px 25px;
}

.modal-confirmation .confirmation-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #e53e3e;
}

.modal-confirmation.success .confirmation-icon {
    color: #38a169;
}

.modal-confirmation.warning .confirmation-icon {
    color: #ed8936;
}

.modal-confirmation.info .confirmation-icon {
    color: #3182ce;
}

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

.modal-loading .modal-body {
    padding: 40px 25px;
}

.modal-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #4facfe;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* Specific modal types */
.class-details-modal .modal-content {
    max-width: 1000px;
}

.ai-supervisor-modal .modal-content {
    max-width: 800px;
}

.create-class-modal .modal-content {
    max-width: 700px;
}

.course-modal .modal-content {
    max-width: 800px;
}

.user-modal .modal-content {
    max-width: 600px;
}

.assignment-modal .modal-content {
    max-width: 900px;
}

.help-modal .modal-content {
    max-width: 1000px;
}

/* Close button variants */
.close-btn {
    background: #e2e8f0;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #4a5568;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #cbd5e0;
    color: #2d3748;
}

/* Modal overlay click handling */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
    padding-right: 15px; /* Prevent layout shift */
}

/* Modal responsive behavior */
@media (min-width: 1024px) {
    .modal {
        padding: 40px;
    }
    
    .modal-content {
        max-height: calc(100vh - 80px);
        border-radius: 20px;
    }
    
    .modal-header {
        padding: 25px 30px;
        border-radius: 20px 20px 0 0;
    }
    
    .modal-body {
        padding: 30px;
    }
    
    .modal-footer {
        padding: 25px 30px;
        border-radius: 0 0 20px 20px;
    }
    
    .modal-title {
        font-size: 1.75rem;
    }
    
    .modal-close {
        width: 44px;
        height: 44px;
        font-size: 28px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .modal {
        padding: 30px;
    }
    
    .modal-content {
        max-height: calc(100vh - 60px);
        border-radius: 16px;
    }
    
    .modal-header {
        padding: 22px 25px;
    }
    
    .modal-body {
        padding: 25px;
    }
    
    .modal-footer {
        padding: 22px 25px;
    }
}

@media (max-width: 767px) {
    .modal {
        padding: 15px;
    }
    
    .modal-content {
        width: 100%;
        max-width: none;
        max-height: calc(100vh - 30px);
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 18px 20px;
        border-radius: 12px 12px 0 0;
    }
    
    .modal-title {
        font-size: 1.3rem;
    }
    
    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 18px 20px;
        border-radius: 0 0 12px 12px;
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin-bottom: 0;
    }
    
    .modal-fullscreen .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .modal-fullscreen .modal-header {
        border-radius: 0;
    }
    
    .modal-fullscreen .modal-footer {
        border-radius: 0;
    }
}

/* Modal accessibility */
.modal[aria-hidden="true"] {
    display: none !important;
}

.modal[aria-hidden="false"] {
    display: flex !important;
}

.modal-content:focus {
    outline: 2px solid #4facfe;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .modal {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .modal-content {
        border: 3px solid #000;
    }
    
    .modal-header {
        border-bottom: 2px solid #000;
    }
    
    .modal-footer {
        border-top: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .modal,
    .modal-content {
        animation: none !important;
    }
    
    .modal-close {
        transition: none !important;
    }
}

/* ===== TABLE STYLES ===== */
table {
    background: #ffffff;
    color: #1a202c;
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: #f8fafc;
    color: #1a202c;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    padding: 12px;
    text-align: left;
}

table td {
    background: #ffffff;
    color: #4a5568;
    border-bottom: 1px solid #f7fafc;
    padding: 12px;
    text-align: left;
}

table tr:hover {
    background: #f7fafc;
}

table tr:hover td {
    background: #f7fafc;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table th {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
    color: #f7fafc;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ===== STATS & CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 15px;
}

.stat-card {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    opacity: 0.9;
    font-size: 0.85rem;
}

.quick-start-card {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.start-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.start-btn:hover {
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.3);
}

/* ===== STATUS BADGES ===== */
.badge,
.status-badge,
.type-badge,
.difficulty-badge,
.duration-badge {
    border: 1px solid transparent;
    font-weight: 600;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.status-completed,
.assignment-status.status-completed {
    background: #c6f6d5;
    color: #1a202c;
    border: 1px solid #9ae6b4;
    font-weight: 600;
}

.status-in_progress,
.status-in-progress,
.assignment-status.status-in-progress {
    background: #bee3f8;
    color: #1a202c;
    border: 1px solid #90cdf4;
    font-weight: 600;
}

.status-pending {
    background: #feebc8;
    color: #1a202c;
    border: 1px solid #fbd38d;
    font-weight: 600;
}

.status-draft,
.assignment-status.status-draft {
    background: #fed7d7;
    color: #1a202c;
    border: 1px solid #feb2b2;
    font-weight: 600;
}

.assignment-status.status-published {
    background: #bee3f8;
    color: #1a202c;
    border: 1px solid #90cdf4;
    font-weight: 600;
}

.assignment-status.status-archived {
    background: #e2e8f0;
    color: #1a202c;
    border: 1px solid #cbd5e0;
    font-weight: 600;
}

.assignment-status.status-not-started {
    background: #f7fafc;
    color: #1a202c;
    border: 1px solid #e2e8f0;
    font-weight: 600;
}

.assignment-status.status-overdue {
    background: #fed7d7;
    color: #1a202c;
    border: 1px solid #feb2b2;
    font-weight: 600;
}

.student-status.status-active {
    background: #c6f6d5;
    color: #1a202c;
    border: 1px solid #9ae6b4;
    font-weight: 600;
}

.student-status.status-inactive {
    background: #fed7d7;
    color: #1a202c;
    border: 1px solid #feb2b2;
    font-weight: 600;
}

.status-active {
    background: #c6f6d5;
    color: #2f855a;
}

.status-inactive {
    background: #fed7d7;
    color: #c53030;
}

.status-overdue {
    background: #fed7d7;
    color: #c53030;
}

.status-due-soon {
    background: #feebc8;
    color: #dd6b20;
}

.type-open {
    background: #c6f6d5;
    color: #1a202c;
    border-color: #9ae6b4;
}

.type-closed,
.type-private {
    background: #fed7d7;
    color: #1a202c;
    border-color: #feb2b2;
}

.difficulty-beginner {
    background: #c6f6d5;
    color: #1a202c;
    border-color: #9ae6b4;
}

.difficulty-intermediate {
    background: #bee3f8;
    color: #1a202c;
    border-color: #90cdf4;
}

.difficulty-advanced {
    background: #feebc8;
    color: #1a202c;
    border-color: #fbd38d;
}

.difficulty-expert {
    background: #fed7d7;
    color: #1a202c;
    border-color: #feb2b2;
}

.session-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.session-status-badge.live {
    background: rgba(198, 246, 213, 0.2);
    color: #2f855a;
    border: 1px solid rgba(198, 246, 213, 0.3);
}

.session-status-badge.recent {
    background: rgba(226, 232, 240, 0.2);
    color: #e2e8f0;
    border: 1px solid rgba(226, 232, 240, 0.3);
}

/* ===== ALERTS ===== */
.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid;
    font-weight: 500;
}

.alert-success {
    background: #c6f6d5;
    color: #1a202c;
    border-color: #9ae6b4;
}

.alert-error,
.alert-danger {
    background: #fed7d7;
    color: #1a202c;
    border-color: #feb2b2;
}

.alert-warning {
    background: #feebc8;
    color: #1a202c;
    border-color: #fbd38d;
}

.alert-info {
    background: #bee3f8;
    color: #1a202c;
    border-color: #90cdf4;
}

.error-message {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #fc8181;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
}

.success-message {
    background: #c6f6d5;
    color: #2f855a;
    border: 1px solid #68d391;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
}

/* ===== CARDS ===== */
.card {
    background: #ffffff;
    color: #1a202c;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.card-header {
    background: #f8fafc;
    color: #1a202c;
    border-bottom: 1px solid #e2e8f0;
    padding: 15px;
    margin: -20px -20px 15px -20px;
    border-radius: 8px 8px 0 0;
}

.card-body {
    background: #ffffff;
    color: #1a202c;
}

.card-footer {
    background: #f8fafc;
    color: #1a202c;
    border-top: 1px solid #e2e8f0;
    padding: 15px;
    margin: 15px -20px -20px -20px;
    border-radius: 0 0 8px 8px;
}

/* ===== LIST ITEMS ===== */
.student-list, .assignment-list, .class-list {
    max-height: 400px;
    overflow-y: auto;
}

.student-item, .assignment-item, .class-item, .session-item {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.student-item:hover, .assignment-item:hover, .class-item:hover, .session-item:hover {
    border-color: #4facfe;
    transform: translateY(-1px);
}

.student-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.student-name {
    font-weight: 500;
    color: #2d3748;
}

.student-email {
    color: #718096;
    font-size: 0.9rem;
}

.assignment-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.assignment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #718096;
    font-size: 0.8rem;
}

.session-student {
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 5px;
}

.session-time {
    color: #718096;
    font-size: 0.8rem;
}

.session-live {
    background: #c6f6d5;
    color: #2f855a;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* ===== LOADING & ANIMATIONS ===== */
.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(79, 172, 254, 0.3);
    border-radius: 50%;
    border-top-color: #4facfe;
    animation: spin 1s ease-in-out infinite;
    margin: 15px auto;
}

.loading-dots {
    display: flex;
    gap: 2px;
}

.loading-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #6c757d;
    animation: loading 1.4s infinite ease-in-out;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes loading {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

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

.live-indicator {
    color: #38a169;
    animation: pulse 2s infinite;
}

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

/* ===== EMPTY STATES ===== */
.empty-state {
    text-align: center;
    padding: 30px 15px;
    color: #718096;
}

.empty-state i {
    font-size: 1.8rem;
    margin-bottom: 8px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.welcome-message {
    text-align: center;
    color: #6c757d;
    padding: 15px;
    font-style: italic;
    margin: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
}

/* ===== MESSAGES ===== */
.messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    padding-bottom: 10px;
    background: #f8f9fa;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    max-width: 85%;
}

.message.user {
    flex-direction: row-reverse;
    margin-left: auto;
}

.message.assistant {
    margin-right: auto;
}

.message.system {
    margin: 10px auto;
    max-width: 90%;
    opacity: 0.8;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: #007bff;
}

.message.assistant .message-avatar {
    background: #28a745;
}

.message.system .message-avatar {
    background: #ffc107;
    color: #212529;
}

.message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.message.user .message-content {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.message.assistant .message-content {
    background: #f8f9fa;
    color: #495057;
    border-color: #e9ecef;
}

.message.system .message-content {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
    text-align: center;
    font-style: italic;
}

/* ===== INPUT STYLES ===== */
.input-container {
    padding: 10px 15px;
    background: white;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
}

.input-form {
    display: flex;
    gap: 10px;
}

.message-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
}

.message-input:focus {
    border-color: #007bff;
}

.send-button {
    padding: 12px 24px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.send-button:hover:not(:disabled) {
    background: #0056b3;
}

.send-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* ===== CONTROLS ===== */
.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.control-button {
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.control-button:hover {
    background: #5a6268;
}

.control-button.primary {
    background: #007bff;
}

.control-button.primary:hover {
    background: #0056b3;
}

/* ===== HEADER CONTROLS ===== */
.header-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.control-group {
    display: flex;
    gap: 4px;
    align-items: center;
}

.language-control {
    margin-right: 10px;
}

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

.language-icon {
    font-size: 16px;
    opacity: 0.9;
}

/* ===== STYLE SELECTOR WIDGET ===== */
.style-selector-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.style-selector-widget:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.style-selector-widget .style-icon {
    font-size: 1.1rem;
    color: #4facfe;
    animation: colorChange 4s ease-in-out infinite;
}

@keyframes colorChange {
    0%, 100% { color: #4facfe; }
    33% { color: #00f2fe; }
    66% { color: #ffd700; }
}

.style-selector {
    background: transparent;
    border: none;
    color: #f7fafc;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    padding: 4px 8px;
    transition: all 0.3s ease;
}

.style-selector:hover {
    color: #4facfe;
}

.style-selector option {
    background: #1a202c;
    color: #f7fafc;
    padding: 8px;
}

/* Responsive adjustments for style selector */
@media (max-width: 768px) {
    .style-selector-widget {
        padding: 6px 12px;
        gap: 6px;
    }
    
    .style-selector-widget .style-icon {
        font-size: 1rem;
    }
    
    .style-selector {
        font-size: 0.85rem;
    }
}

/* ===== STYLE THEMES ===== */

/* Modern Glass (Default) */
body.style-modern-glass {
    --primary-color: #4facfe;
    --secondary-color: #00f2fe;
    --accent-color: #ffd700;
    --bg-opacity: 0.1;
    --border-opacity: 0.2;
    --hover-opacity: 0.15;
    --text-primary: #f7fafc;
    --text-secondary: rgba(226, 232, 240, 0.9);
    --shadow-color: rgba(0, 0, 0, 0.3);
}

/* Classic Clean */
body.style-classic-clean {
    --primary-color: #2563eb;
    --secondary-color: #3b82f6;
    --accent-color: #10b981;
    --bg-opacity: 0.95;
    --border-opacity: 0.1;
    --hover-opacity: 1;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body.style-classic-clean .container {
    background: rgba(255, 255, 255, var(--bg-opacity));
    backdrop-filter: none;
}

body.style-classic-clean .hero-section {
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    color: var(--text-primary);
}

body.style-classic-clean .hero-title,
body.style-classic-clean .hero-subtitle,
body.style-classic-clean .logo {
    color: var(--text-primary);
}

body.style-classic-clean .feature {
    background: white;
    border: 1px solid #e5e7eb;
    backdrop-filter: none;
}

body.style-classic-clean .feature h3,
body.style-classic-clean .feature p {
    color: var(--text-primary);
}

body.style-classic-clean .login-section {
    background: #f9fafb;
}

body.style-classic-clean .form-label,
body.style-classic-clean .login-title,
body.style-classic-clean .login-subtitle {
    color: var(--text-primary);
}

body.style-classic-clean .form-input {
    background: white;
    border: 2px solid #e5e7eb;
    color: var(--text-primary);
}

body.style-classic-clean .form-input::placeholder {
    color: #9ca3af;
}

body.style-classic-clean .login-button {
    background: var(--primary-color);
}

body.style-classic-clean .register-button {
    background: white;
    color: var(--primary-color);
    border-color: #e5e7eb;
}

/* Vibrant Energy */
body.style-vibrant-energy {
    --primary-color: #f72585;
    --secondary-color: #b5179e;
    --accent-color: #7209b7;
    --bg-opacity: 0.15;
    --border-opacity: 0.3;
    --hover-opacity: 0.25;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.9);
    --shadow-color: rgba(247, 37, 133, 0.4);
}

body.style-vibrant-energy .hero-section {
    background: linear-gradient(135deg, rgba(247, 37, 133, 0.4) 0%, rgba(181, 23, 158, 0.4) 100%);
}

body.style-vibrant-energy .feature i,
body.style-vibrant-energy .logo i {
    color: var(--accent-color);
}

body.style-vibrant-energy .login-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

body.style-vibrant-energy .style-selector-widget .style-icon {
    animation: vibrantColorChange 2s ease-in-out infinite;
}

@keyframes vibrantColorChange {
    0%, 100% { color: #f72585; }
    33% { color: #b5179e; }
    66% { color: #7209b7; }
}

/* Minimal Focus */
body.style-minimal-focus {
    --primary-color: #000000;
    --secondary-color: #333333;
    --accent-color: #666666;
    --bg-opacity: 0.02;
    --border-opacity: 0.1;
    --hover-opacity: 0.05;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --shadow-color: rgba(0, 0, 0, 0.8);
}

body.style-minimal-focus .container {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.style-minimal-focus .hero-section {
    background: none;
}

body.style-minimal-focus .feature {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.style-minimal-focus .login-section {
    background: rgba(0, 0, 0, 0.5);
}

body.style-minimal-focus .form-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.style-minimal-focus .login-button {
    background: white;
    color: black;
}

body.style-minimal-focus .login-button:hover {
    background: rgba(255, 255, 255, 0.9);
}

body.style-minimal-focus .register-button {
    border: 1px solid rgba(255, 255, 255, 0.3);
}

body.style-minimal-focus .style-selector-widget {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.style-minimal-focus .style-selector-widget .style-icon {
    color: white;
    animation: none;
}

/* Apply theme variables to common elements */
body[class*="style-"] .container {
    box-shadow: 0 20px 40px var(--shadow-color);
}

body[class*="style-"] .form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 172, 254, var(--border-opacity));
}

body[class*="style-"] .demo-account:hover {
    background: rgba(255, 255, 255, var(--hover-opacity));
    box-shadow: 0 5px 15px var(--shadow-color);
}

/* Additional theme-specific styles for demo sections */
body.style-classic-clean .demo-section {
    background: white;
    border: 1px solid #e5e7eb;
    backdrop-filter: none;
}

body.style-classic-clean .demo-title {
    color: var(--text-primary);
}

body.style-classic-clean .demo-account {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

body.style-classic-clean .demo-account h4,
body.style-classic-clean .demo-account p {
    color: var(--text-primary);
}

body.style-vibrant-energy .demo-section {
    background: rgba(247, 37, 133, 0.2);
    border: 1px solid rgba(247, 37, 133, 0.3);
}

body.style-vibrant-energy .demo-account {
    background: rgba(181, 23, 158, 0.2);
    border: 1px solid rgba(181, 23, 158, 0.3);
}

body.style-minimal-focus .demo-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.style-minimal-focus .demo-account {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Video background adjustments for themes */
body.style-classic-clean .page-video-background {
    opacity: 0.1;
}

body.style-vibrant-energy .page-video-background {
    filter: hue-rotate(270deg) saturate(1.5);
    opacity: 0.3;
}

body.style-minimal-focus .page-video-background {
    filter: grayscale(100%) contrast(1.2);
    opacity: 0.05;
}

/* Ensure text remains readable across all themes */
body.style-classic-clean .divider {
    color: var(--text-secondary);
}

body.style-classic-clean .divider::before {
    background: #e5e7eb;
}

/* ===== UNIFIED CHAT COMPONENT STYLES ===== */
.unified-chat-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Chat Header */
.unified-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.chat-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #f7fafc);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary, rgba(226, 232, 240, 0.9));
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6b7280;
    transition: background 0.3s ease;
}

.connection-status[data-status="connected"] .status-dot {
    background: #10b981;
    animation: pulse 2s ease-in-out infinite;
}

.connection-status[data-status="connecting"] .status-dot {
    background: #f59e0b;
    animation: pulse 1s ease-in-out infinite;
}

.connection-status[data-status="error"] .status-dot {
    background: #ef4444;
}

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

.chat-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Session Controls */
.session-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #f7fafc);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.control-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.control-btn.start-session:not(:disabled) {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.control-btn.end-session:not(:disabled) {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Participants Bar */
.participants-bar {
    display: flex;
    gap: 16px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.participant {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 0.9rem;
}

.participant-avatar {
    font-size: 1.2rem;
}

.participant-name {
    color: var(--text-primary, #f7fafc);
    font-weight: 500;
}

.participant-status {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6b7280;
}

.participant-status[data-status="online"] {
    background: #10b981;
}

.participant-status[data-status="typing"] {
    background: #3b82f6;
    animation: pulse 1s ease-in-out infinite;
}

/* Messages Container */
.unified-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scroll-behavior: smooth;
}

.unified-chat-messages::-webkit-scrollbar {
    width: 8px;
}

.unified-chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.unified-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.unified-chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chat-welcome-message {
    text-align: center;
    color: var(--text-secondary, rgba(226, 232, 240, 0.7));
    padding: 40px 20px;
    font-style: italic;
}

/* Message Styles (extends existing) */
.message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    animation: messageSlide 0.3s ease-out;
}

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

.message-avatar {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text-primary, #f7fafc);
    line-height: 1.6;
    max-width: 70%;
}

.message.user .message-content {
    background: rgba(79, 172, 254, 0.2);
    margin-left: auto;
}

.message.assistant .message-content {
    background: rgba(255, 255, 255, 0.08);
}

.message.system .message-content {
    background: rgba(255, 215, 0, 0.1);
    font-style: italic;
    text-align: center;
    max-width: 100%;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--text-secondary, rgba(226, 232, 240, 0.7));
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Input Area */
.unified-chat-input-area {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.input-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.input-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #f7fafc);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.input-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.input-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    min-height: 40px;
    max-height: 120px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary, #f7fafc);
    font-size: 0.95rem;
    resize: none;
    transition: all 0.3s ease;
}

.chat-input::placeholder {
    color: var(--text-secondary, rgba(226, 232, 240, 0.5));
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color, #4facfe);
    background: rgba(255, 255, 255, 0.12);
}

.chat-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.send-button {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--primary-color, #4facfe);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.send-button:hover:not(:disabled) {
    background: var(--secondary-color, #00f2fe);
    transform: translateY(-1px);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-info {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.char-count {
    font-size: 0.75rem;
    color: var(--text-secondary, rgba(226, 232, 240, 0.7));
}

.char-count.warning {
    color: #f59e0b;
}

/* Theme-specific adjustments */
body.style-classic-clean .unified-chat-wrapper {
    background: white;
    backdrop-filter: none;
    border-color: #e5e7eb;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

body.style-classic-clean .unified-chat-header {
    background: #f9fafb;
    border-bottom-color: #e5e7eb;
}

body.style-classic-clean .message-content {
    background: #f3f4f6;
}

body.style-classic-clean .message.user .message-content {
    background: #dbeafe;
}

body.style-classic-clean .chat-input {
    background: white;
    border-color: #e5e7eb;
}

body.style-vibrant-energy .unified-chat-wrapper {
    background: rgba(247, 37, 133, 0.1);
    border-color: rgba(247, 37, 133, 0.3);
}

body.style-vibrant-energy .send-button {
    background: linear-gradient(135deg, #f72585, #b5179e);
}

body.style-minimal-focus .unified-chat-wrapper {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

body.style-minimal-focus .message-content {
    background: rgba(255, 255, 255, 0.05);
}

body.style-minimal-focus .message.user .message-content {
    background: rgba(255, 255, 255, 0.1);
}

/* Monitor Mode Styles */
.monitor-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    font-size: 0.85rem;
    color: #3b82f6;
}

.monitor-indicator i {
    font-size: 1rem;
}

.monitor-status {
    margin-left: auto;
    padding: 2px 8px;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    animation: pulse 2s ease-in-out infinite;
}

.monitor-status[data-live="false"] {
    background: rgba(107, 114, 128, 0.2);
    color: #6b7280;
    animation: none;
}

.unified-chat-wrapper.monitor-mode {
    border: 2px solid rgba(59, 130, 246, 0.3);
}

.monitor-input .chat-input {
    background: rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
}

.monitor-input .input-action-btn:disabled {
    opacity: 0.3;
}

.monitor-info {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.monitor-text {
    font-size: 0.75rem;
    color: rgba(59, 130, 246, 0.8);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Show student typing in monitor mode */
.monitor-mode .student-typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: var(--text-secondary, rgba(226, 232, 240, 0.7));
}

.student-typing-indicator .typing-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Theme-specific monitor adjustments */
body.style-classic-clean .monitor-indicator {
    background: #e0f2fe;
    border-bottom-color: #bae6fd;
    color: #0369a1;
}

body.style-classic-clean .unified-chat-wrapper.monitor-mode {
    border-color: #3b82f6;
}

body.style-vibrant-energy .monitor-indicator {
    background: rgba(181, 23, 158, 0.1);
    border-bottom-color: rgba(181, 23, 158, 0.3);
    color: #b5179e;
}

body.style-minimal-focus .monitor-indicator {
    background: rgba(255, 255, 255, 0.05);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
    .unified-chat-header {
        padding: 12px 16px;
    }
    
    .chat-title {
        font-size: 1rem;
    }
    
    .unified-chat-messages {
        padding: 16px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .unified-chat-input-area {
        padding: 12px 16px;
    }
    
    .monitor-indicator {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

.header-info {
    flex: 1;
}

.header h1 {
    font-size: 18px;
    margin-bottom: 2px;
}

.header p {
    opacity: 0.9;
    font-size: 12px;
    margin: 0;
}

.header-icon-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background-color 0.2s;
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.header-icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.header-icon-btn.primary {
    background: rgba(255, 255, 255, 0.9);
    color: #4facfe;
}

.header-icon-btn.primary:hover {
    background: white;
}

/* ===== TEXT COLORS ===== */
.text-muted {
    color: #718096;
}

.text-primary {
    color: #3182ce;
}

.text-success {
    color: #38a169;
}

.text-warning {
    color: #d69e2e;
}

.text-danger {
    color: #e53e3e;
}

.text-info {
    color: #3182ce;
}

/* ===== DROPDOWN MENUS ===== */
.dropdown-menu {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    background: #ffffff;
    color: #2d3748;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: #f7fafc;
    color: #2d3748;
}

.dropdown-item.active {
    background: #3182ce;
    color: #ffffff;
}

/* ===== TOOLTIPS ===== */
.tooltip {
    background: #1a202c;
    color: #ffffff;
}

.tooltip-inner {
    background: #1a202c;
    color: #ffffff;
}

/* ===== PROGRESS BARS ===== */
.progress {
    background: #e2e8f0;
}

.progress-bar {
    background: #3182ce;
    color: #ffffff;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ===== LIST GROUPS ===== */
.list-group-item {
    background: #ffffff;
    color: #2d3748;
    border: 1px solid #e2e8f0;
}

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

.list-group-item.active {
    background: #3182ce;
    color: #ffffff;
    border-color: #3182ce;
}

/* ===== PAGINATION ===== */
.page-link {
    background: #ffffff;
    color: #3182ce;
    border: 1px solid #e2e8f0;
}

.page-link:hover {
    background: #f7fafc;
    color: #2c5aa0;
    border-color: #cbd5e0;
}

.page-item.active .page-link {
    background: #3182ce;
    color: #ffffff;
    border-color: #3182ce;
}

.page-item.disabled .page-link {
    background: #f7fafc;
    color: #a0aec0;
    border-color: #e2e8f0;
}

/* ===== LANGUAGE SELECTOR ===== */
.language-selector {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    font-size: 14px;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.language-selector:hover {
    border-color: #4facfe;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.language-selector:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.language-selector option {
    background: #2d3748;
    color: #e2e8f0;
}

/* ===== ENHANCED DESKTOP RESPONSIVE DESIGN ===== */

/* Desktop First - Large Screens */
@media (min-width: 1024px) {
    /* Enhanced Header for Desktop */
    .header {
        padding: 16px 30px;
        margin-bottom: 0;
        border-radius: 16px 16px 0 0;
        background: rgba(255, 255, 255, 0.98);
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .user-info {
        gap: 20px;
    }
    
    /* Desktop Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        margin-bottom: 20px;
    }
    
    .stat-card {
        padding: 20px;
        border-radius: 12px;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
    
    /* Desktop Quick Actions */
    .quick-actions-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    /* Desktop Tables */
    .table-container {
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    
    .table th {
        padding: 16px;
        font-size: 0.95rem;
    }
    
    .table td {
        padding: 16px;
    }
    
    /* Desktop Forms */
    .form-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        padding: 14px 18px;
        font-size: 1rem;
    }
    
    /* Desktop Buttons */
    .btn {
        padding: 12px 24px;
        font-size: 1rem;
        min-height: 48px;
        width: auto;
        margin-bottom: 0;
    }
    
    /* Desktop Navigation */
    .nav-tabs {
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .nav-tab {
        padding: 14px 28px;
        font-size: 1rem;
    }
    
    /* Desktop Modals */
    .modal-content {
        max-width: 1200px;
        padding: 30px;
        border-radius: 16px;
    }
    
    .modal-header {
        padding: 25px;
        margin: -30px -30px 25px -30px;
        border-radius: 16px 16px 0 0;
    }
    
    .modal-title {
        font-size: 1.8rem;
    }
    
    /* Desktop Class Details */
    .class-details-modal {
        max-width: 1400px;
    }
    
    .class-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* Desktop Analytics Layout */
    .analytics-layout .analytics-main {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-content: start;
    }
    
    /* Desktop Chart Containers */
    #studentProgressChart, #assignmentTrendsChart, #classComparisonChart, 
    #learningOutcomesChart, #engagementTrendsChart, #emotionalStateChart,
    #timelineChart, #overviewChart, #motivationalChart, #socialChart,
    #requestChart, #popupChart {
        height: 400px;
    }
}

/* Ultra-wide Desktop */
@media (min-width: 1440px) {
    .header {
        padding: 20px 40px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 25px;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }
    
    .form-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
    
    .class-info-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    .analytics-layout .analytics-main {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* Tablet Landscape */
@media (min-width: 768px) and (max-width: 1023px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 12px;
        box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    }
    
    .header {
        padding: 14px 20px;
        border-radius: 12px 12px 0 0;
    }
    
    .main-content {
        padding: 15px;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .section {
        padding: 18px;
        border-radius: 12px;
    }
}

/* Mobile Portrait */
@media (max-width: 767px) {
    body {
        padding: 5px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    
    .container {
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        min-height: calc(100vh - 10px);
    }
    
    .dashboard-container {
        min-height: calc(100vh - 10px);
    }
    
    .header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 15px;
        margin-bottom: 10px;
        border-radius: 8px 8px 0 0;
    }
    
    .user-info {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        width: 100%;
    }
    
    .main-content {
        padding: 10px;
        gap: 10px;
    }
    
    .section {
        padding: 15px;
        border-radius: 8px;
    }
    
    .section-title {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .stat-card {
        padding: 15px;
        border-radius: 8px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .quick-action-card {
        padding: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .btn {
        min-height: 48px;
        padding: 12px 20px;
        font-size: 1rem;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        min-height: 48px;
        padding: 12px 16px;
        font-size: 1rem;
    }
    
    .nav-tabs {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .nav-tab {
        padding: 10px 16px;
        font-size: 0.9rem;
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        max-height: 85vh;
        margin: 7.5% auto;
        padding: 20px;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 20px;
        margin: -20px -20px 20px -20px;
        border-radius: 12px 12px 0 0;
    }
    
    .modal-title {
        font-size: 1.3rem;
    }
    
    .table-container {
        border-radius: 8px;
        margin-top: 15px;
    }
    
    .table th,
    .table td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
    
    /* Mobile-specific class details */
    .class-details-header-modern {
        padding: 20px 15px;
        margin: -20px -20px 20px -20px;
    }
    
    .class-modal-title {
        font-size: 1.4rem;
    }
    
    .class-header-main {
        flex-direction: column;
        gap: 15px;
    }
    
    .class-header-meta {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .class-info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .class-details-tabs-modern {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .class-tab-modern {
        padding: 10px 15px;
        font-size: 0.85rem;
        flex: 1;
        min-width: 100px;
        text-align: center;
    }
}

/* Mobile Landscape */
@media (max-width: 767px) and (orientation: landscape) {
    .header {
        flex-direction: row;
        padding: 10px 15px;
    }
    
    .user-info {
        flex-direction: row;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Print Styles */
@media print {
    body {
        background: white !important;
        color: black !important;
        padding: 0 !important;
    }
    
    .container {
        box-shadow: none !important;
        border-radius: 0 !important;
        background: white !important;
    }
    
    .header,
    .nav-tabs,
    .btn,
    .action-buttons,
    .language-selector,
    .quick-actions-grid,
    .sidebar {
        display: none !important;
    }
    
    .section {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        page-break-inside: avoid;
        margin-bottom: 20px !important;
    }
    
    .main-content {
        display: block !important;
        padding: 0 !important;
    }
    
    .main-panel {
        background: white !important;
        border: none !important;
        padding: 0 !important;
    }
    
    .table {
        border-collapse: collapse !important;
        width: 100% !important;
    }
    
    .table th,
    .table td {
        border: 1px solid #333 !important;
        padding: 8px !important;
    }
}

/* ===== ACCESSIBILITY ===== */
*:focus {
    outline: 2px solid #3182ce;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.btn:focus-visible,
.nav-tab:focus-visible,
.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible,
.language-selector:focus-visible {
    outline: 2px solid #4facfe;
    outline-offset: 2px;
}

@media (prefers-contrast: high) {
    * {
        border-width: 2px;
    }
    
    .btn {
        border-width: 3px;
    }
    
    .form-input,
    .form-textarea,
    .form-select {
        border-width: 3px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== FONTAWESOME ICONS ===== */
.fas, .fa, .fab, .far {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands";
    font-weight: 900;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

.fa-graduation-cap:before { content: "\f19d"; }
.fa-question-circle:before { content: "\f059"; }
.fa-sign-out-alt:before { content: "\f2f5"; }
.fa-eye:before { content: "\f06e"; }
.fa-exclamation-triangle:before { content: "\f071"; }
.fa-history:before { content: "\f1da"; }
.fa-robot:before { content: "\f544"; }
.fa-chalkboard-teacher:before { content: "\f51c"; }
.fa-users:before { content: "\f0c0"; }
.fa-tasks:before { content: "\f0ae"; }
.fa-chart-line:before { content: "\f201"; }
.fa-brain:before { content: "\f5dc"; }
.fa-calendar-alt:before { content: "\f073"; }
.fa-plus:before { content: "\f067"; }
.fa-chart-bar:before { content: "\f080"; }
.fa-heart:before { content: "\f004"; }
.fa-sync:before { content: "\f021"; }
.fa-download:before { content: "\f019"; }
.fa-times:before { content: "\f00d"; }
.fa-check-circle:before { content: "\f058"; }
.fa-clock:before { content: "\f017"; }
.fa-bullseye:before { content: "\f140"; }
.fa-route:before { content: "\f4d7"; }
.fa-compass:before { content: "\f14e"; }
.fa-clipboard-check:before { content: "\f46c"; }
.fa-user-friends:before { content: "\f500"; }
.fa-user-tie:before { content: "\f508"; }
.fa-book-open:before { content: "\f518"; }
.fa-trophy:before { content: "\f091"; }
.fa-users-class:before { content: "\f0c0"; }
.fa-clipboard-list:before { content: "\f46d"; }
.fa-calendar-check:before { content: "\f274"; }
.fa-university:before { content: "\f19c"; }
.fa-book:before { content: "\f02d"; }
.fa-lightbulb:before { content: "\f0eb"; }
.fa-target:before { content: "\f140"; }
.fa-rocket:before { content: "\f135"; }
.fa-play:before { content: "\f04b"; }
.fa-key:before { content: "\f084"; }
.fa-circle:before { content: "\f111"; }
.fa-arrow-right:before { content: "\f061"; }
.fa-magic:before { content: "\f0d0"; }
.fa-paper-plane:before { content: "\f1d8"; }
.fa-trash:before { content: "\f1f8"; }

/* ===== UTILITY CLASSES ===== */
.flex {
    display: flex;
}

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

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }

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

.w-full { width: 100%; }
.h-full { height: 100%; }

.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }

/* ===== TABS SYSTEM ===== */
.tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1rem;
}

.tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #718096;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab:hover {
    color: #4a5568;
    background: #f7fafc;
}

.tab.active {
    color: #3182ce;
    border-bottom-color: #3182ce;
    background: #f7fafc;
}

/* ===== CARD CONTENT ===== */
.card-content {
    padding: 1rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.card-subtitle {
    color: #718096;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* ===== SPECIFIC COMPONENT STYLES ===== */
.ai-supervisor-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.action-icon {
    font-size: 2rem;
    opacity: 0.9;
    min-width: 60px;
    text-align: center;
}

.action-content {
    flex: 1;
}

.action-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.action-description {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
}

.action-arrow {
    font-size: 1.2rem;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.action-card:hover .action-arrow {
    transform: translateX(5px);
}

/* ===== CHAT COMPONENTS ===== */
.chat-header {
    background: #f8fafc;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 8px 8px 0 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    max-height: 400px;
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.chat-input-form {
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    resize: none;
}

.chat-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.control-btn {
    padding: 0.5rem 1rem;
    background: #e2e8f0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s ease;
}

.control-btn:hover {
    background: #cbd5e0;
}

.control-btn.primary {
    background: #3182ce;
    color: white;
}

.control-btn.primary:hover {
    background: #2c5aa0;
}

/* ===== SESSION CONTROLS ===== */
.session-control {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tools {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ===== DEMO COMPONENTS ===== */
.demo-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.demo-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.language-selector-demo {
    margin-bottom: 1rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.feature-card {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.code-example {
    background: #1a202c;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
}

/* ===== LOGIN COMPONENTS ===== */
.login-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.teacher-options {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.teacher-option {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.teacher-option:hover {
    border-color: #3182ce;
    background: #ebf8ff;
}

.teacher-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.teacher-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #3182ce;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.teacher-details {
    flex: 1;
}

.teacher-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #718096;
}

/* ===== UNIFIED CLASS MODAL SYSTEM ===== */
.unified-class-modal {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: calc(100vh - 40px);
    overflow: hidden;
}

.class-header-unified {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px 16px 0 0;
    margin: -25px -25px 0 -25px;
    flex-shrink: 0;
}

.class-header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.class-header-left {
    flex: 1;
}

.class-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.class-header-badges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.class-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(10px);
}

.class-badge.code-badge {
    background: rgba(255, 255, 255, 0.2);
    font-family: monospace;
    letter-spacing: 1px;
}

.class-badge.status-badge {
    background: rgba(72, 187, 120, 0.3);
    border: 1px solid rgba(72, 187, 120, 0.5);
}

.class-badge.role-badge.teacher {
    background: rgba(237, 137, 54, 0.3);
    border: 1px solid rgba(237, 137, 54, 0.5);
}

.class-badge.role-badge.student {
    background: rgba(66, 153, 225, 0.3);
    border: 1px solid rgba(66, 153, 225, 0.5);
}

.badge-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge-label {
    font-size: 0.6rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-value {
    font-size: 0.8rem;
    font-weight: 700;
}

.class-quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.quick-stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.quick-stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.quick-stat-content {
    display: flex;
    flex-direction: column;
}

.quick-stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: white;
}

.quick-stat-label {
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.quick-stat-description {
    font-size: 0.7rem;
    opacity: 0.7;
    line-height: 1.3;
}

/* ===== UNIFIED TABS SYSTEM ===== */
.unified-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    background: #f8fafc;
    margin: 0 -25px;
    padding: 0 25px;
    overflow-x: auto;
    flex-shrink: 0;
}

.unified-tab {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #718096;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 140px;
}

.unified-tab:hover {
    color: #4a5568;
    background: rgba(79, 172, 254, 0.05);
}

.unified-tab.active {
    color: #3182ce;
    border-bottom-color: #3182ce;
    background: rgba(79, 172, 254, 0.1);
}

.tab-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.tab-content-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.tab-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
}

.tab-subtitle {
    font-size: 0.75rem;
    opacity: 0.7;
    line-height: 1.2;
    margin-top: 2px;
}

/* ===== UNIFIED CONTENT AREA ===== */
.unified-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 25px;
    background: white;
}

.overview-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.info-card-header i {
    font-size: 1.3rem;
    color: #3182ce;
}

.info-card-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.info-card-content {
    color: #4a5568;
    line-height: 1.6;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.info-label {
    font-weight: 500;
    color: #718096;
    font-size: 0.9rem;
}

.info-value {
    font-weight: 600;
    color: #2d3748;
    text-align: right;
}

/* ===== ASSIGNMENTS CONTENT ===== */
.assignments-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.assignments-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.assignments-summary {
    background: linear-gradient(135deg, #f0fff4 0%, #ebf8ff 100%);
    border: 1px solid #bee3f8;
    border-radius: 12px;
    padding: 1.5rem;
    flex: 1;
}

.assignments-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-shrink: 0;
}

.assignments-actions .btn {
    white-space: nowrap;
    min-width: 160px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.summary-stat {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    display: block;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.assignments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.assignment-card.unified {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.assignment-card.unified:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #3182ce;
}

.assignment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.assignment-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.assignment-status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.assignment-content {
    margin-bottom: 1rem;
}

.assignment-description {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.assignment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: #718096;
}

.assignment-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.assignment-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ===== STUDENTS CONTENT ===== */
.students-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.students-header h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.students-count {
    color: #718096;
    font-size: 0.9rem;
    font-weight: 500;
}

.students-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.student-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.student-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: #3182ce;
}

.student-info {
    flex: 1;
}

.student-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.student-email {
    color: #718096;
    font-size: 0.85rem;
}

.student-meta {
    margin: 0.5rem 0;
}

.enrollment-date {
    color: #718096;
    font-size: 0.8rem;
}

.student-actions {
    display: flex;
    gap: 0.5rem;
}

/* ===== SETTINGS CONTENT ===== */
.settings-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.settings-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
}

.settings-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.settings-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

/* ===== CLASS FOOTER ===== */
.class-footer-unified {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 1.5rem 25px;
    margin: 0 -25px -25px -25px;
    border-radius: 0 0 16px 16px;
    flex-shrink: 0;
}

.footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* ===== AI SUPERVISOR CARDS ===== */
.ai-supervisor-card.unified {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-bottom: 1rem;
}

.ai-supervisor-card.unified:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.supervisor-card-icon {
    font-size: 2rem;
    opacity: 0.9;
    min-width: 60px;
    text-align: center;
}

.supervisor-card-content {
    flex: 1;
}

.supervisor-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.supervisor-card-description {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
}

.supervisor-card-arrow {
    font-size: 1.2rem;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.ai-supervisor-card.unified:hover .supervisor-card-arrow {
    transform: translateX(5px);
}

/* Gradient variants for AI supervisor cards */
.gradient-blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.gradient-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.gradient-pink {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.gradient-cyan {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.gradient-green {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 4px 15px rgba(67, 233, 123, 0.3);
}

.gradient-orange {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 4px 15px rgba(250, 112, 154, 0.3);
}

/* ===== EMPTY AND ERROR STATES ===== */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #718096;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    color: #cbd5e0;
}

.empty-state h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

.error-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #e53e3e;
}

.error-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.error-state h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.error-state p {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* ===== RESPONSIVE DESIGN FOR UNIFIED MODAL ===== */
@media (min-width: 1024px) {
    .unified-class-modal {
        max-height: calc(100vh - 80px);
    }
    
    .class-header-unified {
        padding: 2.5rem;
        margin: -30px -30px 0 -30px;
        border-radius: 20px 20px 0 0;
    }
    
    .unified-content {
        padding: 2.5rem 30px;
    }
    
    .class-footer-unified {
        padding: 2rem 30px;
        margin: 0 -30px -30px -30px;
        border-radius: 0 0 20px 20px;
    }
    
    .unified-tabs {
        margin: 0 -30px;
        padding: 0 30px;
    }
    
    .quick-stat-item {
        padding: 1.5rem;
    }
    
    .info-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2rem;
    }
    
    .assignments-summary {
        padding: 2rem;
    }
    
    .assignment-card.unified {
        padding: 2rem;
    }
}

@media (max-width: 767px) {
    .unified-class-modal {
        max-height: calc(100vh - 30px);
    }
    
    .class-header-unified {
        padding: 1.5rem;
        margin: -20px -20px 0 -20px;
        border-radius: 12px 12px 0 0;
    }
    
    .class-header-main {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .class-header-right {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .class-header-badges {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
    
    .class-quick-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .quick-stat-item {
        padding: 0.75rem;
    }
    
    .quick-stat-value {
        font-size: 1.1rem;
    }
    
    .unified-content {
        padding: 1.5rem 20px;
    }
    
    .class-footer-unified {
        padding: 1.5rem 20px;
        margin: 0 -20px -20px -20px;
        border-radius: 0 0 12px 12px;
    }
    
    .unified-tabs {
        margin: 0 -20px;
        padding: 0 20px;
    }
    
    .unified-tab {
        padding: 0.75rem 1rem;
        min-width: 120px;
    }
    
    .tab-title {
        font-size: 0.85rem;
    }
    
    .tab-subtitle {
        font-size: 0.7rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .info-card {
        padding: 1rem;
    }
    
    .assignment-card.unified {
        padding: 1rem;
    }
    
    .assignment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .assignment-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .assignment-actions {
        width: 100%;
    }
    
    .assignment-actions .btn {
        flex: 1;
    }
    
    .student-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .student-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .settings-actions {
        flex-direction: column;
    }
    
    .footer-actions {
        flex-direction: column;
    }
    
    .footer-actions .btn {
        width: 100%;
    }
}

/* ===== ADDITIONAL MISSING CLASSES ===== */
.ai-supervisor-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.three-col {
    grid-template-columns: 1fr 1fr 1fr;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.75rem;
    min-height: 32px;
}

.fa-chart-area:before { content: "\f1fe"; }
.fa-smile:before { content: "\f118"; }
.fa-user-graduate:before { content: "\f501"; }

.ai-supervisor-modal {
    max-width: 800px;
}

.ai-supervisor-chat {
    height: 400px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    background: #f8fafc;
    margin-bottom: 1rem;
}

.chat-message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    max-width: 80%;
}

.chat-message.user {
    background: #3b82f6;
    color: white;
    margin-left: auto;
}

.chat-message.ai {
    background: white;
    border: 1px solid #e2e8f0;
}

.chat-input-area {
    display: flex;
    gap: 0.5rem;
}

.chat-send-btn {
    padding: 0.75rem 1.5rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-send-btn:hover {
    background: #2563eb;
}

.chat-send-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

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

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.table th {
    background: #f8fafc;
    font-weight: 600;
    color: #2d3748;
}

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

/* ===== ADDITIONAL FONTAWESOME ICONS ===== */
.fa-user:before { content: "\f007"; }
.fa-envelope:before { content: "\f0e0"; }
.fa-phone:before { content: "\f095"; }
.fa-edit:before { content: "\f044"; }
.fa-trash-alt:before { content: "\f2ed"; }
.fa-search:before { content: "\f002"; }
.fa-filter:before { content: "\f0b0"; }
.fa-sort:before { content: "\f0dc"; }
.fa-cog:before { content: "\f013"; }
.fa-bell:before { content: "\f0f3"; }
.fa-home:before { content: "\f015"; }
.fa-dashboard:before { content: "\f0e4"; }
.fa-list:before { content: "\f03a"; }
.fa-grid:before { content: "\f00a"; }
.fa-table:before { content: "\f0ce"; }
.fa-chart-pie:before { content: "\f200"; }
.fa-analytics:before { content: "\f643"; }
.fa-report:before { content: "\f1c1"; }
.fa-export:before { content: "\f56e"; }
.fa-import:before { content: "\f56f"; }
.fa-refresh:before { content: "\f021"; }
.fa-reload:before { content: "\f021"; }
.fa-save:before { content: "\f0c7"; }
.fa-cancel:before { content: "\f00d"; }
.fa-close:before { content: "\f00d"; }
.fa-back:before { content: "\f060"; }
.fa-forward:before { content: "\f061"; }
.fa-up:before { content: "\f062"; }
.fa-down:before { content: "\f063"; }
.fa-left:before { content: "\f060"; }
.fa-right:before { content: "\f061"; }

/* ===== UNIVERSAL ID STYLES ===== */
/* Since IDs are unique and often dynamically generated, 
   we provide basic styling that can be applied to any element */
[id] {
    /* Basic styling for any element with an ID */
}

/* Common ID patterns */
#userName, #userEmail, #userFirstName, #userLastName, #userBio, #userInstitution, #userTimezone, #userRole {
    color: #2d3748;
    font-weight: 500;
}

#loadingIndicator, #loadingMessage, #loadingOverlay, #loadingText, #loadingSubtext {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
}

#errorMessage, #errorContainer, #error {
    color: #e53e3e;
    background: #fed7d7;
    border: 1px solid #feb2b2;
    padding: 0.75rem;
    border-radius: 6px;
    margin: 0.5rem 0;
}

#successMessage, #success {
    color: #2f855a;
    background: #c6f6d5;
    border: 1px solid #9ae6b4;
    padding: 0.75rem;
    border-radius: 6px;
    margin: 0.5rem 0;
}

#status, #statusText, #statusCard, #sessionStatus, #sessionStatusText {
    padding: 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

/* Chart containers */
#studentProgressChart, #assignmentTrendsChart, #classComparisonChart, 
#learningOutcomesChart, #engagementTrendsChart, #emotionalStateChart,
#timelineChart, #overviewChart, #motivationalChart, #socialChart,
#requestChart, #popupChart {
    width: 100%;
    height: 300px;
    margin: 1rem 0;
}

/* Form inputs and selectors */
#languageSelector, #studentClassFilter, #assignmentTimeFilter, 
#performanceClassFilter, #engagementTimeFilter, #sessionSelect,
#classType, #maxStudents, #className, #classDescription {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
}

/* Buttons */
#loginBtn, #registerBtn, #sendBtn, #startSessionBtn, #endSessionBtn,
#clearBtn, #helpBtn, #statusBtn, #refreshBtn, #exportBtn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Content containers */
#messages, #chatMessages, #liveSessionsList, #classesList,
#studentsTableBody, #assignmentPerformanceTable, #classMetricsTable {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

/* Tabs */
#studentsTab, #assignmentsTab, #performanceTab, #engagementTab,
#overviewTab, #institutionsTab, #coursesTab, #classesTab, #usersTab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #718096;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

/* Statistics displays */
#totalStudentsAnalytics, #activeStudents, #avgEngagementScore,
#totalAssignments, #completedAssignments, #pendingAssignments, #overdueAssignments,
#avgCompletionRate, #avgAssignmentScore, #avgSessionDuration, #totalInteractions, #avgResponseTime {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
}

/* Count displays */
#completedCount, #pendingCount, #enrolledClassesCount, #studentsCount,
#quickStatStudents, #quickStatAssignments, #quickStatProgress {
    font-size: 1.2rem;
    font-weight: 600;
    color: #3182ce;
}

/* ===== FINAL MISSING CLASSES ===== */
.input-with-ai {
    position: relative;
    display: flex;
    align-items: center;
}

.class-suggestions-btn {
    position: absolute;
    right: 8px;
    background: #3182ce;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}

.class-suggestions-btn:hover {
    background: #2c5aa0;
}

.sld-suggestions-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.sld-suggestions-content {
    color: #4a5568;
    font-size: 0.875rem;
    line-height: 1.4;
}

.fa-info-circle:before { content: "\f05a"; }
.fa-database:before { content: "\f1c0"; }

.back-button {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s;
    margin-bottom: 1rem;
}

.back-button:hover {
    background: #cbd5e0;
}

.subtitle {
    color: #718096;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.context-info {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #718096;
    font-style: italic;
    padding: 0.5rem;
}

.typing-dots {
    display: flex;
    gap: 2px;
}

.typing-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #718096;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes typing {
    0%, 80%, 100% { 
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}

.question-content {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.info-section {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.test-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.english {
    background: #c6f6d5;
    color: #2f855a;
}

.concept-box {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.dynamic-content {
    min-height: 100px;
    border: 2px dashed #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.log-container {
    background: #1a202c;
    color: #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.875rem;
    max-height: 200px;
    overflow-y: auto;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #718096;
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 1000;
}

/* ===== COMPREHENSIVE ID COVERAGE ===== */
/* All remaining IDs get basic functional styling */
#testResult, #testText, #languageSelector {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #2d3748;
}

#liveSessionsSection, #studentsAnalytics, #assignmentsAnalytics, 
#performanceAnalytics, #engagementAnalytics {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#studentPerformanceTable, #totalAssignmentsAnalytics, #learningPatternsInsights {
    width: 100%;
    margin-top: 1rem;
}

#aiSupervisorModal, #createClassModal, #courseModal, #userModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

#aiSupervisorChat {
    height: 300px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
    background: #f8fafc;
    margin-bottom: 1rem;
}

#chatInput {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    margin-right: 0.5rem;
}

#chatSendBtn {
    padding: 0.75rem 1.5rem;
    background: #3182ce;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

#createClassForm, #courseForm, #userForm {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

#createClassErrorMessage, #createClassSuccessMessage {
    padding: 0.75rem;
    border-radius: 6px;
    margin: 0.5rem 0;
}

#createClassErrorMessage {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #feb2b2;
}

#createClassSuccessMessage {
    background: #c6f6d5;
    color: #2f855a;
    border: 1px solid #9ae6b4;
}

/* Class suggestion fields */
#class_domain, #class_subdomain, #class_targetLearners, 
#class_suggestions_domain, #class_suggestions_subdomain, #class_suggestions_targetLearners,
#class_suggestions_className, #class_suggestions_description {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
}

#class_suggestions_content_domain, #class_suggestions_content_subdomain,
#class_suggestions_content_targetLearners, #class_suggestions_content_className,
#class_suggestions_content_description {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 0.5rem;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #4a5568;
}

#classPreviewContent {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

/* Admin dashboard specific IDs */
#enrollmentsTab, #institutions, #courses, #classes, #assignments, #users, #enrollments {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

#institutionsTableBody, #coursesTableBody, #classesTableBody, 
#assignmentsTableBody, #usersTableBody, #enrollmentsTableBody {
    background: white;
}

/* Course form fields */
#courseCode, #courseTitle, #courseInstitution, #courseLevel, 
#courseDomain, #courseSubdomain, #courseCredits, #courseDurationWeeks,
#courseDescription, #courseLearningObjectives {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
}

/* Checkbox fields */
#enableAITutor, #allowPeerTutoring, #sessionRecording {
    margin-right: 0.5rem;
}

/* ===== STUDENT DASHBOARD SPECIFIC STYLES ===== */
.recommendations-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    color: white;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.quick-action-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e2e8f0;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #3182ce;
}

.primary-action {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.primary-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
}

.quick-action-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #3182ce;
    display: block;
}

.primary-action .quick-action-icon {
    color: white;
}

.quick-action-content {
    flex: 1;
}

.quick-action-btn {
    background: #3182ce;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
    width: 100%;
    margin-top: 1rem;
}

.quick-action-btn:hover {
    background: #2c5aa0;
}

.supervisor-action {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.supervisor-action .quick-action-icon {
    color: white;
}

.supervisor-action .quick-action-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.supervisor-action .quick-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===== LOADING STATES ===== */
.classes-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: #718096;
}

.class-card-skeleton {
    background: #f7fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-line {
    background: #e2e8f0;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-line.title {
    height: 1.5rem;
    width: 70%;
}

.skeleton-line.content {
    height: 1rem;
    width: 100%;
}

.skeleton-line.short {
    height: 1rem;
    width: 40%;
}

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

/* ===== CLASS DETAILS MODAL ===== */
.class-details-modal {
    max-width: 900px;
    width: 95%;
}

.class-details-modal-content {
    max-height: 80vh;
    overflow-y: auto;
}

.class-details-header-modern {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px 12px 0 0;
    margin: -25px -25px 20px -25px;
}

.class-header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.class-header-left {
    flex: 1;
}

.class-title-section {
    margin-bottom: 1rem;
}

.class-modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.class-modal-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    color: white;
}

.class-header-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.class-domain-display,
.class-learners-display {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: 8px;
}

.meta-content {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 0.9rem;
    font-weight: 600;
}

.class-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.class-header-badges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.enrollment-code-large {
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    min-width: 150px;
}

.code-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.code-label {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.code-text {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: 2px;
}

.class-status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.class-quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.quick-stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.quick-stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.quick-stat-content {
    display: flex;
    flex-direction: column;
}

.quick-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.quick-stat-label {
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-stat-description {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.quick-stat-date {
    font-size: 0.75rem;
    opacity: 0.6;
    margin-top: 0.25rem;
}

/* ===== CLASS DETAILS TABS ===== */
.class-details-tabs-modern {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 2rem;
    overflow-x: auto;
}

.class-tab-modern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #718096;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.class-tab-modern:hover {
    color: #4a5568;
    background: #f7fafc;
}

.class-tab-modern.active {
    color: #3182ce;
    border-bottom-color: #3182ce;
    background: #f7fafc;
}

.tab-icon {
    font-size: 1rem;
}

.tab-content-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tab-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.tab-subtitle {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* ===== CLASS DETAILS CONTENT ===== */
.class-details-content-modern {
    display: none;
}

.class-details-content-modern.active {
    display: block;
}

.class-info-section {
    margin-bottom: 2rem;
}

.class-info-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.class-info-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
}

.class-info-subtitle {
    color: #718096;
    font-size: 0.875rem;
}

.class-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
}

.instructor-card {
    background: linear-gradient(135deg, #ebf8ff 0%, #f0fff4 100%);
    border-color: #bee3f8;
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.info-card-icon {
    font-size: 1.5rem;
    color: #3182ce;
}

.info-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.info-card-content {
    color: #4a5568;
    line-height: 1.6;
}

.instructor-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.instructor-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.instructor-role {
    color: #718096;
    font-size: 0.9rem;
}

.description-card {
    grid-column: 1 / -1;
}

.course-description {
    color: #4a5568;
    line-height: 1.6;
    font-size: 0.95rem;
}

.focus-card,
.journey-card {
    background: #fff5f5;
    border-color: #fed7d7;
}

.focus-details,
.journey-details {
    display: grid;
    gap: 0.75rem;
}

.focus-item,
.journey-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.focus-item:last-child,
.journey-item:last-child {
    border-bottom: none;
}

.focus-label,
.journey-label {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.9rem;
}

.focus-value,
.journey-value {
    color: #2d3748;
    font-weight: 600;
}

.domain-badge,
.subdomain-badge,
.learners-badge,
.date-badge,
.code-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.domain-badge {
    background: #bee3f8;
    color: #1a365d;
}

.subdomain-badge {
    background: #c6f6d5;
    color: #1a202c;
}

.learners-badge {
    background: #feebc8;
    color: #744210;
}

.date-badge {
    background: #e9d8fd;
    color: #44337a;
}

.code-badge {
    background: #fed7d7;
    color: #742a2a;
    font-family: monospace;
}

.assignments-summary-card {
    background: linear-gradient(135deg, #f0fff4 0%, #ebf8ff 100%);
    border-color: #9ae6b4;
}

.summary-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.summary-stat-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.summary-stat-icon {
    font-size: 1.5rem;
    color: #3182ce;
    margin-bottom: 0.5rem;
}

.summary-stat-content {
    display: flex;
    flex-direction: column;
}

.summary-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.summary-stat-label {
    font-size: 0.75rem;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.students-section {
    margin-top: 2rem;
}

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

.students-count-display {
    color: #718096;
    font-size: 0.9rem;
}

.students-list-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.class-details-footer {
    background: #f8fafc;
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    margin: 20px -25px -25px -25px;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* ===== ADDITIONAL MISSING CLASSES ===== */
.enrollment-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.enrollment-code-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.1rem;
    text-align: center;
    font-family: monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.class-preview {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.fa-user-plus:before { content: "\f234"; }

.back-link,
.back-to-dashboard {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #3182ce;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1rem;
    transition: color 0.2s;
}

.back-link:hover,
.back-to-dashboard:hover {
    color: #2c5aa0;
    text-decoration: none;
}

.fa-arrow-left:before { content: "\f060"; }

/* ===== HELP SYSTEM STYLES ===== */
.help-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.help-header {
    text-align: center;
    margin-bottom: 3rem;
}

.search-box {
    max-width: 500px;
    margin: 2rem auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #3182ce;
}

.help-nav {
    margin-bottom: 3rem;
}

.help-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.help-nav-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: #2d3748;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.help-nav-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #3182ce;
    text-decoration: none;
    color: #2d3748;
}

.fa-play-circle:before { content: "\f144"; }
.fa-tools:before { content: "\f7d9"; }
.fa-star:before { content: "\f005"; }

.help-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.step-list {
    list-style: none;
    counter-reset: step-counter;
}

.step-item {
    counter-increment: step-counter;
    margin-bottom: 1.5rem;
    padding-left: 3rem;
    position: relative;
}

.step-item:before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: #3182ce;
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.tip-box {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid;
}

.tip-box.info {
    background: #ebf8ff;
    border-color: #3182ce;
    color: #1a365d;
}

.tip-box.warning {
    background: #fffbeb;
    border-color: #d69e2e;
    color: #744210;
}

/* ===== TEST AND DEBUG STYLES ===== */
.demo-button {
    background: #3182ce;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    margin: 0.25rem;
    font-size: 0.875rem;
}

.complex-key-demo {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.key-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.test-key {
    font-family: monospace;
    background: #1a202c;
    color: #e2e8f0;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.translation-result {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.status-indicator {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-generating {
    background: #feebc8;
    color: #744210;
}

.log-entry {
    font-family: monospace;
    font-size: 0.8rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.log-info {
    color: #3182ce;
}

.issue-highlight {
    background: #fed7d7;
    border: 1px solid #feb2b2;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.test-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.debug-info {
    background: #1a202c;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.875rem;
    margin: 1rem 0;
}

.ai-suggestion-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.fa-spinner:before { content: "\f110"; }
.fa-spin {
    animation: spin 1s linear infinite;
}

/* ===== ADDITIONAL ID STYLES ===== */
#recommendationsContainer {
    margin-bottom: 2rem;
}

#startFreeSessionCard {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

#startFreeSessionBtn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#enrolledClassesContainer {
    margin-top: 2rem;
}

#joinWithCodeBtn {
    background: #38a169;
    color: white;
}

#availableClassesTableBody {
    background: white;
}

#classDetailsModal {
    z-index: 1001;
}

#classDetailsTitle {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

#classHeaderDomain,
#classHeaderLearners,
#classHeaderCode,
#classHeaderStatus {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 6px;
    color: white;
}

#quickStatEnrolled {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

#classTeacher {
    font-weight: 600;
    color: #2d3748;
}

#classDomain,
#classSubdomain,
#classTargetLearners {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

#classEnrolledDate,
#classId,
#classStatus {
    font-weight: 500;
}

#classAssignmentsList {
    max-height: 300px;
    overflow-y: auto;
}

/* Enrollment form specific */
#enrollmentForm {
    display: grid;
    gap: 1.5rem;
}

#enrollmentCode {
    text-transform: uppercase;
    letter-spacing: 2px;
}

#classPreview {
    display: none;
}

#teacherName {
    font-weight: 600;
    color: #2d3748;
}

#studentInfo {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 8px;
    padding: 1rem;
}

#studentName,
#studentEmail {
    font-weight: 500;
}

#errorText {
    color: #e53e3e;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Help system IDs */
#searchInput {
    padding-left: 3rem;
}

#getting-started,
#class-management,
#ai-features,
#analytics,
#live-sessions,
#troubleshooting,
#best-practices {
    scroll-margin-top: 2rem;
}

/* Test system IDs */
#currentUrl,
#currentLang,
#currentCookie,
#currentGlobal {
    font-family: monospace;
    background: #f7fafc;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

#dynamicContent {
    min-height: 100px;
    border: 2px dashed #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
}

#translationLog {
    background: #1a202c;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.875rem;
    max-height: 300px;
    overflow-y: auto;
}

#sldEditorContainer {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
}

#sldDebugInfo {
    background: #1a202c;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.875rem;
    margin-top: 1rem;
}

#testSldDomain,
#testSldSubdomain,
#testSldConcept,
#testSldLearningObjective,
#testSldLearningEnvironment {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
}

#inlineDebugInfo {
    background: #fed7d7;
    border: 1px solid #feb2b2;
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

#testAssignmentTitle,
#testAssignmentDescription {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

#testTitleSuggestionsBtn,
#testDescriptionSuggestionsBtn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
}

#assignmentDebugInfo {
    background: #1a202c;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* ===== PRINT STYLES ===== */
@media print {
    .header,
    .nav-tabs,
    .btn,
    .action-buttons,
    .language-selector {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .section {
        background: white;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ===== ACADEMIC PERIOD SECTION ===== */
.academic-period-section {
    background: #f7fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.academic-period-section .section-title {
    color: #2d3748;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.academic-period-section .section-title i {
    color: #4facfe;
}

.academic-period-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.period-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.period-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.period-label {
    display: block;
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.period-value {
    display: block;
    font-size: 1.125rem;
    color: #2d3748;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .academic-period-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .academic-period-section {
        padding: 1rem;
        margin: 1rem 0;
    }
}

/* Form section title style for create class modal */
.form-section-title {
    color: #2d3748;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

/* ========================================
   DRY Number Styling System
   ======================================== */

/* Base number display classes */
.number,
.stat-number {
    font-weight: 700;
    line-height: 1.2;
    display: block;
    margin-bottom: 0.25rem;
}

/* Size variants using CSS custom properties */
:root {
    --number-size-xs: 0.875rem;
    --number-size-sm: 1.125rem;
    --number-size-base: 1.5rem;
    --number-size-lg: 1.8rem;
    --number-size-xl: 2.2rem;
    --number-size-2xl: 2.5rem;
}

/* Default sizes */
.number { font-size: var(--number-size-base); }
.stat-number { font-size: var(--number-size-lg); }

/* Size modifiers */
.number--xs { font-size: var(--number-size-xs); }
.number--sm { font-size: var(--number-size-sm); }
.number--lg { font-size: var(--number-size-lg); }
.number--xl { font-size: var(--number-size-xl); }
.number--2xl { font-size: var(--number-size-2xl); }

/* Specific variants (consolidating duplicates) */
.quick-stat-number {
    font-size: var(--number-size-base);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.summary-stat-number {
    font-size: var(--number-size-lg);
    font-weight: 700;
    color: var(--text-primary, #2d3748);
}

.streak-number {
    font-size: var(--number-size-2xl);
    font-weight: 800;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Count displays */
.count,
.char-count,
.student-count,
.students-count {
    font-size: var(--number-size-sm);
    font-weight: 500;
    color: var(--text-secondary, #718096);
}

.student-count-badge,
.students-count-display {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: rgba(79, 172, 254, 0.1);
    border-radius: 0.375rem;
    font-size: var(--number-size-xs);
    font-weight: 600;
}

/* Input number styling (consolidated) */
input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Custom number input component */
.number-input {
    display: flex;
    align-items: stretch;
    max-width: 120px;
}

.number-input__field {
    flex: 1;
    text-align: center;
    border-left: none;
    border-right: none;
}

.number-input__btn {
    width: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    :root {
        --number-size-xs: 0.75rem;
        --number-size-sm: 1rem;
        --number-size-base: 1.25rem;
        --number-size-lg: 1.5rem;
        --number-size-xl: 1.8rem;
        --number-size-2xl: 2rem;
    }
}

/* Class Creation Modal - Compact Layout */
.class-creation-modal .modal-content {
    max-width: 720px !important;
}

.class-creation-modal .modal-body {
    padding: 1.5rem;
}

.class-creation-modal .form-group {
    margin-bottom: 0.75rem;
}

.class-creation-modal .form-group.compact-field {
    margin-bottom: 1rem;
}

.class-creation-modal .form-group.compact {
    margin-bottom: 0.5rem;
}

.class-creation-modal .label-row {
    display: flex;
    align-items: baseline;
    margin-bottom: 0.25rem;
}

.class-creation-modal .form-label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #e0e0e0;
}

.class-creation-modal .inline-help {
    color: #888;
    font-style: italic;
}

.class-creation-modal .input-with-ai {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.class-creation-modal .input-with-ai input,
.class-creation-modal .input-with-ai textarea {
    flex: 1;
}

.class-creation-modal input[type="text"],
.class-creation-modal input[type="number"],
.class-creation-modal input[type="date"],
.class-creation-modal textarea,
.class-creation-modal select {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
    border-radius: 4px;
}

.class-creation-modal input[type="text"]:focus,
.class-creation-modal input[type="number"]:focus,
.class-creation-modal input[type="date"]:focus,
.class-creation-modal textarea:focus,
.class-creation-modal select:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: #4facfe;
    outline: none;
    box-shadow: 0 0 0 2px rgba(79, 172, 254, 0.2);
}

.class-creation-modal input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.class-creation-modal .form-control,
.class-creation-modal .form-control-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    min-height: calc(1.5em + 0.75rem + 2px);
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

.class-creation-modal .form-select,
.class-creation-modal .form-select-sm {
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    font-size: 0.875rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23e0e0e0' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

.class-creation-modal .ai-suggestion-btn.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.class-creation-modal .ai-header.compact {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.class-creation-modal .additional-fields-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.class-creation-modal .section-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #4facfe;
}

.class-creation-modal .compact-grid .row {
    margin-bottom: 0.5rem;
}

.class-creation-modal .preview-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.class-creation-modal .preview-toggle {
    width: 100%;
    text-align: left;
    padding: 0.5rem 0;
    color: #4facfe;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.class-creation-modal .preview-toggle:hover {
    color: #00f2fe;
}

.class-creation-modal .preview-toggle .toggle-icon {
    transition: transform 0.3s ease;
    font-size: 0.75rem;
}

.class-creation-modal .preview-container {
    display: none;
    margin-top: 0.75rem;
}

.class-creation-modal .sld-suggestions-panel.compact {
    margin-top: 0.25rem;
    max-height: 150px;
}

.class-creation-modal .disabled {
    opacity: 0.6;
    pointer-events: none;
}

.class-creation-modal .disabled input,
.class-creation-modal .disabled textarea,
.class-creation-modal .disabled button {
    cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .class-creation-modal .modal-content {
        margin: 1rem;
        max-height: 95vh;
    }
    
    .class-creation-modal .compact-grid .col-6 {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}
