.left-column, .left-pane {
    overflow: hidden !important;
}
/*header { background: #cacaca; color: #fff; padding: 10px; }
header a { color: #fff; text-decoration: none; margin-right: 10px; }*/

.container {
    padding: 20px;
}

footer.fixed-bottom {
    border: none !important; /* Elimina bordes */
    margin: 0 !important; /* Elimina márgenes externos */
    padding: 10px 0 !important; /* Ajusta el relleno interno a tu gusto */
    height: 40px; /* Altura fija para cálculos */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important; /* Elimina sombras si las hubiera */
}

/* Asegura que el texto dentro del footer no tenga márgenes */
footer .text-center, footer small {
    margin: 0;
    color: #4a5568; /* Color gris corporativo para el texto */
}

.textJustify {
    text-align: justify;
}

/* --- Layout helpers for fixed header/footer --- */
:root {
    --part-header-height: 80px; /* Primera parte del header */
    --header-height: 80px; /* adjust if your header height changes */
    --footer-height: 60px; /* adjust for footer */
}

/* Prevent page content from being hidden under fixed header/footer */
body {
    margin: 0;
    padding: 0;
}

/* ============================
   BCMWeb - DevExtreme tweaks
   ============================ */

/* DevExtreme validation messages: show as plain red text (no tooltip background/border) */
.dx-invalid-message,
.dx-invalid-message .dx-overlay-content {
    color: #dc3545 !important;
    font-weight: 700 !important;
}

