/* ============================================================
   auth.css — 로그인 / 출판사 회원가입(step1~3) 공통 스타일
   ============================================================ */

:root {
    --primary: #1e8dae;
    --dark: #0f172a;
    --label: #334155;
    --medium: #475569;
    --light: #64748b;
    --muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --bg-input-disabled: #f8fafc;
    --bg-dark-btn: #1e293b;
    --placeholder: #c0c8d4;
    --bg-page: #f6f7f8;
    --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
            system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo",
            "Noto Sans KR", "Malgun Gothic", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font); background: var(--bg-page); min-height: 100vh; }


/* ============================================================
   LOGIN
   ============================================================ */

.login-wrap { display: flex; height: 100vh; }

body.login-page { overflow: hidden; height: 100vh; }

/* 좌측 브랜딩 */
.login-brand {
    flex: 1;
    background: var(--primary);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 64px;
    overflow: hidden;
}

.brand-deco-1 {
    position: absolute;
    top: -96px; right: -96px;
    width: 384px; height: 384px;
    background: rgba(255,255,255,0.1);
    border-radius: 9999px;
    filter: blur(32px);
    pointer-events: none;
}

.brand-deco-2 {
    position: absolute;
    bottom: 160px; left: -80px;
    width: 320px; height: 320px;
    background: rgba(255,255,255,0.1);
    border-radius: 9999px;
    filter: blur(32px);
    pointer-events: none;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.brand-logo-text {
    font-size: 24px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.6px;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 512px;
    position: relative;
    z-index: 1;
}

.brand-copy h2 {
    font-size: 48px;
    font-weight: 700;
    color: white;
    letter-spacing: -1.2px;
    line-height: 1.25;
}

.brand-copy p {
    font-size: 20px;
    color: rgba(255,255,255,0.8);
    line-height: 1.625;
}


/* 우측 폼 영역 */
.login-form-area {
    flex: 1;
    background: var(--bg-page);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.login-box {
    width: 100%;
    max-width: 448px;
    padding-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.login-title h2 {
    font-size: 30px;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.75px;
    line-height: 1.2;
    margin-bottom: 8px;
}

.login-title p { font-size: 16px; color: var(--light); line-height: 1.5; }

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--label);
    line-height: 1.43;
}

.form-control {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 17px;
    font-size: 16px;
    font-family: var(--font);
    color: var(--dark);
    width: 100%;
    outline: none;
    transition: border-color 0.15s;
}

.form-control::placeholder { color: var(--placeholder); font-weight: 300; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,141,174,0.15); }

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.auth-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 0;
    padding: 0;
    margin: 0 0 8px;
}

.auth-radio-group .form-label {
    flex-shrink: 0;
}

.auth-radio-options {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
}

.auth-radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--label);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.auth-radio-option input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.form-forgot { font-size: 14px; color: var(--primary); text-decoration: none; font-weight: 500; }
.form-forgot:hover { color: #1a7a99; }

.auth-link-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.auth-link-group a + a {
    position: relative;
}

.auth-link-group a + a::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 50%;
    width: 1px;
    height: 12px;
    background: var(--border);
    transform: translateY(-50%);
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(30,141,174,0.2), 0 4px 6px -4px rgba(30,141,174,0.2);
    transition: background 0.15s;
}

.btn-login:hover { background: #1a7a99; }

.login-signup {
    border-top: 1px solid var(--border);
    padding-top: 25px;
    text-align: center;
    font-size: 14px;
    color: var(--medium);
}

.login-signup a { color: var(--primary); text-decoration: none; font-weight: 500; }
.login-signup a:hover { color: #1a7a99; }

.auth-result-card__label {
    font-size: 13px;
    color: var(--light);
}

.auth-result-card__value {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.2px;
}

.auth-code-row {
    position: relative;
}

.auth-code-input {
    padding-right: 86px;
    text-align: left;
    letter-spacing: 0.12em;
}

.auth-timer {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.auth-timer.is-expired {
    color: #e53e3e;
}

.auth-inline-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.auth-inline-actions--stack {
    flex-direction: column;
}

.auth-submit-button {
    width: 100%;
}

.btn-secondary,
.auth-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font);
    text-decoration: none;
    cursor: pointer;
}

.btn-secondary {
    border: 1px solid var(--border);
    background: white;
    color: var(--dark);
}

.btn-secondary:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.auth-result-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px;
    border: 1px solid rgba(30, 141, 174, 0.14);
    border-radius: 12px;
    background: rgba(30, 141, 174, 0.05);
}

