/* ==========================================================================
   dlog · 새 UI 인증 화면 (로그인 02 / 회원가입 03)
   - 토큰은 base.css 의 :root 를 그대로 쓴다.
   - 구 css/auth/login.css · register.css 는 건드리지 않았다 (롤백용으로 남겨둠)
   ========================================================================== */

.auth-body {
  min-height: 100%;
  background: var(--bg);
  /* 카드 뒤로 아주 옅은 브랜드 글로우 — 목업의 보라 톤을 살린다 */
  background-image:
    radial-gradient(60rem 30rem at 50% -12rem, rgba(var(--brand-rgb), .10), transparent 70%);
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 40px 20px 56px;
}

.auth-logo { display: inline-flex; align-items: center; gap: 10px; }
.auth-logo .brand-mark { height: 36px; width: auto; display: block; }
.auth-logo .brand-word { height: 23px; width: auto; display: block; }

/* ---------- 카드 ---------- */
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  padding: 36px 32px 32px;
}

.auth-card--wide { max-width: 460px; }

.auth-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-align: center;
}

.auth-sub {
  margin-top: 8px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-2);
}

/* ---------- 폼 ---------- */
.auth-form { margin-top: 26px; display: grid; gap: 12px; }

.auth-field { display: grid; gap: 6px; }

.auth-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}

.auth-input {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  background: #FBFBFD;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.auth-input::placeholder { color: var(--ink-3); }
.auth-input:hover { border-color: #CBD1DC; }
.auth-input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .16);
}
.auth-input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .14);
}

/* 인풋 아래 도움말 / 오류 문구
   할 말이 있을 때만 자리를 차지한다. 빈 채로 min-height 를 잡아두면
   필드마다 빈 줄이 생겨 폼이 목업보다 한참 길어진다. */
.auth-hint {
  margin-top: 2px;
  font-size: 12px;
  line-height: 16px;
  color: var(--ink-3);
}
.auth-hint:empty { display: none; }
.auth-hint.is-error { color: var(--danger); }
.auth-hint.is-ok { color: var(--ok); }

/* ---------- 보조 줄 (비밀번호 찾기) ---------- */
.auth-aux {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  font-size: 13px;
}
.auth-aux a { color: var(--ink-2); }
.auth-aux a:hover { color: var(--brand); text-decoration: underline; }

.auth-keep {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}

/* 체크박스: 브라우저 기본 대신 브랜드 컬러로 */
.auth-check {
  width: 17px;
  height: 17px;
  accent-color: var(--brand);
  cursor: pointer;
  flex: none;
}

/* ---------- 제출 버튼 ---------- */
.auth-submit {
  width: 100%;
  height: 52px;
  margin-top: 8px;
  border-radius: var(--r-md);
  background: var(--brand);
  color: #fff;
  font-size: 15.5px;
  font-weight: 700;
  box-shadow: var(--sh-brand);
  transition: background .15s ease, box-shadow .15s ease, transform .06s ease;
}
.auth-submit:hover:not(:disabled) { background: var(--brand-ink); }
.auth-submit:active:not(:disabled) { transform: translateY(1px); }
.auth-submit:disabled {
  background: var(--line-2);
  color: #fff;
  box-shadow: none;
  cursor: not-allowed;
}

/* 서버 응답 대기 중 표시 */
.auth-submit.is-busy { opacity: .75; cursor: progress; }

/* ---------- 에러 배너 ---------- */
.auth-error {
  display: none;
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  background: var(--danger-bg);
  color: #B42318;
  font-size: 13px;
  font-weight: 600;
}
.auth-error.is-shown { display: block; }

.auth-flash {
  position: fixed;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  z-index: 60;
  max-width: min(92vw, 460px);
  padding: 12px 18px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--sh-lg);
}

/* ---------- 구분선 ---------- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 18px;
  color: var(--ink-3);
  font-size: 12.5px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------- SNS 로그인 ---------- */
.auth-sns {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.sns-round {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  box-shadow: var(--sh-sm);
  transition: transform .12s ease, box-shadow .15s ease;
}
.sns-round:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--sh-md); }
.sns-round svg { width: 22px; height: 22px; display: block; }

