/* Admin User Management Styles */

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.section-header h2 {
    margin: 0;
    color: #1f2937;
    font-size: 1.75rem;
    font-weight: 700;
}

.header-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.section-header .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.section-header .btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.section-header .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.section-header .btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.2);
}

.section-header .btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(107, 114, 128, 0.3);
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 0.75rem;
    margin: 2rem 0;
}

.empty-state-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.5rem 0;
}

.empty-state-subtext {
    color: #6b7280;
    margin: 0;
}

.students-section {
    width: 100%;
    padding: 1.5rem;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

/* Responsive Grid Improvements */
@media (max-width: 1200px) {
    .users-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .users-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1rem;
    }
}

.user-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.user-card:hover {
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.user-info {
    margin-bottom: 1.5rem;
}

.user-info h4 {
    margin: 0 0 0.75rem 0;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.user-info p {
    margin: 0.5rem 0;
    color: #6b7280;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info p strong {
    color: #374151;
    font-weight: 500;
    min-width: 120px;
}

.points-highlight {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Point Adjustment Section */
.point-adjustment-section {
    margin: 1.5rem 0 1rem 0;
    padding: 1rem;
    background-color: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-top: 20px;
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.point-adjustment-section h5 {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
}

.adjustment-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.adjustment-tab-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: #7f8c8d;
    transition: all 0.3s ease;
}

.adjustment-tab-btn:hover {
    color: #2c3e50;
    background: #f8f9fa;
}

.adjustment-tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background: #fff;
}

.adjustment-tab-content {
    display: none;
    padding: 15px 0;
}

.adjustment-tab-content.active {
    display: block;
}

.adjustment-controls,
.weekly-adjustment-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.weekly-adjustment-controls {
    flex-direction: column;
    gap: 15px;
}

.week-selector-row {
    width: 100%;
}

.weekly-controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.adjustment-type,
.week-select {
    padding: 6px 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 13px;
    min-width: 120px;
}

.adjustment-amount {
    padding: 6px 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 13px;
    width: 80px;
    text-align: center;
}

.reason-input {
    padding: 6px 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 13px;
    min-width: 150px;
    flex: 1;
}

.apply-adjustment-btn,
.apply-weekly-adjustment-btn {
    padding: 6px 12px;
    font-size: 13px;
    white-space: nowrap;
}

/* User Actions */
.user-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.user-actions .btn {
    flex: 1;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 0;
    text-align: center;
    white-space: nowrap;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    border: 1px solid transparent;
}

.user-actions .btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border-color: #3b82f6;
}

.user-actions .btn-outline {
    background: white;
    color: #6b7280;
    border-color: #d1d5db;
}

.user-actions .btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-color: #ef4444;
}

/* Ensure all user action buttons have consistent sizing regardless of other classes */
.user-actions .btn-sm {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

.user-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.user-actions .btn-primary:hover {
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.user-actions .btn-danger:hover {
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.user-actions .btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* User Edit Modal */
.user-edit-modal .modal-content {
    max-width: 500px;
}

.user-edit-form .input-group {
    margin-bottom: 1rem;
}

.user-edit-form .input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ================================================
   STUDENT DETAILS MODAL - COMPACT SETTINGS DESIGN
   ================================================ */

/* Modal Container - Balanced padding with proper show/hide functionality */
#student-details-modal.modal {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 1050 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    backdrop-filter: none !important;
}

/* Nuclear option - hide EVERYTHING when hidden class is applied */
.hidden,
.hidden *,
#student-details-modal.hidden,
#student-details-modal.hidden *,
.modal.hidden,
.modal.hidden * {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Modal Content - Proper height with balanced spacing */
#student-details-modal .modal-content {
    width: 100% !important;
    max-width: 900px !important;
    max-height: 90vh !important;
    margin: 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    background: white !important;
    transform: none !important;
    position: relative !important;
}

/* Modal Header - Fixed height at top */
#student-details-modal .modal-header {
    padding: 20px 24px !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: auto !important;
    flex-shrink: 0 !important;
}

#student-details-modal .modal-header h4 {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

/* Modal Body - Scrollable main content area */
#student-details-modal .modal-body {
    padding: 24px !important;
    background: #fafbfc !important;
    font-size: 16px !important;
    flex: 1 !important;
    overflow-y: auto !important;
    height: 0 !important;
}

