/* ==================== report.css ==================== */
/* 보고서 화면 전용 스타일 */

/* ========== 보고서 레이아웃 ========== */
#reportScreen .main-content {
    display: grid;
    grid-template-columns: 1fr 650px 260px;
    gap: 16px;
    padding: 20px;
}

/* 1/3: 코멘트 섹션 (좌측) */
.report-comment-section {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow);
    height: calc(100vh - 80px);
}

/* 2/3: 미리보기 섹션 (중앙) */
.report-preview-section {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow);
    height: calc(100vh - 80px);
}

/* 3/3: 진단 리스트 섹션 (우측) */
.report-list-section {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow);
    height: calc(100vh - 80px);
}

/* ========== 보고서 작업 영역 ========== */
.report-workspace {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    min-height: 400px;
}

.report-workspace h2 {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 16px;
    font-weight: 600;
}

.report-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.report-placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.report-placeholder-text {
    font-size: 14px;
    line-height: 1.6;
}

/* ========== 보고서 옵션 패널 ========== */
.report-options {
    background: var(--surface);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.report-options h3 {
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: 600;
}

/* ========== 진단 히스토리 아이템 (보고서용) ========== */
.report-record-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.report-record-item:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(106, 59, 255, 0.15);
}

.report-record-item.selected {
    background: #f0ebff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(106, 59, 255, 0.2);
}

.report-record-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.report-record-content {
    flex: 1;
    min-width: 0;
}

.report-record-date {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
    color: var(--text);
}

.report-record-info {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ========== 미리보기 영역 1:1 표시 ========== */
.report-preview-section #reportPreview {
    overflow: hidden;
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 8px;
}

.report-preview-section #reportPreview > div {
    /* A4 크기를 650px에 맞춤 - 스크롤 없이 전체 표시 */
    transform: scale(0.70);
    transform-origin: top center;
    margin-bottom: 0;
}

/* ========== 인쇄 최적화 (통합) ========== */
@media print {
    /* 페이지 설정 */
    @page {
        size: A4;
        margin: 0;
    }
    
    /* 숨길 요소들 */
    .sidebar,
    .report-comment-section,
    .report-list-section,
    .items-header-row,
    #reportScreen .items-section,
    button {
        display: none !important;
    }
    
    /* 미리보기만 전체 페이지로 */
    #reportScreen .main-content {
        display: block !important;
        padding: 0 !important;
        margin: 0;
    }
    
    .report-preview-section {
        height: auto;
        max-height: none;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
        background: white;
    }
    
    #reportPreview {
        background: white;
        display: flex;
        justify-content: center;
        align-items: flex-start;
    }
    
    #reportPreview > div {
        transform: scale(1) !important; /* 인쇄 시 원본 크기 */
        transform-origin: top center;
    }
}