/* 아워홈 스타일 디자인 시스템 복원판 (구 apply.css + design-audit.md 규칙 기반)
   - 외부 CDN·폰트 로드 금지(CSP 'self') — Noto Sans KR은 로컬 설치 시 적용, 미설치 시 맑은 고딕 폴백
   - 클래스 계약(shell/narrow/card/section/grid/…)은 기존 HTML 그대로 유지 */
:root {
  color-scheme: light;
  --bg: #f3f3f3;            /* 페이지 배경 */
  --line: #ccd1d6;          /* 테이블/구분선 */
  --brand: #1f5fa8;         /* 주요 브랜드 블루 (CTA/포커스/액센트 바) — 병원 로고 색 계열, 2026-09 인사팀 요청으로 오렌지에서 전환 */
  --brand-dark: #174a85;    /* 호버용 진한 블루 */
  --title-accent: #1b3a6b;  /* 타이틀 네이비 */
  --text-dark: #202c39;     /* 본문 다크 */
  --text-mid: #6f7a85;      /* 본문 중간 */
  --input-border: #b7bcc1;  /* 입력 테두리 */
  --secondary: #707b86;     /* 보조 버튼 그레이 */
  --step-gray: #aeb4ba;     /* 비활성 스텝 */
  --surface: #ffffff;
  --canvas: var(--bg);
  --border: var(--line);
  --muted: var(--text-mid);
  --danger: #ef4444;
  --hero-overlay: linear-gradient(180deg,
    rgb(27 58 107 / 12%) 0%,
    rgb(27 58 107 / 4%) 45%,
    rgb(27 58 107 / 80%) 100%);   /* 히어로 사진 세로 오버레이(캡션 가독성) */
  --hero-fade: 233 239 247;       /* 사진 경계 페이드 끝색 = 우측 패널 시작색 (RGB 채널) */
  --brand-rgb: 31 95 168;         /* --brand의 RGB 채널 — 포커스 링·글로우 같은 반투명 파생색용 */
  --field-bg: #f8f9fa;            /* 로그인 카드 입력 배경(옅은 회색) */
  font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); color: var(--text-dark); line-height: 1.55; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; }

/* 타이틀: 28px / weight 300 (얇은 타이틀) + 핑크 액센트 */
h1 { font-size: 28px; font-weight: 300; margin: 0 0 .25rem; }
.brand { color: var(--title-accent); }

