/*
 * 워크허브 화면 부품(새 구조, 설계서 §12.2). 모든 클래스는 wh- 로 시작한다(Bootstrap·Sneat과 이름이 겹치지 않게).
 * 틀(주 메뉴, 기능별 사이드바, 상단바)과 화면 안의 부품이 전부 이 파일에 있다. 모양은 다우오피스를 따른다.
 * Sneat Free 3.0.0은 글자 기본값과 드롭다운(Bootstrap)에만 쓴다.
 * 모양 기준(다우오피스처럼 둥글고 여유 있게): 글자 13px, 줄 높이 1.5, 입력·버튼 높이 32px, 간격 4·8·12·16,
 * 그림자 없이 옅은 1px 선, 본문은 화면 폭 가득. 모서리는 크기에 따라 셋: 카드 14px, 안쪽 칸 10px, 버튼·입력 8px. 표시는 알약.
 * 색·모서리는 아래 변수만 쓴다(값은 Sneat 팔레트). 부품 모음: /dev/parts (dev 프로필에서만 열린다).
 *
 * 예전 부품(app.css)은 화면을 모두 옮기고 지웠다(2026-11-20).
 */
/* 글꼴: Pretendard 1.3.9(OFL 1.1, static/vendor/pretendard-1.3.9). 굵기 100~900이 한 파일에 든 가변 글꼴이다. CDN을 쓰지 않는다. */
@font-face {
    font-family: "Pretendard";
    font-weight: 100 900;
    font-style: normal;
    font-display: block; /* 다른 글꼴로 먼저 그렸다가 바꾸지 않는다(처음 한 번만 받고 그 뒤는 브라우저에 저장된 것을 쓴다) */
    src: url("../vendor/pretendard-1.3.9/PretendardVariable.woff2") format("woff2");
}
:root {
    --wh-primary: #5f61e6;
    --wh-primary-ink: #5243bd;
    --wh-primary-soft: #e7e7ff;
    --wh-chart-prev: #76808f; /* 차트의 비교 계열(지난달): 회색 점선 */
    /* 차트에서 항목을 가르는 색(이 순서로만 쓴다. 8개를 넘으면 "기타"로 묶는다). 색각 이상에서도 이웃한 색이 갈리는 조합이다 */
    --wh-series-1: #2a78d6;
    --wh-series-2: #eb6834;
    --wh-series-3: #1baf7a;
    --wh-series-4: #eda100;
    --wh-series-5: #e87ba4;
    --wh-series-6: #008300;
    --wh-series-7: #6250d6;
    --wh-series-8: #e34948;
    --wh-bg: #ffffff;
    --wh-rail-bg: #f3f4f7;
    --wh-header-h: 56px;
    --wh-rail-w: 188px;
    --wh-subnav-w: 208px;
    /* 조직도 패널이 주 메뉴 바로 옆에 열리도록 Sneat 변수를 우리 폭으로 맞춘다 */
    --bs-menu-width: 188px;
    --wh-surface: #ffffff;
    --wh-surface-2: #f5f6f8;
    --wh-text: #384551;
    --wh-text-2: #566a7f;
    --wh-muted: #5e6b79;
    --wh-line: #e9ebef;
    --wh-line-strong: #c9ced6;
    --wh-ok-bg: #e8fadf;
    --wh-ok: #356d15;
    --wh-info-bg: #e0f7fd;
    --wh-info: #006980;
    --wh-warn-bg: #fff2d6;
    --wh-warn: #995c00;
    --wh-danger-bg: #ffe0db;
    --wh-danger: #c42d12;
    --wh-neutral-bg: #ebeef0;
    --wh-neutral: #566a7f;
    --wh-radius: 8px;
    --wh-radius-card: 14px;
    --wh-radius-block: 10px;
    --wh-h: 32px;

    /* Sneat 기본 글꼴(Public Sans) 대신 위에서 넣은 Pretendard를 쓴다. 뒤의 글꼴은 파일을 못 읽었을 때의 대비다 */
    --bs-font-sans-serif: "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
}

/* ---------------------------------------------------------------- 어두운 화면(다크모드, 설계서 §12.38)
   사용자 메뉴의 "어둡게 보기"로 켠다. 값은 브라우저에 기억한다(html의 data-theme="dark").
   색 변수만 바꾸는 것이 원칙이고, 변수로 안 되는 것만 이 절 아래에 따로 적는다. 급여명세서(wh-sheet)는 종이라 흰 바탕 그대로다 */
