/* 로그인/회원가입 등 인증 페이지 전용 스타일 (탑승 수속 카드) */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--brand);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}

.auth-page {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-5);
  background: radial-gradient(
      70% 55% at 50% 0%,
      color-mix(in srgb, var(--brand) 18%, transparent),
      transparent 70%
    ),
    var(--color-bg);
}

.auth-toggle {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
}
/* 좌상단 나가기 링크 (헤더가 없는 인증 페이지의 탈출구) */
.auth-home-link {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-muted);
  font-weight: 700;
  font-size: var(--fs-300);
}
.auth-home-link:hover {
  border-color: var(--brand);
  color: var(--brand);
  text-decoration: none;
}
.theme-toggle {
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.theme-toggle:hover {
  border-color: var(--brand);
}

.auth-card {
  width: min(420px, 100%);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.auth-card__head {
  position: relative;
  padding: var(--space-6);
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #12203f));
  color: #fff;
}
.auth-card__head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, #fff 0 8px, transparent 8px 16px);
  opacity: 0.4;
}
.auth-card__brand {
  font-weight: 800;
}
.auth-card__brand span {
  margin-left: 0.4rem;
  font-size: var(--fs-300);
  letter-spacing: 0.25em;
  opacity: 0.85;
}
.auth-card__title {
  margin-top: var(--space-3);
  font-size: var(--fs-700);
}
.auth-card__sub {
  margin-top: var(--space-1);
  color: rgba(255, 255, 255, 0.85);
}
.auth-card__body {
  padding: var(--space-6);
}

.auth-field {
  margin-bottom: var(--space-4);
}
.auth-field label {
  display: block;
  margin-bottom: var(--space-1);
  font-weight: 600;
}
.auth-field input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
}
.auth-field input:focus-visible {
  border-color: var(--brand);
  outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent);
  outline-offset: 1px;
}
.auth-field input[aria-invalid="true"] {
  border-color: #e5484d;
}
/* 날짜 입력 — 달력 아이콘 커스텀 (팝업은 color-scheme로 테마 연동) */
.auth-field input[type="date"] {
  cursor: pointer;
}
.auth-field input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  padding: 3px;
  margin-left: 0.25rem;
  border-radius: 5px;
  opacity: 0.7;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.auth-field input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  background: color-mix(in srgb, var(--brand) 20%, transparent);
}
.auth-field .hint {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--fs-300);
  color: var(--color-muted);
}

.auth-msg {
  min-height: 1.4em;
  margin-bottom: var(--space-3);
  color: var(--color-err);
  font-weight: 600;
}
.auth-submit {
  width: 100%;
  padding: 0.8rem;
  border: none;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: var(--fs-500);
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.auth-submit:hover {
  filter: brightness(1.08);
}
.auth-alt {
  margin-top: var(--space-4);
  text-align: center;
  color: var(--color-muted);
}
.auth-back {
  display: block;
  margin-top: var(--space-3);
  text-align: center;
  color: var(--color-muted);
  font-weight: 600;
}

/* ── 회원가입(넓은 카드·섹션 폼) ── */
.auth-card--wide {
  width: min(560px, 100%);
}
.auth-sec {
  margin: 0 0 var(--space-5);
  padding: var(--space-4) var(--space-5) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
}
.auth-sec > legend {
  padding: 0 var(--space-2);
  font-weight: 800;
  font-size: var(--fs-300);
  letter-spacing: 0.1em;
  color: var(--brand);
}
.req {
  margin-left: 0.35rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  color: #fff;
  background: var(--brand);
  vertical-align: middle;
}
.auth-field select,
.auth-field textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
}
.auth-field textarea {
  resize: vertical;
  min-height: 5.5rem;
}
/* 셀렉트 — 네이티브 화살표 숨기고 CSS로 그린 셰브론 */
.auth-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  cursor: pointer;
}
.auth-select {
  position: relative;
}
.auth-select::after {
  content: "";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--color-muted);
  border-bottom: 2px solid var(--color-muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.auth-field select:focus-visible,
.auth-field textarea:focus-visible {
  border-color: var(--brand);
  outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent);
  outline-offset: 1px;
}

/* 라디오/체크박스 그룹 */
.auth-group {
  margin: 0 0 var(--space-4);
  padding: 0;
  border: 0;
}
.auth-group > legend {
  padding: 0;
  margin-bottom: var(--space-2);
  font-weight: 600;
  color: var(--color-text);
}
.auth-choices {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
}
.auth-choices--col {
  flex-direction: column;
}
.auth-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
/* 커스텀 라디오/체크박스 */
.auth-choice input[type="radio"],
.auth-choice input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  display: grid;
  place-items: center;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.auth-choice input[type="radio"] {
  border-radius: 50%;
}
.auth-choice input[type="checkbox"] {
  border-radius: 5px;
}
.auth-choice input:hover {
  border-color: var(--brand);
}
.auth-choice input:checked {
  border-color: var(--brand);
  background: var(--brand);
}
.auth-choice input[type="radio"]:checked::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #fff;
}
.auth-choice input[type="checkbox"]:checked::after {
  content: "";
  width: 0.32rem;
  height: 0.6rem;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.auth-choice input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* 제출/초기화 */
.auth-actions {
  display: flex;
  gap: var(--space-3);
}
.auth-actions .auth-submit {
  flex: 1;
}
.auth-reset {
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-muted);
  font-weight: 700;
  cursor: pointer;
}
.auth-reset:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* ── 발권 완료(회원가입 결과) ── */
.auth-card__head--done {
  background: linear-gradient(135deg, var(--route-gold), color-mix(in srgb, var(--route-gold) 55%, #12203f));
}
.result-notes {
  margin: 0 0 var(--space-5);
  padding-left: 1.1rem;
  color: var(--color-muted);
  line-height: var(--line-body);
}
.result-notes li {
  margin-bottom: var(--space-2);
}
.result-links {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.result-links a {
  padding: 0.7rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
  font-weight: 700;
  color: var(--color-text);
}
.result-links a:hover {
  border-color: var(--brand);
  color: var(--brand);
  text-decoration: none;
}
.auth-home {
  display: block;
  width: 100%;
  padding: 0.8rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  text-align: center;
}
.auth-home:hover {
  filter: brightness(1.08);
  text-decoration: none;
}
