/* 로그인 · 회원가입 · 비밀번호 찾기 (v2) */

.is-auth .sidebar, .is-auth .topbar, .is-auth .tabbar, .is-auth .footer { display: none; }
.is-auth .main-col, .is-auth .app[data-sidebar="collapsed"] .main-col { margin-left: 0; }

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, 1fr); }

/* 왼쪽: 인기 작품 표지 콜라주 */
.auth-brand { position: relative; overflow: hidden; background: #0b0b0e; }
.auth-collage {
  position: absolute; inset: -8%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  transform: rotate(-8deg) scale(1.08); opacity: .55;
}
.auth-collage img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; background: #1d1d22; }
.auth-brand::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,11,14,.2) 0%, rgba(11,11,14,.92) 78%); }
.auth-brand-copy { position: absolute; left: 48px; right: 48px; bottom: 56px; z-index: 1; color: #fff; display: flex; flex-direction: column; gap: 14px; }
.auth-brand-copy img { width: 148px; height: auto; }
.auth-brand-copy h2 { font-size: clamp(26px, 2.6vw, 36px); font-weight: 800; line-height: 1.25; letter-spacing: -0.03em; }
.auth-brand-copy p { color: rgba(255,255,255,.75); line-height: 1.6; }

/* 오른쪽: 폼 */
.auth-panel { display: flex; flex-direction: column; min-height: 100vh; padding: 20px clamp(20px, 5vw, 64px) 24px; background: var(--bg); }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-home { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.auth-home:hover { color: var(--text); }
.auth-home .icon { width: 18px; height: 18px; }
.auth-logo { display: none; }
.auth-body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 0; }
.auth-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; }
.auth-title { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.auth-sub { color: var(--text-2); line-height: 1.6; margin-bottom: 6px; }
.auth-sub strong { color: var(--text); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.field input {
  height: 50px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--bg-elev); color: var(--text); font: inherit; font-size: 15px; outline: none; width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-weak); }
.field input[aria-invalid="true"] { border-color: #ef4444; }
.field-hint { font-size: 12px; color: var(--text-3); min-height: 0; }
.field-hint.is-error { color: #ef4444; }
.field-hint.is-ok { color: #16a34a; }
:root:not([data-theme="light"]) .field-hint.is-error { color: #f87171; }
:root:not([data-theme="light"]) .field-hint.is-ok { color: #4ade80; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); height: 34px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-3); }
.pw-toggle:hover { color: var(--text); background: var(--bg-hover); }

.pw-rules { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--text-3); }
.pw-rules li::before { content: "○ "; }
.pw-rules li.is-ok { color: #16a34a; }
.pw-rules li.is-ok::before { content: "✓ "; }
:root:not([data-theme="light"]) .pw-rules li.is-ok { color: #4ade80; }
.pw-rules li.is-bad { color: #ef4444; }

.terms { border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 14px; margin: 4px 0 0; display: flex; flex-direction: column; }
.check { display: flex; align-items: center; gap: 10px; min-height: 42px; font-size: 14px; cursor: pointer; }
.check + .check { border-top: 1px solid var(--line); }
.check input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.check span { flex: 1; }
.check a { font-size: 12px; color: var(--text-3); text-decoration: underline; }
.check-all span { font-weight: 800; }

.form-error { padding: 10px 12px; border-radius: var(--radius-s); background: rgba(239, 68, 68, .12); color: #ef4444; font-size: 14px; line-height: 1.5; }
:root:not([data-theme="light"]) .form-error { color: #fca5a5; }
.form-error a { color: inherit; font-weight: 700; text-decoration: underline; }
.btn[disabled] { opacity: .6; pointer-events: none; }

.auth-links { display: flex; justify-content: center; align-items: center; gap: 16px; font-size: 14px; color: var(--text-3); margin-top: 4px; }
.auth-links a { color: var(--text-2); font-weight: 600; }
.auth-links a:hover { color: var(--brand); }
.auth-links a + a::before { content: ""; display: inline-block; width: 1px; height: 12px; background: var(--line); margin-right: 16px; vertical-align: -1px; }

.auth-done { text-align: center; align-items: stretch; }
.auth-icon { align-self: center; width: 64px; height: 64px; border-radius: 999px; display: grid; place-items: center; font-size: 28px; background: var(--brand-weak); color: var(--brand); }

.auth-foot { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-3); }
.auth-foot a:hover { color: var(--text); }

@media (max-width: 1023px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-logo { display: block; }
  .auth-logo img { height: 16px; width: auto; }
}
@media (max-width: 599px) {
  .auth-panel { padding: 12px 20px 20px; }
  .auth-body { align-items: flex-start; padding: 24px 0; }
  .auth-title { font-size: 24px; }
  .field input { height: 48px; font-size: 16px; } /* 16px 미만이면 iOS 가 입력 시 화면을 확대한다 */
}
