/* Login Rediseño SKF */

/* Contenedor principal */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F5F8FA;
    padding: 3rem 1rem;
    position: relative;
    min-height: calc(100vh - 76px); /* Altura mínima menos el footer */
    box-sizing: border-box;
}

/* Wrapper principal - contenedor blanco con dos columnas en desktop */
.login-wrapper {
    width: 100%;
    max-width: 1200px;
    background-color: var(--color-white);
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: auto 0; /* Centrado vertical solo en el espacio disponible */
}

/* Columna de imagen (izquierda en desktop) */
.login-image-column {
    display: none;
    min-height: 500px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Columna de formulario (derecha en desktop) */
.login-form-column {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
}

/* Tarjeta de login */
.login-card {
    width: 100%;
    max-width: 100%;
    padding: 0;
    position: relative;
    z-index: 10;
}

/* Logo */
.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #E1E8EE;
}

.login-logo img {
    max-width: 150px;
    height: auto;
}

/* Títulos */
.login-title {
    font-family: 'SKFSans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-black) !important;
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-subtitle {
    font-family: 'SKFSans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-gray-700) !important;
    margin-bottom: 2rem;
    text-align: center;
}

/* Formulario */
.login-form {
    margin-top: 2rem;
}

/* Grupos de formulario */
.login-form-group {
    margin-bottom: 1.5rem;
}

.login-form-label {
    display: block;
    font-family: 'SKFSans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.875rem;
    font-weight: 600 !important;
    color: var(--color-gray-800) !important;
    margin-bottom: 0.5rem;
}

.login-form-input,
.login-form-group input[type="text"],
.login-form-group input[type="email"],
.login-form-group input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #E1E8EE;
    border-radius: 6px;
    font-family: 'SKFSans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.875rem;
    color: var(--color-black) !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.login-form-input:focus,
.login-form-group input[type="text"]:focus,
.login-form-group input[type="email"]:focus,
.login-form-group input[type="password"]:focus {
    outline: none;
    border-color: var(--color-brand-blue);
    box-shadow: 0 0 0 3px rgba(15, 89, 214, 0.1);
}

.login-form-input::placeholder,
.login-form-group input[type="text"]::placeholder,
.login-form-group input[type="email"]::placeholder,
.login-form-group input[type="password"]::placeholder {
    color: #86939E;
}

.login-form-group input.is-invalid {
    border-color: #ED5564;
}

.login-form-group input.is-invalid:focus {
    border-color: #ED5564;
    box-shadow: 0 0 0 3px rgba(237, 85, 100, 0.1);
}

/* Checkbox y link */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.login-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--color-brand-blue);
    cursor: pointer;
}

.login-checkbox-label {
    font-family: 'SKFSans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-gray-800) !important;
    cursor: pointer;
    margin: 0;
}

.login-forgot-link {
    font-family: 'SKFSans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-brand-blue);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.login-forgot-link:hover {
    opacity: 0.8;
    text-decoration: none;
    color: var(--color-brand-blue);
}

/* Botón de login */
.login-button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background-color: var(--color-brand-blue);
    color: var(--color-white);
    border: none;
    border-radius: 6px;
    font-family: 'SKFSans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-button:hover {
    background-color: var(--color-dark-blue);
    color: var(--color-white);
}

.login-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 89, 214, 0.3);
}


/* Mensajes de error */
.login-error {
    background-color: #FEE;
    border: 1px solid #FCC;
    color: #C33;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-family: 'SKFSans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.875rem;
}

/* Mensajes de éxito */
.login-success {
    background-color: #E8F5E9;
    border: 1px solid #81C784;
    color: #2E7D32;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-family: 'SKFSans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.875rem;
}

/* Link de volver al login */
.login-back-link {
    margin-top: 1.5rem;
    text-align: center;
}

.login-back-link .login-forgot-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Desktop - layout de dos columnas */
@media screen and (min-width: 992px) {
    .login-container {
        padding: 4rem 2rem;
        min-height: calc(100vh - 76px);
    }

    .login-wrapper {
        flex-direction: row;
        max-width: 1200px;
        width: 100%;
        min-height: 650px;
        align-items: stretch;
    }

    .login-image-column {
        display: block;
        width: 60%;
        min-height: 650px;
        flex-shrink: 0;
    }

    .login-form-column {
        width: 40%;
        padding: 3rem 2.5rem;
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .login-card {
        max-width: 100%;
        width: 100%;
    }

    /* Logo más grande y alineado a la izquierda en desktop */
    .login-logo {
        justify-content: flex-start;
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .login-logo img {
        max-width: 220px;
        height: auto;
    }

    /* Títulos alineados a la izquierda en desktop */
    .login-title {
        text-align: left;
    }

    .login-subtitle {
        text-align: left;
    }
}

/* Tablet */
@media screen and (min-width: 768px) and (max-width: 991px) {
    .login-card {
        max-width: 500px;
        padding: 3rem;
    }
}

/* Mobile */
@media screen and (max-width: 767px) {
    .login-container {
        padding: 1.5rem 1rem;
        min-height: calc(100vh - 158px);
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    .login-wrapper {
        border-radius: 20px;
        width: 100%;
        margin: 0;
    }

    .login-form-column {
        padding: 2rem 1.5rem;
    }

    .login-logo {
        justify-content: flex-start;
    }

    .login-logo img {
        max-width: 150px;
    }

    .login-title {
        font-size: 1.5rem;
        text-align: left;
    }

    .login-subtitle {
        font-size: 0.8125rem;
        text-align: left;
    }

    .login-options {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }
}

/* Footer en página de login */
#app .skf-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* Ocultar elementos antiguos */
.header-login {
    display: none !important;
}

.page.parallel > .d-flex.row.white {
    display: none !important;
}

.page.parallel {
    display: none !important;
}

.control-sidebar-bg {
    display: none !important;
}
