/* ==========================================================================
   auth.css — SEWOO AI Global System 2026
   로그인 / 회원가입 / 비밀번호 찾기 공용 디자인

   · 세 화면이 같은 언어를 쓰도록 한 곳에 모았다.
   · 데스크톱은 좌측 브랜드 패널 + 우측 폼의 2단, 모바일은 1단으로 접힌다.
   · 입력창 글자는 16px 이상 — 그보다 작으면 아이폰이 화면을 확대해버린다.
   ========================================================================== */

:root {
    --au-blue:      #1a56db;
    --au-blue-2:    #3b82f6;
    --au-ink:       #0f172a;
    --au-text:      #334155;
    --au-muted:     #94a3b8;
    --au-line:      #e2e8f0;
    --au-line-soft: #f1f5f9;
    --au-bg:        #eef2f7;
    --au-ok:        #10b981;
    --au-warn:      #f59e0b;
    --au-err:       #ef4444;
}

* { -webkit-tap-highlight-color: transparent; }
.auth-body a { text-decoration: none; }

.auth-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--au-bg);
    background-image:
        radial-gradient(1100px 520px at 12% -8%,  rgba(59,130,246,.10), transparent 62%),
        radial-gradient(900px  480px at 105% 110%, rgba(26,86,219,.09),  transparent 60%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 18px;
    box-sizing: border-box;
    font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont,
                 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    color: var(--au-text);
}

/* ── 카드 ─────────────────────────────────────────────────────── */
.auth-card {
    width: 100%;
    max-width: 940px;
    background: #fff;
    border-radius: 26px;
    box-shadow: 0 26px 70px rgba(15,23,42,.10), 0 2px 8px rgba(15,23,42,.04);
    overflow: hidden;
    display: grid;
    grid-template-columns: 380px 1fr;
}
.auth-card.narrow { max-width: 460px; grid-template-columns: 1fr; }

