﻿/* =========================
   Fondo general
   ========================= */
body.login-page {
    background-color: #f4f6f9;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* =========================
   Contenedor principal
   ========================= */
.container {
    max-width: 1200px;
}

/* =========================
   Tarjeta de login
   ========================= */
.card-login {
    background: #ffffff; /* Fondo blanco limpio */
    border-radius: 16px;
    padding: 2rem;
    color: #0d6efd; /* Texto azul corporativo */
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    /* Hover: efecto flotante */
    .card-login:hover {
        transform: translateY(-6px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    }

    /* =========================
   Borde superior animado
   ========================= */
    .card-login::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        height: 4px;
        width: 0;
        background-color: #0d6efd;
        border-radius: 16px 16px 0 0;
        animation: slideBorder 1s ease-out forwards;
    }

    /* =========================
   Título animado
   ========================= */
    .card-login h2 {
        font-weight: bold;
        color: #0d6efd;
        opacity: 0;
        transform: translateY(15px);
        animation: fadeSlideUp 0.8s ease-out forwards;
        animation-delay: 0.8s;
    }

    /* =========================
   Inputs animados
   ========================= */
    .card-login .input-group {
        opacity: 0;
        transform: translateY(15px);
        animation: fadeSlideUp 0.8s ease-out forwards;
    }

        .card-login .input-group:nth-of-type(1) {
            animation-delay: 1.1s;
        }

        .card-login .input-group:nth-of-type(2) {
            animation-delay: 1.3s;
        }

    /* =========================
   Botón animado
   ========================= */
    .card-login .btn-login {
        opacity: 0;
        transform: translateY(15px);
        animation: fadeSlideUp 0.8s ease-out forwards;
        animation-delay: 1.6s;
    }

    /* =========================
   Enlaces animados
   ========================= */
    .card-login .text-center {
        opacity: 0;
        transform: translateY(15px);
        animation: fadeSlideUp 0.8s ease-out forwards;
        animation-delay: 1.9s;
    }

/* =========================
   Inputs
   ========================= */
.input-group-text {
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 8px 0 0 8px;
}

.form-control {
    border: 1px solid #ced4da;
    border-radius: 0 8px 8px 0 !important;
    background: #ffffff;
    color: #212529;
    transition: border-color 0.2s;
}

    .form-control:focus {
        border-color: #0d6efd;
        box-shadow: 0 0 0 0.2rem rgba(13,110,253,.25);
    }

/* =========================
   Botón login
   ========================= */
.btn-login {
    background-color: #0d6efd;
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.7rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

    .btn-login:hover {
        background-color: #084298;
        transform: translateY(-2px);
    }

/* =========================
   Enlaces
   ========================= */
.link-light,
.link-secondary {
    color: #0d6efd !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

    .link-light:hover,
    .link-secondary:hover {
        color: #084298 !important;
        text-decoration: underline;
    }

/* =========================
   Mensajes de error
   ========================= */
.alert-danger {
    font-size: 0.95em;
    border-radius: 6px;
}

/* =========================
   Imagen lateral
   ========================= */
.img-login {
    max-width: 80%;
    height: auto;
    opacity: 0;
    transform: translateX(-30px);
    animation: fadeInLeft 1s ease-out forwards;
    animation-delay: 0.5s;
    border-radius: 16px;
}

/* =========================
   Logo overlay
   ========================= */
.logo-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 140px;
    height: auto;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.85);
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeSlideDown 0.8s ease-out forwards;
    animation-delay: 1.2s;
}

/* =========================
   Texto overlay
   ========================= */
.overlay-text {
    position: absolute;
    bottom: 20px;
    left: 30px;
    color: white;
    font-size: 1.4rem;
    font-weight: bold;
    background-color: rgba(0,0,0,0.5);
    padding: 5px 10px;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideUp 1s ease-out forwards;
    animation-delay: 1.8s;
}

/* =========================
   Animaciones
   ========================= */
@keyframes slideBorder {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 768px) {
    .card-login {
        margin-top: 30px;
    }

    .img-login {
        display: none;
    }
}

/* Ajusta solo inputs dentro del login */
.card-login .input-group .form-control {
    min-width: 250px; /* forzar que se vean más largos */
    flex: 1 1 auto; /* crecer dentro del input-group */
}

--
/* Fondo azul corporativo para el formulario login */
.card-login {
    background-color: #0d6efd; /* Usa aquí el azul corporativo exacto de Empresas */
    border-radius: 10px;
    padding: 25px;
    color: #fff; /* texto blanco para contraste */
}

/* Input y textos claros sobre azul */
.card-login .form-control {
    background-color: #ffffff;
    border: 1px solid #ced4da;
    color: #000; /* texto oscuro dentro del input */
}

    .card-login .form-control:focus {
        border-color: #084298; /* azul más oscuro en focus */
        box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    }

/* Botón login con azul más oscuro */
.btn-login {
    background-color: #084298;
    border: none;
    color: #fff;
    font-weight: 600;
}

    .btn-login:hover {
        background-color: #052c65;
    }

/* Links */
.card-login a.link-light {
    color: #cfe2ff;
}

    .card-login a.link-light:hover {
        color: #fff;
        text-decoration: underline;
    }