/* ==================== TRAINER DASHBOARD CSS ==================== */

/* Header */
.trainer-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.page-title {
    font-size: 28px;
    color: #820c22;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-icon {
    font-size: 32px;
}

.page-subtitle {
    font-size: 15px;
    color: #888;
    margin: 0;
}

/* ==================== TABS ==================== */

.trainer-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 25px;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 4px;
    overflow-x: auto;
}

.trainer-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
    font-family: inherit;
}

.trainer-tab:hover {
    background: rgba(130, 12, 34, 0.08);
    color: #820c22;
}

.trainer-tab.active {
    background: #820c22;
    color: white;
    box-shadow: 0 4px 12px rgba(130, 12, 34, 0.3);
}

.tab-icon {
    font-size: 18px;
}

.trainer-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== SECTION HEADER ==================== */

.section-header {
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 20px;
    color: #333;
    margin: 0 0 6px 0;
}

.section-header p {
    color: #888;
    margin: 0 0 15px 0;
    font-size: 14px;
}

/* ==================== TEACHERS SECTION ==================== */

.teachers-search-box {
    margin-bottom: 15px;
}

.teachers-search-box input {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    direction: rtl;
    font-family: inherit;
    transition: border-color 0.3s;
}

.teachers-search-box input:focus {
    outline: none;
    border-color: #820c22;
}

.selected-teachers-summary {
    margin-bottom: 15px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #820c22, #a01030);
    color: white;
    border-radius: 10px;
    font-size: 14px;
    display: inline-block;
}

