/* Pretendard Variable - 병원 내부망은 외부 CDN이 막힐 수 있어 우리 서버에서 직접
   서빙한다(server/app/static/fonts/, SIL OFL 1.1 라이선스 - 같은 폴더의
   Pretendard-LICENSE.txt 참고). 원본 CDN이 쓰는 "dynamic-subset"(요청마다 필요한
   글자만 잘라 여러 파일로 나눠주는 방식)은 그 자체가 외부 서버 왕복이 필요해서 대신
   전체 글자를 담은 단일 파일(pretendardvariable.css의 비-subset 버전과 동일 구성)을 쓴다. */
@font-face {
  font-family: 'Pretendard Variable';
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/PretendardVariable.woff2') format('woff2-variations');
}

:root {
  /* 2026-07 리디자인(Claude Design 목업 참고) 팔레트 */
  --teal: #0f7a72;
  --teal-dark: #0a5c58;
  --teal-light: #eaf3f1;
  --teal-light2: #dcefec;
  --teal-text: #3f6b66;
  --teal-text2: #4f7a74;
  --orange: #f59f1e;
  --orange-hover: #e08f10;
  --bg: #f2f5f4;
  --surface: #ffffff;
  --border: #e4eae8;
  --border-light: #edf1f0;
  --text: #20312f;
  --text-muted: #6b8683;
  --text-faint: #8aa19d;
  --danger: #c0504a;
  --danger-bg: #fdf6f5;
  --danger-border: #f3d9d6;
  --surface-tint: #f6faf9;
}

* {
  box-sizing: border-box;
}

#broadcast-toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.broadcast-toast {
  background: white;
  border-left: 6px solid var(--orange);
  border-radius: 6px;
  padding: 14px 18px;
  min-width: 260px;
  max-width: 340px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  animation: broadcastToastIn 0.25s ease;
}

/* 4초 뒤 저절로 닫히는 커스텀 안내 팝업 - 네이티브 alert()는 "확인"을 눌러야만 닫혀서
   자동으로 닫히게 만들 수 없어 대신 쓴다. 눌러서 바로 닫을 수도 있다. */
.auto-dismiss-alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.15);
  z-index: 9999;
  pointer-events: none;
}

.auto-dismiss-alert-box {
  background: white;
  padding: 20px 28px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  max-width: 400px;
  pointer-events: auto;
  cursor: pointer;
}

.broadcast-toast-title {
  font-weight: bold;
  color: var(--teal);
  margin-bottom: 4px;
}

.broadcast-toast-message {
  font-size: 13px;
  color: var(--text);
  white-space: pre-wrap;
}

@keyframes broadcastToastIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  margin: 0;
  font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Noto Sans KR', "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
}

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--teal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M26 14h8v12h12v8H34v12h-8V34H14v-8h12z'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(135deg, #063c38 0%, #0f7a72 50%, #14a196 100%);
  background-repeat: repeat, no-repeat;
  background-size: 60px 60px, cover;
}

.login-card {
  position: relative;
  background: var(--surface);
  padding: 40px 44px 36px;
  border-radius: 22px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
  width: 320px;
  text-align: center;
}

.login-refresh-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
  opacity: 0.4;
}

.login-refresh-btn:hover {
  opacity: 0.9;
}

.login-logo {
  max-width: 150px;
  width: 100%;
  height: auto;
  margin-bottom: 4px;
}

/* "원무팀" 글씨를 로고 쪽으로 더 붙여 위로 올려달라는 요청 - 로고의 margin-bottom을
   줄여서 제목만 위로 당겼다(부제 "업무보조 프로그램" 쪽 간격은 그대로 둠). */
.login-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--teal-dark);
  margin: 0;
}

.login-subtitle {
  font-size: 17px;
  font-weight: 700;
  color: var(--orange);
  margin: 12px 0 22px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-form input,
.login-form select {
  padding: 0 14px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
}

.login-form input:focus,
.login-form select:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--surface);
}

.login-unit-pickers {
  display: flex;
  gap: 10px;
}

.login-name-picker {
  position: relative;
  flex: 1;
  min-width: 0;
}

.login-name-display {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg);
  cursor: pointer;
}

.login-name-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  margin: 2px 0 0;
  padding: 4px 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  /* 이름 9명 정도(1명당 38px)까지는 그대로 보이고, 그 밑은 스크롤해서 본다 */
  max-height: 342px;
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.login-name-list li {
  padding: 9px 14px;
  cursor: pointer;
  font-size: 14px;
}

.login-name-list li:hover {
  background: var(--teal-light);
}

.login-type-buttons {
  display: flex;
  gap: 10px;
}

.login-type-btn {
  flex: 1;
  height: 42px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  font-size: 14px;
  color: white;
  transition: opacity 0.15s ease;
}

.login-type-btn[data-login-type="office"] {
  background: var(--teal);
}

.login-type-btn[data-login-type="counter"] {
  background: var(--orange);
}

.login-type-btn:hover {
  opacity: 0.9;
  transform: none;
}

.login-form button {
  padding: 10px;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.error {
  color: #c0392b;
  font-size: 13px;
  min-height: 16px;
  margin: 0;
}

.app {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  height: 64px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.app-title-wrap {
  display: flex;
  align-items: center;
  min-width: 230px;
}

.app-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--teal-dark);
  white-space: nowrap;
}

.wiki-search-box {
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid #555555;
  border-radius: 12px;
  padding: 0 14px;
  height: 40px;
  transition: border-color 0.15s ease;
}

.wiki-search-box:focus-within {
  border-color: var(--teal);
}

.wiki-search-icon {
  color: var(--text-faint);
  font-size: 15px;
  line-height: 1;
}

.wiki-search {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  padding: 0;
}

.header-spacer {
  flex: 1;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--teal-light);
  border-radius: 999px;
  padding: 5px 12px 5px 6px;
}

.header-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--teal);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}

.header-user-photo {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.header-user-photo:hover {
  transform: scale(1.12);
}

#current-user-name {
  font-size: 13px;
  font-weight: 650;
  color: var(--teal-dark);
  white-space: nowrap;
}

.header-icon-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-icon-group .icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
}

.header-user button {
  background: var(--orange);
  color: white;
  border: none;
  height: 38px;
  padding: 0 18px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(245, 159, 30, 0.3);
  transition: background 0.15s ease, transform 0.15s ease;
}

.header-user button:hover {
  background: var(--orange-hover);
  transform: none;
}

.header-user .icon-btn {
  background: transparent;
  color: var(--text-muted);
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.header-user .icon-btn:hover {
  background: var(--bg);
  transform: none;
}

/* "버튼식으로 눌리는" 아이콘 이모지는 hover하면 세로축을 기준으로 카드 뒤집히듯
   "수평으로" 돈다(평면 회전인 rotate() 말고 rotateY()) - perspective는 회전하는
   요소 자신이 아니라 부모(버튼)에 줘야 입체감이 생겨서, 아이콘을 항상
   <span class="icon-flip">로 한 번 더 감싸고 그 span에만 회전을 건다(버튼
   배경/테두리까지 같이 돌면 어색함). 헤더 아이콘 버튼 4개, 로그인 새로고침
   버튼에 공통으로 적용 - 사이드바 메뉴/유틸리티 아이콘은 아래 별도 규칙 참고. */
.icon-flip {
  display: inline-block;
}

@keyframes icon-flip-horizontal {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(360deg);
  }
}

.header-icon-group .icon-btn,
.login-refresh-btn {
  perspective: 200px;
}

.header-icon-group .icon-btn:hover .icon-flip,
.login-refresh-btn:hover .icon-flip {
  animation: icon-flip-horizontal 0.6s ease;
}

.header-user .icon-btn.new-version-available {
  background: #c0392b;
  color: white;
  border-radius: 50%;
}

.header-user .icon-btn.zoom-toggle-active {
  background: #1565c0;
  color: white;
  border-radius: 50%;
}

.new-version-label {
  color: #c0392b;
  font-weight: bold;
  font-size: 13px;
  white-space: nowrap;
  animation: new-version-blink 1s infinite;
}

@keyframes new-version-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.login-type-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--teal-text2);
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.app-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.side-menu {
  width: 212px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 14px 12px 12px;
  flex-shrink: 0;
}

.side-menu-items {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-item-icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
  opacity: 0.85;
}

.sidebar-clock {
  flex: none;
  margin-top: 12px;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
  background: var(--teal-light);
  border-radius: 14px;
  padding: 12px 14px;
  text-align: center;
}

.sidebar-clock-date {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.sidebar-clock-time-row {
  margin-top: 2px;
}

.sidebar-clock .sidebar-clock-time {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--teal-dark);
  font-variant-numeric: tabular-nums;
}

.sidebar-clock-weather-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  cursor: pointer;
}

.sidebar-clock-weather-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: var(--surface);
  border-radius: 10px;
  padding: 6px 0;
}

.sidebar-clock-weather-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-faint);
  text-align: center;
}

.sidebar-clock-weather-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.sidebar-clock-weather-icon {
  font-size: 13px;
}

.sidebar-clock-weather-temp {
  font-size: 11px;
  font-weight: 750;
  color: var(--teal-text);
  white-space: nowrap;
}

