/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Configuración del body */
.auth-body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    overflow: hidden;
    background: #f8f9fa;
}

/* Contenedor principal */
.auth-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Sección izquierda con imagen */
.auth-image-section {
    flex: 1;
    background: url('../admin_lte/img/fondo.png') center/cover no-repeat,
                linear-gradient(135deg, #1C3FA0 0%, #2165C1 50%, #2A90D6 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.auth-image-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.image-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 40px;
    animation: fadeInLeft 1s ease-out;
}

.brand-content {
    max-width: 400px;
}

.brand-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.brand-logo-small {
    width: 240px;
    height: auto;
    filter: brightness(1.1);
    animation: pulse 2s infinite;
}

.brand-title {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.brand-subtitle {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
    font-weight: 300;
    line-height: 1.5;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
}

.feature-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.feature-item span {
    font-size: 1rem;
    font-weight: 400;
}

/* Sección derecha con formulario */
.auth-form-section {
    flex: 1;
    background: url('../admin_lte/img/fondo.png') center/cover no-repeat, white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.auth-form-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.90) 50%, rgba(255, 255, 255, 0.85) 100%);
    pointer-events: none;
}

.form-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    animation: fadeInRight 1s ease-out;
}

.logo-container {
    text-align: center;
    margin-bottom: 5px;
    padding: 0;
}

.auth-logo {
    max-width: 180px;
    height: auto;
    filter: none;
    transition: all 0.3s ease;
    margin: 0;
}

.auth-logo:hover {
    transform: scale(1.05);
}

/* Estilos del formulario */
.form-content {
    background: linear-gradient(135deg, rgba(28, 63, 160, 0.1) 0%, rgba(59, 188, 226, 0.1) 100%);
    backdrop-filter: blur(15px);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(28, 63, 160, 0.2);
    border: 1px solid rgba(42, 144, 214, 0.3);
}

.welcome-header {
    text-align: center;
    margin-bottom: 20px;
}

.login-box-msg {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    color: #7f8c8d;
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 0;
}

/* Grupos de input */
.form-floating-group {
    margin-bottom: 25px;
    position: relative;
}

.input-group {
    position: relative;
    display: flex;
    margin-bottom: 0;
}

.form-control {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px 0 0 12px;
    font-size: 16px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    outline: none;
    height: 56px;
}

.form-control:focus {
    border-color: #2A90D6;
    background: white;
    box-shadow: 0 0 0 3px rgba(42, 144, 214, 0.1);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

.input-group-append {
    display: flex;
}

.input-group-text {
    padding: 0;
    background: linear-gradient(135deg, #2A90D6, #3BBCE2);
    border: 2px solid #2A90D6;
    border-left: none;
    border-radius: 0 12px 12px 0;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    transition: all 0.3s ease;
}

.input-group:focus-within .input-group-text {
    border-color: #2A90D6;
    transform: translateY(-1px);
}

.input-group-text i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.input-group:focus-within .input-group-text i {
    transform: scale(1.1);
}

/* Opciones del formulario */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    flex-wrap: wrap;
    gap: 15px;
}

.remember-me {
    display: flex;
    align-items: center;
}

.icheck-primary {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icheck-primary input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2A90D6;
    cursor: pointer;
}

.icheck-primary label {
    font-size: 0.95rem;
    color: #495057;
    cursor: pointer;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
}

.forgot-password .btn-link {
    color: #2A90D6;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    padding: 0;
}

.forgot-password .btn-link:hover {
    color: #1C3FA0;
    text-decoration: none;
    transform: translateX(3px);
}

/* Botón de login */
.login-button-container {
    margin: 35px 0 25px 0;
}

.btn-login {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #1C3FA0 0%, #2A90D6 50%, #3BBCE2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(28, 63, 160, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(28, 63, 160, 0.4);
    background: linear-gradient(135deg, #40CFE8 0%, #3BBCE2 50%, #2A90D6 100%);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login i {
    font-size: 1.1rem;
}

/* Footer del login */
.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
    font-weight: 400;
}

.security-note i {
    color: #28a745;
    font-size: 0.9rem;
}

/* Alertas */
.alert {
    border: none;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-info {
    background: rgba(42, 144, 214, 0.1);
    color: #2A90D6;
    border-left-color: #2A90D6;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
    border-left-color: #ffc107;
}

/* Estados de error */
.is-invalid {
    border-color: #e74c3c !important;
    animation: shake 0.5s ease-in-out;
}

.invalid-feedback {
    display: block;
    font-size: 0.85rem;
    color: #e74c3c;
    margin-top: 8px;
    padding-left: 5px;
}

/* Animaciones */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-image-section {
        display: none;
    }
    
    .auth-form-section {
        flex: 1;
        padding: 20px;
        width: 100%;
    }
    
    .form-content {
        padding: 40px 20px;
        max-width: 480px;
        margin: 0 auto;
    }
    
    .auth-logo {
        max-width: 160px;
    }
    
    .brand-title {
        font-size: 2.5rem;
    }
    
    .form-container {
        padding: 15px 20px;
        margin: 5px;
    }
    
    .brand-subtitle {
        font-size: 1rem;
        max-width: 300px;
    }
    
    .brand-logo-small {
        width: 180px;
    }
    
    .features-list {
        margin-top: 20px;
        gap: 15px;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    
    .feature-item {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .forgot-password {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .auth-form-section {
        padding: 15px;
    }
    
    .form-content {
        padding: 25px 15px;
    }
    
    .login-box-msg {
        font-size: 1.5rem;
    }
    
    .auth-logo {
        max-width: 140px;
    }
    
    .btn-login {
        padding: 15px;
        font-size: 1rem;
    }
    
    .form-container {
        padding: 10px 15px;
        margin: 0;
    }
}