/* ============================================
   LTV Analyzer — Login Page Styles (V4 Light)
   ============================================ */

/* ── Background ────────────────────────────── */

.login-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: #FFFFFF;
    overflow: hidden;
}

.login-bg__gradient--1 {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(79, 70, 229, 0.06) 0%, transparent 60%);
}

.login-bg__gradient--2 {
    display: none;
}

.login-bg__grid {
    display: none;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -30px); }
    66% { transform: translate(-20px, 20px); }
}


/* ── Layout ────────────────────────────────── */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}


/* ── Card ──────────────────────────────────── */

.login-card {
    width: 100%;
    max-width: 420px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 40px 36px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    animation: cardIn 0.5s ease-out;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Logo ──────────────────────────────────── */

.login-card__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #0F172A;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 32px;
    justify-content: center;
}

.login-card__logo-icon {
    flex-shrink: 0;
}


/* ── Header ────────────────────────────────── */

.login-card__header {
    text-align: center;
    margin-bottom: 28px;
}

.login-card__header h1 {
    color: #0F172A;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.login-card__header p {
    color: #6B7280;
    font-size: 0.875rem;
    margin: 0;
}


/* ── Messages ──────────────────────────────── */

.login-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.8125rem;
    margin-bottom: 20px;
    animation: messageIn 0.3s ease-out;
}

@keyframes messageIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-message--error {
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.15);
    color: #DC2626;
}

.login-message--success {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #16A34A;
}

.login-message svg {
    flex-shrink: 0;
}


/* ── Google Button ─────────────────────────── */

.login-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.login-google:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
    transform: translateY(-1px);
}

.login-google:active {
    transform: translateY(0);
}

.login-google:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}


/* ── Divider ───────────────────────────────── */

.login-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E5E7EB;
}

.login-divider span {
    color: #6B7280;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


/* ── Form ──────────────────────────────────── */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-field label {
    display: block;
    color: #374151;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.login-field__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.login-field__link {
    background: none;
    border: none;
    color: #4F46E5;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.login-field__link:hover {
    text-decoration: underline;
}

.login-field input {
    width: 100%;
    padding: 12px 16px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    color: #0F172A;
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.login-field input::placeholder {
    color: #9CA3AF;
}

.login-field input:focus {
    border-color: #4F46E5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
    background: #FFFFFF;
}


/* ── Submit Button ─────────────────────────── */

.login-submit {
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 4px;
}

.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
}

.login-submit:active {
    transform: translateY(0);
}

.login-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* ── Spinner ───────────────────────────────── */

.login-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ── Toggle ────────────────────────────────── */

.login-toggle {
    text-align: center;
    margin-top: 24px;
    font-size: 0.8125rem;
    color: #6B7280;
}

.login-toggle__btn {
    background: none;
    border: none;
    color: #4F46E5;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    padding: 0;
}

.login-toggle__btn:hover {
    text-decoration: underline;
}


/* ── Legal ─────────────────────────────────── */

.login-legal {
    text-align: center;
    margin-top: 20px;
    font-size: 0.6875rem;
    color: #6B7280;
    line-height: 1.6;
}

.login-legal a {
    color: #4F46E5;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.login-legal a:hover {
    color: #4338CA;
}


/* ── Auth User Nav (shared across pages) ──── */

.auth-user {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.15s;
}

.auth-user:hover {
    background: rgba(79, 70, 229, 0.06);
}

.auth-user__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.auth-user__name {
    color: #374151;
    font-size: 0.8125rem;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.auth-user--open .auth-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.auth-dropdown__email {
    padding: 8px 12px;
    font-size: 0.75rem;
    color: #6B7280;
    word-break: break-all;
}

.auth-dropdown__divider {
    border: none;
    height: 1px;
    background: #E5E7EB;
    margin: 4px 0;
}

.auth-dropdown__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: none;
    border: none;
    border-radius: 8px;
    color: #374151;
    font-size: 0.8125rem;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: background 0.15s;
}

.auth-dropdown__item:hover {
    background: #F9FAFB;
}

.auth-dropdown__item--danger {
    color: #DC2626;
}

.auth-dropdown__item--danger:hover {
    background: rgba(220, 38, 38, 0.06);
}


/* ── Responsive ────────────────────────────── */

@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
        border-radius: 12px;
    }

    .login-card__header h1 {
        font-size: 1.25rem;
    }

    .auth-user__name {
        display: none;
    }
}
