body {
    font-family: 'Noto Sans KR', sans-serif;
    -webkit-tap-highlight-color: transparent; /* 모바일에서 클릭 시 하이라이트 제거 */
}

/* 커스텀 스크롤바 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 페이지 전환 효과 */
.page {
    display: none;
    animation: fadeIn 0.5s;
}
.page.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#save-success-toast {
    transition: opacity 0.5s ease-in-out;
}

/* 토글 스위치 스타일 */
.toggle-checkbox {
    transition: transform 0.2s ease-in-out;
    left: 0;
}
.toggle-checkbox:checked {
    transform: translateX(1rem); /* w-10 (2.5rem) - w-6 (1.5rem) = 1rem */
}
.toggle-checkbox:checked + .toggle-label {
    background-color: #0d9020; /* brand-green */
}

/* 생활관 전환 토글 버튼 */
.dorm-toggle-btn {
    transition: all 0.3s ease;
}

/* 근무일지 폼 textarea 높이 조절 */
#daily-log-form-page textarea {
    height: 2rem; /* 기본 textarea 높이를 한 줄 분량으로 축소 */
    min-height: 2rem;
    padding-top: 2px;
    padding-bottom: 2px;
    vertical-align: middle; /* 텍스트 세로 중앙 정렬 */
}
/* 의약품 사용 상황 칸 높이 조절 (여러 줄 입력용) */
#daily-log-form-page #log-medicine {
    height: 8.2rem; /* 4줄 높이에 맞춰 조절 */
}

.log-table th, .log-table td {
    padding: 2px 4px;
}

/* --- Quill Editor 스타일 수정 (최종) --- */
#log-counseling-editor {
    min-height: 10rem;
}
.ql-editor {
    min-height: 10rem;
}

/* 특수기호 버튼 아이콘 보이게 수정 */
.ql-snow .ql-toolbar button.ql-specialChar {
    font-size: 1.2em !important;
    width: 28px !important;
    padding: 3px 5px !important;
}
.ql-snow .ql-toolbar button.ql-specialChar::after {
    content: "※" !important; /* 아이콘으로 사용할 문자 */
    color: #444 !important; /* 아이콘 색상 명시 */
}

/* 폰트 크기 드롭다운 레이블 수정 */
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
.ql-snow .ql-picker.ql-size .ql-picker-option::before {
    content: attr(data-value) !important;
}
/* 선택되지 않았을 때(기본값) 표시될 텍스트 */
.ql-snow .ql-picker.ql-size .ql-picker-label:not([data-value])::before {
    content: '12pt';
}

/* 각 폰트 크기 옵션의 미리보기 글자 크기 설정 */
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="8pt"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="8pt"]::before {
  content: "8pt";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="10pt"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="10pt"]::before {
  content: "10pt";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="12pt"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="12pt"]::before {
  content: "12pt";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="14pt"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="14pt"]::before {
  content: "14pt";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="18pt"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="18pt"]::before {
  content: "18pt";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="24pt"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="24pt"]::before {
  content: "24pt";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="36pt"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="36pt"]::before {
  content: "36pt";
}

/* --- 인쇄 미리보기 화면 전용 스타일 --- */
#print-content-wrapper .print-container {
    background: white;
    width: 210mm;
    /* height: 297mm; */ /* 고정 높이 제거하여 내용 넘칠 때 다음 페이지로 */
    min-height: 297mm; /* 최소 높이 유지 */
    margin: 0 auto 20px auto;
    padding: 15mm;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    overflow: hidden; /* 미리보기에서는 넘치는 내용 숨김 */
    box-sizing: border-box;
}

#print-content-wrapper .print-container h1 {
    text-align: center;
    font-size: 20pt;
    font-weight: bold;
    margin-top: 60px !important;
}

#print-content-wrapper .print-container:last-child {
    margin-bottom: 0;
}


/* --- 인쇄 전용 스타일 --- */
@media print {
    body > *:not(#printable-area) {
        display: none !important;
    }

    #printable-area {
        display: block !important;
        position: static;
    }
    .print-container {
        padding: 15mm;
        page-break-inside: avoid !important;
        box-sizing: border-box;
        box-shadow: none !important;
        margin: 0 !important;
        height: auto !important; /* 인쇄 시 높이 자동 조절 */
        min-height: 0 !important; /* 최소 높이 제거 */
        overflow: visible !important; /* 내용 보이도록 */
    }
     .print-container h1 {
        text-align: center;
        font-size: 20pt;
        font-weight: bold;
        margin-top: 60px !important;
    }

    /* [수정] 인쇄 시 결재란 서명이 보이도록 해당 숨김 규칙 삭제 */
    /*
    .print-container .approval-table img,
    .print-container .approval-table span {
        visibility: hidden !important;
    }
    */

     /* 테이블 선은 보이도록 유지 */
    .print-container .approval-table td {
        border: 1px solid black !important;
    }


    @page {
        size: A4;
        margin: 0;
    }
}

/* --- 스프레드시트 스타일 (Jspreadsheet) --- */
/* [수정] 너비 100% 강제 설정을 제거하여 중앙 정렬이 가능하도록 함 */
.jexcel_container {
    /* width: 100% !important; */ 
}
.jexcel_content {
    box-shadow: none !important;
}