/* Student Details Container */
#student-details-modal .student-details {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
}

/* Header Section - Larger info */
#student-details-modal .details-header {
    background: white !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin: 0 !important;
}

#student-details-modal .header-content {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 20px !important;
    flex-wrap: wrap !important;
}

#student-details-modal .student-basic-info h3 {
    font-size: 24px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin: 0 0 8px 0 !important;
    line-height: 1.2 !important;
}

#student-details-modal .username-label {
    font-size: 16px !important;
    color: #64748b !important;
    margin: 0 0 4px 0 !important;
    font-weight: 500 !important;
}

#student-details-modal .registration-date {
    font-size: 14px !important;
    color: #94a3b8 !important;
    margin: 0 !important;
}

/* Summary Stats - Larger chips */
#student-details-modal .summary-stats {
    display: flex !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}

#student-details-modal .summary-stat {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    color: white !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    text-align: center !important;
    min-width: 80px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

#student-details-modal .stat-number {
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    display: block !important;
}

#student-details-modal .stat-label {
    font-size: 12px !important;
    opacity: 0.9 !important;
    margin-top: 4px !important;
    line-height: 1 !important;
    display: block !important;
}

/* Daf Stats - Green styling */
#student-details-modal .summary-stat.daf-stat {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

/* Details Sections - Larger panels */
#student-details-modal .details-section {
    background: white !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    margin: 0 !important;
}

#student-details-modal .details-section h4 {
    background: #f1f5f9 !important;
    padding: 16px 20px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    margin: 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Performance Grid - Larger cards */
#student-details-modal .performance-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    padding: 20px !important;
}

#student-details-modal .performance-card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

#student-details-modal .performance-header {
    background: #f8fafc !important;
    padding: 12px 16px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

#student-details-modal .performance-header h5 {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    margin: 0 !important;
}

#student-details-modal .performance-stats {
    padding: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

#student-details-modal .perf-stat {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

#student-details-modal .perf-label {
    font-size: 14px !important;
    color: #64748b !important;
    font-weight: 500 !important;
}

#student-details-modal .perf-value {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
}

/* Weekly Progress - Better layout - No inner scroll */
#student-details-modal .weekly-progress {
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

#student-details-modal .week-summary {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    transition: all 0.2s ease !important;
}

#student-details-modal .week-summary:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

#student-details-modal .week-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    margin-bottom: 12px !important;
}

#student-details-modal .week-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

#student-details-modal .week-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    line-height: 1.2 !important;
}

#student-details-modal .week-dates {
    font-size: 14px !important;
    color: #64748b !important;
    line-height: 1.2 !important;
}

#student-details-modal .week-score-section {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 8px !important;
}

#student-details-modal .week-score {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #2563eb !important;
    line-height: 1 !important;
}

#student-details-modal .week-status {
    font-size: 14px !important;
    padding: 6px 12px !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    line-height: 1 !important;
}

#student-details-modal .week-status.success {
    background: #dcfce7 !important;
    color: #166534 !important;
}

#student-details-modal .week-status.pending {
    background: #fef3c7 !important;
    color: #92400e !important;
}

#student-details-modal .week-details {
    display: flex !important;
    gap: 16px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

#student-details-modal .submission-count,
#student-details-modal .goal-threshold {
    font-size: 14px !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}



/* Responsive adjustments for modal */
@media (max-width: 768px) {
    #student-details-modal.modal {
        padding: 15px 10px !important;
    }
    
    #student-details-modal .modal-content {
        max-width: 95vw !important;
        margin: 0 !important;
    }
    
    #student-details-modal .header-content {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
    }
    
    #student-details-modal .summary-stats {
        justify-content: center !important;
    }
    
    #student-details-modal .performance-grid {
        grid-template-columns: 1fr !important;
    }
    
    #student-details-modal .week-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    
    #student-details-modal .week-score-section {
        align-items: flex-start !important;
    }
}

