/* ================================
   ESTILOS PÁGINA INICIAR SESIÓN
   ================================ */

body {
    background:
        linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
        url('../imagenes/fondoBuscadoroficial.webp') no-repeat center center fixed !important;
    background-size: cover !important;
    background-attachment: fixed !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ================================
   BOTONES DE ACCESO EN HEADER
   ================================ */
.btn-acceso {
    background: linear-gradient(135deg, #7a322e, #5a241f) !important;
    color: white !important;
    padding: 8px 20px !important;
    border-radius: 20px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
    font-size: 14px !important;
    border: 2px solid transparent !important;
}

.btn-acceso:hover {
    background: linear-gradient(135deg, #5a241f, #3d1814) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(122, 50, 46, 0.4) !important;
    color: white !important;
    text-decoration: none !important;
}

.btn-acceso.btn-registro {
    background: linear-gradient(135deg, #3498db, #2980b9) !important;
}

.btn-acceso.btn-registro:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b) !important;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4) !important;
}

/* ================================
   CONTENEDOR PRINCIPAL
   ================================ */
.contenedor-login {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 20px;
}

.tarjeta-login {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 480px;
    width: 100%;
    padding: 40px;
    border: 3px solid #000;
    animation: fadeInUp 0.6s ease-in-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================
   ENCABEZADO
   ================================ */
.encabezado-login {
    text-align: center;
    margin-bottom: 30px;
}

.icono-usuario {
    font-size: 4rem;
    color: #7a322e;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.encabezado-login h1 {
    color: #7a322e;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.encabezado-login p {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
}

/* ================================
   MENSAJES DE ALERTA
   ================================ */
.mensaje-alerta {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: none;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    animation: slideDown 0.3s ease-in-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mensaje-exito {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 2px solid #28a745;
}

.mensaje-error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 2px solid #dc3545;
}

.mensaje-alerta i {
    font-size: 1.3rem;
}

/* ================================
   FORMULARIO
   ================================ */
.formulario-login {
    margin-top: 20px;
}

.grupo-formulario {
    margin-bottom: 25px;
}

.grupo-formulario label {
    display: block;
    color: #495057;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.grupo-formulario label i {
    color: #7a322e;
    margin-right: 8px;
}

.campo-entrada {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.campo-entrada:focus {
    outline: none;
    border-color: #7a322e;
    background: white;
    box-shadow: 0 0 0 0.2rem rgba(122, 50, 46, 0.15);
}

.campo-entrada::placeholder {
    color: #adb5bd;
}

/* ================================
   CONTENEDOR PASSWORD
   ================================ */
.contenedor-password {
    position: relative;
    display: flex;
    align-items: center;
}

.contenedor-password .campo-entrada {
    padding-right: 50px;
}

.btn-mostrar-password {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #7a322e;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: all 0.3s ease;
}

.btn-mostrar-password:hover {
    color: #5a241f;
    transform: scale(1.1);
}

/* ================================
   RECORDAR Y OLVIDAR
   ================================ */
.recordar-olvidar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.contenedor-checkbox {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 8px;
}

.contenedor-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    opacity: 1;
    position: relative;
    flex-shrink: 0;
}

.checkmark-custom {
    display: none;
}

.texto-checkbox {
    color: #495057;
    font-size: 14px;
    line-height: 18px;
    vertical-align: middle;
}

.enlace-olvidar {
    color: #7a322e;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.enlace-olvidar:hover {
    color: #5a241f;
    text-decoration: underline;
}

/* ================================
   BOTÓN LOGIN
   ================================ */
.boton-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #7a322e, #5a241f);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(122, 50, 46, 0.3);
}

.boton-login:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a241f, #3d1814);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(122, 50, 46, 0.4);
}

.boton-login:disabled {
    background: linear-gradient(135deg, #9fa5aa, #7a8288);
    cursor: not-allowed;
    opacity: 0.7;
}

.boton-login i {
    font-size: 1.2rem;
}

/* ================================
   SEPARADOR
   ================================ */
.separador {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.separador::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #dee2e6;
}

.separador span {
    position: relative;
    background: white;
    padding: 0 15px;
    color: #6c757d;
    font-size: 0.9rem;
}

/* ================================
   LINK DE REGISTRO
   ================================ */
.registro-link {
    text-align: center;
    color: #6c757d;
    font-size: 0.95rem;
}

.registro-link a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.registro-link a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 768px) {
    body {
        margin-top: 120px !important;
    }

    .tarjeta-login {
        padding: 30px 20px;
        border-width: 2px;
    }

    .encabezado-login h1 {
        font-size: 1.6rem;
    }

    .icono-usuario {
        font-size: 3rem;
    }

    .recordar-olvidar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .contenedor-login {
        padding: 20px 15px;
    }

    .tarjeta-login {
        padding: 25px 15px;
    }

    .encabezado-login h1 {
        font-size: 1.4rem;
    }

    .boton-login {
        padding: 12px;
        font-size: 1rem;
    }
}
