/**
 * Login Anmax ERP — panel de marca + formulario.
 * Tipografía Inter. Marca oscura para el logo blanco. Formulario claro.
 */

.isp-login-page {
    margin: 0;
    min-height: 100vh;
    display: block;
    background: #070b12;
    color: #171717;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.anmax-login {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(300px, 440px) minmax(0, 1fr);
}

.anmax-login__brand {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    padding: 2.5rem 2.75rem 1.5rem;
    background: #070b12;
    color: #f8fafc;
}

.anmax-login__brand-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 16rem;
}

.anmax-login__logo {
    display: block;
    height: 64px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    background: transparent;
}

.anmax-login__brand .logo-fallback {
    display: none;
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.anmax-login__brand .logo-fallback.only,
.anmax-login__brand img[data-error] + .logo-fallback {
    display: block;
}

.anmax-login__brand img[data-error] {
    display: none;
}

.anmax-login__title {
    margin: 1.75rem 0 0;
    font-size: 1.35rem;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #fff;
}

.anmax-login__lead {
    margin: 0.35rem 0 0;
    font-size: 0.9375rem;
    line-height: 1.45;
    color: #cbd5e1;
}

.anmax-login__credit {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: #94a3b8;
}

.anmax-login__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: #eef2f6;
}

.anmax-login__card {
    width: 100%;
    max-width: 420px;
}

.anmax-login__card h2 {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #171717;
}

.anmax-login__hint {
    margin: 0.4rem 0 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #525252;
}

.anmax-login__alert {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.875rem;
    line-height: 1.45;
}

.anmax-field {
    margin-bottom: 1rem;
}

.anmax-field label,
.anmax-check label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #171717;
    cursor: pointer;
}

.anmax-field input {
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 0.85rem;
    border: 1px solid #d4d4d4;
    border-radius: 10px;
    background: #fff;
    color: #171717;
    font: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.anmax-field input::placeholder {
    color: #a3a3a3;
}

.anmax-field input:hover {
    border-color: #a3a3a3;
}

.anmax-field input:focus {
    outline: none;
    border-color: #0e7490;
    box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.22);
}

.anmax-password {
    position: relative;
}

.anmax-password input {
    padding-right: 3rem;
}

.anmax-password button {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: #525252;
    cursor: pointer;
    border-radius: 10px;
}

.anmax-password button:hover {
    color: #171717;
}

.anmax-password button:focus-visible {
    outline: 2px solid #0e7490;
    outline-offset: 2px;
}

.anmax-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0.25rem 0 1.25rem;
}

.anmax-check input {
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.15rem;
    accent-color: #0e7490;
    cursor: pointer;
    flex-shrink: 0;
}

.anmax-check label {
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
    color: #404040;
}

.anmax-submit {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    background: #115e59;
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.anmax-submit:hover {
    background: #134e4a;
}

.anmax-submit:focus-visible {
    outline: 2px solid #0e7490;
    outline-offset: 3px;
}

.anmax-login__secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 1.25rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #737373;
}

@media (max-width: 860px) {
    .anmax-login {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    .anmax-login__brand {
        display: contents;
    }

    .anmax-login__brand-main {
        order: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: none;
        max-width: none;
        padding: 0.9rem 1.25rem;
        background: #070b12;
    }

    .anmax-login__logo {
        height: 40px;
    }

    .anmax-login__title,
    .anmax-login__lead {
        display: none;
    }

    .anmax-login__panel {
        order: 2;
        flex: 1;
        align-items: flex-start;
        padding: 1.75rem 1.25rem 1rem;
    }

    .anmax-login__credit {
        order: 3;
        padding: 0.75rem 1.25rem 1.25rem;
        background: #eef2f6;
        color: #525252;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .anmax-field input,
    .anmax-submit {
        transition: none;
    }
}