/* 버튼 위계: Primary 블루 / Secondary 그레이 / Danger 레드, 각진 공문서 톤 */
button, .button {
  border: 0; border-radius: 0; padding: .8rem 1.6rem; background: var(--brand);
  color: white; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block;
}
button:hover, .button:hover { background: var(--brand-dark); }
button:disabled { cursor: not-allowed; opacity: .6; }
.button.secondary, button.secondary { background: var(--secondary); }
.button.secondary:hover, button.secondary:hover { background: #5d6771; }
.button.danger, button.danger { background: var(--danger); }
.button.danger:hover, button.danger:hover { background: #dc2626; }

/* 입력: 높이 42px 전후, 회색 1px 테두리, 포커스 시 블루 */
input, select, textarea {
  width: 100%; border: 1px solid var(--input-border); border-radius: 0;
  min-height: 42px; padding: .5rem .65rem; background: white; color: #1f2a36;
}
textarea { padding: .65rem; line-height: 1.5; resize: vertical; }
/* 체크박스·라디오는 20px로 키워 클릭하기 쉽게 (인사팀 4차 요청) — 인라인 라벨 안에서 글자와 세로 정렬 */
input[type='checkbox'], input[type='radio'] { width: 20px; height: 20px; min-height: auto; margin: 0 .45rem 0 0; vertical-align: -.35em; accent-color: var(--brand); cursor: pointer; }
label.inline input[type='checkbox'], label.inline input[type='radio'] { margin: 0; }
/* 첨부 서류 안내는 크고 진하게 (인사팀 4차 요청) */
.file-hint { margin: .5rem 0 0; font-size: 15px; font-weight: 700; color: var(--text-dark); line-height: 1.5; }
input[type='file'] { background: #efefef; }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand); outline: none; box-shadow: inset 0 0 0 1px var(--brand);
}
button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(31, 95, 168, .5); outline-offset: 2px;
}
input[readonly], input:disabled { background: #f0f0f0; color: #555; cursor: not-allowed; }
label { display: block; font-weight: 700; font-size: 15px; margin-bottom: .35rem; }
/* 입력 필드 바로 뒤에 오는 버튼(조회 등)은 위 여백 확보 */
input + button, select + button { margin-top: .6rem; }

/* 컨테이너: 본문 최대폭 1100px 전후 */
.shell { width: min(1320px, calc(100% - 40px)); margin: 2.5rem auto; }
.shell.document { width: min(1100px, calc(100% - 40px)); }
.narrow { width: min(460px, calc(100% - 2rem)); margin: 5vh auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 0; padding: 1.5rem; box-shadow: 0 2px 8px rgb(32 44 57 / 6%); }
.stack > * + * { margin-top: 1rem; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-all { grid-column: 1 / -1; }
.toolbar { display: flex; gap: .6rem; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; }
.muted { color: var(--muted); }
.center { text-align: center; }
.entry-row { border: 1px solid var(--line); padding: 1rem; }
.period-range { display: flex; gap: .4rem; align-items: center; }
.period-range input { flex: 1; min-width: 0; }
.photo-preview { display: block; width: 113px; height: 151px; object-fit: cover; border: 1px solid var(--line); margin-top: .5rem; }
.photo-placeholder { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; border-style: dashed; }
.profile-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem 2rem; align-items: start; }
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1.5rem; margin: 0; }
.detail-list > div { display: flex; flex-direction: column; gap: .15rem; }
.detail-list strong { font-size: 13px; color: #555; }
/* 필수 항목 표시(*)와 범례 */
label.required::after, legend.required::after { content: ' *'; color: var(--danger); }
/* 신규/경력 같은 라디오 묶음 */
.choice-row { border: 0; padding: 0; margin: 0; display: flex; gap: 1.2rem; flex-wrap: wrap; }
.choice-row legend { font-weight: 700; font-size: 15px; padding: 0; margin-bottom: .35rem; }
label.inline { display: inline-flex; align-items: center; gap: .4rem; font-weight: 400; margin: 0; }
/* 입력 + 버튼 한 줄 (주소 검색·목록 조회·엑셀 다운로드) — input+button 세로 여백 규칙을 무효화한다 */
.input-row { display: flex; gap: .6rem; align-items: stretch; flex-wrap: wrap; }
.input-row input { flex: 1; min-width: 0; }
.input-row button { white-space: nowrap; margin-top: 0; }
/* 관리자 목록 필터: 검색 열을 넓혀 입력·조회·엑셀 버튼이 한 줄에 들어가게 */
.grid.three.filters { grid-template-columns: 1fr 1fr 1.6fr; }
/* 주소 검색(카카오 우편번호 서비스 embed) + 상세 주소 */
.address-embed { height: 460px; border: 1px solid var(--line); margin-top: .6rem; }
.address-detail { margin-top: .6rem; }
/* 초기화면(로그인·가입): 병원 사진 + 카드 2단, 모바일 1단 — 사진은 picture/srcset(img/hero, scripts/build-hero.mjs) */
.hero-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); }
.hero-photo { position: relative; min-height: 220px; background: var(--title-accent); overflow: hidden; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero-photo::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--hero-overlay); }
.hero-caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 2.25rem 2.5rem 2.75rem; color: #fff; background: none;
  display: flex; flex-direction: column; gap: .35rem; }
.hero-caption strong { font-size: 30px; font-weight: 700; letter-spacing: .04em; }
.hero-caption .slogan { margin: .6rem 0 0; font-size: 21px; font-weight: 500; line-height: 1.45; letter-spacing: -.01em; }
@media (max-width: 720px) {
  .hero-photo { height: 260px; }
  .hero-photo img { object-position: 50% 45%; }
  .hero-caption { padding: 1.25rem 1.25rem 1.4rem; }
  .hero-caption strong { font-size: 22px; }
  .hero-caption .slogan { font-size: 17px; margin-top: .3rem; }
}
.hero-side { display: flex; align-items: center; justify-content: center; padding: 2rem 1rem;
  background: linear-gradient(90deg, rgb(var(--hero-fade)) 0%, #f0f4f9 40%, #f6f7f9 100%); }
.hero-side .narrow { margin: 0; }
/* 초기화면 카드(로그인·회원가입, 2026-09-17 리디자인 시안: 미니멀·보수적 톤, 색은 브랜드 블루 유지) — 폭 400px 컬럼, 24px 간격 */
.login-column { width: min(400px, 100%); display: flex; flex-direction: column; gap: 24px; }
.login-title { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.03em; color: var(--text-dark); }
.login-card { display: flex; flex-direction: column; gap: 16px; padding: 28px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 6%), 0 4px 16px rgb(0 0 0 / 4%); }
.login-field label { font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text-dark); }
.login-field small { display: block; margin-top: 6px; font-size: 12px; line-height: 1.45; }
.login-identity { display: flex; flex-direction: column; gap: 12px; }
.login-identity .notice { font-size: 13px; }
.login-identity p { margin: 0; font-size: 13px; }
.login-identity p:empty { display: none; }
.login-card input { height: 44px; min-height: 44px; padding: 0 14px; font-size: 14px; background: var(--field-bg);
  border-color: var(--line); transition: border-color 120ms cubic-bezier(.2, 0, 0, 1), box-shadow 120ms; }