.sidebar-utilities {
  flex: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-utility-icons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

/* 전원종료/재부팅은 실수로 헷갈려 누르면 안 되는 버튼이라 넉넉히 떼어놓는다. */
.sidebar-utility-icons:last-child {
  grid-template-columns: repeat(2, 1fr);
}

.sidebar-utility-btn {
  position: relative;
  perspective: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  border-radius: 11px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
}

.sidebar-utility-btn:hover {
  background: var(--bg);
  transform: none;
}

/* 계산기/전원종료/재부팅(SVG)도 hover 시 수평으로 뒤집어달라는 요청으로, 이모지
   아이콘(그림판/메모장)만 예외 처리하던 :not()을 없애고 5개 전부에 적용한다. */
.sidebar-utility-btn:hover .sidebar-utility-icon {
  animation: icon-flip-horizontal 0.6s ease;
}

.sidebar-utility-icon {
  font-size: 14px;
  line-height: 1;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-utility-icon svg {
  width: 14px;
  height: 14px;
}

.sidebar-utility-icon-lg {
  height: auto;
}

.sidebar-utility-icon-lg svg {
  width: 15px;
  height: 15px;
}

/* 전원종료/재부팅은 같은 전원 버튼 모양(SVG)을 쓰고 색으로만 구분한다.
   폰트에 없는 유니코드 기호(⏻)는 OS/폰트에 따라 아예 안 보이는 문제가 있어서
   이모지 대신 인라인 SVG를 쓴다 — stroke="currentColor"라 아래 color로 색이 그대로 입혀진다. */
.sidebar-utility-icon-shutdown {
  color: #cc0000;
}

.sidebar-utility-icon-restart {
  color: #1f5fbf;
}

.sidebar-utility-label {
  font-size: 10.5px;
  color: var(--teal-text2);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.menu-item {
  position: relative;
  perspective: 200px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 12px;
  border-radius: 11px;
  text-align: left;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--text);
  font-family: inherit;
  transition: background 0.12s ease;
}

.menu-item:hover .menu-item-icon {
  animation: icon-flip-horizontal 0.6s ease;
}

/* 예전 스타일(마우스 올리면 굵은 글씨 + 좌측 세로 바)을 복원 - 리디자인하며 한 번
   빠졌었는데 강주성이 다시 요청함. border-left로 하면 버튼 자체의 둥근 모서리를 따라
   위아래 끝이 뾰족하게 꺾여 보인다는 피드백이 있어서, 버튼과 별개로 독립된 캡슐 모양
   막대(::before)를 왼쪽에 겹쳐 그린다 - 자체 border-radius:999px라 위아래가 반달처럼
   둥글게 끊긴다. 평소엔 scaleY(0)로 접어뒀다가 hover 시에만 펼쳐진다. */
.menu-item::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 3px;
  height: 55%;
  border-radius: 999px;
  background: var(--teal);
  transform: translateY(-50%) scaleY(0);
  transition: transform 0.12s ease;
}

.menu-item:hover {
  background: #eef4f2;
  font-weight: 700;
  transform: none;
}

.menu-item:hover::before {
  transform: translateY(-50%) scaleY(1);
}

.menu-item:active {
  background: var(--teal-light2);
}

.menu-item.active {
  background: var(--teal);
  color: white;
  font-weight: 750;
}

/* 슈퍼관리자처럼 메뉴권한이 많이 열려 있어서 메뉴 목록 + 시계 + 하단 아이콘을 합친 높이가
   화면을 넘기는 계정만, JS(adjustSidebarMenuSize)가 실제로 넘치는지 재보고 이 클래스를 붙인다.
   메뉴가 적어 안 넘치는 계정은 원래 기본 크기 그대로 유지된다. */
.side-menu-compact .menu-item {
  height: 32px;
  font-size: 12.5px;
}

.side-menu-compact .sidebar-clock {
  padding: 8px 10px;
}

.side-menu-compact .sidebar-utilities {
  margin-top: 8px;
  padding-top: 8px;
}

.side-menu-compact .sidebar-utility-btn {
  padding: 5px 0;
}

.side-menu-compact .sidebar-utility-label {
  font-size: 9px;
}

/* 버튼 공통 hover/클릭 애니메이션: 마우스 올리면 살짝 커지고, 누르면 원래 크기로 줄었다가
   손을 떼면 다시 커진다. 아래 두 그룹은 예외:
   - 사이드바 메뉴(.menu-item)는 위에서 이미 다른 효과(좌측 테두리)를 쓰므로 확대 없음
   - 응급실진료 화면(.erguide-box 안) 버튼은 전부 확대 애니메이션 제외 */
button {
  transition: transform 0.15s ease;
}

button:hover {
  transform: scale(1.08);
}

button:active {
  transform: scale(1);
}

.menu-item:hover,
.menu-item:active,
.erguide-box button:hover,
.erguide-box button:active,
.news-ticker-badge:hover,
.news-ticker-badge:active,
.news-ticker-text:hover,
.news-ticker-text:active {
  transform: none;
}

/* 표/목록 안 수정·삭제, 캘린더 그리드의 +·× 버튼, 위키 문서 에디터 툴바(굵게/기울임 등),
   페이지네이션처럼 다닥다닥 붙어있는 작은 버튼들은 옆 버튼과 겹치지 않도록 더 작게 확대한다. */
.notice-edit-btn:hover,
.notice-delete-btn:hover,
.notice-page-btn:hover,
.category-add-child-btn:hover,
.category-rename-btn:hover,
.category-delete-btn:hover,
.claimreview-edit-btn:hover,
.claimreview-delete-btn:hover,
.cr-row-save-btn:hover,
.cr-row-cancel-btn:hover,
.phonebook-edit-btn:hover,
.phonebook-delete-btn:hover,
.pb-row-save-btn:hover,
.pb-row-cancel-btn:hover,
.form-preview-btn:hover,
.form-download-btn:hover,
.form-replace-btn:hover,
.form-restore-btn:hover,
.form-delete-btn:hover,
.schedule-download-btn:hover,
.schedule-delete-btn:hover,
.erduty-download-btn:hover,
.erduty-delete-btn:hover,
.reset-pw-btn:hover,
.delete-user-btn:hover,
.calendar-row-remove-btn:hover,
.calendar-add-row-btn:hover,
.autosend-add-row-btn:hover,
.rich-editor-toolbar button:hover {
  transform: scale(1.08);
}

.notice-edit-btn:active,
.notice-delete-btn:active,
.notice-page-btn:active,
.category-add-child-btn:active,
.category-rename-btn:active,
.category-delete-btn:active,
.claimreview-edit-btn:active,
.claimreview-delete-btn:active,
.cr-row-save-btn:active,
.cr-row-cancel-btn:active,
.phonebook-edit-btn:active,
.phonebook-delete-btn:active,
.pb-row-save-btn:active,
.pb-row-cancel-btn:active,
.form-preview-btn:active,
.form-download-btn:active,
.form-replace-btn:active,
.form-restore-btn:active,
.form-delete-btn:active,
.schedule-download-btn:active,
.schedule-delete-btn:active,
.erduty-download-btn:active,
.erduty-delete-btn:active,
.reset-pw-btn:active,
.delete-user-btn:active,
.calendar-row-remove-btn:active,
.calendar-add-row-btn:active,
.autosend-add-row-btn:active,
.rich-editor-toolbar button:active {
  transform: scale(1);
}

.content {
  flex: 1;
  padding: 26px 30px 40px;
  overflow-y: auto;
}

/* .wiki-toolbar를 안 쓰고 그냥 <h2>/<h3>만 있는 화면(메시지, 관리자 섹션 제목 등)도
   같은 제목 느낌을 갖도록 - .wiki-toolbar h2는 클래스 선택자라 이보다 우선한다. */
.content h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text);
  margin: 28px 0 14px;
}

.content h2:first-child {
  margin-top: 0;
}

#easter-egg-trigger {
  cursor: default; /* 이스터에그: 손가락 커서로 티나지 않게 일부러 기본 커서 유지 */
}

/* 이스터에그: 헤더의 "무" 글자를 누르면 나타나는 숨겨진 미니 브라우저.
   .content 영역(헤더 56px, 사이드바 160px 밖)을 덮고, 마우스가 그 위에 있을 때만 보인다.
   (main.js에서 마우스 좌표를 계속 계산해 이 클래스를 켜고 끈다). 우측/하단은 창 가장자리라
   왼쪽/위쪽(사이드바·헤더)과 달리 벗어날 여유 공간이 없어서, 일부러 여백(main.js의
   EASTER_EGG_EDGE_MARGIN_RIGHT/BOTTOM과 같은 값)을 두어 그쪽으로도 마우스를 옮기면 홈 화면이 보이게 한다. */
.easter-egg-browser {
  position: fixed;
  top: 56px;
  left: 160px;
  right: 300px;
  bottom: 45px;
  z-index: 500;
  display: none;
  flex-direction: column;
  background: white;
  box-shadow: 0 0 0 1px #ddd;
}

.easter-egg-browser.easter-egg-visible {
  display: flex;
}

.easter-egg-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: #f0f0f0;
  border-bottom: 1px solid #ccc;
  flex-shrink: 0;
}

.easter-egg-quick-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 4px;
  background: var(--teal);
  color: white;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}

.easter-egg-address {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#easter-egg-go-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 4px;
  background: var(--orange);
  color: white;
  cursor: pointer;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 34px;
  padding: 0 24px;
  font-size: 11px;
  color: var(--text-faint);
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.app-footer-info {
  text-align: right;
  flex-shrink: 0;
}

.news-ticker {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.news-ticker-badge {
  flex-shrink: 0;
  padding: 3px 8px;
  border: none;
  border-radius: 6px;
  background: var(--teal);
  color: white;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
}

.news-ticker-badge:hover {
  background: var(--teal-dark);
}

.news-ticker-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
  font-size: 12px;
  color: var(--text-muted);
  opacity: 1;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.news-ticker-text:hover {
  text-decoration: underline;
}

.news-ticker-text.news-ticker-text-fading {
  opacity: 0;
}

.news-ticker-meta {
  margin-left: 6px;
  font-size: 10px;
  color: var(--text-faint);
}

.news-list-box {
  width: 480px;
  max-height: 70vh;
}

.staff-photo-modal-box {
  position: relative;
  width: 600px;
  max-width: 90vw;
  border-radius: 12px;
  overflow: hidden;
  line-height: 0;
  background: #222;
}

.staff-photo-modal-img {
  display: block;
  width: 100%;
  height: auto;
}

.staff-photo-download-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}

.staff-photo-download-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.08);
}

.news-list-items {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.news-list-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 7px 6px;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  background: none;
  border: none;
  font-size: 13px;
  color: var(--text);
}

.news-list-item:hover {
  background: #f2f2f2;
}

.news-list-item-section {
  flex-shrink: 0;
  font-size: 11px;
  color: #e74c3c;
  font-weight: bold;
  width: 52px;
  padding-top: 1px;
}

.news-list-item-title-row {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.news-list-item-title {
  line-height: 1.4;
}

.news-list-item-meta {
  font-size: 11px;
  color: #999;
}

.message-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 480px;
}

.recipient-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.recipient-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
}

.message-form textarea {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  resize: vertical;
}

.message-form button {
  align-self: flex-start;
  height: 38px;
  padding: 0 20px;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  transition: background 0.15s ease;
}

.message-form button:hover {
  background: var(--orange-hover);
  transform: none;
}

.success {
  color: var(--teal);
  font-size: 13px;
  margin: 0;
}

.monthly-message-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
}

