/* 로그인·가입·문자 인증·오류 안내 화면 공용 스타일 (외부 이미지·폰트 요청 없음) */

:root {
    --auth-primary: #1890ff;
    --auth-primary-hover: #096dd9;
    --auth-primary-soft: #e6f7ff;
    --auth-teal: #36cfc9;
    --auth-text: #1f2937;
    --auth-text-sub: #6b7280;
    --auth-text-faint: #9ca3af;
    --auth-border: #d9dde3;
    --auth-border-soft: #e8ebf0;
    --auth-danger: #d92d20;
    --auth-danger-bg: #fef3f2;
    --auth-danger-border: #fecdca;
    --auth-info-bg: #eff8ff;
    --auth-info-border: #b2ddff;
    --auth-success: #12b76a;
    --auth-radius: 8px;
    --auth-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", Roboto, sans-serif;
}

/* ---- 바깥 틀 ---- */
.auth-shell,
.auth-shell *,
.status-page,
.status-page *,
.e-dialog.auth-dialog,
.e-dialog.auth-dialog * {
    box-sizing: border-box;
}

.auth-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: var(--auth-font);
    color: var(--auth-text);
    word-break: keep-all;
    overflow-wrap: anywhere;
    background:
        radial-gradient(900px 480px at 12% -10%, rgba(24, 144, 255, .13), transparent 70%),
        radial-gradient(760px 440px at 100% 0%, rgba(54, 207, 201, .14), transparent 70%),
        #f5f7fa;
}

.auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px 24px;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
    text-align: center;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-teal));
    color: #fff;
    font-size: 24px;
    box-shadow: 0 8px 20px rgba(24, 144, 255, .28);
}

.auth-brand-name {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--auth-text);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 32px 32px 28px;
    border: 1px solid var(--auth-border-soft);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px rgba(16, 24, 40, .08);
}

.auth-card.auth-card-wide {
    max-width: 440px;
}

.auth-card-foot {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--auth-border-soft);
    font-size: 13px;
    text-align: center;
}

.auth-card-foot a {
    color: var(--auth-text-sub);
    text-decoration: none;
}

.auth-card-foot a:hover {
    color: var(--auth-primary);
}

.auth-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.auth-field-row > label {
    margin: 0;
}

.auth-link {
    color: var(--auth-primary);
    font-size: 13px;
    text-decoration: none;
}

.auth-link:hover {
    color: var(--auth-primary-hover);
    text-decoration: underline;
}

.auth-legal {
    max-width: 400px;
    margin: 18px 0 0;
    color: var(--auth-text-faint);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.auth-footer {
    padding: 16px;
    color: var(--auth-text-faint);
    font-size: 12px;
    text-align: center;
}

/* ---- 제목 ---- */
.auth-heading {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--auth-text);
}

.auth-sub {
    margin: 0 0 22px;
    color: var(--auth-text-sub);
    font-size: 14px;
    line-height: 1.6;
}

.auth-text {
    margin: 0 0 14px;
    color: var(--auth-text-sub);
    font-size: 14px;
    line-height: 1.7;
}

.auth-text.auth-text-small {
    font-size: 12.5px;
    color: var(--auth-text-faint);
}

.auth-text b {
    color: var(--auth-text);
    font-weight: 600;
}

/* ---- 알림 ---- */
.auth-alert {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid var(--auth-danger-border);
    border-radius: var(--auth-radius);
    background: var(--auth-danger-bg);
    color: #b42318;
    font-size: 13px;
    line-height: 1.55;
}

.auth-alert > i {
    flex: none;
    margin-top: 2px;
}

.auth-alert.auth-alert-info {
    border-color: var(--auth-info-border);
    background: var(--auth-info-bg);
    color: #175cd3;
}

/* ---- 입력 ---- */
.auth-field {
    margin-bottom: 16px;
}

.auth-field > label,
.auth-label {
    display: block;
    margin-bottom: 6px;
    color: var(--auth-text);
    font-size: 13px;
    font-weight: 600;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrap > .auth-input-icon {
    position: absolute;
    left: 13px;
    width: 16px;
    color: var(--auth-text-faint);
    font-size: 15px;
    text-align: center;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    background: #fff;
    color: var(--auth-text);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.auth-input-wrap.has-icon > .auth-input {
    padding-left: 40px;
}

.auth-input-wrap.has-toggle > .auth-input {
    padding-right: 44px;
}

.auth-input::placeholder {
    color: var(--auth-text-faint);
}

.auth-input:hover {
    border-color: #b6bcc6;
}

.auth-input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, .16);
}

.auth-input[readonly] {
    background: #f5f7fa;
    color: var(--auth-text-sub);
}

.auth-input-toggle {
    position: absolute;
    right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--auth-text-faint);
    font-size: 16px;
    cursor: pointer;
}

