
:root {
    /*  --color-primary: @colorPrimario;*/
    --color-primary: #0B1442;
    --color-primary-rgb: 11, 20, 66; /* se sobreescribe con JS */
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* ── FONDO ─────────────────────────────────────────────── */
.login-bg {
    position: fixed;
    inset: 0;
    background-image: url('/Img/fondoOft.png');
  /*  background-image: url('@imagenFondo');*/
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Fallback si no hay imagen */
    background-color: #1a2a3a;
    z-index: 0;
}

    /* Capa de oscurecimiento sobre el fondo */
    .login-bg::after {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
    }

/* ── CARD CENTRAL ──────────────────────────────────────── */
.login-card {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    padding: 40px 40px 36px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    animation: cardIn .4s cubic-bezier(.4,0,.2,1);
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── LOGO / MARCA ──────────────────────────────────────── */
.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 28px;
    gap: 10px;
}

.login-logo-icon {
    width: 56px;
    height: 56px;
    background: var(--color-primary);
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.4rem;
    box-shadow: 0 4px 16px rgba(var(--color-primary-rgb), .35);
}

.login-logo-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -.3px;
}

/* ── SEPARADOR CON TEXTO ───────────────────────────────── */
.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    color: #9ca3af;
    font-size: .78rem;
}

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

/* ── CAMPOS ────────────────────────────────────────────── */
.field-wrap {
    position: relative;
    margin-bottom: 14px;
}

.field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: .85rem;
    pointer-events: none;
    transition: color .2s;
    z-index: 1;
}

.field-input {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 11px 14px 11px 40px;
    font-size: .875rem;
    font-family: 'DM Sans', sans-serif;
    color: #111827;
    background: #f9fafb;
    transition: border-color .2s, background .2s, box-shadow .2s;
    outline: none;
}

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

    .field-input:focus {
        border-color: var(--color-primary);
        background: #fff;
        box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), .12);
    }

.field-wrap:focus-within .field-icon {
    color: var(--color-primary);
}

/* Input con botón a la derecha (contraseña) */
.field-input.has-btn-right {
    padding-right: 44px;
}

.field-btn-right {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    font-size: .82rem;
    transition: color .2s;
}

    .field-btn-right:hover {
        color: var(--color-primary);
    }

/* Errores de validación */
.field-error {
    font-size: .75rem;
    color: #b91c1c;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.validation-box {
    background: #fef2f2;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
}

    .validation-box ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .validation-box li {
        font-size: .78rem;
        color: #b91c1c;
        display: flex;
        align-items: center;
        gap: 6px;
    }

/* ── RECUÉRDAME + OLVIDÉ ───────────────────────────────── */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    color: #4b5563;
    cursor: pointer;
    user-select: none;
}

.check-box {
    width: 16px;
    height: 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: all .15s;
    position: relative;
}

    .check-box:checked {
        background: var(--color-primary);
        border-color: var(--color-primary);
    }

        .check-box:checked::after {
            content: '';
            position: absolute;
            left: 4px;
            top: 1px;
            width: 5px;
            height: 9px;
            border: 2px solid #fff;
            border-top: none;
            border-left: none;
            transform: rotate(45deg);
        }

.link-forgot {
    font-size: .8rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: opacity .2s;
}

    .link-forgot:hover {
        opacity: .75;
    }

/* ── BOTÓN LOGIN ───────────────────────────────────────── */
.btn-login {
    width: 100%;
    padding: 12px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: filter .2s, transform .15s;
    letter-spacing: .2px;
}

    .btn-login:hover {
        filter: brightness(1.1);
        transform: translateY(-1px);
    }

    .btn-login:active {
        transform: translateY(0);
        filter: brightness(.95);
    }

/* ── PIE DE CARD ───────────────────────────────────────── */
.login-footer {
    margin-top: 24px;
    text-align: center;
    font-size: .75rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 480px) {
    .login-card {
        margin: 16px;
        padding: 32px 24px 28px;
        max-width: 100%;
    }
}

