/* Creation Foret Workspace — 화면 공통 스타일
   브랜딩 2.0: 디지털 블랙 #1A1A1A + 무채색, 포인트 컬러 없음.
   검정은 '지금 봐야 할 것'에만 (남은 연차, 처리할 신청, 주요 버튼). 빨강은 반려·삭제·오류에만. */

:root {
  --ink: #1A1A1A;
  --ink-hover: #3A3A37;
  --muted: #5C5C57;
  --faint: #6E6E68;
  --rule: #E3E3DF;
  --rule-strong: #8C8C86;
  --tray: #F3F3F1;
  --paper: #FFFFFF;
  --alert: #B42318;
  --alert-rule: #E8B4AE;
  --alert-tray: #FCEFED;

  --r-control: 8px;
  --r-box: 14px;
  --shell: 1120px;
  --gutter: 24px;

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color-scheme: light;
}

/* ------------------------------------------------------------------ 기본 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------------ 뼈대 */
.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 var(--gutter); }
main { flex: 1; padding: 36px 0 72px; }

.topbar { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--rule); }
.topbar-inner { display: flex; align-items: center; gap: 40px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand .logotype { height: 21px; width: auto; }      /* Creation Foret 로고타입 — 글자는 글자색을 따르고 잎만 초록 */
.brand-tag {
  display: inline-block; padding-left: 10px; border-left: 1px solid var(--rule-strong);
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; color: var(--muted);
  margin-top: 5px;                      /* 로고타입의 글자 줄(잎을 뺀 높이)에 맞춤 */
}
.nav { display: flex; align-self: stretch; gap: 2px; }
.nav-link {
  display: flex; align-items: center; padding: 0 12px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.nav-link:hover { color: var(--ink); }
.nav-link.is-active { color: var(--ink); border-bottom-color: var(--ink); }
.who { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); flex: none; }
.who-name { font-weight: 600; color: var(--ink); margin-right: 4px; }

.footer { border-top: 1px solid var(--rule); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 28px; }
.footer small { font-size: 12px; color: var(--faint); }

/* 페이지 제목줄 */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.page-title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.page-sub { font-size: 15px; color: var(--muted); margin-top: 4px; }
.back-link { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; margin-bottom: 10px; }
.back-link:hover { color: var(--ink); }
.back-link svg { width: 18px; height: 18px; margin-left: -4px; }

/* 본문 + 옆 칸 */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; align-items: start; }
.split > aside { display: grid; gap: 20px; position: sticky; top: 88px; }

.section + .section, .split + .section, .section + .split { margin-top: 56px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.section-title { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.35; }
.section-title .count { margin-left: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }
.section-note { font-size: 14px; color: var(--muted); }

/* 회색 판: 입력 폼 묶음 (details 로 접을 수 있음) */
details.tray { padding: 0; }
details.tray > summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 24px; cursor: pointer; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; border-radius: var(--r-box);
}
details.tray > summary::-webkit-details-marker { display: none; }
details.tray > summary svg { width: 20px; height: 20px; transition: transform 0.2s ease; }
details.tray[open] > summary svg { transform: rotate(45deg); }
details.tray > summary:hover { background: #ECECE9; }
details.tray > .tray-body { padding: 0 24px 24px; }
details.tray .tray-note { margin: 0 0 18px; }
.tray { background: var(--tray); border-radius: var(--r-box); padding: 24px; }
.tray-title { font-size: 17px; font-weight: 700; margin-bottom: 18px; letter-spacing: -0.01em; }
.tray-note { font-size: 13px; color: var(--muted); margin: -12px 0 18px; }

/* ------------------------------------------------------------------ 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 18px; border-radius: var(--r-control);
  border: 1px solid transparent; background: none;
  font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ink-hover); }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--rule-strong); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-ghost { color: var(--ink); padding: 0 10px; }
.btn-ghost:hover { background: var(--tray); }
.btn-danger { background: var(--paper); color: var(--alert); border-color: var(--alert-rule); }
.btn-danger:hover { border-color: var(--alert); }
.btn-danger-solid { background: var(--alert); color: var(--paper); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-form { display: inline; }

/* ------------------------------------------------------------------ 입력 */
.form-grid { display: grid; gap: 18px; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
.field { display: grid; gap: 7px; min-width: 0; border: 0; padding: 0; margin: 0; }
.label { font-size: 14px; font-weight: 600; color: var(--ink); padding: 0; }
.label .optional { font-weight: 500; color: var(--faint); margin-left: 4px; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.5; }
.hint.is-error { color: var(--alert); }
.input, .select, .textarea {
  width: 100%; min-width: 0; height: 44px; padding: 0 12px;
  background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--r-control);
  font-size: 15px;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline-offset: 0; border-color: var(--ink); }
.input[readonly] { background: var(--tray); border-color: var(--rule); color: var(--muted); }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1A1A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.textarea { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input-sm { height: 36px; font-size: 14px; }
.input-num { text-align: right; font-variant-numeric: tabular-nums; }

/* 둥근 선택 버튼 (라디오) */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; display: inline-flex; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 15px;
  border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--paper);
  font-size: 15px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.seg small { font-size: 12px; font-weight: 500; color: var(--muted); }
.seg label:hover span { border-color: var(--ink); }
.seg input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.seg input:checked + span small { color: rgba(255, 255, 255, 0.72); }
.seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.seg input:disabled + span { color: var(--faint); border-style: dashed; background: transparent; cursor: not-allowed; }
.seg input:disabled { cursor: not-allowed; }

/* ------------------------------------------------------------------ 상태 표시 */
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px;
  border: 1px solid transparent; border-radius: 999px;
  font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap;
}
.chip svg { width: 13px; height: 13px; }
.chip-pending { background: var(--ink); color: var(--paper); }
.chip-approved { border-color: var(--ink); color: var(--ink); }
.chip-rejected { border-color: var(--alert-rule); color: var(--alert); }
.chip-cancelled { border-color: var(--rule); color: var(--muted); }
.chip-deleted { border-color: var(--rule-strong); border-style: dashed; color: var(--muted); }
.chip-type { border-color: var(--rule); color: var(--ink); font-weight: 600; }
.chip-resigned { border-color: var(--rule); color: var(--muted); }
.chip-active { border-color: var(--ink); color: var(--ink); }