.month-picker-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.month-picker-row label {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.month-picker-row button {
  height: 34px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--teal-text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 650;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.month-picker-row button:hover {
  background: var(--bg);
  transform: none;
}

.upload-label {
  cursor: pointer;
}

.month-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.month-nav button {
  height: 34px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--teal-text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 650;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.month-nav button:hover {
  background: var(--bg);
  transform: none;
}

.month-nav-label {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--teal-dark);
  min-width: 100px;
  text-align: center;
}

.month-nav-jump {
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}

.danger-btn {
  background: var(--danger) !important;
}

.json-preview-block {
  margin-top: 24px;
}

.json-preview-block h4 {
  margin-bottom: 6px;
  color: #888;
  font-size: 13px;
}

.json-preview {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 14px;
  border-radius: 6px;
  font-size: 12px;
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.monthly-message-form textarea {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: "Consolas", monospace;
  font-size: 13px;
  resize: vertical;
}

.monthly-message-form > button {
  align-self: flex-start;
  height: 38px;
  padding: 0 20px;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  transition: background 0.15s ease;
}

.monthly-message-form > button:hover {
  background: var(--orange-hover);
  transform: none;
}

.admin-section {
  margin-bottom: 24px;
  max-width: 640px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 24px;
}

.admin-section-wide {
  max-width: none;
}

.admin-section h3 {
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 750;
  color: var(--teal-dark);
}

.admin-add-user-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.admin-add-user-row input,
.admin-add-user-row select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.admin-add-user-row button {
  padding: 8px 16px;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.diary-section {
  max-width: none;
}

.diary-mode-toggle {
  display: flex;
  gap: 8px;
}

.diary-view-btn {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--teal-text);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: background 0.15s ease;
}

.diary-view-btn:hover {
  background: var(--bg);
  transform: none;
}

.diary-view-btn.active {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

/* 월간/주간/일간 전환 버튼과 그 화면의 날짜 이동(전달/다음달 등)을 한 줄에 같이 둬서
   위 안내 문구와 버튼들이 너무 붙어 보이지 않게 한다. margin-top으로 안내 문구와의
   간격도 추가로 벌려둔다. */
.diary-nav-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 6px;
  margin-bottom: 6px;
}

/* 전달/다음달 그룹(.month-nav)이 왼쪽 월간/주간/일간 버튼에 붙어서 왼쪽으로 치우쳐 보이던 것을
   달력 가로 중앙에 오게 한다. 3단 그리드(왼쪽 1fr / 가운데 auto / 오른쪽 1fr)를 쓰면 왼쪽 버튼
   묶음의 실제 너비와 무관하게 가운데 칸이 행 전체 폭 기준으로 정중앙에 온다(flex:1 + auto margin
   방식은 왼쪽 그룹 너비만큼 오른쪽으로 쏠려서 이 방법으로 바꿈). 주간/일간 화면은 자기 날짜
   이동 버튼들을 .month-nav로 안 감싸서 이 규칙과 무관하게 기존 flex 정렬 그대로 유지된다.
   .month-nav 자체는 근무표/자동예약발송 화면에서도 쓰는 공용 클래스라 여기서만 덮어쓴다. */
.diary-nav-row:has(.month-nav) {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.diary-nav-row:has(.month-nav) .diary-mode-toggle {
  grid-column: 1;
  justify-self: start;
}

.diary-nav-row:has(.month-nav) .month-nav {
  grid-column: 2;
  justify-self: center;
}

.diary-nav-row:has(.month-nav) .hope-pending-count {
  grid-column: 3;
  justify-self: end;
}

.hope-pending-count {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  background: var(--orange);
  color: white;
  white-space: nowrap;
  cursor: pointer;
}

.hope-pending-count-none {
  background: #eee;
  color: #888;
  cursor: default;
}

.schedule-pending-count {
  margin-left: auto;
}

.diary-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.diary-header-row h2 {
  margin: 0 0 4px;
}

/* 미리보기를 6줄까지 보여주려고 칸 높이를 크게 늘린 만큼, 위쪽 여백을 최대한 줄여서
   달력 행이 가장 많은 달(6주)도 최대한 스크롤 없이 가깝게 들어오게 한다. */
.content:has(#diary-body) {
  padding-top: 6px;
  padding-bottom: 6px;
}

.diary-calendar thead th {
  padding: 4px 6px;
}

.diary-sync-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  background: var(--orange);
  color: white;
  cursor: pointer;
  font-weight: bold;
  font-size: 13px;
}

.diary-sync-btn:hover {
  opacity: 0.9;
}

.diary-nav-row button:not(.diary-view-btn) {
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  cursor: pointer;
}

.diary-nav-label {
  font-weight: bold;
  min-width: 140px;
  text-align: center;
}

.diary-week-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.diary-week-day {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  text-align: left;
}

.diary-week-day:hover {
  background: #eef6f7;
  border-color: var(--teal);
}

.diary-week-day.diary-today {
  border-color: var(--orange);
  box-shadow: inset 0 0 0 1px var(--orange);
}

.diary-week-day-label {
  flex-shrink: 0;
  width: 90px;
  font-weight: bold;
  font-size: 13px;
}

.diary-week-day-preview {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 월간 달력은 스크롤 없이 한 화면(최대 6주)에 다 들어오도록 칸 높이를 눌러둔다.
   table.diary-calendar td로 명시해서 뒤에 나오는 .schedule-calendar td(높이 88px)보다
   더 구체적인 선택자로 만들어야 우선 적용된다(선언 순서로는 그쪽이 더 뒤라 안 그러면 짐). */
table.diary-calendar td {
  height: 111px;
  vertical-align: top;
  padding: 3px 6px;
}

.diary-calendar .calendar-day-num {
  font-size: 13px;
  margin-bottom: 1px;
}

.diary-calendar td.diary-month-cell {
  cursor: pointer;
}

.diary-calendar td.diary-month-cell:hover {
  background: #eef6f7;
}

.diary-month-daynum-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.diary-month-daynum-row .diary-month-schedule-note {
  margin-left: auto;
}

.diary-month-schedule-note {
  font-size: 10px;
  font-weight: bold;
  color: var(--teal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 짙은 회색 + 작은 글씨로 칸 안에 미리보기를 보여주고, 길면 줄임표로 잘라낸다. */
.diary-month-preview {
  margin-top: 1px;
  font-size: 10px;
  color: #444;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
  white-space: pre-wrap;
}

.diary-week-schedule-note {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: bold;
  color: var(--teal);
}

.diary-day-schedule-note {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 4px;
  background: #eef6f7;
  color: var(--teal);
  font-weight: bold;
  font-size: 13px;
}

/* 근무 코드별 글자색: 2H=파란색, N=검정색, off=옅은 빨강, D(+당번)=초록색. 그 외 코드는 위 기본 teal 유지. */
.diary-month-schedule-note.diary-note-blue,
.diary-week-schedule-note.diary-note-blue,
.diary-day-schedule-note.diary-note-blue,
.hope-cell-schedule-note.diary-note-blue,
.calendar-schedule-note.diary-note-blue {
  color: #1a56db;
}

.diary-month-schedule-note.diary-note-black,
.diary-week-schedule-note.diary-note-black,
.diary-day-schedule-note.diary-note-black,
.hope-cell-schedule-note.diary-note-black,
.calendar-schedule-note.diary-note-black {
  color: #000;
}

.diary-month-schedule-note.diary-note-red-light,
.diary-week-schedule-note.diary-note-red-light,
.diary-day-schedule-note.diary-note-red-light,
.hope-cell-schedule-note.diary-note-red-light,
.calendar-schedule-note.diary-note-red-light {
  color: #e57373;
}

.diary-month-schedule-note.diary-note-green,
.diary-week-schedule-note.diary-note-green,
.diary-day-schedule-note.diary-note-green,
.hope-cell-schedule-note.diary-note-green,
.calendar-schedule-note.diary-note-green {
  color: #2e7d32;
}

/* 휴가신청 달력에도 다이어리처럼 날짜 옆에 본인 근무(D/off/2H/N 등)를 우측 정렬로 보여준다. */
.hope-cell-daynum-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.hope-cell-daynum-row .hope-cell-schedule-note {
  margin-left: auto;
}

.hope-cell-schedule-note {
  font-size: 10px;
  font-weight: bold;
  color: var(--teal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* -- 희망근무표 -- */

/* 사이드바 메뉴에 대기/조율중 신청이 있음을 알리는 주황색 음영. */
.menu-item.menu-item-hope-pending {
  background: var(--orange);
  color: white;
}

table.hope-calendar td {
  min-height: 70px;
  vertical-align: top;
  padding: 4px 6px;
}

.hope-cell-entry {
  margin-top: 3px;
  padding: 2px 3px;
  border-radius: 3px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hope-entry-delete-btn {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  line-height: 12px;
  padding: 0;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: white;
  color: #999;
  font-size: 11px;
  cursor: pointer;
}

.hope-entry-delete-btn:hover {
  background: #c0392b;
  border-color: #c0392b;
  color: white;
}

.hope-cell-leave-available {
  font-size: 10px;
  color: #1565c0;
  font-weight: bold;
  margin-top: 1px;
}

.hope-cell-entry-label {
  flex: 1;
  min-width: 0;
  font-size: 10px;
  font-weight: bold;
  color: #444;
  line-height: 1.3;
  overflow: hidden;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hope-status-select {
  flex-shrink: 0;
  padding: 1px 2px;
  font-size: 10px;
  border-radius: 3px;
  border: 1px solid #ccc;
  cursor: pointer;
}

/* 휴가신청 달력 칸 안에 들어가는 작은 드롭다운이라, 화면 전체 <select> 공용 스타일
   (.content select, height:40px)보다 우선하도록 선택자를 더 구체적으로 써서 원래
   크기를 지킨다 - 안 그러면 칸 안에서 위아래로 너무 커 보인다. */
.content select.hope-status-select {
  height: auto;
  padding: 1px 2px;
}

.hope-cell-active {
  cursor: pointer;
}

.hope-cell-active:hover {
  background: #eef6f7;
}

.hope-cell-disabled {
  background: #fafafa;
  color: #bbb;
}

.hope-cell-badge {
  margin-top: 4px;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 10px;
  line-height: 1.3;
  font-weight: bold;
  background: #eee;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.hope-cell-badge-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.hope-cell-badge-status {
  flex-shrink: 0;
  white-space: nowrap;
}

.hope-status-pending,
.hope-cell-badge.hope-status-pending {
  color: #777;
  background: #eee;
}

.hope-status-negotiating,
.hope-cell-badge.hope-status-negotiating {
  color: #1565c0;
  background: #e3f0fc;
}

.hope-status-confirmed,
.hope-cell-badge.hope-status-confirmed {
  color: #2e7d32;
  background: #e6f4e8;
}

.hope-status-rejected,
.hope-cell-badge.hope-status-rejected {
  color: #c0392b;
  background: #fbe6e4;
}

/* 관리자 화면(휴가신청)의 신청 칸 배경 - 새로 올라온(대기) 신청은 빨간색으로 눈에 띄게
   표시하고, 확정되면 더 이상 조치가 필요 없다는 뜻으로 무채색(회색)으로 가라앉힌다.
   .hope-status-pending 등 기본 규칙(뱃지/드롭다운용)보다 우선하도록 클래스 2개짜리
   선택자로 명시도를 높였다. */
.hope-cell-entry.hope-status-pending {
  background: #ffd9d9;
}
.hope-cell-entry.hope-status-pending .hope-cell-entry-label {
  color: #c0392b;
}

.hope-cell-entry.hope-status-negotiating {
  background: #e3f0fc;
}
.hope-cell-entry.hope-status-negotiating .hope-cell-entry-label {
  color: #1565c0;
}

.hope-cell-entry.hope-status-confirmed {
  background: #eee;
}
.hope-cell-entry.hope-status-confirmed .hope-cell-entry-label {
  color: #555;
}

.hope-cell-entry.hope-status-rejected {
  background: #fbe6e4;
}
.hope-cell-entry.hope-status-rejected .hope-cell-entry-label {
  color: #c0392b;
}

.hope-inline-form-slot:empty {
  display: none;
}

.hope-inline-form {
  margin-top: 6px;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: white;
  cursor: default;
}

.hope-inline-form h4 {
  margin: 0 0 4px;
  font-size: 12px;
}

.hope-inline-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
}

.hope-inline-form select {
  display: block;
  width: 100%;
  margin-top: 2px;
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 11px;
}

.hope-custom-time-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 6px;
}

.hope-time-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hope-time-field-label {
  font-size: 10px;
  font-weight: bold;
  color: #444;
}

.hope-time-picker {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 2px;
}

.hope-time-picker select {
  display: inline-block;
  width: auto;
  margin-top: 0;
  padding: 1px 1px;
  font-size: 9px;
}

.hope-time-unit-label {
  font-size: 9px;
  font-weight: bold;
  color: #444;
  white-space: nowrap;
}

.hope-apply-actions {
  display: flex;
  gap: 6px;
}

.hope-apply-actions button {
  flex: 1;
  padding: 4px 6px;
  font-size: 11px;
}

/* 근무표 달력 위에 얹는 확정된 희망근무 오버레이 - 원래 근무 코드 항목과는 색으로 구분. */
/* .calendar-entry(뒤에 선언된 기본 규칙)가 font-size/color를 덮어써버리지 않도록
   두 클래스를 합친 선택자로 우선순위를 올려둔다. */
.calendar-entry.calendar-hope-entry {
  font-size: 10px;
  font-weight: normal;
  color: #888;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

.pediatric-confirmed-by {
  margin-left: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.pediatric-row-done {
  opacity: 0.5;
}

.admin-table th,
.admin-table td {
  padding: 11px 22px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  font-size: 13px;
  color: var(--text);
}

.admin-table th {
  padding: 12px 22px;
  background: var(--surface-tint);
  color: var(--teal-text2);
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.2px;
  border-bottom: 1px solid var(--border);
}

.admin-table tbody tr:hover {
  background: #f8fbfa;
}

/* 관리자 페이지 사번 입력칸 - 실제 형식(영문 1자 + 숫자 6개, 총 7자)만 들어가면 충분한데
   기본 입력칸 크기(약 20자)가 그대로 적용돼 너무 커 보였다. PC/모바일 공통 규칙.
   전역 box-sizing: border-box 때문에 width 안에 테두리/여백까지 포함되므로, 9ch로도
   숫자 반 개 정도가 잘려서 11ch로 한 번 더 늘렸다. */
.employee-id-input {
  width: 11ch;
  padding: 2px 4px;
  font-size: 11px;
}

/* 사용자 관리 표 - 칸 사이 여백을 좁히고, 이름 칸이 좁아서 한 글자씩 세로로 줄바꿈되던
   것을 nowrap으로 막는다(한글은 칸이 좁으면 글자 단위로 줄바꿈되는 게 기본 동작이라
   "이름" 칸 폭이 좁으면 "강/주/성"처럼 세로로 쌓였었다). */
.user-admin-table th,
.user-admin-table td {
  padding: 8px 10px;
}
.user-admin-name-cell {
  white-space: nowrap;
  min-width: 3.5em;
  padding-right: 0;
}
.user-admin-empid-cell {
  padding-left: 0;
}
.gender-select {
  font-size: 11px;
}

/* "비밀번호 초기화"/"삭제" 버튼이 옆으로 나란히 있으면 칸 폭이 넓어져야 해서, 사용자
   관리 표에서는 위아래로 쌓아 좁은 칸에도 들어가게 한다. */
.user-admin-table .admin-table-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.user-admin-table .admin-table-actions button {
  margin-right: 0;
}

/* 여러 화면(원내전화번호/청구심사코드/소아과접수/서식/관리자)의 표를 감싸는 흰 카드
   래퍼 - 목업의 <section style="background:#fff;border:1px solid #e4eae8;
   border-radius:18px;overflow:hidden"> 패턴을 재사용한다. */
.card-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}

/* 목록/표가 비어있을 때 쓰는 공용 빈 상태 안내(소아과접수 등) - 표 안(td)에서 쓸 때도
   있어 border-bottom 등 표 스타일을 상속받지 않도록 padding/텍스트 정렬을 자체적으로 갖는다. */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 64px 0;
}

.empty-state-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.empty-state-title {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--text-muted);
}

.empty-state-desc {
  font-size: 12px;
  color: var(--text-faint);
}

/* 원내전화번호 표는 헤더 줄(구분/위치/...)만 고정하고 그 아래 목록만 스크롤되게 한다 -
   .admin-table은 다른 화면(소아과접수 등)에서도 쓰므로 이 컨테이너 안에서만 적용되게
   id로 범위를 좁혔다. */
#phonebook-results-container {
  max-height: 640px;
  min-height: 300px;
  overflow: hidden auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}

#phonebook-results-container .admin-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* 청구심사코드는 화면(.content)에 남는 세로 공간을 정확히 다 채우도록 flex로 키운다 -
   vh 기반 어림값(예: calc(100vh - 380px)) 대신 .claimreview-page를 .content 높이에
   꽉 채우고(height:100%), 표 영역만 flex:1로 나머지 공간을 전부 차지하게 했다. .content가
   진짜 높이(app-header/app-footer를 뺀 나머지)를 이미 flex로 갖고 있어서, 이렇게 하면
   창 크기가 달라져도 항상 기본창을 벗어나지 않고(넘치는 부분만 내부에서 스크롤),
   푸터의 버전 정보도 항상 그대로 보인다. */
.claimreview-page {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#claimreview-results-container {
  max-height: 640px;
  min-height: 0;
  overflow: hidden auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}

#claimreview-results-container .admin-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.pb-sortable-th {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.pb-sortable-th:hover {
  background: #00565f;
}

.claimreview-dept-tag {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: white;
  text-align: center;
  white-space: nowrap;
}

.claimreview-dept-ped {
  background-color: #3b82f6;
}

.claimreview-dept-obgyn {
  background-color: #ec4899;
}

.claimreview-dept-im {
  background-color: #10b981;
}

.menu-permission-grid {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 4px 14px;
}

.menu-permission-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}

.cr-input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}

.admin-table-actions button {
  padding: 4px 10px;
  margin-right: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 12px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.wiki-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.wiki-toolbar h2 {
  margin: 0;
  flex: 1;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.wiki-toolbar button {
  height: 38px;
  padding: 0 18px;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(245, 159, 30, 0.3);
  transition: background 0.15s ease, transform 0.15s ease;
}

.wiki-toolbar button:hover {
  background: var(--orange-hover);
  transform: none;
}

.wiki-toolbar button.active {
  background: var(--teal);
  box-shadow: none;
}

.wiki-toolbar button.active:hover {
  background: var(--teal-dark);
}

/* 보조 동작(즐겨찾기 토글/편집/JSON 업로드·다운로드 등)에 쓰는 흰 배경 버튼 - 목업의
   테두리만 있는 보조 버튼 스타일. 주 동작(orange 채움)과 시각적으로 구분한다. */
.wiki-toolbar button.btn-secondary {
  background: var(--surface);
  color: var(--teal-text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.wiki-toolbar button.btn-secondary:hover {
  background: var(--bg);
}

.wiki-toolbar button.btn-secondary.active {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

.wiki-toolbar #schedule-edit-controls {
  display: flex;
  gap: 8px;
}

.wiki-toolbar #schedule-cancel-btn {
  background: #999;
  box-shadow: none;
}

.wiki-category-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: white;
  border: 1px solid var(--teal);
  color: var(--teal);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  cursor: pointer;
}

.category-chip.active-chip {
  background: var(--teal);
  color: white;
}

.category-chip button {
  border: none;
  background: none;
  cursor: pointer;
  color: #999;
  font-size: 12px;
  padding: 0 2px;
}

.category-chip-add {
  border: 1px dashed var(--text-faint);
  border-radius: 999px;
  padding: 4px 10px;
  background: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
}

.wiki-doc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  max-height: 660px;
  overflow: hidden auto;
}

.wiki-doc-list li {
  padding: 4px 22px;
  border-bottom: 1px solid var(--border-light);
}

.wiki-doc-list li:last-child {
  border-bottom: none;
}

.wiki-doc-list-item {
  cursor: pointer;
}

.wiki-doc-list-item:hover {
  background: #f5f9f8;
}

.wiki-doc-list-item:hover .wiki-doc-link {
  color: var(--teal);
  text-decoration: underline;
}

.wiki-doc-list-item:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}

.wiki-doc-list-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wiki-doc-preview {
  display: flex;
  gap: 16px;
  padding: 0 0 6px;
  font-size: 12px;
  color: #999;
}

.wiki-phonebook-results {
  margin-top: 20px;
}

.wiki-phonebook-results-heading {
  font-size: 15px;
  margin: 0 0 8px;
  color: var(--teal);
}

.wiki-doc-link {
  display: inline-block;
  padding: 8px 0;
  font-size: 15px;
  color: var(--text);
  text-align: left;
}

.wiki-fav-star {
  color: var(--orange);
}

.wiki-doc-category {
  flex: none;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--teal-text2);
  background: var(--teal-light);
  border-radius: 999px;
  padding: 4px 11px;
}

.wiki-doc-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: white;
  vertical-align: middle;
}

.wiki-doc-badge-new {
  background: var(--orange);
}

.wiki-doc-badge-edit {
  background: var(--teal-light2);
  color: var(--teal-dark);
}

.wiki-actions {
  display: flex;
  gap: 8px;
  margin: 12px 0 20px;
}

.wiki-actions button {
  padding: 6px 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 13px;
}

.wiki-field {
  margin-bottom: 20px;
}

.wiki-field h3,
.wiki-field h4 {
  color: var(--teal);
  margin-bottom: 6px;
}

.wiki-field-content {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 12px;
  min-height: 24px;
}

/* 자유서술 본문은 조건/주의사항과 같은 .wiki-line-list 박스 안 첫 줄로 들어가므로
   (밑에 댓글이 바로 이어지는 다음 줄들로 보이도록), 자체 테두리는 없앤다 */
.wiki-freetext-row {
  display: block;
  padding: 0;
}

.wiki-freetext-row .wiki-field-content {
  border: none;
  border-radius: 0;
}

/* 조건/주의사항에 들어있던 이미지 - 줄 목록만으로는 표현이 안 되므로, 원래 있던 자리(어느
   줄 앞이었는지) 그대로 수정 불가능한 상태로 같이 보여준다(그림 자체는 enhanceWikiContent()가
   확대 버튼을 붙여줌). */
.wiki-line-image {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wiki-line-image img {
  max-width: min(700px, 100%);
}

/* 조건/주의사항 - 줄마다 수정 */

.wiki-line-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.wiki-line-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
}

.wiki-line-item:last-child {
  border-bottom: none;
}

.wiki-line-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.wiki-line-edit-btn {
  flex-shrink: 0;
  padding: 3px 10px;
  font-size: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  cursor: pointer;
}

.wiki-line-edit-input {
  flex: 1;
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid var(--teal);
  border-radius: 4px;
}

.wiki-line-save-btn,
.wiki-line-cancel-btn {
  flex-shrink: 0;
  padding: 3px 10px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
}

/* 댓글 - 별도 제목/테두리 박스 없이, 조건·주의사항·자유서술 본문 줄 목록(.wiki-line-list)에
   그대로 이어지는 "다음 줄"들로 보여준다(wikiCommentLineHtml/renderWikiCommentsPanel 참고) */

.wiki-comment-line,
.wiki-comment-new-row,
.wiki-comment-reply-form-slot.wiki-line-item {
  background: #ececec;
  padding-left: 24px;
  flex-wrap: wrap;
  row-gap: 4px;
}

.wiki-comment-prefix {
  flex-shrink: 0;
  color: #999;
  font-size: 13px;
}

.wiki-comment-line .wiki-line-text {
  font-size: 12px;
}

.wiki-comment-reply {
  margin-left: 24px;
}

.wiki-comment-author {
  font-weight: bold;
  color: #444;
  font-size: 12px;
  white-space: nowrap;
}

.wiki-comment-date {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
}

.wiki-comment-edit-btn,
.wiki-comment-reply-btn,
.wiki-comment-delete-btn {
  flex-shrink: 0;
  padding: 2px 8px;
  font-size: 11px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: white;
  cursor: pointer;
}

.wiki-comment-delete-btn:hover {
  background: #c0392b;
  border-color: #c0392b;
  color: white;
}

.wiki-comment-reply-form-slot:empty {
  display: none;
}

.wiki-comment-new-textarea,
.wiki-comment-edit-textarea,
.wiki-comment-reply-textarea {
  background: white;
}

.wiki-comment-new-textarea {
  flex: 1;
  min-width: 0;
  border: none;
  resize: none;
  font-size: 12px;
  font-family: inherit;
  padding: 4px 6px;
}

.wiki-comment-new-textarea:focus {
  outline: 1px solid var(--teal);
  border-radius: 3px;
}

.wiki-comment-edit-textarea,
.wiki-comment-reply-textarea {
  flex: 1;
  min-width: 150px;
  box-sizing: border-box;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 12px;
  resize: vertical;
}

.wiki-comment-edit-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.wiki-comment-edit-actions button {
  padding: 3px 10px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
}

.wiki-comment-new-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wiki-comment-new-save-btn {
  align-self: flex-end;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
}

.wiki-personal-note {
  background: #fffbe8;
  border: 1px dashed #e0c96a;
  border-radius: 6px;
  padding: 14px;
}

.wiki-personal-note h3 {
  color: #a5842a;
}

.wiki-personal-note textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #e0c96a;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  margin-bottom: 8px;
}

