/**
 * Sprint UI 1.1 — Login premium IDN
 * Depende de style.css (variables y .btn, .form-group base).
 */

.page-login-idn {
    min-height: 100vh;
    margin: 0;
    padding: clamp(16px, 3vw, 32px);
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse 80% 50% at 0% 0%, rgba(37, 99, 235, 0.12), transparent 50%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(67, 56, 202, 0.1), transparent 45%),
        linear-gradient(180deg, #f1f5f9 0%, #e8edf5 50%, #f8fafc 100%);
}

/* Shell: dos columnas desktop */
.login-shell {
    width: 100%;
    max-width: 1160px;
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    gap: clamp(20px, 2.5vw, 28px);
    align-items: stretch;
}

/* —— Columna izquierda: hero marca —— */
.login-hero--idn {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: clamp(32px, 4vw, 48px) clamp(28px, 3.5vw, 40px);
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    background:
        radial-gradient(ellipse 120% 80% at 100% 0%, rgba(56, 189, 248, 0.15), transparent 55%),
        radial-gradient(ellipse 90% 60% at 0% 100%, rgba(99, 102, 241, 0.14), transparent 50%),
        linear-gradient(155deg, #0a1020 0%, #152042 35%, #1d4ed8 72%, #1e3a5f 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 4px 0 rgba(255, 255, 255, 0.04) inset,
        0 28px 56px rgba(15, 23, 42, 0.28);
}

.login-hero--idn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='80' cy='20' r='40' fill='%23ffffff' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
}

.login-hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-hero__brand-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.login-hero__logo {
    width: clamp(72px, 12vw, 104px);
    height: auto;
    flex-shrink: 0;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.login-hero__titles {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.login-hero__company {
    display: block;
    font-size: clamp(1.15rem, 2.4vw, 1.45rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: #fff;
}

.login-hero__product {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.login-hero__concept {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.login-hero__lead {
    margin: 0;
    font-size: clamp(1.35rem, 2.8vw, 1.75rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #fff;
    max-width: 26ch;
}

.login-hero__desc {
    margin: 0;
    font-size: 1rem;
    line-height: 1.65;
    color: rgba(248, 250, 252, 0.88);
    max-width: 36rem;
}

.login-benefits {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.login-benefits li {
    position: relative;
    padding-left: 26px;
    font-size: 0.92rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.45;
}

.login-benefits li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}

.login-hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.login-trust-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* —— Columna derecha: tarjeta —— */
.login-aside {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.login-card {
    width: 100%;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid var(--color-border-soft);
    border-radius: 22px;
    padding: clamp(28px, 4vw, 38px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 24px 48px rgba(15, 23, 42, 0.1);
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-card__head {
    margin-bottom: 22px;
}

.login-card__badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #1e40af;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    margin-bottom: 14px;
}

.login-card h2 {
    margin: 0 0 8px;
    font-size: clamp(1.55rem, 3vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--color-text);
}

.login-card__intro {
    margin: 0 0 4px;
    color: var(--color-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    font-weight: 600;
}

.login-card__secure-note {
    margin: 12px 0 0;
    font-size: 0.78rem;
    color: var(--color-placeholder);
    line-height: 1.45;
}

.login-card__secure-note strong {
    color: var(--color-text-soft);
    font-weight: 700;
}

/* Mensajes (login.js inyecta .alert) */
#loginMessage {
    margin-bottom: 18px;
    min-height: 0;
}

#loginMessage .alert {
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 0.9rem;
    line-height: 1.45;
    border-width: 1px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

/* Formulario */
.login-form .form-group {
    margin-bottom: 18px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-soft);
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--color-border);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: var(--color-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-form input:hover {
    border-color: #cbd5e1;
}

.login-form input:focus {
    outline: none;
    background: #fff;
    border-color: var(--color-royal);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.login-actions {
    margin-top: 24px;
}

.login-actions .btn-primary {
    width: 100%;
    min-height: 52px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.login-card__footer {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border-soft);
    text-align: center;
}

.login-card__footer span {
    font-size: 0.84rem;
    color: var(--color-muted);
    font-weight: 600;
    line-height: 1.5;
}

.login-aside__meta {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-placeholder);
    padding: 0 8px;
}

/* Responsive */
@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr;
        max-width: 520px;
    }

    .login-hero--idn {
        min-height: auto;
        order: 1;
    }

    .login-aside {
        order: 2;
    }

    .login-card {
        min-height: auto;
    }

    .login-hero__lead {
        max-width: none;
    }
}

@media (max-width: 768px) {
    .page-login-idn {
        padding: 12px;
        align-items: flex-start;
    }

    .login-hero__brand-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .login-hero__logo {
        width: 72px;
    }

    .login-card {
        padding: 24px 20px;
    }

    .login-hero__trust {
        gap: 6px;
    }

    .login-trust-pill {
        font-size: 0.62rem;
        padding: 5px 10px;
    }
}
