/**
 * HTN Tutor Management Styles
 */

.htn-tutor-management {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header Styles */
.tutor-management-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.tutor-management-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #163496;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.tutor-management-desc {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Search Filters */
.search-filters-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.05);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.search-filters .form-group {
    margin-bottom: 0;
}

.search-filters .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}

.search-filters .form-control,
.search-filters select {
    width: 100%;
    border: 1px solid #d2d6dc;
    border-radius: 16px;
    padding: 0.8rem 0.95rem;
    background: #eaf4ff;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
    box-sizing: border-box;
    font-size: 0.95rem;
    line-height: 1.4;
    min-height: 48px;
}

.search-filters .form-control:focus,
.search-filters select:focus {
    border-color: #5b8def;
    box-shadow: 0 0 0 0.15rem rgba(91, 141, 239, 0.15);
    outline: none;
}

.search-btn,
.reset-btn {
    min-height: 48px;
    border-radius: 16px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    margin-right: 0.5rem;
}

.search-btn {
    background-color: #163496;
    border-color: #163496;
}

.search-btn:hover {
    background-color: #0f2556;
    border-color: #0f2556;
}

/* Results Container */
.results-container {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.12);
    padding: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.results-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.results-info {
    display: flex;
    gap: 1rem;
    color: #64748b;
    font-weight: 500;
}

/* Loading State */
.loading-state {
    padding: 3rem 0;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Empty State */
.empty-state {
    padding: 3rem 0;
}

.empty-state i {
    color: #cbd5e1;
}

.empty-state h4 {
    color: #64748b;
    margin-top: 1rem;
}

/* Results Table */
.results-table-wrapper {
    margin-top: 1rem;
}

.tutor-table {
    border-radius: 12px;
    overflow: hidden;
}

.tutor-table thead {
    background-color: #163496;
}

.tutor-table thead th {
    color: #ffffff;
    font-weight: 600;
    border: none;
    padding: 1rem;
    vertical-align: middle;
}

.tutor-table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-color: #e5e7eb;
}

.tutor-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Profile Image in Table */
.profile-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

/* Action Buttons */
.action-btn {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 0.25rem;
}

.edit-btn {
    background-color: #5b8def;
    border-color: #5b8def;
    color: #ffffff;
}

.edit-btn:hover {
    background-color: #3b7cd8;
    border-color: #3b7cd8;
}

.view-btn {
    background-color: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.view-btn:hover {
    background-color: #059669;
    border-color: #059669;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 2rem;
}

.pagination .page-link {
    color: #163496;
    border-color: #e5e7eb;
    border-radius: 8px;
    margin: 0 0.25rem;
    padding: 0.5rem 1rem;
}

.pagination .page-item.active .page-link {
    background-color: #163496;
    border-color: #163496;
}

.pagination .page-link:hover {
    background-color: #eaf4ff;
    border-color: #5b8def;
}

/* Custom Modal Styles */
.htn-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    display: none;
}

.htn-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.htn-modal-content {
    position: relative;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 800px;
    max-height: 90vh;
    margin: 5vh auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.htn-modal-header {
    background-color: #163496;
    color: #ffffff;
    border-radius: 20px 20px 0 0;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.htn-modal-title {
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0;
}

.htn-modal-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.htn-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.htn-modal-body {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

.htn-modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Profile Image Section */
.profile-image-section {
    text-align: center;
    padding: 1.5rem;
    background-color: #f8fafc;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.current-profile-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-upload-section {
    margin-top: 1rem;
}

/* Section Titles */
.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #163496;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

/* Form Controls in Modal */
.modal .form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.modal .form-control {
    border-radius: 12px;
    border: 1px solid #d2d6dc;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.modal .form-control:focus {
    border-color: #5b8def;
    box-shadow: 0 0 0 0.15rem rgba(91, 141, 239, 0.15);
}

.modal select[multiple] {
    min-height: 120px;
}

/* Modal Buttons */
.modal .btn-primary {
    background-color: #163496;
    border-color: #163496;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.modal .btn-primary:hover {
    background-color: #0f2556;
    border-color: #0f2556;
}

.modal .btn-secondary {
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tutor-management-title {
        font-size: 1.8rem;
    }
    
    .tutor-management-desc {
        font-size: 1rem;
    }
    
    .search-filters-container {
        padding: 1rem;
    }
    
    .results-container {
        padding: 1rem;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .results-info {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .tutor-table {
        font-size: 0.85rem;
    }
    
    .tutor-table thead th,
    .tutor-table tbody td {
        padding: 0.75rem 0.5rem;
    }
    
    .profile-thumbnail {
        width: 40px;
        height: 40px;
    }
    
    .action-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
    }
}

/* Table Overflow for Mobile */
.table-responsive {
    border-radius: 12px;
}

/* Success/Error Messages */
.alert {
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.alert-error {
    background-color: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

/* Inline Editing Styles */
.inline-edit {
    background-color: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 0.5rem;
}

.inline-edit:focus {
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(245, 158, 11, 0.25);
}

.editable-field {
    cursor: pointer;
    position: relative;
}

.editable-field:hover {
    background-color: #f8fafc;
}

.editable-field:hover::after {
    content: '✎';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #5b8def;
    font-size: 0.8rem;
}

/* Status Indicators */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background-color: #d1fae5;
    color: #065f46;
}

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

/* Document Counts */
.doc-count {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: #eaf4ff;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #163496;
}

.doc-count i {
    font-size: 0.75rem;
}