.wiki-edit-toolbar {
  max-width: 720px;
}

.wiki-edit-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 720px;
}

.wiki-edit-form > label {
  font-weight: bold;
  font-size: 13px;
  margin-top: 8px;
}

.wiki-edit-form > input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 15px;
}

.wiki-edit-row {
  display: flex;
  gap: 8px;
}

.wiki-edit-row select,
.wiki-edit-row input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.wiki-edit-row input {
  flex: 1;
}

.wiki-edit-form > button {
  align-self: flex-start;
  padding: 8px 20px;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 8px;
}

.rich-editor {
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  overflow: hidden;
}

.rich-editor-toolbar {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: #f0f0f0;
  border-bottom: 1px solid #ccc;
}

.rich-editor-toolbar button,
.rich-editor-toolbar select {
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 13px;
}

.rich-editor-content {
  min-height: 120px;
  padding: 10px;
  outline: none;
  font-size: 14px;
  line-height: 1.5;
}

/* 원무백과 작성 화면이 기본 창 크기 안에 스크롤 없이 들어오도록 자유서술 칸만 한 줄 정도 줄임 */
#wiki-free-editor .rich-editor-content {
  min-height: 96px;
}

.rich-editor-content table.wiki-table,
.wiki-field-content table.wiki-table {
  border-collapse: collapse;
  margin: 8px 0;
}

