:root {
  --ink: #172033;
  --muted: #667085;
  --line: #e5e9f0;
  --soft: #f6f8fb;
  --panel: #ffffff;
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-soft: #eef2ff;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warning: #b45309;
  --warning-soft: #fffbeb;
  --success: #15803d;
  --success-soft: #f0fdf4;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius: 18px;
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: #f3f5f8;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 1180px; background: #f3f5f8; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.topbar {
  height: 76px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 30px; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.brand-wrap { display: flex; gap: 12px; align-items: center; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: #111827; color: #fff; font-weight: 900; font-size: 20px;
}
.brand-title { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.brand-subtitle { margin-top: 3px; color: var(--muted); font-size: 12px; }
.header-actions { display: flex; gap: 9px; align-items: center; }
.privacy-badge, .state-chip, .count-badge, .type-badge {
  display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; white-space: nowrap;
}
.privacy-badge { padding: 8px 12px; background: var(--success-soft); color: var(--success); font-size: 12px; font-weight: 700; }
.privacy-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.version-meta {
  color: #98a2b3;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  padding: 0 2px;
}

.tabs {
  height: 54px; display: flex; gap: 4px; align-items: end; padding: 0 30px;
  background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 76px; z-index: 45;
}
.tab {
  height: 53px; border: 0; background: transparent; padding: 0 18px; color: #667085;
  border-bottom: 3px solid transparent; font-weight: 700;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

.issue-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  padding: 20px 24px 42px;
  align-items: start;
}
.workspace { display: grid; gap: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 5px 15px rgba(15,23,42,.025); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.panel-heading h2 { margin: 5px 0 0; font-size: 17px; letter-spacing: -0.03em; }
.eyebrow { color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.state-chip { padding: 6px 10px; background: var(--soft); color: var(--muted); font-size: 11px; font-weight: 700; }
.state-chip.ready { background: var(--success-soft); color: var(--success); }
.count-badge { padding: 6px 10px; background: var(--primary-soft); color: var(--primary-dark); font-size: 11px; font-weight: 800; }
.type-badge { padding: 5px 9px; background: #e0e7ff; color: #3730a3; font-size: 11px; font-weight: 800; }
.type-badge.teacher { background: #ecfeff; color: #0e7490; }

.dropzone {
  width: 100%; min-height: 116px; border: 1.5px dashed #b8c0d0; border-radius: 15px; background: #fafbfc;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--ink);
  transition: .18s ease;
}
.dropzone:hover, .dropzone.is-dragging { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }
.upload-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: #111827; color: white; font-weight: 900; }
.dropzone strong { font-size: 14px; }
.dropzone small { color: var(--muted); text-align: center; }
.upload-summary { margin-top: 12px; padding: 11px 12px; border-radius: 12px; background: var(--soft); color: var(--muted); font-size: 12px; line-height: 1.6; }
.upload-summary .summary-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; }

.button-row { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.button-row.compact { margin-top: 12px; }
.button-row.right { justify-content: flex-end; }
.button-row.wrap { flex-wrap: wrap; }
.btn { border: 1px solid transparent; border-radius: 11px; padding: 10px 14px; font-weight: 800; font-size: 13px; transition: .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 7px 16px rgba(79,70,229,.22); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.secondary { background: #111827; color: #fff; }
.btn.ghost { background: #fff; border-color: var(--line); color: #475467; }
.btn.mini { padding: 7px 10px; border-radius: 9px; font-size: 11px; }
.btn:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.career-actions { margin: -6px 0 12px !important; }

.search-box { height: 44px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 12px; padding: 0 13px; background: #fff; }
.search-box:focus-within { border-color: #9da5ff; box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.search-box span { color: #98a2b3; font-size: 18px; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; }
.search-box.wide { min-width: 410px; }

.person-list { max-height: 260px; overflow: auto; display: grid; gap: 8px; margin-top: 12px; }
.person-card { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; padding: 13px 14px; border: 1px solid var(--line); background: #fff; border-radius: 12px; }
.person-card:hover { border-color: #b9befa; background: #fafaff; }
.person-card.is-active { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 2px rgba(79,70,229,.08); }
.person-main strong { display: block; font-size: 14px; }
.person-main small { display: block; margin-top: 3px; color: var(--muted); }
.person-meta { text-align: right; color: var(--muted); font-size: 11px; }
.person-meta .has-error { color: var(--danger); font-weight: 800; }

.career-list { display: grid; gap: 9px; }
.career-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.career-card:hover { border-color: #c8ccfa; }
.career-card.is-selected { border-color: var(--primary); background: #fafaff; }
.career-card.is-blocked { background: #fafafa; opacity: .72; }
.career-check { width: 19px; height: 19px; accent-color: var(--primary); }
.career-info strong { display: block; font-size: 13px; }
.career-info span { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.career-badges { display: flex; gap: 5px; flex-direction: column; align-items: end; color: var(--muted); font-size: 10px; }
.status-pill { display: inline-flex; padding: 4px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.status-pill.clean { color: var(--success); background: var(--success-soft); }
.status-pill.error { color: var(--danger); background: var(--danger-soft); }
.status-pill.warning { color: var(--warning); background: var(--warning-soft); }

.empty-state { display: grid; place-items: center; min-height: 110px; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; text-align: center; }
.empty-state.small { min-height: 86px; }
.empty-state p { margin: 0; font-size: 12px; }
.inline-alert { margin-bottom: 12px; padding: 11px 12px; border-radius: 11px; background: var(--warning-soft); border: 1px solid #fde68a; color: #92400e; font-size: 12px; line-height: 1.5; }
.inline-alert.error { background: var(--danger-soft); border-color: #fecaca; color: #991b1b; }

.field-section { margin-bottom: 17px; }
.field-section + .field-section { padding-top: 2px; }
.field-caption { display: block; margin-bottom: 8px; color: #475467; font-size: 12px; font-weight: 800; }
.field-help { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.segment-control { display: flex; flex-wrap: wrap; gap: 7px; }
.segment-btn { border: 1px solid var(--line); background: #fff; color: #475467; border-radius: 10px; padding: 9px 12px; font-size: 12px; font-weight: 800; }
.segment-btn:hover { border-color: #b9befa; }
.segment-btn.is-active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); box-shadow: 0 0 0 2px rgba(79,70,229,.06); }
.small-segment .segment-btn { min-width: 72px; }

.rrn-input-panel {
  margin-top: 12px;
  padding: 13px;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  background: #fafaff;
}
.rrn-input-label { display: grid; gap: 7px; color: #475467; font-size: 12px; font-weight: 800; }
.rrn-input-label input {
  width: 100%; border: 1px solid var(--line); border-radius: 11px; background: #fff;
  padding: 10px 11px; outline: none; color: var(--ink); font-size: 14px; letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.rrn-input-label input:focus { border-color: #9da5ff; box-shadow: 0 0 0 3px rgba(79,70,229,.09); }
.rrn-input-status { margin-top: 8px; min-height: 18px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.rrn-input-status.success { color: var(--success); font-weight: 700; }
.rrn-input-status.warning { color: #92400e; font-weight: 700; }
.rrn-input-status.error { color: var(--danger); font-weight: 700; }
.rrn-privacy-help { margin: 5px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.45; }

.form-grid { display: grid; gap: 13px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-grid label { display: grid; gap: 7px; color: #475467; font-size: 12px; font-weight: 700; }
.form-grid input, .form-grid textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 11px; background: #fff; padding: 10px 11px; outline: none; color: var(--ink); }
.form-grid input:focus, .form-grid textarea:focus, select:focus { border-color: #9da5ff; box-shadow: 0 0 0 3px rgba(79,70,229,.09); }
.span-2 { grid-column: span 2; }
.extra-fields { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 13px; }
.extra-fields summary { cursor: pointer; color: #475467; font-size: 12px; font-weight: 800; }
.details-body { margin-top: 13px; }

.preview-column {
  position: sticky;
  top: 146px;
  min-width: 0;
  height: calc(100vh - 162px);
  min-height: 560px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; padding: 0 3px; }
.preview-heading-group { display: flex; align-items: center; gap: 14px; min-width: 0; flex-wrap: wrap; }
.preview-title-line { display: flex; align-items: center; white-space: nowrap; }
.preview-toolbar strong { font-size: 14px; }
.preview-toolbar .preview-title-line span { margin-left: 8px; color: var(--muted); font-size: 11px; }
.preview-actions { margin-top: 0 !important; margin-left: auto; }
.preview-zoom-controls { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 2px 7px rgba(15,23,42,.04); }
.zoom-btn, .zoom-fit-btn { height: 30px; border: 0; border-radius: 7px; background: transparent; color: #475467; font-weight: 800; }
.zoom-btn { width: 30px; font-size: 17px; line-height: 1; }
.zoom-fit-btn { padding: 0 8px; font-size: 10px; white-space: nowrap; }
.zoom-btn:hover, .zoom-fit-btn:hover { background: var(--soft); color: var(--ink); }
.zoom-fit-btn.is-active { background: var(--primary-soft); color: var(--primary-dark); }
.zoom-level { min-width: 42px; margin: 0 !important; text-align: center; color: #475467 !important; font-size: 10px !important; font-variant-numeric: tabular-nums; }
.paper-wrap {
  min-width: 0;
  min-height: 0;
  padding: 16px;
  background: #dfe3e9;
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.paper-wrap.is-zoomed { cursor: default; }
.preview-stage {
  position: relative;
  flex: 0 0 auto;
  margin: 0 auto;
}
.certificate-pages {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  gap: 22px;
  width: 210mm;
  justify-items: center;
  transform-origin: top left;
  transform: scale(var(--preview-scale, 1));
  will-change: transform;
}
.certificate {
  width: 210mm; height: 297mm; min-height: 297mm; margin: 0 auto; background: white; color: #111;
  padding: 16mm 15mm 13mm; font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  box-shadow: 0 6px 25px rgba(15,23,42,.18); font-size: 9.7pt; overflow: hidden;
}
/* v0.7.11: 본문과 발급 footer를 한 페이지 안에서 안정적으로 배치 */
.certificate--main { display: block; }
.certificate-body { display: block; }
.certificate h1 { margin: 0 0 10mm; text-align: center; font-size: 24pt; letter-spacing: .32em; font-weight: 800; }
.certificate-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.certificate-table th, .certificate-table td { border: 1px solid #111; text-align: center; vertical-align: middle; padding: 2.2mm 1.1mm; height: 9mm; line-height: 1.22; box-sizing: border-box; word-break: keep-all; }
.certificate-table th { font-weight: 700; background: #fff; }
.section-label {
  width: 12mm !important; min-width: 12mm !important; max-width: 12mm !important;
  letter-spacing: .08em; padding-left: 0 !important; padding-right: 0 !important;
  text-align: center; vertical-align: middle; overflow: hidden;
}
.section-label br { display: block; }
.identity-table { margin-bottom: -1px; }
/* v0.7.9: 인적사항과 경력사항의 좌측 구분칸 기준선을 동일한 12mm로 고정 */
.identity-table .identity-col-section { width: 12mm; min-width: 12mm; max-width: 12mm; }
.identity-table .identity-col-label { width: 17mm; }
.identity-table .identity-col-identifier { width: 21mm; }
.identity-table td { text-align: left; padding-left: 3mm; }
.career-table { margin-bottom: -1px; }
.career-table .col-section { width: 12mm; min-width: 12mm; max-width: 12mm; }
.career-table .col-date { width: 25mm; }
.career-table .col-ymd { width: 10mm; }
.career-table .col-position { width: 31mm; }
.career-table .col-department { width: auto; }
.career-table .col-hours { width: 31mm; }
.career-table.hours-table .col-date { width: 25mm; }
.career-table.hours-table .col-ymd { width: 9.7mm; }
.career-table.hours-table .col-position { width: 28.5mm; }
.career-table.hours-table .col-department { width: 29.4mm; }
.career-table th, .career-table td { padding: 1.6mm .8mm; height: 7.6mm; font-size: 8.7pt; }
.career-table .section-label-career { line-height: 1.45; }
.career-table tr:first-child th, .career-table tr:nth-child(2) th { height: 8.8mm; }
.career-table tr:last-child th, .career-table tr:last-child td { height: 8mm; }
.summary-table { margin-bottom: -1px; }
/* v0.7.12: 근무연한/퇴직사유는 12mm 구분열이 아니라 기존 22mm 요약 라벨 폭을 유지 */
.summary-table .summary-label { width: 22mm; min-width: 22mm; max-width: 22mm; white-space: nowrap; }
.summary-table th:nth-child(5) { width: 39mm; }
.history-table { margin-bottom: 0; }
.history-table td, .history-table th { height: 8mm; padding: 1.5mm 1mm; }
/* v0.6.6: 긴 상벌·징계·직위해제 문구도 표 안에서 안정적으로 표시 */
.history-table .history-col-section { width: 12mm; min-width: 12mm; max-width: 12mm; }
.history-table .history-col-date { width: 20mm; }
.history-table .history-col-type { width: 32mm; }
.history-table .history-col-agency { width: 32mm; }
.history-table .history-col-type-half { width: 16mm; }
.history-table .history-data-row { height: 8mm; }
.history-table .history-data-row td { height: auto; min-height: 8mm; }
.history-table .history-date-cell { white-space: nowrap; font-size: 8.4pt; }
.history-table .history-text-cell {
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  line-break: strict;
  line-height: 1.18;
  padding-left: .8mm;
  padding-right: .8mm;
}
.history-table .history-text-long { font-size: 8.5pt; letter-spacing: -.01em; }
.history-table .history-text-xlong { font-size: 7.8pt; letter-spacing: -.025em; line-height: 1.14; }
.certificate-footer {
  margin-top: 0; padding-top: 8mm; padding-bottom: 2mm;
  text-align: center; display: flex; flex-direction: column; align-items: center;
}
.certify-text { font-size: 12pt; margin: 0 0 9mm; }
.issue-date { margin: 0 0 8mm; font-size: 11pt; }
.school-name { margin: 0 0 9mm; font-size: 17pt; font-weight: 800; letter-spacing: .18em; line-height: 1.2; }
.contact-box { position: static; align-self: flex-start; width: 65mm; border: 1px solid #111; text-align: left; margin-top: 0; }
.contact-box div { display: grid; grid-template-columns: 25mm 1fr; min-height: 8mm; border-bottom: 1px solid #111; align-items: center; }
.contact-box div:last-child { border-bottom: 0; }
.contact-box span { border-right: 1px solid #111; height: 100%; display: grid; place-items: center; font-weight: 700; }
.contact-box strong { padding-left: 3mm; font-weight: 400; }

/* v0.7.10: 실제 콘텐츠 높이에 따른 A4 1페이지 자동 맞춤 */
.certificate--main.certificate--compact-1 {
  padding-top: 13mm;
  padding-bottom: 13mm;
}
.certificate--main.certificate--compact-1 h1 { margin-bottom: 6mm; }
.certificate--main.certificate--compact-1 .career-table th,
.certificate--main.certificate--compact-1 .career-table td {
  height: 6.8mm;
  padding-top: 1.15mm;
  padding-bottom: 1.15mm;
}
.certificate--main.certificate--compact-1 .career-table tr:first-child th,
.certificate--main.certificate--compact-1 .career-table tr:nth-child(2) th { height: 7.8mm; }
.certificate--main.certificate--compact-1 .career-table tr:last-child th,
.certificate--main.certificate--compact-1 .career-table tr:last-child td { height: 7.2mm; }
.certificate--main.certificate--compact-1 .history-table td,
.certificate--main.certificate--compact-1 .history-table th {
  height: 7.2mm;
  padding-top: 1.15mm;
  padding-bottom: 1.15mm;
}
.certificate--main.certificate--compact-1 .history-table .history-data-row { height: 7.2mm; }
.certificate--main.certificate--compact-1 .history-table .history-data-row td { min-height: 7.2mm; }
.certificate--main.certificate--compact-1 .identity-table th,
.certificate--main.certificate--compact-1 .identity-table td,
.certificate--main.certificate--compact-1 .summary-table th,
.certificate--main.certificate--compact-1 .summary-table td {
  height: 8.5mm;
  padding-top: 1.8mm;
  padding-bottom: 1.8mm;
}
.certificate--main.certificate--compact-1 .certificate-vacation-notes {
  padding-top: 1mm;
  padding-bottom: 1mm;
  line-height: 1.35;
}
.certificate--main.certificate--compact-1 .vacation-note-row + .vacation-note-row { margin-top: .8mm; }
.certificate--main.certificate--compact-1 .certificate-footer {
  margin-top: 0;
  padding-top: 6mm;
  padding-bottom: 1mm;
}
.certificate--main.certificate--compact-1 .certify-text { margin-bottom: 8mm; }
.certificate--main.certificate--compact-1 .issue-date { margin-bottom: 7mm; }
.certificate--main.certificate--compact-1 .school-name { margin-bottom: 8mm; }
.certificate--main.certificate--compact-1 .contact-box div { min-height: 7.3mm; }

.certificate--main.certificate--compact-2 {
  padding-top: 10mm;
  padding-bottom: 12mm;
}
.certificate--main.certificate--compact-2 h1 { margin-bottom: 4mm; }
.certificate--main.certificate--compact-2 .certificate-table th,
.certificate--main.certificate--compact-2 .certificate-table td {
  padding-top: 1mm;
  padding-bottom: 1mm;
}
.certificate--main.certificate--compact-2 .career-table th,
.certificate--main.certificate--compact-2 .career-table td { height: 6.2mm; }
.certificate--main.certificate--compact-2 .career-table tr:first-child th,
.certificate--main.certificate--compact-2 .career-table tr:nth-child(2) th { height: 7mm; }
.certificate--main.certificate--compact-2 .career-table tr:last-child th,
.certificate--main.certificate--compact-2 .career-table tr:last-child td { height: 6.5mm; }
.certificate--main.certificate--compact-2 .history-table td,
.certificate--main.certificate--compact-2 .history-table th {
  height: 6.8mm;
  padding-top: .9mm;
  padding-bottom: .9mm;
}
.certificate--main.certificate--compact-2 .history-table .history-data-row { height: 6.8mm; }
.certificate--main.certificate--compact-2 .history-table .history-data-row td { min-height: 6.8mm; }
.certificate--main.certificate--compact-2 .summary-table th,
.certificate--main.certificate--compact-2 .summary-table td { height: 8mm; }
.certificate--main.certificate--compact-2 .identity-table th,
.certificate--main.certificate--compact-2 .identity-table td { height: 8mm; }
.certificate--main.certificate--compact-2 .certificate-vacation-notes {
  padding-top: .7mm;
  padding-bottom: .7mm;
  line-height: 1.25;
}
.certificate--main.certificate--compact-2 .vacation-note-row + .vacation-note-row { margin-top: .5mm; }
.certificate--main.certificate--compact-2 .certificate-footer {
  margin-top: 0;
  padding-top: 4mm;
  padding-bottom: 0;
}
.certificate--main.certificate--compact-2 .certify-text { margin-bottom: 6mm; }
.certificate--main.certificate--compact-2 .issue-date { margin-bottom: 5mm; }
.certificate--main.certificate--compact-2 .school-name { margin-bottom: 6mm; }
.certificate--main.certificate--compact-2 .contact-box div { min-height: 6.5mm; }

/* v0.7.11: 인적/경력/상벌 첫 구분열은 실제 렌더링에서도 동일한 12mm를 유지 */
.identity-table th.section-label,
.career-table th.section-label,
.history-table th.section-label {
  width: 12mm !important; min-width: 12mm !important; max-width: 12mm !important;
  padding-left: 0 !important; padding-right: 0 !important;
}

.print-help { text-align: center; color: var(--muted); font-size: 11px; margin: 9px 0 0; }

.appendix-page { padding-top: 18mm; }
.appendix-page h1 { font-size: 20pt; margin-bottom: 8mm; }
.appendix-meta { margin-bottom: 5mm; }
.appendix-meta th { width: 22mm; }
.appendix-meta td { text-align: left; padding-left: 3mm; }
.appendix-table th, .appendix-table td { height: 8.7mm; }
.appendix-footer { margin-top: 10mm; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; font-size: 10pt; }
.appendix-footer .appendix-school { text-align: center; font-weight: 800; }
.appendix-footer .appendix-page-no { text-align: right; }
.appendix-footer .appendix-date { text-align: left; }

.page-heading { display: flex; justify-content: space-between; align-items: flex-end; padding: 34px 38px 22px; }
.page-heading h1 { margin: 7px 0 6px; font-size: 28px; letter-spacing: -.04em; }
.page-heading p { margin: 0; color: var(--muted); }
.compact-heading { padding-left: 0; padding-top: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 0 38px 16px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.stat-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-card strong { display: block; margin-top: 7px; font-size: 27px; }
.stat-card.danger strong { color: var(--danger); }
.stat-card.warning strong { color: var(--warning); }
.ledger-panel { margin: 0 38px 45px; padding: 0; overflow: hidden; }
.ledger-toolbar { display: flex; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.ledger-toolbar select { width: 160px; }
.table-scroll { overflow: auto; max-height: calc(100vh - 350px); }
.data-table { width: 100%; border-collapse: collapse; min-width: 1100px; font-size: 12px; }
.data-table th { position: sticky; top: 0; z-index: 2; padding: 12px 10px; text-align: left; background: #f8fafc; border-bottom: 1px solid var(--line); color: #475467; white-space: nowrap; }
.data-table td { padding: 12px 10px; border-bottom: 1px solid #eef1f5; vertical-align: top; }
.data-table tr:hover td { background: #fafbff; }
.issue-text { min-width: 230px; color: #475467; line-height: 1.5; }
.issue-text .error-text { color: var(--danger); }
.issue-text .warning-text { color: var(--warning); }
.edit-row { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 7px 10px; font-weight: 800; color: #475467; }
.empty-cell { height: 180px; text-align: center; color: var(--muted); }

.settings-layout { max-width: 760px; margin: 0 auto; padding: 48px 24px; }
.settings-card { padding: 26px; }
.setting-note { margin: 20px 0; padding: 15px; background: var(--warning-soft); border: 1px solid #fde68a; border-radius: 12px; }
.setting-note strong { color: #92400e; }
.setting-note p { margin: 6px 0 0; color: #92400e; font-size: 12px; line-height: 1.6; }
.setting-note.safe-note { background: var(--success-soft); border-color: #bbf7d0; }
.setting-note.safe-note strong, .setting-note.safe-note p { color: #166534; }

.edit-dialog { width: min(720px, calc(100vw - 40px)); border: 0; border-radius: 20px; padding: 0; box-shadow: 0 30px 80px rgba(15,23,42,.32); }
.edit-dialog::backdrop { background: rgba(15,23,42,.52); backdrop-filter: blur(2px); }
.edit-dialog form { padding: 24px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 19px; }
.dialog-heading h2 { margin: 4px 0 0; }
.icon-button { border: 0; background: var(--soft); border-radius: 10px; width: 36px; height: 36px; font-size: 23px; color: #667085; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }

.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #111827; color: white; padding: 12px 17px; border-radius: 12px; font-size: 13px; font-weight: 700; box-shadow: var(--shadow); transition: .22s ease; z-index: 1000; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1350px) {
  body { min-width: 1100px; }
  .issue-layout { gap: 16px; padding-left: 18px; padding-right: 18px; }
  .panel { padding: 18px; }
  .paper-wrap { padding: 12px; }
}

@media (max-width: 1099px) {
  body { min-width: 0; }
  .topbar { padding: 0 16px; }
  .brand-subtitle, .privacy-badge { display: none; }
  .tabs { padding: 0 10px; }
  .tab { padding: 0 12px; }
  .issue-layout { display: block; padding: 16px 12px 40px; }
  .workspace { margin-bottom: 20px; }
  .preview-column { position: static; height: auto; min-height: 0; display: block; }
  .preview-toolbar { align-items: flex-start; gap: 10px; }
  .preview-heading-group { width: 100%; justify-content: space-between; }
  .paper-wrap,
  .paper-wrap.is-multipage {
    min-height: 420px;
    max-height: 78vh;
    padding: 12px;
    border-radius: 12px;
    overflow: auto;
    display: block;
  }
  .form-grid.two { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .page-heading { padding: 24px 16px 16px; align-items: flex-start; gap: 14px; flex-direction: column; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); padding: 0 16px 16px; }
  .ledger-panel { margin: 0 16px 32px; }
  .ledger-toolbar { flex-direction: column; }
  .search-box.wide { min-width: 0; }
}

@media (max-width: 640px) {
  .preview-toolbar { flex-direction: column; align-items: stretch; }
  .preview-heading-group { align-items: flex-start; }
  .preview-toolbar .button-row { width: 100%; }
  .preview-toolbar .btn { flex: 1; }
  .preview-actions { margin-left: 0; }
}

@media print {
  @page { size: A4 portrait; margin: 0; }
  html, body { width: 210mm; min-width: 0; margin: 0; padding: 0; background: white; }
  .no-print, .topbar, .tabs, .workspace, .preview-toolbar, .print-help { display: none !important; }
  .tab-panel, #tab-issue, .issue-layout, .preview-column, .paper-wrap, #print-area, .preview-stage, .certificate-pages { display: block !important; position: static !important; margin: 0 !important; padding: 0 !important; width: 210mm !important; height: auto !important; min-height: 0 !important; max-height: none !important; background: white !important; box-shadow: none !important; overflow: visible !important; }
  .certificate-pages { transform: none !important; }
  .certificate { width: 210mm !important; height: 297mm !important; min-height: 297mm !important; box-shadow: none !important; margin: 0 !important; break-after: page; page-break-after: always; }
  .certificate:last-child { break-after: auto; page-break-after: auto; }
}

/* v0.3: 기본양식 다운로드 및 시간강사 표시 */
.type-badge.instructor { background: #f3e8ff; color: #7e22ce; }
.template-download { position: relative; }
.template-download > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; user-select: none; }
.template-download > summary::-webkit-details-marker { display: none; }
.template-download[open] > summary { border-color: #b9befa; background: var(--primary-soft); color: var(--primary-dark); }
.template-download-menu {
  position: absolute; left: 0; top: calc(100% + 7px); z-index: 30; width: 285px;
  padding: 7px; border: 1px solid var(--line); border-radius: 13px; background: #fff;
  box-shadow: 0 16px 36px rgba(15,23,42,.16);
}
.template-download-menu a {
  display: block; padding: 10px 11px; border-radius: 9px; color: #344054;
  text-decoration: none; font-size: 12px; font-weight: 750; line-height: 1.4;
}
.template-download-menu a:hover { background: var(--primary-soft); color: var(--primary-dark); }
.career-info .career-summary { color: #475467; font-weight: 700; }
.career-info .career-subline { color: var(--muted); font-size: 10.5px; }
.status-pill.info { color: #6b21a8; background: #f3e8ff; }

@media (max-width: 640px) {
  .template-download { width: 100%; }
  .template-download > summary { width: 100%; }
  .template-download-menu { width: min(320px, calc(100vw - 48px)); }
}


/* v0.3.1: 읽기 편한 타이포그래피와 증명서 표 굵기 보정 */
body { font-size: 15px; line-height: 1.5; }
.brand-title { font-size: 18px; }
.brand-subtitle { font-size: 13px; }
.privacy-badge { font-size: 13px; }
.version-meta { font-size: 11px; }
.tab { font-size: 15px; }
.panel-heading h2 { font-size: 19px; line-height: 1.35; }
.eyebrow { font-size: 12px; }
.state-chip, .count-badge, .type-badge { font-size: 12px; }
.dropzone strong { font-size: 16px; }
.dropzone small { font-size: 13px; line-height: 1.45; }
.upload-summary { font-size: 13px; }
.btn { font-size: 14px; padding: 11px 15px; }
.btn.mini { font-size: 12px; padding: 8px 11px; }
.search-box input { font-size: 14px; }
.person-main strong { font-size: 15px; }
.person-main small { font-size: 12.5px; }
.person-meta { font-size: 12px; }
.career-info strong { font-size: 14px; line-height: 1.45; }
.career-info span { font-size: 12px; line-height: 1.45; }
.career-info .career-subline { font-size: 11.5px; }
.career-badges, .status-pill { font-size: 11px; }
.empty-state p, .inline-alert { font-size: 13px; }
.field-caption, .rrn-input-label, .form-grid label, .extra-fields summary { font-size: 13px; }
.field-help, .rrn-input-status { font-size: 12px; }
.rrn-privacy-help { font-size: 11.5px; }
.segment-btn { font-size: 13px; padding: 10px 13px; }
.preview-toolbar strong { font-size: 15px; }
.preview-toolbar .preview-title-line span { font-size: 12px; }
.zoom-fit-btn, .zoom-level { font-size: 11px !important; }
.print-help { font-size: 12px; }
.data-table { font-size: 13px; }
.template-download-menu a { font-size: 13px; padding: 11px 12px; }
.setting-note p { font-size: 13px; }
.toast { font-size: 14px; }

/* 시간강사 경력에서도 요약표 일부가 과하게 굵어 보이지 않도록 정규화 */
.summary-table th { font-weight: 600; }
.summary-table td { font-weight: 400 !important; }

/* v0.4.0: 오류 위치 바로가기와 세로형 수정 모달 */
/* v0.4.1: 숫자 8자리 직접입력과 달력 선택을 함께 지원하는 날짜 입력 */
body.dialog-open { overflow: hidden; }

.career-card {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.career-select-area {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.career-card.is-blocked { opacity: 1; }
.career-card.is-blocked .career-select-area { opacity: .7; cursor: not-allowed; }
.career-card.is-blocked .career-badges { opacity: 1; }
button.status-pill {
  border: 0;
  font-family: inherit;
  line-height: 1.25;
}
button.status-pill.actionable { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
button.status-pill.actionable:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(15,23,42,.1); }
button.status-pill.actionable:focus-visible {
  outline: 3px solid rgba(79,70,229,.24);
  outline-offset: 2px;
}

.alert-section + .alert-section { margin-top: 10px; padding-top: 10px; border-top: 1px solid currentColor; border-top-color: rgba(146,64,14,.18); }
.inline-alert.error .alert-section + .alert-section { border-top-color: rgba(153,27,27,.16); }
.alert-heading { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 900; }
.alert-action,
.alert-message {
  display: block;
  width: 100%;
  padding: 4px 5px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.45;
  text-align: left;
}
.alert-action { cursor: pointer; }
.alert-action:hover { background: rgba(255,255,255,.55); text-decoration: underline; text-underline-offset: 2px; }
.alert-action:focus-visible { outline: 3px solid rgba(79,70,229,.2); outline-offset: 1px; }
.alert-more { margin: 5px 5px 0; font-size: 12px; opacity: .85; }

#field-birth.attention-highlight {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79,70,229,.16);
  animation: applicant-field-pulse 1.4s ease;
}
@keyframes applicant-field-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
  45% { box-shadow: 0 0 0 7px rgba(79,70,229,.2); }
}

.edit-dialog {
  width: min(660px, calc(100vw - 32px));
  max-height: 90vh;
  overflow: hidden;
}
.edit-dialog form {
  padding: 0;
  max-height: 90vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}
.dialog-heading {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.dialog-body {
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px 24px;
  overscroll-behavior: contain;
}
.edit-form-grid { grid-template-columns: minmax(0, 1fr); }
.edit-form-grid .span-2 { grid-column: span 1; }

.date-entry-control {
  position: relative;
  display: block;
}
.form-grid .date-entry-control > input[type="text"] {
  padding-right: 48px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}
.date-picker-button {
  position: absolute;
  top: 50%;
  right: 5px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #344054;
  cursor: pointer;
  transform: translateY(-50%);
}
.date-picker-button:hover { background: #f2f4f7; }
.date-picker-button:focus-visible {
  outline: 3px solid rgba(79,70,229,.2);
  outline-offset: 1px;
}
.date-picker-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.form-grid .native-date-picker {
  position: absolute;
  right: 8px;
  bottom: 5px;
  width: 1px;
  height: 1px;
  min-width: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.dialog-actions {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 15px 24px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.98);
  box-shadow: 0 -8px 20px rgba(15,23,42,.04);
}
.edit-issues { margin: 16px 0 0; }
.edit-issue-action,
.edit-issue-message {
  display: block;
  width: 100%;
  padding: 4px 5px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.45;
  text-align: left;
}
.edit-issue-action { cursor: pointer; }
.edit-issue-action:hover { background: rgba(255,255,255,.55); text-decoration: underline; text-underline-offset: 2px; }
.edit-issue-action:focus-visible { outline: 3px solid rgba(79,70,229,.2); outline-offset: 1px; }
.form-grid input.is-invalid,
.form-grid textarea.is-invalid,
.form-grid select.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}
.edit-field-message {
  margin-top: -2px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .career-card { grid-template-columns: minmax(0, 1fr) auto; padding: 12px; }
  .career-badges { min-width: 58px; }
  .edit-dialog { width: calc(100vw - 20px); max-height: 94vh; border-radius: 17px; }
  .edit-dialog form { max-height: 94vh; }
  .dialog-heading { padding: 18px 18px 15px; }
  .dialog-body { padding: 17px 18px 22px; }
  .dialog-actions { padding: 13px 18px; }
}
.person-meta .needs-input { color: var(--warning); font-weight: 800; }

/* v0.5.1: 시간강사·전문강사 방학기간 발급 옵션 */
.vacation-options-section {
  margin-top: 2px;
  padding-top: 17px !important;
  border-top: 1px solid var(--line);
}
.vacation-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}
.vacation-section-heading .field-caption { margin-bottom: 2px; }
.vacation-section-heading .field-help { margin-top: 3px; }
.temporary-chip,
.vacation-source-chip {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
}
.temporary-chip { padding: 5px 8px; color: #4338ca; background: var(--primary-soft); }
.vacation-source-chip { padding: 4px 7px; color: #667085; background: #f2f4f7; }
.vacation-options-list { display: grid; gap: 12px; }
.vacation-option-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfe;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.vacation-option-card.has-error { border-color: #fecaca; box-shadow: 0 0 0 3px rgba(220,38,38,.05); }
.vacation-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}
.vacation-card-heading strong { display: block; color: var(--ink); font-size: 13.5px; line-height: 1.4; }
.vacation-card-heading span:not(.vacation-source-chip) { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.vacation-card-heading .vacation-range-help { margin-top: 5px; color: #4f46e5; font-size: 11px; font-weight: 750; }
.vacation-mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.vacation-mode-card {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: #475467;
  text-align: left;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.vacation-mode-card:hover { border-color: #b9befa; background: #fafaff; }
.vacation-mode-card:focus-visible { outline: 3px solid rgba(79,70,229,.2); outline-offset: 2px; }
.vacation-mode-card.is-active { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 2px rgba(79,70,229,.05); color: var(--primary-dark); }
.vacation-radio-dot {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  border: 1.5px solid #98a2b3;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 3px #fff;
}
.vacation-mode-card.is-active .vacation-radio-dot { border-color: var(--primary); background: var(--primary); }
.vacation-mode-card strong { display: block; font-size: 12.5px; line-height: 1.35; }
.vacation-mode-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 10.5px; line-height: 1.35; font-weight: 600; }
.vacation-detail-panel { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); }
.vacation-period-list { display: grid; gap: 9px; }
.vacation-period-card { padding: 12px; border: 1px solid #dfe3eb; border-radius: 12px; background: #fff; }
.vacation-period-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.vacation-period-heading strong { font-size: 12.5px; }
.vacation-remove-button,
.vacation-add-button {
  border-radius: 9px;
  font-weight: 800;
  font-size: 11.5px;
}
.vacation-remove-button { padding: 5px 8px; border: 0; background: #f2f4f7; color: #667085; }
.vacation-remove-button:hover { background: #eaecf0; color: #344054; }
.vacation-add-button { width: 100%; margin-top: 9px; padding: 9px 11px; border: 1px dashed #a5b4fc; background: #fafaff; color: var(--primary-dark); }
.vacation-add-button:hover { border-style: solid; background: var(--primary-soft); }
.vacation-remove-button:focus-visible,
.vacation-add-button:focus-visible { outline: 3px solid rgba(79,70,229,.2); outline-offset: 2px; }
.vacation-type-field,
.vacation-date-field { display: grid; gap: 6px; margin-top: 9px; color: #475467; font-size: 12px; font-weight: 750; }
.vacation-type-field { margin-top: 0; }
.vacation-type-field > span { display: flex; align-items: baseline; gap: 5px; }
.vacation-type-field small { color: var(--muted); font-size: 10.5px; font-weight: 650; }
.vacation-type-field select {
  width: 100%;
  padding: 10px 34px 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.vacation-type-field select:focus { border-color: #9da5ff; box-shadow: 0 0 0 3px rgba(79,70,229,.09); }
.vacation-date-input {
  width: 100%;
  padding: 10px 47px 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  outline: none;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.vacation-date-input:focus { border-color: #9da5ff; box-shadow: 0 0 0 3px rgba(79,70,229,.09); }
.vacation-date-input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220,38,38,.09); }
.vacation-field-message { min-height: 0; color: var(--danger); font-size: 11.5px; font-weight: 700; line-height: 1.4; }
.vacation-field-message:empty { display: none; }
.vacation-field-message > span { display: block; }
.vacation-quick-fix {
  margin-top: 6px;
  padding: 6px 9px;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  background: #fff;
  color: #b42318;
  font-size: 11px;
  font-weight: 850;
}
.vacation-quick-fix:hover { background: #fff5f5; border-color: #f87171; }
.vacation-quick-fix:focus-visible { outline: 3px solid rgba(220,38,38,.16); outline-offset: 2px; }
.vacation-card-alert { margin-top: 9px; padding: 9px 10px; border: 1px solid #fecaca; border-radius: 10px; background: var(--danger-soft); color: #991b1b; white-space: pre-line; font-size: 11.5px; font-weight: 700; line-height: 1.45; }
.vacation-output-preview { margin-top: 10px; padding: 10px 11px; border: 1px solid #dfe3ff; border-radius: 11px; background: #f8f8ff; }
.vacation-output-preview.has-error { border-color: #fecaca; background: #fff8f8; }
.vacation-output-preview > span { display: block; color: #4f46e5; font-size: 10.5px; font-weight: 850; }
.vacation-output-preview p { margin: 5px 0 0; color: #344054; font-size: 12px; line-height: 1.55; word-break: keep-all; }
.vacation-output-preview p strong { font-weight: 850; }
.vacation-preview-valid { display: block; }
.vacation-preview-issues { display: grid; gap: 3px; margin-top: 6px; color: #b42318; font-size: 11.5px; font-weight: 750; }
.vacation-preview-empty { color: var(--muted); }
.vacation-type-label { font-weight: 800; white-space: nowrap; }
.vacation-period-text { white-space: nowrap; }
.vacation-comma { white-space: normal; }

.career-position-cell { white-space: normal; }
.vacation-reference { font-size: .82em; font-weight: 700; vertical-align: super; white-space: nowrap; }
.certificate-vacation-notes {
  width: 100%;
  margin: 0 0 -1px;
  padding: 1.5mm 3mm 1.5mm;
  border: 1px solid #111;
  border-top: 0;
  color: #111;
  font-size: 8.4pt;
  line-height: 1.45;
  text-align: left;
  break-inside: avoid;
}
.vacation-note-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 1.2mm; }
.vacation-note-row + .vacation-note-row { margin-top: 1.2mm; }
.vacation-note-row strong { flex: 0 0 auto; font-weight: 700; }
.vacation-note-periods { display: inline; }
.vacation-note-suffix { white-space: nowrap; }

@media (max-width: 640px) {
  .vacation-section-heading { display: grid; }
  .temporary-chip { justify-self: start; }
  .vacation-card-heading { display: grid; }
  .vacation-source-chip { justify-self: start; }
  .vacation-mode-grid { grid-template-columns: 1fr; }
  .vacation-mode-card { padding: 11px; }
}

.vacation-date-field .native-date-picker {
  position: absolute;
  right: 8px;
  bottom: 5px;
  width: 1px;
  height: 1px;
  min-width: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

/* v0.6.0: 후속 퇴직·면직 발령 연결 */
.followup-meta { color: #7c3aed; font-weight: 850; }
.followup-card {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid #ddd6fe;
  border-radius: 14px;
  background: #faf9ff;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
}
.followup-card.has-error { border-color: #fecaca; background: #fff8f8; }
.followup-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.followup-card-head strong { color: #312e81; font-size: 13px; }
.followup-card.has-error .followup-card-head strong { color: #991b1b; }
.followup-card p { margin: 0; color: #475467; font-size: 12px; line-height: 1.5; }
.followup-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #ebe9fe;
  color: #475467;
  font-size: 11.5px;
}
.followup-preview strong { color: #111827; }
.followup-actions { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.btn.small { min-height: 32px; padding: 7px 10px; border-radius: 9px; font-size: 11.5px; }
.status-pill.followup { color: #6d28d9; background: #ede9fe; border: 0; }

@media (max-width: 640px) {
  .followup-actions { justify-content: stretch; }
  .followup-actions .btn { flex: 1 1 auto; }
  .followup-preview { display: grid; grid-template-columns: 1fr; }
  .followup-preview > span[aria-hidden="true"] { display: none; }
}


/* v0.6.1: 날짜 한쪽만 있는 행의 퇴직 발령 가능성 확인 */
.followup-card.needs-reason { border-color: #fcd34d; background: #fffdf5; }
.followup-reason-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}
.followup-reason-box label { display: grid; gap: 5px; color: #344054; font-size: 12px; font-weight: 700; }
.followup-reason-box select,
.followup-reason-box input {
  width: 100%; min-width: 0; height: 38px; padding: 0 10px;
  border: 1px solid #d0d5dd; border-radius: 8px; background: #fff;
  color: #101828; font: inherit; font-weight: 600;
}
.followup-reason-box select:focus-visible,
.followup-reason-box input:focus-visible { outline: 2px solid #6366f1; outline-offset: 1px; border-color: #6366f1; }
.followup-actions .btn:disabled { opacity: .45; cursor: not-allowed; }


/* v0.6.3: 상벌·직위해제 구조화 입력 */
.history-entry-list { display: grid; gap: 10px; }
.history-entry-card { border: 1px solid var(--line); border-radius: 13px; padding: 12px 13px; background: #fafbfc; }
.history-entry-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.history-entry-heading strong { color: #344054; font-size: 13px; }
.history-toggle { display: inline-flex !important; grid-template-columns: auto auto !important; align-items: center; gap: 6px !important; font-size: 12px !important; cursor: pointer; }
.history-toggle input { width: 16px !important; height: 16px; margin: 0; padding: 0; }
.history-empty-help { margin: 6px 0 0; color: #98a2b3; font-size: 11px; line-height: 1.45; }
.history-entry-fields { margin-top: 11px; }
.form-grid.three { grid-template-columns: 0.9fr 1.2fr 1.3fr; }
@media (max-width: 720px) { .form-grid.three { grid-template-columns: 1fr; } }




/* v0.6.5: 상벌·징계·직위해제 반복 입력 */
.history-repeat-list { display: grid; gap: 9px; margin-top: 10px; }
.history-none { margin: 0; padding: 10px 11px; border: 1px dashed #d0d5dd; border-radius: 10px; color: #98a2b3; font-size: 11px; line-height: 1.45; background: #fff; }
.history-repeat-row { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; gap: 9px; align-items: end; padding: 10px; border: 1px solid #e4e7ec; border-radius: 11px; background: #fff; }
.history-repeat-number { align-self: center; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: #eef2ff; color: #4338ca; font-size: 11px; font-weight: 900; }
.history-remove { min-height: 36px; padding: 0 9px; border: 1px solid #f3b5b5; border-radius: 8px; background: #fff; color: #b42318; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.history-remove:hover { background: #fff5f5; }
@media (max-width: 720px) { .history-repeat-row { grid-template-columns: 24px minmax(0,1fr); } .history-remove { grid-column: 2; justify-self: end; } }

/* v0.7.1: 안정화 검증 + 도움말 UI 핫픽스 */
.help-button {
  border: 1px solid #d9deea;
  background: #fff;
  color: #475467;
  border-radius: 10px;
  padding: 7px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: .15s ease;
}
.help-button:hover { background: #f8fafc; border-color: #cfd5df; color: #344054; }

/* v0.7.15: 데이터 삭제 액션은 중립 초기화와 같은 버튼 크기를 쓰되 위험색으로 구분 */
.btn.danger-soft {
  background: #fff5f5;
  border-color: #fecdca;
  color: #b42318;
  box-shadow: none;
}
.btn.danger-soft:hover {
  background: #fff0ee;
  border-color: #fda29b;
  color: #912018;
}
.btn.danger-soft:focus-visible, .help-button:focus-visible {
  outline: 3px solid rgba(180,35,24,.13);
  outline-offset: 2px;
}
.preview-action-divider { width: 1px; height: 24px; background: #e4e7ec; margin: 0 1px; }

.clear-data-dialog {
  width: min(430px, calc(100vw - 32px));
  border: 0;
  border-radius: 19px;
  padding: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 28px 70px rgba(15,23,42,.28);
}
.clear-data-dialog::backdrop { background: rgba(15,23,42,.42); backdrop-filter: blur(2px); }
.clear-data-dialog form { padding: 24px; }
.clear-data-dialog-icon {
  width: 38px; height: 38px; display: grid; place-items: center;
  margin-bottom: 14px; border-radius: 12px; background: #fff4f2; color: #b42318;
  font-size: 20px; font-weight: 900;
}
.clear-data-dialog-copy h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.clear-data-dialog-copy p { margin: 9px 0 0; color: #667085; font-size: 12.5px; line-height: 1.65; }
.clear-data-dialog-actions { margin-top: 22px; }
.btn.danger { background: #b42318; color: #fff; box-shadow: 0 6px 14px rgba(180,35,24,.16); }
.btn.danger:hover { background: #912018; }

.upload-error {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff7f7;
  color: #991b1b;
  display: grid;
  gap: 4px;
}
.upload-error[hidden] { display: none; }
.upload-error strong { font-size: 14px; }
.upload-error span { font-size: 13px; line-height: 1.5; }
.upload-error small { color: #b91c1c; line-height: 1.45; }

.warning-acknowledge {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid #fcd34d;
  border-radius: 12px;
  background: #fffbeb;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}
.warning-acknowledge input { margin-top: 3px; width: 17px; height: 17px; accent-color: #b45309; }
.warning-acknowledge span { display: grid; gap: 3px; color: #78350f; }
.warning-acknowledge small { color: #92400e; line-height: 1.45; }

.print-block-message {
  margin: 8px 0 0;
  padding: 8px 11px;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}
.print-block-message.ready { background: #f0fdf4; color: #166534; }

.help-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  border: 0;
  border-radius: 24px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(15, 23, 42, .30);
}
.help-dialog::backdrop {
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(4px);
}
.help-shell {
  max-height: min(820px, calc(100vh - 32px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}
.help-heading {
  margin: 0;
  padding: 25px 28px 20px;
  border-bottom: 1px solid #edf0f5;
  background: linear-gradient(180deg, #fbfbff 0%, #fff 100%);
}
.help-heading h2 {
  margin: 7px 0 5px;
  font-size: 22px;
  letter-spacing: -.04em;
  color: #172033;
}
.help-heading p {
  margin: 0;
  color: #667085;
  font-size: 12.5px;
  line-height: 1.55;
}
.help-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .09em;
}
.help-close {
  flex: 0 0 auto;
  background: #f2f4f7;
  color: #667085;
}
.help-close:hover { background: #e9edf3; color: #344054; }
.help-body {
  min-height: 0;
  overflow-y: auto;
  padding: 22px 28px 26px;
  background: #fff;
  overscroll-behavior: contain;
}
.help-body section { margin: 0; }
.help-quickstart {
  padding: 17px 18px 18px;
  border: 1px solid #e5e9f0;
  border-radius: 17px;
  background: #fafbfc;
}
.help-quickstart > h3,
.help-card h3 {
  margin: 0;
  color: #344054;
  font-size: 13px;
  letter-spacing: -.02em;
}
.help-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.help-step {
  min-width: 0;
  padding: 12px 11px;
  border: 1px solid #e7e9f3;
  border-radius: 13px;
  background: #fff;
}
.help-step > span {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  margin-bottom: 9px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}
.help-step strong { display: block; color: #344054; font-size: 12px; }
.help-step small { display: block; margin-top: 4px; color: #98a2b3; font-size: 10.5px; line-height: 1.4; }
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.help-card {
  min-width: 0;
  padding: 16px 17px;
  border: 1px solid #e5e9f0;
  border-radius: 16px;
  background: #fff;
}
.help-card-safe { background: #fbfefc; border-color: #d9f2df; }
.help-card-title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.help-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}
.help-body p {
  margin: 7px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.65;
}
.help-body strong { color: #475467; }
.help-status {
  display: inline-flex;
  align-items: center;
  margin-right: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  vertical-align: 1px;
}
.help-status.error { background: #fee2e2; color: #991b1b; }
.help-status.warning { background: #fef3c7; color: #92400e; }
.help-status.clean { background: #dcfce7; color: #166534; }
.help-note {
  margin-top: 10px !important;
  padding: 9px 10px;
  border-radius: 10px;
  background: #f8fafc;
  color: #667085 !important;
  font-size: 11px !important;
}
.help-actions {
  margin: 0;
  padding: 14px 28px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #edf0f5;
  background: #fff;
  box-shadow: 0 -8px 20px rgba(15,23,42,.025);
}
.help-actions .btn { min-width: 78px; padding: 9px 15px; }

@media (max-width: 720px) {
  .header-actions { gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
  .help-button { padding: 6px 8px; }
  .version-meta { display: none; }
  .help-dialog { width: calc(100vw - 18px); max-height: calc(100vh - 18px); border-radius: 19px; }
  .help-shell { max-height: calc(100vh - 18px); }
  .help-heading { padding: 20px 19px 16px; }
  .help-heading h2 { font-size: 19px; }
  .help-body { padding: 16px 18px 20px; }
  .help-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-grid { grid-template-columns: 1fr; }
  .help-actions { padding: 12px 18px; }
}


/* v0.7.3: 경력별 방학기간 귀속을 명확히 표시 */
.vacation-options-section .field-help strong { color: var(--ink); font-weight: 850; }
.vacation-option-card { overflow: hidden; padding: 0; }
.vacation-career-banner {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px;
  padding: 12px 14px; border-bottom: 1px solid #dfe3ff; background: #f7f8ff;
}
.vacation-career-number {
  grid-row: 1 / span 2; align-self: stretch; display: inline-flex; align-items: center; justify-content: center;
  min-width: 72px; padding: 7px 9px; border-radius: 9px; background: var(--primary); color: #fff;
  font-size: 11.5px; font-weight: 900; letter-spacing: -.01em;
}
.vacation-career-banner strong { color: var(--ink); font-size: 14px; line-height: 1.35; }
.vacation-career-banner > span:last-child { color: #667085; font-size: 11.5px; font-weight: 700; }
.vacation-card-heading { padding: 12px 14px 0; }
.vacation-mode-grid { margin: 10px 14px 0; }
.vacation-detail-panel { margin: 11px 14px 14px; }
.vacation-period-heading strong { color: var(--primary-dark); }
.vacation-add-help { margin: 6px 2px 0; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.vacation-option-card + .vacation-option-card { margin-top: 4px; }
@media (max-width: 720px) {
  .vacation-career-banner { grid-template-columns: 1fr; }
  .vacation-career-number { grid-row: auto; justify-self: start; min-width: 0; }
  .vacation-mode-grid { margin-left: 12px; margin-right: 12px; }
  .vacation-card-heading { padding-left: 12px; padding-right: 12px; }
  .vacation-detail-panel { margin-left: 12px; margin-right: 12px; }
}


/* v0.7.4: 제작자 표기를 상단에서 제거하고 서비스 정보로 정리 */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 18px 24px 24px;
  color: #98a2b3;
  font-size: 10.5px;
  line-height: 1.4;
}
.site-footer-brand { color: #8a94a6; font-weight: 650; }
.site-footer-separator { color: #c5cad3; }
.site-footer-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: #98a2b3;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.site-footer-link:hover { color: #667085; text-decoration: underline; text-underline-offset: 2px; }

.help-service-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border-top: 1px solid #edf0f5;
  color: #98a2b3;
  font-size: 10.5px;
}
.help-service-info > span { font-weight: 750; color: #98a2b3; }
.help-service-info strong { color: #667085; font-weight: 800; }
.help-service-info a { margin-left: auto; color: #7c8798; text-decoration: none; font-weight: 750; }
.help-service-info a:hover { color: #475467; text-decoration: underline; text-underline-offset: 2px; }
.help-actions { justify-content: flex-end; }

@media (max-width: 720px) {
  .site-footer { padding: 15px 18px 20px; font-size: 10px; }
  .help-service-info { flex-wrap: wrap; }
  .help-service-info a { margin-left: 0; }
}

/* v0.7.5: 암호화 Excel 파일 입력 */
.password-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 32px));
  border: 0;
  border-radius: 22px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(15, 23, 42, .30);
}
.password-dialog::backdrop {
  background: rgba(15, 23, 42, .50);
  backdrop-filter: blur(4px);
}
.password-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(680px, calc(100vh - 32px));
  overflow: hidden;
}
.password-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(180deg, #fbfbff 0%, #fff 100%);
}
.password-heading-copy { display: flex; align-items: flex-start; gap: 13px; min-width: 0; }
.password-lock {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #dfe3f6;
  border-radius: 13px;
  background: #f4f5ff;
  font-size: 18px;
}
.password-heading h2 { margin: 4px 0 0; font-size: 19px; letter-spacing: -.035em; }
.password-file-name {
  max-width: 360px;
  margin: 6px 0 0;
  color: #667085;
  font-size: 11.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.password-body { padding-top: 22px; }
.password-field { display: grid; gap: 8px; color: #344054; font-size: 12px; font-weight: 800; }
.password-input-wrap { position: relative; display: block; }
.password-input-wrap input {
  width: 100%;
  min-height: 46px;
  padding: 10px 68px 10px 13px;
  border: 1px solid #d0d5dd;
  border-radius: 11px;
  background: #fff;
  color: #101828;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: .15s ease;
}
.password-input-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .12);
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  min-width: 50px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #f2f4f7;
  color: #475467;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.password-toggle:hover { background: #eaecf0; color: #344054; }
.password-status {
  margin-top: 11px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff7f7;
  color: #991b1b;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}
.password-status[hidden] { display: none; }
.password-status.is-info { border-color: #d9defc; background: #f7f7ff; color: #4338ca; }
.password-privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 15px;
  padding: 12px 13px;
  border: 1px solid #d9f2df;
  border-radius: 12px;
  background: #fbfefc;
  color: #475467;
}
.password-privacy-note > span { color: #15803d; font-weight: 900; }
.password-privacy-note p { margin: 0; font-size: 11.5px; line-height: 1.55; }
.password-privacy-note strong { color: #166534; }
.password-actions { justify-content: flex-end; }
.password-actions .btn { min-width: 92px; }
.password-dialog.is-busy .password-toggle,
.password-dialog.is-busy [data-close-password] { pointer-events: none; opacity: .55; }

@media (max-width: 560px) {
  .password-dialog { width: calc(100vw - 18px); max-height: calc(100vh - 18px); border-radius: 18px; }
  .password-shell { max-height: calc(100vh - 18px); }
  .password-heading { padding: 18px 18px 15px; }
  .password-heading-copy { gap: 10px; }
  .password-lock { width: 38px; height: 38px; border-radius: 11px; }
  .password-heading h2 { font-size: 17px; }
  .password-body { padding: 18px; }
  .password-actions { padding: 13px 18px; }
}


@media (max-width: 720px) {
  .preview-actions { gap: 7px; }
  .preview-data-clear { flex: 0 0 auto !important; padding-left: 7px; padding-right: 7px; }
  .preview-action-divider { display: none; }
  .clear-data-dialog form { padding: 21px 19px 18px; }
  .clear-data-dialog-actions .btn { flex: 1; }
}