.dx-invalid-message .dx-invalid-message-content {
    color: #dc3545 !important;
    font-weight: 700 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.dx-invalid-message .dx-overlay-content {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Custom validation blocks under grids */
.bcm-validation-message {
    display: none;
    margin-top: 6px;
    font-size: 0.875rem;
    line-height: 1.2;
    color: #dc3545;
    font-weight: 700;
}

/* Add vertical spacing between DevExtreme Form items so validation messages fit */
.dx-form .dx-field-item,
.dx-form .dxi-item {
    margin-bottom: 18px;
}

.dx-form .dx-field-item-content {
    padding-bottom: 4px;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

main[role="main"] {
    flex: 1; /* ocupa todo el espacio restante */
    overflow-y: auto; /* solo main maneja scroll */
    padding-top: var(--header-height);
    padding-bottom: var(--footer-height);
}

/* Keep the fixed header above other content */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 80%;
    height: 70px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1500;
    padding: 0 20px;
    box-sizing: border-box;
    margin: auto;
    margin-top: 20px;
    border-radius: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

    .navbar .header-title {
        vertical-align: middle;
        font-size: 16pt;
        font-weight: bold;
        margin: auto 0;
        text-align: center;
    }

    .navbar .navbar-nav {
        margin: auto 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        height: 100%;
        margin: 0;
    }

    .navbar .logo {
        height: 50px;
    }

.nav-item {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-right: 5px;
    border-radius: 30px;
    width: 8rem;
    text-align: center;
    vertical-align: middle;
    height: 50px;
    display: flex;
    align-items: center; /* Centrado vertical */
    justify-content: center; /* Centrado horizontal */
}

.nav-link {
    width: 100%;
    height: 100%;
    display: flex;
    border-radius: 30px;
    align-items: center;
    justify-content: center;
    line-height: 1.2; /* Ajusta el espacio entre líneas para textos largos */
    text-align: center;
    font-size: 0.85rem;
}

    /* 4. Hover corregido (usando la clase del item para evitar saltos) */
    .nav-link:hover {
        background-color: navy;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        color: #fff;
        transition: 0.3s;
        border-radius: 30px;
        font-size: 0.85rem;
        font-weight: bold;
    }

/* Ensure titles are visible and not overlapped */
.PageTitle, h1, h2, .accountHeader {
    position: relative;
    z-index: 1;
    margin-top: 0; /* avoid negative margins */
}

.welcome {
    margin: auto 0;
    display: flex;
    align-items: center;
    height: 100%;
    margin: 0;
    align-content: center;
    justify-content: right;
    margin-right: 20px;
}

.showCompany {
    margin-right: 20px;
    display: flex;
    justify-content: right;
}

    .showCompany .title {
        font-weight: bold;
    }

.selectCompany {
    display: flex;
    justify-content: right;
}

    .selectCompany .select

    @media (max-width: 576px) {
        :root {
            --header-height: 64px;
            --footer-height: 56px;
        }
    }

.main-content {
    margin-top: 90px; /* Altura de tu cinta superior */
    min-height: calc(100vh - 90px - 40px); /* 100vh - header - footer */
    display: flex;
    flex-direction: column;
}

    .main-content > .row {
        flex: 1;
        display: flex;
        align-items: stretch; /* Esto hace que aside y section midan lo mismo */
    }

.main-column {
    padding: 10px 5px !important;
}

/* Columna Izquierda Azul */
.left-column.Azul {
    min-height: 100%; /* Se asegura de estirarse al máximo del row */
    padding-bottom: 50px; /* Espacio para que el contenido no choque con el footer */
}

.company-bar {
    margin-top: var(--part-header-height);
    gap: 10px;
}

/* Login page */
.loginPage {
    /* Eliminamos el margin-top fijo que rompe el centrado */
    margin: 0 auto !important;
    margin-top: 10rem;
    margin-bottom: 10rem;
    /* Forzamos a que ocupe todo el alto de la pantalla */
    min-height: calc(100vh - 10rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Ahora sí centrará verticalmente respecto a 100vh */

    font-family: 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
    box-sizing: border-box;
}

    /* La "Tarjeta" de Login */
    .loginPage form {
        background: #ffffff;
        padding: 40px;
        border-radius: 12px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.05); /* Sombra suave moderna */
        width: 100%;
        max-width: 450px; /* Ancho profesional */
        border: 1px solid #e1e4e8;
    }

/* Cabecera del login */
.accountHeader {
    margin-top: 0rem;
}

    .accountHeader h2 {
        color: #1a202c;
        font-weight: 700;
        font-size: 1.8rem;
        margin-bottom: 10px;
    }

    .accountHeader p {
        color: #718096;
        font-size: 0.95rem;
    }

/* Ajustes para DevExtreme Form */
.dx-form-group-caption {
    display: none; /* Quitamos el título repetitivo dentro del form */
}

.dx-field-item-label-text {
    font-weight: 600 !important;
    color: #4a5568 !important;
    margin-bottom: 8px;
}

/* Inputs más limpios */
.dx-texteditor.dx-editor-outlined {
    border-radius: 8px !important;
    border: 1px solid #cbd5e0 !important;
    transition: all 0.3s ease;
}

.dx-state-focused.dx-editor-outlined {
    border-color: #4299e1 !important; /* Azul corporativo al hacer click */
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15) !important;
}

/* Botones Estilo "Success" y "Danger" Moderno */
.dx-button-mode-contained.dx-button-success, .dx-button-mode-contained.dx-button-danger {
    width: 150px !important;
    height: 45px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    margin: 0 !important; /* IMPORTANTE: Quitamos márgenes para que flexbox funcione bien */
    text-transform: none;
}

/* Botón Cancelar (Izquierda) */
.dx-button-mode-contained.dx-button-danger {
    background-color: #fff !important;
    border: 1px solid #000 !important;
    color: #000 !important;
}

.dx-button-mode-contained.dx-button-danger:hover {
    background-color: #903535 !important;
    border: 1px solid #000 !important;
    color: #fff !important;
}

/* Botón Guardar (Derecha) */
.dx-button-mode-contained.dx-button-success {
    background-color: #fff !important;
    color: #000 !important;
    border: 1px solid #000 !important;
}

    .dx-button-mode-contained.dx-button-success:hover {
        background-color: navy !important;
        color: #fff !important;
        border: 1px solid #000 !important;
    }

.dx-button-mode-contained .dx-icon {
    color: #000 !important;
}

.dx-button-mode-contained.dx-button-success:hover .dx-icon, .dx-button-mode-contained.dx-button-danger:hover .dx-icon {
    color: #fff !important;
}

/* Ajuste para el botón de ver contraseña */
.dx-texteditor-buttons-container .dx-button {
    color: #718096 !important;
}

/* Dashboard */
/*     .dashboard-modules {
            margin-top: 40px;
        }
     */
.dx-cardview .dx-card {
    height: 100% !important;
    min-height: 260px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

    .dx-cardview .dx-card .dx-card-content,
    .dx-cardview .dx-card > .dx-template-wrapper {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
    }

.dx-cardview .dx-scrollable-wrapper {
    overflow: visible;
}

/* Module Cards*/

/* Contenedor principal de la tarjeta */
.Module_card {
    display: flex;
    flex-direction: column;
    height: 280px; /* Altura fija para que todas sean IGUALES */
    background: #fff;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    position: relative;
    overflow: hidden; /* Corta cualquier cosa que se salga */
    box-sizing: border-box;
    padding: 0; /* Asegúrate de que la tarjeta NO tenga padding global */
}

/* Cuerpo horizontal (Imagen + Textos) */
.card-body-horizontal {
    display: flex;
    flex-direction: row;
    padding: 15px;
    gap: 15px;
    flex: 1; /* Ocupa todo el espacio arriba del botón */
    min-height: 0; /* Permite que los hijos tengan scroll */
}

/* Contenedor de Textos (Título + Descripción) */
.Module_card .text-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0; /* Evita que el texto rompa el layout */
}

    .Module_card .text-container .title {
        justify-content: center;
        text-align: center;
        height: 40px;
    }

    /* Descripción con Scroll Fijo */
    .Module_card .text-container .content {
        font-size: 0.85rem;
        color: #666;
        text-align: justify;
        overflow-y: auto; /* Scroll vertical activado */
        padding-right: 5px;
        flex: 1; /* Se estira para llenar el espacio */
        height: 100%;
    }

        /* Personalización del Scrollbar (Más fino) */
        .Module_card .text-container .content::-webkit-scrollbar {
            width: 4px;
        }

        .Module_card .text-container .content::-webkit-scrollbar-thumb {
            background: #ccc;
            border-radius: 4px;
        }

/* Título Adaptable (Recursivo) */
.Module_card .title h5 {
    margin: 0 0 8px 0;
    font-weight: bold;
    color: #333;
    /* Texto que se ajusta: mín 14px, ideal 1vw, máx 18px */
    font-size: clamp(14px, 1vw, 18px);
    line-height: 1.2;
}

/* Footer (Botón Azul) */
.card_footer {
    width: 100%;
    margin-top: auto; /* Asegura que esté al fondo */
    padding: 0; /* IMPORTANTE: Elimina cualquier espacio interno */
    line-height: 0; /* Elimina espacios residuales de elementos inline-block */
}

.module-card-btn {
    display: block;
    background-color: white;
    color: #000;
    margin: 0; /* Elimina márgenes externos */
    border-left: none; /* Evita que el borde del botón choque con el de la tarjeta */
    border-right: none;
    border-bottom: none;
    border: 1px solid #e1e4e8;
    border-radius: 0px 0px 8px 8px;
    width: 100%;
    padding: 12px;
    font-weight: bold;
    text-align: right;
    cursor: pointer;
    transition: background 0.3s;
}

    .module-card-btn:hover {
        background-color: navy;
        color: #fff;
        border: 1px solid navy;
        border-radius: 0px 0px 8px 8px;
    }

/* Spinner overlay */
.spinner-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(255,255,255,0.7);
    z-index: 9999;
    display: none; /* oculto por defecto */
    justify-content: center;
    align-items: center;
}

    .spinner-overlay.show {
        display: flex; /* visible cuando se añade la clase */
    }


.groupCaption {
    font-weight: bold;
    margin-bottom: 20px;
    width: 100%;
}

/* DataGrid Devexpress */
.header-sin-padding.dx-datagrid-headers .dx-datagrid-text-content {
    padding: 0 !important;
}

.dx-column-indicators {
    float: unset !important;
}

.dx-datagrid-action.dx-cell-focus-disabled {
    text-align: center !important;
    vertical-align: middle !important;
}