/* =====================================================================
   디자인(휴램프로 참고): 글꼴·색·메뉴·표·버튼·입력·배지
   style.css 뒤에 읽어 겉모양만 덮어쓴다. 급여대장 표(.ledger-grid)의 칸 크기는 건드리지 않는다.
   ===================================================================== */
:root {
  --brand: #3d6df2; --brand-d: #2f5bd8; --brand-soft: #eef3ff;
  --navy: #2b3550; --text: #1f2633; --muted: #8b93a1; --line: #e6e8ed; --line2: #f0f2f5; --bg: #f6f7f9;
}
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 14px; color: var(--text); background: var(--bg); letter-spacing: -0.01em; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; margin: 2px 0 18px; }
h1 small.count { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; margin: 28px 0 12px; }
h3 { font-size: 15px; font-weight: 700; }
.muted { color: var(--muted); }
.small { color: #5f6878; }
.head { gap: 12px; flex-wrap: wrap; }
.head h1 { margin-bottom: 14px; }
.crumb { font-size: 13px; color: var(--muted); }

/* ---------- 왼쪽 메뉴 ---------- */
.shell { grid-template-columns: 220px minmax(0, 1fr); }
.shell .side { background: #fff; border-right: 1px solid var(--line); padding: 16px 12px; }
.shell.in-company .side { background: var(--navy); border-right: 0; }
.side .brand { gap: 10px; padding: 6px 10px 20px; font-size: 16px; font-weight: 800; color: var(--text); letter-spacing: -0.03em; }
.side .brand .ico { color: var(--brand); }
.side .brand.back { font-size: 13px; font-weight: 600; color: #9aa6c2; padding-bottom: 16px; }
.side .brand.back .ico { color: #9aa6c2; }
.side .brand.back:hover { color: #fff; text-decoration: none; }
.side nav a { gap: 12px; padding: 10px 12px; margin: 2px 0; border-left: 0; border-radius: 8px; font-size: 14px; font-weight: 500; color: #4b5565; }
.side nav a .ico { flex: none; color: #a0a8b6; }
.side nav a:hover { background: #f3f5f8; color: var(--text); text-decoration: none; }
.side nav a.on { background: var(--brand-soft); color: var(--brand); font-weight: 700; border-left: 0; }
.side nav a.on .ico { color: var(--brand); }
.in-company .side nav a { color: #c6cee0; }
.in-company .side nav a .ico { color: #8592b0; }
.in-company .side nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.in-company .side nav a.on { background: var(--brand); color: #fff; }
.in-company .side nav a.on .ico { color: #fff; }
.side-sep { height: 1px; background: var(--line); margin: 10px 8px; }
.in-company .side-sep { background: rgba(255, 255, 255, .1); }

/* ---------- 위쪽 바 ---------- */
.bar { min-height: 60px; padding: 0 32px; gap: 12px; border-bottom: 1px solid var(--line); }
.bar .co-name { font-size: 17px; font-weight: 800; letter-spacing: -0.03em; margin-right: 0; }
.bar-sep { width: 1px; height: 13px; background: #d6dae1; }
.bar-meta, .bar .who { color: #5f6878; font-size: 13px; }
.page { padding: 28px 32px 56px; }

/* ---------- 버튼 ---------- */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px;
  border: 1px solid var(--brand); border-radius: 8px; background: var(--brand); color: #fff;
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
button:hover, .btn:hover { background: var(--brand-d); border-color: var(--brand-d); text-decoration: none; }
.btn.ghost, button.ghost, button.secondary, .btn.secondary { background: #fff; color: #3a4250 !important; border: 1px solid #d9dde4; }
.btn.ghost:hover, button.ghost:hover, button.secondary:hover, .btn.secondary:hover { background: #f7f8fa; border-color: #c4c9d2; }
button.link, button.link:hover { background: none; border: 0; height: auto; padding: 0; color: var(--brand); font-weight: 500; }
button.link:hover { text-decoration: underline; }
.btn.sm, button.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.small, .emp-list .btn.small { height: 28px; padding: 0 10px; font-size: 12px; }
td .btn, td button:not(.link):not(.toggle) { height: 32px; padding: 0 12px; font-size: 13px; }
td.actions .btn.ghost { border-color: #cdc6f6; color: #5a48d4 !important; }   /* 작업 버튼: 보라 테두리 */
td.actions .btn.ghost:hover { background: #f6f4ff; }
td.actions .btn, td.actions form { margin: 2px 4px 2px 0; vertical-align: middle; }
.btn.disabled { opacity: .4; }

/* ---------- 입력 칸 (급여대장 칸 input.cell 은 제외, :where 로 우선순위를 낮춘다) ---------- */
:where(.page) :where(input, select, textarea) {
  border: 1px solid #d9dde4; border-radius: 8px; font-family: inherit; font-size: 14px; color: var(--text); background-color: #fff;
}
:where(.page) :where(input:not([type=checkbox], [type=radio], [type=file], .cell, .hours), select) { height: 38px; padding: 0 12px; }
:where(.page) textarea { padding: 10px 12px; line-height: 1.5; }
:where(.page) :where(input, select, textarea):focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(61, 109, 242, .13); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 16px; height: 16px; }
label { font-size: 13px; font-weight: 500; color: #4b5565; }
label.check { font-weight: 400; color: var(--text); font-size: 14px; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; background: #fff; }
legend { font-weight: 700; padding: 0 6px; }

/* ---------- 표 ---------- */
table { font-size: 14px; background: #fff; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line2); }
th { background: #fff; color: #7b8494; font-weight: 600; font-size: 13px; border-bottom: 1px solid #c9cdf3; white-space: nowrap; }
.tablewrap { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: none; }
.tablewrap > table th, .tablewrap > table td { padding: 14px 16px; }
.tablewrap > table tr:last-child td { border-bottom: 0; }
table:not(.ledger-grid) tr:hover > td { background: #fafbfd; }
tr.total td { background: #f7f8fa; }
code { background: #f1f3f6; }
.ledger-grid thead th { background: #f4f6f9; color: #5f6878; }
.stacked tfoot td { background: #f4f6f9; }

/* ---------- 배지·상태 ---------- */
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #f1f3f6; color: #5f6878; white-space: nowrap; }
.badge.s-draft { background: #f1f3f6; color: #5f6878; }
.badge.s-reviewed, .badge.s-pending { background: #fff3df; color: #b26a00; }
.badge.s-confirmed { background: #e5f6ec; color: #17864a; }
.badge.conf-높음 { background: #e5f6ec; color: #17864a; }
.badge.conf-낮음 { background: #fdebeb; color: #c43838; }
.badge.conf-보통 { background: #f1f3f6; color: #5f6878; }
.toggle { width: 44px; height: 24px; border: 0; padding: 2px; }
.toggle:hover { background: #c9d1da; } .toggle.on, .toggle.on:hover { background: #6b5cf0; }

/* ---------- 탭 ---------- */
.tabs { gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a { padding: 10px 2px; font-size: 15px; font-weight: 600; color: #9aa1ad; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--text); border-bottom-color: var(--brand); font-weight: 700; }

/* ---------- 카드·알림·기타 ---------- */
.card { border: 1px solid var(--line); border-radius: 12px; box-shadow: none; }
p.ok[role=status], p.ok[role=alert], p.error[role=alert] { padding: 10px 14px; border-radius: 8px; font-size: 14px; }
p.ok[role=status], p.ok[role=alert] { background: #ebf7f0; border: 1px solid #cce9d8; color: #17864a; }
p.error[role=alert] { background: #fdf0f0; border: 1px solid #f3cfcf; color: #c43838; }
.notice { background: var(--brand-soft); border-color: #d6e1fd; }
.toolbar { gap: 8px; margin: 4px 0 16px; }
.row.search input { width: 340px; }
.emp-card, .emp-roster { border-color: var(--line); }
dl.kv dt { color: #6b7381; }
.pop-body { border-color: var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(20, 30, 60, .12); }
.auth-card { border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(20, 30, 60, .06); border-radius: 14px; }
.auth-card h1 { color: var(--text); }

/* 수임 업체 목록: 업체명은 검은 글씨, 작업 칸은 한 줄 */
table.clients td a strong { color: var(--text); font-weight: 700; }
table.clients td a:hover strong { color: var(--brand); }
td.actions { white-space: nowrap; }
td.actions form.inline { display: inline-flex; margin: 0 0 0 6px; vertical-align: middle; }
td.actions button.link { font-size: 13px; color: var(--muted); }
.nowrap { white-space: nowrap; }

/* 급여대장 표: 글꼴이 바뀌어 넓어진 숫자가 칸에 다 보이게 */
.ledger-grid { font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.stacked input.cell { padding: 1px 3px; letter-spacing: -0.04em; }
.stacked td.id { white-space: nowrap; font-size: 11px; }
.stacked input.cell { font-size: 11px; }

/* ---------- 임금명세서(휴램프로 양식) ---------- */
.slip-page { max-width: 820px; margin: 0 auto; padding: 24px 16px 48px; background: #f3f4f7; min-height: 100vh; }
.slip-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.slip-actions button { margin-left: auto; }
.slip { background: #fff; padding: 40px 56px 48px; margin: 0 auto 24px; border: 1px solid var(--line); color: #111; font-size: 13px; }
.slip-title { background: #f2f3f6; text-align: center; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; padding: 14px 0; margin: 0 0 18px; }
.slip-meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 8px; line-height: 1.7; }
.slip-meta .right { text-align: right; }
table.slip-grid { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 13px; background: #fff; }
.slip-grid th, .slip-grid td { border: 1px solid #222; padding: 6px 10px; height: 28px; color: #111; }
.slip-grid th { background: #f2f3f6; font-weight: 700; text-align: center; font-size: 13px; white-space: nowrap; }
.slip-grid.person th { width: 16%; text-align: right; } .slip-grid.person td { width: 34%; }
.slip-grid td.name { text-align: right; } .slip-grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.slip-grid td.center { text-align: center; }
.slip-grid th.band { background: #f2f3f6; } .slip-grid th.band2 { background: #fafbfc; }
.slip-grid tr.sum th { text-align: right; } .slip-grid tr.sum td { font-weight: 800; }
.slip-grid td.blank { background: #f7f8fa; }
.slip-grid.methods th.w30 { width: 30%; } .slip-grid.methods td.name { text-align: right; }
.slip-rate { text-align: right; margin: -8px 0 10px; } .slip-rate .sep { margin: 0 10px; color: #888; }
.slip-note { border: 1px solid #222; padding: 10px 12px; white-space: pre-wrap; }
.slip-foot { text-align: center; }
table.slip-grid tr:hover > td { background: inherit; }
.setting-block { margin-top: 32px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 24px 20px; }
.setting-list { border-top: 1px solid var(--line); margin-bottom: 12px; }
.setting-row { display: flex; align-items: center; gap: 22px; padding: 14px 4px; border-bottom: 1px solid var(--line2); }
.setting-row .setting-name { width: 22em; color: #3a4250; }
@media print {
  @page { size: A4; margin: 12mm; }
  body, .slip-page { background: #fff !important; }
  .no-print { display: none !important; }
  .slip-page { padding: 0; max-width: none; }
  .slip { border: 0; padding: 0; margin: 0; page-break-after: always; break-after: page; }
  .slip:last-of-type { page-break-after: auto; break-after: auto; }
  .page-break { page-break-after: always; break-after: page; }
  .slip-grid th, .slip-title, .slip-grid td.blank { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- 퇴사 관리 ---------- */
.tab-count { font-size: 13px; color: var(--brand); margin-left: 2px; }
.term-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.term-filter input, .term-filter select { width: auto; flex: 0 0 auto; margin: 0; }
.term-filter input[name="q"] { width: 180px; }
.term-filter .label { font-weight: 600; color: #3a4250; margin-right: 4px; }
.term-filter .right { margin-left: auto; }
.term-list td { vertical-align: middle; }
.term-list .last-day { color: #e5484d; font-weight: 600; white-space: nowrap; }
.term-list .settle { white-space: nowrap; }
.btn.outline { background: #fff; color: #5a48d4 !important; border: 1px solid #5a48d4; }
.btn.outline:hover { background: #f1eefe; border-color: #5a48d4; text-decoration: none; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.term-list .manage { white-space: nowrap; }
.icon-btn { display: inline-flex; align-items: center; gap: 2px; padding: 4px 6px; border-radius: 6px; color: #5f6878; cursor: pointer; }
.icon-btn:hover { background: var(--line2); text-decoration: none; }
details.menu { display: inline-block; position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu .menu-list { position: absolute; right: 0; top: 100%; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(20, 30, 50, .12); min-width: 170px; padding: 6px 0; }
details.menu .menu-list a { display: block; padding: 8px 14px; color: var(--text); }
details.menu .menu-list a:hover { background: var(--line2); text-decoration: none; }

/* ---------- 퇴직금 계산 ---------- */
.default-submit { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sev-sec { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 22px 18px; margin-bottom: 18px; }
.sev-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sev-head .row { gap: 6px; }
table.kv2 { width: 100%; border-collapse: collapse; margin: 6px 0 12px; }
table.kv2 th { width: 14%; text-align: left; font-weight: 500; color: #5f6878; padding: 10px 8px; border-bottom: 1px solid var(--line2); background: transparent; white-space: nowrap; }
table.kv2 td { width: 36%; padding: 8px; border-bottom: 1px solid var(--line2); vertical-align: top; }
table.kv2 tr:hover > td { background: transparent; }
.sev-form input.w-num { width: 130px; text-align: right; display: inline-block; }
.sev-form input.w-days { width: 70px; text-align: right; display: inline-block; }
.sev-form input.w-date { width: 160px; display: inline-block; }
.sev-form select { width: 200px; }
.sev-form input[disabled] { background: #f3f4f7; color: #3a4250; }
.sev-form input.net { color: #e5484d; font-weight: 700; }
.btn.dark, summary.btn.dark { background: #3a4250; color: #fff !important; border: 0; }
.btn.sm, button.sm { height: 28px; padding: 0 10px; font-size: 12px; }
details.reg > summary, details.basis > summary { list-style: none; display: inline-flex; align-items: center; cursor: pointer; }
details.reg > summary::-webkit-details-marker, details.basis > summary::-webkit-details-marker { display: none; }
details.reg textarea { width: 100%; margin-top: 8px; }
details.basis { position: relative; }
details.basis .basis-body { position: absolute; right: 0; top: 34px; z-index: 15; width: min(640px, 90vw); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(20, 30, 50, .14); padding: 12px 16px; }
.sev-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 6px 0 14px; }
.sev-box { border-top: 2px solid var(--brand); padding: 8px 4px; }
.sev-box h3 { margin: 4px 0 6px; font-size: 14px; color: #3a4250; }
.sev-box .period { color: var(--brand); font-size: 13px; margin: 4px 0; }
.sev-box .add { margin: 6px 0 0; }
table.sev-grid { width: 100%; border-collapse: collapse; border-top: 2px solid #3a4250; }
table.sev-grid th { font-weight: 500; color: #5f6878; background: transparent; text-align: left; white-space: nowrap; }
table.sev-grid td, table.sev-grid th { padding: 8px; border-bottom: 1px solid var(--line2); }
table.sev-grid tr.sum td { color: #e5484d; font-weight: 600; border-top: 2px solid var(--brand); }
table.sev-grid tr:hover > td { background: transparent; }
table.sev-grid.center td, table.sev-grid.center th { text-align: center; }
.sev-grid.result input.w-num { width: 120px; }
.tip { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; border: 1px solid #b8bec9; color: #8b93a1; font-size: 10px; cursor: help; }
.switch { position: relative; display: inline-block; width: 30px; height: 16px; vertical-align: middle; margin-left: 4px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cfd4dc; border-radius: 16px; transition: .15s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 12px; height: 12px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::before { transform: translateX(14px); }
.choice .check { margin-right: 18px; }
.sev-notes .note { display: block; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 8px 0; font-size: 13px; color: #3a4250; max-width: 760px; }
.sev-actions { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
@media (max-width: 900px) { .sev-pair { grid-template-columns: 1fr; } table.kv2 th, table.kv2 td { display: block; width: auto; } }
.sev-box p label, .sev-grid.result th label.switch { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.sev-box p { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.choice label.check { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- 중도정산 ---------- */
.mid-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 6px 0 14px; }
.mid-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0; }
.refund { color: #2f6fe0; font-weight: 600; }
.due { color: #e5484d; font-weight: 600; }
details.basis-inline { margin: 8px 0; }
details.basis-inline summary { cursor: pointer; color: var(--brand); }
.slip.receipt .slip-title small { font-size: 14px; font-weight: 500; }
.slip.receipt .slip-grid th { width: 18%; }
.slip.receipt .slip-grid th.band { width: 9%; }
.slip.receipt tr.sum td, .slip.receipt tr.sum th { font-weight: 800; }
@media (max-width: 900px) { .mid-grid { grid-template-columns: 1fr; } }

/* ---------- 수임 업체: 사업장관리번호·수임종류 ---------- */
.mgmt-no { font-variant-numeric: tabular-nums; margin-right: 6px; }
.entrust-badge { display: inline-block; font-size: 11px; line-height: 18px; padding: 0 6px; margin-right: 3px; border-radius: 4px; background: #eaf7ef; color: #1f8a4c; font-weight: 600; }

/* ---------- 4대보험 대조 ---------- */
.month-nav { gap: 6px; align-items: center; }
.month-nav input[type=month] { width: 150px; }
.ins-info { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; }
.ins-info-block { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ins-info-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-right: 4px; }
.notice-chip.err { background: #fdebeb; color: #c43838; }
.method-chip { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: #f1f3f6; color: #5f6878; }
.method-chip.notice { background: #e5f6ec; color: #17864a; }
.method-chip.mini { font-size: 10.5px; padding: 0 5px; margin-left: 2px; vertical-align: 1px; }
.ins-kpis { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin: 0 0 10px; }
.ins-kpis .kpi { display: flex; flex-direction: column; justify-content: center; min-width: 110px; padding: 10px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--text); }
.ins-kpis .kpi:hover { text-decoration: none; border-color: #c9d3e6; }
.ins-kpis .kpi span { font-size: 12px; color: var(--muted); font-weight: 600; }
.ins-kpis .kpi strong { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ins-kpis .kpi em { font-style: normal; font-size: 12px; color: #c43838; font-variant-numeric: tabular-nums; }
.ins-kpis .kpi.ok strong { color: #17864a; } .ins-kpis .kpi.bad strong { color: #c43838; } .ins-kpis .kpi.none strong { color: #b26a00; }
.ins-kpis .kpi.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.ins-kpis .kpi-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.ins-cmp th.num { text-align: right; white-space: nowrap; }
.ins-cmp td.cc { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.35; }
.ins-cmp td.cc span { display: block; }
.ins-cmp .cc-ledger { font-weight: 600; }
.ins-cmp .cc-sub { font-size: 12px; color: var(--muted); }
.ins-cmp td.cc.ok .cc-sub { color: #17864a; }
.ins-cmp td.cc.bad { background: #fff6f6; }
.ins-cmp td.cc.bad .cc-sub { color: #5f6878; }
.ins-cmp td.cc.bad .cc-sub strong { color: var(--text); }
.ins-cmp .cc-diff { font-size: 12px; font-weight: 700; color: #c43838; }
.ins-cmp td.cc.empty { color: #c5cad3; }
.ins-cmp tr.st-none td:first-child strong { color: #5f6878; }
.empty-state { background: #fff; border: 1px dashed #d5dbe3; border-radius: 12px; padding: 24px; text-align: center; margin: 12px 0; }
.upload-fold { margin-top: 24px; }
.upload-fold summary { cursor: pointer; font-weight: 600; }
.ins-cmp th, .ins-cmp td { padding: 7px 12px; vertical-align: middle; }
.ins-cmp th:first-child, .ins-cmp td:first-child { width: 110px; white-space: nowrap; }
.ins-cmp th:nth-child(2), .ins-cmp td:nth-child(2) { width: 120px; }
.ins-cmp td.cc span { line-height: 1.3; }
.work-days { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 6px 0; }
input.cell.amt.fixed { background: #fff7e6; }
.side-head { padding: 6px 14px 2px; font-size: 11px; letter-spacing: .04em; }

td.edited input { background: #fff7e6; }

/* 신고 화면: 긴 상실사유가 표를 넓히지 않게(고른 값은 잘려 보이고, 목록을 열면 전체 문구) */
.loss-form select { max-width: 190px; width: 190px; text-overflow: ellipsis; }
.loss-form select.loss-code { max-width: 170px; width: 170px; }

/* hidden 속성은 항상 숨김(label 등에 display를 준 규칙보다 우선) */
[hidden] { display: none !important; }
/* 급여 정보: 저장 버튼이 긴 입력 폼 아래에 묻히지 않게 화면 아래에 붙여 둔다 */
.save-bar { position: sticky; bottom: 0; z-index: 5; background: #fff; padding: 10px 0; border-top: 1px solid var(--line, #e5e7eb); }

/* 급여 정보(급여 조건) 편집: 왼쪽 급여액·항목, 오른쪽 통상시급·고정시간 (휴램 배치) */
.pay-editor .pe-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pay-editor .pe-head h2 { margin-right: auto; }
.pay-editor table.pe { width: 100%; border-collapse: collapse; margin: 0; }
.pay-editor table.pe th { width: 150px; text-align: left; font-weight: 500; color: #4b5563; background: #f3f6fb; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
.pay-editor table.pe th.sub { padding-left: 24px; }
.pay-editor table.pe td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pay-editor .pe-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); }
.pay-editor .pe-cols > table.pe:first-child { border-right: 1px solid var(--line); }
@media (max-width: 1100px) { .pay-editor .pe-cols { grid-template-columns: 1fr; } }
.pay-editor input.money { width: 11em; text-align: right; }
.pay-editor input[readonly] { background: #f1f3f6; color: #374151; }
.pay-editor .w-h { width: 5.5em; text-align: right; }
.pay-editor .total-row th, .pay-editor .total-row td { background: #f9fafb; font-weight: 600; }
.pay-editor .req { color: #e5484d; }
.pay-editor .err-note { color: #e5484d; margin-top: 4px; }
.pay-editor .note-box { background: #fff7e6; border: 1px solid #f5d9a8; border-radius: 6px; padding: 6px 10px; margin-top: 6px; }
.badge-nt { display: inline-block; font-size: 11px; color: #0f9d58; border: 1px solid #9be0bd; background: #ecfbf3; border-radius: 10px; padding: 0 6px; margin-left: 4px; }
.pay-editor table.pe td input, .pay-editor table.pe td select { display: inline-block; width: auto; margin: 2px 0; vertical-align: middle; }
.pay-editor table.pe td input[type="date"] { width: 11em; }
.pay-editor table.pe td input.money { width: 11em; }
.pay-editor table.pe td input.w-h { width: 5.5em; }
.pay-editor table.pe td label.check { display: inline-flex; align-items: center; gap: 4px; margin: 0 14px 0 0; width: auto; }
.pay-editor table.pe td label.check input { margin: 0; }
.pay-editor .extra-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.pay-editor .extra-row input[name="extra_name"] { width: 9em; }
.pay-editor .pe-cols table.pe th { width: 120px; white-space: normal; }
.pay-editor .pe-cols table.pe td input.money { width: 9.5em; }
.pay-editor .pe-cols table.pe td input.w-h { width: 4.5em; }

/* 사원 등록 화면: 왼쪽에 좁게 붙지 않게 가운데 카드로, 입력 칸은 카드 폭을 쓴다 */
.emp-new, .form-card { max-width: 1040px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px 28px 8px; }
.emp-new .stack, .form-card .stack { max-width: none; }
@media (max-width: 760px) { .emp-new, .form-card { padding: 16px; } .emp-new .grid2, .form-card .grid2 { grid-template-columns: 1fr; } }

/* 회원사 급여 관리: 산정기간과 지급일을 한 묶음으로, 아래에 한 문장 요약 */
.pay-cycle-text { margin: 6px 0 0; padding: 8px 12px; background: #f3f6fb; border-radius: 8px; font-weight: 500; }

/* 사원 목록: 선택 삭제 */
.del-bar { display: flex; align-items: center; gap: 10px; margin: 0; }
.hx { display: grid; gap: 14px; margin: 8px 0 16px; }
.hx-kind h3 { margin: 0 0 6px; font-size: 15px; }
.hx-t td, .hx-t th { white-space: nowrap; }
.hx-t .hx-add input { width: 100%; min-width: 7em; }
.pick-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 8px 0; }
.pick-bar[hidden] { display: none !important; }
.del-bar[hidden] { display: none !important; }
.danger-btn { background: #ef4444; border-color: #ef4444; color: #fff; }
.danger-btn:hover { background: #dc2626; border-color: #dc2626; }
table.emp-list th.pick, table.emp-list td.pick { width: 32px; text-align: center; }

/* 사원 › 급여 일괄 관리: 칸을 좁게(한 화면에 많이) */
table.bulk-table th, table.bulk-table td { padding: 4px 5px; font-size: 12.5px; vertical-align: top; }
table.bulk-table th { white-space: nowrap; }
table.bulk-table input, table.bulk-table select { padding: 3px 5px; font-size: 12.5px; margin: 0; width: auto; display: inline-block; }
table.bulk-table input.money { width: 7.5em; text-align: right; }
table.bulk-table input.money.sm { width: 6.5em; }
table.bulk-table input.w-h { width: 3.8em; text-align: right; }
table.bulk-table input.w-pct { width: 3.2em; text-align: right; }
table.bulk-table input.sm { width: 7em; }
table.bulk-table tr.changed td { background: #fff7e6; }
table.bulk-table .extra-row { display: flex; gap: 4px; margin: 2px 0; }
table.bulk-table details summary { cursor: pointer; white-space: nowrap; }
table.bulk-table { width: auto; }
table.bulk-table th.grp { text-align: center; border-bottom: 0; }
table.bulk-table th.sub { font-weight: 400; color: #6b7381; font-size: 11.5px; text-align: center; }
table.bulk-table th.deleted { text-decoration: line-through; color: #b91c1c; }
table.bulk-table input:disabled { background: #f3f4f6; text-decoration: line-through; }
.cols-panel { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 6px 0 10px; background: #fafbfc; }
.cols-panel .cols-list { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.cols-panel .col-edit { display: inline-flex; align-items: center; gap: 6px; }
.cols-panel .col-edit input[type="text"], .cols-panel .col-edit input:not([type]) { width: 9em; padding: 3px 6px; display: inline-block; margin: 0; }
a.on-link { font-weight: 700; text-decoration: underline; }

/* ---------- 급여집계표·일용직 대장 ---------- */
.sum-form { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.sum-row { display: flex; align-items: center; gap: 16px; padding: 12px 8px; border-bottom: 1px solid var(--line2); flex-wrap: wrap; }
.sum-row:last-child { border-bottom: 0; }
.sum-label { width: 120px; color: #5f6878; }
.seg { display: inline-flex; background: var(--line2); border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { background: transparent; border: 0; color: var(--muted); padding: 6px 14px; border-radius: 6px; font-weight: 600; }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.back-btn { padding: 2px 10px; margin-right: 6px; font-size: 18px; }
.emp-pick summary { display: inline-block; list-style: none; }
.emp-pick summary::-webkit-details-marker { display: none; }
.emp-pick[open] .member-list { margin-top: 8px; }
.sum-table tr.sub td { color: #5f6878; background: #fafbfc; }
.sum-table tr.subtotal td { font-weight: 600; }
.simple-ledger th.day, .simple-ledger td.day { padding: 2px; text-align: center; min-width: 30px; }
.simple-ledger td.day input { width: 30px; text-align: center; padding: 2px; }
.simple-ledger th.sun { color: #d33; } .simple-ledger th.sat { color: var(--brand); }
.sum-table td:nth-child(-n+3), .sum-table th { white-space: nowrap; }

/* 급여 정보 탭: 소득세·4대보험·두루누리 표(급여 조건 표와 같은 모양) */
.taxins h2 { margin: 28px 0 8px; }
.taxins table.ti { width: 100%; border-collapse: collapse; border-top: 1px solid var(--line); }
.taxins table.ti th { width: 150px; text-align: left; font-weight: 500; color: #4b5563; background: #f3f6fb; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.taxins table.ti th.sub { padding-left: 24px; }
.taxins table.ti td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.taxins table.ti td input, .taxins table.ti td select { display: inline-block; width: auto; margin: 0; vertical-align: middle; }
.taxins table.ti td input[type="date"] { width: 11em; }
.taxins table.ti td input.money { width: 11em; text-align: right; }
.taxins table.ti td label.check { display: inline-flex; align-items: center; gap: 4px; margin: 0 14px 0 0; }
.taxins table.ins-table tr.ins-head th { background: #eef2f8; color: #374151; font-weight: 600; }
.taxins table.ins-table tr.ins-head th label.check { margin: 0 0 0 8px; font-weight: 400; }
.taxins table.ins-table td:nth-child(4) select { min-width: 12em; }
.taxins .help { margin-left: 4px; vertical-align: middle; }
.taxins table.ti tr.m-row { display: table-row; padding: 0; border: 0; }  /* 예전 플렉스 줄 스타일을 표 줄로 되돌린다 */
.pay-editor h3.pe-sub { margin: 22px 0 8px; font-size: 15px; }
.taxins table.fx-table td input, .pay-editor table.fx-table td input, .pay-editor table.fx-table td select { margin: 0; width: auto; display: inline-block; }
.pay-editor table.fx-table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--line); }
.pay-editor table.fx-table th, .pay-editor table.fx-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.pay-editor table.fx-table tr.fx-add td { white-space: nowrap; }
.pay-editor table.fx-table tr.ins-head th { background: #eef2f8; color: #374151; font-weight: 600; }


/* 급여 정보: 접는 설정 묶음(소득세·4대보험·공제대상), 최저임금 충족 표시 */
.pay-editor .ok-text { color: #17864a; }
.pay-editor details.fold-sec { border: 1px solid var(--line); border-radius: 10px; margin: 14px 0 0; background: #fff; }
.pay-editor details.fold-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 12px; padding: 12px 16px; }
.pay-editor details.fold-sec > summary::-webkit-details-marker { display: none; }
.pay-editor details.fold-sec > summary::before { content: "▸"; color: #6b7280; width: 10px; }
.pay-editor details.fold-sec[open] > summary::before { content: "▾"; }
.pay-editor details.fold-sec > summary h2 { margin: 0; font-size: 16px; }
.pay-editor details.fold-sec > summary .fs-sum { color: #4b5563; font-size: 13px; }
.pay-editor details.fold-sec > summary .fs-edit { margin-left: auto; font-size: 12px; color: var(--accent, #2563eb); }
.pay-editor details.fold-sec[open] > summary .fs-edit { visibility: hidden; }
.pay-editor details.fold-sec > .fold-body { padding: 0 16px 12px; }
.pay-editor details.fold-sec > .fold-body > h2:first-child { display: none; }

/* 엑셀 일괄 작업 버튼 줄(모든 일괄 화면 공통): 엑셀 양식 받기 → 엑셀 올리기 → 저장, 제목 줄 오른쪽 */
.xl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.xl-bar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.xl-bar form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.xl-bar input[type=file] { max-width: 230px; font-size: 13px; }
