@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700&display=swap');

/* ════════════════════════════════════════════
   CSS 변수
════════════════════════════════════════════ */
:root {
  --red:       #C8102E;
  --red-dark:  #A00D24;
  --red-light: #F9E5E8;
  --red-mid:   #E8D0D4;
  --white:     #FFFFFF;
  --gray-50:   #F8F8F8;
  --gray-100:  #F0F0F0;
  --gray-200:  #E0E0E0;
  --gray-400:  #AAAAAA;
  --gray-600:  #666666;
  --gray-800:  #333333;
  --dark:      #1A1A1A;
  --green:     #2E7D32;
  --green-bg:  #E8F5E9;
  --green-bd:  #C8E6C9;

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.14);

  --radius:    8px;
  --radius-lg: 14px;
}

/* ════════════════════════════════════════════
   리셋 & 기본
════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  background: var(--gray-50);
  color: var(--dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ════════════════════════════════════════════
   헤더
════════════════════════════════════════════ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo-badge {
  width: 32px;
  height: 32px;
  background: var(--red);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.5px;
  user-select: none;
}

.logo-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.3px;
}

.header-links {
  display: flex;
  gap: 16px;
}

.header-links a {
  font-size: 13px;
  color: var(--gray-600);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.header-links a:hover,
.header-links a.active {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* ════════════════════════════════════════════
   레이아웃
════════════════════════════════════════════ */
.page-wrap {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px 64px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 480px;
  padding: 40px 36px;
  animation: fadeUp 0.35s ease both;
}

.auth-card.wide {
  max-width: 560px;
}

/* ════════════════════════════════════════════
   페이지 타이틀
════════════════════════════════════════════ */
.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 28px;
  letter-spacing: -0.5px;
}

.page-title::after {
  content: '';
  display: block;
  width: 32px;
  height: 3px;
  background: var(--red);
  margin-top: 8px;
  border-radius: 2px;
}

/* ════════════════════════════════════════════
   단계 인디케이터
════════════════════════════════════════════ */
.step-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 28px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
}

.step-item.active {
  color: var(--red);
  font-weight: 700;
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--white);
}

.step-item.active .step-num {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.step-item.done .step-num {
  background: var(--gray-100);
  border-color: var(--gray-200);
}

.step-sep {
  width: 20px;
  height: 1px;
  background: var(--gray-200);
  margin: 0 4px;
}

/* ════════════════════════════════════════════
   폼 공통
════════════════════════════════════════════ */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.form-label .required {
  color: var(--red);
  margin-left: 2px;
}

.form-label .label-note {
  font-weight: 400;
  color: var(--gray-400);
  font-size: 12px;
  margin-left: 4px;
}

.form-input {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--dark);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input::placeholder {
  color: var(--gray-400);
  font-size: 14px;
}

.form-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.08);
}

.input-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.input-row .form-input {
  flex: 1;
}

/* ════════════════════════════════════════════
   비밀번호 입력 + 토글
════════════════════════════════════════════ */
.pw-wrap {
  position: relative;
}

.pw-wrap .form-input {
  padding-right: 44px;
}

.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  padding: 0;
}

/* ════════════════════════════════════════════
   비밀번호 강도 바
════════════════════════════════════════════ */
.strength-wrap {
  margin-top: 6px;
  display: none;
}

.strength-track {
  height: 4px;
  border-radius: 2px;
  background: var(--gray-200);
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
}

/* ════════════════════════════════════════════
   버튼
════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-600);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

.btn-outline {
  background: var(--white);
  border: 1.5px solid var(--red);
  color: var(--red);
}

.btn-outline:hover {
  background: var(--red-light);
}

.btn-sm {
  height: 40px;
  font-size: 13px;
  padding: 0 14px;
  flex-shrink: 0;
}

.btn-block {
  width: 100%;
}

.btn-muted {
  font-weight: 400;
  color: var(--gray-400);
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.btn-row .btn {
  flex: 1;
}

.btn-row--top {
  margin-top: 20px;
}

.btn-row--sub {
  margin-top: 10px;
}

/* ════════════════════════════════════════════
   알림 박스 (에러 / 성공)
════════════════════════════════════════════ */
.alert {
  display: none;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
}

.alert-error {
  background: var(--red-light);
  color: var(--red);
  border: 1px solid var(--red-mid);
}

.alert-success {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-bd);
}

/* ════════════════════════════════════════════
   약관 박스
════════════════════════════════════════════ */
.term-box {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  height: 140px;
  overflow-y: auto;
  padding: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--gray-600);
  background: var(--gray-50);
  margin-bottom: 10px;
}

