/* Write Report Page Styles - Matching Existing Design */

/* Workflow Progress Bar */
.workflow-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    overflow-x: auto;
    gap: 8px;
}

.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
    position: relative;
    flex: 1;
}

.workflow-step::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 100%;
    width: calc(100% - 20px);
    height: 2px;
    background: #e5e9f2;
    z-index: 0;
}

.workflow-step:last-child::after {
    display: none;
}

.workflow-step.active::after {
    background: #556ee6;
}

.workflow-step.completed::after {
    background: #b8c8ff;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e9f2;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.workflow-step.completed .step-number {
    background: #b8c8ff;
    color: white;
    box-shadow: 0 2px 8px rgba(184, 200, 255, 0.3);
}

.workflow-step.active .step-number {
    background: #556ee6;
    color: white;
    box-shadow: 0 4px 12px rgba(85, 110, 230, 0.3);
}

.step-label {
    font-size: 11px;
    color: #666;
    text-align: center;
    font-weight: 500;
    margin-bottom: 4px;
}

.workflow-step.completed .step-label {
    color: #8fa3ff;
    font-weight: 500;
}

.workflow-step.active .step-label {
    color: #556ee6;
    font-weight: 600;
}

.step-tag {
    font-size: 9px;
    color: #999;
    text-align: center;
}

.workflow-step.completed .step-tag {
    color: #8fa3ff;
}

.workflow-step.active .step-tag {
    color: #556ee6;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.loading-content {
    text-align: center;
}

.loading-content i {
    color: #556ee6;
    margin-bottom: 16px;
}

.loading-content p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Write Report Form */
.write-report-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Form Section */
.form-section {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 24px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #2f3a4f;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e9f2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section A: Patient & Study Information */
.patient-info-section {
    background: #f8f9fc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e5e9f2;
    margin-bottom: 24px;
}

.patient-info-table {
    margin-top: 16px;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

.info-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.info-table tbody tr:last-child {
    border-bottom: none;
}

.info-table td {
    padding: 12px 16px;
    font-size: 14px;
}

.info-table td:first-child {
    font-weight: 600;
    color: #555;
    width: 40%;
    background: #f8f9fc;
}

.info-table td:last-child {
    color: #333;
}

/* Section B: Image Review */
.image-review-section {
    background: #ffffff;
}

.image-review-content {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.btn-view-pacs {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #556ee6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-view-pacs:hover {
    background: #4a5fd4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(85, 110, 230, 0.3);
}

.btn-view-pacs i {
    font-size: 16px;
}

/* Section C: Reporting Template */
.reporting-template-section {
    background: #ffffff;
}

.template-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.template-dropdown-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.template-dropdown-wrapper label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.select-wrapper {
    position: relative;
}

.select-enhanced {
    width: 100%;
    padding: 12px 40px 12px 16px;
    background: #ffffff;
    border: 1px solid #e5e9f2;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s;
}

.select-enhanced:hover {
    border-color: #556ee6;
}

.select-enhanced:focus {
    outline: none;
    border-color: #556ee6;
    box-shadow: 0 0 0 3px rgba(85, 110, 230, 0.1);
}

.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #74788d;
    pointer-events: none;
    font-size: 12px;
}

/* Report Editor Container */
.report-editor-container {
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

/* Editor Toolbar */
.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px;
    background: #f8f9fc;
    border-bottom: 1px solid #e5e9f2;
    flex-wrap: wrap;
}

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #ffffff;
    border: 1px solid #e5e9f2;
    border-radius: 4px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.toolbar-btn:hover {
    background: #556ee6;
    color: #ffffff;
    border-color: #556ee6;
}

.toolbar-btn.active {
    background: #556ee6;
    color: #ffffff;
    border-color: #556ee6;
}

.toolbar-separator {
    width: 1px;
    height: 24px;
    background: #e5e9f2;
    margin: 0 4px;
}

/* Report Sections */
.report-sections {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.report-section {
    border-bottom: 1px solid #e5e9f2;
}

.report-section:last-child {
    border-bottom: none;
}

.section-label {
    display: block;
    padding: 12px 16px;
    background: #f8f9fc;
    font-size: 13px;
    font-weight: 600;
    color: #2f3a4f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e5e9f2;
}

.editor-content {
    min-height: 150px;
    padding: 16px;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    outline: none;
    background: #ffffff;
}

.editor-content:focus {
    background: #fafbfc;
}

.editor-content:empty:before {
    content: attr(data-placeholder);
    color: #98a6ad;
    font-style: italic;
}

/* Section D: Previous Comparison */
.previous-comparison-section {
    background: #ffffff;
}

.previous-comparison-content {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.btn-view-previous {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #6c757d;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-view-previous:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-view-previous i {
    font-size: 16px;
}

/* Section E: Workflow Actions */
.workflow-actions-section {
    background: #ffffff;
}

.workflow-actions-content {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-workflow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-save-draft {
    background: #6c757d;
    color: #ffffff;
}

.btn-save-draft:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-finalize-report {
    background: #34c38f;
    color: #ffffff;
}

.btn-finalize-report:hover {
    background: #2db37d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 195, 143, 0.3);
}

.btn-cancel {
    background: #f46a6a;
    color: #ffffff;
}

.btn-cancel:hover {
    background: #e55a5a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 106, 106, 0.3);
}

.btn-workflow i {
    font-size: 14px;
}

/* Section F: Audit & Compliance Info */
.audit-section {
    background: #f8f9fc;
}

.audit-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.audit-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.audit-field label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.audit-field .form-control {
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #e5e9f2;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    transition: all 0.2s;
}

.audit-field .form-control:focus {
    outline: none;
    border-color: #556ee6;
    box-shadow: 0 0 0 3px rgba(85, 110, 230, 0.1);
}

.audit-field .form-control[readonly] {
    background: #f8f9fc;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .patient-info-grid,
    .audit-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .patient-info-grid,
    .audit-info-grid {
        grid-template-columns: 1fr;
    }
    
    .workflow-actions-content {
        flex-direction: column;
    }
    
    .btn-workflow {
        width: 100%;
        justify-content: center;
    }
    
    .editor-toolbar {
        justify-content: center;
    }
}