@media (max-width: 480px) {
    #student-details-modal.modal {
        padding: 2px !important;
    }
    
    #student-details-modal .modal-content {
        max-width: 98vw !important;
        margin: 0 !important;
        height: calc(100vh - 4px) !important;
    }
    
    #student-details-modal .modal-body {
        padding: 16px !important;
        font-size: 14px !important;
    }
    
    #student-details-modal .student-basic-info h3 {
        font-size: 20px !important;
    }
    
    #student-details-modal .summary-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
}

/* Close Button */
#student-details-modal .modal-close {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    background: none !important;
    border: none !important;
    font-size: 18px !important;
    color: #64748b !important;
    cursor: pointer !important;
    padding: 4px !important;
    line-height: 1 !important;
    border-radius: 4px !important;
    transition: all 0.15s ease !important;
}

#student-details-modal .modal-close:hover {
    background: #f1f5f9 !important;
    color: #374151 !important;
}



/* Details Sections - Base styles for non-modal contexts */
.details-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

.details-section h4 {
    margin: 0;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e5e7eb;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.details-section h4 i {
    width: 1rem;
    height: 1rem;
    color: #3b82f6;
}

/* Performance Grid */
.performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    padding: 0.75rem;
}

.performance-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.performance-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.15);
}

.performance-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.5rem;
    background: #f9fafb;
    border-bottom: 1px solid #e7e7eb;
}

.performance-header i {
    width: 0.875rem;
    height: 0.875rem;
    color: #2563eb;
}

.performance-header h5 {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
}

.performance-stats {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.perf-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.perf-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.perf-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
}

/* Weekly Progress - No inner scroll, fully expanded */
.weekly-progress {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.week-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    background-color: #ffffff;
}

.week-summary:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.week-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.week-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.875rem;
}

.week-score {
    font-size: 1.125rem;
    font-weight: 700;
    color: #2563eb;
}

.week-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.submission-count {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Week Status Indicators */
.week-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
}

.week-status.success {
    color: #059669;
    background-color: #d1fae5;
}

.week-status.pending {
    color: #d97706;
    background-color: #fef3c7;
}

.week-status i {
    width: 0.75rem;
    height: 0.75rem;
}

/* Loading state animations */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}

.loading-state i {
    animation: spin 1s linear infinite;
    width: 2rem;
    height: 2rem;
    color: #3b82f6;
}

.loading-state p {
    margin-top: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Submission Editor Styles - No inner scroll, fully expanded */
.submissions-editor {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}

.week-editor {
    margin-bottom: 20px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    overflow: hidden;
}

.week-editor-header {
    background: #f3f4f6;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.week-editor-header h5 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.week-editor-header .week-dates {
    font-size: 13px;
    color: #6b7280;
}

.test-scores-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.test-scores-section h6 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.test-scores-grid {
    display: grid;
    gap: 1rem;
}

.test-score-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
}

.test-score-item label {
    font-weight: 600;
    color: #374151;
    min-width: 120px;
}

.test-score-item input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    max-width: 100px;
}

.test-score-item input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.score-indicator {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    min-width: 80px;
    text-align: center;
}

.score-indicator.passing {
    background: #dcfce7;
    color: #166534;
}

.score-indicator.failing {
    background: #fee2e2;
    color: #991b1b;
}

/* Girsa Tests Section */
.girsa-tests-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fefefe;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
}

.girsa-tests-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.girsa-tests-header h7 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.girsa-tests-list {
    display: grid;
    gap: 0.75rem;
}

.girsa-test-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
}

.girsa-test-item .test-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.girsa-test-item label {
    font-weight: 600;
    color: #374151;
    min-width: 60px;
}

.girsa-test-item input {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    max-width: 80px;
}

.girsa-test-item input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.girsa-test-item .test-actions {
    display: flex;
    gap: 0.5rem;
}

.girsa-test-status {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f3f4f6;
    border-radius: 0.375rem;
    border-left: 4px solid #3b82f6;
}

.test-summary {
    margin: 0;
    font-size: 0.875rem;
    color: #374151;
}

.status-passing {
    color: #059669;
    font-weight: 600;
}

.status-failing {
    color: #dc2626;
    font-weight: 600;
}

.no-tests {
    color: #6b7280;
    font-style: italic;
    text-align: center;
    padding: 1rem;
    margin: 0;
}

/* Button Styles for Test Interface */
.btn.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0.375rem;
}