.term-check {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.term-check input[type="checkbox"] {
  accent-color: var(--red);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.term-check label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
  cursor: pointer;
}

/* ════════════════════════════════════════════
   로그인 링크 행
════════════════════════════════════════════ */
.link-row {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.link-row a {
  font-size: 13px;
  color: var(--gray-600);
  text-decoration: none;
  padding: 2px 8px;
}

.link-row a:hover {
  color: var(--red);
  text-decoration: underline;
}

.link-sep {
  color: var(--gray-200);
  line-height: 1.8;
  font-size: 13px;
}

/* ════════════════════════════════════════════
   성공 박스
════════════════════════════════════════════ */
.success-box {
  border: 2px dashed var(--red-mid);
  border-radius: var(--radius-lg);
  background: var(--red-light);
  padding: 28px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.success-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon svg {
  width: 28px;
  height: 28px;
}

.success-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.5;
}

.success-sub {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 6px;
}

/* ════════════════════════════════════════════
   아이디 찾기 결과 박스
════════════════════════════════════════════ */
.result-box {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.result-label {
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 8px;
  font-weight: 500;
}

.result-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.3px;
}

.result-value .accent {
  color: var(--red);
}

.result-meta {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 12px;
}

.result-meta__label {
  font-size: 12px;
  color: var(--gray-400);
}

.result-meta__value {
  font-size: 12px;
  color: var(--gray-600);
}

/* ════════════════════════════════════════════
   가입정보 확인 테이블
════════════════════════════════════════════ */
.confirm-table {
  width: 100%;
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.confirm-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
}

.confirm-row:last-child {
  border-bottom: none;
}

.c-label {
  color: var(--gray-600);
}

.c-value {
  font-weight: 600;
  color: var(--dark);
}

/* ════════════════════════════════════════════
   안내 문구
════════════════════════════════════════════ */
.page-desc {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 24px;
}

.notice-box {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 24px;
  padding: 12px 14px;
  background: var(--gray-50);
  border-radius: var(--radius);
}

.notice-box--accent {
  border-left: 3px solid var(--red);
}

.notice-box--sm {
  font-size: 12px;
  color: var(--gray-400);
  padding: 10px 12px;
}

/* ════════════════════════════════════════════
   비밀번호 규칙 안내
════════════════════════════════════════════ */
.pw-rules {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 20px;
}

.pw-rules__title {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.7;
  font-weight: 600;
  margin-bottom: 6px;
}

.pw-rules__list {
  font-size: 12px;
  color: var(--gray-400);
  line-height: 1.8;
  padding-left: 16px;
}

/* ════════════════════════════════════════════
   인증 타이머
════════════════════════════════════════════ */
.timer-text {
  color: var(--red);
  font-weight: 600;
}

/* ════════════════════════════════════════════
   헬퍼 텍스트
════════════════════════════════════════════ */
.helper {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 6px;
}

.helper.error {
  color: var(--red);
}

.helper.ok {
  color: var(--green);
}

/* ════════════════════════════════════════════
   구분선
════════════════════════════════════════════ */
.divider {
  height: 1px;
  background: var(--gray-100);
  margin: 24px 0;
}

/* ════════════════════════════════════════════
   푸터
════════════════════════════════════════════ */
.site-footer {
  background: var(--dark);
  color: var(--gray-400);
  text-align: center;
  padding: 20px;
  font-size: 12px;
  line-height: 1.8;
}

.site-footer strong {
  color: var(--white);
}

/* ════════════════════════════════════════════
   뷰 전환
════════════════════════════════════════════ */
.view {
  display: none;
}

.view.active {
  display: block;
  animation: fadeUp 0.3s ease both;
}

/* ════════════════════════════════════════════
   숨김 유틸 (JS 제어)
════════════════════════════════════════════ */
.is-hidden {
  display: none;
}

/* ════════════════════════════════════════════
   아이콘 (SVG를 CSS background-image로 관리)
════════════════════════════════════════════ */

/* 비밀번호 눈 아이콘 */
.pw-toggle::before {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='20'%20height='20'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23AAAAAA'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M1%2012s4-8%2011-8%2011%208%2011%208-4%208-11%208-11-8-11-8z'/%3E%3Ccircle%20cx='12'%20cy='12'%20r='3'/%3E%3C/svg%3E");
}

.pw-toggle.is-visible::before {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='20'%20height='20'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23AAAAAA'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M17.94%2017.94A10.07%2010.07%200%200%201%2012%2020c-7%200-11-8-11-8a18.45%2018.45%200%200%201%205.06-5.94'/%3E%3Cpath%20d='M9.9%204.24A9.12%209.12%200%200%201%2012%204c7%200%2011%208%2011%208a18.5%2018.5%200%200%201-2.16%203.19'/%3E%3Cline%20x1='1'%20y1='1'%20x2='23'%20y2='23'/%3E%3C/svg%3E");
}

/* 성공 체크 아이콘 */
.success-icon::before {
  content: '\2713';
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

/* 항상 표시되는 알림 (JS 제어 없이 static 표시) */
.alert--visible { display: block; }

/* 마케팅 동의 인라인 체크박스 */
.check-inline {
  accent-color: var(--red);
  margin-right: 6px;
}