/* ── 좌측 브랜드 패널 ─────────────────────────────────────────── */
.auth-brand {
    background: linear-gradient(150deg, #1a56db 0%, #2563eb 45%, #3b82f6 100%);
    color: #fff;
    padding: 46px 38px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.auth-brand::after {
    content: '';
    position: absolute; right: -70px; bottom: -90px;
    width: 260px; height: 260px; border-radius: 50%;
    background: rgba(255,255,255,.07);
}
/* 좌측 파란 패널에는 '배경이 투명한 흰색 로고'(logo_white.png)를 쓴다.
   예전에는 원본 logo_1.png 에 filter: brightness(0) invert(1) 을 걸었는데,
   원본이 투명 배경이 아니라 '흰 배경 이미지'라서 사각형 전체가 하얗게 칠해져
   로고가 아예 안 보였다. */
.auth-brand img { height: 40px; width: auto; opacity: .97; }
.auth-brand h1 {
    font-size: 25px; font-weight: 800; line-height: 1.42;
    margin: 26px 0 12px; letter-spacing: -.4px; word-break: keep-all;
}
.auth-brand p {
    font-size: 13.5px; line-height: 1.75; color: rgba(255,255,255,.82);
    margin: 0; word-break: keep-all;
}
.auth-brand .brand-foot {
    font-size: 11.5px; color: rgba(255,255,255,.62); position: relative; z-index: 1;
}
.auth-brand .brand-points { margin: 26px 0 0; padding: 0; list-style: none; position: relative; z-index: 1; }
.auth-brand .brand-points li {
    display: flex; align-items: flex-start; gap: 9px;
    font-size: 13px; color: rgba(255,255,255,.9); margin-bottom: 11px; word-break: keep-all;
}
.auth-brand .brand-points li::before {
    content: '✓'; font-weight: 800; font-size: 12px;
    background: rgba(255,255,255,.18); border-radius: 6px;
    width: 20px; height: 20px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; margin-top: 1px;
}

/* ── 우측 폼 ──────────────────────────────────────────────────── */
.auth-form { padding: 46px 44px; }
.auth-form .mobile-logo { display: none; }

.auth-title { font-size: 23px; font-weight: 800; color: var(--au-ink); margin: 0 0 7px; letter-spacing: -.4px; }
.auth-sub   { font-size: 13.5px; color: var(--au-muted); margin: 0 0 30px; line-height: 1.6; word-break: keep-all; }

.fld { margin-bottom: 17px; position: relative; }
.fld > label {
    display: block; font-size: 12.5px; font-weight: 800; color: #475569;
    margin: 0 0 7px 2px; letter-spacing: .01em;
}
.fld > label .opt { font-weight: 600; color: var(--au-muted); margin-left: 5px; }
.fld > label .req { color: var(--au-err); margin-left: 3px; }

.au-input {
    width: 100%; box-sizing: border-box;
    padding: 14px 15px; min-height: 50px;
    border: 1.5px solid var(--au-line); border-radius: 13px;
    background: #f8fafc; color: var(--au-ink);
    font-size: 16px;                     /* iOS 자동 확대 방지 */
    font-family: inherit;
    transition: border-color .18s, background .18s, box-shadow .18s;
}
.au-input::placeholder { color: #b6c2d2; font-size: 15px; }
.au-input:focus {
    outline: none; border-color: var(--au-blue-2); background: #fff;
    box-shadow: 0 0 0 4px rgba(59,130,246,.12);
}
.au-input:disabled { background: #f1f5f9; color: var(--au-muted); }
.au-input.ok  { border-color: #a7f3d0; background: #f6fffb; }
.au-input.err { border-color: #fecaca; background: #fffafa; }

.fld-row { display: flex; gap: 8px; }
.fld-row .au-input { flex: 1; min-width: 0; }

.au-msg { font-size: 12px; margin: 7px 2px 0; line-height: 1.5; display: none; word-break: keep-all; }
.au-msg.show { display: block; }
.au-msg.ok   { color: var(--au-ok); }
.au-msg.err  { color: var(--au-err); }
.au-msg.hint { color: var(--au-muted); display: block; }

/* ── 버튼 ─────────────────────────────────────────────────────── */
.au-btn {
    width: 100%; min-height: 52px; padding: 15px;
    border: none; border-radius: 13px;
    background: var(--au-ink); color: #fff;
    font-size: 15.5px; font-weight: 800; font-family: inherit;
    cursor: pointer; transition: .2s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.au-btn:hover:not(:disabled) { background: var(--au-blue); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(26,86,219,.22); }
.au-btn:active:not(:disabled) { transform: translateY(0); }
.au-btn:disabled { opacity: .5; cursor: default; }

.au-btn.ghost {
    background: #fff; color: var(--au-text); border: 1.5px solid var(--au-line);
    min-height: 50px; font-size: 14.5px;
}
.au-btn.ghost:hover:not(:disabled) {
    border-color: var(--au-blue-2); color: var(--au-blue); background: #f8fbff;
    box-shadow: none; transform: none;
}
.au-btn.small { width: auto; min-height: 50px; padding: 0 18px; font-size: 13.5px; white-space: nowrap; flex-shrink: 0; }

/* ── 체크박스 / 보조 링크 ─────────────────────────────────────── */
.au-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 4px 0 22px; }
.au-check { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.au-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.au-check .box {
    width: 20px; height: 20px; border-radius: 6px;
    border: 1.5px solid #cbd5e1; background: #fff; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: .16s; color: #fff; font-size: 12px; font-weight: 900;
}
.au-check input:checked + .box { background: var(--au-blue); border-color: var(--au-blue); }
.au-check input:focus-visible + .box { box-shadow: 0 0 0 4px rgba(59,130,246,.16); }
.au-check .box::after { content: '✓'; opacity: 0; transition: .16s; }
.au-check input:checked + .box::after { opacity: 1; }
.au-check .txt { font-size: 13.5px; font-weight: 600; color: var(--au-text); }

.au-links { display: flex; justify-content: space-between; gap: 14px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--au-line-soft); }
.au-links a { font-size: 13.5px; font-weight: 700; color: var(--au-muted); text-decoration: none; transition: .18s; }
.au-links a:hover { color: var(--au-blue); }
.au-links a.accent { color: var(--au-blue); }

/* ── 구분선 ───────────────────────────────────────────────────── */
.au-or { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: #cbd5e1; font-size: 11.5px; font-weight: 800; }
.au-or::before, .au-or::after { content: ''; flex: 1; height: 1px; background: var(--au-line); }

/* ── 단계 표시 (가입) ─────────────────────────────────────────── */
.au-steps { display: flex; align-items: center; gap: 0; margin-bottom: 28px; }
.au-step { display: flex; align-items: center; gap: 8px; flex: 1; }
.au-step .n {
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
    background: #eef2f7; color: var(--au-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 12.5px; font-weight: 800; transition: .22s;
}
.au-step .t { font-size: 12.5px; font-weight: 700; color: var(--au-muted); white-space: nowrap; transition: .22s; }
.au-step.on  .n { background: var(--au-blue); color: #fff; }
.au-step.on  .t { color: var(--au-ink); }
.au-step.done .n { background: #d1fae5; color: var(--au-ok); }
.au-step.done .t { color: var(--au-text); }
.au-step .bar { flex: 1; height: 2px; background: var(--au-line); margin: 0 10px; border-radius: 2px; }
.au-step.done .bar { background: #a7f3d0; }

/* ── 비밀번호 강도 ────────────────────────────────────────────── */
.pw-meter { margin-top: 9px; }
.pw-bars { display: flex; gap: 5px; }
.pw-bars i { flex: 1; height: 4px; border-radius: 2px; background: var(--au-line); transition: .25s; }
.pw-rules { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 9px; }
.pw-rules span { font-size: 11.5px; color: var(--au-muted); display: flex; align-items: center; gap: 4px; transition: .18s; }
.pw-rules span::before { content: '○'; font-size: 9px; }
.pw-rules span.ok { color: var(--au-ok); font-weight: 700; }
.pw-rules span.ok::before { content: '●'; }

/* ── 알림 배너 ────────────────────────────────────────────────── */
.au-note {
    display: flex; gap: 11px; align-items: flex-start;
    padding: 14px 15px; border-radius: 12px; font-size: 12.8px; line-height: 1.65;
    margin-bottom: 22px; word-break: keep-all;
}
.au-note .ico { flex-shrink: 0; font-size: 15px; line-height: 1.3; }
.au-note.info { background: #eff6ff; color: #1e40af; }
.au-note.warn { background: #fffbeb; color: #92400e; }
.au-note.ok   { background: #ecfdf5; color: #065f46; }

/* ── 인증번호 타이머 ──────────────────────────────────────────── */
.code-timer { font-size: 12.5px; font-weight: 800; color: var(--au-err); margin-left: 6px; font-variant-numeric: tabular-nums; }

/* ── 완료 화면 ────────────────────────────────────────────────── */
.au-done { text-align: center; padding: 12px 0 4px; }
.au-done .mark {
    width: 66px; height: 66px; border-radius: 50%; margin: 0 auto 20px;
    background: #ecfdf5; color: var(--au-ok);
    display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.au-done h3 { font-size: 19px; font-weight: 800; color: var(--au-ink); margin: 0 0 10px; }
.au-done p  { font-size: 13.5px; color: var(--au-muted); line-height: 1.75; margin: 0 0 26px; word-break: keep-all; }

/* ══════════════════════════════════════════════════════════════
   태블릿 이하 — 브랜드 패널을 접고 1단으로
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 860px) {
    .auth-card { grid-template-columns: 1fr; max-width: 460px; }
    .auth-brand { display: none; }
    .auth-form { padding: 38px 30px; }
    .auth-form .mobile-logo {
        display: block; text-align: center; margin-bottom: 26px;
    }
    .auth-form .mobile-logo img { height: 42px; width: auto; }
}

@media (max-width: 480px) {
    .auth-body {
        padding: 0;
        align-items: stretch;
        background: #fff;
    }
    .auth-card {
        border-radius: 0; box-shadow: none; max-width: none;
        min-height: 100vh; min-height: 100dvh;
    }
    .auth-form {
        padding: calc(30px + env(safe-area-inset-top, 0px)) 20px
                 calc(30px + env(safe-area-inset-bottom, 0px));
        display: flex; flex-direction: column; justify-content: center;
    }
    .auth-title { font-size: 21px; }
    .auth-sub   { font-size: 13px; margin-bottom: 24px; }
    .au-step .t { display: none; }
    .au-step { flex: 0 0 auto; }
    .au-step .bar { min-width: 28px; }
    .au-steps { justify-content: center; }
}

/* 가로가 아주 짧은 화면(키보드 올라온 상태 등)에서는 위쪽 정렬 */
@media (max-height: 620px) and (max-width: 480px) {
    .auth-form { justify-content: flex-start; }
}
