/* MADX Careers 공통 디자인 토큰·컴포넌트. 팀별 화면 CSS는 site.css(A) apply.css(B) admin-recruit.css(C) admin-ops.css(D)에 둔다. */
:root {
  --ink: #141714; --ink-2: #515951; --ink-3: #626862; --line: #dce1dc; --line-2: #eef0ee;
  --bg: #fff; --pale: #f6f7f4; --poster: #f5f4ea;
  --key: #20e76a; --key-soft: #e6fbee; --green: #067535; --green-ink: #0b5c2c;
  --blue: #3a4bf6; --orange: #ee6b45; --red: #c8302b; --red-soft: #fdecea; --amber: #a15c00; --amber-soft: #fff4e0;
  --radius: 10px; --radius-sm: 6px;
  --font: 'Noto Sans KR', Arial, sans-serif; --mark: Arial, 'Helvetica Neue', sans-serif;
  --wrap: min(1440px, calc(100% - 112px));
  --shadow: 0 10px 40px rgba(20, 23, 20, .12);
}
@media (max-width: 1150px) { :root { --wrap: calc(100% - 72px); } }
@media (max-width: 600px) { :root { --wrap: calc(100% - 40px); } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
body.no-scroll { overflow: hidden; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -0.02em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 1000; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px; }
.skip-link:focus { left: 8px; }
.wrap { width: var(--wrap); margin: 0 auto; }
.muted { color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { flex: none; vertical-align: middle; }

/* 워드마크 */
.wordmark { font-family: var(--mark); font-weight: 900; font-size: 31px; letter-spacing: -2px; line-height: 1; text-decoration: none; color: var(--ink); display: inline-flex; align-items: baseline; gap: 10px; }
.wordmark sup { font-size: 11px; letter-spacing: 0; }
.wordmark .sub { font-family: var(--font); font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--ink-2); border-left: 1px solid var(--line); padding-left: 10px; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.15); }
.btn.primary { background: var(--key); border-color: var(--key); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); filter: none; }
.btn.danger { background: var(--red); border-color: var(--red); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.icon-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; border: 0; background: transparent; cursor: pointer; color: var(--ink); }
.icon-btn:hover { background: var(--pale); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; min-height: 44px; }
.link-arrow:hover { text-decoration: underline; }