.auth-bottom-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.auth-bottom-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
}

.auth-bottom-links a:hover {
    color: #1a7a99;
}


/* ============================================================
   SIGNUP — 공통 레이아웃 (step1 · step2 · step3)
   ============================================================ */

.signup-wrap { display: flex; min-height: 100vh; }

/* 사이드바 */
.signup-sidebar {
    width: 320px;
    flex-shrink: 0;
    background: white;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.sidebar-logo-text { font-size: 20px; font-weight: 700; color: var(--primary); }
.sidebar-subtitle { font-size: 14px; color: var(--light); margin-bottom: 48px; }

/* 스텝 인디케이터 */
.step-list { display: flex; flex-direction: column; gap: 24px; }
.step-item { display: flex; gap: 16px; align-items: flex-start; }
.step-indicator { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }

.step-circle {
    width: 40px; height: 40px;
    border-radius: 9999px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.step-circle.active   { background: var(--primary); color: white;}
.step-circle.done     { background: var(--primary); opacity: 0.5; color: white; }
.step-circle.inactive { background: var(--border-light); border: 1px solid var(--border); color: var(--muted); }

.step-line { width: 2px; height: 48px; background: var(--border); margin-top: 8px; }

.step-text { padding-top: 8px; }

.step-label { font-size: 14px; font-weight: 700; letter-spacing: 0.3px; margin-bottom: 2px; }
.step-label.active   { color: var(--primary); }
.step-label.done     { color: var(--primary); opacity: 0.6; }
.step-label.inactive { color: var(--muted); }

.step-name { font-size: 16px; font-weight: 600; color: var(--dark); }
.step-name.done     { color: var(--light); }
.step-name.inactive { font-weight: 500; color: var(--light); }

/* 메인 영역 */
.signup-main { flex: 1; padding: 64px 144px; overflow-y: auto; }
.main-inner { max-width: 672px; display: flex; flex-direction: column; gap: 40px; }

/* 폼 헤더 */
.form-header h2 { font-size: 30px; font-weight: 700; color: var(--dark); line-height: 1.2; margin-bottom: 8px; }
.form-header p  { font-size: 16px; color: var(--light); }

/* 폼 */
.form-body { display: flex; flex-direction: column; gap: 24px; }

.fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field-full  { grid-column: 1 / -1; }
.field-group { display: flex; flex-direction: column; gap: 8px; }

.field-label { font-size: 14px; font-weight: 600; color: var(--label); }

.form-input {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 17px;
    height: 48px;
    font-size: 16px;
    font-family: var(--font);
    color: var(--dark);
    width: 100%;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input::placeholder { color: var(--placeholder); font-weight: 400; }
.form-input:focus        { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,141,174,0.15); }
.form-input.disabled     { background: var(--bg-input-disabled); cursor: default; }
.form-input.is-invalid   { border-color: #e53e3e; }
.form-input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(229,62,62,0.15); }
.password-policy-input::placeholder { font-size: 13px; }

/* 주소 행 (step1) */
.address-row { display: flex; gap: 8px; }
.address-row .form-input { flex: 1; }

.btn-address {
    height: 48px;
    padding: 0 24px;
    background: var(--bg-dark-btn);
    color: white;
    font-size: 16px;
    font-weight: 500;
    font-family: var(--font);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-address:hover { background: #0f172a; }

/* 약관 동의 (step1) */
.signup-terms-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.signup-terms-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: rgba(30, 141, 174, 0.04);
    border: 1px solid rgba(30, 141, 174, 0.12);
    border-radius: 8px;
}

.signup-terms-check {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    cursor: pointer;
}

.signup-terms-check input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.signup-terms-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--label);
    line-height: 1.5;
    cursor: pointer;
    user-select: none;
}

.signup-terms-link {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.signup-terms-link:hover {
    color: #1a7a99;
    text-decoration: underline;
}

/* 대표자 체크박스 (step2) */
.ceo-check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(30, 141, 174, 0.04);
    border: 1px solid rgba(30, 141, 174, 0.12);
    border-radius: 8px;
    cursor: pointer;
}

.ceo-check-row input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.ceo-check-label { font-size: 15px; font-weight: 500; color: var(--label); cursor: pointer; user-select: none; }

/* 인증 안내 박스 (step3) */
.verify-guide {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px 24px;
    background: rgba(30, 141, 174, 0.04);
    border: 1px solid rgba(30, 141, 174, 0.12);
    border-radius: 10px;
}

.verify-guide-icon {
    width: 40px; height: 40px;
    background: rgba(30, 141, 174, 0.1);
    border-radius: 9999px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
}

.verify-guide-text p { font-size: 15px; color: var(--medium); line-height: 1.7; margin: 0; }
.verify-guide-text strong { color: var(--dark); }

/* 미인증 경고 (step3) */
.verify-alert {
    display: none;
    align-items: flex-start;
    gap: 10px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 14px 16px;
}

.verify-alert.show { display: flex; }
.verify-alert p    { font-size: 14px; color: #9a3412; line-height: 1.6; margin: 0; }

/* 재발송 (step3) */
.resend-row { font-size: 14px; color: var(--muted); text-align: right; margin-top: -8px; }

.btn-resend {
    background: none; border: none; cursor: pointer;
    font-size: 14px; font-weight: 600; color: var(--primary);
    font-family: var(--font); padding: 0;
}

.btn-resend:hover { text-decoration: underline; }

/* 구분선 */
.form-divider { height: 1px; background: var(--border); }

/* 하단 액션 */
.form-actions { display: flex; align-items: center; justify-content: space-between; }
.btn-next img,
.btn-back img,
.verify-guide-icon img,
.verify-alert img { display: block; flex-shrink: 0; }

/* 안내 카드 */
.info-card {
    background: rgba(30, 141, 174, 0.05);
    border: 1px solid rgba(30, 141, 174, 0.1);
    border-radius: 12px;
    padding: 25px;
    display: flex; gap: 16px; align-items: flex-start;
}

.info-card img { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.info-card h4  { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 6px; }
.info-card p   { font-size: 14px; color: var(--medium); line-height: 1.625; margin: 0; }


/* ============================================================
   반응형
   ============================================================ */

@media (max-width: 1024px) {
    .signup-main { padding: 48px; }
}

@media (max-width: 768px) {
    /* 로그인 */
    body.login-page { overflow: auto; }
    .login-wrap { flex-direction: column; height: auto; min-height: 100vh; }
    .login-brand { padding: 40px 24px; flex: none; }
    .brand-copy h2 { font-size: 32px; }
    .login-form-area { flex: none; padding: 40px 24px; }
    .form-options { flex-direction: column; align-items: flex-start; gap: 12px; }
    .auth-link-group { gap: 14px; }
    .auth-inline-actions { flex-direction: column; }
    .auth-submit-button { width: 100%; }
    .auth-bottom-links { flex-direction: column; align-items: center; gap: 12px; }

    /* 회원가입 */
    .signup-wrap { flex-direction: column; }
    .signup-sidebar { width: 100%; height: auto; position: static; }
    .step-line { display: none; }
    .step-list { flex-direction: row; gap: 16px; }
    .step-text { display: none; }
    .signup-main { padding: 32px 24px; }
    .fields-grid { grid-template-columns: 1fr; }
    .field-full { grid-column: auto; }
}

/* ===== AUTHOR INVITE ===== */
.invite-session-note {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--light);
}

.invite-radio-row {
    display: flex;
    gap: 20px;
    align-items: center;
}

.invite-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--dark);
    cursor: pointer;
}

.invite-radio input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.invite-signup-hint {
    margin: 4px 0 16px;
    font-size: 12px;
    color: var(--muted);
    line-height: 18px;
}