.btn.btn-sm i {
    width: 14px;
    height: 14px;
}

.btn.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    transition: all 0.2s ease;
}

.btn.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.btn.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    transition: all 0.2s ease;
}

.btn.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

/* Responsive Design for Editor */
@media (max-width: 768px) {
    .test-score-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .date-fields {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .editor-actions {
        flex-direction: column;
    }
    
    .seder-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

.submission-editor-placeholder em {
    font-style: italic;
    color: #8e9aaf;
}

/* Day-based Editor Styles */
.add-date-controls {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}

.days-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.day-editor {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
}

.day-editor.has-submissions {
    border-left: 4px solid #10b981;
}

.day-editor.no-submissions {
    border-left: 4px solid #f59e0b;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.day-header h7 {
    margin: 0;
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.day-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.day-status {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-indicator.submitted {
    background-color: #d1fae5;
    color: #065f46;
}

.status-indicator.empty {
    background-color: #fef3c7;
    color: #92400e;
}

.status-indicator.special {
    background-color: #ddd6fe;
    color: #5b21b6;
}

.special-events-for-day {
    background: #fef7ff;
    border: 1px solid #e9d5ff;
    border-radius: 6px;
    padding: 12px;
}

.special-events-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.special-event-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.special-event-item small {
    color: #6b7280;
    font-style: italic;
}

.seder-for-day {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
}

/* Responsive adjustments for day editor */
@media (max-width: 768px) {
    .day-sedarim {
        grid-template-columns: 1fr;
    }
    
    .day-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .seder-fields {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* Profile Tab Styles for Student Interface */
.profile-tabs {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

.profile-tab-nav {
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    padding: 0 1.5rem;
    background: #f8fafc;
}

.profile-tab-btn {
    padding: 1rem 1.5rem;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    font-size: 0.875rem;
    color: #6b7280;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.profile-tab-btn:hover {
    color: #374151;
    border-bottom-color: #d1d5db;
    background: rgba(59, 130, 246, 0.05);
}

.profile-tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    background: white;
    font-weight: 600;
}

.profile-tab-content {
    padding: 1.5rem;
    min-height: 300px;
}

/* Profile Card */
.profile-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.profile-card h3 {
    margin: 0 0 1.5rem 0;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.75rem;
}

/* Profile Stats */
.profile-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.stat-item:hover {
    background: #f1f5f9;
    border-color: #3b82f6;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.stat-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.stat-value {
    font-weight: 600;
    color: #1f2937;
    font-size: 1rem;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hidden class for tab content */
.hidden {
    display: none !important;
}

/* Progress Details Placeholder */
.progress-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.week-progress-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.week-progress-card h4 {
    margin: 0 0 1rem 0;
    color: #1f2937;
    font-size: 1.125rem;
    font-weight: 600;
}

/* Detailed Progress Styles */
.week-progress-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.week-progress-section h4 {
    margin: 0 0 1.5rem 0;
    color: #1f2937;
    font-size: 1.125rem;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.75rem;
}

.sedarim-progress {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.seder-progress-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.seder-progress-item:hover {
    background: #f1f5f9;
    border-color: #3b82f6;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.seder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.seder-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 1rem;
}

.attendance-rate {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    background: #e5e7eb;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.progress-details {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.detail-item {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
}

.week-summary {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.points-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.week-points {
    font-weight: 600;
    color: #1f2937;
    font-size: 1rem;
}

.event-status {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.event-status.qualified {
    background: #d1fae5;
    color: #065f46;
}

.event-status.not-qualified {
    background: #fee2e2;
    color: #991b1b;
}

/* Daf Progress Section */
.daf-progress-section {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #0ea5e9;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.daf-progress-section h4 {
    margin: 0 0 1.5rem 0;
    color: #0c4a6e;
    font-size: 1.125rem;
    font-weight: 600;
    border-bottom: 2px solid #0ea5e9;
    padding-bottom: 0.75rem;
}

.daf-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: center;
}

.total-dafim, .daf-points {
    text-align: center;
    background: white;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 1rem;
}

.daf-count, .points-count {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #0c4a6e;
    margin-bottom: 0.5rem;
}

.daf-label, .points-label {
    display: block;
    font-size: 0.875rem;
    color: #075985;
    font-weight: 500;
}

/* Responsive design for detailed progress */
@media (max-width: 768px) {
    .sedarim-progress {
        grid-template-columns: 1fr;
    }
    
    .seder-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .progress-details {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .points-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .daf-summary {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .daf-count, .points-count {
        font-size: 1.5rem;
    }
}

/* Profile Settings Form */
.profile-settings-form {
    margin-top: 1.5rem;
}

.profile-settings-form .input-group {
    margin-bottom: 1.25rem;
}

.profile-settings-form label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.profile-settings-form input[type="text"],
.profile-settings-form input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.profile-settings-form input[type="text"]:focus,
.profile-settings-form input[type="password"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.profile-settings-form .help-text {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    font-style: italic;
}

.profile-settings-form .form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: right;
}

.profile-settings-form .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.profile-settings-form .btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.profile-settings-form .btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.profile-settings-form .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Responsive design for profile settings */
@media (max-width: 768px) {
    .profile-settings-form .form-actions {
        text-align: center;
    }
    
    .profile-settings-form .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Messaging Tabs */
.messaging-tabs {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

.messaging-tab-nav {
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    background: #f8fafc;
}

.messaging-tab-btn {
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid transparent;
}

.messaging-tab-btn:hover {
    color: #374151;
    background: #f1f5f9;
}

.messaging-tab-btn.active {
    color: #2563eb;
    background: white;
    border-bottom-color: #2563eb;
}

.messaging-tab-content {
    min-height: 400px;
}

.tab-content {
    padding: 1.5rem;
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content.hidden {
    display: none;
}

/* Compose Message Form */
.compose-message-form {
    max-width: 600px;
    margin: 0 auto;
}

.compose-message-form h3 {
    margin: 0 0 1.5rem 0;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e7e7eb;
}

.compose-message-form .form-group {
    margin-bottom: 1.5rem;
}

.compose-message-form label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.compose-message-form input[type="text"],
.compose-message-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.compose-message-form input[type="text"]:focus,
.compose-message-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.compose-message-form textarea {
    resize: vertical;
    min-height: 120px;
}

.compose-message-form .form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #e7e7eb;
}

.compose-message-form .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.compose-message-form .btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.compose-message-form .btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.compose-message-form .btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 2px  4px rgba(107, 114, 128, 0.2);
}

.compose-message-form .btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(107, 114, 128, 0.3);
}

/* Week-Specific Daf Requirement Styles */
.requirement-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.requirement-section h4 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
}

.requirement-section .section-description {
    margin: 0 0 1.5rem 0;
    color: #64748b;
    font-size: 0.9rem;
}

.week-specific-requirement {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.25rem 1.25rem 1.5rem 1.25rem;
    margin-bottom: 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    box-sizing: border-box;
    overflow: visible;
    width: 100%;
    min-height: 130px;
}

.week-specific-requirement:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.week-info {
    flex: 1;
    margin-right: 1rem;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: flex-start;
}

.week-info .week-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.1rem;
    display: block;
    line-height: 1.3;
}

.week-info .week-dates {
    color: #64748b;
    font-size: 0.85rem;
    display: block;
    line-height: 1.2;
}

.override-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #fef3c7;
    color: #d97706;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
    line-height: 1;
}

.week-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    flex-shrink: 0;
    width: 110px;
    align-self: flex-start;
    margin-top: 0.25rem;
}

.week-daf-input {
    width: 100%;
    padding: 0.4rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    text-align: center;
    font-weight: 500;
    font-size: 0.85rem;
    transition: border-color 0.2s ease;
    margin-bottom: 0.3rem;
}

.week-daf-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.week-controls .btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 0.25rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.week-controls .btn-primary {
    background: #3b82f6;
    color: white;
}

.week-controls .btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.week-controls .btn-secondary {
    background: #6b7280;
    color: white;
}

.week-controls .btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .week-specific-requirement {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem 1rem 1.25rem 1rem;
        min-height: auto;
    }
    
    .week-info {
        margin-right: 0;
        text-align: center;
        gap: 0.75rem;
    }
    
    .override-badge {
        align-self: center;
        margin-top: 0.75rem;
    }
    
    .week-controls {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
}