.sns-round--kakao  { background: #FEE500; color: #191600; }
.sns-round--naver  { background: #03C75A; color: #fff; }
.sns-round--google { background: #fff; border-color: var(--line-2); }
.sns-round--apple  { background: #000; color: #fff; }

/* 백엔드가 아직 없는 제공자(구글·애플).
   예전엔 disabled + opacity:.38 이었는데, 브랜드 색이 다 빠져서 고장난 것처럼 보였다.
   목업처럼 색은 그대로 두고, 누르면 "준비 중" 안내만 띄운다. */
.sns-round--soon { position: relative; }
.sns-round--soon::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .28);
}
.sns-round--soon:hover::after { background: rgba(255, 255, 255, .12); }

/* ---------- 카드 하단 링크 ---------- */
.auth-foot {
  margin-top: 22px;
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-2);
}
.auth-foot a {
  margin-left: 6px;
  color: var(--brand);
  font-weight: 700;
}
.auth-foot a:hover { text-decoration: underline; }

.auth-back {
  font-size: 13px;
  color: var(--ink-3);
}
.auth-back a:hover { color: var(--ink-2); text-decoration: underline; }

/* ---------- 가입 유형 탭 (회원가입) ---------- */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 22px;
  padding: 5px;
  background: #F1F3F8;
  border-radius: var(--r-md);
}

.auth-tab {
  height: 42px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.auth-tab svg { width: 17px; height: 17px; }
.auth-tab:hover { color: var(--ink); }
.auth-tab.is-on {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--sh-sm);
}

/* ---------- 약관 동의 ---------- */
.auth-agree {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  cursor: pointer;
}
.auth-agree .auth-check { margin-top: 2px; }
.auth-agree button {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: inherit;
  padding: 0;
}
.auth-agree button:hover { color: var(--brand); }

/* ---------- 약관 전문 모달 ---------- */
.policy-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(23, 26, 35, .55);
  padding: 24px;
  align-items: center;
  justify-content: center;
}
.policy-overlay.is-open { display: flex; }

.policy-modal {
  width: 100%;
  max-width: 620px;
  max-height: min(78vh, 720px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  overflow: hidden;
}
.policy-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.policy-modal__head h3 { font-size: 16px; font-weight: 800; }
.policy-modal__body {
  padding: 18px 20px 24px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-2);
}
.policy-modal__body :is(h1, h2, h3, h4) {
  color: var(--ink);
  font-size: 14.5px;
  margin: 18px 0 6px;
}

/* ---------- 반응형 ---------- */
@media (max-width: 480px) {
  .auth-shell { padding: 28px 14px 40px; justify-content: flex-start; }
  .auth-card { padding: 28px 20px 24px; border-radius: var(--r-lg); }
  .auth-title { font-size: 21px; }
  .auth-sns { gap: 11px; }
  .sns-round { width: 46px; height: 46px; }
}

/* 가입 유형 탭이 3개일 때 */
.auth-tabs--3 { grid-template-columns: repeat(3, 1fr); }
.auth-tabs--3 .auth-tab { padding: 0 6px; font-size: 13px; }

/* 아이디 · 비밀번호 찾기 · 인증 안내 (2026-11 새 디자인으로 교체) */
.auth-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 18px; font-size: 13px; }
.auth-links a { color: var(--ink-3); }
.auth-links a:hover { color: var(--brand); }
.auth-note { margin-top: 12px; font-size: 12.5px; line-height: 1.6; color: var(--ink-3); text-align: center; }
.auth-result { display: grid; gap: 6px; justify-items: center; padding: 20px; margin: 14px 0; border-radius: var(--r-md); background: var(--brand-tint); }
.auth-result span { font-size: 12.5px; color: var(--ink-3); }
.auth-result b { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.auth-center { display: grid; justify-items: center; text-align: center; gap: 8px; margin-bottom: 8px; }
.auth-mark { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.auth-mark.ok { background: var(--ok-bg, #E6F7F0); color: var(--ok, #0F9D6E); }
a.auth-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; margin-top: 8px; }
