/* Radiology Module Styles */

/* Page Header Actions */
.header-actions {
    margin-left: auto;
    display: flex;
    gap: 12px;
    align-items: center;
}

.header-actions .btn {
    text-decoration: none;
}

/* Authentication Status */
.auth-status {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    border: 1px solid #e5e9f2;
    color: #556ee6;
}

.auth-status.error {
    background: #ffebee;
    border-color: #ef9a9a;
    color: #c62828;
}

/* Filter Section */
.filter-section {
    margin-bottom: 24px;
}

.filter-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #2f3a4f;
    color: white;
}

.filter-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.collapse-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.collapse-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.filter-body {
    padding: 20px;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-item label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.filter-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

/* Results Section */
.results-section {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: #ffffff;
    border-bottom: 1px solid #e5e9f2;
}

.results-count {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
}

.results-count i {
    color: #556ee6;
    font-size: 16px;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f8f9fc;
}

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e5e9f2;
    white-space: nowrap;
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.data-table th.sortable:hover {
    background: #e5e9f2;
}

.data-table th.sortable i {
    margin-left: 6px;
    font-size: 11px;
    color: #999;
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #333;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: #f8f9fc;
}

/* Cell Badges */
.invoice-id-badge {
    display: inline-block;
    background: #556ee6;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.department-badge {
    display: inline-block;
    background: #e8f4fd;
    color: #1976d2;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.date-badge {
    display: inline-block;
    background: #f3f4f6;
    color: #666;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.patient-name {
    font-weight: 500;
    color: #2c3e50;
}

code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: #e83e8c;
}

/* Attachment Count */
.attachment-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #f5f5f5;
    color: #888;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.attachment-count.has-attachments {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Scheduled - Green */
.status-badge.status-scheduled {
    background: #e8f5e9;
    color: #2e7d32;
    border: none;
}

/* Pending - Orange */
.status-badge.status-pending {
    background: #fff3e0;
    color: #f57c00;
    border: none;
}

/* Patient Verified - Light Blue */
.status-badge.status-patient-verified {
    background: #e3f2fd;
    color: #1976d2;
    border: none;
}

/* Clinical Verified - Teal */
.status-badge.status-clinical-verified {
    background: #e0f2f1;
    color: #00695c;
    border: none;
}

/* Consent Signed - Purple */
.status-badge.status-consent-signed {
    background: #f3e5f5;
    color: #6a1b9a;
    border: none;
}

/* Eligible - Cyan */
.status-badge.status-eligible {
    background: #e0f7fa;
    color: #00838f;
    border: none;
}

/* Delivery Selected - Indigo */
.status-badge.status-delivery-selected {
    background: #e8eaf6;
    color: #283593;
    border: none;
}

/* Test Started - Amber */
.status-badge.status-test-started {
    background: #fff8e1;
    color: #f57f17;
    border: none;
}

/* Test Ended - Deep Orange */
.status-badge.status-test-ended {
    background: #fbe9e7;
    color: #d84315;
    border: none;
}

/* Report Assigned - Red/Pink */
.status-badge.status-report-assigned {
    background: #ffebee;
    color: #c62828;
    border: none;
}

/* Report Approved - Dark Green */
.status-badge.status-report-approved {
    background: #c8e6c9;
    color: #1b5e20;
    border: none;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-action {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
}

.btn-view {
    background: #e3f2fd;
    color: #1976d2;
}

.btn-view:hover {
    background: #1976d2;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

.btn-attach {
    background: #fff3e0;
    color: #f57c00;
}

.btn-attach:hover {
    background: #f57c00;
    color: white;
    transform: translateY(-2px);
}

.btn-cancel {
    background: #ffebee;
    color: #dc3545;
}

.btn-cancel:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.btn-verify {
    background: #e8f5e9;
    color: #2e7d32;
}

.btn-verify:hover {
    background: #2e7d32;
    color: white;
    transform: translateY(-2px);
}

.btn-edit {
    background: #fff3e0;
    color: #f57c00;
}

.btn-edit:hover {
    background: #f57c00;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(245, 124, 0, 0.3);
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fc;
    border-top: 1px solid #e5e9f2;
}

.pagination-info {
    font-size: 13px;
    color: #666;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-info {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: #556ee6;
}

.loading-state i {
    margin-bottom: 16px;
}

.loading-state p {
    color: #888;
    font-size: 14px;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    color: #ccc;
    text-align: center;
}

.empty-state i {
    margin-bottom: 20px;
    color: #ddd;
}

.empty-state h3 {
    color: #666;
    margin-bottom: 10px;
}

.empty-state p {
    color: #999;
    font-size: 14px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.modal-content.modal-large {
    max-width: 800px;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #2f3a4f;
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    background: #f8f9fc;
    border-top: 1px solid #e5e9f2;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Invoice Details Grid */
.invoice-detail-grid {
    display: grid;
    gap: 24px;
}

.detail-section {
    background: #f8f9fc;
    border-radius: 12px;
    padding: 20px;
}

.detail-section h4 {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e9f2;
}

.detail-section h4 i {
    color: #556ee6;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #e5e9f2;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 13px;
    color: #888;
    font-weight: 500;
}

.detail-value {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* Button Styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-primary {
    background: #556ee6;
    color: white;
}

.btn-primary:hover {
    background: #4a5fd4;
}

.btn-secondary {
    background: #e5e9f2;
    color: #555;
}

.btn-secondary:hover {
    background: #d5dae7;
}

.btn-success {
    background: #34c38f;
    color: white;
}

.btn-success:hover {
    background: #2db77d;
}

.btn-outline-primary {
    background: white;
    border: 1px solid #556ee6;
    color: #556ee6;
}

.btn-outline-primary:hover {
    background: #556ee6;
    color: white;
}

.btn-outline-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Disabled button styles */
.btn:disabled,
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn:disabled:hover {
    transform: none;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        flex-direction: column;
    }

    .filter-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .results-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .pagination-container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .data-table th,
    .data-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Error Message Styles */
.error-message {
    margin-top: 15px;
    padding: 12px;
    background-color: #fee;
    border: 1px solid #fcc;
    border-radius: 6px;
    color: #c33;
    font-size: 14px;
}

/* Password Input Wrapper for Modal */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 45px;
    flex: 1;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #74788d;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #556ee6;
}

.password-toggle:focus {
    outline: none;
}

