/* === LOGIN STYLESHEET - SMARTFORGES S.A.S. - PROFESSIONAL VERSION === */
:root {
    --rojo-principal: #b30000;
    --rojo-degradado: #e53935;
    --rojo-oscuro: #8b0000;
    --blanco: #ffffff;
    --gris-claro: #f8f9fa;
    --gris-medio: #e9ecef;
    --gris-texto: #2d3748;
    --gris-texto-light: #6c757d;
    --sombra-suave: rgba(0, 0, 0, 0.08);
    --sombra-media: rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
}

/* === ESTRUCTURA BASE MEJORADA === */
body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--rojo-principal) 0%, var(--rojo-degradado) 50%, var(--rojo-oscuro) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--gris-texto);
    line-height: 1.6;
    font-weight: 400;
}

/* === CONTENEDOR PRINCIPAL PROFESIONAL === */
.login-container {
    display: flex;
    flex-direction: row;
    width: 100vw;
    height: 100vh;
    background: var(--blanco);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    position: relative;
}

.login-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    z-index: 1;
}

/* === COLUMNA IZQUIERDA (FORMULARIO) MEJORADA === */
.login-left {
    flex: 1;
    background: var(--blanco);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 2.5rem;
    position: relative;
    z-index: 2;
}

/* Eliminar el estilo del card anterior */
.login-card {
    /* Remover estilos del card si ya no se usa */
}

/* Asegurar que el formulario ocupe el espacio completo */
.login-left form {
    max-width: 400px;
    width: 100%;
}

/* Ajustar responsivo */
@media (max-width: 768px) {
    .login-left {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .login-left {
        padding: 1.5rem 1rem;
    }
}

/* === TARJETA DE LOGIN PROFESIONAL === */
.login-card {
    background: var(--blanco);
    width: 100%;
    max-width: 420px;
    transition: var(--transition);
    animation: professionalEntrance 0.8s ease-out;
}

.login-card-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    height: 72px;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
    filter: brightness(1.1);
}

.login-logo:hover {
    transform: scale(1.03);
}

.welcome-text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gris-texto);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.welcome-text p {
    color: var(--gris-texto-light);
    font-size: 0.95rem;
    margin: 0;
    font-weight: 400;
}

/* === FORMULARIO MEJORADO === */
.login-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    color: var(--gris-texto);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    letter-spacing: -0.01em;
}

.form-control {
    border-radius: var(--border-radius);
    border: 2px solid var(--gris-medio);
    background-color: var(--blanco);
    padding: 0.875rem 1rem;
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--gris-texto);
}

.form-control:focus {
    background-color: var(--blanco);
    border-color: var(--rojo-principal);
    box-shadow: 0 0 0 3px rgba(179, 0, 0, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: var(--gris-texto-light);
    opacity: 0.7;
}

/* === GRUPO DE CONTRASEÑA MEJORADO === */
.password-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gris-texto-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
}

.password-toggle:hover {
    background-color: var(--gris-claro);
    color: var(--rojo-principal);
}

/* === BOTÓN PRINCIPAL MEJORADO === */
.btn-login {
    background: linear-gradient(135deg, var(--rojo-principal), var(--rojo-degradado));
    border: none;
    border-radius: var(--border-radius);
    color: var(--blanco);
    font-size: 1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    width: 100%;
    letter-spacing: 0.025em;
    box-shadow:
        0 4px 15px rgba(179, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--rojo-degradado), var(--rojo-oscuro));
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px rgba(179, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow:
        0 2px 10px rgba(179, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-login:focus {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(179, 0, 0, 0.2),
        0 4px 15px rgba(179, 0, 0, 0.3);
}

/* === ALERTAS MEJORADAS === */
.alert {
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert::before {
    font-family: 'Segoe UI Symbol';
    font-size: 1.1rem;
}

.alert-danger {
    background-color: #fef2f2;
    color: #dc2626;
    border-left: 4px solid #dc2626;
}

.alert-danger::before {
    content: "⚠";
}

.alert-success {
    background-color: #f0fdf4;
    color: #16a34a;
    border-left: 4px solid #16a34a;
}

.alert-success::before {
    content: "✓";
}

/* === ENLACES MEJORADOS === */
.login-links {
    margin-top: 2rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gris-medio);
}

.login-links a {
    color: var(--gris-texto-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.login-links a:hover {
    color: var(--rojo-principal);
    background-color: var(--gris-claro);
}

/* === COLUMNA DERECHA CON CARRUSEL === */
/* Este tramo ha sido comentado porque en el layout actual no se utiliza el fondo de color, se reemplaza por una imagen de fondo 
.login-right {
    flex: 1.2;
    position: relative;
    background: linear-gradient(135deg, var(--rojo-principal) 0%, var(--rojo-degradado) 50%, var(--rojo-oscuro) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 0;
}*/

.login-right {
    flex: 1.2;
    position: relative;
    background: url('../images/fondo-login.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 0;
}

.login-right::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    z-index: 1;
}

/* === CARRUSEL MOTIVACIONAL MEJORADO === */
#motivationalCarousel {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

#motivationalCarousel .carousel-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

#motivationalCarousel .carousel-item {
    width: 100%;
    height: 100%;
    display: flex !important;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1.3s ease-in-out;
    padding: 2rem;
    box-sizing: border-box;
    text-align: center;
}

#motivationalCarousel .carousel-item.active {
    opacity: 1;
    z-index: 2;
    position: absolute;
}

/* === Estilos visuales de contenido === */
#motivationalCarousel i {
    font-size: 7.3rem; /* ícono más visible */
    color: #fff;
    margin-bottom: 1rem;
    opacity: 0.95;
}

#motivationalCarousel h3,
#motivationalCarousel h4 {
    font-size: 1.9rem; /* título más grande */
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

#motivationalCarousel p {
    font-size: 1.6rem;
    color: #ffffff;
    font-weight: 600;
    max-width: 80%;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Animación suave de aparición === */
#motivationalCarousel img,
#motivationalCarousel i,
#motivationalCarousel h3,
#motivationalCarousel h4,
#motivationalCarousel p {
    max-width: 90%;
    text-align: center;
    word-wrap: break-word;
    transition: transform 0.9s ease, opacity 0.9s ease;
}

