/* ==========================================================================
   Modern Login Styles - Solo cambios visuales
   ========================================================================== */

/* Fondo de la página - Azul marino oscuro */
body {
    background: #1A202C !important;
    color: #FFF !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* Contenedor principal del login */
#login-block {
    padding-top: 50px;
    padding-bottom: 25px;
}

/* Caja del login - Fondo blanco con bordes redondeados */
.login-box {
    position: relative !important;
    max-width: 480px !important;
    background: #FFFFFF !important;
    border-radius: 8px !important;
    padding: 0 !important;
    margin-top: 80px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden !important;
}

/* Header azul del login */
.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: #2C5282;
    z-index: 1;
}

/* Barra blanca decorativa en el header */
.login-box::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #FFFFFF;
    border-radius: 2px;
    z-index: 2;
}

/* Logo y textos del header */
.login-logo {
    text-align: center;
    padding: 25px 0 10px;
    position: relative;
    z-index: 2;
}

.login-logo img {
    border: 0;
    display: inline-block;
    max-width: 200px;
    height: auto;
}

/* Título "GRUPO INPPA" */
.login-logo::before {
    content: 'GRUPO INPPA';
    display: block;
    color: #FFFFFF;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

/* Subtítulo "Sistema de Administracion Empresarial" */
.login-logo::after {
    content: 'Sistema de Administracion Empresarial';
    display: block;
    color: #FFFFFF;
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 15px;
}

/* Título "Inicio de Sesion" */
#login-block h3 {
    color: #FFFFFF !important;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    margin: 0;
    padding: 10px 0;
    position: relative;
    z-index: 2;
    text-shadow: none;
}

/* Línea separadora */
.login-box hr {
    display: none;
}

/* Formulario de login */
.login-form {
    padding: 30px 40px 40px;
    background: #FFFFFF;
    position: relative;
    z-index: 2;
}

/* Etiquetas de los campos */
.login-form label {
    display: block;
    color: #2D3748;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    text-align: left;
}

/* Campos de entrada */
.login-form input {
    display: block;
    margin: 0 auto 20px;
    width: 100%;
    background: #FFFFFF;
    border: 2px solid #E2E8F0;
    color: #2D3748;
    padding: 15px 20px;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.login-form input:focus {
    border-color: #4299E1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* Placeholder de RUT */
.login-form input[name="txtRut"] {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23718096" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>');
    background-repeat: no-repeat;
    background-position: 15px center;
    background-size: 20px;
    padding-left: 50px;
}

/* Placeholder de contraseña */
.login-form input[name="clave"] {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23718096" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><circle cx="12" cy="16" r="1"></circle><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg>');
    background-repeat: no-repeat;
    background-position: 15px center;
    background-size: 20px;
    padding-left: 50px;
    padding-right: 50px;
}

/* Icono de ojo para mostrar/ocultar contraseña */
.login-form input[name="clave"]::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23718096" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>');
    background-repeat: no-repeat;
    background-size: 20px;
    cursor: pointer;
}

/* Botón de login */
.btn.btn-login {
    width: 100%;
    display: block;
    margin: 20px auto;
    color: #FFFFFF;
    text-transform: uppercase;
    background: #2C5282;
    border: none;
    padding: 15px 20px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
}

.btn.btn-login:hover {
    background: #2A4A7A;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.3);
}

/* Icono de flecha en el botón */
.btn.btn-login::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14M12 5l7 7-7 7"></path></svg>');
    background-repeat: no-repeat;
    background-size: 20px;
}

/* Enlace "Olvidé mi clave" */
.login-links {
    text-align: center;
    margin-top: 20px;
}

.login-links a {
    color: #4299E1 !important;
    display: inline-flex;
    align-items: center;
    padding: 10px;
    transition: all 0.3s ease;
    opacity: 1;
    text-decoration: none;
    font-size: 14px;
}

.login-links a:hover {
    color: #3182CE !important;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Icono de lupa en el enlace */
.login-links a::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%234299E1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="M21 21l-4.35-4.35"></path></svg>');
    background-repeat: no-repeat;
    background-size: 16px;
    margin-right: 8px;
}

/* Ocultar elementos no necesarios */
.page-icon {
    display: none;
}

/* Footer */
#footer {
    background: transparent;
    margin-top: 30px;
}

#footer-text, #footer-text a {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-size: 14px;
}

/* Alertas de error */
.alert {
    margin: 20px auto;
    width: 100%;
    border-radius: 6px;
    border: none;
    background: #FED7D7;
    color: #C53030;
    border-left: 4px solid #E53E3E;
}

.alert h4 {
    color: #C53030;
    font-size: 16px;
    margin-bottom: 10px;
}

/* Responsive */
@media only screen and (max-width: 479px) {
    .login-box {
        margin: 20px;
        max-width: none;
    }
    
    .login-form {
        padding: 20px;
    }
    
    .login-form input {
        font-size: 16px; /* Evita zoom en iOS */
    }
}

@media only screen and (min-width: 480px) and (max-width: 767px) {
    .login-box {
        margin: 0 auto;
        max-width: 420px;
    }
}

/* Animaciones suaves */
.login-box {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efectos de hover mejorados */
.login-form input:hover {
    border-color: #CBD5E0;
    transform: translateY(-1px);
}

.btn.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 82, 130, 0.4);
}

/* Focus states mejorados */
.login-form input:focus {
    transform: translateY(-1px);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Transiciones suaves para todos los elementos */
* {
    transition: all 0.3s ease;
}

/* Mejoras de accesibilidad */
.login-form input:focus {
    outline: 2px solid #4299E1;
    outline-offset: 2px;
}

.btn.btn-login:focus {
    outline: 2px solid #4299E1;
    outline-offset: 2px;
}

/* Estilos para el modal de recuperación de contraseña */
.modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.modal-body {
    padding: 30px;
}

.panel-primary {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.panel-heading {
    background: #2C5282;
    color: #FFFFFF;
    border: none;
    border-radius: 8px 8px 0 0;
    padding: 15px 20px;
    font-weight: bold;
}

.panel-body {
    padding: 20px;
}

.panel-footer {
    background: #F7FAFC;
    border-top: 1px solid #E2E8F0;
    border-radius: 0 0 8px 8px;
    padding: 15px 20px;
}

/* Botones del modal */
.btn-primary {
    background: #2C5282;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #2A4A7A;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #718096;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    color: #FFFFFF;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #4A5568;
    transform: translateY(-1px);
}
