/* 2026-09-30: 회원가입 전용 단일 페이지. 입력 영역만 스크롤하여 상단과 진행 버튼을 가리지 않는다. */
:root {
  color-scheme: light;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  color: #202329;
  background: #fff;
  font-synthesis: none;
  --muted: #737981;
  --line: #e6e8ec;
  --accent: #385bce;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
[hidden] { display: none !important; }

.auth-modal { height: 100svh; }
.auth-shell { display: grid; grid-template-rows: 80px minmax(0, 1fr); height: 100%; }
.signup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 80px));
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 0;
  color: #555c66;
  font-size: 14px;
  background: transparent;
  border: 0;
}
.auth-back:hover { color: #202329; }
.auth-back svg { width: 20px; height: 20px; fill: currentColor; }
.signup-brand { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 750; }
.signup-brand img { display: block; width: auto; height: 32px; }
.auth-panel { width: min(680px, calc(100% - 80px)); min-height: 0; margin: 0 auto; padding-top: 36px; }
.auth-view { display: none; height: 100%; }
.auth-view[data-auth-view="signup"].is-active { display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
h1 { margin: 0; font-size: 32px; font-weight: 750; line-height: 1.35; letter-spacing: -1px; }
.auth-summary { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; word-break: keep-all; }
.auth-form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; margin: 0; }
.signup-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 30px 0 24px;
  list-style: none;
}
.signup-steps li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 13px;
  color: #838991;
  font-size: 14px;
  border-bottom: 2px solid var(--line);
}
.step-number { font-size: 12px; font-variant-numeric: tabular-nums; }
.signup-steps li.is-active { color: #202329; border-bottom-color: var(--accent); font-weight: 700; }
.signup-steps li.is-active .step-number { color: var(--accent); }
.signup-step { display: none; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; padding: 0 12px 24px 0; }
.signup-step.is-active { display: grid; align-content: start; gap: 20px; }
.choice-grid { display: grid; }
.choice-card {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 8px;
  min-height: 112px;
  padding: 24px 8px;
  text-align: left;
  color: #202329;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
}
.choice-card::before {
  content: "";
  grid-row: 1 / 3;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1px solid #c5cad2;
  border-radius: 50%;
}
.choice-card.is-selected::before { border: 6px solid #202329; }
.choice-card strong { font-size: 18px; font-weight: 650; }
.choice-card span { color: var(--muted); font-size: 14px; line-height: 1.6; word-break: keep-all; }
.choice-card:hover { background: #fafbfc; }
.signup-fieldset { display: grid; gap: 10px; }
.signup-fieldset > span, .auth-form label > span { font-size: 14px; font-weight: 550; }
.auth-segment { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.auth-segment.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.auth-segment button {
  min-height: 48px;
  color: #686f79;
  font-size: 14px;
  background: #fff;
  border: 1px solid #dce0e5;
  border-radius: 4px;
}
.auth-segment button:hover { border-color: #8a929e; }
.auth-segment button.is-selected { color: #202329; font-weight: 650; border-color: #202329; background: #f7f8fa; }
.auth-form label { display: grid; gap: 8px; }
.auth-form input[type="text"], .auth-form input[type="password"], .auth-form input[type="date"] {
  width: 100%;
  height: 48px;
  min-width: 0;
  padding: 0 14px;
  color: #202329;
  font-size: 14px;
  background: #fff;
  border: 1px solid #dce0e5;
  border-radius: 4px;
}
.auth-form input::placeholder { color: #8b929c; }
.auth-form input:hover { border-color: #a3aab4; }
.auth-form input:focus { border-color: var(--accent); }
/* 2026-11-18: 사용자 요청으로 글자 입력칸의 바깥 강조 테두리(outline)를 없앤다. 선택 상태는 위 테두리 색으로만 보이고, 체크박스·버튼·링크의 키보드 강조는 그대로 둔다. */
.auth-form input:not([type="checkbox"]):not([type="radio"]):focus-visible { outline: none; }
.auth-policy { display: grid; gap: 14px; padding: 18px 0 0; border-top: 1px solid var(--line); }
.auth-form .auth-check { display: flex; align-items: center; gap: 9px; }
.auth-check input { width: 17px; height: 17px; margin: 0; accent-color: #202329; }
.auth-form .auth-check span { color: #555c66; font-size: 13px; font-weight: 400; }
.form-grid.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field-with-action { position: relative; }
.field-with-action input { padding-right: 120px !important; }
.field-with-action button {
  position: absolute;
  right: 7px;
  bottom: 7px;
  min-height: 34px;
  padding: 0 15px;
  color: #3e4650;
  font-size: 13px;
  background: #f0f2f5;
  border: 0;
  border-radius: 3px;
}
/* 2026-11-17 피그마 수정 요청(F07-2-1): 인증번호 칸 안쪽 오른쪽에 남은 시간과 확인 버튼을 함께 둔다.
   남은 시간은 기존 입력 오류와 같은 빨간 글씨로 보여 주고, 숫자 폭을 고정해 1초마다 글자가 흔들리지 않게 한다. */
.auth-form .phone-code-field input { padding-right: 150px !important; letter-spacing: .08em; }
.auth-form .phone-code-field .phone-code-timer { position: absolute; right: 82px; bottom: 15px; color: #d92d20; font-size: 13px; font-weight: 600; line-height: 18px; font-variant-numeric: tabular-nums; pointer-events: none; }
/* 2026-11-09: 업무 화면의 청록색 원형 대기 표시와 동일한 색상·회전 방식이다. */
[data-signup-id-check] { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.signup-id-spinner { width: 14px; height: 14px; flex: none; border: 2px solid #cfe7e5; border-top-color: #13a8a4; border-radius: 50%; animation: signup-id-spin 1s linear infinite; }
@keyframes signup-id-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .signup-id-spinner { animation: none; } }
.approval-preview { padding: 22px 0; border-top: 1px solid var(--line); }
.approval-preview strong { font-size: 17px; font-weight: 600; line-height: 1.5; }
.approval-preview p { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; word-break: keep-all; }
.signup-footer { padding: 16px 0 20px; background: #fff; border-top: 1px solid var(--line); }
.auth-note { margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.5; }
/* 2026-11-18(국세청 사업자 확인 흐름): 세 입력칸 아래에 넓은 확인 버튼과 결과 문구를 붙여 둔다. */
.business-verify-action { display: grid; gap: 8px; }
.business-verify-action button { min-height: 44px; padding: 0 16px; color: #303741; font-size: 14px; font-weight: 650; background: #f0f2f5; border: 0; border-radius: 3px; }
.business-verify-action button:not(:disabled):hover { background: #e4e7eb; }
.business-verify-action .auth-note { margin: 0; }
.wizard-actions { display: flex; align-items: center; gap: 12px; }
.auth-submit, .secondary-action { min-height: 50px; padding: 0 32px; font-size: 15px; font-weight: 650; border-radius: 4px; }
.auth-submit { min-width: 176px; margin-left: auto; color: #fff; background: #202329; border: 1px solid #202329; }
.auth-submit:hover { background: #3a404a; border-color: #3a404a; }
.secondary-action { color: #555c66; background: #fff; border: 1px solid #dce0e5; }
.secondary-action:hover { background: #f7f8fa; }
.auth-switch-copy { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 16px 0 0; color: var(--muted); font-size: 13px; }
.auth-switch-copy button { padding: 4px 0; color: #303741; font-size: 13px; font-weight: 650; background: transparent; border: 0; }
.auth-switch-copy button:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-view[data-auth-view="pending"].is-active { display: flex; flex-direction: column; padding-top: 40px; }
.auth-eyebrow { margin: 0 0 14px; color: var(--muted); font-size: 12px; }
.pending-card { margin: 40px 0; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pending-card strong { font-size: 18px; font-weight: 600; }
.pending-card p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.auth-view[data-auth-view="pending"] .auth-submit { align-self: flex-start; margin: 0; }

@media (max-height: 650px) {
  .auth-shell { grid-template-rows: 60px minmax(0, 1fr); }
  .auth-panel { padding-top: 18px; }
  h1 { font-size: 28px; }
  .signup-steps { margin-top: 18px; margin-bottom: 16px; }
  .signup-footer { padding-top: 12px; padding-bottom: 12px; }
  .auth-note { margin-bottom: 10px; }
  .auth-switch-copy { margin-top: 8px; }
}

/* 2026-09-30: 승인된 단일 페이지 안에서 실제 파일 입력·서버 오류만 표시한다. */
.auth-form input[type="email"], .auth-form input[type="file"] { width: 100%; min-width: 0; min-height: 48px; padding: 12px 14px; border: 1px solid #dce0e5; border-radius: 4px; font: inherit; font-size: 14px; background: #fff; }
.auth-form input[type="file"]::file-selector-button { margin-right: 12px; border: 0; padding: 4px 10px; background: #f0f2f5; color: #3e4650; border-radius: 3px; }
button:disabled { cursor: default; opacity: .5; }
.auth-note.is-error { color: #b42318; }

/* 2026-11-17 피그마 수정 요청(F07·F09): 비밀번호 조건은 입력칸 바로 밑에 빨간 글씨로, 신분증은 고르기 전에 안내 창을 보여 준다. */
.auth-field-error { margin: -2px 0 0; color: #d92d20; font-size: 12px; line-height: 1.45; }
.auth-form input.is-invalid, .auth-form input.is-invalid:hover, .auth-form input.is-invalid:focus { border-color: #d92d20; }
.identity-guide { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: rgba(17, 24, 39, .45); }
.identity-guide-card { width: min(440px, 100%); max-height: calc(100svh - 40px); overflow: auto; padding: 22px 22px 18px; border-radius: 10px; background: #fff; box-shadow: 0 18px 48px rgba(15, 23, 42, .25); }
.identity-guide-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.identity-guide-head h3 { margin: 0; font-size: 17px; }
.identity-guide-close { width: 32px; height: 32px; border: 0; background: transparent; color: #4b5563; font-size: 22px; line-height: 1; }
.identity-guide-lead { margin: 14px 0 8px; font-size: 13px; font-weight: 650; line-height: 1.5; }
.identity-guide-list { margin: 0; padding-left: 18px; color: #4b5563; font-size: 12px; line-height: 1.65; }
.identity-guide-sample { margin: 14px 0; padding: 14px; border-radius: 8px; background: #f3f4f6; text-align: center; }
.identity-guide-sample p { margin: 8px 0 0; color: #6b7280; font-size: 12px; }
/* 2026-11-18(사용자 결정): 신청자가 직접 가린 신분증 사진 미리보기와 가리기 편집기 */
.identity-preview { display: block; max-width: 100%; max-height: 220px; margin: -8px 0 16px; border: 1px solid #e5e7eb; border-radius: 8px; object-fit: contain; }
.identity-preview[hidden], .identity-edit[hidden] { display: none; }
.identity-edit { justify-self: start; min-height: 40px; margin: -8px 0 12px; padding: 0 14px; border: 1px solid #dce0e5; border-radius: 4px; background: #fff; color: #303741; font-size: 13px; font-weight: 650; }
.identity-editor { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; padding: 16px; background: rgba(17, 24, 39, .55); }
.identity-editor-card { display: grid; gap: 10px; width: min(720px, 100%); max-height: calc(100svh - 32px); overflow: auto; padding: 18px 18px 16px; border-radius: 10px; background: #fff; box-shadow: 0 18px 48px rgba(15, 23, 42, .25); }
.identity-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.identity-editor-head h3 { margin: 0; font-size: 17px; }
.identity-editor-close { width: 32px; height: 32px; border: 0; background: transparent; color: #4b5563; font-size: 22px; line-height: 1; }
.identity-editor-lead { margin: 0; color: #4b5563; font-size: 12px; line-height: 1.5; }
.identity-editor-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.identity-editor-tools button { min-height: 36px; padding: 0 12px; border: 1px solid #dce0e5; border-radius: 4px; background: #fff; color: #303741; font-size: 13px; font-weight: 600; }
.identity-editor-tools button[aria-pressed="true"] { border-color: #202329; background: #202329; color: #fff; }
.identity-editor-stage { display: grid; place-items: center; padding: 8px; border-radius: 6px; background: #f3f4f6; }
.identity-editor-stage canvas { display: block; max-width: 100%; max-height: min(56svh, 520px); touch-action: none; cursor: crosshair; }
.identity-editor-confirm input { width: 22px; height: 22px; }
.identity-editor-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.identity-editor-actions button { min-height: 46px; border-radius: 6px; font-weight: 650; }
.identity-editor-cancel { border: 1px solid #dce0e5; background: #fff; color: #303741; }
.identity-editor-save { border: 0; background: #202329; color: #fff; }
@media (max-width: 560px) { .identity-editor { padding: 0; } .identity-editor-card { width: 100%; height: 100svh; max-height: none; border-radius: 0; align-content: start; } }
.identity-guide-id { position: relative; display: grid; gap: 7px; width: min(260px, 100%); margin: 0 auto; padding: 14px 92px 14px 14px; border-radius: 8px; background: linear-gradient(135deg, #eef2f7, #e3e9f1); text-align: left; }
.identity-guide-id-title { font-size: 13px; font-weight: 700; color: #374151; }
.identity-guide-id-line { display: block; height: 7px; width: 60%; border-radius: 4px; background: #c7ced8; }
.identity-guide-id-line.wide { width: 85%; }
.identity-guide-id-number { font-size: 11px; color: #374151; }
.identity-guide-id-number em { padding: 1px 6px; border-radius: 3px; background: #1f2937; color: #fff; font-style: normal; }
.identity-guide-id-photo { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 64px; height: 78px; border-radius: 4px; background: #1f2937; color: #9ca3af; font-size: 11px; }
.identity-guide-confirm { width: 100%; min-height: 46px; border: 0; border-radius: 6px; background: #202329; color: #fff; font-weight: 650; }

/* 2026-11-18(사용자 요청): 등록증에서 읽은 값을 채운 뒤의 확인 요청은 파란 안내로, 사업자 확인을 마치면 버튼과 결과 문구를 숨긴다(script.js). */
.auth-note.is-notice { padding: 9px 12px; border-left: 3px solid var(--accent); border-radius: 3px; background: #eef2fc; color: var(--accent); font-size: 13px; font-weight: 650; }
/* 2026-11-18(사용자 요청): 등록증을 읽고 국세청 확인을 하는 동안 안내 문구 앞에 돌아가는 로딩 표시를 붙인다. */
.auth-note.is-loading::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: signup-id-spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .auth-note.is-loading::before { animation-duration: 2.4s; } }
.business-verify-action .auth-note.is-error { color: #d92d20; font-weight: 600; }
/* 2026-11-18(사용자 요청): 필수 항목 표시(빨간 별표). 해외 사업자를 고르면 국내 전용 필수 표시를 숨긴다. */
.auth-form .req { margin-left: 2px; color: #d92d20; font-weight: 700; }
.auth-form[data-business-region="foreign"] .req-domestic { display: none; }
/* 2026-11-18(사용자 요청): 등록증을 읽은 뒤 안내는 정보 아이콘(ⓘ)과 함께 입력칸 위에 보인다. 로딩 중에는 로딩 표시가 아이콘 자리를 쓴다. */
.auth-note.is-notice:not(.is-loading)::before { content: "ⓘ"; margin-right: 6px; font-weight: 700; }
/* 2026-11-18(사용자 요청): 주소 검색으로만 넣는 사업장 주소 칸. 누르면 주소 검색이 열린다. */
.auth-form input.is-search-only { background: #f3f4f6; color: #374151; cursor: pointer; }
/* 2026-11-18(사용자 결정): 등록증에서 읽어 잠근 칸(사업자등록번호·대표자명). 상호명은 잠그지 않는다. */
.auth-form input.is-locked { background: #f3f4f6; color: #374151; cursor: not-allowed; }
/* 2026-11-18(사용자 요청): 주소 검색 팝업. 신분증 안내 창과 같은 모양으로 화면 위에 띄운다. */
.address-dialog { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(17, 24, 39, .45); }
.address-dialog-card { display: grid; gap: 10px; width: min(520px, 100%); max-height: calc(100svh - 32px); padding: 18px 18px 16px; border-radius: 10px; background: #fff; box-shadow: 0 18px 48px rgba(15, 23, 42, .25); }
.address-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.address-dialog-head h3 { margin: 0; font-size: 17px; }
.address-dialog-close { width: 32px; height: 32px; border: 0; background: transparent; color: #4b5563; font-size: 22px; line-height: 1; }
.address-dialog-lead { margin: 0; color: #4b5563; font-size: 12px; line-height: 1.5; }
.address-dialog-card iframe { width: 100%; height: min(440px, calc(100svh - 150px)); border: 1px solid #e5e7eb; border-radius: 6px; }
