/* ================================================================
   울엄마해장 업무 포털 - 전체 스타일
   포인트 컬러: #E86E3C
   ================================================================ */

:root {
  --point: #E86E3C;
  --point-dark: #d15a29;
  --point-deep: #b84e22;
  --point-tint: #fdf1ea;
  --point-tint2: #fbe0d2;
  --ink: #333333;
  --ink-logo: #2b2320;
  --muted: #9a938e;
  --line: #e8e2dd;
  --bg: #f6f4f2;
  --white: #ffffff;
  --ok: #2e9e5b;
  --no: #d9534f;
  --hold: #e8a33c;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(60, 40, 25, .07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--ink); }

.muted { color: var(--muted); }
.spacer { flex: 1; }
.pre { white-space: pre-wrap; word-break: break-word; }

/* ================= 공통 컴포넌트 ================= */

.input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  background: var(--white);
  width: 100%;
  max-width: 480px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--point); box-shadow: 0 0 0 3px rgba(232, 110, 60, .15); }
.input-sm { max-width: 220px; }
.input-money { text-align: right; }
textarea.input { max-width: 720px; resize: vertical; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  transition: all .15s;
  white-space: nowrap;
}
.btn:hover { background: #f4efeb; }
.btn-sm { padding: 5px 11px; font-size: 13px; }
.btn-lg { padding: 11px 26px; font-size: 15px; }
.btn-primary { background: var(--point); border-color: var(--point); color: #fff; }
.btn-primary:hover { background: var(--point-dark); border-color: var(--point-dark); }
.btn-outline { border-color: var(--point); color: var(--point); background: var(--point-tint); }
.btn-outline:hover { background: var(--point-tint2); }
.btn-danger { background: #fff; border-color: #eec7c6; color: var(--no); }
.btn-danger:hover { background: #fdf0f0; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #268a4e; }
.btn-hold { background: var(--hold); border-color: var(--hold); color: #fff; }
.btn-hold:hover { background: #d3922f; }
.btn-block { width: 100%; }

/* 배지 */
.badge {
  display: inline-block;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  vertical-align: middle;
}
.badge-ok { background: #e3f4ea; color: var(--ok); }
.badge-no { background: #fbe9e8; color: var(--no); }
.badge-hold { background: #fcf0dc; color: #c07f14; }
.badge-ing { background: #e8eef8; color: #3b6cb7; }
.badge-wait { background: #efece9; color: #7d766f; }
.badge-admin { background: var(--point); color: #fff; }

/* 칩 */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--point-tint);
  border: 1px solid var(--point-tint2);
  color: var(--point-deep);
  border-radius: 20px;
  padding: 3px 6px 3px 12px;
  font-size: 13px;
  margin: 2px 4px 2px 0;
  max-width: 100%;
  word-break: break-all;
}
.chip em { font-style: normal; font-size: 11px; color: var(--muted); }
.chip-x {
  border: none; background: transparent; color: var(--point-deep);
  font-size: 15px; line-height: 1; padding: 2px 5px; border-radius: 50%;
}
.chip-x:hover { background: var(--point-tint2); }

/* ================= 로그인 화면 ================= */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}
.login-card {
  background: var(--white);
  border: 2px solid var(--point);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 48px 44px 36px;
  width: 100%;
  max-width: 420px;
  text-align: center;
}
.brand-login { margin-bottom: 30px; }
.brand-row { display: flex; align-items: center; justify-content: center; gap: 12px; }
.brand-text-orange {
  font-family: 'Jua', 'Noto Sans KR', sans-serif;
  font-size: 42px;
  color: var(--point);
  letter-spacing: 1px;
}
.brand-login-sub {
  font-family: 'Jua', 'Noto Sans KR', sans-serif;
  font-size: 26px;
  color: var(--ink);
  margin-top: 22px;
  letter-spacing: 6px;
}
.login-form { display: flex; flex-direction: column; gap: 10px; }
.login-input { max-width: none; padding: 12px 14px; font-size: 15px; }
.login-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.login-remember { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #666; cursor: pointer; }
.login-remember input { accent-color: var(--point); width: 15px; height: 15px; }
.btn-login { padding: 10px 34px; font-size: 15px; font-weight: 700; }
.login-hint { margin-top: 22px; font-size: 12px; color: var(--muted); }

/* 사용자 로고 이미지 (폴더에 png1.png / png2.png 를 넣으면 자동 적용) */
.brand-login .logo-img-login { display: none; width: 100%; max-width: 310px; height: auto; margin: 0 auto; }
.brand-login.img-ok .logo-img-login { display: block; }
.brand-login.img-ok .brand-fallback { display: none; }
.brand-header .logo-img-header { display: none; height: 40px; width: auto; }
.brand-header.img-ok .logo-img-header { display: block; }
.brand-header.img-ok .brand-fallback { display: none; }
.brand-header .brand-fallback { display: flex; align-items: center; gap: 8px; }

/* ================= 상단 헤더 ================= */

.topbar { background: var(--white); border-bottom: 1px solid var(--line); }
.topbar-in {
  max-width: 1280px; margin: 0 auto; padding: 10px 24px;
  display: flex; align-items: center; gap: 14px;
}
.brand-header { display: flex; align-items: center; gap: 8px; }
.brand-text-dark {
  font-family: 'Jua', 'Noto Sans KR', sans-serif;
  font-size: 24px; color: var(--ink-logo); letter-spacing: 1px;
}
.brand-header-sub {
  font-family: 'Jua', 'Noto Sans KR', sans-serif;
  font-size: 18px; color: var(--ink-logo); margin-left: 10px; letter-spacing: 4px;
  border-left: 2px solid var(--line); padding-left: 16px;
}
.user-info { font-size: 13px; color: #555; }
.user-info b { font-size: 14px; color: var(--ink); }

.mode-badge {
  border: none; border-radius: 20px; font-size: 12px; font-weight: 700; padding: 4px 12px;
}
.mode-fb { background: #e3f4ea; color: var(--ok); }
.mode-local { background: #fcf0dc; color: #c07f14; cursor: pointer; }
.mode-local:hover { background: #f8e6c4; }

/* ================= 메뉴바 ================= */

.menubar { background: var(--point); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 8px rgba(232, 110, 60, .3); }
.menubar-in {
  max-width: 1280px; margin: 0 auto; padding: 0 12px;
  display: flex; list-style: none; flex-wrap: wrap;
}
.menu-item { position: relative; }
.menu-top {
  display: block; padding: 13px 18px; color: #fff; font-weight: 700; font-size: 14.5px;
  cursor: pointer; user-select: none; white-space: nowrap;
}
.menu-top:hover, .menu-top.active { background: var(--point-dark); }
.menu-admin .menu-top { background: rgba(0, 0, 0, .14); }
.menu-admin .menu-top:hover, .menu-admin .menu-top.active { background: rgba(0, 0, 0, .28); }
.caret { font-size: 10px; opacity: .8; }

.submenu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 185px;
  background: var(--white); border: 1px solid var(--line); border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 20px rgba(60, 40, 25, .18); list-style: none; overflow: hidden; z-index: 60;
}
.has-sub:hover .submenu, .has-sub.open .submenu { display: block; }
.submenu a {
  display: block; padding: 11px 18px; color: var(--ink); font-size: 14px;
  border-bottom: 1px solid #f3eeea;
}
.submenu li:last-child a { border-bottom: none; }
.submenu a:hover, .submenu a.active { background: var(--point-tint); color: var(--point-deep); font-weight: 700; }

/* ================= 본문 공통 ================= */

.main { max-width: 1280px; margin: 0 auto; padding: 26px 24px 60px; }

.page-loading { padding: 60px; text-align: center; color: var(--muted); }
.empty { padding: 60px; text-align: center; color: var(--muted); }

.page-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.page-head h2 {
  font-size: 22px; font-weight: 800; color: var(--ink);
  padding-left: 12px; border-left: 5px solid var(--point); line-height: 1.3;
}
.page-head .count { color: var(--muted); font-size: 13px; }
.board-search { max-width: 200px; }

/* 테이블 */
.table-wrap {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow-x: auto; box-shadow: var(--shadow);
}
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  background: var(--point-tint); color: var(--point-deep); font-weight: 700;
  padding: 11px 14px; text-align: left; white-space: nowrap; border-bottom: 2px solid var(--point-tint2);
}
.table td { padding: 11px 14px; border-bottom: 1px solid #f3eeea; vertical-align: middle; }
.table tbody tr[data-id], .table tbody tr[data-href] { cursor: pointer; }
.table tbody tr:hover td { background: #fdf8f4; }
.table tbody tr:last-child td { border-bottom: none; }
.table .empty-row td { text-align: center; color: var(--muted); padding: 46px; cursor: default; }
.td-link a { color: var(--ink); font-weight: 600; }
.td-link a:hover { color: var(--point); text-decoration: underline; }
.table-sm th, .table-sm td { padding: 8px 12px; font-size: 13px; }

/* 안 읽은 새 글 빨간 점 */
.col-dot { width: 22px; text-align: center; padding-left: 0 !important; padding-right: 8px !important; }
.unread-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #ff3b30; vertical-align: middle; margin-right: 6px; flex-shrink: 0;
}
.col-dot .unread-dot { margin-right: 0; } /* 목록 점 칸은 가운데 정렬이라 여백 불필요 */

/* 상세 카드 */
.detail-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 30px;
}
.detail-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.detail-meta {
  color: #777; font-size: 13px; padding-bottom: 14px; border-bottom: 2px solid var(--point-tint2); margin-bottom: 16px;
}
.detail-table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; table-layout: fixed; }
.detail-table td { word-break: break-word; }
.detail-table th {
  width: 160px; text-align: left; vertical-align: top; padding: 10px 12px;
  background: #faf6f3; color: #6d655e; font-weight: 600; border: 1px solid #f0e9e4; font-size: 13px;
}
.detail-table td { padding: 10px 14px; border: 1px solid #f0e9e4; }
.detail-files { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }

/* 첨부파일 보기 (썸네일 + 파일 카드) */
.files-view { display: flex; flex-direction: column; gap: 8px; }
.file-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.file-thumb {
  width: 110px; height: 110px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); cursor: zoom-in; display: block; background: #faf8f6;
}
.file-thumb:hover { border-color: var(--point); }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-card {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
  max-width: 540px; background: var(--white);
}
.file-card-icon { font-size: 26px; flex-shrink: 0; }
.file-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-card-name { font-weight: 700; font-size: 13.5px; word-break: break-all; }
.file-card-size { font-size: 12px; color: var(--muted); }

/* 본문 서식 입력창 (이미지 붙여넣기 가능) */
.rich-edit {
  white-space: pre-wrap; word-break: break-word; overflow-y: auto;
  max-width: 720px; cursor: text; max-height: 60vh;
}
.rich-edit:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.rich-edit img, .rich-img {
  max-width: 300px; max-height: 300px; display: block; margin: 6px 0; border-radius: 8px;
}
.rich-view img { cursor: zoom-in; }
.rich-view img:hover { outline: 2px solid var(--point-tint2); }
.rich-edit.rich-drag { border-color: var(--point); background: var(--point-tint); box-shadow: 0 0 0 3px rgba(232, 110, 60, .15); }

/* 파일 미리보기 모달 */
.preview-body { text-align: center; }
.preview-img { max-width: 100%; max-height: 68vh; border-radius: 8px; }
.preview-frame { width: 100%; height: 68vh; border: none; border-radius: 8px; }
.preview-text {
  text-align: left; background: #faf8f6; border: 1px solid var(--line); border-radius: 8px;
  padding: 14px; max-height: 60vh; overflow: auto; font-size: 12.5px; white-space: pre-wrap; word-break: break-all;
}
.preview-media { width: 100%; max-height: 60vh; }
.preview-none { padding: 34px 10px; }
.preview-none-icon { font-size: 46px; margin-bottom: 10px; }
.detail-files-label { font-weight: 700; margin-bottom: 8px; font-size: 13px; color: #6d655e; }
.file-link {
  display: inline-flex; align-items: center; gap: 4px; margin: 2px 10px 2px 0;
  color: var(--point-deep); font-size: 13.5px; text-decoration: underline;
  max-width: 100%; word-break: break-all;
}
.file-link:hover { color: var(--point); }

/* 폼 */
.form-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 30px;
}
.form-row { display: flex; gap: 18px; padding: 11px 0; border-bottom: 1px solid #f6f1ec; }
.form-row:last-of-type { border-bottom: none; }
.form-label { width: 170px; flex-shrink: 0; font-weight: 600; padding-top: 8px; font-size: 13.5px; color: #55504b; }
.form-label .req { color: var(--no); font-style: normal; }
.form-ctrl { flex: 1; min-width: 0; }
.form-btns { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }

/* 날짜 필드 (요일 표시형) */
.date-field { position: relative; display: inline-block; }
.date-field .date-display { cursor: pointer; background: var(--white); }
.date-field .date-native {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; border: 0; padding: 0;
}
.date-field:focus-within .date-display {
  border-color: var(--point); box-shadow: 0 0 0 3px rgba(232, 110, 60, .15);
}

/* 파일 첨부 */
.files-field { display: flex; flex-direction: column; gap: 10px; }
.files-drop {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 2px dashed var(--line); border-radius: 10px; padding: 12px 14px;
  background: #faf8f6; transition: border-color .15s, background .15s;
}
.files-drop.drag-over { border-color: var(--point); background: var(--point-tint); }
.file-hint { font-size: 12px; color: var(--muted); }
.file-chips:empty { display: none; }

/* 대상 선택 (소속/부서/직원 트리) */
.target-picker {
  border: 1px solid var(--line); border-radius: 10px; background: var(--white);
  max-width: 520px;
}
.tp-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; border-bottom: 1px solid var(--line); background: #faf8f6;
  position: sticky; top: 0; border-radius: 10px 10px 0 0;
}
.tp-all { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.tp-count { font-size: 12.5px; }
.tp-tree { max-height: 300px; overflow-y: auto; padding: 6px 0; }
.tp-node { display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 13.5px; padding: 4px 0; }
.tp-node input { accent-color: var(--point); width: 15px; height: 15px; }
.tp-org { padding: 4px 14px; border-bottom: 1px solid #f6f1ec; }
.tp-org:last-child { border-bottom: none; }
.tp-org-node { font-size: 14px; }
.tp-team { margin-left: 20px; }
.tp-team-node { color: #555; font-weight: 600; }
.tp-user-node { margin-left: 22px; color: var(--ink); }

/* 결재자 선택 */
.approver-field .approver-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.approver-field .approver-row .input { max-width: 260px; }
.approver-chips { margin-top: 8px; }

.picker .input { margin-bottom: 10px; max-width: none; }
.picker-selected { margin-bottom: 10px; font-size: 13px; line-height: 2; }
.picker-guide { padding: 30px 14px; text-align: center; }
.picker-list { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
.picker-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid #f3eeea; cursor: pointer; font-size: 14px;
}
.picker-row:hover { background: var(--point-tint); }
.picker-row input { accent-color: var(--point); width: 16px; height: 16px; }

/* 결재선 */
.approval-box {
  background: #fdfaf7; border: 1px solid var(--point-tint2); border-radius: 10px;
  padding: 16px 18px; margin-bottom: 18px;
}
.approval-head { font-weight: 800; font-size: 15px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.approval-req { font-size: 13px; color: #777; margin-bottom: 12px; }
.approval-line { display: flex; gap: 10px; flex-wrap: wrap; }
.approver-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 16px; min-width: 130px; text-align: center; font-size: 13px;
}
.approver-no { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.approver-name { font-weight: 700; font-size: 14px; }
.approver-team { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.approver-comment { margin-top: 5px; color: #666; font-size: 12px; }
.approver-date { color: var(--muted); font-size: 11px; margin-top: 3px; }

.approval-actions { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--point-tint2); }
.approval-actions-label { font-size: 13.5px; margin-bottom: 10px; }
.approval-comment { max-width: 420px; margin-bottom: 10px; }
.approval-btns { display: flex; gap: 8px; }

/* ================= 대시보드 ================= */

.dash-welcome {
  background: linear-gradient(120deg, var(--point), #f0904f);
  color: #fff; border-radius: var(--radius); padding: 22px 28px; margin-bottom: 20px;
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.dash-hello { font-size: 19px; font-weight: 500; }
.dash-hello b { font-weight: 800; }
.dash-date { font-size: 13px; opacity: .9; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dash-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 24px; min-height: 240px;
}
.dash-card-wide { grid-column: 1 / -1; min-height: auto; }
.dash-card-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
  padding-bottom: 10px; border-bottom: 2px solid var(--point-tint2);
}
.dash-card-head h3 { font-size: 16px; font-weight: 800; color: var(--point-deep); }
.dash-card-head .more { font-size: 12px; color: var(--muted); }
.dash-card-head .more:hover { color: var(--point); }

.dash-list { list-style: none; }
.dash-list li a {
  display: flex; justify-content: space-between; gap: 12px; padding: 8px 4px;
  border-bottom: 1px solid #f6f1ec; font-size: 14px;
}
.dash-list li:last-child a { border-bottom: none; }
.dash-list li a:hover .dash-item-title { color: var(--point); }
.dash-item-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-item-date { color: var(--muted); font-size: 12px; flex-shrink: 0; }
.dash-empty { padding: 30px 0; text-align: center; }

/* 미니 캘린더 */
.mini-cal table { width: 100%; border-collapse: collapse; text-align: center; }
.mini-cal-title { text-align: center; font-weight: 800; margin-bottom: 8px; color: var(--ink); }
.mini-cal th { font-size: 12px; color: var(--muted); padding: 4px; font-weight: 600; }
.mini-cal th.sun { color: var(--no); }
.mini-cal th.sat { color: #3b6cb7; }
.mini-cal td { padding: 5px 2px; font-size: 13px; position: relative; height: 34px; }
.mini-cal td.sun .day-num { color: var(--no); }
.mini-cal td.sat .day-num { color: #3b6cb7; }
.mini-cal td.today .day-num {
  background: var(--point); color: #fff; border-radius: 50%;
  display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; font-weight: 700;
}
.mini-cal .dot {
  display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--point);
  position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
}
.mini-cal-today { margin-top: 10px; font-size: 13px; padding-top: 10px; border-top: 1px dashed var(--line); }
.cal-chip {
  display: inline-block; background: var(--point-tint); color: var(--point-deep);
  border-radius: 6px; padding: 1px 8px; font-size: 12px; margin: 1px 2px;
}

/* ================= 월간업무계획 (캘린더 페이지) ================= */

.cal-nav { display: flex; align-items: center; gap: 12px; }
.cal-bulk-wd { display: flex; gap: 4px; flex-wrap: wrap; }
.cal-bulk-range { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cal-nav-title { font-size: 19px; font-weight: 800; min-width: 130px; text-align: center; }
.cal-table { width: 100%; border-collapse: collapse; background: var(--white); table-layout: fixed; }
.cal-table th {
  background: var(--point-tint); color: var(--point-deep); padding: 9px; font-size: 13px;
  border: 1px solid var(--point-tint2);
}
.cal-table th.sun { color: var(--no); }
.cal-table th.sat { color: #3b6cb7; }
.cal-table td {
  border: 1px solid #f0e9e4; vertical-align: top; height: 108px; padding: 6px 7px;
  cursor: pointer; transition: background .12s;
}
.cal-table td:hover { background: var(--point-tint); }
.cal-table td.other-month { background: #faf8f6; cursor: default; }
.cal-table .day-num { font-size: 13px; font-weight: 700; color: #666; }
.cal-table td.sun .day-num { color: var(--no); }
.cal-table td.sat .day-num { color: #3b6cb7; }
.cal-table td.today { background: #fff7f2; box-shadow: inset 0 0 0 2px var(--point); }
.cal-item {
  display: block; background: var(--point); color: #fff; border-radius: 5px;
  font-size: 12px; padding: 1px 7px; margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-item.alt { background: #f0a97f; }
.cal-more { font-size: 11px; color: var(--muted); margin-top: 2px; display: block; }

.sched-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 4px;
  border-bottom: 1px solid #f3eeea;
}
.sched-item:last-child { border-bottom: none; }
.sched-item-body { flex: 1; min-width: 0; }
.sched-item-title { font-weight: 700; }
.sched-item-sub { font-size: 12px; color: var(--muted); }

/* ================= 사내 메신저 ================= */

.msgr {
  display: flex; height: calc(100vh - 210px); min-height: 460px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.msgr-side { width: 265px; border-right: 1px solid var(--line); display: flex; flex-direction: column; flex-shrink: 0; }
.msgr-tools { display: flex; gap: 5px; padding: 10px 12px 0; flex-wrap: wrap; }
.msgr-tools .btn { flex: 1; min-width: 0; padding: 6px 6px; font-size: 12px; }
.msgr-avatar-group { background: #dce7f7; color: #3b6cb7; }
.msgr-side-head { padding: 13px 16px; border-bottom: 1px solid var(--line); background: #fdfaf7; }
.msgr-side-head .input { max-width: none; }
.msgr-users { flex: 1; overflow-y: auto; }
.msgr-user {
  display: flex; align-items: center; gap: 11px; padding: 11px 16px;
  border-bottom: 1px solid #f6f1ec; cursor: pointer; transition: background .12s;
}
.msgr-user:hover { background: #fdf8f4; }
.msgr-user.active { background: var(--point-tint); }
.msgr-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--point-tint2);
  color: var(--point-deep); font-weight: 800; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 15px;
}
.msgr-user-info { flex: 1; min-width: 0; }
.msgr-user-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msgr-muted { font-size: 12px; }

/* 부서/즐겨찾기 그룹 헤더 */
.msgr-group {
  padding: 8px 16px 5px;
  font-size: 12px; font-weight: 800; color: var(--point-deep);
  background: #fdfaf7; border-bottom: 1px solid #f3eeea;
  position: sticky; top: 0; z-index: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 즐겨찾기 별 버튼 */
.msgr-fav {
  border: none; background: transparent; font-size: 18px; line-height: 1;
  color: #cfc8c2; padding: 6px; border-radius: 50%; flex-shrink: 0;
}
.msgr-fav:hover { background: var(--point-tint); }
.msgr-fav.on { color: #f5b301; }

.msgr-head-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msgr-user-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msgr-user-last { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }

.msgr-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #faf7f4; position: relative; }

/* 드래그&드롭 안내 오버레이 */
.msgr-drop {
  position: absolute; inset: 8px; z-index: 5; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  background: rgba(253, 241, 234, .92); border: 2px dashed var(--point); border-radius: 12px;
  font-weight: 800; color: var(--point-deep); font-size: 15px;
}
.msgr-head {
  padding: 13px 20px; background: var(--white); border-bottom: 1px solid var(--line);
  font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 10px;
}
.msgr-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--muted); flex-direction: column; gap: 10px; }
.msgr-body { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }

.msg-row { display: flex; margin-bottom: 8px; align-items: flex-end; gap: 8px; }
.msg-row.me { justify-content: flex-end; }
.msg-bubble {
  max-width: 62%; padding: 9px 14px; border-radius: 16px; font-size: 14px;
  white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}
.msg-row.other .msg-bubble { background: var(--white); border: 1px solid var(--line); border-top-left-radius: 4px; }
.msg-row.me .msg-bubble { background: var(--point); color: #fff; border-top-right-radius: 4px; }
.msg-row.me .msg-bubble a { color: #fff; }
.msg-sender { font-size: 12px; color: var(--muted); margin: 6px 0 2px 4px; }
.msg-time { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.msg-file-link { display: inline-flex; align-items: center; gap: 5px; text-decoration: underline; font-weight: 600; }
.msg-date-sep { text-align: center; margin: 12px 0 8px; }
.msg-date-sep span {
  background: #eee6df; color: #8a827b; font-size: 11.5px; border-radius: 20px; padding: 3px 14px;
}

/* 안읽음 배지 (카카오톡 스타일) */
.msgr-unread {
  background: #ff3b30; color: #fff; border-radius: 20px;
  font-size: 11px; font-weight: 800; padding: 1px 7px;
  flex-shrink: 0; margin-right: 2px; min-width: 20px; text-align: center;
}

/* 검색 결과 행 */
.msgr-hit-date { font-weight: 400; font-size: 11px; color: var(--muted); }
.msgr-search-hit .msgr-user-last b { color: var(--point); }

/* 내 메시지 수정/삭제 버튼 (마우스 올리면 표시) */
.msg-actions { display: inline-flex; gap: 4px; opacity: 0; transition: opacity .15s; align-self: center; }
.msg-row.me:hover .msg-actions { opacity: 1; }
.msg-act {
  border: 1px solid var(--line); background: var(--white); border-radius: 6px;
  font-size: 11px; padding: 2px 7px; color: #888;
}
.msg-act:hover { color: var(--point); border-color: var(--point); }

/* 검색 결과에서 진입한 메시지 강조 */
.msg-flash .msg-bubble { animation: msgFlash 1.8s; }
@keyframes msgFlash {
  0%, 55% { box-shadow: 0 0 0 3px var(--point); }
  100% { box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
}

/* 이미지 메시지 */
.msg-img { max-width: 220px; max-height: 260px; border-radius: 12px; display: block; cursor: zoom-in; }
.msg-row .msg-bubble.msg-bubble-img { background: transparent; border: none; box-shadow: none; padding: 0; }

/* 파일 메시지 카드 */
.msg-file-card {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .95); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; min-width: 190px; max-width: 100%; color: var(--ink); cursor: pointer;
}
.msg-file-card:hover { border-color: var(--point); }
.msg-file-card:not([data-msgfile]) { cursor: default; }
.msg-file-card:not([data-msgfile]):hover { border-color: var(--line); }
.msg-file-icon { font-size: 24px; flex-shrink: 0; }
.msg-file-meta { display: flex; flex-direction: column; min-width: 0; }
.msg-file-name { font-weight: 700; font-size: 13px; word-break: break-all; }
.msg-file-size { font-size: 11.5px; color: var(--muted); }
.msg-file-btns { display: flex; gap: 14px; margin-top: 6px; padding: 0 3px; }
.msg-file-btns .msg-file-open {
  border: none; background: transparent; font-size: 12px;
  text-decoration: underline; color: inherit; padding: 0; cursor: pointer;
}
.msg-file-save { font-size: 12px; text-decoration: underline; color: inherit; }

/* 첨부 칩 썸네일 */
.chip-thumb { width: 22px; height: 22px; object-fit: cover; border-radius: 4px; }

.msgr-input { background: var(--white); border-top: 1px solid var(--line); padding: 12px 14px; display: flex; gap: 9px; align-items: flex-end; }
.msgr-input textarea {
  flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 9px 13px;
  resize: none; outline: none; max-width: none; height: 44px; max-height: 120px;
}
.msgr-input textarea:focus { border-color: var(--point); }
.msgr-file-chip { font-size: 12px; color: var(--point-deep); max-width: 100%; word-break: break-all; }
.msgr-schedule { flex-shrink: 0; }

/* 예약 메시지 배너 */
.msgr-sched-banner {
  background: #fff7ef; border-top: 1px solid var(--point-tint2); padding: 7px 12px;
  font-size: 12px; color: var(--point-deep); display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.msgr-sched-label { font-weight: 700; }
.msgr-sched-item {
  background: var(--white); border: 1px solid var(--point-tint2); border-radius: 14px; padding: 2px 4px 2px 10px;
  display: inline-flex; align-items: center; gap: 6px;
}
.msgr-sched-cancel { border: none; background: transparent; color: var(--no); font-size: 11px; padding: 2px 6px; border-radius: 10px; cursor: pointer; }
.msgr-sched-cancel:hover { background: #fdf0f0; }

/* 다중 선택 삭제 */
.msgr-select-bar { background: var(--white); border-top: 1px solid var(--line); padding: 8px 12px; display: flex; align-items: center; gap: 8px; }
.msgr-select-count { font-size: 13px; font-weight: 700; }
.msg-select { width: 17px; height: 17px; accent-color: var(--point); flex-shrink: 0; align-self: center; margin: 0 4px; }
.msg-row.selecting { cursor: pointer; align-items: center; }
.msg-row.selecting.me { flex-direction: row; }
.msg-row.selecting.me .msg-select { order: -1; }

/* ================= 1:1 문의 ================= */

.inq-layout { display: grid; grid-template-columns: 5fr 4fr; gap: 20px; align-items: start; }
.inq-panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 24px;
}
.inq-panel h3 {
  font-size: 16px; font-weight: 800; color: var(--point-deep);
  padding-bottom: 10px; border-bottom: 2px solid var(--point-tint2); margin-bottom: 12px;
}
.inq-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.inq-tab {
  border: 1px solid var(--line); background: var(--white); border-radius: 20px;
  padding: 5px 16px; font-size: 13px; font-weight: 600;
}
.inq-tab.active { background: var(--point); border-color: var(--point); color: #fff; }
.inq-item { padding: 11px 6px; border-bottom: 1px solid #f3eeea; cursor: pointer; }
.inq-item:hover { background: #fdf8f4; }
.inq-item-title { font-weight: 700; font-size: 14px; }
.inq-item-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ================= 관리자 ================= */

.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.org-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px;
}
.org-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.org-card-head h3 { font-size: 17px; font-weight: 800; color: var(--ink); }
.org-teams { margin-bottom: 12px; min-height: 34px; }
.org-add-row { display: flex; gap: 8px; }
.org-add-row .input { max-width: none; }
.org-new-card { display: flex; gap: 10px; margin-bottom: 20px; max-width: 480px; }
.org-new-card .input { max-width: none; }

.pw-cell { font-family: monospace; letter-spacing: 2px; color: var(--muted); }

/* ================= 대외비 잠금 화면 ================= */

.gate-wrap { display: flex; justify-content: center; padding: 60px 0; }
.gate-card {
  background: var(--white); border: 2px solid var(--point); border-radius: 16px;
  box-shadow: var(--shadow); padding: 40px 44px; text-align: center; max-width: 400px; width: 100%;
}
.gate-icon { font-size: 40px; margin-bottom: 10px; }
.gate-title { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.gate-desc { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.gate-card .input { max-width: none; margin-bottom: 10px; text-align: center; }

/* ================= 모달 ================= */

.modal-overlay {
  position: fixed; inset: 0; background: rgba(40, 25, 15, .45); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--white); border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
  width: 100%; max-width: 460px; max-height: 86vh; display: flex; flex-direction: column;
  animation: modalIn .18s ease;
}
.modal-wide { max-width: 680px; }
@keyframes modalIn { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px; border-bottom: 1px solid var(--line);
}
.modal-title { font-weight: 800; font-size: 16px; color: var(--point-deep); }
.modal-close {
  border: none; background: transparent; font-size: 22px; color: var(--muted);
  line-height: 1; padding: 2px 6px; border-radius: 6px;
}
.modal-close:hover { background: #f4efeb; color: var(--ink); }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-body .input { max-width: none; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 8px; padding: 13px 20px;
  border-top: 1px solid var(--line);
}
.modal-footer:empty { display: none; }
.confirm-msg { font-size: 14.5px; padding: 6px 2px; }

.fb-guide p { margin-bottom: 10px; }
.fb-guide ol { padding-left: 20px; }
.fb-guide li { margin-bottom: 6px; }
.fb-guide a { color: var(--point); text-decoration: underline; }

/* 모달 내 폼 행 */
.mrow { margin-bottom: 12px; }
.mrow label { display: block; font-size: 13px; font-weight: 700; color: #55504b; margin-bottom: 5px; }

/* ================= 공지 팝업 ================= */

.perm-check { display: flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; font-weight: 400; }
.perm-check input { accent-color: var(--point); width: 16px; height: 16px; }

.popup-edit { min-height: 200px; }
.popup-edit-hint { font-size: 12px; margin-top: 6px; }

.popup-notice-overlay {
  position: fixed; inset: 0; background: rgba(40, 25, 15, .5); z-index: 260;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.popup-notice {
  background: var(--white); border-radius: 14px; overflow: hidden;
  width: 100%; max-width: 460px; max-height: 82vh; display: flex; flex-direction: column;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3); animation: modalIn .2s ease;
  border-top: 5px solid var(--point);
}
.popup-notice-head {
  padding: 15px 20px; font-weight: 800; font-size: 17px; color: var(--point-deep);
  border-bottom: 1px solid var(--line);
}
.popup-notice-body {
  padding: 20px; overflow-y: auto; font-size: 14.5px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
}
.popup-notice-body.rich-view { white-space: normal; }
.popup-notice-body img { max-width: 100%; border-radius: 8px; margin: 6px 0; }
.popup-notice-link { cursor: pointer; }
.popup-notice-link:hover { background: #fdf8f4; }
.popup-notice-btns { display: flex; gap: 8px; }
.popup-notice-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 20px; border-top: 1px solid var(--line); background: #faf8f6;
}
.popup-notice-again { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #666; cursor: pointer; }
.popup-notice-again input { accent-color: var(--point); width: 16px; height: 16px; }

/* ================= 토스트 ================= */

.toast-wrap {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.toast {
  background: #3a322c; color: #fff; border-radius: 30px; padding: 10px 24px;
  font-size: 14px; opacity: 0; transform: translateY(8px); transition: all .25s;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25); max-width: 90vw;
}
.toast.show { opacity: 1; transform: none; }
.toast-error { background: var(--no); }

/* ================= 메신저 알림 (오른쪽 아래 팝업) ================= */

.msg-notify-wrap {
  position: fixed; right: 18px; bottom: 18px; z-index: 320;
  display: flex; flex-direction: column; gap: 10px;
  width: 330px; max-width: calc(100vw - 24px);
}
.msg-notify {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--point);
  border-radius: 12px; box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
  padding: 12px 13px; cursor: pointer;
  opacity: 0; transform: translateY(10px); transition: all .25s;
}
.msg-notify.show { opacity: 1; transform: none; }
.msg-notify .msgr-avatar { width: 34px; height: 34px; font-size: 14px; }
.msg-notify-body { flex: 1; min-width: 0; }
.msg-notify-name { font-weight: 800; font-size: 14px; }
.msg-notify-name::after { content: ' 님의 메시지'; font-weight: 400; color: var(--muted); font-size: 12px; }
.msg-notify-text {
  font-size: 13px; color: #555; word-break: break-all;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.msg-notify-x {
  border: none; background: transparent; color: var(--muted);
  font-size: 17px; line-height: 1; padding: 0 3px; border-radius: 6px;
}
.msg-notify-x:hover { background: #f4efeb; color: var(--ink); }

/* ================= 전체 안내 팝업 (오른쪽 아래) ================= */

.announce-notify-wrap {
  position: fixed; right: 18px; bottom: 18px; z-index: 330;
  display: flex; flex-direction: column; gap: 10px;
  width: 360px; max-width: calc(100vw - 24px);
}
.announce-notify {
  background: var(--white); border: 1px solid var(--line); border-left: 4px solid #3b6cb7;
  border-radius: 12px; box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
  padding: 12px 14px; opacity: 0; transform: translateY(10px); transition: all .25s;
  max-height: 60vh; overflow-y: auto;
}
.announce-notify.show { opacity: 1; transform: none; }
.announce-notify-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.announce-notify-tag { font-weight: 800; font-size: 13px; color: #3b6cb7; }
.announce-notify-from { font-size: 12px; color: var(--muted); flex: 1; }
.announce-notify-x { border: none; background: transparent; color: var(--muted); font-size: 17px; line-height: 1; padding: 0 3px; border-radius: 6px; }
.announce-notify-x:hover { background: #f4efeb; color: var(--ink); }
.announce-notify-title { font-weight: 800; font-size: 14.5px; margin-bottom: 4px; word-break: break-word; }
.announce-notify-body { font-size: 13.5px; color: #444; white-space: pre-wrap; word-break: break-word; }
.announce-notify-body.rich-view { white-space: normal; }
.announce-notify-body img { max-width: 100%; border-radius: 6px; }
.announce-notify-files { margin-top: 8px; }

/* 안내하기 탭 안내문 */
.ann-guide {
  background: var(--point-tint); border: 1px solid var(--point-tint2); border-radius: 10px;
  padding: 12px 16px; margin-bottom: 16px;
}
.ann-guide-line { font-size: 14px; line-height: 1.7; }
.ann-guide-line b { color: var(--point-deep); }

/* 안내 작성 폼 */
.announce-form .ann-mode { display: flex; gap: 14px; flex-wrap: wrap; }
.ann-mode-opt { display: flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; }
.ann-mode-opt input { accent-color: var(--point); }
.ann-recur { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ann-weekdays { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.ann-wd { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; cursor: pointer; }
.ann-wd input { accent-color: var(--point); }

/* 메뉴 빨간 점 (새 메시지 표시) */
.menu-dot {
  display: none; width: 8px; height: 8px; border-radius: 50%;
  background: #ff3b30; border: 1.5px solid #fff;
  margin-left: 4px; vertical-align: 2px;
}
.menu-dot.on { display: inline-block; }

/* ================= 모바일 햄버거 + 서랍 메뉴 ================= */

.menu-hamburger {
  display: none; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--white); border-radius: 8px;
  font-size: 18px; padding: 3px 10px; color: var(--ink);
}

.drawer-overlay {
  position: fixed; inset: 0; background: rgba(40, 25, 15, .45); z-index: 220; display: none;
}
.drawer-overlay.open { display: block; }
.drawer {
  position: absolute; top: 0; left: 0; bottom: 0; width: 300px; max-width: 84vw;
  background: var(--white); overflow-y: auto; box-shadow: 6px 0 24px rgba(0, 0, 0, .2);
  animation: drawerIn .2s ease;
}
@keyframes drawerIn { from { transform: translateX(-40px); opacity: .4; } to { transform: none; opacity: 1; } }
.drawer-head {
  background: var(--point); color: #fff; padding: 15px 18px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 1;
}
.drawer-user { font-size: 15px; }
.drawer-close { border: none; background: transparent; color: #fff; font-size: 25px; line-height: 1; padding: 0 4px; }
.drawer-body a {
  display: block; padding: 12px 20px; border-bottom: 1px solid #f6f1ec; font-size: 14.5px;
}
.drawer-body a:active { background: var(--point-tint); }
.drawer-single { font-weight: 700; }
.drawer-admin { color: var(--point-deep); }
.drawer-group-title {
  padding: 12px 20px; font-weight: 800; color: var(--point-deep); background: #fdfaf7;
  border-bottom: 1px solid #f3eeea; cursor: pointer; user-select: none;
  display: flex; justify-content: space-between; align-items: center;
}
.drawer-group-title .caret { transition: transform .15s; font-size: 11px; color: var(--muted); }
.drawer-group .drawer-items { display: none; }
.drawer-group.open .drawer-items { display: block; }
.drawer-group.open .drawer-group-title .caret { transform: rotate(180deg); }
.drawer-group .drawer-items a { padding-left: 34px; }

/* 메신저 모바일 뒤로가기 버튼 (PC에서는 숨김) */
.msgr-back { display: none; }

/* ================= 반응형 ================= */

@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
  .inq-layout { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; gap: 6px; }
  .form-label { width: auto; padding-top: 0; }
  .msgr-side { width: 200px; }
  .brand-header-sub { display: none; }
}

/* ================= 모바일 (세로 화면 최적화) ================= */

@media (max-width: 768px) {
  /* 상단: 햄버거 메뉴로 전환, 가로 메뉴바 숨김 */
  .menu-hamburger { display: inline-flex; }
  .menubar { display: none; }
  .topbar { position: sticky; top: 0; z-index: 90; }
  .topbar-in { padding: 9px 12px; gap: 8px; }
  .brand-text-dark { font-size: 19px; }
  .brand-header { min-width: 0; }
  .brand-header .logo-badge { width: 28px; height: 28px; }
  .brand-header .logo-img-header { height: auto; max-height: 32px; max-width: 44vw; width: auto; object-fit: contain; }
  /* 사용자 정보는 서랍 메뉴 상단에 표시되므로 상단바에서는 숨김 */
  .user-info { display: none; }
  /* 연결 상태 배지는 색 점으로 축소 (버튼일 때 터치 영역은 넓게 유지) */
  .mode-badge { font-size: 0; padding: 0; width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; position: relative; }
  .mode-badge.mode-fb { background: var(--ok); }
  .mode-badge.mode-local { background: var(--hold); }
  .mode-badge.mode-local::after { content: ''; position: absolute; inset: -14px; }
  #logoutBtn { padding: 5px 10px; font-size: 12.5px; flex-shrink: 0; }

  /* 본문 여백/타이포 */
  .main { padding: 16px 12px 50px; }
  .page-head { gap: 8px; }
  .page-head h2 { font-size: 19px; }
  .board-search { max-width: 130px; }
  .detail-card, .form-card { padding: 18px 15px; }
  .detail-table th { width: 105px; padding: 8px 10px; font-size: 12.5px; }
  .detail-table td { padding: 8px 10px; }

  /* 입력 필드: 모바일에서 확대(iOS 자동 줌) 방지 */
  .input, .msgr-input textarea { font-size: 16px; }

  /* 폼 버튼 전체 너비 */
  .form-btns { flex-direction: column; }
  .form-btns .btn { width: 100%; }

  /* 대시보드 */
  .dash-welcome { padding: 16px 18px; }
  .dash-hello { font-size: 16px; }
  .dash-card { padding: 16px 16px; min-height: auto; }

  /* 캘린더: 상단 내비 줄바꿈 허용 + 표는 가로 스크롤로 유지 */
  .cal-nav { flex-wrap: wrap; gap: 6px; }
  .cal-nav-title { min-width: 0; font-size: 16px; }
  .cal-table { min-width: 560px; }
  .cal-table td { height: 84px; }

  /* 결재선 카드 */
  .approver-card { flex: 1; min-width: 104px; padding: 8px 10px; }
  .approver-field .approver-row .input { max-width: 100%; }

  /* 모달 */
  .modal { max-width: calc(100vw - 20px); }

  /* 메신저: 목록 ↔ 채팅 화면 전환 (카카오톡 방식) */
  .msgr { height: calc(100vh - 165px); height: calc(100dvh - 165px); min-height: 420px; }
  .msgr-side { width: 100%; border-right: none; }
  .msgr-main { display: none; }
  .msgr.chat-open .msgr-side { display: none; }
  .msgr.chat-open .msgr-main { display: flex; }
  .msgr-back { display: inline-flex; padding: 4px 10px; font-size: 16px; }
  .msgr-user-last { max-width: none; }
  .msg-bubble { max-width: 78%; }
  .msgr-head { padding: 10px 12px; gap: 7px; }
  .msgr-pref-noti, .msgr-pref-sound { padding: 4px 7px; font-size: 12px; }
  .msg-actions { opacity: .55; } /* 모바일: 호버가 없으므로 항상 옅게 표시 */
  .msg-img { max-width: 170px; max-height: 210px; }
  .file-thumb { width: 90px; height: 90px; }

  /* 알림 팝업: 화면 폭에 맞춤 */
  .msg-notify-wrap { right: 10px; bottom: 12px; left: 10px; width: auto; }

  /* 로그인 */
  .login-wrap { padding: 16px; }
  .login-card { padding: 34px 24px 28px; }
  .brand-text-orange { font-size: 34px; }
  .brand-login-sub { font-size: 22px; letter-spacing: 4px; }
}
