:root {
  color-scheme: light;
  --ink: #192c26;
  --accent: #17634d;
  --deep: #123d31;
  --muted: #52645d;
  --line: #e0e6df;
  --border: #bfcfc5;
  --paper: #f1f4ef;
  --soft: #e6f1e9;
  --card: #fff;
  --shadow: 0 3px 10px #15332608, 0 16px 38px #15332608;
  --radius: 18px;
  --sans: 'Pretendard Variable', Pretendard, 'Noto Sans KR', 'Malgun Gothic', 'Apple SD Gothic Neo', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.58 var(--sans); }
button,input,select,textarea { font: inherit; color: inherit; }
h1,h2,h3,p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(27px,3.1vw,37px); line-height: 1.22; letter-spacing: -.065em; }
h2 { margin-bottom: 14px; font-size: 20px; line-height: 1.35; letter-spacing: -.045em; }
h3 { font-size: 16px; }
a { color: var(--accent); text-underline-offset: 3px; }
small,.muted { color: var(--muted); }
.organization-region { display: block; }
.organization-identity { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
.organization-identity small { white-space: nowrap; }
:focus-visible { outline: 3px solid #539980; outline-offset: 3px; }

.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.top {
  max-width: 1700px; margin: auto; min-height: 76px; padding: 10px clamp(16px,3vw,42px);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.brand { flex-shrink: 0; }
.brand-horizontal { display: block; width: clamp(117px,14vw,174px); height: auto; }
.account { display: flex; align-items: center; justify-content: end; gap: 10px; min-width: 0; }
.account-initial {
  display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 50%; background: var(--soft); color: var(--accent); font-weight: 800;
}
.account-name { display: grid; min-width: 0; gap: 1px; line-height: 1.25; }
.account-name strong,.account-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-name strong { font-size: 13px; }
.account-name small { font-size: 11px; }
.account button { white-space: nowrap; }

.workspace {
  max-width: 1700px; min-height: calc(100vh - 76px); margin: auto; display: grid;
  grid-template-columns: 220px minmax(0,1fr);
}
.workspace-form { grid-template-columns: 180px minmax(0,1fr); }
.rail { padding: 30px 16px; border-right: 1px solid var(--line); background: #f9faf7; }
.rail nav { position: sticky; top: 28px; display: grid; gap: 6px; }
.menu-link {
  display: flex; text-align: left; align-items: center; gap: 9px; padding: 10px 12px;
  min-height: 44px; white-space: nowrap; border: 1px solid transparent; background: transparent; color: var(--muted);
}
.menu-link:hover { background: var(--paper); color: var(--deep); }
.menu-link[aria-current="page"] { border-color: #d0e3d7; background: var(--soft); color: var(--deep); }
.nav-icon { flex: 0 0 22px; text-align: center; font: 600 19px/1.05 system-ui,sans-serif; }
.nav-count {
  margin-left: auto; background: var(--accent); color: #fff; min-width: 20px; padding: 0 5px;
  border-radius: 12px; text-align: center; font-size: 11px; line-height: 20px;
}
.work-main { width: 100%; max-width: 1460px; min-width: 0; padding: 24px clamp(16px,3.1vw,48px) 50px; }
.workspace-form .work-main { max-width: none; padding-inline: clamp(14px,2vw,30px); }
.breadcrumb { color: var(--muted); font-size: 12px; font-weight: 700; margin: 0 0 18px; }
.breadcrumb span { margin: 0 6px; color: #82938a; }
.intro { padding: 9px 0 15px; overflow-wrap: anywhere; }
.intro p { color: var(--muted); margin-bottom: 3px; }
.panel {
  min-width: 0; margin: 0 0 18px; padding: 23px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow);
}
.narrow { max-width: 760px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.panel-head h2 { margin: 0; }

.dashboard-hero {
  position: relative; isolation: isolate; overflow: hidden; margin-bottom: 16px;
  padding: 24px 30px; border-radius: var(--radius); background: #153e32;
}
.dashboard-hero::after {
  content: ''; position: absolute; z-index: -1; left: 65%; top: -195px; width: 415px; aspect-ratio: 1;
  border: 1px solid #d6be945c; border-radius: 50%;
  box-shadow: 0 0 0 21px #dbc29820, 0 0 0 48px #dbc29810, 0 0 0 81px #dbc2980b;
}
.dashboard-hero .intro { padding: 0; }
.dashboard-hero h1 { color: #fffaf1; }
.dashboard-hero p { color: #e0ece3; }
.flow-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.flow-action {
  display: flex; align-items: center; text-align: left; gap: 14px; width: 100%; min-height: 91px; padding: 17px 20px;
  border-color: var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); box-shadow: var(--shadow);
}
.flow-action:hover { background: #f7fbf8; border-color: #95baaa; }
.flow-action strong,.flow-action small { display: block; }
.flow-action strong { font-size: 17px; letter-spacing: -.04em; }
.flow-action small { margin-top: 2px; font-size: 12px; font-weight: 500; }
.flow-icon {
  flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; color: var(--accent); background: var(--soft); font: 400 26px/1 system-ui,sans-serif;
}
.flow-action.leave .flow-icon { color: #765522; background: #f4eee1; }
.flow-arrow { margin-left: auto; color: var(--accent); font-size: 20px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(135px,1fr)); gap: 10px; }
.stat { background: #f6f8f5; border: 1px solid #ebefea; border-radius: 12px; padding: 11px 14px; }
.stat-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
.stat-label::before,.pill::before { content: ''; flex: 0 0 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stat.ongoing .stat-label::before { background: #597892; }
.stat.attention .stat-label::before { background: #a3702a; }
.stat.complete .stat-label::before,.stat.new .stat-label::before { background: var(--accent); }
.stat strong { display: block; font-size: 30px; font-weight: 750; line-height: 1.25; margin-top: 5px; font-variant-numeric: tabular-nums; }
.stat strong small { font-weight: 600; font-size: 13px; }

button,.button {
  display: inline-block; cursor: pointer; border: 1px solid transparent; border-radius: 9px;
  padding: 8px 13px; font-size: 13px; font-weight: 750; line-height: 1.5;
  background: var(--soft); color: var(--deep); text-decoration: none;
}
button:hover,.button:hover { filter: brightness(.97); }
button:disabled { opacity: .58; cursor: default; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover { background: var(--deep); border-color: var(--deep); }
.plain { background: #fff; border-color: var(--line); }
.buttons,.filters { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
label { display: grid; gap: 6px; font-size: .94em; font-weight: 700; }
label:has(input[type=checkbox]) { display: flex; align-items: center; gap: 7px; font-weight: 550; }
input,select,textarea {
  width: 100%; min-width: 0; padding: 10px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; font-weight: 500;
}
input::placeholder,textarea::placeholder { color: #6b7a72; opacity: 1; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); }
[name="insurance"]:disabled { opacity: 1; }
textarea { min-height: 90px; resize: vertical; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 9px; }
legend { color: var(--ink); font-size: 13px; font-weight: 700; }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-bottom: 15px; }
.wide { grid-column: 1/-1; }
.filters { padding: 14px; margin-bottom: 15px; border-radius: 12px; background: #f5f7f3; }
.filters label { flex: 1; min-width: 110px; font-size: 13px; }
.filters button { align-self: end; min-height: 41px; }
.error { color: #a22329; white-space: pre-wrap; }
.info { border: 1px solid #d5e7db; background: #edf6ef; color: #234f3e; border-radius: 10px; padding: 10px 13px; }
.warning { border-color: #eee0b9; background: #fbf6e7; color: #674916; }
.form-error:empty { display: none; }

.scroll { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 13px; }
th,td { text-align: left; border-bottom: 1px solid #e8ede8; padding: 12px 13px; }
th { background: #f4f7f4; color: var(--muted); font-weight: 750; }
tbody tr:hover { background: #fbfcfa; }
tr:last-child td { border-bottom: 0; }
td button { color: var(--accent); font-variant-numeric: tabular-nums; }
.request-actions-cell { width: 1%; padding-inline: 16px; }
.request-actions { display: flex; align-items: flex-start; gap: 10px; }
.request-actions button { min-width: 58px; min-height: 38px; padding: 7px 12px; }
.request-actions .form-error { width: 140px; margin: 6px 0 0; }
.request-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 30px; padding: 4px 9px; background: #edf1f0; color: #475e56; font-size: 12px; font-weight: 750; white-space: nowrap; }
.pill.review,.pill.filing { background: #edf3f8; color: #3e6079; }
.pill.correction { background: #fbf1d7; color: #745118; }
.pill.completed { background: #e1f0e7; color: #235942; }
.pill.cancelled { background: #f1f0ef; color: #5d5b59; }
.empty-state { min-height: 116px; display: grid; place-content: center; gap: 5px; color: var(--muted); text-align: center; border: 1px dashed var(--border); border-radius: 12px; }
.empty-state span { color: #698478; font: 26px/1 system-ui,sans-serif; }
.empty-state strong { font-size: 13px; }
dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 16px 0; }
dl div { padding: 12px; border-radius: 10px; background: #f5f7f3; overflow-wrap: anywhere; }
dt { font-size: 12px; font-weight: 700; color: var(--muted); }
dd { margin: 3px 0 0; white-space: pre-wrap; }
.entry { padding: 11px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.entry p { margin: 3px 0; white-space: pre-wrap; }
details { margin: 10px 0; }
summary { cursor: pointer; font-weight: 700; }
.panel>details { padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.panel>details[open] summary { margin-bottom: 12px; color: var(--accent); }

.hire-entry { padding: 12px 0; border-bottom: 1px solid var(--line); }
.hire-entry:first-child { padding-top: 0; }
.hire-scroll { overflow-x: auto; padding: 4px 4px 11px; scrollbar-color: #abbfb0 #edf1ec; }
.hire-grid,.leave-grid {
  display: grid; gap: 9px; align-items: start; font-size: 14px;
  grid-auto-flow: column; grid-auto-columns: 185px;
}
.hire-grid {
  min-width: 1090px;
  grid-template-columns: minmax(94px,1.35fr) minmax(122px,1fr) minmax(150px,1.65fr) minmax(128px,1.3fr) minmax(138px,1fr) minmax(111px,.8fr) minmax(106px,1.1fr) minmax(145px,1.3fr);
}
.hire-grid select[name="employment"] { padding-inline-start: 8px; }
.leave-grid {
  min-width: 1462px;
  gap: 7px;
  grid-template-columns: minmax(83px,1fr) 136px 104px 113px 105px 120px repeat(2,92px) minmax(180px,1.25fr) 135px 232px;
}
.leave-reason { min-width: 0; display: grid; gap: 6px; }
.hire-grid fieldset,.leave-grid fieldset { margin: 0; padding: 4px 8px 8px; }
.leave-grid input:not([type=checkbox]),.leave-grid select { padding-inline: 7px; }
.leave-grid .hire-date { padding-inline: 6px; }
.leave-grid .hire-calendar { width: 18px; height: 18px; }
.leave-flags { display: grid; align-self: center; gap: 6px; }
.leave-flags label { justify-content: flex-start; gap: 5px; white-space: nowrap; font-size: 12px; }
.leave-flags input { margin: 0; }
.leave-flags .leave-months { display: flex; align-items: center; }
.leave-months input { width: 38px; padding-block: 4px; }
.leave-months span { color: var(--muted); }
.leave-grid [name="lossDate"] { background: #edf1ec; color: var(--muted); }
.three-month-pay { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
.three-month-pay label { white-space: nowrap; font-size: 11px; }
.three-month-pay input { padding: 5px; }
.resident-line { margin-top: 15px; }
.resident-line output { font-variant-numeric: tabular-nums; }
.admin-state { margin: 10px 0; }
.admin-summary { display: flex; flex-wrap: wrap; gap: 7px 14px; margin: 12px 0; }
[data-id-error] { margin: 5px 0; font-size: 13px; }
.hire-date {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 4px;
  min-height: 42px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-weight: 500;
}
.hire-date:focus-within { outline: 3px solid #539980; outline-offset: 2px; }
.hire-date input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.hire-date input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }
.hire-calendar { width: 21px; height: 21px; flex-shrink: 0; color: var(--accent); }
[data-hire-date-value] { white-space: nowrap; font-variant-numeric: tabular-nums; }
.hire-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 7px; }
.hire-checks label { font-size: 12px; white-space: nowrap; }
.hire-checks input[type=checkbox] { width: 15px; height: 15px; margin: 0; }
.hire-tools { display: flex; justify-content: flex-end; }
.hire-tools button { padding: 4px 9px; font-size: 12px; }
.hire-entry .info { margin: 8px 0 0; font-size: 13px; }
.hire-add { margin: 15px 0 5px; }
.hire-add span { color: var(--muted); font-size: 13px; font-weight: 700; }

.login-main { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 32px 20px; }
.login-content { width: 100%; max-width: 446px; margin: 0; padding: clamp(25px,5vw,40px); }
.login-brand { display: flex; justify-content: center; margin-bottom: 22px; }
.login-brand img { display: block; width: 105px; height: auto; }
.login-heading { margin-bottom: 27px; text-align: center; }
.login-heading h1 { font-size: clamp(25px,5vw,30px); }
.login-heading p { margin: 0; color: var(--muted); font-size: 14px; word-break: keep-all; }
.login-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.login-modes button { min-height: 42px; }
.login-content label { margin-bottom: 16px; }
.login-content input { min-height: 50px; background-color: #fff; }
.login-content .primary { width: 100%; margin-top: 5px; min-height: 49px; font-size: 15px; }
.login-note { margin: 20px 0 0; border-top: 1px solid var(--line); padding-top: 14px; color: var(--muted); font-size: 12px; text-align: center; }
.auth-stage { width: min(100%,690px); margin: auto; padding: 36px 20px; }
.auth-stage>.brand { width: fit-content; margin-bottom: 22px; padding: 6px 10px; border-radius: 9px; background: #fff; }

@media(max-width:1050px) {
  .workspace,.workspace-form { grid-template-columns: 164px minmax(0,1fr); }
  .rail { padding-inline: 10px; }
  .work-main { padding-inline: 20px; }
}
@media(max-width:760px) {
  .top { min-height: 62px; }
  .account-initial { display: none; }
  .account { gap: 6px; }
  .account button { min-height: 44px; padding: 5px 9px; }
  .workspace,.workspace-form { display: block; }
  .rail { padding: 6px 13px; border: 0; border-bottom: 1px solid var(--line); }
  .rail nav { position: static; display: flex; flex-wrap: wrap; gap: 3px; }
  .menu-link { min-height: 44px; padding: 6px 9px; font-size: 12px; gap: 4px; }
  .nav-icon { flex-basis: 16px; font-size: 15px; }
  .work-main,.workspace-form .work-main { padding: 15px 15px 30px; }
  .breadcrumb { margin-bottom: 11px; }
  .dashboard-hero { padding: 19px; }
  .dashboard-hero::after { left: 76%; }
  .dashboard-hero p { word-break: keep-all; }
  .panel { padding: 15px; }
  .flow-actions { gap: 8px; }
  .flow-action { min-height: 62px; padding: 9px; gap: 6px; }
  .flow-icon { flex-basis: 27px; width: 27px; height: 27px; border-radius: 8px; font-size: 20px; }
  .flow-action strong { font-size: 14px; }
  .flow-action small,.flow-arrow { display: none; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .fields,dl { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }

  .login-main { padding: 24px 14px; }
  .login-content { padding: 23px 18px; }
  .login-modes .primary { margin: 0; }
  .login-modes button { min-height: 49px; font-size: 14px; padding-inline: 6px; }
  input:not([type=checkbox]),select,textarea { font-size: 16px; }

  .filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 10px; }
  .filters label { min-width: 0; }
  .filters button { grid-column: 1/-1; min-height: 44px; }
  .request-list-scroll { overflow: visible; border: 0; }
  .request-table,.request-table tbody { display: block; white-space: normal; }
  .request-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .request-table tbody { display: grid; gap: 10px; }
  .request-table tbody tr {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 9px 12px;
    padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  }
  .request-table td { min-width: 0; border: 0; padding: 0; overflow-wrap: anywhere; }
  .request-table td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
  .request-table :is(.request-id-cell,.request-status-cell,.request-actions-cell)::before { content: none; }
  .request-table td.request-id-cell { grid-area: 1 / 1; }
  .request-table td.request-status-cell { grid-area: 1 / 2; justify-self: end; align-self: center; }
  .request-table td.request-organization-cell { grid-column: 1/-1; font-weight: 700; }
  .request-table td.request-actions-cell { grid-column: 1/-1; width: auto; padding-top: 9px; border-top: 1px solid var(--line); }
  .request-table td.request-actions-cell:empty { display: none; }
  .request-table .request-actions { justify-content: flex-end; }
  .request-table .request-id-cell button,.request-actions button { min-height: 44px; }

  .hire-entry { margin-bottom: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
  .hire-entry:first-child { padding-top: 12px; }
  .hire-scroll { overflow: visible; padding: 0; }
  .hire-grid,.leave-grid {
    min-width: 0; grid-auto-flow: row; grid-auto-columns: auto;
    grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px;
  }
  :is(.hire-grid,.leave-grid)>* { min-width: 0; }
  :is(.hire-grid,.leave-grid) fieldset,.leave-reason,.leave-flags { grid-column: 1/-1; }
  :is(.hire-grid,.leave-grid)>label:has([name="residentNumber"]) { grid-column: 1/-1; }
  .hire-grid fieldset,.leave-grid fieldset { padding: 6px 9px 10px; }
  .hire-grid input:not([type=checkbox]),.leave-grid input:not([type=checkbox]),
  .hire-grid select,.leave-grid select,.hire-date { min-height: 44px; }
  .hire-checks { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; }
  .hire-checks label { min-height: 40px; gap: 4px; }
  .leave-flags { padding: 7px; gap: 4px; }
  .leave-flags label { min-height: 38px; }
  .leave-flags .leave-months input { width: 48px; }
  .three-month-pay label { white-space: normal; }
  .hire-tools button { min-height: 44px; }
  [data-action="request-batch"]>button,[data-action="batch-revise"]>button { width: 100%; min-height: 48px; }
  .desktop-form-note { display: none; }
}
@media(max-width:380px) {
  .account-name strong { font-size: 12px; }
  .account-name small { display: none; }
  .hire-checks { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

.work-categories { max-width: 1700px; margin: auto; padding: 0 clamp(16px,3vw,42px); display: flex; gap: 8px; overflow-x: auto; }
.work-categories a { display: inline-flex; align-items: center; min-height: 46px; white-space: nowrap; padding-inline: 14px; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; }
.work-categories a[aria-current="page"] { border-color: #285949; color: #173b30; font-weight: 750; }
.organization-select { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-block: 14px; }
.organization-select label { flex: 1 1 190px; max-width: 280px; }
@media(max-width:620px) {
  .work-categories a { min-height: 44px; padding-inline: 11px; }
  .organization-select label { max-width: none; }
}
