/* Chat Table Styles - Reusable styles for chat tables */

/* Chats Table */
.chats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chats-table th,
.chats-table td {
    text-align: left;
    padding: 4px 4px 4px 10px;
    border-bottom: 1px solid var(--border-color);
}

.chats-table th {
    background: var(--bg-primary);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.chats-table td {
    color: var(--text-primary);
    font-size: 14px;
}

.chats-table tr:hover {
    background: var(--bg-hover);
}

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

/* Link Actions */
.link-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-hover);
}

/* Created Info */
.created-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.created-time {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.created-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

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

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

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

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

.status-refusal {
    background-color: #dc2626;
    color: #ffffff;
    border: 1px solid #b91c1c;
    font-weight: 600;
}

/* Type Badges */
.type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

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

.type-therapist {
    background-color: #deaae9;
    color: #6f1171;
}

.type-virtual_patient {
    background-color: #79cef8;
    color: #0f2777;
}

.type-general {
    background-color: #f3f4f6;
    color: #374151;
}

.type-ortho_trauma {
    background-color: #e0f2fe;
    color: #0369a1;
}

/* Expired Text */
.expired-text {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.875rem;
}

/* Groups column styles */
.group-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

.groups-more {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Delivery status styles */
.delivery-status-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.delivery-type-text {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
}

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

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

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

/* Diagnosis column max width */
.student-chats-page .chats-table td:nth-child(4) {
    max-width: 200px;
}

/* Diagnosis text - 2 lines max */
.diagnosis-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    word-break: break-word;
    white-space: normal !important; /* Allow wrapping inside diagnosis cell for 2-line clamp */
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 1rem 0;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    min-width: 40px;
}

.pagination-btn:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.pagination-btn:disabled {
    background-color: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

.current-page {
    padding: 0.5rem 1rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

/* No Chats Message */
.chat-table-container p {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin: 1rem 0;
}

/* No Report */
.no-report {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.875rem;
}

/* Report Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--bg-secondary);
    margin: 2% auto;
    padding: 10px 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.close {
    color: var(--text-secondary);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.report-detail-content {
    margin-bottom: 2rem;
}

.report-detail-content h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.report-detail-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Report Meta */
.report-meta {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.report-meta p {
    margin: 0.5rem 0;
    color: var(--text-primary);
}

/* Chat Type Badge */
.chat-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.chat-type-badge.therapist {
    background-color: rgba(59, 130, 246, 0.2);
    color: var(--accent-color);
}

.chat-type-badge.virtual_patient {
    background-color: #f0fdf4;
    color: #166534;
}

.chat-type-badge.general {
    background-color: #f3f4f6;
    color: #374151;
}

.chat-type-badge.ortho_trauma {
    background-color: rgba(2, 132, 199, 0.18);
    color: #0284c7;
}

/* Global Alerts */
.global-alerts {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.global-alerts h4 {
    color: #92400e;
    margin-bottom: 0.5rem;
}

.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.alert-item {
    background: #fff;
    padding: 0.5rem;
    border-radius: 4px;
    color: #92400e;
    font-size: 0.875rem;
}

/* Modules Container */
.modules-container {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.module-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.module-title {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.module-status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

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

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

.module-content {
    display: grid;
    gap: 0.5rem;
}

.module-field {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.module-field:last-child {
    border-bottom: none;
}

.field-label {
    font-weight: 500;
    color: var(--text-primary);
    min-width: 120px;
}

.field-value {
    color: var(--text-secondary);
    text-align: right;
    flex: 1;
}

/* Handoff Summary */
.handoff-summary {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.handoff-summary h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.summary-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

.summary-item {
    display: flex;
    margin-bottom: 0.5rem;
}

.summary-label {
    font-weight: 500;
    color: var(--text-primary);
    width: 180px;
    flex-shrink: 0;
    margin-right: 1rem;
}

.summary-text {
    color: var(--text-secondary);
    flex: 1;
    text-align: left;
}

/* Student Info */
.student-info-prominent {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.student-name {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

/* Conclusion Section */
.conclusion-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.conclusion-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.conclusion-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Patient Summary Compact */
.patient-summary-compact {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.patient-summary-compact h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.patient-info-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.info-compact {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.info-compact strong {
    color: var(--text-primary);
    margin-right: 0.5rem;
}

/* Symptoms Block */
.symptoms-block {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.symptoms-block h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

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

.symptoms-list li {
    background: var(--bg-secondary);
    border-left: 3px solid var(--primary-color);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 0 4px 4px 0;
    color: var(--text-secondary);
}

.symptoms-list li:last-child {
    margin-bottom: 0;
}

/* Medical Info Blocks */
.medical-info-blocks {
    display: grid;
    gap: 1.5rem;
}

/* Diagnosis Comparison */
.diagnosis-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.diagnosis-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.diagnosis-item h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.diagnosis-content {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.875rem;
}

/* Medical Block */
.medical-block {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.medical-block h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.medical-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Info Grid - Only for report modules */
.report-details .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.report-details .info-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    gap: 0.5rem;
}

.report-details .info-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.report-details .info-value {
    color: #60a5fa;
    font-weight: 600;
    text-align: left;
}

/* Symptoms List - Only for report modules */
.report-details .symptoms-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.report-details .symptom-summary {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--success-color);
    margin-bottom: 1rem;
}

.report-details .symptom-summary h4 {
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.report-details .symptom-summary p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Attachments list styled similar to tmpChat */
.report-details .attachments {
    margin-top: 6px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}
.report-details .attachment {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 8px;
}
.report-details .attachment a {
    color: var(--accent-color);
    text-decoration: none;
}
.report-details .attachment .filesize {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Chat Preview Modal */
.chat-preview-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.chat-preview-modal .modal-content {
    background-color: var(--bg-secondary);
    margin: 2% auto;
    padding: 10px 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.chat-preview-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.chat-preview-modal .modal-header h3 {
    color: var(--text-primary);
    margin: 0;
}

.chat-preview-modal .modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.chat-preview-modal .modal-close:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.chat-preview-modal .modal-body {
    padding: 1.5rem;
}

/* Chat History Sidebar */
.chat-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    z-index: 1001;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.chat-sidebar.active {
    right: 0;
}

.chat-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-sidebar-header h3 {
    color: var(--text-primary);
    margin: 0;
}

.chat-sidebar-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.chat-sidebar-close:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.chat-sidebar-content {
    padding: 1.5rem;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.chat-sidebar-messages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    padding: 1rem;
    border-radius: 8px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.chat-message.user {
    background-color: var(--accent-color);
    color: white;
    margin-left: 2rem;
}

.chat-message.assistant {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    margin-right: 2rem;
}

.chat-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.chat-message-header strong {
    color: inherit;
    font-weight: 600;
}

.chat-message-time {
    opacity: 0.8;
    font-size: 0.8rem;
}

.chat-message-content {
    line-height: 1.4;
    word-wrap: break-word;
}

/* Chat Sidebar Overlay for mobile */
.chat-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.chat-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal shift effect when chat sidebar is open */
.report-modal-content.shifted {
    position: relative;
    left: -200px;
}

/* Chat Filters */
.chat-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    align-items: center;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.filter-group select {
    min-width: 150px;
}

.filter-group label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
}

/* Search container */
.search-container {
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
    align-items: center;
}

/* Search input */
.search-input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    min-width: 300px;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.search-input:-webkit-autofill,
.search-input:-webkit-autofill:hover,
.search-input:-webkit-autofill:focus,
.search-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-primary) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Search button */
.search-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.search-btn:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.search-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

.filter-group select {
	padding: 0.5rem 2.5rem 0.5rem 0.75rem;
	border: 1px solid var(--border-color);
	border-radius: 6px;
	background-color: var(--bg-primary);
	color: var(--text-primary);
	font-size: 0.875rem;
	cursor: pointer;
	transition: all 0.2s ease;
	appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	background-size: 16px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-group select:hover {
    border-color: var(--accent-color);
}

/* Mobile responsiveness for chat sidebar */
@media (max-width: 768px) {
    .chat-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .report-modal-content.shifted {
        left: -50%;
    }
    
    .chat-filters {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .search-input {
        min-width: 100%;
        width: 100%;
    }
    
    .filter-group select {
        width: 100%;
    }
}

/* Report Details Styles - Prefixed to avoid conflicts */
.report-details .report-meta {
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.report-details .report-meta p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.report-details .report-meta strong {
    color: var(--text-primary);
    font-weight: 600;
}

.report-details .chat-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

.report-details .chat-type-badge.therapist {
    background-color: rgba(59, 130, 246, 0.2);
    color: var(--accent-color);
}

.report-details .chat-type-badge.virtual_patient {
    background-color: rgba(100, 7, 186, 0.2);
    color: #be9afb;
    font-weight: 700;
}

.report-details .chat-type-badge.general {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.report-details .chat-type-badge.ortho_trauma {
    background-color: rgba(2, 132, 199, 0.18);
    color: #0284c7;
}

.report-details .global-alerts {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.report-details .global-alerts h4 {
    color: var(--warning-color);
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.report-details .alerts-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.report-details .alert-item {
    background-color: rgba(245, 158, 11, 0.1);
    padding: 0.75rem;
    border-radius: 6px;
    color: var(--warning-color);
    font-size: 0.9rem;
    border-left: 3px solid var(--warning-color);
}

.report-details .modules-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.report-details .module-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.report-details .module-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.report-details .module-card.completed {
    border-left: 4px solid var(--success-color);
}

.report-details .module-card.in-progress {
    border-left: 4px solid var(--warning-color);
}

.report-details .module-card.not-started {
    border-left: 4px solid var(--border-color);
}

.report-details .module-header {
    background-color: var(--bg-tertiary);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.report-details .module-header:hover {
    background-color: var(--bg-hover);
}

.report-details .module-title {
    color: var(--text-primary);
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.report-details .module-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-details .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.report-details .status-indicator.completed {
    background-color: var(--success-color);
}

.report-details .status-indicator.in-progress {
    background-color: var(--warning-color);
}

.report-details .status-indicator.not-started {
    background-color: var(--border-color);
}

.report-details .status-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.report-details .summary-toggle {
    color: var(--accent-color);
    font-size: 0.875rem;
    cursor: pointer;
}

.report-details .module-summary {
    padding: 1rem 1.5rem;
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

.report-details .module-alerts {
    padding: 1rem 1.5rem;
    background-color: rgba(239, 68, 68, 0.1);
    border-top: 1px solid var(--border-color);
}

.report-details .module-alerts .alert-item {
    background-color: rgba(239, 68, 68, 0.1);
    padding: 0.75rem;
    border-radius: 6px;
    color: #dc2626;
    font-size: 0.9rem;
    border-left: 3px solid #dc2626;
    margin-bottom: 0.5rem;
}

.report-details .module-data {
    padding: 1rem 1.5rem;
    background-color: var(--bg-secondary);
}

.report-details .handoff-summary {
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.report-details .handoff-summary h4 {
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.report-details .summary-content {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.report-details .summary-item {
    display: flex;
    margin-bottom: 0.5rem;
}

.report-details .summary-label {
    font-weight: 600;
    color: var(--text-primary);
    width: 180px;
    flex-shrink: 0;
    margin-right: 1rem;
}

.report-details .summary-text {
    color: var(--text-secondary);
    flex: 1;
}

.report-details .student-info-prominent {
    background: linear-gradient(135deg, var(--accent-color), #7c3aed);
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    text-align: center;
}

.report-details .student-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.report-details .patient-summary-compact {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.report-details .patient-summary-compact h4 {
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

.report-details .patient-info-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.report-details .info-compact {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.report-details .symptoms-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.report-details .symptoms-block h4 {
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

.report-details .symptoms-block .symptoms-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.report-details .symptoms-block .symptoms-list li {
    padding: 0.05rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.report-details .symptoms-block .symptoms-list li:last-child {
    border-bottom: none;
}

.report-details .medical-info-blocks {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.report-details .diagnosis-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.report-details .diagnosis-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.report-details .diagnosis-item h4 {
    color: var(--accent-color);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.report-details .diagnosis-content {
    color: var(--text-secondary);
    line-height: 1.5;
}

.report-details .medical-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.report-details .medical-block h4 {
    color: var(--accent-color);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.report-details .medical-content {
    color: var(--text-secondary);
    line-height: 1.5;
}

.report-details .symptom-item {
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    margin-bottom: 0.75rem;
}

.report-details .symptom-item h5 {
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.report-details .symptom-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 !important;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.report-details .symptom-header.clickable {
    cursor: pointer;
    user-select: none;
}

.report-details .symptom-header.clickable:hover {
    background-color: var(--bg-hover);
}

.report-details .symptom-header .toggle-icon {
    color: var(--accent-color);
    font-size: 0.85rem;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.report-details .symptom-header .symptom-number {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.report-details .symptom-header .symptom-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.report-details .symptom-data {
    display: grid;
    grid-template-rows: 1fr;
    overflow: hidden;
    transition: grid-template-rows 0.3s ease;
    margin-top: 0.75rem;
    padding-left: 2rem;
}

.report-details .symptom-data.collapsed {
    grid-template-rows: 0fr;
    margin-top: 0;
}

.report-details .symptom-data-inner {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.report-details .symptom-data .info-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem;
    background-color: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    gap: 0.25rem;
}

.report-details .symptoms-details {
    transition: all 0.3s ease;
    overflow: hidden;
}

.report-details .symptoms-details.collapsed {
    max-height: 0;
    opacity: 0;
}

.report-details .symptoms-details:not(.collapsed) {
    max-height: 2000px;
    opacity: 1;
}

.report-details .toggle-symptoms-details {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-details .toggle-symptoms-details:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--accent-color);
}

.report-details .toggle-icon {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.report-details .family-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.report-details .family-history-item {
    background-color: var(--bg-tertiary);
    padding: 0.75rem;
    border-radius: 6px;
    color: var(--text-secondary);
    border-left: 4px solid var(--success-color);
}

.report-details .toggle-family-history-details {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-details .toggle-family-history-details:hover {
    background: var(--bg-hover);
    border-color: var(--accent-color);
}

.report-details .toggle-family-history-details .toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.report-details .family-history-details {
    transition: all 0.3s ease;
    overflow: hidden;
}

.report-details .family-history-details.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Mobile responsiveness for report details */
@media (max-width: 768px) {
    .report-details .info-grid {
        grid-template-columns: 1fr;
    }
    
    .report-details .diagnosis-comparison {
        grid-template-columns: 1fr;
    }
    
    .report-details .patient-info-inline {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Module Alerts */
.module-alerts {
    padding: 1rem 1.5rem;
    background-color: rgba(239, 68, 68, 0.1);
    border-bottom: 1px solid var(--border-color);
}

.module-alerts .alert-item {
    background-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.module-alerts .alert-item:last-child {
    margin-bottom: 0;
}

/* No Report Content */
.no-report-content {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Report Modal */
.report-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.report-modal-content {
    background-color: var(--bg-secondary);
    margin: 2% auto;
    padding: 10px 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
}

.report-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.report-modal-header h3 {
    color: var(--text-primary);
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-pdf {
    padding: 0.5rem 1rem;
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-pdf:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

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

.report-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.report-modal-close:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.report-modal-body {
    padding: 1.5rem;
}

.report-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.report-details {
    margin-bottom: 2rem;
}

.report-notes-container {
    margin-top: 1rem;
}

.report-notes-container h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

#report-notes {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
    margin-bottom: 1rem;
}

#report-notes:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.report-notes-container .btn-primary {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.report-notes-container .btn-primary:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.report-notes-container .btn-primary:active {
    transform: translateY(0);
}


/* Fixed table layout to stabilize column widths */
.chats-table th,
.chats-table td {
    overflow: hidden;             /* Prevent content from expanding columns */
    text-overflow: ellipsis;      /* Show ellipsis for overflowing text */
    white-space: nowrap;          /* Keep single-line cells for stability */
}

/* Fixed column widths: patient chats (6 columns) */
.patient-chats-page .chats-table thead th:nth-child(1),
.patient-chats-page .chats-table tbody td:nth-child(1) { /* Full Name (ПІБ) */
    width: 220px;
}

.patient-chats-page .chats-table thead th:nth-child(2),
.patient-chats-page .chats-table tbody td:nth-child(2) { /* Type */
    width: 200px;
}

.patient-chats-page .chats-table thead th:nth-child(3),
.patient-chats-page .chats-table tbody td:nth-child(3) { /* Status */
    width: 140px;
}

.patient-chats-page .chats-table thead th:nth-child(4),
.patient-chats-page .chats-table tbody td:nth-child(4) { /* Link */
    width: 220px;
}

.patient-chats-page .chats-table thead th:nth-child(5),
.patient-chats-page .chats-table tbody td:nth-child(5) { /* Report */
    width: 140px;
}

.patient-chats-page .chats-table thead th:nth-child(6),
.patient-chats-page .chats-table tbody td:nth-child(6) { /* Created */
    width: 160px;
}

/* Student chats (8 columns): Full Name, Groups, Delivery, Diagnosis, Status, Link, Report, Created */
.student-chats-page .chats-table thead th:nth-child(1),
.student-chats-page .chats-table tbody td:nth-child(1) { /* Full Name */
    width: 220px;
}

.student-chats-page .chats-table thead th:nth-child(2),
.student-chats-page .chats-table tbody td:nth-child(2) { /* Groups */
    width: 100px;
}

.student-chats-page .chats-table thead th:nth-child(3),
.student-chats-page .chats-table tbody td:nth-child(3) { /* Delivery Status */
    width: 150px;
}

.student-chats-page .chats-table thead th:nth-child(4),
.student-chats-page .chats-table tbody td:nth-child(4) { /* Diagnosis */
    width: 220px;
}

.student-chats-page .chats-table thead th:nth-child(5),
.student-chats-page .chats-table tbody td:nth-child(5) { /* Status */
    width: 140px;
}

.student-chats-page .chats-table thead th:nth-child(6),
.student-chats-page .chats-table tbody td:nth-child(6) { /* Link */
    width: 220px;
}

.student-chats-page .chats-table thead th:nth-child(7),
.student-chats-page .chats-table tbody td:nth-child(7) { /* Report */
    width: 140px;
}

.student-chats-page .chats-table thead th:nth-child(8),
.student-chats-page .chats-table tbody td:nth-child(8) { /* Created */
    width: 160px;
}

/* Ensure link action buttons layout nicely within fixed width */
.chats-table td .link-actions {
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

/* Responsive tweak: on very small screens */
@media (max-width: 420px) {
    /* Patient */
    .patient-chats-page .chats-table thead th:nth-child(2),
    .patient-chats-page .chats-table tbody td:nth-child(2) { width: 170px; }
    .patient-chats-page .chats-table thead th:nth-child(3),
    .patient-chats-page .chats-table tbody td:nth-child(3) { width: 120px; }
    .patient-chats-page .chats-table thead th:nth-child(4),
    .patient-chats-page .chats-table tbody td:nth-child(4) { width: 190px; }
    .patient-chats-page .chats-table thead th:nth-child(5),
    .patient-chats-page .chats-table tbody td:nth-child(5) { width: 120px; }
    .patient-chats-page .chats-table thead th:nth-child(6),
    .patient-chats-page .chats-table tbody td:nth-child(6) { width: 140px; }

    /*!* Student *!*/
    /*.student-chats-page .chats-table thead th:nth-child(2),*/
    /*.student-chats-page .chats-table tbody td:nth-child(2) { width: 15px; }*/
    /*.student-chats-page .chats-table thead th:nth-child(3),*/
    /*.student-chats-page .chats-table tbody td:nth-child(3) { width: 130px; }*/
    /*.student-chats-page .chats-table thead th:nth-child(4),*/
    /*.student-chats-page .chats-table tbody td:nth-child(4) { width: 190px; }*/
    /*.student-chats-page .chats-table thead th:nth-child(5),*/
    /*.student-chats-page .chats-table tbody td:nth-child(5) { width: 120px; }*/
    /*.student-chats-page .chats-table thead th:nth-child(6),*/
    /*.student-chats-page .chats-table tbody td:nth-child(6) { width: 190px; }*/
    /*.student-chats-page .chats-table thead th:nth-child(7),*/
    /*.student-chats-page .chats-table tbody td:nth-child(7) { width: 120px; }*/
    /*.student-chats-page .chats-table thead th:nth-child(8),*/
    /*.student-chats-page .chats-table tbody td:nth-child(8) { width: 140px; }*/
}



/* Student Chats: visibility, sizing, and scroll fixes (scoped) */
.student-chats-page {
    overflow-x: auto; /* Enable horizontal scroll if columns overflow */
}

.student-chats-page .chats-table {
    overflow: visible; /* Do not clip overflowing columns inside the table */
}

/* Slightly smaller fonts for student tables to match previous scale */
.student-chats-page .chats-table th {
    font-size: 0.75rem;
}

.student-chats-page .chats-table td {
    font-size: 0.8125rem;
}


/*!* Student Chats: compress group badges by ~1.5x (scoped to table) *!*/
/*.student-chats-page .chats-table .group-badge {*/
/*    font-size: 0.47rem;            !* was 0.7rem *!*/
/*    padding: 0.17rem 0.33rem;      !* was 0.25rem 0.5rem *!*/
/*    border-radius: 8px;            !* was 12px *!*/
/*    margin-right: 0.17rem;         !* was 0.25rem *!*/
/*    margin-bottom: 0.17rem;        !* was 0.25rem *!*/
/*    line-height: 1.1;              !* slightly tighter *!*/
/*}*/

/*.student-chats-page .chats-table .groups-more {*/
/*    font-size: 0.47rem;            !* was 0.7rem *!*/
/*    padding: 0.17rem 0.33rem;      !* was 0.25rem 0.5rem *!*/
/*    border-radius: 8px;            !* was 12px *!*/
/*    line-height: 1.1;*/
/*}*/


/* Diagnosis Tooltip styles (consistent with project theme) */
.diagnosis-tooltip {
    position: relative;
    display: block;
    cursor: help;
}

/* Keep the clipped, 2-line display inside the tooltip wrapper */
.diagnosis-tooltip .diagnosis-text {
    /* inherits the clamp styles defined earlier */
}

.diagnosis-tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 8px); /* show above the cell */
    left: 0;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
    z-index: 100;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    min-width: 200px;
    max-width: 320px;
    pointer-events: none; /* prevent hover flicker */
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    transform: translateY(4px);
}

/* Small arrow */
.diagnosis-tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 14px;
    border-width: 6px;
    border-style: solid;
    border-color: var(--bg-tertiary) transparent transparent transparent;
}

/* Border for the arrow to match the panel border */
.diagnosis-tooltip-content::before {
    content: '';
    position: absolute;
    top: calc(100% + 1px);
    left: 14px;
    border-width: 7px;
    border-style: solid;
    border-color: var(--border-color) transparent transparent transparent;
    filter: blur(0); /* ensure crisp edge */
}

/* Show on hover or keyboard focus */
.diagnosis-tooltip:hover .diagnosis-tooltip-content,
.diagnosis-tooltip:focus .diagnosis-tooltip-content {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}


/* Allow tooltip to overflow diagnosis cell (fix clipping over the row) */
.student-chats-page .chats-table tbody td:nth-child(4) {
    overflow: visible; /* override generic overflow: hidden on td */
    position: relative; /* ensure proper stacking context for tooltip */
}
