/* Login Moderno - Inspirado en React */
body, html {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    background: #101522 !important;
    overflow: hidden;
}

.login-moderno {
    background: #101522 !important;
}

.login-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    z-index: 2;
    position: relative;
    flex-direction: row;
    overflow: hidden;
    background: #101522;
}

.login-background {
    flex: 0 0 60%;
    width: 60vw;
    height: 100vh;
    background-image: url('../img/LogoFondo.jpg');
    background-size: cover;
    background-position: center;
    filter: brightness(0.85);
    display: block;
}

.login-form-container {
    flex: 0 0 40%;
    width: 40vw;
    min-width: 420px;
    max-width: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #101522;
    height: 100vh;
    padding: 0;
    box-sizing: border-box;
    position: relative;
}

.login-card {
    background: #f5f6fa;
    border-radius: 20px;
    padding: 36px 36px 32px 36px;
    width: 100%;
    max-width: 800px;
    min-width: 320px;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
    position: relative;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    justify-content: flex-start;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    pointer-events: none;
    box-shadow: 0 0 0 3px rgba(173, 255, 255, 0.35);
    filter: blur(2px);
    z-index: 1;
}

.login-header {
    text-align: center;
    margin-bottom: 5px;
}

.login-avatar {
    width: 55px;
    height: 55px;
    background: #1976d2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    color: white;
    font-size: 32px;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1976d2;
    margin: 0;
}

.login-form {
    position: relative;
    width: 90%;
    z-index: 2;
}

.form-group {
    margin-bottom: 5px;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.form-control-moderno {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 45px;
    padding: 8px 40px 8px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    box-sizing: border-box;
    display: block;
    margin: 0 auto;
}

.form-control-moderno:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.form-control-moderno.error {
    border-color: #d32f2f;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.form-control-moderno.valid {
    border-color: #388e3c;
    box-shadow: 0 0 0 3px rgba(56, 142, 60, 0.1);
}

.input-icon {
    position: absolute;
    right: 20px;
    top: 50px;
    transform: translateY(-50%);
    color: #666;
    z-index: 3;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    pointer-events: none;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    z-index: 3;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 32px;
    padding-top: 30px;
    line-height: 40px;
}

.password-toggle:hover {
    color: #1976d2;
}

.error-message {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 4px;
    display: none;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.password-strength {
    font-size: 11px;
    margin-top: 4px;
    font-weight: 600;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-login-moderno {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.btn-login-moderno:hover {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(25, 118, 210, 0.3);
}

.btn-login-moderno:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

.btn-login-moderno:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.checkbox-container {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

.checkbox-moderno {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: #1976d2;
}

.checkbox-label {
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
}

.link-registro {
    text-align: center;
    margin-top: 20px;
}

.link-registro a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.link-registro a:hover {
    color: #1565c0;
    text-decoration: underline;
}

@media (max-width: 1200px) {
    .login-form-container {
        min-width: 380px;
    }
    
    .login-card {
        padding: 30px 30px 25px 30px;
    }
}

@media (max-width: 991px) {
    .login-background {
        display: none;
    }
    
    .login-form-container {
        flex: 1;
        width: 100vw;
        min-width: 320px;
        max-width: none;
    }
    
    .login-container {
        flex-direction: column;
    }
    
    .login-card {
        max-width: 450px;
        margin: 20px auto;
    }
}

@media (max-width: 600px) {
    .login-form-container {
        padding: 10px;
    }
    
    .login-card {
        padding: 25px 20px 20px 20px;
        border-radius: 15px;
    }
    
    .login-container {
        height: auto;
        min-height: 100vh;
    }
    
    .login-form {
        width: 100%;
    }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.6s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.alert-moderno {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    animation: slideInDown 0.3s ease;
}

.alert-success-moderno {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.alert-danger-moderno {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    margin-left: auto;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.alert-close:hover {
    opacity: 1;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efectos adicionales */
.focused .input-icon {
    color: #1976d2;
}

.focused .form-control-moderno {
    border-color: #1976d2;
}

/* Animaciones de entrada */
.form-group {
    animation: slideInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.05s; }
.form-group:nth-child(2) { animation-delay: 0.1s; }
.form-group:nth-child(3) { animation-delay: 0.15s; }
.form-group:nth-child(4) { animation-delay: 0.2s; }
.form-group:nth-child(5) { animation-delay: 0.25s; }
.form-group:nth-child(6) { animation-delay: 0.3s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efecto ripple para botones */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Scrollbar personalizado */
.login-card::-webkit-scrollbar {
    width: 6px;
}

.login-card::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.login-card::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.login-card::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 