.summary-badge strong {
    font-size: 18px;
    margin: 0 4px;
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.teacher-card {
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.teacher-card:hover {
    border-color: #820c22;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.teacher-card.selected {
    border-color: #820c22;
    background: linear-gradient(135deg, #fef5f7, #fff);
}

.teacher-card-header-trainer {
    display: flex;
    align-items: center;
    gap: 12px;
}

.teacher-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #820c22, #b81d3a);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
}

.teacher-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.teacher-card-action {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-label {
    font-size: 12px;
    color: #888;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #ccc;
    border-radius: 26px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    right: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked+.toggle-slider {
    background: #820c22;
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(-22px);
}

/* ==================== LEVELS SECTION ==================== */

.levels-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.level-card {
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.level-card:hover {
    border-color: #820c22;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.level-card.level-active {
    border-color: #4caf50;
    background: linear-gradient(135deg, #f0faf0, #fff);
}

.level-card-image {
    width: 100%;
    height: 120px;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
}

.level-card-image.level-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
}

.level-card-image.level-no-image span {
    font-size: 36px;
    opacity: 0.5;
}

.level-card-content {
    padding: 16px;
}

.level-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.level-order-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #820c22, #b81d3a);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.level-main-info {
    flex: 1;
    min-width: 0;
}

.level-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.level-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.level-type-badge,
.level-date-info,
.level-session-info,
.level-questions-count {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 500;
}

.level-type-badge {
    background: #e3f2fd;
    color: #1565c0;
}

.level-date-info {
    background: #f3e5f5;
    color: #7b1fa2;
}

.level-session-info {
    background: #ffebee;
    color: #c62828;
}

.level-questions-count {
    background: #fff3e0;
    color: #ef6c00;
}

.level-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

/* ==================== BUTTONS ==================== */

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

.btn-primary {
    background: linear-gradient(135deg, #820c22, #a01030);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6a0a1c, #820c22);
    box-shadow: 0 4px 12px rgba(130, 12, 34, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-accent {
    background: linear-gradient(135deg, #1565c0, #1e88e5);
    color: white;
}

.btn-accent:hover {
    background: linear-gradient(135deg, #0d47a1, #1565c0);
}

.btn-toggle-active {
    background: #f0f0f0;
    color: #333;
}

.btn-edit-level {
    background: #e3f2fd;
    color: #1565c0;
}

.btn-delete-level {
    background: #ffebee;
    color: #c62828;
}

/* ==================== APPLICANTS SECTION ==================== */

.trainer-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.search-box {
    display: flex;
    gap: 8px;
    flex: 1;
    max-width: 450px;
}

.search-box input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    direction: rtl;
    font-family: inherit;
}

.search-box input:focus {
    outline: none;
    border-color: #820c22;
}

.search-btn {
    padding: 12px 18px;
    background: #820c22;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #6a0a1c;
}

.view-toggle {
    display: flex;
    gap: 6px;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 8px;
}

.view-btn {
    padding: 10px 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.view-btn.active {
    background: #820c22;
    color: white;
}

.view-btn svg {
    stroke: #666;
}

.view-btn.active svg {
    stroke: white;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.applicant-card {
    background: white;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.applicant-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: #820c22;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.applicant-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.applicant-id {
    font-size: 12px;
    color: #999;
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 4px;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-row {
    display: flex;
    justify-content: space-between;
}

.card-label {
    font-size: 13px;
    color: #666;
}

.card-value {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.card-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-accepted {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-warning {
    background: #fff3e0;
    color: #ef6c00;
}

.status-rejected {
    background: #ffebee;
    color: #c62828;
}

/* Table */
.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

.applicants-table th {
    background: #820c22;
    color: white;
    padding: 14px;
    text-align: right;
    font-weight: 600;
    font-size: 13px;
}

.applicants-table td {
    padding: 14px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.applicants-table tr:hover {
    background: #fafafa;
}

.applicants-table tr:last-child td {
    border-bottom: none;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 14px;
    border: 2px solid #820c22;
    background: white;
    color: #820c22;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    font-family: inherit;
}

.page-btn:hover:not(:disabled) {
    background: #820c22;
    color: white;
}

.page-btn.active {
    background: #820c22;
    color: white;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ==================== MODALS ==================== */

.trainer-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.trainer-modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

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

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.trainer-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 2px solid #f0f0f0;
    background: #fafafa;
    border-radius: 16px 16px 0 0;
}

.trainer-modal-header h3 {
    margin: 0;
    color: #820c22;
    font-size: 18px;
}

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

.header-text h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.modal-id {
    color: #820c22;
    font-weight: bold;
    font-size: 13px;
}

.close-modal {
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #333;
}

.trainer-modal-body {
    padding: 24px;
}

.trainer-modal-footer {
    padding: 16px 24px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Modal tabs */
.modal-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 3px;
}

.modal-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: #666;
    font-family: inherit;
    transition: all 0.2s;
}

.modal-tab.active {
    background: #820c22;
    color: white;
}

.modal-tab-content {
    display: none;
}

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

/* ==================== FORM STYLES ==================== */

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 13px;
    color: #333;
}

/* Image Upload */
.image-upload-wrapper {
    margin-top: 8px;
    margin-bottom: 16px;
}

.image-preview-container {
    width: 100%;
    height: 180px;
    border: 2px dashed #d0d0d0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fafafa, #f5f5f5);
}

.image-preview-container:hover {
    border-color: #820c22;
    border-style: solid;
}

.image-preview-placeholder {
    text-align: center;
    color: #888;
}

.image-preview-placeholder span {
    font-size: 40px;
    display: block;
    margin-bottom: 8px;
}

.image-preview-placeholder p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.image-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-upload-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-upload-image,
.btn-remove-image {
    margin: 0;
}

.btn-upload-image {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
}

.btn-upload-image:hover {
    background: linear-gradient(135deg, #388e3c, #4caf50);
}

.btn-remove-image {
    background: #ffebee;
    color: #c62828;
}

.btn-remove-image:hover {
    background: #ffcdd2;
}

/* Description and Content Side by Side */
.form-row .form-group {
    flex: 1;
}

.form-row .form-group textarea {
    height: 120px;
    resize: vertical;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #820c22;
}

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

/* Questions */
.questions-section {
    border-top: 2px solid #f0f0f0;
    padding-top: 16px;
    margin-top: 16px;
}

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

.questions-header h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.question-block {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}

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

.question-number {
    font-weight: 600;
    color: #820c22;
    font-size: 13px;
}

.btn-remove-question {
    background: #ffebee;
    border: none;
    color: #c62828;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-remove-question:hover {
    background: #ef9a9a;
}

.question-block .form-group {
    margin-bottom: 10px;
}

.question-block .form-group input {
    padding: 8px 12px;
    font-size: 13px;
}

.choices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.choice-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.choice-item label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    white-space: nowrap;
    color: #555;
    cursor: pointer;
}

.choice-item input[type="text"] {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
}

/* Question Score Field */
.question-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.question-score-field {
    display: flex;
    align-items: center;
    gap: 6px;
}

.question-score-field label {
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.question-score-field input {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
}

/* ==================== VIDEOS SECTION ==================== */

.videos-section {
    margin-top: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
}

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

.videos-header h4 {
    margin: 0;
    color: #333;
    font-size: 15px;
}

.video-block {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}

.video-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.video-number {
    font-weight: 600;
    color: #820c22;
    font-size: 13px;
}

.btn-remove-video {
    background: #ffebee;
    border: none;
    color: #c62828;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-remove-video:hover {
    background: #ef9a9a;
}

.video-block .form-group {
    margin-bottom: 10px;
}

.video-block .form-group:last-child {
    margin-bottom: 0;
}

.video-block input[type="text"],
.video-block input[type="url"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
}

/* ==================== EVALUATION GLOBAL SUMMARY ==================== */

.eval-global-summary {
    background: linear-gradient(135deg, #820c22, #a01830);
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 20px;
    color: white;
}

.eval-global-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

.eval-global-total {
    font-size: 16px;
    font-weight: 700;
}

.eval-global-label {
    font-size: 14px;
    opacity: 0.9;
}

.eval-global-value {
    font-size: 16px;
    font-weight: 700;
}

.eval-global-total .eval-global-value {
    font-size: 20px;
}

.eval-global-percentage {
    font-size: 14px;
    opacity: 0.9;
    margin-right: 8px;
}

/* ==================== DETAILS GRID ==================== */

.applicant-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.detail-section {
    background: #fafafa;
    border-radius: 10px;
    padding: 14px;
}

.detail-section.full-width {
    grid-column: 1 / -1;
}

.section-title {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: #820c22;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8e8e8;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

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

.detail-label {
    font-weight: 500;
    color: #666;
}

.detail-value {
    color: #333;
}

/* Progress Timeline */
.progress-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 15px 0;
}

.progress-timeline::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: #e0e0e0;
    z-index: 0;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.timeline-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-bottom: 6px;
    border: 3px solid #e0e0e0;
    background: white;
}

.timeline-icon.completed {
    background: #4caf50;
    border-color: #4caf50;
    color: white;
}

.timeline-icon.pending {
    background: #ff9800;
    border-color: #ff9800;
    color: white;
}

.timeline-icon.waiting {
    background: #9e9e9e;
    border-color: #9e9e9e;
    color: white;
}

.timeline-icon.rejected {
    background: #f44336;
    border-color: #f44336;
    color: white;
}

.timeline-label {
    font-size: 11px;
    color: #666;
    text-align: center;
}

.timeline-status {
    font-size: 10px;
    color: #999;
    margin-top: 3px;
}

/* ==================== EVALUATION ==================== */

.evaluation-table th {
    font-size: 12px !important;
}

.evaluation-table td {
    font-size: 13px;
}

.eval-results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.eval-result-card {
    background: #fafafa;
    border-radius: 10px;
    padding: 14px;
    border: 1px solid #e8e8e8;
}

.eval-result-card.eval-not-taken {
    opacity: 0.6;
}

.eval-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.eval-level-title {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.eval-score {
    font-weight: bold;
    font-size: 16px;
    padding: 4px 12px;
    border-radius: 20px;
}

.score-high {
    background: #e8f5e9;
    color: #2e7d32;
}

.score-medium {
    background: #fff3e0;
    color: #ef6c00;
}

.score-low {
    background: #ffebee;
    color: #c62828;
}

.eval-pending {
    background: #f5f5f5;
    color: #888;
    font-size: 12px;
}

.eval-result-details {
    display: flex;
    gap: 20px;
    margin-top: 8px;
    font-size: 12px;
    color: #888;
}

.eval-live-card {
    border-right: 3px solid #f44336;
}

.eval-live-details {
    flex-direction: column;
    gap: 6px;
}

.btn-eval-details {
    background: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

.btn-eval-details:hover {
    background: #f5f5f5;
}

.eval-average {
    margin-top: 14px;
    padding: 14px;
    background: linear-gradient(135deg, #820c22, #a01030);
    color: white;
    border-radius: 10px;
    text-align: center;
    font-size: 16px;
}

.eval-average strong {
    font-size: 22px;
}

/* ==================== LOADING & EMPTY ==================== */

.loading-spinner {
    display: none;
    text-align: center;
    padding: 40px;
}

.loading-spinner.active {
    display: block;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #820c22;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

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

.no-results {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 15px;
}

.hidden {
    display: none !important;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .trainer-dashboard-wrapper {
        padding: 12px;
    }

    .trainer-tabs {
        flex-wrap: nowrap;
    }

    .trainer-tab {
        padding: 10px 12px;
        font-size: 12px;
    }

    .tab-label {
        display: none;
    }

    .teacher-card,
    .level-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .teacher-card-action {
        justify-content: center;
    }

    .level-card-actions {
        justify-content: center;
    }

    .cards-grid,
    .teachers-grid {
        grid-template-columns: 1fr;
    }

    .trainer-controls {
        flex-direction: column;
    }

    .search-box {
        max-width: none;
    }

    .applicant-details-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .choices-grid {
        grid-template-columns: 1fr;
    }

    .progress-timeline {
        flex-wrap: wrap;
        gap: 10px;
    }

    .progress-timeline::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 20px;
    }

    .trainer-modal-content {
        margin: 10px;
        border-radius: 12px;
    }
}

/* ==================== LIVE SESSION STYLES ==================== */

.live-session-info-box {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border: 1px solid #ffcc02;
    border-radius: 10px;
    padding: 14px 18px;
    margin-top: 10px;
}

.live-session-info-box p {
    margin: 0;
    font-size: 13px;
    color: #e65100;
    font-weight: 500;
}

.level-session-info {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
    background: #fce4ec;
    color: #c62828;
}

.btn-open-session {
    background: linear-gradient(135deg, #e91e63, #c2185b) !important;
    color: white !important;
}

.btn-open-session:hover {
    background: linear-gradient(135deg, #c2185b, #ad1457) !important;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

#live-session-fields .form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

#live-session-fields input[type="date"],
#live-session-fields input[type="time"],
#live-session-fields input[type="number"] {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

#live-session-fields input:focus {
    outline: none;
    border-color: #820c22;
}

@media (max-width: 600px) {
    #live-session-fields .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==================== RATINGS TAB ==================== */

.ratings-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.ratings-filter-btn {
    border-radius: 20px;
}

.ratings-filter-btn.active {
    box-shadow: 0 2px 8px rgba(130, 12, 34, 0.3);
}

.ratings-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ratings-subtitle {
    font-size: 16px;
    color: #333;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.ratings-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.rating-card {
    background: #fafafa;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s;
}

.rating-card:hover {
    border-color: #820c22;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

.rating-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.rating-count {
    font-size: 12px;
    color: #888;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 12px;
}

.rating-card-body {
    margin-bottom: 12px;
}

.rating-stars-display {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating-stars-display .star {
    font-size: 20px;
    color: #ddd;
}

.rating-stars-display .star.filled {
    color: #ffc107;
}

.rating-stars-display .star.half {
    color: #ffc107;
    opacity: 0.6;
}

.rating-value {
    margin-right: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #820c22;
}

.no-ratings {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 14px;
}

/* Rating Details Modal */
.ratings-details-header {
    margin-bottom: 20px;
}

.average-rating {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #fff8e1, #fff3c4);
    border-radius: 12px;
    border: 2px solid #ffe082;
}

.avg-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.avg-stars {
    margin-bottom: 8px;
}

.avg-stars .star {
    font-size: 28px;
    color: #ddd;
}

.avg-stars .star.filled {
    color: #ffc107;
}

.avg-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.avg-count {
    font-size: 13px;
    color: #888;
    margin-right: 8px;
}

.ratings-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.rating-item {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 14px;
}

.rating-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.rating-applicant-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.rating-item-date {
    font-size: 11px;
    color: #888;
}

.rating-item-stars .star {
    font-size: 16px;
    color: #ddd;
}

.rating-item-stars .star.filled {
    color: #ffc107;
}

.rating-item-suggestions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e8e8e8;
    font-size: 13px;
    color: #666;
    font-style: italic;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .ratings-filters {
        flex-direction: column;
    }
    
    .ratings-cards {
        grid-template-columns: 1fr;
    }
}

/* ==================== ANSWERS MODAL ==================== */

.btn-view-answers {
    margin-top: 8px;
    background: #820c22;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: background 0.2s;
}

.btn-view-answers:hover {
    background: #a01030;
}

.answers-summary-bar {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    background: #f8f4f5;
    border: 1px solid #e0d0d4;
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #444;
}

.answers-summary-bar strong {
    color: #820c22;
}

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

.answer-card {
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #e0e0e0;
    background: #fff;
}

.answer-correct {
    border-color: #c8e6c9;
    background: #f1f8f2;
}

.answer-wrong {
    border-color: #ffcdd2;
    background: #fff5f5;
}

.answer-question-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.answer-question-number {
    font-weight: 700;
    font-size: 14px;
    color: #820c22;
}

.answer-question-score {
    font-size: 12px;
    color: #888;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
}

.answer-status-icon {
    font-size: 18px;
    margin-right: auto;
}

.answer-question-text {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    line-height: 1.6;
}

.answer-choices-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.answer-choice-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    background: #fafafa;
    font-size: 14px;
    transition: background 0.2s;
}

.answer-choice-item.choice-correct {
    background: #e8f5e9;
    border-color: #81c784;
}

.answer-choice-item.choice-wrong {
    background: #ffebee;
    border-color: #ef9a9a;
}

.choice-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e0e0e0;
    font-weight: 700;
    font-size: 13px;
    color: #555;
    flex-shrink: 0;
}

.choice-correct .choice-letter {
    background: #4caf50;
    color: #fff;
}

.choice-wrong .choice-letter {
    background: #e53935;
    color: #fff;
}

.choice-text {
    flex: 1;
}

.choice-badge {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.badge-correct {
    background: #c8e6c9;
    color: #2e7d32;
}

.badge-wrong {
    background: #ffcdd2;
    color: #c62828;
}