:root[data-theme="dark"] {
    color-scheme: dark;
    --wh-primary: #5f61e6;         /* 흰 글자를 올리는 바탕이라 그대로 둔다 */
    --wh-primary-ink: #b9baff;     /* 어두운 바탕 위의 강조 글자 */
    --wh-primary-soft: #2c2e5e;
    --wh-chart-prev: #8e98a8;
    --wh-series-1: #4a92ea;
    --wh-series-6: #33a833;
    --wh-series-7: #8a78f2;
    --wh-bg: #16181d;
    --wh-rail-bg: #1b1e24;
    --wh-surface: #1f2229;
    --wh-surface-2: #292d36;
    --wh-text: #e3e6eb;
    --wh-text-2: #b7bfca;
    --wh-muted: #9aa4b2;
    --wh-line: #30353f;
    --wh-line-strong: #4a515e;
    --wh-ok-bg: #1c3a1a;
    --wh-ok: #8fd96b;
    --wh-info-bg: #103642;
    --wh-info: #6fd3ea;
    --wh-warn-bg: #40300d;
    --wh-warn: #f0b952;
    --wh-danger-bg: #47211b;
    --wh-danger: #ff9483;
    --wh-neutral-bg: #2d323b;
    --wh-neutral: #b7bfca;
}
/* 강조색(보라)은 어두운 바탕에서 글자로 쓰기에 흐리다: 링크 글자는 밝은 보라로 */
[data-theme="dark"] { --bs-custom-link-color: var(--wh-primary-ink); --bs-link-color: var(--wh-primary-ink); --bs-link-color-rgb: 185, 186, 255; --bs-link-hover-color: #d6d7ff; --bs-link-hover-color-rgb: 214, 215, 255; }
[data-theme="dark"] .wh-link, [data-theme="dark"] .wh-quick i, [data-theme="dark"] .wh-stats > div:not(.wh-stat) > a { color: var(--wh-primary-ink); }
[data-theme="dark"] .wh-rail-list a:hover { background: #262a32; }
/* 사용자 메뉴(Bootstrap 드롭다운): Sneat가 흰 바탕으로 두므로 우리 색으로 */
[data-theme="dark"] .dropdown-menu {
    --bs-dropdown-bg: var(--wh-surface); --bs-dropdown-color: var(--wh-text); --bs-dropdown-border-color: var(--wh-line);
    --bs-dropdown-link-color: var(--wh-text); --bs-dropdown-link-hover-color: var(--wh-text); --bs-dropdown-link-hover-bg: var(--wh-surface-2);
    --bs-dropdown-link-active-color: var(--wh-text); --bs-dropdown-link-active-bg: var(--wh-surface-2); --bs-dropdown-divider-bg: var(--wh-line);
    background: var(--wh-surface); border: 1px solid var(--wh-line);
}
[data-theme="dark"] .dropdown-item { color: var(--wh-text); }
[data-theme="dark"] .dropdown-item:hover, [data-theme="dark"] .dropdown-item:focus { background: var(--wh-surface-2); color: var(--wh-text); }
/* jsTree 기본 테마의 밝은 하늘색 선택·올림 바탕을 덮는다 */
[data-theme="dark"] .wh-jstree .jstree-hovered { background: var(--wh-surface-2); }
[data-theme="dark"] .wh-jstree .jstree-clicked { background: var(--wh-primary-soft); }
[data-theme="dark"] .wh-c0 { background: #2c3470; color: #c3caff; }
[data-theme="dark"] .wh-c1 { background: #12433e; color: #8fe0d6; }
[data-theme="dark"] .wh-c2 { background: #4d2f12; color: #ffc48f; }
[data-theme="dark"] .wh-c3 { background: #44225a; color: #e3b4f7; }
[data-theme="dark"] .wh-c4 { background: #343944; color: #c5cbd8; }
[data-theme="dark"] .wh-msg-info { background: #23294f; color: #c3caff; }
[data-theme="dark"] .wh-btn-primary:hover, [data-theme="dark"] .wh-cal-day.wh-on:hover { background: #4f51d0; border-color: #4f51d0; }
[data-theme="dark"] .wh-btn-soft:hover { background: #383b78; }
[data-theme="dark"] .wh-btn-danger { border-color: #6b3028; }
[data-theme="dark"] .wh-table tbody tr:hover td { background: #242830; }
[data-theme="dark"] .wh-cal-day:disabled { color: #5b6370; }
[data-theme="dark"] .wh-cal-day.wh-holiday:disabled { color: #8a4a42; }
[data-theme="dark"] .wh-fc .fc-day-sat .fc-col-header-cell-cushion, [data-theme="dark"] .wh-fc .fc-day-sat .fc-daygrid-day-number { color: #7fb0f5; }
[data-theme="dark"] .wh-company-logo, [data-theme="dark"] .wh-brand-logo { filter: invert(1); } /* 검은 로고 그림을 흰색으로 */

body { background: var(--wh-bg); }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- 틀: 헤더(폭 전체) 아래에 주 메뉴 + 기능별 사이드바 + 본문 (다우오피스 구조) */

/* 화면마다 있는 감싸는 칸(layout-wrapper 등)의 Sneat 규칙을 지우고 우리 배치만 남긴다 */
.layout-wrapper, .layout-container { display: flex; flex: 1 1 auto; width: 100%; min-height: 100vh; }
/* 헤더는 맨 위에 고정하고, 그 높이만큼 아래 칸들을 내린다 */
.layout-page { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; padding: 0 !important; margin: 0 !important; }
.content-wrapper { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; margin-top: var(--wh-header-h); }
.layout-overlay { display: none; }

.wh-nav { position: sticky; top: var(--wh-header-h); align-self: flex-start; flex: none; display: flex; height: calc(100vh - var(--wh-header-h)); margin-top: var(--wh-header-h); z-index: 1000; }
.wh-rail { width: var(--wh-rail-w); display: flex; flex-direction: column; padding: 12px 10px 10px; background: var(--wh-rail-bg); border-right: 1px solid var(--wh-line); overflow-y: auto; }
.wh-topbar-brand { display: flex; align-items: center; gap: 8px; margin-right: 16px; text-decoration: none; }
.wh-brand-logo { height: 30px; width: auto; flex: none; }
.wh-rail-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.wh-rail-list a {
    display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: 8px;
    color: var(--wh-text); font-size: 14px; text-decoration: none; white-space: nowrap;
}
.wh-rail-list a i { font-size: 18px; flex: none; }
.wh-rail-list a:hover { background: #e8eaef; color: var(--wh-text); }
.wh-rail-list a.wh-on { background: var(--wh-primary); color: #fff; font-weight: 600; }
.wh-rail-bottom { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--wh-line); }

.wh-subnav { width: var(--wh-subnav-w); padding: 0 14px 16px; background: var(--wh-surface); border-right: 1px solid var(--wh-line); overflow-y: auto; }
.wh-subnav-title { height: 52px; margin: 0 0 4px; padding: 0 6px; display: flex; align-items: center; font-size: 17px; font-weight: 700; color: var(--wh-text); }
.wh-subnav-action {
    display: flex; align-items: center; justify-content: center; height: 40px; margin: 0 0 18px; border: 1px solid var(--wh-text);
    border-radius: 10px; background: var(--wh-surface); color: var(--wh-text); font-size: 14px; font-weight: 600; text-decoration: none;
}
.wh-subnav-action:hover { background: var(--wh-surface-2); color: var(--wh-text); }
.wh-subnav-group { margin: 0 0 16px; }
.wh-subnav-group h3 { margin: 0; padding: 4px 6px; font-size: 13px; font-weight: 700; color: var(--wh-text); }
.wh-subnav-group ul { list-style: none; margin: 0; padding: 0; }
.wh-subnav-group a { display: block; padding: 6px 8px 6px 20px; border-radius: 7px; color: var(--wh-text-2); font-size: 13px; text-decoration: none; }
.wh-subnav-group a:hover { background: var(--wh-surface-2); color: var(--wh-text); }
.wh-subnav-group a.wh-on { color: var(--wh-primary-ink); font-weight: 600; }

.wh-topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1001;
    height: var(--wh-header-h); min-height: var(--wh-header-h); margin: 0; padding: 0 20px 0 16px; border-radius: 0; box-shadow: none !important;
    background: var(--wh-surface) !important; border-bottom: 1px solid var(--wh-line);
}
.wh-topbar .dropdown-item { font-size: 13px; }
.wh-topbar form { margin: 0; }
.wh-topbar-user { display: flex; align-items: center; gap: 8px; color: var(--wh-text); font-size: 13px; font-weight: 600; }
/* 알림(종): 안 읽은 건수(wh-count)를 오른쪽 위에 얹는다 */
.wh-topbar-bell { position: relative; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-right: 12px; border-radius: 8px; color: var(--wh-text-2); font-size: 20px; text-decoration: none; }
.wh-topbar-bell:hover { background: var(--wh-surface-2); color: var(--wh-text); }
.wh-topbar-bell:focus-visible { outline: 2px solid var(--wh-primary); outline-offset: 2px; }
.wh-topbar-bell .wh-count { position: absolute; top: -2px; right: -6px; }
.wh-count[hidden] { display: none; }
/* 알림 창: 종 아래(오른쪽 위)에 열린다. 길면 목록만 안에서 스크롤한다 */
dialog.wh-notipanel {
    position: fixed; inset: calc(var(--wh-header-h) + 4px) 16px auto auto; margin: 0; z-index: 1100;
    width: min(440px, calc(100vw - 16px)); max-height: min(560px, calc(100vh - var(--wh-header-h) - 16px)); padding: 0;
    border: 0; border-radius: 16px; background: var(--wh-surface); color: var(--wh-text);
    font-size: 13px; box-shadow: 0 8px 28px rgba(34, 48, 62, 0.18); overflow: hidden;
}
dialog.wh-notipanel[open] { display: flex; }
.wh-notipanel-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.wh-notipanel-list { flex: 1; min-height: 0; overflow-y: auto; border-top: 1px solid var(--wh-line); }
.wh-notipanel-list .wh-row-main strong { white-space: normal; }
.wh-notipanel-foot { padding: 10px 16px; border-top: 1px solid var(--wh-line); text-align: center; }
/* 좁은 화면: 메뉴를 숨기고 상단바 단추로 연다 */
@media (max-width: 1199.98px) {
    .wh-nav { position: fixed; left: 0; top: var(--wh-header-h); margin-top: 0; transform: translateX(-100%); transition: transform 0.18s ease; }
    html.wh-nav-open .wh-nav { transform: none; box-shadow: 0 8px 28px rgba(34, 48, 62, 0.18); }
    html.wh-nav-open .layout-overlay { display: block; position: fixed; inset: var(--wh-header-h) 0 0 0; z-index: 999; background: rgba(34, 48, 62, 0.4); }
}
@media (prefers-reduced-motion: reduce) {
    .wh-nav { transition: none; }
}

.wh-page { flex: 1 1 auto; display: flex; flex-direction: column; gap: 16px; padding: 20px 28px 32px; min-width: 0; font-size: 13px; line-height: 1.5; color: var(--wh-text); }
.wh-page-narrow { max-width: 760px; }

/* 화면 머리: 위치(작게) · 제목 · 오른쪽 동작 */
.wh-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px; }
.wh-head-where { display: block; font-size: 12px; color: var(--wh-muted); }
.wh-head h1 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.4; letter-spacing: -0.01em; color: var(--wh-text); }
.wh-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------------------------------------------------------------- 글자·도우미 */

.wh-num { font-variant-numeric: tabular-nums; }
.wh-muted { color: var(--wh-muted); }
.wh-small { font-size: 12px; }
.wh-right { text-align: right; }
.wh-link { color: var(--wh-primary); text-decoration: none; }
.wh-link:hover { color: var(--wh-primary-ink); text-decoration: underline; }
.wh-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- 카드와 배치 */

.wh-card { background: var(--wh-surface); border: 1px solid var(--wh-line); border-radius: var(--wh-radius-card); min-width: 0; overflow: hidden; }
.wh-card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    min-height: 48px; padding: 4px 16px 0;
}
.wh-card-head h2 { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; color: var(--wh-text); }
.wh-card-body { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.wh-card-head + .wh-card-body { padding-top: 8px; }
.wh-card-foot { padding: 8px 16px 16px; }

.wh-cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; }
.wh-cols > * { flex: 1 1 360px; min-width: 0; }
.wh-cols > .wh-col-wide { flex: 3 1 420px; }
.wh-cols > .wh-col-narrow { flex: 2 1 280px; }
.wh-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* 요약 숫자 줄: 칸마다 이름 · 큰 숫자 · 한 줄 */
.wh-stats { display: flex; flex-wrap: wrap; background: var(--wh-surface); border: 1px solid var(--wh-line); border-radius: var(--wh-radius-card); overflow: hidden; }
.wh-stat { flex: 1 1 140px; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-left: 1px solid var(--wh-line); color: var(--wh-text); text-decoration: none; }
.wh-stat:first-child { border-left: 0; }
a.wh-stat:hover { background: var(--wh-surface-2); color: var(--wh-text); }
.wh-stat-name { font-size: 12px; color: var(--wh-muted); }
.wh-stat-value { font-size: 22px; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; }
.wh-stat-value.wh-accent { color: var(--wh-primary-ink); }
.wh-stat-note { font-size: 12px; color: var(--wh-muted); }

/* 이름-값 표(상세 화면) */
.wh-fields { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 6px 12px; margin: 0; }
.wh-fields dt { font-weight: 400; color: var(--wh-muted); }
.wh-fields dd { margin: 0; }

.wh-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.wh-chips li { display: inline-flex; gap: 6px; padding: 1px 8px; border-radius: 999px; background: var(--wh-surface-2); border: 1px solid var(--wh-line); font-size: 12px; }

/* ---------------------------------------------------------------- 얼굴 아이콘, 상태, 알림 */

.wh-avatar {
    width: 32px; height: 32px; border-radius: 50%; flex: none; position: relative;
    display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
}
.wh-avatar-sm { width: 22px; height: 22px; font-size: 11px; }
.wh-avatar-lg { width: 40px; height: 40px; font-size: 16px; }
.wh-avatar-xl { width: 56px; height: 56px; font-size: 22px; }
/* 얼굴 아이콘 색은 직원 ID로 고정한다: wh-c{직원ID % 5} */
.wh-c0 { background: #e0e4ff; color: #3341b0; }
.wh-c1 { background: #d7f3ef; color: #0b6b62; }
.wh-c2 { background: #ffe9d6; color: #9a4a00; }
.wh-c3 { background: #f1defa; color: #7a2f99; }
.wh-c4 { background: #eceef4; color: #4b5366; }

.wh-badge {
    display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 999px;
    font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap;
    background: var(--wh-neutral-bg); color: var(--wh-neutral);
}
.wh-badge.wh-s-IN_PROGRESS { background: var(--wh-info-bg); color: var(--wh-info); }
.wh-badge.wh-s-APPROVED { background: var(--wh-ok-bg); color: var(--wh-ok); }
.wh-badge.wh-s-REJECTED { background: var(--wh-danger-bg); color: var(--wh-danger); }
.wh-badge.wh-s-WITHDRAWN { background: var(--wh-neutral-bg); color: var(--wh-neutral); }
.wh-badge.wh-s-CANCELLED { background: var(--wh-neutral-bg); color: var(--wh-neutral); text-decoration: line-through; }
.wh-badge-turn { background: var(--wh-warn-bg); color: var(--wh-warn); }
.wh-count {
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--wh-primary); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700;
}

.wh-msg { margin: 0; padding: 10px 14px; border-radius: var(--wh-radius-block); border: 1px solid transparent; font-size: 13px; }
.wh-msg-ok { background: var(--wh-ok-bg); color: var(--wh-ok); }
.wh-msg-err { background: var(--wh-danger-bg); color: var(--wh-danger); }
.wh-msg-info { background: #eef1fb; color: #2f3a8f; }

/* 비어 있을 때: 무엇이 없는지 한 문장 */
.wh-empty { margin: 0; padding: 28px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--wh-muted); text-align: center; }
.wh-empty.wh-warn { color: var(--wh-danger); font-weight: 600; }

/* ---------------------------------------------------------------- 버튼 */

.wh-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    height: var(--wh-h); padding: 0 14px; border: 1px solid var(--wh-line-strong); border-radius: var(--wh-radius);
    background: var(--wh-surface); color: var(--wh-text); font: inherit; font-size: 13px; font-weight: 600; line-height: 1;
    text-decoration: none; white-space: nowrap; cursor: pointer;
}
.wh-btn:hover { background: var(--wh-surface-2); color: var(--wh-text); }
.wh-btn-primary { background: var(--wh-primary); border-color: var(--wh-primary); color: #fff; }
.wh-btn-primary:hover { background: var(--wh-primary-ink); border-color: var(--wh-primary-ink); color: #fff; }
.wh-btn-soft { background: var(--wh-primary-soft); border-color: var(--wh-primary-soft); color: var(--wh-primary-ink); }
.wh-btn-soft:hover { background: #dadaff; color: var(--wh-primary-ink); }
.wh-btn-danger { border-color: #f2c4bf; color: var(--wh-danger); }
.wh-btn-danger:hover { background: var(--wh-danger-bg); color: var(--wh-danger); }
.wh-btn-sm { height: 26px; padding: 0 10px; border-radius: 7px; font-size: 12px; }
.wh-btn:disabled { opacity: 0.5; cursor: default; }
.wh-btn:focus-visible, .wh-input:focus-visible, .wh-select:focus-visible, .wh-textarea:focus-visible, .wh-x:focus-visible, .wh-cal-day:focus-visible,
.wh-rail-list a:focus-visible, .wh-subnav a:focus-visible, .wh-link:focus-visible, .wh-row:focus-visible, .wh-tree-node a:focus-visible, .wh-jstree .jstree-anchor:focus-visible {
    outline: 2px solid var(--wh-primary); outline-offset: 2px;
}
/* 닫기·빼기(×) */
.wh-x {
    width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: transparent;
    color: var(--wh-muted); font-size: 18px; line-height: 1; cursor: pointer; flex: none;
}
.wh-x:hover { background: var(--wh-surface-2); color: var(--wh-text); }

/* ---------------------------------------------------------------- 입력 */

.wh-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.wh-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.wh-form-grid.wh-cols-2 { grid-template-columns: 1fr 1fr; } /* 늘 두 칸(시작·종료의 날짜와 시각) */
.wh-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.wh-field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.wh-label { display: block; margin: 0; font-size: 12px; font-weight: 600; color: var(--wh-text-2); }
.wh-input, .wh-select, .wh-textarea {
    display: block; width: 100%; height: var(--wh-h); padding: 0 10px;
    border: 1px solid var(--wh-line-strong); border-radius: var(--wh-radius); background: var(--wh-surface);
    font: inherit; font-size: 13px; font-weight: 400; color: var(--wh-text);
}
.wh-textarea { height: auto; padding: 8px 10px; resize: vertical; }
.wh-input:focus, .wh-select:focus, .wh-textarea:focus { border-color: var(--wh-primary); box-shadow: 0 0 0 3px rgba(95, 97, 230, 0.14); }
.wh-input[readonly] { background: var(--wh-surface-2); color: var(--wh-muted); }
.wh-select-sm { width: auto; height: 26px; padding: 0 6px; border-radius: 7px; font-size: 12px; }
.wh-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 400; color: var(--wh-text); cursor: pointer; }
.wh-check input { width: 14px; height: 14px; margin: 0; accent-color: var(--wh-primary); }
.wh-checks { display: flex; flex-wrap: wrap; gap: 16px; }

/* 목록 위의 검색·필터 줄 */
.wh-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding: 8px 16px 16px; margin: 0; }
.wh-filter .wh-field { flex: 0 1 150px; }
.wh-filter .wh-field-grow { flex: 1 1 200px; }

/* ---------------------------------------------------------------- 표 (숫자·기록) */

.wh-table-wrap { overflow-x: auto; }
.wh-table { width: 100%; margin: 0; border-collapse: collapse; font-size: 13px; }
.wh-table th, .wh-table td { padding: 9px 12px; border-bottom: 1px solid var(--wh-line); text-align: left; vertical-align: middle; }
.wh-table th { border-top: 1px solid var(--wh-text); border-bottom: 1px solid var(--wh-line-strong); font-size: 12px; font-weight: 600; color: var(--wh-text-2); white-space: nowrap; }
/* 칸이 많은 표(급여대장): 칸 안에서 줄을 바꾸지 않고 표를 옆으로 민다 */
.wh-table-nowrap td { white-space: nowrap; }
.wh-table th:first-child, .wh-table td:first-child { padding-left: 16px; }
.wh-table th:last-child, .wh-table td:last-child { padding-right: 16px; }
.wh-table tbody tr:last-child td { border-bottom: 0; }
.wh-table tbody tr:hover td { background: #fafbfc; }
/* 줄 전체를 누르면 상세로 가는 표: <tr class="wh-tr-link"> 안의 링크 하나에 wh-stretch 를 붙인다(링크가 줄 전체를 덮는다. 키보드는 링크로 간다) */
.wh-table tr.wh-tr-link { position: relative; cursor: pointer; }
.wh-table tr.wh-tr-link:hover td { background: var(--wh-primary-soft); }
.wh-table tr.wh-tr-link .wh-stretch::after { content: ""; position: absolute; inset: 0; }
.wh-table tr.wh-tr-link:has(.wh-stretch:focus-visible) td { background: var(--wh-primary-soft); }
.wh-table .wh-right { text-align: right; }

/* 열 머리를 눌러 줄 세우는 링크(문서함): 머리 글자 그대로 보이고, 세운 열에는 ↓ ↑가 붙는다 */
.wh-th-sort { color: inherit; text-decoration: none; }
.wh-th-sort:hover { color: var(--wh-primary-ink); text-decoration: underline; }
/* 목록을 거르는 알약 단추 줄(문서함의 전체·진행·완료·반려). 고른 것은 wh-on */
.wh-pills { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px; margin: 0; list-style: none; }
.wh-pills a { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border: 1px solid var(--wh-line-strong); border-radius: 999px; color: var(--wh-text-2); text-decoration: none; }
.wh-pills a:hover { background: var(--wh-surface-2); color: var(--wh-text); }
.wh-pills a.wh-on { border-color: var(--wh-text); background: var(--wh-text); color: var(--wh-bg); font-weight: 600; }
/* 표 아래 가운데에 두는 찾기 줄(문서함) */
.wh-filter-center { justify-content: center; align-items: center; padding: 0 16px 20px; }
.wh-filter-center .wh-input { flex: 0 1 140px; }
.wh-filter-center .wh-input-q { flex-basis: 280px; }
.wh-pager { display: flex; justify-content: center; gap: 4px; padding: 12px; }
.wh-pager a, .wh-pager span { min-width: 28px; height: 28px; padding: 0 6px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: var(--wh-text-2); text-decoration: none; }
.wh-pager a:hover { background: var(--wh-surface-2); }
.wh-pager .wh-off { opacity: 0.35; }
.wh-pager .wh-on { background: var(--wh-primary); color: #fff; font-weight: 700; }

/* ---------------------------------------------------------------- 목록 행 (사람이 주인공인 목록) */

.wh-list { list-style: none; margin: 0; padding: 0; }
.wh-list > li { border-bottom: 1px solid var(--wh-line); }
.wh-list > li:last-child { border-bottom: 0; }
.wh-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; color: var(--wh-text); text-decoration: none; min-width: 0; }
a.wh-row:hover { background: var(--wh-surface-2); color: var(--wh-text); }
.wh-row-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.wh-row-main strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-row-main span { font-size: 12px; color: var(--wh-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-row.wh-read .wh-row-main strong { font-weight: 400; color: var(--wh-text-2); } /* 읽은 알림 */

/* ---------------------------------------------------------------- 결재선 */

.wh-line { list-style: none; margin: 0; padding: 0; }
.wh-line li { display: flex; gap: 10px; }
.wh-line-rail { display: flex; flex-direction: column; align-items: center; }
.wh-line-rail::after { content: ""; flex: 1; width: 2px; min-height: 12px; background: var(--wh-line); }
.wh-line li:last-child .wh-line-rail::after { display: none; }
.wh-line li.wh-done .wh-line-rail::after { background: #17a058; }
.wh-line li.wh-now .wh-avatar { outline: 2px solid var(--wh-primary); outline-offset: 2px; }
.wh-line li.wh-wait .wh-avatar { opacity: 0.55; }
.wh-line-body { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; min-width: 0; }
.wh-line-body strong { font-weight: 600; }
.wh-line-mark {
    position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--wh-surface);
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 9px; line-height: 1;
}
.wh-line-mark.wh-ok { background: #17a058; }
.wh-line-mark.wh-no { background: #b42318; }

/* ---------------------------------------------------------------- 모달(dialog) */

dialog.wh-dlg {
    width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0;
    border-radius: 16px; background: var(--wh-surface); color: var(--wh-text); font-size: 13px; line-height: 1.45;
    box-shadow: 0 8px 28px rgba(34, 48, 62, 0.18);
}
dialog.wh-dlg::backdrop { background: rgba(34, 48, 62, 0.4); }
.wh-dlg-head { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 4px 14px 0 20px; }
.wh-dlg-head h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--wh-text); }
.wh-dlg-body { padding: 6px 20px 20px; }

/* ---------------------------------------------------------------- 홈 */

/* 다우오피스 대시보드처럼 같은 폭 세 칸 */
/* 홈(설계서 §12.36): 인사말 아래에 세 줄. 왼쪽은 좁게(나), 가운데와 오른쪽은 같은 너비 */
.wh-home { display: grid; grid-template-columns: 280px minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.wh-hello { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.wh-hello h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--wh-text); }
/* 내 프로필: 가운데에 큰 얼굴 아이콘과 이름 */
.wh-me { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 16px 12px; text-align: center; }
.wh-me .wh-avatar { width: 64px; height: 64px; margin-bottom: 4px; border-radius: 20px; font-size: 24px; }
.wh-me strong { font-size: 16px; font-weight: 700; color: var(--wh-text); }
.wh-me .wh-small { font-size: 13px; }
/* 값 하나의 남은 양: 위에 이름표와 값, 가운데 막대, 아래에 설명(막대는 장식이고 값은 글로 적는다) */
.wh-meter { padding: 0 16px 14px; }
.wh-meter-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; }
.wh-meter-top .wh-small { font-size: 13px; }
.wh-meter-top.wh-muted, .wh-meter-top.wh-muted span { font-size: 12px; }
.wh-meter-top b { font-size: 20px; font-weight: 700; color: var(--wh-text); font-variant-numeric: tabular-nums; }
.wh-meter-bar { height: 8px; margin: 8px 0 6px; border-radius: 999px; background: var(--wh-surface-2); overflow: hidden; }
.wh-meter-bar i { display: block; height: 100%; border-radius: 999px; background: var(--wh-primary); }
.wh-kv.wh-kv-pad { padding: 0 16px 12px; } /* 뒤에 오는 .wh-kv의 padding: 0을 이긴다 */
/* 오늘 일정(홈): 시각과 제목 한 줄씩. 색은 달력의 일정 색과 같다 */
.wh-agenda { list-style: none; margin: 0; padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.wh-agenda-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--wh-radius); background: var(--wh-primary-soft); color: var(--wh-primary-ink); text-decoration: none; }
a.wh-agenda-row:hover { color: var(--wh-primary-ink); filter: brightness(0.97); }
.wh-agenda-row time { flex: none; width: 44px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wh-agenda-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-ag-company { background: var(--wh-warn-bg); color: var(--wh-warn); }
a.wh-ag-company:hover { color: var(--wh-warn); }
.wh-ag-leave { background: var(--wh-ok-bg); color: var(--wh-ok); }
a.wh-ag-leave:hover { color: var(--wh-ok); }
.wh-ag-holiday { background: var(--wh-danger-bg); color: var(--wh-danger); }
.wh-pin { color: var(--wh-danger); font-size: 14px; vertical-align: -2px; }
/* 홈의 회사 정보 카드에 보이는 회사 로고 */
.wh-company-logo { display: block; align-self: center; height: 100px; width: auto; max-width: 100%; object-fit: contain; margin: 8px 0 12px; } /* 세로로 쌓는 카드 안에서 가로로 늘어나지 않게 */
.wh-home-side .wh-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wh-home-side .wh-quick a { padding: 12px 2px; }
.wh-profile { display: flex; align-items: center; gap: 10px; }
.wh-profile h1, .wh-profile h2 { margin: 0; font-size: 15px; font-weight: 700; color: var(--wh-text); }
.wh-kv { list-style: none; margin: 0; padding: 0; }
.wh-kv li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-top: 1px solid var(--wh-line); }
.wh-kv li:first-child { border-top: 0; }
.wh-kv strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.wh-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.wh-quick a {
    display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px; border: 1px solid transparent;
    border-radius: var(--wh-radius-block); background: var(--wh-surface-2); color: var(--wh-text); font-size: 12px; font-weight: 600; text-decoration: none;
}
.wh-quick a:hover { color: var(--wh-primary-ink); background: var(--wh-primary-soft); }
.wh-quick i { font-size: 20px; color: var(--wh-primary); }
@media (max-width: 1280px) {
    .wh-home { grid-template-columns: 260px minmax(0, 1fr); }
    .wh-home > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
    .wh-home { grid-template-columns: minmax(0, 1fr); }
    .wh-fields { grid-template-columns: 1fr; gap: 2px 0; }
    .wh-fields dd { margin-bottom: 6px; }
}

/* ---------------------------------------------------------------- 휴가 신청: 작은 달력 + 고른 날 */

.wh-daypick { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.wh-cal, .wh-picked { padding: 14px; border: 0; border-radius: var(--wh-radius-block); background: var(--wh-surface-2); }
.wh-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.wh-cal-head strong { font-size: 13px; font-weight: 700; }
.wh-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.wh-cal-week { padding: 2px 0; font-size: 11px; font-weight: 600; color: var(--wh-muted); }
.wh-cal-day {
    width: 30px; height: 30px; margin: 0 auto; padding: 0; border: 0; border-radius: 50%; background: transparent;
    color: var(--wh-text); font: inherit; font-size: 12px; cursor: pointer;
}
.wh-cal-day:hover:not(:disabled) { background: var(--wh-primary-soft); color: var(--wh-primary-ink); }
.wh-cal-day:disabled { color: #b4b9c6; cursor: default; }
.wh-cal-day.wh-holiday:disabled { color: #e3a29b; }
.wh-cal-day.wh-on { background: var(--wh-primary); color: #fff; font-weight: 700; }
.wh-cal-day.wh-on:hover { background: var(--wh-primary-ink); color: #fff; }
.wh-picked { display: flex; flex-direction: column; gap: 6px; min-height: 200px; }
.wh-picked-head { display: flex; justify-content: space-between; font-weight: 700; }
.wh-picked-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.wh-picked-list li { display: flex; align-items: center; gap: 6px; }
.wh-picked-list li > span { flex: 1; }
.wh-picked .wh-empty { margin: auto 0; padding: 0; }

/* ---------------------------------------------------------------- 달력(FullCalendar) */

.wh-fc {
    --fc-border-color: var(--wh-line);
    --fc-today-bg-color: transparent;
    --fc-neutral-bg-color: var(--wh-surface-2);
    --fc-page-bg-color: var(--wh-surface);
    --fc-event-border-color: transparent;
    font-size: 12px;
}
.wh-fc .fc-theme-standard td, .wh-fc .fc-theme-standard th, .wh-fc.fc-theme-standard td, .wh-fc.fc-theme-standard th {
    padding: 0; background: none; font-size: inherit; text-align: inherit; border: 1px solid var(--fc-border-color);
}
.wh-fc .fc-toolbar.fc-header-toolbar { margin-bottom: 8px; gap: 6px; flex-wrap: wrap; }
.wh-fc .fc-toolbar-title { font-size: 15px; font-weight: 700; color: var(--wh-text); }
.wh-fc .fc-button {
    min-height: 0; height: 28px; padding: 0 10px; border-radius: 7px; box-shadow: none; filter: none;
    background: var(--wh-surface); color: var(--wh-text-2); border: 1px solid var(--wh-line-strong);
    font-size: 12px; font-weight: 600; text-transform: none; line-height: 1;
}
.wh-fc .fc-button:hover { background: var(--wh-surface-2); color: var(--wh-text); border-color: var(--wh-line-strong); }
.wh-fc .fc-button-primary:not(:disabled).fc-button-active,
.wh-fc .fc-button-primary:not(:disabled):active { background: var(--wh-primary-soft); color: var(--wh-primary-ink); border-color: var(--wh-primary-soft); }
.wh-fc .fc-button:disabled { opacity: 0.5; }
.wh-fc .fc-button:focus, .wh-fc .fc-button-primary:focus { box-shadow: 0 0 0 2px rgba(105, 108, 255, 0.3); }
.wh-fc .fc-col-header-cell-cushion { padding: 4px 10px; font-size: 11px; font-weight: 600; color: var(--wh-muted); text-decoration: none; }
.wh-fc .fc-day-sun .fc-col-header-cell-cushion, .wh-fc .fc-day-sun .fc-daygrid-day-number,
.wh-fc .is-holiday .fc-daygrid-day-number { color: var(--wh-danger); }
.wh-fc .fc-day-sat .fc-col-header-cell-cushion, .wh-fc .fc-day-sat .fc-daygrid-day-number { color: #2563c4; }
.wh-fc .fc-daygrid-day-frame { min-height: 72px; }
.wh-fc .fc-scrollgrid { border-radius: var(--wh-radius-block); overflow: hidden; }
.wh-fc .fc-daygrid-day-top { flex-direction: row; padding: 2px 4px 0; }
.wh-fc .fc-daygrid-day-number {
    min-width: 20px; height: 20px; padding: 0 3px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    font-weight: 600; color: var(--wh-text); text-decoration: none; font-variant-numeric: tabular-nums;
}
.wh-fc .fc-day-today .fc-daygrid-day-number { background: var(--wh-primary); color: #fff; }
.wh-fc .fc-day-other .fc-daygrid-day-number { opacity: 0.35; }
.wh-fc .fc-event { border-radius: 5px; padding: 1px 6px; font-size: 11px; font-weight: 600; }
.wh-fc .fc-event .fc-event-main { color: inherit; }
.wh-fc .ev-holiday { background: transparent; color: var(--wh-danger); }
.wh-fc .ev-leave.s-APPROVED { background: var(--wh-ok-bg); color: var(--wh-ok); }
.wh-fc .ev-leave.s-IN_PROGRESS { background: var(--wh-info-bg); color: var(--wh-info); }
.wh-fc .fc-list-event:hover td { background: var(--wh-surface-2); }
.wh-fc .fc-list-day-cushion { background: var(--wh-surface-2); }
.wh-fc .fc-daygrid-more-link { font-size: 11px; color: var(--wh-muted); }
/* 일정 화면(설계서 §12.32): 내 일정·전사 일정·관심 캘린더의 동료 일정. 사이드바의 색 점(wh-cal-dot)과 같은 계열이다 */
.wh-fc .ev-mine { background: var(--wh-primary-soft); color: var(--wh-primary-ink); }
.wh-fc .ev-company { background: var(--wh-warn-bg); color: var(--wh-warn); }
/* 관심 캘린더의 동료: 사람마다 고정된 색(직원 번호 % 8, 계열 색 --wh-series-1~8). 그 색을 옅게 깐 바탕 + 진한 글자라 어느 색이든 읽힌다(왼쪽 색 띠는 사용자 요청으로 뺐다) */
.ev-p0 { --ev-color: var(--wh-series-1); } .ev-p1 { --ev-color: var(--wh-series-2); } .ev-p2 { --ev-color: var(--wh-series-3); } .ev-p3 { --ev-color: var(--wh-series-4); }
.ev-p4 { --ev-color: var(--wh-series-5); } .ev-p5 { --ev-color: var(--wh-series-6); } .ev-p6 { --ev-color: var(--wh-chart-prev); } /* 계열 7번(보라)은 내 일정의 색과 겹쳐 회색을 쓴다 */ .ev-p7 { --ev-color: var(--wh-series-8); }
.wh-fc [class*="ev-p"] { background: color-mix(in srgb, var(--ev-color) 28%, var(--wh-surface)); color: var(--wh-text); cursor: pointer; }
.wh-cal-dot[class*="ev-p"] { background: var(--ev-color); }
/* 일정 화면에서는 내 휴가(승인)도 내 일정과 같은 보라색이다(사용자 요청). 홈 달력은 그대로 초록이다 */
.wh-fc-full .ev-leave.s-APPROVED { background: var(--wh-primary-soft); color: var(--wh-primary-ink); }
.wh-fc .fc-event[href], .wh-fc .ev-mine, .wh-fc .ev-company { cursor: pointer; }
/* 일정 화면의 큰 달력(wh-fc-full): 화면 높이를 가득 채우고(wh-page-fill > wh-fc-fill), 가로줄만 긋고, 보기 단추는 알약이다 */
.wh-page-fill { min-height: calc(100vh - var(--wh-header-h)); gap: 12px; padding-bottom: 20px; }
.wh-fc-fill { position: relative; flex: 1 1 auto; min-height: 560px; }
.wh-fc-fill > .wh-fc { position: absolute; inset: 0; }
.wh-fc-full { font-size: 13px; }
.wh-fc-bar .fc-toolbar.fc-header-toolbar { margin-bottom: 14px; align-items: center; }
.wh-fc-bar .fc-toolbar-chunk { display: flex; align-items: center; gap: 4px; flex: 1 1 0; }
.wh-fc-bar .fc-toolbar-chunk:nth-child(2) { justify-content: center; flex: 0 0 auto; }
/* 달력의 위쪽 줄(wh-fc-bar): 왼쪽에 보기 단추(알약), 가운데에 앞·뒤와 "2026.11" 제목·오늘. 일정 화면의 큰 달력과 홈 달력이 함께 쓴다 */
.wh-fc-bar.wh-fc-full .fc-toolbar-title { font-size: 24px; } /* 큰 달력은 제목도 크게 */
.wh-fc-bar .fc-toolbar-title { min-width: 80px; margin: 0 6px; text-align: center; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.wh-fc-bar .fc-button-group { gap: 6px; }
.wh-fc.wh-fc-bar .fc-button-group > .fc-button:not(#_) { height: 32px; padding: 0 12px; margin: 0; white-space: nowrap; border-radius: 999px; font-size: 13px; } /* FullCalendar가 가운데 단추의 모서리를 각지게 하는 것을 이긴다 */
.wh-fc-bar .fc-button-group > .fc-button.fc-button-active { background: var(--wh-text); color: var(--wh-bg); border-color: var(--wh-text); }
.wh-fc-bar .fc-prev-button, .wh-fc-bar .fc-next-button { width: 32px; height: 32px; padding: 0; margin: 0; border-radius: 50%; border-color: transparent; color: var(--wh-muted); font-size: 14px; }
.wh-fc-bar .fc-prev-button:hover, .wh-fc-bar .fc-next-button:hover { border-color: transparent; }
.wh-fc-bar .fc-today-button { height: 28px; margin-left: 4px; border-radius: 999px; border-color: transparent; }
.wh-fc-bar .fc-today-button:disabled { opacity: 0.4; }
.wh-fc-full .fc-scrollgrid { border-radius: var(--wh-radius-card, 14px); border: 1px solid var(--wh-line); }
/* 월간은 가로줄만 긋는다. 주간·일간은 요일을 가르는 세로줄을 둔다 */
.wh-fc-full .fc-dayGridMonth-view td, .wh-fc-full .fc-dayGridMonth-view th { border-left: 0; border-right: 0; }
.wh-fc-full .fc-scrollgrid > thead > tr > th, .wh-fc-full .fc-scrollgrid > tbody > tr > td { border-right: 0; }
.wh-fc-full .fc-scrollgrid > tbody > tr:last-child > td, .wh-fc-full .fc-daygrid-body tr:last-child > td { border-bottom: 0; }
.wh-fc-full .fc-col-header-cell { text-align: left; }
.wh-fc-full .fc-col-header-cell-cushion { padding: 10px 14px; font-size: 12px; }
.wh-fc-full .fc-daygrid-day-top { padding: 8px 10px 2px; }
.wh-fc-full .fc-daygrid-day-number { min-width: 24px; height: 24px; border-radius: 12px; font-size: 13px; }
.wh-fc-full .fc-daygrid-day-frame { min-height: 96px; }
.wh-fc-full .fc-timegrid .fc-daygrid-day-frame { min-height: 32px; } /* 주간·일간의 종일 줄은 낮게 */
.wh-fc-full .fc-daygrid-day:hover { background: var(--wh-surface-2); }
.wh-fc-full .fc-daygrid-event { margin: 1px 8px 2px; padding: 2px 8px; border-radius: 6px; font-size: 12px; line-height: 16px; }
.wh-fc-full .fc-daygrid-block-event.fc-event-start { margin-left: 8px; }
.wh-fc-full .fc-daygrid-block-event.fc-event-end { margin-right: 8px; }
.wh-fc-full .fc-daygrid-more-link { margin-left: 10px; font-size: 12px; }
.wh-fc-full .fc-timegrid-event { padding: 2px 6px; font-size: 12px; }
.wh-fc-full .fc-list { border-radius: var(--wh-radius-card, 14px); }
@media (max-width: 720px) {
    .wh-fc-bar .fc-toolbar.fc-header-toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
    .wh-fc-bar .fc-toolbar-chunk { justify-content: center; }
}
.wh-fc .fc-timegrid-slot { height: 28px; }
.wh-fc .fc-timegrid-axis-cushion, .wh-fc .fc-timegrid-slot-label-cushion { font-size: 11px; color: var(--wh-muted); }
/* 사이드바의 보일 캘린더(wh-subnav-cal): 체크박스 + 이름 + 오른쪽 색 점. 점의 색은 달력의 일정 색과 같은 계열이다 */
.wh-subnav-cal li { display: flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 6px 0 8px; }
.wh-subnav-cal .wh-check { flex: 1 1 0; min-width: 0; color: var(--wh-text-2); }
.wh-subnav-cal .wh-check span, .wh-subnav-cal-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-subnav-cal-name { flex: 1 1 0; min-width: 0; font-size: 13px; color: var(--wh-muted); }
.wh-cal-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.wh-cal-dot.ev-mine { background: var(--wh-primary); }
.wh-cal-dot.ev-company { background: var(--wh-warn); }
.wh-cal-dot.ev-leave { background: var(--wh-ok); }
.wh-cal-dot.ev-holiday-dot { background: var(--wh-danger); }
.wh-subnav-group h3.wh-subnav-h { display: flex; align-items: center; justify-content: space-between; }
.wh-subnav-group a.wh-subnav-edit { display: inline-flex; padding: 2px 4px; color: var(--wh-muted); font-size: 15px; }
.wh-subnav-group a.wh-subnav-add { display: inline-flex; align-items: center; gap: 4px; margin: 4px 0 0 8px; padding: 4px 10px; background: var(--wh-surface-2); }
.wh-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
/* 두 칸 배치: 왼쪽 3분의 1, 오른쪽 3분의 2(일정 등록: 입력과 참석자 일정 표). 좁으면 위아래로 쌓는다 */
.wh-split-13 { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(0, 2fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .wh-split-13 { grid-template-columns: minmax(0, 1fr); } }
/* 참석자 일정 표(설계서 §12.33): 사람마다 한 줄, 시간대마다 한 칸. 일정이 있는 칸을 칠하고 지금 고른 시간을 테두리로 보인다 */
.wh-busy { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11px; }
.wh-busy th, .wh-busy td { height: 28px; padding: 0 2px; border: 1px solid var(--wh-line); text-align: center; font-weight: 400; color: var(--wh-muted); font-variant-numeric: tabular-nums; }
.wh-busy tbody th, .wh-busy thead th:first-child { width: 96px; text-align: left; padding: 0 6px; color: var(--wh-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-busy td.wh-busy-on, .wh-busy-key.wh-busy-on { background: var(--wh-chart-prev); }
.wh-busy td.wh-busy-pick, .wh-busy-key.wh-busy-pick { box-shadow: inset 0 0 0 2px var(--wh-primary); }
.wh-legend i.wh-busy-key { width: 12px; height: 12px; border-radius: 3px; }
.wh-chip-x { border: 0; padding: 0 2px; background: none; color: var(--wh-muted); font-size: 14px; line-height: 1; cursor: pointer; }
.wh-chip-x:hover { color: var(--wh-danger); }
.wh-row form { margin: 0; flex: none; }
/* 댓글 줄(게시판): 글이 길면 줄을 바꾸고, 관리자가 가린 댓글은 흐리게 보인다 */
/* 글 화면(게시판·공지, 설계서 §12.41): 숫자 한 줄, 댓글 쓰기 칸, 앞뒤 글 표의 지금 글 */
.wh-post-stats { display: flex; align-items: center; gap: 16px; margin: 0; padding: 12px 16px; font-size: 12px; color: var(--wh-muted); border-bottom: 1px solid var(--wh-line); }
.wh-post-stats span { display: inline-flex; align-items: center; gap: 4px; }
.wh-post-stats i { font-size: 15px; }
.wh-post-stats b { font-weight: 600; color: var(--wh-text); }
.wh-post-stats.wh-post-stats-in { margin-top: 16px; padding: 12px 0 0; border-bottom: 0; border-top: 1px solid var(--wh-line); }
.wh-comment-write { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--wh-line); }
.wh-comment-box { flex: 1 1 auto; min-width: 0; border: 1px solid var(--wh-line-strong); border-radius: var(--wh-radius-block); background: var(--wh-surface); }
.wh-comment-box:focus-within { border-color: var(--wh-primary); box-shadow: 0 0 0 3px rgba(95, 97, 230, 0.14); }
.wh-comment-box textarea { display: block; width: 100%; padding: 10px 12px 4px; border: 0; background: none; color: var(--wh-text); font: inherit; resize: vertical; outline: none; }
.wh-comment-box-foot { display: flex; justify-content: flex-end; padding: 4px 8px 8px; }
.wh-table tr.wh-tr-on td { background: var(--wh-primary-soft); font-weight: 600; }
.wh-table tr.wh-tr-on i { color: var(--wh-primary-ink); vertical-align: -2px; }
.wh-row.wh-comment { align-items: flex-start; }
/* 줄 오른쪽 끝의 단추 묶음: 줄마다 단추 수가 달라도 오른쪽 끝에 맞춘다 */
.wh-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; flex: none; margin-left: auto; }
.wh-row-main .wh-comment-text { margin-top: 2px; font-size: 13px; color: var(--wh-text); white-space: pre-wrap; overflow: visible; overflow-wrap: anywhere; }
.wh-comment-hidden .wh-comment-text { color: var(--wh-muted); }

/* ---------------------------------------------------------------- 조직도 트리(jsTree) */

/*
 * jsTree 기본 테마(노란 폴더 그림, 검은 세모, 파란 선택 칸)를 지우고 우리 모양을 입힌다.
 * 칸 안의 글(wh-oname 부서 이름, wh-ocount 인원, wh-avatar 얼굴, wh-mmark 부서장, wh-pname 사람 이름)은 서버(OrgTreeNode)가 만든다.
 */
/* 트리는 눈으로 훑는 부품이라 다른 부품보다 넉넉하게 둔다: 줄 높이 36px, 글자 14px. */
.wh-jstree { overflow-x: hidden; overflow-y: auto; font-size: 14px; color: var(--wh-text); }
.wh-jstree li.jstree-node { min-height: 36px; line-height: 36px; margin-left: 10px; }
.wh-jstree .jstree-children { margin: 0; }
/* 펼침 표시: 그림 대신 가는 꺾쇠 */
/* 폭 24px은 jsTree 기본값이다. 아래 칸 너비(100% - 24px)와 맞아야 가로로 넘치지 않는다. */
.wh-jstree .jstree-node > .jstree-ocl { position: relative; width: 24px; height: 36px; line-height: 36px; background: none !important; cursor: pointer; }
.wh-jstree .jstree-open > .jstree-ocl::before, .wh-jstree .jstree-closed > .jstree-ocl::before {
    content: ""; position: absolute; left: 8px; top: 14px; width: 6px; height: 6px;
    border-right: 1.5px solid var(--wh-muted); border-bottom: 1.5px solid var(--wh-muted); transform: rotate(-45deg);
}
.wh-jstree .jstree-open > .jstree-ocl::before { top: 12px; left: 9px; transform: rotate(45deg); }
/* 한 칸: 줄 전체가 눌리고 칠해진다 */
.wh-jstree .jstree-anchor {
    display: inline-flex; align-items: center; gap: 8px; box-sizing: border-box; width: calc(100% - 24px);
    height: 34px; min-height: 34px; padding: 0 8px; border-radius: 8px;
    color: var(--wh-text); line-height: 1.3; white-space: nowrap; overflow: hidden;
}
.wh-jstree .jstree-hovered { background: var(--wh-surface-2); box-shadow: none; border-radius: 8px; }
.wh-jstree .jstree-clicked { background: var(--wh-primary-soft); box-shadow: none; border-radius: 8px; color: var(--wh-primary-ink); }
.wh-jstree .jstree-clicked .wh-pname, .wh-jstree .jstree-clicked .wh-oname { font-weight: 700; }
.wh-jstree .jstree-anchor.jstree-search { color: var(--wh-primary-ink); font-style: normal; font-weight: 700; }
/* 부서 아이콘: 선으로 그린 폴더 */
.wh-jstree .jstree-anchor > .jstree-themeicon {
    flex: none; width: 18px; height: 18px; margin: 0; background: var(--wh-muted) !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7h6l2 2h10v10H3z'/%3E%3C/svg%3E") center / 16px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7h6l2 2h10v10H3z'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.wh-jstree .jstree-anchor > .jstree-themeicon-hidden { display: none; }
.wh-jstree .wh-oname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.wh-jstree .wh-ocount { margin-left: auto; padding: 0; background: none; border-radius: 0; color: var(--wh-muted); font-size: 13px; font-weight: 400; font-variant-numeric: tabular-nums; }
/* 사람: 얼굴 · 이름 · (부서장) */
.wh-jstree .wh-avatar-wrap { display: contents; }
.wh-jstree .wh-avatar-sm { width: 26px; height: 26px; border-radius: 7px; font-size: 12px; font-weight: 700; flex: none; }
.wh-jstree .wh-pname { font-weight: 400; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* 부서장 표시는 얼굴 위에 겹치지 않고 이름 뒤에 작은 글자로 둔다 */
.wh-jstree .wh-mmark {
    order: 3; flex: none; position: static; width: auto; height: auto; padding: 0 5px; border-radius: 3px; box-shadow: none;
    background: var(--wh-neutral-bg); color: var(--wh-neutral); font-size: 0; line-height: 16px;
}
.wh-jstree .wh-mmark::after { content: "부서장"; font-size: 11px; font-weight: 600; }

/* ---------------------------------------------------------------- 그 밖의 부품 */

/* 안쪽 여백이 있는 카드: 머리 없이 내용만 있거나, 머리 아래에 폼·글이 바로 올 때 */
.wh-card-pad { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.wh-card-pad > .wh-card-head { margin: -16px -16px -4px; }
.wh-dlg-body > .wh-dlg-head { margin: -6px -20px 6px; }
.wh-stats > div:not(.wh-stat) { flex: 1 1 140px; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-left: 1px solid var(--wh-line); }
.wh-stats > div:not(.wh-stat):first-child { border-left: 0; }
.wh-stats > div:not(.wh-stat) > span { font-size: 12px; }
.wh-stats > div:not(.wh-stat) > strong, .wh-stats > div:not(.wh-stat) > a { font-size: 22px; font-weight: 700; line-height: 1.25; text-decoration: none; color: var(--wh-text); }
.wh-stats > div:not(.wh-stat) > a { color: var(--wh-primary); }

/* 로그인·오류처럼 틀 없이 가운데 카드 하나만 있는 화면 */
body.wh-center { min-height: 100vh; margin: 0; display: grid; place-items: center; padding: 16px; background: var(--wh-bg); font-size: 13px; color: var(--wh-text); }
.wh-solo { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.wh-solo h1 { margin: 0; font-size: 20px; font-weight: 700; color: var(--wh-text); }
.wh-solo-brand { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }
.wh-solo-brand .wh-brand-logo { height: 36px; }
.wh-solo .wh-btn { width: 100%; height: 38px; }
.wh-solo .wh-input { height: 38px; }
.wh-solo .wh-card-pad { padding: 24px; gap: 14px; }

/* 한 줄 폼: 목록 행 안의 작은 폼, 카드 아래의 "더하기" 줄 */
form.wh-inline { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.wh-inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.wh-inline-form .wh-input, .wh-inline-form .wh-select { width: auto; flex: 0 1 auto; }
.wh-inline-form .wh-input { flex: 1 1 160px; }
.wh-inline-form.wh-pad, .wh-form.wh-pad-form { padding: 12px 16px 16px; border-top: 1px solid var(--wh-line); }
.wh-inline-form.wh-pad-top { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--wh-line); }
.wh-row .wh-select, .wh-row .wh-input { width: auto; height: 26px; padding: 0 6px; border-radius: 7px; font-size: 12px; }
.wh-row .wh-btn { height: 26px; padding: 0 10px; border-radius: 7px; font-size: 12px; }
.wh-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 0; }
.wh-toolbar .wh-field { flex: 0 1 150px; }
.wh-toolbar .wh-field.wh-field-grow { flex: 1 1 200px; }
.wh-toolbar .wh-input, .wh-toolbar .wh-select { width: auto; min-width: 90px; }
.wh-card-head .wh-toolbar { align-items: center; }
.wh-card-head .wh-input, .wh-card-head .wh-select { height: var(--wh-h); }
.wh-card-head .wh-btn { height: var(--wh-h); }

/* 체크박스 목록: 체크박스 + 이름 + 설명 */
.wh-checklist { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wh-checklist legend { float: none; width: auto; margin: 0 0 4px; padding: 0; font-size: 12px; font-weight: 600; color: var(--wh-text-2); }
label.wh-checkrow {
    display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 10px 12px; border: 1px solid var(--wh-line);
    border-radius: var(--wh-radius-block); font-size: 13px; font-weight: 400; color: var(--wh-text); cursor: pointer;
}
label.wh-checkrow:hover { background: var(--wh-surface-2); }
label.wh-checkrow > input { width: 14px; height: 14px; margin: 3px 0 0; flex: none; accent-color: var(--wh-primary); }
label.wh-checkrow > span { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
label.wh-checkrow strong { font-weight: 600; }
label.wh-checkrow small { flex-basis: 100%; font-size: 12px; color: var(--wh-muted); }
.wh-taglist { display: flex; flex-wrap: wrap; gap: 4px; }
.wh-chiplist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.wh-chiplist a { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border: 1px solid var(--wh-line); border-radius: 999px; color: var(--wh-text); text-decoration: none; }
.wh-chiplist a:hover { border-color: var(--wh-primary); color: var(--wh-primary-ink); }

.wh-table td.wh-empty-cell { padding: 28px 16px; text-align: center; color: var(--wh-muted); }
.wh-table tr.wh-future td { color: var(--wh-muted); }
.wh-year-nav { display: flex; align-items: center; gap: 6px; }
.wh-year-nav strong { font-size: 14px; font-weight: 700; }
details > summary { cursor: pointer; }

/* 사람 카드(조직도 화면) */
.wh-person-card { flex-direction: row; align-items: center; gap: 12px; }
.wh-person-card h2 { margin: 0 0 2px; font-size: 15px; font-weight: 700; color: var(--wh-text); }
.wh-person-card p { margin: 0; display: flex; align-items: center; gap: 6px; }

/* 부서장 표시: 얼굴 옆 작은 글자(트리 밖에서는 얼굴 오른쪽 아래) */
.wh-avatar-wrap { position: relative; display: inline-flex; flex: none; }
.wh-mmark {
    position: absolute; right: -4px; bottom: -4px; padding: 0 4px; border-radius: 3px; background: var(--wh-text); color: var(--wh-bg);
    font-size: 10px; font-weight: 700; line-height: 14px; box-shadow: 0 0 0 2px var(--wh-surface);
}

/* ---------------------------------------------------------------- 항목 격자 · 탭 (인사정보처럼 "이름표 + 값"이 많은 상세) */
/* <dl class="wh-facts"><div><dt>이름표</dt><dd>값</dd></div>…</dl>  아직 없는 값은 <dd class="wh-none">-</dd> */
.wh-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 24px; margin: 0; }
.wh-facts > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; }
.wh-facts > div.wh-wide { grid-column: 1 / -1; }
.wh-facts dt { margin: 0; font-size: 12px; font-weight: 500; color: var(--wh-muted); }
.wh-facts dd { margin: 0; min-height: 30px; padding: 5px 10px; border-radius: var(--wh-radius, 8px); background: var(--wh-surface-2);
    font-weight: 600; color: var(--wh-text); overflow-wrap: anywhere; }
/* 여러 줄로 적은 글(회사 소개·연혁·복지)은 줄바꿈을 그대로 보인다 */
.wh-pre { white-space: pre-line; overflow-wrap: anywhere; }
.wh-facts dd.wh-none { font-weight: 400; color: var(--wh-muted); }
/* 합계 줄: 이름표와 값을 굵고 진하게(급여명세의 지급 합계·공제 합계) */
.wh-facts > div.wh-total dt { font-size: 13px; font-weight: 700; color: var(--wh-text); }
.wh-facts > div.wh-total dd { font-weight: 700; background: var(--wh-primary-soft, var(--wh-surface-2)); }
/* 값 자리에 입력칸을 둘 때: <dd class="wh-edit"><input class="wh-input" …></dd> */
.wh-facts dd.wh-edit { padding: 0; background: none; }
.wh-facts dd.wh-edit .wh-input, .wh-facts dd.wh-edit .wh-select { width: 100%; }
/* 요약 헤더: 큰 얼굴 아이콘(나중에 사진) + 항목 격자 */
.wh-facts-head { display: flex; align-items: flex-start; gap: 20px; }
.wh-facts-head .wh-facts { flex: 1 1 0; min-width: 0; }
.wh-avatar-xl { width: 72px; height: 72px; flex: none; border-radius: var(--wh-radius-block); font-size: 26px; }
/* 구역 이름(알약) */
.wh-sec-label { display: inline-block; margin: 16px 0 8px; padding: 2px 10px; border-radius: 999px; background: var(--wh-surface-2);
    color: var(--wh-text-2); font-size: 12px; font-weight: 600; }
.wh-sec-label:first-child { margin-top: 0; }
/* 탭: <div class="wh-tabs" role="tablist"><button type="button" role="tab" aria-selected="true" aria-controls="패널 id">…</button></div>
   패널은 <div role="tabpanel" id="…" hidden>. 누르면 cmm.js가 바꾼다 */
.wh-tabs { display: flex; gap: 2px; margin: 0 0 16px; border-bottom: 1px solid var(--wh-line); overflow-x: auto; }
.wh-tabs [role="tab"] { flex: none; height: 36px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: none;
    color: var(--wh-muted); font-size: 13px; white-space: nowrap; cursor: pointer; }
.wh-tabs [role="tab"]:hover { color: var(--wh-text); }
.wh-tabs [role="tab"][aria-selected="true"] { border-bottom-color: var(--wh-primary); color: var(--wh-primary-ink); font-weight: 700; }
.wh-tabs [role="tab"]:focus-visible { outline: 2px solid var(--wh-primary); outline-offset: -2px; }
@media (max-width: 600px) { .wh-facts-head { flex-direction: column; } }

/* ---------------------------------------------------------------- 트리 + 오른쪽 상세(조직 관리, 권한 부여, 조직도) */

.wh-tree-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
.wh-tree-card { position: sticky; top: calc(var(--wh-header-h) + 12px); max-height: calc(100vh - var(--wh-header-h) - 24px); }
.wh-tree-card .wh-jstree { max-height: calc(100vh - var(--wh-header-h) - 230px); }
@media (max-width: 900px) {
    .wh-tree-layout { grid-template-columns: minmax(0, 1fr); }
    .wh-tree-card { position: static; max-height: 360px; }
}
/* 서버가 그리는 트리(권한 부여, 조직도). 모양은 jsTree 트리(wh-jstree)와 같게 맞춘다 */
.wh-tree { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.wh-tree-node a {
    display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 calc(8px + var(--depth, 0) * 22px);
    border-radius: 8px; color: var(--wh-text); text-decoration: none;
}
.wh-tree-node a:hover { background: var(--wh-surface-2); color: var(--wh-text); }
/* 사람 고르기 창의 트리(wh-tree-pickable): 사람 줄은 단추, 부서 줄은 글이다. 모양은 위의 링크 줄과 같다 */
.wh-tree-node .wh-tree-row {
    display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 8px 0 calc(8px + var(--depth, 0) * 22px);
    border: 0; border-radius: 8px; background: none; color: var(--wh-text); font: inherit; text-align: left;
}
.wh-tree-node button.wh-tree-row { cursor: pointer; }
.wh-tree-node button.wh-tree-row:hover { background: var(--wh-primary-soft); color: var(--wh-primary-ink); }
.wh-tree-node button.wh-tree-row:focus-visible { outline: 2px solid var(--wh-primary); outline-offset: -2px; }
.wh-tree-dept .wh-tree-row { font-weight: 600; }
.wh-tree-pickable { max-height: min(60vh, 520px); margin-top: 8px; }
/* 여러 명 고르기: 사람 줄 앞에 체크 칸을 그린다(줄은 눌린 상태를 aria-pressed로 알린다) */
.wh-pick-multi .wh-tree-person .wh-tree-row::before {
    content: ""; width: 16px; height: 16px; flex: none; border: 1.5px solid var(--wh-line-strong); border-radius: 4px; background: var(--wh-surface);
}
.wh-pick-multi .wh-tree-row[aria-pressed="true"] { background: var(--wh-primary-soft); color: var(--wh-primary-ink); }
.wh-pick-multi .wh-tree-row[aria-pressed="true"]::before {
    border-color: var(--wh-primary); background: var(--wh-primary) center / 12px no-repeat
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.wh-pick-foot { align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--wh-line); }
.wh-pick-foot .wh-muted { margin-right: auto; }
.wh-tree-node a.wh-on { background: var(--wh-primary-soft); color: var(--wh-primary-ink); font-weight: 700; }
.wh-tree-dept a { font-weight: 600; }
.wh-tree-dept svg { width: 18px; height: 18px; color: var(--wh-muted); flex: none; }
.wh-tree-dept small { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--wh-muted); }
.wh-tree .wh-avatar-sm { width: 26px; height: 26px; border-radius: 7px; font-size: 12px; }
.wh-tree-label span { display: block; padding: 10px 8px 2px; font-size: 12px; font-weight: 600; color: var(--wh-muted); }

/* ---------------------------------------------------------------- 조직도 패널(왼쪽 메뉴 옆에 열림)과 사람 카드 */

dialog.wh-orgpanel {
    /* 화면 높이의 반 정도로, 주 메뉴 맨 아래의 "조직도" 단추 옆(아래쪽)에 붙여 연다. 트리가 길면 안에서 스크롤한다 */
    position: fixed; inset: auto auto 8px calc(var(--bs-menu-width, 16.25rem) + 8px); margin: 0; z-index: 1100;
    width: min(380px, calc(100vw - 16px)); height: clamp(360px, 50vh, calc(100vh - var(--wh-header-h) - 16px)); max-height: none; padding: 0;
    border: 0; border-radius: 16px; background: var(--wh-surface); color: var(--wh-text);
    font-size: 13px; box-shadow: 0 8px 28px rgba(34, 48, 62, 0.18);
}
.wh-orgpanel-body { display: flex; flex-direction: column; height: 100%; padding: 16px 12px 12px 18px; gap: 12px; }
.wh-orgpanel-head { display: flex; align-items: center; justify-content: space-between; }
.wh-orgpanel-head h2 { margin: 0; font-size: 15px; font-weight: 700; color: var(--wh-text); }
.wh-orgpanel-tree { flex: 1; overflow-y: auto; padding-right: 4px; }
dialog.wh-personpop {
    /* 조직도 패널 바로 옆에, 아래쪽 끝을 맞춰 연다 */
    position: fixed; top: auto; bottom: 8px; left: min(calc(var(--bs-menu-width, 16.25rem) + 400px), calc(100vw - 556px)); margin: 0; z-index: 1101;
    width: min(540px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 16px;
    background: var(--wh-surface); color: var(--wh-text); font-size: 13px; box-shadow: 0 8px 28px rgba(34, 48, 62, 0.2);
}
.wh-personpop-body { position: relative; display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 24px; }
.wh-personpop-body > .wh-x { position: absolute; top: 8px; right: 8px; }
.wh-pp-left { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding-right: 20px; border-right: 1px solid var(--wh-line); }
.wh-pp-left h2 { margin: 8px 0 0; font-size: 15px; font-weight: 700; color: var(--wh-text); }
.wh-pp-left p { margin: 0 0 6px; }
.wh-pp-left .wh-avatar-xl { width: 76px; height: 76px; border-radius: 50%; font-size: 28px; }
.wh-pp-fields { margin: 0; display: grid; grid-template-columns: 1fr; gap: 2px; }
.wh-pp-fields dt { margin-top: 8px; font-size: 12px; font-weight: 400; color: var(--wh-muted); }
.wh-pp-fields dt:first-child { margin-top: 0; }
.wh-pp-fields dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wh-pp-fields dd small { flex-basis: 100%; }
@media (max-width: 1199.98px) {
    dialog.wh-orgpanel { left: 8px; } /* 작은 화면은 메뉴가 숨어 있다 */
}
@media (max-width: 720px) {
    .wh-personpop-body { grid-template-columns: 1fr; }
    .wh-pp-left { border-right: 0; padding-right: 0; }
    dialog.wh-personpop { left: 16px; }
}
#jstree-dnd .wh-avatar-wrap, #jstree-dnd .wh-ocount { display: none; }

/* ---------------------------------------------------------------- 부품 모음(dev) */

.wh-parts-section > h2 { margin: 8px 0 0; font-size: 14px; font-weight: 700; color: var(--wh-text); }
.wh-parts-demo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wh-parts-code { margin: 0; padding: 10px 12px; background: var(--wh-surface-2); border: 1px solid var(--wh-line); border-radius: var(--wh-radius); font-size: 11px; color: var(--wh-text-2); white-space: pre-wrap; }

/* ---------------------------------------------------------------- 그림(SVG) 크기 */

.wh-btn svg { width: 14px; height: 14px; flex: none; }
.wh-empty svg { width: 28px; height: 28px; color: #9aa1b0; }
.wh-toolbar .wh-field-grow .wh-input { width: 100%; }

/* ---------------------------------------------------------------- 상단바·화면 머리 보정 */

/* 상단바 오른쪽 정렬: 사용자 메뉴를 오른쪽 끝에 둔다 */
.wh-topbar .navbar-nav-right { flex: 1 1 auto; }
/* 위치는 사이드바가 알려 주므로 화면 머리의 작은 위치 글자는 감춘다(상세 화면의 부서·상신 시각은 남긴다) */
.wh-head > div:not(.wh-profile) > .wh-head-where { display: none; }

/* ---------------------------------------------------------------- 좁은 화면 */

@media (max-width: 720px) {
    dialog.wh-personpop { top: calc(var(--wh-header-h) + 8px); bottom: auto; max-height: calc(100dvh - var(--wh-header-h) - 16px); overflow-y: auto; }
    .wh-pp-fields dd { overflow-wrap: anywhere; }
}
@media (max-width: 600px) {
    .wh-page { padding: 16px 16px 24px; }
    .wh-topbar { padding: 0 12px; }
    /* 목록 행: 이름은 첫 줄, 단추·선택 상자는 다음 줄 */
    .wh-row { flex-wrap: wrap; }
    .wh-row-main { flex: 1 1 calc(100% - 48px); }
    .wh-row form.wh-inline, .wh-row .wh-inline-form { min-width: 0; flex-wrap: wrap; }
    .wh-row .wh-select { max-width: 100%; }
}

/* ---------------------------------------------------------------- 근태 */

.wh-year-nav.wh-center { justify-content: center; }
.wh-head-actions .wh-select { width: auto; min-width: 140px; }
/* 사이드바의 출퇴근 칸: 지금 시각, 출근 → 퇴근 시각, 단추 두 개 */
.wh-clock { display: flex; flex-direction: column; gap: 8px; margin: 0 12px 12px; }
.wh-clock-now { margin: 0; font-size: 12px; color: var(--wh-text-2); }
.wh-clock-times { display: flex; align-items: center; justify-content: space-around; gap: 8px; padding: 10px 8px; border-radius: 10px; background: var(--wh-surface-2); color: var(--wh-muted); }
.wh-clock-times span { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wh-clock-times small { font-size: 11px; }
.wh-clock-times strong { font-size: 15px; font-weight: 700; color: var(--wh-text); }
.wh-clock-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wh-clock-actions form { margin: 0; }
.wh-clock-actions .wh-btn { width: 100%; justify-content: center; }
.wh-btn:disabled { opacity: 0.45; cursor: default; }
/* 진행 막대: 채운 만큼(wh-progress-bar), 기준 눈금(wh-progress-mark), 끝 값(wh-progress-end) */
.wh-stat.wh-stat-wide { flex: 3 1 320px; }
.wh-progress { position: relative; height: 8px; margin: 10px 0 18px; border-radius: 999px; background: var(--wh-surface-2); }
.wh-progress-bar { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--wh-primary); }
.wh-progress-mark, .wh-progress-end { position: absolute; top: 12px; font-size: 11px; color: var(--wh-muted); transform: translateX(-50%); }
.wh-progress-mark::before { content: ""; position: absolute; left: 50%; top: -14px; height: 12px; border-left: 2px dotted var(--wh-text-2); }
.wh-progress-end { right: 0; transform: none; }
/* 한 주(월~일): 날마다 한 칸, 고른 날은 wh-on, 쉬는 날은 wh-rest */
.wh-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--wh-line); }
.wh-week-day { display: flex; flex-direction: column; gap: 4px; min-height: 96px; padding: 10px 12px; border-left: 1px solid var(--wh-line); border-bottom: 2px solid transparent; color: var(--wh-text); text-decoration: none; min-width: 0; }
.wh-week-day:first-child { border-left: 0; }
.wh-week-day:hover { background: var(--wh-surface-2); color: var(--wh-text); }
.wh-week-day:focus-visible { outline: 2px solid var(--wh-primary); outline-offset: -2px; }
.wh-week-day.wh-on { background: var(--wh-primary-soft); border-bottom-color: var(--wh-primary); }
.wh-week-day.wh-rest .wh-week-date { color: var(--wh-muted); }
.wh-week-date { font-size: 13px; font-weight: 600; }
.wh-week-date .wh-today { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--wh-text); color: var(--wh-bg); font-size: 11px; }
.wh-week-leave { font-size: 12px; padding-left: 6px; border-left: 3px solid var(--wh-info); color: var(--wh-text-2); }
.wh-week-time { font-size: 12px; color: var(--wh-text-2); }
.wh-week-state { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: auto; }
/* 리포트의 지표 칸: 이름·설명·큰 값·지난달과의 차이(늘면 wh-up, 줄면 wh-down), 옆에 작은 차트(wh-kpi-chart) */
.wh-fold > summary { display: flex; align-items: center; gap: 6px; padding: 4px 0 8px; font-size: 14px; font-weight: 600; color: var(--wh-text); list-style: none; }
.wh-fold > summary::-webkit-details-marker { display: none; }
.wh-fold > summary::after { content: ""; width: 7px; height: 7px; border: solid var(--wh-text-2); border-width: 2px 2px 0 0; transform: rotate(135deg); margin-top: -4px; }
.wh-fold[open] > summary::after { transform: rotate(-45deg); margin-top: 4px; }
.wh-fold > summary:focus-visible { outline: 2px solid var(--wh-primary); outline-offset: 2px; border-radius: 6px; }
.wh-kpis { display: flex; flex-wrap: wrap; gap: 16px; }
.wh-kpi { flex: 1 1 280px; display: flex; gap: 16px; min-width: 0; padding: 20px 24px; background: var(--wh-surface); border: 1px solid var(--wh-line); border-radius: var(--wh-radius-card); }
.wh-kpis.wh-kpis-joined { gap: 0; background: var(--wh-surface); border: 1px solid var(--wh-line); border-radius: var(--wh-radius-card); overflow: hidden; }
.wh-kpis-joined > .wh-kpi { border: 0; border-radius: 0; background: none; flex-basis: 150px; }
.wh-kpis-joined > .wh-kpi.wh-kpi-wide { flex: 3 1 300px; }
.wh-kpis-joined > .wh-kpi.wh-kpi-ruled { border-left: 1px solid var(--wh-line); }
.wh-kpi-text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.wh-kpi-title { margin: 0; font-size: 14px; font-weight: 600; color: var(--wh-text); }
.wh-kpi-desc { margin: 0; font-size: 12px; color: var(--wh-muted); }
.wh-kpi-value { white-space: nowrap; margin-top: auto; padding-top: 16px; font-size: 22px; font-weight: 700; line-height: 1.25; color: var(--wh-text); font-variant-numeric: tabular-nums; }
.wh-kpi-delta { font-size: 12px; color: var(--wh-muted); }
.wh-kpi-delta.wh-up { color: var(--wh-primary-ink); }
.wh-kpi-delta.wh-down { color: var(--wh-danger); }
/* 비율 막대: 조각마다 색(wh-series-N), 아래에 이름·인원·비율을 적는다(색만으로 가르지 않는다) */
.wh-stackbar { display: flex; gap: 2px; height: 14px; margin-top: 12px; border-radius: 7px; overflow: hidden; }
.wh-stackbar > span { min-width: 4px; }
.wh-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--wh-text-2); }
.wh-legend li { display: flex; align-items: center; gap: 5px; }
.wh-legend i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.wh-legend b { font-weight: 600; color: var(--wh-text); font-variant-numeric: tabular-nums; }
.wh-series-1 { background: var(--wh-series-1); } .wh-series-2 { background: var(--wh-series-2); }
.wh-series-3 { background: var(--wh-series-3); } .wh-series-4 { background: var(--wh-series-4); }
.wh-series-5 { background: var(--wh-series-5); } .wh-series-6 { background: var(--wh-series-6); }
.wh-series-7 { background: var(--wh-series-7); } .wh-series-8 { background: var(--wh-series-8); }
/* 지난달·이번 달 비교: 줄마다 이름, 막대, 값. 이번 달은 주 색, 지난달은 회색 */
.wh-compare { flex: 1 1 0; min-width: 0; display: grid; grid-template-columns: auto minmax(40px, 1fr) auto; align-content: center; align-items: center; gap: 10px 10px; font-size: 12px; color: var(--wh-text-2); }
.wh-compare-bar { height: 14px; border-radius: 0 4px 4px 0; background: var(--wh-chart-prev); min-width: 2px; }
.wh-compare-bar.wh-now { background: var(--wh-primary); }
.wh-compare b { font-weight: 600; color: var(--wh-text); font-variant-numeric: tabular-nums; }
.wh-compare > * { white-space: nowrap; }
.wh-kpi > .wh-compare { flex: 1.4 1 0; }
.wh-kpi-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
.wh-kpi-split > div { display: flex; flex-direction: column; gap: 4px; padding: 0 16px; border-left: 1px solid var(--wh-line); }
.wh-kpi-split > div:first-child { padding-left: 0; border-left: 0; }
.wh-kpi-split .wh-kpi-value { padding-top: 8px; font-size: 17px; }
.wh-kpi.wh-kpi-grow { flex: 1.5 1 360px; }
.wh-kpis.wh-kpis-tight > .wh-kpi { flex-basis: 170px; padding: 16px 20px; }
.wh-kpi-box { margin-top: 12px; padding: 4px 12px; border-radius: 10px; background: var(--wh-surface-2); }
.wh-kpi-box > div { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; font-size: 12px; color: var(--wh-muted); }
.wh-kpi-box strong { color: var(--wh-text); font-variant-numeric: tabular-nums; }
/* 차트(Chart.js)를 담는 칸과, 작은 표시를 줄 바꿈하며 늘어놓는 칸 */
.wh-chart { position: relative; height: 260px; padding: 4px 16px 16px; }
.wh-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
/* 하루 시간줄(00~24시): 근무한 시간대를 막대로 */
.wh-timeline { padding: 4px 16px 12px; overflow-x: auto; }
.wh-timeline-hours, .wh-timeline-track { min-width: 560px; }
.wh-timeline-hours { display: grid; grid-template-columns: repeat(24, 1fr); font-size: 11px; color: var(--wh-muted); font-variant-numeric: tabular-nums; }
.wh-timeline-track { position: relative; height: 44px; border-radius: 8px; background: repeating-linear-gradient(to right, var(--wh-line) 0 1px, transparent 1px calc(100% / 24)) var(--wh-surface-2); }
.wh-timeline-bar { position: absolute; top: 14px; height: 16px; border-radius: 8px; background: var(--wh-primary); }
@media (max-width: 720px) {
    .wh-week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wh-week-day { border-left: 0; border-top: 1px solid var(--wh-line); }
}

/* ---- 인쇄용 한 장(급여명세서): 메뉴 없이 종이 모양으로 그린다. 인쇄할 때는 단추를 숨기고 종이만 남긴다 ---- */
.wh-sheet-page { background: var(--wh-surface-2); margin: 0; padding: 16px; }
.wh-sheet-tools { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; }
.wh-sheet { max-width: 760px; margin: 0 auto; padding: 32px; background: #fff; border: 1px solid var(--wh-line); color: #111; font-size: 13px; }
.wh-sheet-org { margin: 0 0 4px; font-size: 12px; }
.wh-sheet-box { border: 1px solid #111; }
.wh-sheet-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 16px 20px 12px; border-bottom: 1px solid #999; }
.wh-sheet-title h1 { margin: 0; font-size: 24px; font-weight: 800; }
.wh-sheet-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 16px; margin: 0; padding: 12px 20px; border-bottom: 1px solid #111; }
.wh-sheet-info > div { display: flex; gap: 12px; }
.wh-sheet-info dt { min-width: 52px; color: #444; }
.wh-sheet-info dd { margin: 0; font-weight: 600; }
.wh-sheet-net { display: flex; justify-content: space-between; padding: 10px 20px; border-bottom: 1px solid #111; font-size: 15px; font-weight: 700; }
.wh-sheet-cols { display: grid; grid-template-columns: 1fr 1fr; min-height: 300px; }
.wh-sheet-cols > section + section { border-left: 1px solid #111; }
.wh-sheet-cols h2 { display: flex; justify-content: space-between; margin: 0; padding: 10px 20px; font-size: 14px; font-weight: 700; }
.wh-sheet-cols dl { margin: 0; padding: 4px 20px 16px; }
.wh-sheet-cols dl > div { display: flex; justify-content: space-between; padding: 3px 0; }
.wh-sheet-cols dd { margin: 0; }
.wh-sheet-period { display: flex; justify-content: space-around; margin-top: 12px; padding: 12px 20px; }
.wh-sheet-note { margin: 8px 0 0; font-size: 11px; color: #555; }
@media print {
    .wh-sheet-page { background: #fff; padding: 0; }
    .wh-sheet-tools { display: none; }
    .wh-sheet { max-width: none; border: 0; padding: 0; }
}
/* 증명서(재직증명서): 인쇄용 한 장의 제목·증명 문구·날짜·서명 줄 */
.wh-sheet-cert .wh-sheet-info { grid-template-columns: repeat(2, 1fr); border-bottom: 0; padding: 20px; gap: 12px 16px; }
.wh-sheet-doc-title { margin: 24px 0 28px; text-align: center; font-size: 30px; font-weight: 800; }
.wh-sheet-statement { margin: 56px 0 40px; text-align: center; font-size: 16px; }
.wh-sheet-date { margin: 0 0 40px; text-align: center; font-size: 15px; }
.wh-sheet-sign { margin: 0; text-align: center; font-size: 20px; font-weight: 700; }

/* ---------------------------------------------------------------- 결재 문서(전자결재, 설계서 §12.20) */

/* 결재양식 선택 모달(다우오피스 모양): 왼쪽은 검색 + 분류 폴더 트리, 오른쪽은 고른 양식의 상세정보 */
dialog.wh-dlg-wide { width: min(780px, calc(100vw - 32px)); }
.wh-formpick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; }
.wh-formpick-tree, .wh-formpick-detail { display: flex; flex-direction: column; height: 340px; border: 1px solid var(--wh-line-strong); border-radius: var(--wh-radius); overflow: hidden; }
.wh-formpick-search { position: relative; padding: 8px; border-bottom: 1px solid var(--wh-line); }
.wh-formpick-search .wh-input { width: 100%; padding-right: 32px; }
.wh-formpick-search .bx { position: absolute; top: 50%; right: 18px; transform: translateY(-50%); font-size: 18px; color: var(--wh-text-2); pointer-events: none; }
.wh-formpick-list { flex: 1; overflow-y: auto; padding: 6px 8px 8px; }
.wh-formpick-list details > summary { display: flex; align-items: center; gap: 6px; padding: 3px 2px; font-weight: 600; cursor: pointer; list-style: none; }
.wh-formpick-list details > summary::-webkit-details-marker { display: none; }
/* 접기 표시: 펼치면 −, 접으면 + */
.wh-formpick-list details > summary::before {
    content: "+"; display: inline-flex; align-items: center; justify-content: center; width: 13px; height: 13px;
    border: 1px solid var(--wh-line-strong); border-radius: 2px; font-size: 11px; line-height: 1; color: var(--wh-text-2);
}
.wh-formpick-list details[open] > summary::before { content: "−"; }
.wh-formpick-list .bxs-folder { color: var(--wh-warn); font-size: 16px; }
/* 양식 줄: 폴더에서 내려오는 연결선(ㄴ자)을 그린다 */
.wh-formpick-list label { position: relative; display: flex; align-items: center; gap: 6px; margin-left: 9px; padding: 3px 6px 3px 22px; border-radius: 4px; cursor: pointer; }
.wh-formpick-list label::before { content: ""; position: absolute; left: 0; top: -6px; width: 12px; height: calc(50% + 6px); border-left: 1px solid var(--wh-line-strong); border-bottom: 1px solid var(--wh-line-strong); }
.wh-formpick-list label input { position: absolute; opacity: 0; pointer-events: none; }
.wh-formpick-list label .bx { font-size: 15px; color: var(--wh-text-2); }
.wh-formpick-list label:hover { background: var(--wh-surface-2); }
.wh-formpick-list [hidden] { display: none; }
.wh-formpick-list label:has(input:checked) { background: var(--wh-primary-soft); color: var(--wh-primary-ink); font-weight: 700; }
.wh-formpick-list label:has(input:focus-visible) { outline: 2px solid var(--wh-primary); outline-offset: 1px; }
.wh-formpick-detail h3 { margin: 0; padding: 10px 14px; line-height: 1.4; background: var(--wh-surface-2); border-bottom: 1px solid var(--wh-line); font-size: 13px; font-weight: 600; }
.wh-formpick-detail dl { margin: 0; padding: 6px 18px; overflow-y: auto; }
.wh-formpick-detail dl > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; padding: 9px 0; }
.wh-formpick-detail dt { color: var(--wh-text-2); }
.wh-formpick-detail dd { margin: 0; }
@media (max-width: 600px) { .wh-formpick { grid-template-columns: 1fr; } .wh-formpick-tree, .wh-formpick-detail { height: 240px; } }

/* 종이 서식 모양의 문서: 가운데 제목, 위에 정보 표와 결재 도장 칸, 아래에 항목 표 */
.wh-doc { max-width: 900px; padding: 28px 32px 32px; background: var(--wh-surface); border: 1px solid var(--wh-line); border-radius: var(--wh-radius-card); color: var(--wh-text); }
.wh-doc-title { margin: 4px 0 24px; text-align: center; font-size: 26px; font-weight: 800; letter-spacing: 0.5em; text-indent: 0.5em; }
.wh-doc-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.wh-doc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wh-doc-table + .wh-doc-table { margin-top: 12px; }
.wh-doc-table th, .wh-doc-table td { padding: 6px 8px; border: 1px solid var(--wh-line-strong); text-align: left; vertical-align: middle; }
.wh-doc-table th { width: 110px; background: var(--wh-surface-2); font-weight: 600; text-align: center; white-space: nowrap; }
.wh-doc-table thead th { width: auto; }
.wh-doc-table .wh-input, .wh-doc-table .wh-select, .wh-doc-table .wh-textarea { width: 100%; }
.wh-doc-table td > .wh-select { min-width: 96px; }
.wh-doc-table td.wh-right { text-align: right; }
.wh-doc-info { width: auto; }
.wh-doc-info th { width: 72px; }
.wh-doc-info td { min-width: 130px; }
.wh-doc-text { min-height: 140px; white-space: pre-wrap; overflow-wrap: anywhere; }
.wh-doc-note { margin: 8px 0 0; font-size: 12px; color: var(--wh-text-2); }
/* 첨부 파일 목록(결재 문서): 한 줄에 파일 하나. 이름(받기 링크)·크기, 작성 화면에서는 빼기 단추(wh-x) */
.wh-files { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 2px; }
.wh-files:empty { display: none; }
.wh-files li { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; }
.wh-files .bx { color: var(--wh-muted); }
.wh-file-name { min-width: 0; overflow-wrap: anywhere; }
.wh-file-size { flex: none; color: var(--wh-muted); font-size: 12px; }
/* 그림 첨부의 작은 미리보기: 그 줄에 마우스를 올리거나 키보드로 고르면 위에 뜬다 */
.wh-file-thumb { display: none; position: absolute; left: 22px; bottom: calc(100% + 4px); z-index: 30; padding: 4px; background: var(--wh-surface); border: 1px solid var(--wh-line-strong); border-radius: 10px; }
.wh-file-thumb img { display: block; max-width: 220px; max-height: 160px; border-radius: 6px; }
.wh-files li:hover .wh-file-thumb, .wh-files li:focus-within .wh-file-thumb { display: block; }
/* 파일을 끌어다 놓는 칸(파일 고르기 단추를 담는다) */
.wh-drop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border: 1px dashed var(--wh-line-strong); border-radius: 10px; }
.wh-drop-over { border-color: var(--wh-primary); background: var(--wh-primary-soft); }
.wh-file-input { max-width: 100%; font: inherit; color: var(--wh-text-2); }
.wh-file-input::file-selector-button { height: 32px; margin-right: 8px; padding: 0 12px; border: 1px solid var(--wh-line-strong); border-radius: 8px; background: var(--wh-surface); color: var(--wh-text); font: inherit; cursor: pointer; }
.wh-file-input::file-selector-button:hover { background: var(--wh-surface-2); }

/* 결재 도장 칸: 왼쪽 세로 글(신청·승인) + 사람마다 직위 / 이름·결과 / 날짜 */
.wh-stamps { display: flex; flex-wrap: wrap; gap: 8px; }
.wh-stamp { display: flex; border: 1px solid var(--wh-line-strong); }
.wh-stamp-label { display: flex; align-items: center; justify-content: center; width: 24px; background: var(--wh-surface-2); font-weight: 600; writing-mode: vertical-rl; text-orientation: upright; letter-spacing: 4px; }
.wh-stamp-cell { display: grid; grid-template-rows: 26px 56px 22px; width: 72px; border-left: 1px solid var(--wh-line-strong); text-align: center; }
.wh-stamp-cell > * { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 4px; }
.wh-stamp-pos { border-bottom: 1px solid var(--wh-line-strong); background: var(--wh-surface-2); font-size: 12px; }
.wh-stamp-name { gap: 2px; font-weight: 600; }
.wh-stamp-mark { font-size: 11px; font-weight: 700; }
.wh-stamp-mark.wh-ok { color: var(--wh-ok); }
.wh-stamp-mark.wh-no { color: var(--wh-danger); }
.wh-stamp-mark.wh-now { color: var(--wh-warn); }
.wh-stamp-date { border-top: 1px solid var(--wh-line-strong); font-size: 11px; color: var(--wh-text-2); }

/* 문서 작성 화면 위의 작업 줄(다우오피스: 결재요청 · 결재 정보 · 취소). 글자 단추 wh-btn-text */
.wh-doc-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--wh-line); }
.wh-doc-toolbar h1 { margin: 0; font-size: 18px; font-weight: 700; color: var(--wh-text); }
.wh-doc-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.wh-btn.wh-btn-text { border-color: transparent; background: none; gap: 5px; }
.wh-btn.wh-btn-text:hover { background: var(--wh-surface-2); }
.wh-btn.wh-btn-text .bx { font-size: 17px; }

/* 결재 정보 창: 왼쪽 조직도(찾기 + 부서 펼치기), 오른쪽 고른 사람 표(결재선·참조자 탭) */
dialog.wh-dlg-xl { width: min(1000px, calc(100vw - 32px)); }
.wh-picker { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 12px; }
.wh-picker-left, .wh-picker-right { display: flex; flex-direction: column; height: 400px; border: 1px solid var(--wh-line-strong); border-radius: var(--wh-radius); overflow: hidden; }
.wh-picker-head { padding: 8px 12px; border-bottom: 2px solid var(--wh-text); font-weight: 600; text-align: center; }
.wh-picker-tree { flex: 1; overflow-y: auto; padding: 4px 6px 8px; }
.wh-picker-dept, .wh-picker-person { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 8px; border: 0; border-radius: var(--wh-radius); background: none; color: var(--wh-text); font: inherit; text-align: left; cursor: pointer; }
.wh-picker-dept { font-weight: 600; }
.wh-picker-dept .wh-muted { font-weight: 400; }
.wh-picker-dept:hover, .wh-picker-person:hover { background: var(--wh-surface-2); }
.wh-picker-person.wh-on { background: var(--wh-primary-soft); }
.wh-picker-person:disabled { opacity: 0.55; cursor: default; }
.wh-picker-person-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wh-picker-person-text span { font-size: 11px; color: var(--wh-text-2); }
.wh-picker-right > [role="tabpanel"] { flex: 1; overflow-y: auto; }
.wh-picker-table { width: 100%; border-collapse: collapse; }
.wh-picker-table th, .wh-picker-table td { padding: 7px 10px; border-bottom: 1px solid var(--wh-line); text-align: left; }
.wh-picker-table thead th { position: sticky; top: 0; background: var(--wh-surface); border-bottom: 2px solid var(--wh-text); font-weight: 600; }
.wh-picker-table .wh-picker-sec th { background: var(--wh-surface-2); text-align: center; font-weight: 600; }
.wh-picker .wh-picker-table td:last-child, .wh-picker .wh-picker-table th:last-child { width: 48px; text-align: center; }
.wh-nowrap { white-space: nowrap; }
.wh-picker-foot { margin: 0; padding: 8px 12px; background: var(--wh-surface-2); font-size: 12px; color: var(--wh-text-2); }
.wh-picker-warn { margin-right: auto; color: var(--wh-danger); font-weight: 600; }
@media (max-width: 700px) { .wh-picker { grid-template-columns: 1fr; } .wh-picker-left, .wh-picker-right { height: 300px; } }
button.wh-subnav-action { width: 100%; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }

/* 결재 홈의 "결재할 문서" 카드(다우오피스 결재 홈): 상태 표시 · 양식 · 제목 · 기안자·기안일·양식 · 결재하기 */
.wh-apcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.wh-apcard { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--wh-line); border-radius: var(--wh-radius-block); }
.wh-apcard-tags { display: flex; align-items: center; gap: 4px; }
.wh-apcard h3 { margin: 4px 0 0; font-size: 16px; font-weight: 700; color: var(--wh-text); }
.wh-apcard-title { margin: 0; color: var(--wh-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-apcard dl { margin: 0 0 6px; font-size: 12px; }
.wh-apcard dl > div { display: flex; gap: 8px; padding: 1px 0; }
.wh-apcard dt { min-width: 52px; color: var(--wh-text-2); }
.wh-apcard dd { margin: 0; }
.wh-apcard .wh-btn { margin-top: auto; justify-content: center; }

/* 결재 양식의 칸(설계서 §12.21): 필수 표시, 금액·날짜 칸 폭, 값이 없는 여러 줄 글 */
.wh-req { margin-left: 2px; color: var(--wh-danger); }
.wh-doc-table .wh-input.wh-input-amount { display: inline-block; width: 200px; }
.wh-doc-table .wh-input.wh-input-date { display: inline-block; width: 180px; }
.wh-doc-text.wh-doc-text-short { min-height: 0; }
/* 결재 문서의 안내 글 줄, 반복 표(줄 추가·계산·합계), 기간 칸 */
.wh-doc-table td.wh-doc-notecell { padding: 10px 12px; color: var(--wh-text-2); background: var(--wh-surface-2); white-space: pre-wrap; }
.wh-doc-table td.wh-doc-gridcell { padding: 10px 12px 12px; }
.wh-doc-gridhead { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.wh-doc-gridhead .wh-btn { margin-left: auto; }
/* 열 너비는 값이 길어져도 바뀌지 않게 고정한다(열은 같은 너비, 번호·빼기 칸만 좁게). 좁은 화면에서는 표의 최소 너비(화면이 열 수로 정함)만큼 옆으로 밀린다 */
.wh-doc-table.wh-doc-grid { table-layout: fixed; width: 100%; }
.wh-doc-table.wh-doc-grid th { width: auto; }
.wh-doc-table.wh-doc-grid td { overflow-wrap: anywhere; }
/* 숫자(계산 열, 합계)는 숫자 중간에서 끊지 않고, 너무 길면 쉼표 뒤에서만 줄을 바꾼다(쉼표 뒤에 폭 없는 빈칸을 넣는다). 표의 최소 너비는 열마다 90px */
.wh-doc-table.wh-doc-grid td.wh-num { overflow-wrap: normal; word-break: keep-all; }
.wh-doc-table.wh-doc-grid td { padding: 4px 6px; }
.wh-doc-table.wh-doc-grid .wh-input, .wh-doc-table.wh-doc-grid .wh-select { width: 100%; min-width: 0; }
.wh-doc-table.wh-doc-grid tfoot th, .wh-doc-table.wh-doc-grid tfoot td { background: var(--wh-surface-2); font-weight: 700; }
.wh-doc-table.wh-doc-grid .wh-doc-grid-no { width: 40px; text-align: center; color: var(--wh-text-2); }
.wh-doc-table.wh-doc-grid .wh-doc-grid-del { width: 40px; }
.wh-period { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wh-doc-table .wh-period .wh-input.wh-input-date { width: 160px; }

/* 왼쪽 편집 · 오른쪽 미리보기 2분할(양식 관리). 미리보기는 내려도 화면에 붙어 있다. 좁은 화면은 위아래로 */
.wh-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.wh-split-side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
@media (max-width: 1200px) { .wh-split { grid-template-columns: 1fr; } .wh-split-side { position: static; max-height: none; } }

/* 양식 관리의 칸 표: 반 폭(2분할)에서도 읽히게 좁은 여백과 칸마다 최소 폭. 넘치면 표만 옆으로 밀린다 */
.wh-fieldtable th, .wh-fieldtable td { padding: 6px 4px; vertical-align: top; }
.wh-fieldtable td:first-child { width: 24px; padding-top: 12px; color: var(--wh-text-2); }
.wh-fieldtable .wh-input { min-width: 90px; }
.wh-fieldtable select[data-field-type] { min-width: 104px; }
.wh-fieldtable select[name="fieldRequired"] { min-width: 68px; }
.wh-fieldtable textarea { min-width: 180px; resize: vertical; }
.wh-fieldtable select[data-field-half] { min-width: 76px; }
.wh-fieldtable td:last-child { padding-top: 10px; }
