:root {
    --brand-color: #e84d1c;
    --brand-gradient: linear-gradient(135deg, #e84d1c 0%, #ff8e61 100%);
    --text-dark: #1e293b;
    --bg-body: #f0f2f5;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-body);
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* --- FONDO ANIMADO --- */
.background-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    animation: float 10s infinite ease-in-out alternate;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: rgba(232, 77, 28, 0.4);
}

.shape-2 {
    bottom: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(79, 70, 229, 0.3);
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 50px);
    }
}

/* --- TARJETA LOGIN --- */
.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

/* --- INPUTS --- */
.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.input-group-text {
    background: #fff;
    border: 1px solid #cbd5e0;
    border-right: none;
    border-radius: 12px 0 0 12px;
    color: #94a3b8;
    padding-left: 15px;
}

.form-control {
    background: #fff;
    border: 1px solid #cbd5e0;
    border-left: none;
    border-radius: 0 12px 12px 0;
    padding: 12px 15px 12px 0;
    font-size: 0.95rem;
    color: var(--text-dark);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    transition: all 0.3s;
}

.form-control:focus {
    background: #fff;
    border-color: var(--brand-color);
    box-shadow: none;
    outline: none;
}

/* Colorear icono al hacer focus */
.form-control:focus+.input-group-text,
.input-group:focus-within .input-group-text {
    border-color: var(--brand-color);
    color: var(--brand-color);
}

/* --- VALIDACIÓN BOOTSTRAP PERSONALIZADA --- */

/* 1. Quitamos los iconos por defecto (el check verde y la X roja) 
           porque se ven mal encima de nuestros iconos personalizados */
.was-validated .form-control:valid,
.form-control.is-valid,
.was-validated .form-control:invalid,
.form-control.is-invalid {
    background-image: none !important;
    padding-right: 0.75rem !important;
    /* Restauramos el padding */
}

/* 2. Borde Rojo en Error */
.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: #dc3545 !important;
}

/* 3. También poner rojo el icono de la izquierda si hay error */
.was-validated .form-control:invalid~.input-group-text,
.input-group.has-validation:has(.form-control:invalid) .input-group-text {
    border-color: #dc3545 !important;
    color: #dc3545;
}

/* 4. Mensaje de error pequeño y elegante */
.invalid-feedback {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 5px;
    margin-left: 5px;
}

/* --- BOTONES --- */
.btn-brand {
    background: var(--brand-gradient);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    width: 100%;
    box-shadow: 0 10px 20px rgba(232, 77, 28, 0.25);
    transition: 0.3s;
}

.btn-brand:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(232, 77, 28, 0.35);
    color: white;
}

.logo-icon {
    width: 90px;
    background: var(--brand-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 10px 20px rgba(232, 77, 28, 0.3);
    margin: 0 auto 20px auto;
}