.auth-input-toggle:hover {
    color: var(--auth-text-sub);
    background: #f2f4f7;
}

.auth-input-toggle:focus-visible {
    outline: 2px solid var(--auth-primary);
}

.auth-inline {
    display: flex;
    gap: 8px;
}

.auth-inline > .auth-input-wrap {
    flex: 1;
    min-width: 0;
}

/* 인증번호 6자리 */
.auth-input.auth-otp {
    height: 52px;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: .5em;
    text-align: center;
    text-indent: .5em;
    font-variant-numeric: tabular-nums;
}

.auth-input.auth-otp::placeholder {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
    text-indent: 0;
}

/* ---- 버튼 ---- */
.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--auth-radius);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, box-shadow .15s;
}

.auth-btn:focus-visible {
    outline: 2px solid var(--auth-primary);
    outline-offset: 2px;
}

.auth-btn.auth-btn-block {
    width: 100%;
}

.auth-btn.auth-btn-primary {
    background: var(--auth-primary);
    color: #fff;
    box-shadow: 0 1px 2px rgba(24, 144, 255, .3);
}

.auth-btn.auth-btn-primary:hover {
    background: var(--auth-primary-hover);
    color: #fff;
}

.auth-btn.auth-btn-secondary {
    border-color: var(--auth-border);
    background: #fff;
    color: var(--auth-text);
}

.auth-btn.auth-btn-secondary:hover {
    border-color: var(--auth-primary);
    color: var(--auth-primary);
}

.auth-btn.auth-btn-text {
    height: auto;
    padding: 4px 0;
    background: none;
    color: var(--auth-primary);
    font-size: 13px;
    font-weight: 500;
}

.auth-btn.auth-btn-text:hover {
    color: var(--auth-primary-hover);
    text-decoration: underline;
}

.auth-btn.auth-btn-sm {
    height: 44px;
    padding: 0 14px;
    font-size: 13.5px;
}

.auth-btn:disabled,
.auth-btn[disabled] {
    opacity: .5;
    cursor: not-allowed;
    box-shadow: none;
}

.auth-btn.auth-btn-danger {
    background: var(--auth-danger);
    color: #fff;
}

.auth-btn.auth-btn-danger:hover {
    background: #b42318;
    color: #fff;
}

.auth-btn.auth-btn-secondary.is-danger {
    color: var(--auth-danger);
}

.auth-btn.auth-btn-secondary.is-danger:hover {
    border-color: var(--auth-danger);
    color: var(--auth-danger);
}

/* 복구 코드·등록 코드처럼 글자가 섞인 입력 */
.auth-input.auth-otp.auth-otp-wide {
    font-size: 20px;
    letter-spacing: .18em;
    text-indent: .18em;
    text-transform: uppercase;
}

.auth-input.auth-otp.auth-otp-wide::placeholder {
    text-transform: none;
}

/* ---- 인증 앱(TOTP) 등록 창 ---- */
.totp-steps {
    margin: 0 0 12px;
    padding-left: 18px;
    color: var(--auth-text-sub);
    font-size: 13px;
    line-height: 1.7;
}

.totp-qr {
    display: flex;
    justify-content: center;
    margin: 4px auto 8px;
}

.totp-qr svg {
    width: 176px;
    height: 176px;
    padding: 8px;
    border: 1px solid var(--auth-border-soft);
    border-radius: 10px;
    background: #fff;
}

.totp-key {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f5f7fa;
    color: var(--auth-text);
    font-size: 13px;
    letter-spacing: .08em;
    user-select: all;
}

.totp-codes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 12px;
    margin: 8px 0 10px;
    padding: 10px 12px;
    border: 1px dashed var(--auth-border);
    border-radius: 8px;
    background: #fafbfc;
}

.totp-codes > code {
    color: var(--auth-text);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .06em;
    user-select: all;
}

.totp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0 10px;
}

.auth-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin .7s linear infinite;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

/* ---- 소셜 로그인 ---- */
.auth-social {
    margin-top: 22px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--auth-text-faint);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid var(--auth-border-soft);
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 44px;
    margin-bottom: 10px;
    border-radius: var(--auth-radius);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, box-shadow .15s;
}

.auth-social-btn svg {
    width: 18px;
    height: 18px;
    flex: none;
}

.auth-social-google {
    border: 1px solid var(--auth-border);
    background: #fff;
    color: #3c4043;
}

.auth-social-google:hover {
    background: #f8f9fa;
    color: #3c4043;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .1);
}

.auth-social-kakao {
    border: 1px solid #fee500;
    background: #fee500;
    color: rgba(0, 0, 0, .85);
}

.auth-social-kakao:hover {
    background: #f5dc00;
    color: rgba(0, 0, 0, .85);
}

