/* src/assets/css/login.css */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--fondo-app);
    padding: 20px;
}

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 900px;
    min-height: 550px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(4, 52, 61, 0.06), 0 1px 3px rgba(0, 0, 0, 0.02);
    border: 1px solid #e2e8f0;
    display: flex;
    overflow: hidden;
}

.login-brand {
    flex: 1;
    background-color: var(--fondo-sidebar);
    padding: 45px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--texto-sidebar);
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 80% 20%, rgba(5, 70, 80, 0.6) 0%, transparent 50%),
        linear-gradient(rgba(4, 52, 61, 0.4) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(90deg, rgba(4, 52, 61, 0.4) 1px, transparent 1px) 0 0 / 24px 24px;
    opacity: 0.4;
    pointer-events: none;
    z-index: 1;
}

.brand-wrapper, .brand-welcome {
    position: relative;
    z-index: 2;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-img {
    width: 42px;
    height: auto;
    object-fit: contain;
}

.brand-text h1 {
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    text-transform: lowercase;
    letter-spacing: 0.5px;
}

.brand-text span {
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 1.2px;
    color: var(--texto-sidebar-muted);
    display: block;
    margin-top: 5px;
}

.brand-welcome {
    font-size: 14px;
    line-height: 1.6;
    color: var(--texto-sidebar-muted);
    font-weight: 300;
    max-width: 290px;
    margin-top: auto;
    border-left: 2px solid var(--menu-activo-fin);
    padding-left: 14px;
}

.login-form-container {
    flex: 1.2;
    padding: 55px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #ffffff;
}

.login-form-container h2 {
    font-size: 26px;
    color: #0f172a;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.form-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 36px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 12px;
    font-weight: 500;
    color: #334155;
    letter-spacing: 0.2px;
}

.password-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-password {
    font-size: 12px;
    color: #054650;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
    align-self: flex-end; 
    margin-top: 4px;  
}

.forgot-password:hover {
    color: var(--linea-activa);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    pointer-events: none;
    z-index: 3;
    filter: invert(71%) sepia(9%) saturate(660%) hue-rotate(178deg) brightness(86%) contrast(84%);
    transition: filter 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper input {
    width: 100%;
    height: 48px;
    padding: 12px 16px 12px 46px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #0f172a;
    background-color: #f8fafc;
    outline: none;
    position: relative;
    z-index: 2;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper input:focus {
    border-color: var(--menu-activo-inicio);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(3, 82, 91, 0.12);
}

.input-wrapper:focus-within .input-icon {
    filter: invert(18%) sepia(76%) saturate(632%) hue-rotate(142deg) brightness(94%) contrast(98%);
}

.input-wrapper input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.btn-login {
    margin-top: 10px;
    height: 48px;
    background: linear-gradient(90deg, var(--menu-activo-inicio), var(--menu-activo-fin));
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(3, 82, 91, 0.25);
    transition: all 0.2s ease;
}

.btn-login img,
.btn-login svg {
    width: 16px;
    height: 16px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-login:hover {
    background: linear-gradient(90deg, var(--menu-activo-fin), var(--menu-activo-inicio));
    box-shadow: 0 6px 20px rgba(3, 82, 91, 0.35);
    transform: translateY(-1px);
}

.btn-login:hover img,
.btn-login:hover svg {
    transform: translateX(4px);
}

.btn-login:active {
    transform: translateY(1px);
}

.btn-login:disabled {
    opacity: 0.85;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.lucide-spin {
    animation: spin 1s linear infinite !important;
    transform: none !important; 
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.shake {
    animation: shakeEffect 0.4s cubic-bezier(.36,.07,.19,.97) both;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

@keyframes shakeEffect {
    10%, 90% { transform: translate3d(-2px, 0, 0); }
    20%, 80% { transform: translate3d(4px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
    40%, 60% { transform: translate3d(6px, 0, 0); }
}

@media (max-width: 768px) {
    .login-card {
        flex-direction: column;
        max-width: 450px;
        min-height: auto;
    }
    
    .login-brand {
        padding: 35px;
        min-height: 180px;
    }

    .login-brand::before {
        background: radial-gradient(circle at 50% 50%, rgba(5, 70, 80, 0.6) 0%, transparent 100%);
    }

    .brand-welcome {
        display: none;
    }

    .login-form-container {
        padding: 35px;
    }
}