.login-card input::placeholder { color: var(--step-gray); }
.login-card input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgb(var(--brand-rgb) / 12%); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 64px; }
.icon-button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center; padding: 0; background: none; color: var(--text-mid);
  transition: color 120ms; }
.icon-button:hover { background: none; color: var(--text-dark); }
.login-submit { height: 46px; margin-top: 4px; padding: 0; font-size: 15px; font-weight: 600;
  transition: background 120ms cubic-bezier(.2, 0, 0, 1), box-shadow 120ms; }
.login-submit:hover { box-shadow: 0 0 0 1px rgb(var(--brand-rgb) / 30%), 0 8px 32px -8px rgb(var(--brand-rgb) / 35%); }
.login-submit:active { background: var(--title-accent); }
.login-card .message { margin: 0; min-height: 0; font-size: 13px; }
.login-card .message:empty { display: none; }
.login-links { display: flex; align-items: center; justify-content: center; gap: 12px; padding-top: 4px; font-size: 13px; }
.login-links a { color: var(--text-mid); text-decoration: none; }
.login-links a:hover { color: var(--text-dark); text-decoration: underline; }
.login-links .divider { width: 1px; height: 12px; background: var(--line); }
.signup-row { margin: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; color: var(--text-mid); }
.signup-row a { color: var(--brand); font-weight: 600; text-decoration: none; }
.signup-row a:hover { color: var(--brand-dark); text-decoration: underline; }
@media (min-width: 721px) {
  .hero-photo { position: sticky; top: 0; height: 100vh; }
  .hero-photo::after {
    background:
      linear-gradient(90deg,
        rgb(var(--hero-fade) / 0) 76%,
        rgb(var(--hero-fade) / 55%) 91%,
        rgb(var(--hero-fade)) 100%),
      var(--hero-overlay);
  }
}
.required-legend { color: var(--danger); font-weight: 700; }
/* 공고 기간 안내는 크게·진하게 (가독성 요청) */
.posting-period { margin: .6rem 0 0; font-size: 18px; font-weight: 700; color: var(--brand-dark); }
.posting-description { margin: .3rem 0 0; font-size: 15px; color: var(--text-dark); white-space: pre-wrap; }
/* 첨부 서류 누적 목록 + 개별 삭제 */
.actions.start { justify-content: flex-start; }
.attachment-list { margin: .5rem 0 0; padding: 0; list-style: none; font-size: 14px; }
.attachment-item { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .35rem 0; border-bottom: 1px solid var(--line); }
button.small { padding: .3rem .8rem; font-size: 13px; }
.char-count { display: block; text-align: right; margin-top: .25rem; font-size: 13px; }
.total-count { margin: 0; font-weight: 700; }
.total-count.align-end { text-align: right; }