.rich-editor-content table.wiki-table td,
.wiki-field-content table.wiki-table td {
  border: 1px solid #999;
  padding: 6px 10px;
  min-width: 40px;
}

.rich-editor-image-input {
  display: none;
}

.wiki-youtube-card {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 560px;
  margin: 8px 0;
  text-decoration: none;
}

.wiki-youtube-thumb {
  width: 100%;
  display: block;
  border-radius: 4px;
}

.wiki-youtube-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.wiki-image-wrapper {
  position: relative;
  display: inline-block;
}

.wiki-image-zoom-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.wiki-image-wrapper:hover .wiki-image-zoom-btn {
  display: flex;
}

.category-toggle-btn {
  margin-bottom: 8px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--teal-text);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 650;
  font-family: inherit;
  transition: background 0.15s ease;
}

.category-toggle-btn:hover {
  background: var(--bg);
  transform: none;
}

.wiki-category-tree {
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.category-tree-root,
.category-tree-children {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.category-tree-children {
  margin-left: 9px;
  padding-left: 16px;
  border-left: 1px dashed #bbb;
}

.category-tree-children > .category-tree-item {
  position: relative;
}

.category-tree-children > .category-tree-item::before {
  content: "";
  position: absolute;
  top: 12px;
  left: -16px;
  width: 12px;
  height: 0;
  border-top: 1px dashed #bbb;
}

.category-tree-item {
  margin: 4px 0;
}

.category-tree-root > .category-tree-item > .category-tree-label:not(.category-tree-all) {
  font-weight: bold;
}

.category-tree-label {
  display: inline-block;
  padding: 2px 4px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.category-tree-label:hover {
  color: var(--teal-dark);
}

.category-tree-label.active {
  color: var(--teal);
  text-decoration: underline;
}

.category-tree-item button {
  border: none;
  background: none;
  cursor: pointer;
  color: #999;
  font-size: 12px;
  padding: 0 3px;
}

.wiki-category-tree:not(.edit-mode) .category-add-child-btn,
.wiki-category-tree:not(.edit-mode) .category-rename-btn,
.wiki-category-tree:not(.edit-mode) .category-delete-btn,
.wiki-category-tree:not(.edit-mode) .category-chip-add {
  display: none;
}

.category-edit-toggle-btn {
  margin-top: 8px;
  padding: 5px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 12px;
  color: #666;
}

.wiki-category-tree.edit-mode .category-tree-item[draggable="true"] {
  cursor: grab;
}

.category-tree-item.drag-over > .category-tree-label {
  background: #e0f7fa;
  outline: 1px dashed var(--teal);
}

.phonebook-search {
  padding: 8px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  width: 100%;
  max-width: 320px;
}

.phonebook-search:focus {
  outline: none;
  border-color: var(--teal);
}

/* 화면 곳곳(청구심사코드 진료과 선택, 관리자 권한 선택 등)의 <select>는 지금까지 브라우저
   기본 모양 그대로였다 - 목업 팔레트에 맞춰 통일된 모양을 준다. */
.content select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  outline: none;
}

.content select:focus {
  border-color: var(--teal);
}

.phonebook-edit-row {
  background: #fffbe8;
}

.pb-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
}

.admin-table-actions .pb-row-save-btn,
.admin-table-actions .pb-row-cancel-btn {
  padding: 4px 10px;
  margin-right: 6px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  color: white;
}

.admin-table-actions .pb-row-save-btn {
  background: var(--orange);
}

.admin-table-actions .pb-row-cancel-btn {
  background: #999;
}

.forms-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.forms-toolbar-actions button {
  padding: 8px 16px;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.forms-selected-filename {
  font-size: 12.5px;
  color: var(--text-muted);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forms-search-input {
  display: block;
  width: 100%;
  max-width: 360px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 14px;
}

.category-chip-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.category-edit-input {
  padding: 4px 8px;
  border: 1px solid var(--teal);
  border-radius: 999px;
  font-size: 13px;
  width: 140px;
}

.category-edit-save-btn {
  border: none;
  background: var(--teal);
  color: white;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.forms-category-display {
  cursor: pointer;
  color: var(--teal-dark);
}

.forms-category-display:hover {
  text-decoration: underline;
}

.forms-category-edit-input {
  padding: 4px 8px;
  border: 1px solid var(--teal);
  border-radius: 6px;
  font-size: 13px;
  width: 120px;
  vertical-align: middle;
}

.forms-category-edit-save-btn {
  border: none;
  background: var(--teal);
  color: white;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  margin-left: 6px;
  vertical-align: middle;
}

.forms-preview-panel {
  margin-top: 20px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}

.forms-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--teal);
  color: white;
  font-size: 13px;
}

.forms-preview-header button {
  padding: 4px 10px;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  font-size: 12px;
}

.forms-preview-iframe {
  width: 100%;
  height: 70vh;
  border: none;
  display: block;
}

.search-highlight {
  background: #fff59d;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

.quick-message-body {
  padding: 16px;
  background: var(--bg);
}

.quick-message-title {
  margin-top: 0;
  color: var(--teal);
}

.favorite-sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 16px;
  max-width: 800px;
}

.favorite-site-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.favorite-site-tile:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.favorite-site-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.favorite-site-icon-fallback {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.favorite-site-name {
  font-size: 13px;
  color: var(--text);
  text-align: center;
  word-break: keep-all;
}

.schedule-files-heading {
  margin-top: 28px;
}

.schedule-code-legend {
  color: #888;
  font-size: 12px;
  text-align: right;
  margin-bottom: 0;
}

/* 평소(에러/저장 메시지가 없을 때)엔 이 줄이 아예 자리를 차지하지 않게 해서 범례/달력을
   한 칸 더 위로 당긴다 - 메시지가 뜨면 다시 .error의 min-height 16px가 정상 적용됨. */
#schedule-edit-result:empty {
  min-height: 0;
}

/* 근무표 화면 제목 줄과 월 이동 줄 사이 여백을 다른 화면(.wiki-toolbar 공용)보다
   더 좁혀서 달력을 한 칸 더 위로 당긴다 - 이 id는 근무표 화면에만 쓰인다. */
#schedule-toolbar {
  margin-bottom: 8px;
}

.schedule-calendar {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 12px 0 20px;
  background: white;
}

/* 근무표 화면(근무자매칭 등 D1~D5가 붙은 달력)만 요일 헤더를 고정하고 그 아래만
   스크롤되게 한다 - 희망근무표/자동예약발송/다이어리 달력은 같은 .schedule-calendar
   클래스를 쓰지만 이 컨테이너 밖이라 영향받지 않는다. */
#schedule-calendar-container,
#autosend-calendar-container,
#erduty-calendar-container {
  max-height: calc(100vh - 380px);
  min-height: 300px;
  overflow: hidden auto;
  border: 1px solid var(--border);
  border-radius: 18px;
}

