/*
 * Ubicación: public/assets/css/login.css
 * Descripción: Superficie de acceso (login + step2). Brand-first, enterprise.
 */

.login-page {
    min-height: 100vh;
    margin: 0;
    font-family: var(--crm-font-sans, "Manrope", sans-serif);
    color: var(--crm-text, #0f172a);
    background: var(--crm-atmosphere,
        radial-gradient(1000px 500px at 10% -10%, rgba(13, 110, 253, 0.16), transparent 55%),
        radial-gradient(800px 400px at 100% 0%, rgba(15, 118, 110, 0.12), transparent 50%),
        linear-gradient(165deg, #0b1220 0%, #152036 42%, #e8eef6 42.1%, #eef3f9 100%)
    );
    display: grid;
    place-items: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, rgba(11, 18, 32, 0.92) 0%, rgba(11, 18, 32, 0.55) 38%, transparent 38.1%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.035'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.login-shell {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 28px 64px rgba(11, 18, 32, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #fff;
    animation: login-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes login-rise {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
    to { opacity: 1; transform: none; }
}

.login-brand {
    background:
        radial-gradient(500px 280px at 20% 20%, rgba(13, 110, 253, 0.35), transparent 60%),
        linear-gradient(160deg, #0b1220 0%, #152036 55%, #0f766e 160%);
    color: #f8fafc;
    padding: 2.75rem 2.4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 480px;
    position: relative;
    text-align: center;
    align-items: center;
}

.login-brand::after {
    content: "";
    position: absolute;
    right: -20%;
    bottom: -15%;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.login-brand-logo {
    max-width: 220px;
    width: 100%;
    height: auto;
    object-fit: contain;
    margin-inline: auto;
    display: block;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.25));
}

.login-brand-name {
    font-family: var(--crm-font-display, "Sora", sans-serif);
    font-size: clamp(1.6rem, 2.5vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 1.5rem auto 0.5rem;
    line-height: 1.15;
}

.login-brand-tag {
    font-size: 0.95rem;
    opacity: 0.78;
    max-width: 18rem;
    line-height: 1.45;
    margin: 0 auto;
}

.login-brand-meta {
    font-size: 0.75rem;
    opacity: 0.55;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
}

.login-panel {
    padding: 2.5rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
}

.login-panel-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.4rem;
}

.login-panel-title {
    font-family: var(--crm-font-display, "Sora", sans-serif);
    font-weight: 700;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
    color: #0f172a;
}

.login-panel-lead {
    color: #64748b;
    font-size: 0.92rem;
    margin: 0 0 1.5rem;
}

.login-panel .form-floating > .form-control {
    border-radius: 0.7rem;
    border-color: rgba(15, 23, 42, 0.12);
    background: #fff;
}

.login-panel .form-floating > .form-control:focus {
    border-color: rgba(13, 110, 253, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.login-submit {
    border-radius: 0.75rem !important;
    padding: 0.85rem 1rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 24px rgba(13, 110, 253, 0.28);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(13, 110, 253, 0.34);
}

.login-foot {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #94a3b8;
}

#step2_code {
    letter-spacing: 0.35em;
    font-size: 1.45rem;
    text-align: center;
    font-weight: 700;
    font-family: var(--crm-font-display, "Sora", sans-serif);
}

@media (max-width: 820px) {
    .login-page {
        background: linear-gradient(180deg, #0b1220 0%, #152036 28%, #e8eef6 28.1%, #eef3f9 100%);
        padding: 1rem;
    }

    .login-page::before {
        background: none;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand {
        min-height: auto;
        padding: 1.75rem 1.5rem 1.25rem;
        gap: 1rem;
    }

    .login-brand-name {
        margin-top: 0.75rem;
        font-size: 1.35rem;
    }

    .login-brand-tag {
        display: none;
    }

    .login-panel {
        padding: 1.75rem 1.5rem 2rem;
    }
}