.message { min-height: 1.5rem; color: var(--danger); font-weight: 700; }
/* 단계 이동 전 검증 오류: 상단 요약 목록(항목을 누르면 입력칸으로 이동) + 해당 입력칸 붉은 테두리 (인사팀 2차 피드백) */
.form-errors { border: 1px solid var(--danger); border-left-width: 4px; padding: .9rem 1rem; color: var(--danger); }
.form-errors p { margin: 0; font-weight: 700; }
.form-errors ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.form-errors button.link { background: none; color: var(--danger); padding: 0; font-weight: 400; text-decoration: underline; }
.form-errors button.link:hover { background: none; color: var(--danger); }
input.field-invalid, select.field-invalid, textarea.field-invalid { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
fieldset.field-invalid { outline: 2px solid var(--danger); outline-offset: 4px; }
/* 나의 지원 현황: 작성 중 초안·철회 건 묶음 제목 */
/* 나의 지원 현황: 작성 중(회색 계열)과 접수한 지원서(브랜드 블루)를 묶음 제목·왼쪽 띠·상태 배지로 구분한다 (인사팀 4차 요청) */
.list-heading { margin: 1.5rem 0 0; font-size: 18px; font-weight: 700; color: var(--text-dark); display: flex; align-items: center; }
.list-heading::before { content: ''; width: 4px; height: 18px; background: var(--brand); margin-right: 8px; }
.list-heading.draft::before { background: var(--step-gray); }
.app-card { border-left: 5px solid var(--step-gray); }
.app-card.is-active { border-left-color: var(--brand); }
.app-card.is-withdrawn { border-left-color: var(--danger); }
.app-card.is-closed { border-left-color: var(--secondary); }
.app-card.is-draft { background: #fafafa; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.card-meta { margin: .35rem 0 0; color: var(--muted); }
.card-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: .9rem; }
.card-actions p { margin: 0; }
.status-badge { display: inline-block; padding: .15rem .7rem; font-size: 13px; font-weight: 700; color: #fff; background: var(--step-gray); white-space: nowrap; }
.status-badge.active { background: var(--brand); }
.status-badge.withdrawn { background: var(--danger); }
.status-badge.closed { background: var(--secondary); }
.save-status { min-height: 1.2rem; color: var(--muted); font-size: 13px; }
/* 최종 확인 표는 자기소개 전문을 줄바꿈 그대로 보여준다 */
#summary th { white-space: nowrap; }
#summary td { white-space: pre-wrap; overflow-wrap: anywhere; }   /* 띄어쓰기 없는 긴 글도 줄바꿈 — 표가 옆으로 늘어나 항목명이 세로로 깨지지 않게 */
.save-status.failed { color: var(--danger); font-weight: 700; }
.success { color: #166534; }

/* 폼 섹션: 상단 2px 굵은 라인 + 하단 1px 라인의 공문서 양식 톤 */
.section { margin-top: 1.75rem; padding: 1.25rem 0 1.5rem; border-top: 2px solid #333; border-bottom: 1px solid var(--line); }
/* 서브 타이틀: 18px 굵은 글씨 + 좌측 4px 블루 세로 바 */
.section h2 {
  margin-top: 0; font-size: 18px; font-weight: 700; color: var(--text-dark);
  display: flex; align-items: center;
}
.section h2::before { content: ''; width: 4px; height: 18px; background: var(--brand); margin-right: 8px; }
.notice { padding: 1rem; background: #e9f1fb; border-left: 4px solid var(--brand); }

/* 스텝 인디케이터 (구 apply.css 복원) */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); list-style: none; margin: 0; padding: 0; }
.step {
  background: var(--step-gray); color: #fff; height: 140px; padding: 15px;
  border-right: 1px solid #c8cfd4; display: flex; flex-direction: column; justify-content: space-between;
}
.step:last-child { border-right: none; }
.step.active { background: var(--brand); box-shadow: 0 5px 15px rgba(31, 95, 168, .3); transform: scale(1.02); z-index: 10; border: none; }
.step-top { display: flex; justify-content: space-between; font-size: 12px; font-weight: bold; opacity: .8; }
.step-num { font-size: 42px; font-weight: 300; line-height: 1; }
.step-label { font-size: 16px; line-height: 1.2; }
.step-content { display: none; }
.step-content.active { display: block; animation: fadeIn .3s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 테이블: 얇은 경계선 + 연회색 헤더 (구 dynamic-table 톤) */
table { border-collapse: collapse; width: 100%; background: white; }
th, td { border: 1px solid var(--line); padding: .75rem; text-align: left; vertical-align: top; }
th { background: #f9fafb; font-size: 13px; color: #555; }
.table-wrap { overflow-x: auto; }
.compact-list { margin: .4rem 0; padding-left: 1.3rem; }
.screen-reader { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 720px) {
  .grid, .grid.three, .grid.three.filters, .profile-grid, .detail-list { grid-template-columns: 1fr; }
  .shell { width: min(100% - 1rem, 1100px); margin: .5rem auto; }
  .card { padding: 1rem; }
  th, td { padding: .55rem; }
  .step { height: auto; padding: 8px; }
  .step-top { display: none; }
  .step-num { font-size: 22px; }
  .step-label { font-size: 11px; }
  .hero-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .hero-photo { min-height: 180px; }
  .hero-side { padding: 1rem; }
}
.print-only { display: none; }
@page { size: A4; margin: 12mm; }
/* 인쇄: 본원 입사지원서 서식에 가깝게 — 제목 띠, 굵은 표선, 접수·첨부·이력 영역 제외(no-print) */
@media print {
  body { background: white; font-size: 10.5pt; color: #000; }
  .no-print { display: none !important; }
  .print-only { display: block; }
  .shell, .card { width: 100%; margin: 0; padding: 0; border: 0; box-shadow: none; }
  .print-title { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 3px double #333; padding-bottom: .4rem; }
  .print-title h1 { margin: 0; font-size: 22pt; font-weight: 700; letter-spacing: .5em; color: #000; }
  .section { margin-top: .9rem; padding: .5rem 0 .6rem; border-top-color: #333; break-inside: avoid; }
  .section h2 { font-size: 12pt; margin-bottom: .4rem; color: #000; }
  .section h2::before { background: #333; }
  th, td { padding: .3rem .45rem; font-size: 9.5pt; border-color: #333; color: #000; }
  th { background: #eee; }
  .detail-list { gap: 0; border-top: 1px solid #333; border-left: 1px solid #333; }
  .detail-list > div { flex-direction: row; gap: .5rem; padding: .3rem .5rem; border-right: 1px solid #333; border-bottom: 1px solid #333; }
  .detail-list strong { flex: 0 0 6em; color: #000; }
  .photo-preview { width: 30mm; height: 40mm; margin: 0; }
  a { color: inherit; text-decoration: none; }
}