.schedule-calendar {
  margin: 0;
}

#schedule-calendar-container .schedule-calendar thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* 자동예약발송 달력도 요일 헤더를 고정하고 그 아래 날짜 칸만 스크롤되게 한다. */
#autosend-calendar-container .schedule-calendar thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* 외래근무표 달력도 요일 헤더(월화수목금토일)는 고정하고 그 아래 날짜 칸만 스크롤되게 한다. */
#erduty-calendar-container .schedule-calendar thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.schedule-calendar th,
.schedule-calendar td {
  border: 1px solid #e0e0e0;
  vertical-align: top;
  padding: 6px;
  width: 14.28%;
  height: 88px;
}

.schedule-calendar th {
  background: var(--teal);
  color: white;
  text-align: center;
  height: auto;
  padding: 8px;
  font-size: 13px;
}

.schedule-calendar th.sun {
  color: #ffd0d0;
}

.schedule-calendar th.sat {
  color: #d0e4ff;
}

.schedule-calendar td.calendar-empty {
  background: #fafafa;
}

/* 1일 이전/말일 이후 칸에 채워 넣는 지난달·다음달 날짜 - 이번 달 데이터가 없어 클릭도
   안 되고 내용도 안 뜨는, 순전히 보기 좋으라고 넣는 회색 숫자다. */
.schedule-calendar td.calendar-other-month {
  background: #fafafa;
}

/* .calendar-day-num(뒤에 선언된 font-weight:bold 기본 규칙)가 덮어쓰지 않도록 두 클래스를
   합친 선택자로 우선순위를 올려둔다 - 이 세션에서 몇 번 겪은 것과 같은 CSS 선언 순서 문제. */
.calendar-day-num.calendar-day-num-other {
  color: #ccc;
  font-weight: normal;
}

.schedule-calendar td.weekend {
  background: #f7fafd;
}

.schedule-calendar td.holiday {
  background: var(--danger-bg);
}

.schedule-calendar td.today {
  background: #fdf4e3;
  box-shadow: inset 0 0 0 2px var(--orange);
}

.calendar-day-num {
  display: inline-block;
  font-weight: bold;
  font-size: 13px;
  margin-bottom: 4px;
}

.calendar-day-num.day-blue {
  color: #3868a8;
}

.calendar-day-num.day-red {
  color: var(--danger);
}

/* 날짜 옆에 붙는 공휴일 이름/음력 1일·15일 표시 - 얇은 회색 글씨로 "바로 옆"에 붙는다. */
.calendar-day-annotation {
  display: inline-block;
  margin-left: 4px;
  font-size: 9px;
  font-weight: normal;
  color: #999;
}

/* 근무표 달력에도 다이어리/휴가신청처럼 날짜 옆에 본인 근무(D/off/2H/N 등)를 우측
   정렬로 보여준다. */
.calendar-daynum-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.calendar-daynum-row .calendar-schedule-note {
  margin-left: auto;
}

