/* PC & Tablet Only - Minimum Screen Size */

/* 최소 화면 크기 제한 */
body {
    min-width: 1024px;
}

/* 작은 화면 경고 메시지 */
@media screen and (max-width: 1023px) {
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.95);
        z-index: 99999;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    body::after {
        content: '⚠️ 이 시스템은 PC 또는 태블릿 환경에서만 사용 가능합니다.\A\A최소 화면 크기: 1024px 이상\A현재 화면 크기가 너무 작습니다.\A\APC 또는 태블릿을 사용해주세요.';
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: white;
        color: #333;
        padding: 40px;
        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.3);
        z-index: 100000;
        text-align: center;
        font-size: 16px;
        line-height: 1.8;
        white-space: pre-line;
        max-width: 90%;
        font-family: 'Noto Sans KR', sans-serif;
    }
    
    /* 모든 내용 숨기기 */
    .emr-header,
    .emr-container,
    .emr-sidebar,
    .emr-content,
    #timelineNavigator,
    .sidebar-toggle-btn {
        display: none !important;
    }
}

/* 태블릿 최적화 (1024px ~ 1366px) */
@media screen and (min-width: 1024px) and (max-width: 1366px) {
    :root {
        --sidebar-width: 260px;
        --header-height: 70px;
    }
    
    .hospital-name {
        font-size: 18px;
    }
    
    .menu-item {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .submenu li {
        padding: 9px 18px 9px 50px;
        font-size: 12px;
    }
}

/* 데스크탑 최적화 (1367px ~ 1920px) */
@media screen and (min-width: 1367px) and (max-width: 1920px) {
    /* 기본 설정 유지 */
}

/* 대형 모니터 최적화 (1920px 이상) */
@media screen and (min-width: 1921px) {
    :root {
        --sidebar-width: 320px;
        --header-height: 90px;
    }
    
    body {
        font-size: 15px;
    }
    
    .hospital-name {
        font-size: 22px;
    }
    
    .menu-item {
        padding: 14px 22px;
        font-size: 15px;
    }
    
    .submenu li {
        padding: 11px 22px 11px 60px;
        font-size: 14px;
    }
    
    .content-header h2 {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 18px;
    }
}

/* 프린트 최적화 */
@media print {
    .emr-header,
    .emr-sidebar,
    .sidebar-toggle-btn,
    #timelineNavigator,
    .content-actions {
        display: none !important;
    }
    
    .emr-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    body {
        min-width: auto;
        background: white;
    }
}

/* 가로 스크롤 방지 */
html, body {
    overflow-x: hidden;
}

/* 선택 방지 (의료 데이터 보호) */
.emr-sidebar,
.menu-item {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 의료 데이터는 선택 가능 */
.content-body,
.info-value,
.data-table {
    user-select: text;
    -webkit-user-select: text;
}