.auth-social-note {
    margin-top: 2px;
    color: var(--auth-text-faint);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

/* ---- 가입 단계 표시 ---- */
.auth-steps {
    display: flex;
    gap: 6px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.auth-steps > li {
    flex: 1;
    padding-top: 8px;
    border-top: 3px solid var(--auth-border-soft);
    color: var(--auth-text-faint);
    font-size: 12px;
    font-weight: 500;
}

.auth-steps > li.is-done,
.auth-steps > li.is-current {
    border-top-color: var(--auth-primary);
}

.auth-steps > li.is-current {
    color: var(--auth-primary);
    font-weight: 700;
}

.auth-steps > li.is-done {
    color: var(--auth-text-sub);
}

.auth-verified {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    color: #027a48;
    font-size: 13px;
    font-weight: 500;
}

/* ---- 안내 아이콘 원 (완료·오류 등) ---- */
.auth-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--auth-primary-soft);
    color: var(--auth-primary);
    font-size: 24px;
}

.auth-badge.is-success {
    background: #ecfdf3;
    color: var(--auth-success);
}

.auth-badge.is-danger {
    background: var(--auth-danger-bg);
    color: var(--auth-danger);
}

.auth-center {
    text-align: center;
}

.auth-center .auth-heading {
    margin-bottom: 10px;
}

/* ---- 문자 인증 대화상자 (Syncfusion SfDialog 덧입힘) ---- */
.e-dialog.auth-dialog {
    max-width: calc(100vw - 24px);
    border: 0;
    border-radius: 16px;
    font-family: var(--auth-font);
    word-break: keep-all;
    overflow-wrap: anywhere;
    box-shadow: 0 24px 64px rgba(16, 24, 40, .24);
    overflow: hidden;
}

.e-dialog.auth-dialog .e-dlg-header-content {
    padding: 20px 24px 0;
    border: 0;
    background: #fff;
}

.e-dialog.auth-dialog .e-dlg-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--auth-text);
}

.e-dialog.auth-dialog .e-dlg-content {
    padding: 14px 24px 8px;
    color: var(--auth-text);
    font-size: 14px;
}

.e-dialog.auth-dialog .e-footer-content {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px 24px 22px;
    border: 0;
}

.e-dialog.auth-dialog .e-footer-content .auth-btn {
    height: 40px;
    min-width: 84px;
}

.e-dialog.auth-dialog .e-dlg-closeicon-btn {
    top: 0;
    right: -6px;
}

.auth-dialog-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.auth-dialog-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--auth-primary-soft);
    color: var(--auth-primary);
    font-size: 16px;
}

.auth-phone {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: var(--auth-radius);
    background: #f5f7fa;
    color: var(--auth-text-sub);
    font-size: 13px;
    line-height: 1.5;
}

.auth-phone > i {
    color: var(--auth-text-faint);
    font-size: 18px;
}

.auth-phone strong {
    display: block;
    color: var(--auth-text);
    font-size: 15px;
    letter-spacing: .02em;
}

.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 14px 0 0;
    color: var(--auth-text);
    font-size: 13px;
    line-height: 1.5;
    cursor: pointer;
}

.auth-check > input {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--auth-primary);
}

.auth-check small {
    display: block;
    color: var(--auth-text-faint);
    font-size: 12px;
}

.auth-help {
    margin: 12px 0 0;
    color: var(--auth-text-faint);
    font-size: 12.5px;
    line-height: 1.6;
}

/* ---- 오류 안내 화면 ---- */
.status-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 420px;
    margin: 0 auto;
    padding: 24px 16px 8px;
    font-family: var(--auth-font);
    word-break: keep-all;
    overflow-wrap: anywhere;
    text-align: center;
}

.status-page .status-code {
    margin: 0 0 4px;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-teal));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 64px;
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.1;
}

.status-page .status-title {
    margin: 0 0 8px;
    color: var(--auth-text);
    font-size: 20px;
    font-weight: 700;
}

.status-page .status-text {
    margin: 0 0 24px;
    color: var(--auth-text-sub);
    font-size: 14px;
    line-height: 1.7;
}

.status-page .status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.status-page .status-actions .auth-btn {
    height: 40px;
}

/* ---- 좁은 화면 ---- */
@media (max-width: 480px) {
    .auth-main {
        justify-content: flex-start;
        padding-top: 28px;
    }

    .auth-card {
        padding: 24px 20px 22px;
        border-radius: 14px;
    }

    .auth-brand {
        margin-bottom: 18px;
    }

    .auth-inline {
        flex-wrap: wrap;
    }

    .auth-inline > .auth-btn {
        flex: 1 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-spinner { animation-duration: 2s; }
    .auth-input, .auth-btn, .auth-social-btn { transition: none; }
}