.calendar-schedule-note {
  font-size: 10px;
  font-weight: bold;
  color: var(--teal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-entry {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text);
}

.calendar-my-star {
  color: var(--orange);
}

.calendar-entry-mine {
  text-decoration: underline;
}

/* 근무표 달력의 2H/N 근무는 코드별로 눈에 띄게 색을 입힌다. */
.calendar-entry.calendar-entry-2h {
  color: #1a56db;
}

.calendar-entry.calendar-entry-n {
  color: #c0392b;
}

.calendar-entry.calendar-entry-dangbeon {
  color: #2e7d32;
}

/* 외래근무표: 오전은 파란색, 오후는 초록색, 응급실은 빨간색으로 구분한다.
   글씨는 "오전 - 산부인과, 1정형외과, 1소아과" 같은 긴 줄도 한 줄에 들어가도록 작게 줄이되,
   토요일 오전진료처럼 그래도 칸 너비를 넘는 줄은 잘리지 않고 자동으로 줄바꿈된다. */
.calendar-entry.erduty-entry {
  font-size: 13px;
  line-height: 1.3;
  white-space: normal;
  word-break: break-word;
}

.calendar-entry.erduty-entry-am {
  color: #1a56db;
}

.calendar-entry.erduty-entry-pm {
  color: #2e7d32;
}

.calendar-entry.erduty-entry-er {
  color: #c0392b;
}

.calendar-entry.erduty-entry-closed {
  color: #000000;
}

.erduty-edit-fields .erduty-field-input {
  width: 100%;
  box-sizing: border-box;
  font-size: 10px;
  padding: 2px 3px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

/* 식단표관리 - 음식 목록이 콤마로 길게 이어지는 경우가 많아 한 줄로 넘치므로 말줄임표로
   자르고, title 속성(브라우저 기본 툴팁)으로 전체 내용을 볼 수 있게 한다. */
.mealplan-entry {
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mealplan-entry b {
  color: var(--teal-dark);
  margin-right: 3px;
}

.mealplan-field-input {
  width: 100%;
  box-sizing: border-box;
  font-size: 10px;
  padding: 2px 3px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-family: inherit;
  resize: vertical;
}

/* 편집 화면도 읽기 화면과 같은 오전/오후/야간/응급실/휴진 구획으로 나눠서, 입력칸만 쭉
   나열될 때보다 뭘 고치는 건지 바로 알아볼 수 있게 한다. */
.erduty-edit-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 3px;
}

.erduty-edit-section-label {
  font-size: 9px;
  font-weight: bold;
  color: #888;
}

.erduty-edit-section-am .erduty-edit-section-label {
  color: #1a56db;
}

.erduty-edit-section-pm .erduty-edit-section-label {
  color: #2e7d32;
}

.erduty-edit-section-er .erduty-edit-section-label {
  color: #c0392b;
}

.schedule-calendar td.calendar-edit-cell {
  vertical-align: top;
  height: auto;
  padding: 6px 4px;
}

.calendar-daytype-select {
  width: 100%;
  font-size: 11px;
  margin-bottom: 4px;
  padding: 2px;
}

.calendar-edit-rows {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.calendar-edit-row {
  display: flex;
  gap: 2px;
}

.calendar-edit-row input,
.calendar-edit-row select {
  width: 0;
  flex: 1;
  min-width: 0;
  font-size: 11px;
  padding: 2px 3px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.calendar-edit-row input.calendar-code-input,
.calendar-edit-row select.calendar-code-input {
  flex: 0 0 34%;
}

.calendar-row-remove-btn {
  flex: 0 0 auto;
  width: 16px;
  padding: 0;
  border: none;
  background: transparent;
  color: #999;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.home-greeting {
  margin-bottom: 22px;
}

.home-greeting h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.home-greeting p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.home-today-weather {
  font-size: 12px;
  font-weight: 500;
  color: #000000;
  margin-left: 4px;
  vertical-align: middle;
}

/* 홈 화면이 새로 그려질 때마다(로그인 직후, 좌측 메뉴의 "홈" 클릭 등) 손 흔드는 이모지가
   손목을 축으로 두 번 흔드는 것처럼 보이게 한다 - 무한반복이 아니라 한 번만 재생됨. */
.home-wave-emoji {
  display: inline-block;
  transform-origin: 70% 70%;
  animation: home-wave-shake 2.6s ease-in-out;
}

@keyframes home-wave-shake {
  0% {
    transform: rotate(0deg);
  }
  15% {
    transform: rotate(25deg);
  }
  30% {
    transform: rotate(-15deg);
  }
  45% {
    transform: rotate(25deg);
  }
  60% {
    transform: rotate(-15deg);
  }
  75% {
    transform: rotate(10deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

.home-quote {
  font-style: italic;
  color: var(--teal-text);
}

.home-fortune {
  margin-top: 4px;
}

.card-section-padded {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 24px;
}

.home-two-col {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 22px;
  align-items: stretch;
  margin-top: 32px;
}

.home-col-left {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

@media (max-width: 900px) {
  .home-two-col {
    grid-template-columns: 1fr;
  }
}

.schedule-summary h2,
.autosend-summary h2 {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.3px;
}

.schedule-summary-heading-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.autosend-count-badge {
  font-size: 12px;
  color: var(--orange);
  font-weight: 700;
  white-space: nowrap;
}

.schedule-summary-heading-row h2 {
  margin-bottom: 0;
  flex: 1;
}

.schedule-date-picker-input {
  /* 화면엔 안 보이지만 달력 버튼을 누르면 showPicker()로 이 입력창의 네이티브 달력을 띄운다 */
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.schedule-summary-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-summary-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--surface-tint);
  border-radius: 12px;
}

/* 2H·N, 당번(2명), D1~D3, D4~D5처럼 한 줄에 여러 명을 같이 보여줄 때 - 사람 수만큼
   폭을 똑같이 나눠 쓰고(flex:1), 둘째 사람부터는 왼쪽에 옅은 구분선을 넣는다. */
.schedule-summary-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.schedule-summary-cell:not(:first-child) {
  padding-left: 10px;
  border-left: 1px solid var(--border-light);
}

.schedule-summary-cell .schedule-summary-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 홈 "오늘의 스케줄" 코드별 글씨색 구분(음영 없이 글씨색만) - 2H는 파랑, N은 빨강,
   당번은 초록, D1~D5는 검정. */
.schedule-summary-cell-2h .schedule-summary-code,
.schedule-summary-cell-2h .schedule-summary-name {
  color: #1a56db;
}

.schedule-summary-cell-n .schedule-summary-code,
.schedule-summary-cell-n .schedule-summary-name {
  color: #c0392b;
}

.schedule-summary-cell-dangbeon .schedule-summary-code,
.schedule-summary-cell-dangbeon .schedule-summary-name {
  color: #2e7d32;
}

.schedule-summary-cell-d .schedule-summary-code,
.schedule-summary-cell-d .schedule-summary-name {
  color: #000;
}

.schedule-summary-code {
  flex: none;
  min-width: 42px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 750;
  color: var(--teal-dark);
  background: var(--teal-light2);
  border-radius: 8px;
  padding: 4px 8px;
}

.schedule-summary-name {
  font-size: 13px;
  font-weight: 600;
  color: #2c433f;
}

.schedule-summary-id {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.schedule-autosend-heading {
  margin: 16px 0 8px;
  font-size: 15px;
  font-weight: 750;
}

.autosend-preview-list {
  display: flex;
  flex-direction: column;
  max-height: 600px;
  overflow-y: auto;
}

/* 공지사항 카드는 기본 padding(22px)보다 20px 더 높게 - 아래쪽 여백을 늘려서 처리 */
.notice-board {
  padding-bottom: 42px;
}

.autosend-preview-item {
  padding: 11px 2px;
  border-bottom: 1px dashed var(--border-light);
}

.autosend-preview-item:last-child {
  border-bottom: none;
}

.autosend-preview-header {
  font-size: 13px;
  font-weight: 800;
  color: var(--teal);
  margin-bottom: 2px;
}

.autosend-preview-message {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
  white-space: pre-wrap;
}

.autosend-line-er {
  color: #c0392b;
}

.autosend-line-ortho {
  color: #1565c0;
}

.autosend-line-pediatric {
  color: #1b5e20;
}

.autosend-line-meal {
  color: #000;
}

.notice-item {
  border-top: 1px solid var(--border-light);
  padding: 14px 0;
}

.notice-item:first-of-type {
  border-top: none;
}

.notice-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notice-item-header h3 {
  margin: 0;
  flex: 1;
  font-size: 15px;
  font-weight: 750;
  color: var(--teal-dark);
}

.notice-item-actions {
  display: flex;
  gap: 6px;
}

.notice-item-actions button {
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--teal-text);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.notice-item-actions button:hover {
  background: var(--bg);
  transform: none;
}

.notice-meta {
  margin: 4px 0 8px;
  font-size: 12px;
  color: #888;
}

.notice-content {
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: 14px;
}

.notice-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 16px;
}

.notice-form input,
.notice-form textarea {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.notice-form-actions {
  display: flex;
  gap: 8px;
}

.notice-form-actions button {
  padding: 6px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: var(--orange);
  color: white;
  font-weight: bold;
}

.notice-form-actions #notice-cancel-btn {
  background: #999;
}

.notice-date-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.notice-date-range label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.notice-date-range input[type="date"] {
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
}

.notice-date-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  background: #e6f4ea;
  color: #1e7a3d;
}

.notice-date-badge-inactive {
  background: #f0f0f0;
  color: #888;
}

.notice-item-inactive {
  opacity: 0.6;
}

.notice-show-all-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #666;
  margin: 4px 0 12px;
  cursor: pointer;
}

.notice-more-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  color: #666;
  cursor: pointer;
  font-size: 13px;
}

.notice-more-btn:hover {
  background: #eef6f7;
  color: var(--teal);
}

.notice-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

.notice-page-btn {
  padding: 4px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
}

.notice-page-btn.active {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

/* ============================================================================
   모바일 반응형 (2026-07 추가) - Tailscale Funnel로 휴대폰 브라우저에서도 접속하는
   경우를 위한 레이아웃. 데스크톱(pywebview 클라이언트)에는 전혀 영향 없음 - 이 폭보다
   좁을 때만 적용됨. 좌측 메뉴는 평소 화면 밖에 숨어있다가 헤더의 햄버거 버튼을 누르면
   슬라이드로 나온다(main.js의 openMobileSidebar/closeMobileSidebar 참고).
   ========================================================================= */

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--teal-dark);
  border-radius: 2px;
}

.mobile-menu-btn:active {
  background: var(--teal-light);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 940;
}

@media (max-width: 860px) {
  /* 헤더: 검색창·아이콘 묶음처럼 폰 화면엔 과한 요소는 숨기고, 핵심(제목/사용자/로그아웃)만 남긴다 */
  .mobile-menu-btn {
    display: flex;
  }

  .app-header {
    gap: 10px;
    padding: 0 10px;
    height: 52px;
  }

  .app-title-wrap {
    min-width: 0;
    flex: 1;
  }

  .app-title {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .wiki-search-box,
  .header-icon-group,
  .new-version-label,
  #login-type-label {
    display: none;
  }

  .header-user {
    gap: 8px;
  }

  #current-user-name {
    font-size: 12px;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #logout-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* 좌측 메뉴: 고정폭 사이드바 대신 화면 왼쪽에서 슬라이드로 여닫는 서랍(drawer)으로 */
  .side-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 950;
    width: 78vw;
    max-width: 300px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  }

  .side-menu.sidebar-open {
    transform: translateX(0);
  }

  .menu-item {
    height: 46px;
  }

  /* 계산기/그림판/메모장/전원종료/재부팅은 트레이 상주 데스크톱 클라이언트 전용 기능이라
     휴대폰 브라우저에서는 아무 동작도 안 해서(pywebview API 없음) 아예 숨긴다. */
  .sidebar-utilities {
    display: none;
  }

  .content {
    padding: 14px 14px 30px;
  }

  .app-footer {
    padding: 0 12px;
    font-size: 10px;
  }

  /* 표는 화면 폭을 넘기기 쉬우므로 가로 스크롤로 - 칸이 찌그러지는 것보다 낫다 */
  .admin-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  /* 팝업창은 화면 폭에 맞춰 꽉 차게 */
  .modal-box,
  .news-list-box,
  .staff-photo-modal-box {
    width: 92vw !important;
    max-width: 92vw !important;
  }

  /* 손가락으로 누르기 편하도록 버튼/입력칸 최소 높이를 키운다 */
  button,
  .icon-btn,
  input[type="text"],
  input[type="password"],
  input[type="search"],
  input[type="date"],
  select,
  textarea {
    min-height: 40px;
  }

  .category-chip,
  .notice-page-btn {
    min-height: 32px;
  }

  /* 아주 좁은 폰(320px대)에서도 로그인 카드가 화면을 넘치지 않게 */
  .login-card {
    width: 88vw;
    max-width: 320px;
    padding: 32px 22px 26px;
  }
}

@keyframes noticeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notice-list-slide-in {
  animation: noticeSlideIn 0.25s ease-out;
}

.calendar-add-row-btn {
  width: 100%;
  margin-top: 4px;
  padding: 2px;
  font-size: 11px;
  background: #f0f0f0;
  border: 1px dashed #ccc;
  border-radius: 3px;
  cursor: pointer;
  color: #666;
}

.autosend-calendar td {
  height: auto;
  min-height: 100px;
}

.autosend-entry {
  font-size: 11px;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 2px;
  word-break: break-all;
}

/* 자동예약발송 편집 칸: 시간/구분 입력칸이 .calendar-edit-row(가로 배치, input/select 전용)를
   그대로 물려받고 있었는데, 메시지 칸은 textarea라 그 규칙이 안 먹어서 크기가 안 잡히고
   좁은 달력 칸 안에서 셋을 가로로 욱여넣다 보니 시간/구분 칸이 다 밀려서 안 보였다.
   세로로 쌓아서 시간/구분/메시지가 각각 한 줄씩 온전히 보이게 한다. */
.calendar-edit-row.autosend-edit-row {
  flex-direction: column;
  gap: 2px;
  padding: 3px;
  border: 1px solid #eee;
  border-radius: 3px;
  position: relative;
}

.autosend-edit-row .autosend-time-input,
.autosend-edit-row .autosend-label-input,
.autosend-edit-row .autosend-message-input {
  width: 100%;
  flex: none;
  box-sizing: border-box;
  font-size: 10px;
  padding: 2px 3px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.autosend-edit-row .autosend-message-input {
  resize: vertical;
}

.autosend-catchup-label {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  color: var(--text-light, #666);
  white-space: nowrap;
}

.autosend-catchup-label input {
  margin: 0;
}

.autosend-edit-row .calendar-row-remove-btn {
  align-self: flex-end;
}

.autosend-daytype-input {
  width: 100%;
  box-sizing: border-box;
  font-size: 10px;
  padding: 2px 3px;
  margin-bottom: 3px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.calendar-day-num-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.calendar-day-num-row .autosend-day-edit-btn {
  margin-left: auto;
}

.autosend-day-edit-btn {
  flex-shrink: 0;
  font-size: 10px;
  padding: 1px 6px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: white;
  color: var(--teal);
  cursor: pointer;
}

/* 날짜 하나를 골라 시간·제목·내용을 편집하는 전용 페이지(달력 칸 안에 욱여넣던 예전 방식 대신) */
.autosend-day-edit-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
}

.autosend-daytype-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: bold;
  max-width: 200px;
}

.autosend-daytype-field input {
  font-weight: normal;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.autosend-entry-edit {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.autosend-entry-edit-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.autosend-entry-field,
.autosend-entry-field-message {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #666;
}

.autosend-entry-field input,
.autosend-entry-field-message textarea {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}

.autosend-entry-field-label input {
  min-width: 180px;
}

.autosend-entry-field-message textarea {
  resize: vertical;
}

.autosend-entry-remove-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  font-size: 16px;
  margin-left: auto;
}

.autosend-day-edit-actions {
  display: flex;
  gap: 8px;
}

.autosend-recipients {
  margin-top: 28px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 16px 20px;
}

.autosend-recipients-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 12px 0;
}

.autosend-recipient-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
}

#autosend-recipients-save-btn {
  padding: 8px 16px;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.wiki-toolbar #autosend-edit-controls {
  display: flex;
  gap: 8px;
}

.wiki-toolbar #autosend-cancel-btn {
  background: #999;
}

.erguide-box {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 34px;
}

.erguide-hospital-title {
  width: 100%;
  text-align: center;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.3px;
  color: white;
  padding: 18px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  border-radius: 14px;
  margin-bottom: 10px;
}

.erguide-question {
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  margin: 0 0 18px;
  color: var(--text-muted);
  line-height: 1.5;
  word-break: keep-all;
}

.erguide-notice {
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.erguide-options {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* 선택지가 많은 화면(예: 입원 수속 진료과 선택)은 한 줄에 두 개씩 배치해서 스크롤을 줄인다. */
.erguide-options.erguide-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.erguide-btn {
  display: flex;
  align-items: center;
  width: 100%;
  height: 54px;
  padding: 0 20px;
  font-size: 14.5px;
  font-weight: 700;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.erguide-btn::after {
  content: "›";
  margin-left: auto;
  color: var(--text-faint);
  font-size: 16px;
}

.erguide-btn:hover {
  background-color: var(--surface-tint);
  border-color: var(--teal);
}

.erguide-btn-staff {
  margin-top: 16px;
  background: var(--bg);
  border-color: var(--border);
  color: var(--teal-text);
}

.erguide-btn-staff:hover {
  background: var(--teal-light);
}

.erguide-result {
  background-color: #e3f2fd;
  border: 1px solid #90caf9;
  padding: 22px;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.6;
  word-break: keep-all;
}

.erguide-result ol {
  margin: 10px 0 0 0;
  padding-left: 20px;
}

.erguide-result li {
  margin-bottom: 5px;
}

.erguide-nav {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  border-top: 1px solid var(--border-light);
  padding-top: 18px;
}

.erguide-nav-btn {
  flex: 1;
  height: 44px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 11px;
  cursor: pointer;
  color: white;
}

.erguide-btn-back {
  background-color: #6c757d;
}

.erguide-btn-back:hover {
  background-color: #5a6268;
}

.erguide-btn-home {
  background: var(--orange);
}

.erguide-btn-home:hover {
  background: var(--orange-hover);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background: var(--surface);
  border-radius: 18px;
  padding: 26px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.modal-box h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text);
}

.modal-box input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
}

.modal-box input:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--surface);
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.modal-actions button {
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  background: var(--orange);
  color: white;
  transition: background 0.15s ease;
}

