/* =========================================================
   외부인력 아카이브 v2 · 디자인
   색: 글자 #253248 / 보조 #59677b / 강조 #245ec2 / 배경 #f7f8fa / 선 #e2e8f0
   ========================================================= */

/* ---------- 기본 ---------- */
* { box-sizing: border-box; }
body { margin: 0; word-break: keep-all; overflow-wrap: anywhere; color: #253248; background: #f7f8fa; font: 15px 'Noto Sans KR', Arial, sans-serif; }
body.no-scroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
button:disabled { opacity: .6; cursor: wait; }
a { color: inherit; text-decoration: none; }
:is(button, a):focus-visible { outline: 3px solid #a5bdf7; outline-offset: 3px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #789bea; outline-offset: 1px; }
svg { vertical-align: middle; flex-shrink: 0; }
.booting { padding: 40px; color: #59677b; }
[hidden] { display: none !important; }

/* ---------- 버튼 ---------- */
.primary, .secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 18px; border-radius: 7px; font-size: 13px; white-space: nowrap;
}
.primary { background: #3a62b8; color: #fff; font-weight: 600; }
.primary:hover { background: #2f55a6; }
.primary.danger { background: #c2412d; }
.secondary { background: #fff; border: 1px solid #dce3ed; color: #405069; }
.secondary:hover { background: #f5f8fc; }
.danger-text { color: #b4402f; }
.text-btn { color: #245ec2; text-decoration: underline; font-size: 13px; padding: 0; }
.wide { width: 100%; }

/* ---------- 화면 틀 ---------- */
.side {
  position: fixed; inset: 0 auto 0 0; width: 235px; padding: 35px 23px;
  display: flex; flex-direction: column; background: #fff; border-right: 1px solid #e6eaf0;
}
.logo { display: flex; gap: 11px; align-items: flex-start; font-size: 20px; font-weight: 700; line-height: 1.4; letter-spacing: -.8px; }
.logo > span { display: grid; place-items: center; width: 38px; height: 42px; margin-top: 3px; border-radius: 9px; background: #edf2fc; color: #59677b; }
.logo small { display: block; margin-top: 10px; font-size: 13px; font-weight: 500; letter-spacing: 1.4px; color: #59677b; }
.nav-label { margin: 48px 12px 15px; font-size: 13px; letter-spacing: 1.6px; color: #59677b; }
#nav a { display: flex; align-items: center; gap: 11px; margin-bottom: 7px; padding: 13px 15px; border-radius: 8px; font-size: 14px; color: #59677b; }
#nav a:hover { background: #f3f6fb; }
#nav a.active { background: #edf3ff; color: #234d9c; font-weight: 600; }
.side-bottom { margin-top: auto; padding: 20px 12px 0; font-size: 13px; color: #465b79; }
.side-bottom p { margin: 12px 0 0; }
.dot { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: #79aa9c; }
.private { display: flex; align-items: center; gap: 6px; color: #59677b; }

.body { margin-left: 235px; }
header {
  display: flex; justify-content: space-between; align-items: center; height: 74px; padding: 0 45px;
  background: #fff; border-bottom: 1px solid #e6eaf0; font-size: 13px; color: #59677b;
}
.crumb { display: flex; align-items: center; gap: 12px; }
.crumb b { font-weight: 500; color: #405069; }
.header-right { display: flex; align-items: center; gap: 15px; }
.idle b { color: #253248; }
.idle.warn, .idle.warn b { color: #c2412d; }
.extend { padding: 4px 10px; border: 1px solid #b9cbee; border-radius: 999px; color: #245ec2; font-weight: 600; font-size: 12px; }
.logout { display: flex; align-items: center; gap: 4px; color: #245ec2; font-size: 13px; }
main { max-width: 1480px; margin: auto; padding: 40px 45px 60px; }

/* ---------- 제목 ---------- */
.overline { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 1.8px; color: #59677b; }
h1 { margin: 10px 0 8px; font-size: 29px; line-height: 1.5; letter-spacing: -1.4px; }
.page-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 30px; }
.page-sub { margin: 0; font-size: 13px; color: #59677b; }
.title-actions { display: flex; gap: 8px; }
.soon { padding: 80px 0; }
.soon p:last-child { color: #59677b; }

/* ---------- 시작하기 ---------- */
.choice-grid { display: grid; gap: 22px; margin-top: 22px; }
.choice-grid.big { grid-template-columns: repeat(3, 1fr); margin-top: 12px; }
.choice-grid.slim { grid-template-columns: repeat(2, 1fr); }
.choice {
  position: relative; display: flex; flex-direction: column; gap: 22px; padding: 30px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; transition: transform .18s, box-shadow .18s;
}
.choice:hover { transform: translateY(-3px); box-shadow: 0 10px 30px #2434520b; }
.choice.tone-blue { background: #f0f5ff; border-color: #d7e2f6; }
.choice.slim { flex-direction: row; align-items: center; gap: 22px; padding: 22px 30px; }
.choice-icon { display: grid; place-items: center; width: 57px; height: 57px; border-radius: 15px; }
.slim .choice-icon { width: 52px; height: 52px; border-radius: 13px; }
.tone-blue .choice-icon { background: #e0eaff; color: #3a62b8; }
.tone-green .choice-icon { background: #eaf2f0; color: #4a5f78; }
.tone-orange .choice-icon { background: #fdeee0; color: #a3611f; }
.tone-purple .choice-icon { background: #efeafb; color: #6b56a6; }
.tone-teal .choice-icon { background: #e4f3f0; color: #2f7c6c; }
.choice-body { display: flex; flex-direction: column; gap: 8px; }
.choice-num { font-size: 13px; letter-spacing: 1.4px; color: #59677b; }
.choice strong { font-size: 21px; letter-spacing: -.6px; }
.slim strong { font-size: 19px; }
.choice-text { font-size: 14px; line-height: 1.75; color: #405069; max-width: 270px; }
.slim .choice-text { max-width: none; }
.choice-link { margin-top: 18px; font-size: 13px; color: #405069; display: flex; align-items: center; gap: 4px; }
.choice-arrow { position: absolute; right: 30px; top: 50%; color: #59677b; }
.choice:not(.slim) .choice-arrow { top: 142px; }
.home-stats { display: flex; gap: 48px; margin: 34px 0; font-size: 13px; color: #59677b; }
.home-stats b { margin-right: 8px; font-size: 18px; font-weight: 500; color: #245ec2; }

/* ---------- 패널·검색 ---------- */
.panel { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 23px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: #eef2f8; border-radius: 9px; }
.seg button { display: flex; align-items: center; gap: 6px; padding: 10px 26px; border-radius: 7px; font-size: 14px; color: #59677b; }
.seg button.on { background: #fff; color: #172033; font-weight: 600; box-shadow: 0 1px 3px #1720331a; }
.search-box {
  display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; padding: 0 18px; height: 58px;
  border: 1px solid #dce3ed; border-radius: 9px; background: #fbfcfe; color: #59677b;
}
.search-box input { flex: 1; border: 0; background: none; font-size: 16px; outline: none; color: #253248; }
.search-box kbd { padding: 2px 7px; border: 1px solid #ccd5e2; border-radius: 4px; font-size: 12px; background: #fff; }
.search-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: #59677b; }
.quick button { padding: 6px 10px; border-radius: 5px; background: #eef2f8; color: #405069; font-size: 13px; }
.quick button:hover { background: #e2e9f4; }
.filter-panel { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px; margin-top: 18px; padding-top: 18px; border-top: 1px solid #edf1f6; font-size: 13px; }
.filter-panel label { display: flex; flex-direction: column; gap: 6px; color: #59677b; }
.filter-panel label.check { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 10px; }
.filter-panel select, .filter-panel input:not([type=checkbox]) { padding: 9px 10px; border: 1px solid #dce3ed; border-radius: 7px; background: #fff; }
.filter-panel .range { display: flex; align-items: center; gap: 6px; }
.filter-panel .range input { width: 110px; }

.result-head { display: flex; justify-content: space-between; align-items: center; margin: 26px 0 14px; font-size: 15px; color: #405069; }
.result-head b { margin: 0 4px 0 30px; font-size: 17px; color: #253248; }
.result-head select { padding: 10px 12px; min-width: 200px; border: 1px solid #dce3ed; border-radius: 6px; background: #fff; }
.hint-bar { margin: 0 0 18px; padding: 14px 16px; border-radius: 7px; background: #eaf1fd; font-size: 13px; color: #405069; }
.result { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; }
.empty { margin: 0; padding: 40px; text-align: center; color: #59677b; font-size: 14px; }

.result-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.result-table th { padding: 16px 18px; text-align: left; font-size: 13px; font-weight: 500; color: #405069; background: #fbfcfe; border-bottom: 1px solid #e6eaf0; }
.result-table td { padding: 22px 18px; vertical-align: top; border-bottom: 1px solid #edf1f6; }
.result-table tr:last-child td { border-bottom: 0; }
.result-table tbody tr { cursor: pointer; }
.result-table tbody tr:hover { background: #fafcff; }
.result-table small { display: block; margin-top: 6px; font-size: 12.5px; color: #59677b; }
.person-name { font-size: 18px; letter-spacing: -.4px; }
.fee-role { margin: 0 0 6px !important; font-weight: 600; color: #263448 !important; }
.fee { font-size: 16px; }
small.warn { color: #b4402f !important; }
.go { color: #94a3b8; vertical-align: middle !important; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tags > span { padding: 4px 7px; border-radius: 4px; background: #f0f4fb; color: #334e78; font-size: 13px; }

/* ---------- 모달 ---------- */
.modal-back { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 40px 20px; background: #1d2a3f8c; backdrop-filter: blur(3px); overflow: auto; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 80px); overflow: auto; padding: 35px; background: #fff; border-radius: 16px; box-shadow: 0 25px 70px #0f1a2e40; }
.modal.wide { width: min(860px, 100%); }
.modal-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid #edf1f6; }
.modal-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.5px; }
.modal-heading h2 .sub { font-size: 15px; font-weight: 400; color: #59677b; }
.modal-heading button { padding: 6px; color: #64748b; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.confirm-text { line-height: 1.8; }

.profile-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.profile-heading small { display: block; margin-bottom: 6px; font-size: 13px; color: #59677b; }
.profile-heading .aliases { margin-top: 8px; }
.profile-actions { display: flex; gap: 8px; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 24px; padding: 22px; border-radius: 9px; background: #f5f7fa; font-size: 13px; }
.info-grid span { display: block; margin-bottom: 8px; color: #405069; }
.info-grid b { font-weight: 400; color: #405069; overflow-wrap: anywhere; }
.memo { margin: 14px 0 0; padding: 14px 16px; border-radius: 8px; background: #fbfcfe; border: 1px solid #edf1f6; font-size: 13px; line-height: 1.8; white-space: pre-wrap; }
.memo a { color: #245ec2; }

.section-label { margin: 30px 0 14px; font-size: 13px; color: #59677b; }
.section-label b { margin-right: 8px; color: #263448; }
.fee-chips { display: flex; flex-direction: column; gap: 12px; }
.fee-chip-group { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: start; }
.fee-chip-type { display: inline-flex; align-items: center; gap: 6px; padding-top: 9px; font-size: 13px; font-weight: 600; color: #263448; white-space: nowrap; }
.fee-chip-type i { width: 8px; height: 8px; border-radius: 2px; }
.fee-chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.fee-chip { display: inline-flex; align-items: center; gap: 10px; padding: 7px 8px 7px 14px; border: 1px solid #d5deea; border-radius: 999px; background: #fff; font-size: 13px; color: #405069; }
.fee-chip:hover { border-color: #8baee0; }
.fee-chip.on { border-color: #245ec2; background: #edf3ff; }
.fee-chip em { font-style: normal; font-size: 12px; color: #7a4a00; }
.fee-chip b { color: #172033; }
.fee-chip .count { padding: 2px 9px; border-radius: 999px; background: #e8f0fd; color: #245ec2; font-weight: 600; }

.chart-card { margin-top: 26px; padding: 22px; border: 1px solid #e2e8f0; border-radius: 12px; }
.chart-title { margin: 0; font-size: 14px; font-weight: 600; color: #405069; }
.chart-head { margin: 12px 0 4px; font-size: 17px; font-weight: 700; }
.chart-head b { margin-right: 6px; font-size: 30px; color: #245ec2; letter-spacing: -1px; }
.chart-sub { margin: 0; font-size: 12.5px; color: #59677b; }
.chart { width: 100%; height: auto; margin-top: 10px; }

.history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.history-table th { padding: 10px; text-align: left; font-weight: 500; color: #59677b; border-bottom: 1px solid #e6eaf0; }
.history-table td { padding: 12px 10px; vertical-align: top; border-bottom: 1px solid #f0f3f7; }
.history-table small { display: block; margin-top: 4px; color: #64748b; }
.history-table small.cond { color: #7a4a00; }
.history-table tr.cancelled td { color: #94a3b8; text-decoration: line-through; }

/* ---------- 로그인 ---------- */
.login-screen { display: grid; place-items: center; min-height: 100vh; padding: 25px; background: #f4f6fa; }
.login-box { width: min(430px, 100%); padding: 35px; background: #fff; border: 1px solid #e0e6f0; border-radius: 17px; box-shadow: 0 15px 50px #213c6710; }
.login-mark { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 24px; border-radius: 15px; background: #eaf1ff; color: #3964ac; }
.login-box h1 { margin: 0 0 10px; text-align: center; font-size: 25px; letter-spacing: -.8px; }
.login-sub { margin: 0 0 26px; text-align: center; font-size: 13px; line-height: 1.8; color: #59677b; }
.login-notice { margin: -10px 0 20px; padding: 12px 14px; border-radius: 8px; background: #fff4e5; color: #7a4a00; font-size: 13px; line-height: 1.7; }
.field-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: #405069; }
.email-input { display: flex; margin-bottom: 14px; border: 1px solid #dce3ed; border-radius: 8px; overflow: hidden; }
.email-input input { flex: 1; min-width: 0; padding: 13px 14px; border: 0; }
.email-input span { padding: 13px 14px; background: #f3f5f8; border-left: 1px solid #dce3ed; font-size: 13px; color: #59677b; }
.code-input { width: 100%; margin-bottom: 14px; padding: 13px; text-align: center; letter-spacing: 6px; font-size: 18px; border: 1px solid #dce3ed; border-radius: 8px; }
.login-sent { margin: 0 0 18px; padding: 12px 14px; border-radius: 8px; background: #f1f5fc; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.login-links { display: flex; justify-content: space-between; margin-top: 14px; }
.login-links button { font-size: 13px; color: #245ec2; }
.login-foot { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 24px 0 0; font-size: 12px; color: #59677b; }

/* ---------- 토스트 ---------- */
#toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 100; transform: translate(-50%, 10px);
  max-width: min(520px, calc(100vw - 32px)); padding: 13px 20px; border-radius: 12px;
  background: #1d2a3f; color: #fff; font-size: 14px; line-height: 1.6; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 1100px) {
  .choice-grid.big { grid-template-columns: 1fr 1fr; }
  .result-table th:nth-child(3), .result-table td:nth-child(3) { display: none; }
}
@media (max-width: 800px) {
  .side { position: static; width: auto; padding: 18px; }
  .nav-label, .side-bottom { display: none; }
  #nav { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
  .body { margin-left: 0; }
  header { padding: 0 18px; height: auto; min-height: 60px; flex-wrap: wrap; gap: 8px; }
  main { padding: 24px 18px; }
  .choice-grid.big, .choice-grid.slim, .info-grid { grid-template-columns: 1fr; }
  .page-title { flex-direction: column; align-items: flex-start; }
  .fee-chip-group { grid-template-columns: 1fr; }
}