#motivationalCarousel .carousel-item.active img,
#motivationalCarousel .carousel-item.active i,
#motivationalCarousel .carousel-item.active h3,
#motivationalCarousel .carousel-item.active h4,
#motivationalCarousel .carousel-item.active p {
    transform: translateY(0);
    opacity: 1;
}

#motivationalCarousel .carousel-item img,
#motivationalCarousel .carousel-item i,
#motivationalCarousel .carousel-item h3,
#motivationalCarousel .carousel-item h4,
#motivationalCarousel .carousel-item p {
    transform: translateY(25px);
    opacity: 0;
}

.illustration-container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.illustration {
    width: 75%;
    max-width: 380px;
    filter:
        drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15))
        brightness(1.05);
    animation: float 6s ease-in-out infinite;
}

.branding {
    text-align: center;
    margin-top: 2.5rem;
    z-index: 2;
    position: relative;
}

.branding h3 {
    color: var(--blanco);
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.branding p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.5;
    max-width: 320px;
    margin: 0 auto;
    font-weight: 300;
}

/* === EFECTOS LIVEWIRE MEJORADOS === */
[wire\\:loading] {
    position: relative;
    pointer-events: none;
}

[wire\\:loading]::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius);
    z-index: 10;
}

/* === ANIMACIONES PROFESIONALES === */
@keyframes professionalEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.02);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* === ESTADOS DE VALIDACIÓN MEJORADOS === */
.is-valid {
    border-color: #16a34a !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1) !important;
}

.is-invalid {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.login-card.is-invalid {
    animation: professionalShake 0.5s ease;
}

@keyframes professionalShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

/* === RESPONSIVO MEJORADO === */
@media (max-width: 1024px) {
    .login-container {
        height: auto;
        min-height: 95vh;
        max-height: none;
        margin: 2.5% auto;
    }

    .login-left {
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        width: 90%;
        height: auto;
    }

    .login-right {
        display: none;
    }

    .login-left {
        flex: none;
        padding: 2rem 1.5rem;
    }

    .login-left::after {
        display: none;
    }

    .login-card {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .login-container {
        width: 95%;
        border-radius: 16px;
    }

    .login-left {
        padding: 1.5rem 1rem;
    }

    .welcome-text h1 {
        font-size: 1.5rem;
    }

    .form-control {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .btn-login {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }

    .login-logo {
        height: 60px;
    }
}

/* === MEJORAS DE ACCESIBILIDAD === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === ESTILOS PARA MODO OSCURO (OPCIONAL) === */
@media (prefers-color-scheme: dark) {
    .login-left {
        background: #1a1a1a;
        color: #e1e1e1;
    }

    .login-card {
        background: #1a1a1a;
        color: #e1e1e1;
    }

    .form-control {
        background: #2d2d2d;
        border-color: #404040;
        color: #e1e1e1;
    }

    .form-control:focus {
        background: #2d2d2d;
        border-color: var(--rojo-principal);
    }
}

/* === MEJORAS DE RENDIMIENTO VISUAL === */
.login-container {
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.illustration {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.password-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.password-toggle:hover {
    background-color: var(--gris-claro);
    color: var(--rojo-principal);
    transform: scale(1.05);
    border-color: #ccc;
}

.password-toggle:active {
    transform: scale(0.95);
}

.password-toggle svg {
    transition: transform 0.2s ease;
}

/* Asegurar que el input de contraseña tenga suficiente padding para el botón */
.password-group .form-control {
    padding-right: 50px;
}