.modal-actions button:hover {
  background: var(--orange-hover);
  transform: none;
}

.modal-actions #password-change-cancel-btn,
.modal-actions #power-confirm-no-btn {
  background: #94a3a0;
}

.modal-actions #password-change-cancel-btn:hover,
.modal-actions #power-confirm-no-btn:hover {
  background: #7f908c;
}

.update-progress-box {
  width: 360px;
}

.update-progress-bar-track {
  width: 100%;
  height: 14px;
  background: var(--bg);
  border-radius: 7px;
  overflow: hidden;
}

.update-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--orange);
  transition: width 0.3s ease;
}

.update-progress-bar-fill-error {
  background: #e74c3c;
  width: 100% !important;
}

.update-progress-message {
  margin: 0;
  font-size: 13px;
  color: #444;
  word-break: break-word;
}

.warning-popup-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e74c3c;
  color: white;
  font-size: 34px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
}

.warning-popup-message {
  text-align: center;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  margin: 0;
}

.warning-popup-actions {
  justify-content: center;
}

.force-update-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2500;
}

.force-update-box {
  text-align: center;
  color: white;
  max-width: 420px;
  padding: 32px;
}

.force-update-title {
  font-size: 22px;
  font-weight: bold;
  margin: 0 0 16px;
}

.force-update-message {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 16px;
}

.force-update-notice {
  font-size: 13px;
  color: #ffcf80;
  line-height: 1.5;
  margin: 0 0 24px;
}

.force-update-actions button {
  padding: 10px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: var(--orange);
  color: white;
  font-weight: bold;
  font-size: 14px;
}

#update-progress-modal {
  z-index: 2600;
}

.screen-lock-overlay {
  position: fixed;
  inset: 0;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.screen-lock-box {
  text-align: center;
  color: white;
}

.screen-lock-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 12px;
}

#screen-lock-user {
  font-size: 16px;
  margin-bottom: 24px;
}

.screen-lock-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.screen-lock-actions button {
  padding: 10px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: var(--orange);
  color: white;
  font-weight: bold;
}

.screen-lock-actions #screen-lock-switch-user-btn {
  background: white;
  color: var(--teal);
}

/* ============================================================================
   모바일 전용 화면 구성 (2026-07 추가) - "프로그램(pywebview)으로 로그인한 게 아니면
   전부 모바일"이라는 기준으로 main.js가 <html>에 붙이는 .mobile-mode 클래스를 스코프로
   쓴다. 화면 크기가 아니라 접속 경로 기준이라, 데스크톱 브라우저로 같은 주소를 열어도
   모바일 취급된다(의도된 동작). 데스크톱 클라이언트에는 이 블록이 전혀 적용되지 않는다.
   ========================================================================= */

/* 1. 로그인 - 원무Unit/건진Unit 어느 쪽 이름을 골라도 "사무실로그인/창구로그인" 2버튼이
   아니라 기본 "로그인" 버튼(내부적으로 office 처리)만 보이게 강제한다. */
.mobile-mode #login-type-buttons-wonmu {
  display: none !important;
}
.mobile-mode #login-type-buttons-default {
  display: flex !important;
}

/* 2. 홈 */
.mobile-mode .home-today-weather {
  display: block;
  margin-left: 0;
  margin-top: 4px;
}
.mobile-mode .schedule-summary-id {
  display: none;
}
.mobile-mode #news-ticker {
  display: none !important;
}

/* 3. 원무백과 - 새 문서 작성/수정/삭제/이전 버전 보기 숨김(조회 전용), 헤더 검색창이
   숨겨진 자리 대신 카테고리 버튼 옆 검색창을 보여준다. */
.mobile-mode #wiki-new-btn,
.mobile-mode #wiki-edit-btn,
.mobile-mode #wiki-delete-btn,
.mobile-mode #wiki-history-btn {
  display: none !important;
}
.wiki-category-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.wiki-mobile-search {
  display: none;
}
.mobile-mode .wiki-mobile-search {
  display: block;
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid #555;
  border-radius: 8px;
}

/* 4~9, 13. 이 메뉴들은 모바일에서 아예 안 보이게 - 소아과접수/청구심사코드/메시지/
   자동예약발송/서식/즐겨찾기/식단표관리(권한이 있어도 항상 숨김) */
.mobile-mode .menu-item[data-view="pediatric"],
.mobile-mode .menu-item[data-view="claimreview"],
.mobile-mode .menu-item[data-view="messages"],
.mobile-mode .menu-item[data-view="autosend"],
.mobile-mode .menu-item[data-view="forms"],
.mobile-mode .menu-item[data-view="settings"],
.mobile-mode .menu-item[data-view="mealplan"] {
  display: none !important;
}

/* "휴대폰에 설치" 메뉴 - 홈 화면 추가는 모바일 브라우저에서만 의미가 있으니 데스크톱
   트레이 클라이언트(pywebview)에서는 항상 숨겨둔다. */
.mobile-install-item {
  display: none;
}
.mobile-mode .mobile-install-item {
  display: flex;
}

/* 8. 원내전화번호 - 연락처 추가/JSON 내려받기 숨김(관리 기능은 조회 전용으로) */
.mobile-mode #phonebook-add-btn,
.mobile-mode #phonebook-export-btn {
  display: none !important;
}

/* 근무표/외래근무표/원내전화번호 등 여러 화면이 공유하는 "JSON으로 반영" 업로드 라벨과
   "JSON 원본 보기" 미리보기 블록 - 모바일에서는 전부 관리 기능이라 통째로 숨긴다. */
.mobile-mode .upload-label,
.mobile-mode .json-preview-block {
  display: none !important;
}

/* 10. 근무표 - 근무표계산/편집/처리대기배지/근무표초기화 숨김(조회 전용). 사원번호는
   annotateEmployeeId()가 모바일에서 아예 안 붙이므로 별도 CSS 불필요. */
.mobile-mode #schedule-compute-schedule-btn,
.mobile-mode #schedule-edit-toggle-btn,
.mobile-mode #schedule-pending-count-badge,
.mobile-mode #schedule-reset-btn {
  display: none !important;
}

/* 11. 휴가신청 - 달력 안 글씨를 1pt씩 줄이고, 상태 드롭다운이 칸을 넘치던 것도 줄인다. */
.mobile-mode .hope-cell-entry-label,
.mobile-mode .hope-cell-schedule-note,
.mobile-mode .hope-cell-badge,
.mobile-mode .hope-cell-badge-label,
.mobile-mode .hope-cell-leave-available {
  font-size: 9px;
}
.mobile-mode .hope-status-select {
  flex-shrink: 1;
  min-width: 0;
  min-height: 20px !important;
  height: auto;
  font-size: 8px;
  padding: 0 1px;
}
/* 손가락 터치 편의를 위한 공용 버튼 min-height:40px 규칙(@media 860px, 위쪽)이
   14x14로 작아야 할 X 삭제 버튼에도 걸려서, 가로 14px/세로 40px짜리 세로로 긴 막대처럼
   보였다 - 원래 크기(14x14)를 !important로 되찾는다. */
.mobile-mode .hope-entry-delete-btn {
  min-height: 14px !important;
  width: 14px;
  height: 14px;
}
/* 이름과 상태 드롭다운이 좁은 칸 안에서 겹쳐 보여 관리자가 누구 신청인지 못 알아보던
   문제 - 모바일에서는 이름을 자기 줄로 강제로 밀어내고(flex-basis 100%), 드롭다운/삭제
   버튼이 그 다음 줄로 자동 줄바꿈되게 한다. */
.mobile-mode .hope-cell-entry {
  flex-wrap: wrap;
}
.mobile-mode .hope-cell-entry-label {
  flex: 1 1 100%;
  white-space: normal;
}

/* 12. 외래근무표 - 외래근무표계산/편집/외래근무표초기화 숨김(JSON반영/원본보기는 위
   .upload-label/.json-preview-block 공용 규칙으로 이미 숨겨짐). */
.mobile-mode #erduty-calc-autosend-btn,
.mobile-mode #erduty-edit-toggle-btn,
.mobile-mode #erduty-reset-btn {
  display: none !important;
}

/* footer 버전 문구/제작자 표기 가운데 정렬 - news-ticker가 모바일에서 숨어서
   app-footer-info 혼자 남으니 justify-content로 가운데로 옮긴다. */
.mobile-mode .app-footer {
  justify-content: center;
}
.mobile-mode .app-footer-info {
  text-align: center;
}

/* 원무보조Prog. 타이틀이 좁은 화면에서 ...으로 잘리지 않게 - 위 @media 블록의
   ellipsis 규칙(.app-title)보다 클래스 두 개짜리 선택자로 우선 적용시킨다. */
.mobile-mode .app-title {
  overflow: visible;
  text-overflow: unset;
  white-space: nowrap;
}
.mobile-mode .app-title-wrap {
  flex-shrink: 0;
  min-width: max-content;
}

/* 원무백과 모바일 검색 버튼 - 입력창 옆에서 엔터 대신 눌러서 검색할 수 있게 한다. */
.wiki-mobile-search-btn {
  display: none;
}
.mobile-mode .wiki-mobile-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid #555;
  border-radius: 8px;
  background: var(--surface);
  font-size: 15px;
  cursor: pointer;
}

/* 근무표/휴가신청/외래근무표/다이어리 달력 - 모바일 세로 화면에서는 요일 7개가 한
   화면에 다 안 들어오므로 4개만 먼저 보이고 나머지 3개는 좌우로 스크롤해서 보게 한다.
   테이블 폭을 컨테이너의 175%로 늘리면 칸 하나(전체의 14.28%)가 컨테이너 폭의 25%가
   되어, 정확히 4칸(25%×4=100%)이 한 화면 폭에 꽉 찬다. 스크롤 위치(오늘 요일이 바로
   보이게)는 JS의 scrollScheduleCalendarToRelevantWeek가 인라인 스타일로 지정한다.
   가로가 더 넓은 가로형(landscape)에서는 7칸이 다 들어갈 여지가 있으니 이 제한을 빼서
   원래대로 보여준다. */
@media (orientation: portrait) {
  .mobile-mode .schedule-calendar {
    width: 175%;
  }
  .mobile-mode #schedule-calendar-container,
  .mobile-mode #erduty-calendar-container,
  .mobile-mode #hope-calendar-container,
  .mobile-mode #diary-calendar-container {
    overflow-x: auto;
  }
}
.mobile-mode #hope-calendar-container,
.mobile-mode #diary-calendar-container,
.mobile-mode #schedule-calendar-container,
.mobile-mode #erduty-calendar-container {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
