﻿/* ===== IFFIN – Light Premium Auth (2025-08-19) ===== */

:root {
    --bg: #f6f8fc;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --stroke: #e5e7eb;
    --divider: #eef0f5;
    --primary: #3b82f6;
    --primary-strong: #2563eb;
    --focus: rgba(59,130,246,.28);
    --success: #10b981;
    --error: #ef4444;
    --radius-card: 16px;
    --radius-field: 12px;
}

/* 베이스 */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    color: var(--text);
    background: radial-gradient(900px 600px at 80% 0%, #e9efff 0%, transparent 60%), radial-gradient(900px 600px at -10% 15%, #f1f5ff 0%, transparent 55%), var(--bg) !important;
    font-family: Inter, "Noto Sans KR", system-ui, -apple-system, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.45;
}

/* 페이지 레이아웃 */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 중앙 영역 */
.auth-wrap {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 72px 16px 48px;
}

/* 카드 */
.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-card);
    box-shadow: 0 10px 25px rgba(17,24,39,.06), 0 2px 8px rgba(17,24,39,.03);
    padding: 26px 24px 22px;
}

/* 브랜드(카드 내부 상단) */
.brand {
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: .18em;
    color: #3b82f6;
    margin-bottom: 10px;
}

/* 타이틀 */
.auth-head {
    margin-bottom: 10px;
}

.auth-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}

.auth-subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

/* 폼 */
.auth-form {
    margin-top: 6px;
}

.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    margin: 0 0 6px;
    font-size: 12px;
    color: #374151;
}

/* 입력 필드 */
.form-control {
    height: 46px;
    padding: 10px 14px;
    background: #f9fbff !important;
    color: var(--text) !important;
    border: 1px solid var(--stroke) !important;
    border-radius: var(--radius-field);
    box-shadow: none !important;
    transition: border-color .15s ease, box-shadow .15s ease, background .2s ease;
}

    .form-control::placeholder {
        color: #9ca3af;
    }

    .form-control:focus {
        outline: 0;
        border-color: var(--primary) !important;
        box-shadow: 0 0 0 4px var(--focus) !important;
        background: #fff !important;
    }

    .form-control.invalid {
        border-color: var(--error) !important;
        box-shadow: 0 0 0 3px rgba(239,68,68,.18) !important;
    }

/* 자동완성 */
.auth-card input:-webkit-autofill,
.auth-card input:-webkit-autofill:hover,
.auth-card input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text) !important;
    box-shadow: 0 0 0 1000px #fff inset !important;
    transition: background-color 9999s ease-in-out 0s;
    caret-color: var(--text);
}

/* 라인(회원가입 링크) */
.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
    margin-bottom: 6px;
}

.link {
    color: var(--primary);
    font-size: 13px;
    text-decoration: none;
}

    .link:hover {
        text-decoration: underline;
    }

/* 버튼 */
.btn-primary.login-button {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(180deg, var(--primary), var(--primary-strong)) !important;
    color: #fff !important;
    font-weight: 600;
    letter-spacing: .2px;
    cursor: pointer;
    transition: transform .06s ease, filter .15s ease, box-shadow .2s ease;
    box-shadow: 0 8px 24px rgba(59,130,246,.25);
    margin-top: 6px;
}

    .btn-primary.login-button .btn-label {
        transform: translateY(.5px);
    }

    .btn-primary.login-button:hover {
        filter: brightness(1.04);
    }

    .btn-primary.login-button:active {
        transform: translateY(1px);
    }

    .btn-primary.login-button.clicked {
        pointer-events: none;
        opacity: .95;
    }

    .btn-primary.login-button.success {
        background: linear-gradient(180deg, var(--success), #0ea36f) !important;
        box-shadow: 0 8px 24px rgba(16,185,129,.25);
    }

    .btn-primary.login-button.error {
        background: linear-gradient(180deg, var(--error), #dc2626) !important;
        box-shadow: 0 8px 24px rgba(239,68,68,.25);
    }

/* 메시지 */
.login-form-main-message {
    display: none;
    margin: 0 0 12px;
    font-size: 13px;
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid var(--stroke);
    background: #fff;
    color: var(--muted);
}

    .login-form-main-message.show {
        display: block;
    }

    .login-form-main-message.success {
        color: #065f46;
        background: #ecfdf5;
        border-color: #a7f3d0;
    }

    .login-form-main-message.error {
        color: #7f1d1d;
        background: #fef2f2;
        border-color: #fecaca;
    }

/* 검증 에러 텍스트 */
label.error {
    margin-top: 6px;
    font-size: 12px;
    color: var(--error);
    display: block;
}

/* 보조 텍스트 */
.meta {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--muted);
}

/* 푸터 (줄 맞춤) */
.site-footer {
    flex-shrink: 0;
    background: #f9fafb;
    border-top: 1px solid var(--stroke);
    padding: 12px 0;
}

.site-footer__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--muted);
    text-decoration: none;
}

    .footer-link:hover {
        color: var(--text);
        text-decoration: underline;
    }

/* ====== Market 선택 모달 고급화 ====== */
.modal-content {
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* 헤더 */
.modal-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border-bottom: none;
    padding: 16px 20px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: .5px;
}

/* 바디 */
.modal-body {
    padding: 24px 28px;
    font-size: 15px;
    color: #374151;
}

    .modal-body p {
        margin-bottom: 18px;
        font-weight: 500;
        color: #4b5563;
    }

    /* 버튼 그룹 */
    .modal-body .btn {
        flex: 1;
        height: 46px;
        border-radius: 12px;
        font-size: 15px;
        font-weight: 600;
        transition: all .2s ease;
    }

    .modal-body .btn-primary {
        background: linear-gradient(180deg, #3b82f6, #2563eb);
        border: none;
        box-shadow: 0 6px 18px rgba(59,130,246,.25);
    }

        .modal-body .btn-primary:hover {
            filter: brightness(1.07);
            transform: translateY(-1px);
        }

    .modal-body .btn-info {
        background: linear-gradient(180deg, #0ea5e9, #0284c7);
        border: none;
        box-shadow: 0 6px 18px rgba(14,165,233,.25);
    }

        .modal-body .btn-info:hover {
            filter: brightness(1.07);
            transform: translateY(-1px);
        }


/* 모바일 */
@media (max-width: 480px) {
    .auth-card {
        padding: 22px 18px 20px;
    }

    .btn-primary.login-button {
        height: 44px;
    }
}