/* 알림 */
.flashes { display: grid; gap: 8px; margin-bottom: 28px; }
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 12px 16px; border-radius: 10px; font-size: 15px; line-height: 1.5; }
.flash svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.flash p { flex: 1; }
.flash-success { background: var(--tray); }
.flash-error { background: var(--alert-tray); color: var(--alert); }
.sync-note { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; padding: 12px 12px 12px 16px; margin: -12px 0 28px; border-radius: 10px; background: var(--alert-tray); color: var(--alert); font-size: 15px; line-height: 1.5; }
.sync-note svg { width: 18px; height: 18px; flex: none; }
.sync-note p { flex: 1 1 260px; }
.sync-note .sync-error { display: block; font-size: 13px; opacity: 0.85; }
.flash-close { border: 0; background: none; padding: 2px; border-radius: 6px; cursor: pointer; color: inherit; opacity: 0.6; }
.flash-close:hover { opacity: 1; }

/* 비어 있을 때 */
.empty { padding: 28px 0; color: var(--muted); font-size: 15px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.empty strong { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------ 남은 연차 (한 칸 = 하루) */
.balance-label { font-size: 15px; font-weight: 600; color: var(--muted); }
.balance-figure { display: flex; align-items: baseline; gap: 6px; margin: 2px 0 22px; line-height: 1; }
.balance-num { font-size: clamp(68px, 9vw, 104px); font-weight: 700; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.balance-unit { font-size: 26px; font-weight: 600; }

.tiles {
  display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px;
  max-width: calc(var(--n) * 38px);
}
.tile { position: relative; aspect-ratio: 1 / 1; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--ink); overflow: hidden; }
.tile.is-future { box-shadow: none; border: 1px dashed var(--rule-strong); }
.part { position: absolute; top: 0; bottom: 0; }
.part-left { background: var(--ink); }
.part-pending { background: repeating-linear-gradient(-45deg, var(--ink) 0 1.5px, transparent 1.5px 5px); }
.part-preview { background: #B4B4AF; animation: preview-in 0.35s ease-out; }   /* 지금 고른 신청이 가져갈 날 */
@keyframes preview-in { from { background: var(--ink); } to { background: #B4B4AF; } }

.legend { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; font-size: 14px; }
.legend > div { display: flex; align-items: center; gap: 6px; }
.legend dt { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.legend dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.sw { width: 12px; height: 12px; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--ink); flex: none; }
.sw-left { background: var(--ink); }
.sw-pending { background: repeating-linear-gradient(-45deg, var(--ink) 0 1px, transparent 1px 3.5px); }
.sw-future { box-shadow: none; border: 1px dashed var(--rule-strong); }
.sw-preview { background: #B4B4AF; }

.balance-notes { margin-top: 18px; display: grid; gap: 2px; font-size: 14px; color: var(--muted); }
.balance-notes strong { color: var(--ink); font-weight: 600; }
.balance-notes .is-alert { color: var(--alert); }

.alt-balance { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 15px; }
.alt-balance .alt-name { font-weight: 600; }
.alt-balance .alt-num { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.alt-balance .alt-detail { font-size: 14px; color: var(--muted); }

/* 신청 요약 (무엇이 몇 일 차감되는지) */
.summary { padding: 14px 16px; border-radius: 10px; background: var(--paper); font-size: 14px; line-height: 1.55; color: var(--muted); }
.summary strong { color: var(--ink); font-weight: 700; }
.summary.is-error { color: var(--alert); }
.custom-time { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.custom-time .select { flex: 1; }
.custom-time span { font-size: 14px; color: var(--muted); flex: none; }

/* ------------------------------------------------------------------ 휴가 목록 (예정) */
.leave-list { border-top: 1px solid var(--ink); }
.leave-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.leave-date { display: grid; justify-items: start; line-height: 1.1; }
.leave-date .y { font-size: 12px; font-weight: 600; color: var(--muted); }
.leave-date .d { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.leave-date .m { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.leave-what { font-size: 16px; font-weight: 600; }
.leave-what .time { font-weight: 500; color: var(--muted); margin-left: 6px; font-variant-numeric: tabular-nums; }
.leave-meta { font-size: 14px; color: var(--muted); margin-top: 2px; }
.leave-memo { font-size: 14px; margin-top: 6px; color: var(--ink); }
.leave-memo::before { content: "메모 "; color: var(--muted); }
.leave-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* 처리할 신청 (관리자) — 검은 테두리 = 지금 처리할 것 */
.inbox { display: grid; gap: 12px; }
.inbox-item { border: 1px solid var(--ink); border-radius: 12px; padding: 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 20px; align-items: end; }
.inbox-who { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.inbox-who strong { font-size: 17px; font-weight: 700; }
.inbox-who span { font-size: 14px; color: var(--muted); }
.inbox-when { font-size: 16px; font-weight: 600; margin-top: 6px; }
.inbox-when .time { font-weight: 500; color: var(--muted); margin-left: 6px; font-variant-numeric: tabular-nums; }
.inbox-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; font-size: 14px; color: var(--muted); }
.inbox-facts strong { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.inbox-facts .is-short strong { color: var(--alert); }
.inbox-memo { margin-top: 8px; font-size: 14px; }
.inbox-memo::before { content: "메모 "; color: var(--muted); }
.inbox-actions { display: flex; gap: 8px; }

/* ------------------------------------------------------------------ 표 (좁은 화면에서는 한 줄씩 쌓임) */
.table-wrap { width: 100%; }
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger th {
  text-align: left; font-size: 13px; font-weight: 600; color: var(--muted);
  padding: 0 10px 10px; border-bottom: 1px solid var(--ink); white-space: nowrap;
}
.ledger td { padding: 13px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ledger th:first-child, .ledger td:first-child { padding-left: 0; }
.ledger th:last-child, .ledger td:last-child { padding-right: 0; }
.ledger .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger .actions { text-align: right; white-space: nowrap; }
.ledger .actions .btn + .btn, .ledger .actions form + form, .ledger .actions .btn + form { margin-left: 4px; }
.ledger .strong { font-weight: 600; }
.ledger .sub { display: block; font-size: 13px; color: var(--muted); margin-top: 1px; }
.ledger .memo { color: var(--muted); max-width: 240px; }
.ledger tr.is-dim td { color: var(--muted); }
.ledger tr.is-dim .when { text-decoration: line-through; text-decoration-color: var(--rule-strong); }
.ledger .actions .btn { margin: -6px 0; }

/* 조회 조건 */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 18px; }
.filters .field { gap: 5px; }
.filters .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.filters .input, .filters .select { height: 38px; font-size: 14px; }
.filters .btn { height: 38px; }
.filters .grow { flex: 1 1 140px; }
.filters .spacer { flex: 1; }

/* 정보 목록 (내 정보, 직원 상세) */
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 12px 28px; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { font-weight: 600; }

/* 위험한 작업 */
.danger-zone { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.danger-zone h2 { font-size: 16px; font-weight: 700; }
.danger-zone p { font-size: 14px; color: var(--muted); margin-top: 2px; }

/* ------------------------------------------------------------------ 성과 (KPI) */
.metric-editor { display: grid; gap: 10px; }
.metric-row {
  display: grid; grid-template-columns: 1fr 1.6fr 1fr 0.7fr 1fr 1fr 34px; gap: 8px; align-items: end;
  padding: 12px; background: var(--paper); border-radius: 10px;
}
.metric-row .field { gap: 4px; }
.metric-row .label { font-size: 12px; color: var(--muted); }
.metric-row .input, .metric-row .select { height: 38px; font-size: 14px; }
.metric-row .remove { height: 38px; width: 34px; padding: 0; }
.metric-row:first-child .remove { visibility: hidden; }
.metric-editor.is-editing .metric-row:first-child .remove { visibility: visible; }

.metrics { border-top: 1px solid var(--ink); }
.metric { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 200px 92px; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.metric-name { font-weight: 600; }
.metric-cat { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
.metric-target { font-size: 14px; color: var(--muted); }
.metric-target strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.metric-input { display: flex; align-items: center; gap: 6px; }
.metric-input .unit { font-size: 14px; color: var(--muted); flex: none; }
.metric-rate { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.metric-rate.is-met { color: var(--ink); }
.metric-rate.is-under { color: var(--muted); }
.rate-bar { display: block; height: 3px; background: var(--rule); margin-top: 6px; border-radius: 2px; overflow: hidden; }
.rate-bar i { display: block; height: 100%; background: var(--ink); }

.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav .current { font-size: 15px; font-weight: 700; min-width: 92px; text-align: center; font-variant-numeric: tabular-nums; }


section.tray + .section { margin-top: 0; }
section.tray.section + .section { margin-top: 56px; }

/* ------------------------------------------------------------------ 확인 창 */
.confirm-dialog { border: 0; border-radius: var(--r-box); padding: 0; width: min(400px, calc(100vw - 32px)); color: var(--ink); }
.confirm-dialog::backdrop { background: rgba(26, 26, 26, 0.45); }
.confirm-dialog form { padding: 24px; display: grid; gap: 20px; }
.confirm-msg { font-size: 16px; font-weight: 600; line-height: 1.5; white-space: pre-line; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.confirm-dialog[open] { animation: dialog-in 0.18s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 오류 화면 */
.error-page { display: flex; align-items: center; padding: 0; }
.error-page .shell { display: grid; justify-items: start; gap: 12px; }
.error-page .brand { margin-bottom: 28px; }
.error-page .btn { margin-top: 16px; }

/* ------------------------------------------------------------------ 로그인 */
.login { flex: 1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 100vh; }
.login-brand { background: var(--ink); color: var(--paper); display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 48px; }
.login-brand .brand { color: var(--paper); }
.login-brand .brand { gap: 14px; }
.login-brand .brand .logotype { height: 32px; }
.login-brand .brand-tag { font-size: 22px; margin-top: 8px; padding-left: 14px; color: rgba(255, 255, 255, 0.72); border-left-color: rgba(255, 255, 255, 0.36); }
.login-note { font-size: 14px; line-height: 1.7; color: rgba(255, 255, 255, 0.72); }
.login-main { display: flex; flex-direction: column; justify-content: center; padding: 48px var(--gutter); }
.login-form { width: 100%; max-width: 360px; margin: 0 auto; }
.login-form h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.login-form .page-sub { margin-bottom: 32px; }
.login-foot { margin-top: 40px; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ 서류 */
.form-part { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; margin-top: 14px; padding-top: 24px; border-top: 1px solid var(--rule); }
.form-part-note { margin-top: -10px; }
.check { display: inline-flex; align-items: center; gap: 8px; justify-self: start; font-size: 14px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.tray-note.is-alert { color: var(--alert); }
.tray-note a { color: inherit; }
.seal-box {
  display: grid; place-items: center; width: 132px; height: 132px; margin-bottom: 14px;
  border: 1px solid var(--rule); border-radius: 12px; background-color: var(--paper);
  background-image: conic-gradient(#EFEFEC 25%, transparent 0 50%, #EFEFEC 0 75%, transparent 0); background-size: 16px 16px;
}
.seal-box img { width: 104px; height: 104px; object-fit: contain; }
.seal-box span { font-size: 13px; color: var(--muted); background: var(--paper); padding: 2px 6px; border-radius: 6px; }
.seal-box-sm { width: 64px; height: 64px; margin: 0; flex: none; background-size: 10px 10px; }
.seal-box-sm img { width: 52px; height: 52px; }
.seal-box-sm span { font-size: 11px; padding: 1px 3px; text-align: center; }
.seal-line { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.seal-meta { margin: -4px 0 16px; }
.seal-meta .is-error { color: var(--alert); }
.facts-sm { font-size: 14px; gap: 6px 16px; }
.input-file { height: auto; padding: 9px 10px; font-size: 14px; }
.verify-page { display: flex; align-items: flex-start; padding: 72px 0; }
.verify-page .shell { display: grid; justify-items: start; gap: 12px; }
.verify-page .verify-form, .verify-page .verify-result, .verify-page .verify-msg { width: 100%; max-width: 640px; }
.verify-page .brand { margin-bottom: 28px; }
.verify-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 18px; }
.verify-result { display: grid; gap: 16px; margin-top: 24px; padding: 24px; border-radius: var(--r-box); background: var(--tray); }
.verify-ok { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; }
.verify-ok svg { width: 22px; height: 22px; flex: none; }
.verify-msg { margin-top: 24px; }

/* ------------------------------------------------------------------ 좁은 화면 */
@media (max-width: 1024px) {
  .split { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; }
}
@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .split > aside { position: static; }
  .metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-row .field-name { grid-column: 1 / -1; }
  .metric-row .remove { grid-column: 2; justify-self: end; }
  .metric-row:first-child .remove { display: none; }
  .metric-editor.is-editing .metric-row:first-child .remove { display: inline-flex; }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .verify-page { padding: 40px 0; }
  .verify-form { grid-template-columns: minmax(0, 1fr); }
  main { padding: 24px 0 56px; }
  .topbar-inner { flex-wrap: wrap; height: auto; gap: 0 12px; padding-top: 12px; }
  .nav { order: 3; width: calc(100% + 24px); height: 44px; margin: 6px -12px 0; overflow-x: auto; }
  .who-name { display: none; }
  .page-title { font-size: 24px; }
  .section + .section, .split + .section, .section + .split { margin-top: 44px; }
  .tray { padding: 20px 16px; border-radius: 12px; }
  details.tray > summary { padding: 16px; }
  details.tray > .tray-body { padding: 0 16px 20px; }
  .form-grid-2 { grid-template-columns: minmax(0, 1fr); }

  .home-split { gap: 0; }
  .home-split > .home-main { display: contents; }
  .home-split .section { margin-top: 44px; }
  .home-split .balance { order: 1; margin-top: 0; }
  .home-split > aside { order: 2; margin-top: 32px; }
  .home-split .upcoming { order: 3; }
  .home-split .records { order: 4; }

  .leave-item { grid-template-columns: 52px minmax(0, 1fr); }
  .leave-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; }
  .leave-date .y { font-size: 12px; font-weight: 600; color: var(--muted); }
.leave-date .d { font-size: 24px; }

  .inbox-item { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .inbox-actions .btn { flex: 1; }

  .ledger thead { display: none; }
  .ledger, .ledger tbody, .ledger tr, .ledger td { display: block; width: 100%; }
  .ledger tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .ledger td { padding: 0; border: 0; width: auto; }
  .ledger td[data-label]::before { content: attr(data-label) " "; color: var(--muted); font-weight: 500; }
  .ledger td.cell-main { width: 100%; }
  .ledger td.num { text-align: left; }
  .ledger tr { position: relative; }
  .ledger td.actions { position: absolute; top: 8px; right: 0; width: auto; }
  .ledger td.actions .btn { margin: 0; }
  .ledger tr.has-actions td.cell-main { padding-right: 64px; }
  .ledger .memo { max-width: none; width: 100%; }
  .table-wrap { border-top: 1px solid var(--ink); }

  .metric { grid-template-columns: minmax(0, 1fr) auto; }
  .metric-target { grid-column: 1 / -1; order: 3; }
  .metric-input { grid-column: 1 / -1; order: 4; }
  .metric-rate { order: 2; }

  .login { grid-template-columns: minmax(0, 1fr); }
  .login-brand { padding: 28px var(--gutter); flex-direction: row; align-items: center; }
  .login-brand .brand .logotype { height: 22px; }
  .login-brand .brand-tag { font-size: 16px; margin-top: 5px; padding-left: 10px; }
  .login-note { display: none; }
  .login-main { justify-content: flex-start; padding-top: 40px; }

  .facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
