/* ========================================
   통합기록조회 화면 스타일
   영상검사 & 일일 경과기록 통합조회
   ======================================== */

/* 통합뷰 컨테이너 */
.unified-view-container {
    padding: 0;
    max-width: 100%;
}

/* 통합 헤더 */
.unified-header {
    background: #ffffff;
    border-bottom: 2px solid #0066cc;
    padding: 24px;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.unified-title-section {
    margin-bottom: 20px;
}

.unified-title-section h2 {
    font-size: 22px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.unified-title-section h2 i {
    color: #0066cc;
}

.unified-subtitle {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

/* Case Replay 버튼 */
.case-replay-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff6f00 0%, #ff5722 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(255, 111, 0, 0.2);
}

.case-replay-btn:hover {
    background: linear-gradient(135deg, #ff5722 0%, #e64a19 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.3);
}

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

.case-replay-btn i {
    font-size: 16px;
}

/* 필터 영역 */
.unified-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 6px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group label i {
    color: #0066cc;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-select:hover {
    border-color: #0066cc;
}

.filter-select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* 통계 요약 */
.unified-stats {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
}

.stat-card {
    flex: 0 0 auto;
    padding: 12px 20px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    border-radius: 6px;
    text-align: center;
    min-width: 120px;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* 타임라인 */
.unified-timeline {
    padding: 0 24px 24px 24px;
}

/* 타임라인 그룹 헤더 */
.timeline-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 32px 0 16px 0;
    padding: 12px 0;
    position: relative;
}

.timeline-group-header:first-child {
    margin-top: 8px;
}

.hd-badge {
    flex-shrink: 0;
    padding: 6px 16px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #ffffff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.hd-date {
    flex-shrink: 0;
    font-size: 15px;
    font-weight: 600;
    color: #212529;
}

.hd-line {
    flex-grow: 1;
    height: 2px;
    background: linear-gradient(to right, #dee2e6 0%, transparent 100%);
}

/* ========================================
   영상검사 카드 스타일
   ======================================== */

.imaging-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s;
}

.imaging-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 영상검사 카드 헤더 */
.imaging-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f8f9fa;
}

.imaging-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.imaging-type-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}

.imaging-type-badge.ct {
    background: #e3f2fd;
    color: #1976d2;
}

.imaging-type-badge.cta {
    background: #f3e5f5;
    color: #7b1fa2;
}

.imaging-type-badge.mri {
    background: #e8f5e9;
    color: #388e3c;
}

.imaging-name {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

.priority-badge.stat {
    padding: 4px 10px;
    background: #dc3545;
    color: #ffffff;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.imaging-time {
    font-size: 14px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 영상검사 메타 정보 */
.imaging-card-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #495057;
}

.meta-item i {
    color: #0066cc;
    width: 16px;
}

/* 영상검사 소견 */
.imaging-card-findings {
    margin-bottom: 16px;
}

.findings-label,
.impression-label {
    font-size: 13px;
    font-weight: 700;
    color: #495057;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.findings-label i,
.impression-label i {
    color: #0066cc;
}

.findings-content,
.impression-content {
    padding: 12px;
    background: #f8f9fa;
    border-left: 3px solid #0066cc;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    color: #212529;
}

/* 영상검사 결론 */
.imaging-card-impression {
    margin-bottom: 16px;
}

.impression-content {
    background: #e3f2fd;
    border-left-color: #1976d2;
    font-weight: 500;
}

/* 영상검사 푸터 */
.imaging-card-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid #f8f9fa;
}

.status-badge.completed {
    padding: 6px 12px;
    background: #d4edda;
    color: #155724;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ========================================
   일일 경과기록 카드 스타일
   ======================================== */

.progress-note-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-left: 4px solid #0066cc;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 경과기록 카드 헤더 */
.progress-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f8f9fa;
}

.progress-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.progress-time {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 6px;
}

.progress-shift {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.progress-shift.day {
    background: #fff3cd;
    color: #856404;
}

.progress-shift.night {
    background: #d1ecf1;
    color: #0c5460;
}

.progress-format-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.progress-format-badge.soap {
    background: #e3f2fd;
    color: #1976d2;
}

.progress-format-badge.dar {
    background: #f3e5f5;
    color: #7b1fa2;
}

.progress-nurse {
    font-size: 13px;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 키 포인트 */
.progress-key-points {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 10px;
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    border-radius: 4px;
}

.progress-key-points i {
    color: #ff9800;
}

.key-point {
    padding: 4px 8px;
    background: #ffffff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #495057;
}

/* SOAP 형식 */
.soap-format {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.soap-section {
    display: flex;
    gap: 12px;
}

.soap-label {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.soap-label.s {
    background: #4CAF50;
}

.soap-label.o {
    background: #2196F3;
}

.soap-label.a {
    background: #FF9800;
}

.soap-label.p {
    background: #9C27B0;
}

.soap-content {
    flex-grow: 1;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    color: #212529;
}

/* DAR 형식 */
.dar-format {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dar-section {
    display: flex;
    gap: 12px;
}

.dar-label {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.dar-label.d {
    background: #E91E63;
}

.dar-label.a {
    background: #00BCD4;
}

.dar-label.r {
    background: #673AB7;
}

.dar-content {
    flex-grow: 1;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    color: #212529;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 16px;
    margin: 0;
}

/* 반응형 */
@media (max-width: 1200px) {
    .unified-filters {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .unified-stats {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .unified-filters {
        grid-template-columns: 1fr;
    }
    
    .imaging-card-meta {
        grid-template-columns: 1fr;
    }
    
    .soap-section,
    .dar-section {
        flex-direction: column;
    }
    
    .soap-label,
    .dar-label {
        align-self: flex-start;
    }
}