/* 입력 */
.inp { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; font-size: 15px; }
.inp:focus { border-color: var(--green); outline: 2px solid var(--key-soft); }
.inp[readonly] { background: var(--pale); color: var(--ink-2); }
textarea.inp { resize: vertical; line-height: 1.7; }
.inp-date { max-width: 240px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .label { font-weight: 700; font-size: 14px; }
.field .hint { font-size: 13px; color: var(--ink-3); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }

/* 배지 */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; line-height: 1.6; }
.badge-gray { background: var(--pale); color: var(--ink-2); }
.badge-green { background: var(--key-soft); color: var(--green); }
.badge-key { background: var(--key); color: var(--ink); }
.badge-blue { background: #eceefe; color: #2a36b8; }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-dark { background: var(--ink); color: #fff; }

/* 토스트·모달 */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100% - 40px)); }
.toast { padding: 12px 16px; border-radius: 10px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: 14px; transition: opacity .3s, transform .3s; }
.toast-error { background: var(--red); } .toast-warn { background: var(--amber); }
.toast.out { opacity: 0; transform: translateY(6px); }
.modal-wrap { position: fixed; inset: 0; z-index: 1500; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-back { position: absolute; inset: 0; border: 0; background: rgba(20, 23, 20, .5); cursor: pointer; }
.modal { position: relative; background: #fff; border-radius: 14px; width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: var(--shadow); }
.modal-lg { width: min(920px, 100%); } .modal-xl { width: min(1280px, 100%); height: calc(100vh - 40px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 20px; overflow: auto; flex: 1; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }

.empty { padding: 48px 20px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty p { font-weight: 700; color: var(--ink-2); }
.notice { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--pale); font-size: 14px; display: flex; gap: 8px; align-items: flex-start; }
.notice.warn { background: var(--amber-soft); color: #6b3e00; } .notice.err { background: var(--red-soft); color: var(--red); } .notice.ok { background: var(--key-soft); color: var(--green); }

/* 표 */
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 700; color: var(--ink-2); background: var(--pale); padding: 10px 12px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.clickable { cursor: pointer; } .tbl tr.clickable:hover td { background: #fafbf9; }

/* 탭 */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { border: 0; background: none; padding: 12px 14px; font-weight: 700; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; min-height: 44px; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tab .cnt { font-weight: 500; color: var(--ink-3); margin-left: 4px; }

/* ===== 지원서 문항(공용 렌더러) ===== */
.fstep { display: flex; flex-direction: column; gap: 28px; }
.fstep-desc { color: var(--ink-2); font-size: 14px; line-height: 1.75; background: var(--poster); border-radius: var(--radius-sm); padding: 16px 18px; }
.fq { display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 110px; }
.fq-title { font-weight: 700; font-size: 16px; line-height: 1.5; display: block; }
.fq-req, .fq-opt { font-size: 12px; font-weight: 700; margin-left: 6px; background: transparent; padding: 0; vertical-align: 1px; }
.fq-req { color: var(--green); } .fq-opt { color: var(--ink-3); }
.fq-help { font-size: 14px; line-height: 1.65; color: var(--ink-3); margin-top: -4px; }
.fq-help p + p { margin-top: 4px; }
.fq-count { font-size: 12px; color: var(--ink-3); text-align: right; }
.fq-count b { font-weight: 700; color: var(--ink-2); }
.fq-count.ok, .fq-count.ok b { color: var(--green); }
.fq-count.bad, .fq-count.bad b { color: var(--red); }
.fq .inp::placeholder { color: #868c86; opacity: 1; line-height: 1.7; }
.fq-err { font-size: 13px; color: var(--red); min-height: 0; }
.fq-err:empty { display: none; }
.fq.has-err .inp, .fq.has-err .sig-box { border-color: var(--red); }
.fq.is-hidden, .fq-info.is-hidden { opacity: .45; }
.fq-cond { font-size: 12px; color: var(--amber); display: flex; gap: 6px; align-items: center; }
.fq-section { font-size: 18px; padding-top: 8px; border-top: 1px solid var(--line); }
.fq-info { background: var(--poster); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14px; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }
.fq-info strong { color: var(--ink); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.choice { position: relative; display: flex; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; left: 12px; top: 50%; pointer-events: none; }
.choice span { flex: 1; display: flex; align-items: center; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-size: 15px; }
.choice input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 700; background: var(--key-soft); }
.choice input:focus-visible + span { outline: 3px solid var(--green); outline-offset: 2px; }
.consent { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--green); }
.consent-text { font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.rating { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rate { position: relative; }
.rate input { position: absolute; opacity: 0; width: 1px; height: 1px; left: 50%; top: 50%; pointer-events: none; }
.rate span { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 999px; font-weight: 700; cursor: pointer; }
.rate input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.rate input:focus-visible + span { outline: 3px solid var(--green); }
.rating-hint { font-size: 12px; color: var(--ink-3); }
.files { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.file-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); width: 100%; font-size: 14px; }
.file-row .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .fs { color: var(--ink-3); font-size: 12px; }
.scan { font-size: 12px; font-weight: 700; } .scan-clean { color: var(--green); } .scan-quarantined, .scan-local { color: var(--amber); } .scan-scan_failed, .scan-infected { color: var(--red); }
.file-pick { cursor: pointer; } .file-hint { font-size: 12px; color: var(--ink-3); } .file-status { font-size: 13px; color: var(--ink-2); }
.sig-box { position: relative; border: 1px dashed #9aa39a; border-radius: var(--radius-sm); background: #fcfdfb; height: 180px; }
.sig-box canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
.sig-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #9aa39a; pointer-events: none; font-size: 14px; }
.sig-actions { margin-top: 8px; }
.sig-svg { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fcfdfb; max-width: 100%; height: auto; }
.answer-text { white-space: normal; line-height: 1.75; }

/* 관리자 미리보기 하이라이트 */
.is-preview [data-copy] { cursor: pointer; }
.is-preview [data-copy]:hover { outline: 1px dashed var(--blue); outline-offset: 2px; }
.copy-hl { outline: 3px solid var(--blue) !important; outline-offset: 3px; background: rgba(58, 75, 246, .08); }

/* 깨짐 방지 공통 규칙 — 짧은 라벨은 한 글자씩 줄바꿈되지 않게, 선택 상자는 화살표와 글자가 겹치지 않게 */
.chip, .chip-check, .tab, .fq-req, .fq-opt, .btn, .s-tag-btn, td .badge, th { white-space: nowrap; }
.fq-req, .fq-opt { flex: none; }
select.inp {
  appearance: none; -webkit-appearance: none;
  padding-right: 40px; min-width: 0; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
select.inp[multiple] { background-image: none; padding-right: 14px; }
select.inp:disabled { opacity: .7; }
/* 표는 좁은 화면에서 화면 밖으로 밀지 않고 자기 안에서 가로 스크롤 */
.table-wrap, .tbl-wrap { max-width: 100%; overflow-x: auto; }
.table-box { max-width: 100%; overflow-x: auto; }
.card, .split > *, .grid > * { min-width: 0; }

/* 흰 드롭다운(shared/select.js) */
.xs { position: relative; display: inline-flex; max-width: 100%; vertical-align: middle; }
.xs.xs-full { display: flex; width: 100%; }
.xs.xs-auto { flex: none; }
.xs > select.xs-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.xs-btn { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; cursor: pointer; background: #fff; color: var(--ink); }
.xs-btn.inp { padding-right: 16px; background-image: none; }
.xs-btn:disabled { cursor: default; background: var(--pale); color: var(--ink-2); }
.xs-btn .xs-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xs-btn .xs-chev { flex: none; display: inline-flex; color: var(--ink-2); margin-left: 4px; transition: transform .15s; }
.xs-btn[aria-expanded="true"] { border-color: var(--green); outline: 2px solid var(--key-soft); }
.xs-btn[aria-expanded="true"] .xs-chev { transform: rotate(180deg); }
.xs-list { position: fixed; z-index: 10000; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.12); padding: 6px; overflow-y: auto; font-size: 15px; }
.xs-opt { padding: 10px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap; color: var(--ink); }
.xs-opt.is-active { background: var(--pale, #f4f4f2); }
.xs-opt[aria-selected="true"] { font-weight: 700; background: var(--key-soft); }
.xs-opt[aria-selected="true"].is-active { background: var(--key-soft); }
.xs-opt.is-dis { color: var(--ink-3, #aaa); cursor: default; }
.s-filter .xs-btn.inp { border-radius: 0; min-height: 52px; }
