html {
    font-size: 14px;
}

/*@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}*/

html {
  position: relative;
  min-height: 100%;
}


html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
}


table {
    border-radius: 5px;
}

    table thead th {
        background-color: #7a5ea9 !important;
        color: #fff !important;
        font-weight: 700 !important;
        white-space: normal !important; /* Permite saltos de lnea */
        word-break: normal; /* No rompe palabras a la mitad */
        overflow-wrap: break-word; /* Solo rompe si es necesario */
        text-align: center; /* Opcional: centra el texto */

        vertical-align: middle; /* Opcional: alinea verticalmente */
    }

    
td > div > .btn {
    padding: 2px 10px !important;
}

.btn {
    padding: 5px 10px;
}

.dtr-details > li {
    margin: 0px !important;
    padding: 2px !important;
    text-align: left !important;
}

/* Child row responsive — chips horizontales para columnas ocultas.
   Reemplaza la lista vertical del renderer default. Ver site.js DataTable.defaults.responsive.details.renderer */
.rsp-hidden-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.25rem 0;
    max-width: 100%;
    box-sizing: border-box;
}
.rsp-chip {
    background: #f4f6f9;
    border: 1px solid #e0e4ea;
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-sizing: border-box;
}
.rsp-chip-lbl {
    color: #6c757d;
    font-weight: 600;
    white-space: nowrap;
}
.rsp-chip-val {
    color: #212529;
}

/* Botón de expand/collapse del plugin Responsive de DataTables — reemplaza el
   triángulo default por un ícono Font Awesome dentro de un botón circular.
   Solo aparece cuando la tabla tiene `.collapsed` (efectivamente hay columnas ocultas). */
table.dataTable > tbody > tr td.dtr-control {
    position: relative;
    cursor: pointer;
    text-align: left !important;
    padding-right: 8px !important;
}
table.dataTable > tbody > tr > td:first-child,
table.dataTable > thead > tr > th:first-child {
    text-align: left !important;
}
table.dataTable.collapsed > tbody > tr > td.dtr-control::before {
    content: "\f054" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 22px !important;
    height: 22px !important;
    margin-right: 8px !important;
    background: #4e9af1 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15) !important;
    font-size: 11px !important;
    line-height: 1 !important;
    top: auto !important;
    left: auto !important;
    box-sizing: border-box;
    transition: background 0.15s ease-in-out, transform 0.15s ease-in-out;
}
table.dataTable.collapsed > tbody > tr > td.dtr-control:hover::before {
    background: #2e7dd7 !important;
    transform: scale(1.08);
}
table.dataTable.collapsed > tbody > tr.parent > td.dtr-control::before,
table.dataTable.collapsed > tbody > tr.dtr-expanded > td.dtr-control::before {
    content: "\f078" !important;
    background: #3dbb7d !important;
}
table.dataTable.collapsed > tbody > tr.parent > td.dtr-control:hover::before,
table.dataTable.collapsed > tbody > tr.dtr-expanded > td.dtr-control:hover::before {
    background: #2f9b62 !important;
}


.homecontent {
    z-index: 10;
    height: calc(100vh - 156px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /*background-color:red;*/
    user-select: none;
}

.userOptionsDark {
    background-color: #7a5ea9;
    border-radius: 5px;
    text-wrap: nowrap;
    min-height: 35px;
}

    .userOptionsDark:hover {
        background-color: #8b6fbd;
    }

.userOptionsLight {
    background-color: #ddd;
    border-radius: 5px;
    text-wrap: nowrap;
    min-height: 35px;
}

    .userOptionsLight:hover {
        background-color: #ccc;
    }

.userOptionsClear {
    border-radius: 5px;
    text-wrap: nowrap;
    min-height: 35px;
}

    .userOptionsClear:hover {
        background-color: #eee;
    }

.userOptionsWarning {
    background-color: #ffc107;
    border-radius: 5px;
    margin: 5px 1px;
    font-size: 20px !important;
    font-weight: 700;
    text-wrap: nowrap;
    min-height: 35px;
}

.dtBody {
    overflow-y:scroll !important;
    background-color: #eee;
}

.dtBody tr td{
    vertical-align: middle;
}

/* DataTables 2.x envuelve el título del header en:
     <th><div.dt-column-header><span.dt-column-title>Texto</span></div></th>
   El div es display:flex; con `dt-type-numeric` DT le mete justify-content:
   flex-end. Nuestras clases text-center/text-end deben ganar sobre eso, por
   eso el !important en justify-content. */
table.dataTable thead th.text-center {
    text-align: center !important;
}
    table.dataTable thead th.text-center .dt-column-header {
        justify-content: center !important;
    }
    table.dataTable thead th.text-center .dt-column-title {
        text-align: center !important;
    }

table.dataTable thead th.text-end {
    text-align: right !important;
}
    table.dataTable thead th.text-end .dt-column-header {
        justify-content: flex-end !important;
    }
    table.dataTable thead th.text-end .dt-column-title {
        text-align: right !important;
    }

.selectize-input {
    /*min-width: 250px;*/
    padding-right: 30px;
    padding-top: 7px;
    padding-bottom: 6px;
}

/* Hace que selectize ocupe el ancho correcto dentro del input-group */
.input-group .selectize-control {
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

    .input-group .selectize-control .selectize-input {
        height: calc(2.25rem + 2px);
        padding: .375rem .75rem;
    }

/* Evita que el texto largo rompa el layout */
.selectize-input > div {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Selectize deshabilitado: el default aplica opacity 0.5 en el wrapper y
   fondo gris muy claro con texto tenue. Para selects que se deshabilitan
   pero mantienen su valor visible (Match: HC / SIGES elegidos), subimos el
   contraste. Se necesita !important porque selectize.css usa reglas de
   mayor especificidad. */
.selectize-control.disabled,
.selectize-control.disabled .selectize-input,
.selectize-input.disabled {
    opacity: 1 !important;
    background-color: #e9ecef !important;
    color: #495057 !important;
}

    .selectize-control.disabled .selectize-input > .item,
    .selectize-control.disabled .selectize-input > input,
    .selectize-input.disabled > .item,
    .selectize-input.disabled > input {
        color: #495057 !important;
        opacity: 1 !important;
    }


.row > dl > dd, .row > dl > dt {
    margin: 0px !important;
    padding: 2px 5px 2px 5px;
}

.option.selected {
    background-color: #efb916;
    color: #000;
    font-weight: 700;
}

.btn, .input-group-text {
    padding: 5px 10px;
}

.csPanel {
    color: #000 !important;
    padding: 5px 5px 5px 5px;
    display: inline-block;
    background-color: #ffc107;
    cursor: pointer;
    user-select: none;
    width: 100%;
}

    .csPanel:hover {
        background-color: #efb916;
    }


.user-panel .image {
    padding-left: .5rem;
    padding-top: .3rem;
}

.bg-Main {
    background: url(../img/background.jpg);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}

    .bg-Main::before {
        content: "";
        position: absolute;
        inset: 0;
        background-color: rgba(255, 255, 255, 0.6); /* negro con 50% de opacidad */
        z-index: 0;
    }

.content-wrapper {
    background-color:transparent !important;
}

main {
    padding: 10px;
    background-color: rgb(255,255,255,.4);
    border-radius: 5px;
    overflow-x: hidden;
    overflow-y: auto;
    height: calc(100vh - 130px);
}

p {
    font-size: 20px;
    font-weight: 300;
    color: #000;
}

    p.custom {
        font-size: 20px;
        font-weight: 300;
        color: #838383;
    }

strong {
    color: #000;
    font-weight: 500
}

.user-panel {
    border-bottom: 0px solid #4f5962 !important;
    vertical-align: middle !important;
}

.sidebar {
    height: calc(100vh - 70px);
}

.sidebar-dark-custom, .brand-link {
    background: linear-gradient(170deg, #9070c8 0%, #7a5ea9 45%, #5a3d8a 100%);
}

    .sidebar-dark-custom a {
        text-decoration: none;
        color: #ddd;
        font-weight: 500;
        font-size: medium;
    }

    .sidebar-dark-custom p {
        text-decoration: none;
        color: #ddd;
        font-weight: 500;
        font-size: medium;
    }

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    color: #fff;
    background-color: #8b6fbd;
    border-color: #7a5ea9;
}

.nav-treeview > .nav-item > .nav-link.active {
    background-color: #e2e8f5 !important;
    color: #444 !important;
}

    .nav-treeview > .nav-item > .nav-link.active p {
        color: #444 !important;
        font-weight: 700;
    }

.custom-pills > .nav-item > .nav-link:hover {
    background-color: lightblue !important;
    color: #444 !important;
}

.custom-pills > .nav-item > .nav-link.active {
    background-color: #7a5ea9 !important;
    color: white !important;
}

tbody > tr:hover {
    background-color: #ccc !important;
}

tbody tr td {
    padding: 3px 5px !important;
}

.brand-link {
    height: 50px;
}

    .brand-link .brand-image {
        float: none !important;
    }

.main-sidebar,
.main-sidebar .brand-link {
    transition: width 0.2s ease !important;
}

/* ── Delay al expandir el sidebar minimizado ─────────────────────────
   Al colapsar es inmediato, al expandir espera 0.5s para no dispararse
   por hovers accidentales al pasar el mouse cerca del borde. */
body.sidebar-collapse .main-sidebar:hover,
body.sidebar-collapse .main-sidebar:hover .brand-link {
    transition: width 0.2s ease 0.5s !important;
}

.main-sidebar {
    overflow: hidden;
}

.main-sidebar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    -webkit-mask-image: radial-gradient(ellipse 120% 80% at 50% 100%, #000 50%, transparent 90%);
    mask-image: radial-gradient(ellipse 120% 80% at 50% 100%, #000 50%, transparent 90%);
    pointer-events: none;
    z-index: 0;
}

.main-sidebar .sidebar {
    position: relative;
    z-index: 1;
}

.nav-sidebar > .nav-item {
    position: relative;
}

.nav-sidebar > .nav-item > .nav-link {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    margin: 2px 6px;
}

.nav-sidebar .nav-treeview .nav-item .nav-link {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin: 1px 10px;
}

.nav-sidebar > .nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 90%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Breadcrumb colors */
.navbar-light .breadcrumb-item a {
    color: #7a5ea9;
}
.navbar-light .breadcrumb-item a:hover {
    color: #5a3d8a;
}
.navbar-dark .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.85);
}
.navbar-dark .breadcrumb-item a:hover {
    color: #fff;
}
.navbar-dark .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.65);
}
.navbar-dark .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.4);
}

/* Menu group left-border accent */
.nav-grp-procesos,
.nav-grp-procesos.active  { border-left: 3px solid #4e9af1 !important; }
.nav-grp-mant,
.nav-grp-mant.active      { border-left: 3px solid #3dbb7d !important; }
.nav-grp-config,
.nav-grp-config.active    { border-left: 3px solid #f0913a !important; }
.nav-grp-reportes,
.nav-grp-reportes.active  { border-left: 3px solid #9b59b6 !important; }
.nav-grp-soporte,
.nav-grp-soporte.active   { border-left: 3px solid #e74c3c !important; }
.nav-grp-inventario,
.nav-grp-inventario.active { border-left: 3px solid #1abc9c !important; }
.nav-grp-seguridad,
.nav-grp-seguridad.active { border-left: 3px solid #d4ac0d !important; }

/* Rojo más saturado que .text-danger de Bootstrap (#dc3545) — usado para marcar
   valores que pertenecen a ciclos Dynamics cerrados (REVERSADO / CERRADO_MANUAL)
   en los listados de HC y SIGES. */
.text-danger-strong {
    color: #e60000 !important;
    font-weight: 600;
}

.w-80 {
    width: 80%;
}

.w-90 {
    width: 90%;
}

.w-95 {
    width: 95%;
}

.maxw-100 {
    max-width: 100px;
    text-align: center;
}

.w-100 {
    width: 100px;
    text-align: center;
}

.maxw-200 {
    width: 200px !important;
    text-wrap: pretty;
}

.maxw300-nowrap {
    min-width: 300px !important;
    text-wrap: balance;
}

.maxw600-nowrap {
    min-width: 600px !important;
    text-wrap: balance;
}

@media only screen and (max-width: 800px) {
    .btn span {
        display: block
    }

    .wresp-col {
        width: 600px !important;
        text-wrap: balance;
    }

    .cierresContainer {
        height: 100%;
    }

    .validContainer {
        height: 100%;
    }

    .img-responsive {
        width: calc(100vw - 50px) !important;
    }

    .rotate90 {
        height: calc(100vw - 50px) !important;
    }

    /* ── DataTables full-width en móvil ────────────────────────────
       El patrón standard usa <div class="overflow-auto border rounded p-3">
       como wrapper; el `p-3` (1rem cada lado) + el padding de <main>
       (10px cada lado) roban ~52px del ancho útil de la pantalla,
       recortando la tabla y forzándola a scroll horizontal cuando
       podría caber a lo ancho. Solo el wrapper de la tabla se
       estira a full-width con márgenes negativos; el resto del
       contenido (título, botones de acción) mantiene su padding. */
    .content-wrapper > main .overflow-auto {
        margin-left: -10px !important;
        margin-right: -10px !important;
        padding: 0.25rem !important;
        border-left: 0 !important;
        border-right: 0 !important;
        border-radius: 0 !important;
    }

    /* El wrapper interno que crea DataTables (.dataTables_wrapper) queda
       sin margen extra y el <table> se estira al 100% del contenedor. */
    .dataTables_wrapper,
    table.dataTable {
        width: 100% !important;
    }
}

@media only screen and (min-width: 800px) {
    .wresp-col {
        width: 600px !important;
        text-wrap: nowrap;
    }

    .cierresContainer {
        height: calc(100vh - 220px);
    }

    .validContainer {
        height: calc(100vh - 180px);
    }

    .buttons-colvis {
        width: 50px;
        height: 32px;
    }
}

/* Navigation Options Horizontal*/

.navigation-options {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 6px 15px;
    margin-bottom: 5px;
    text-wrap: nowrap;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

    .navigation-options a {
        display: block;
        width: 300px;
    }

    .navigation-options .nav-label {
        display: inline-block;
        padding: .40em .65em;
        font-size: 1.1em;
        font-weight: 600;
        line-height: 1;
        color: #000;
        text-align: center;
        white-space: nowrap;
        vertical-align: baseline;
        border-radius: .25rem;
        background-color: #e9ecef;
        margin-right: 5px;
    }

    .navigation-options a, .navigation-options div, .navigation-options button {
        margin-right: 5px !important;
        width: fit-content !important;
        -ms-flex-wrap: nowrap !important;
        flex-wrap: nowrap !important;
    }

        .navigation-options div select {
            width: fit-content !important;
        }

        .navigation-options div .input-group-text {
            -moz-user-select: none;
            -ms-user-select: none;
            -webkit-user-select: none;
            user-select: none;
        }

/* Navigation Options Vertical*/

.navigation-options-v {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 6px 10px;
    margin-bottom: 5px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
}

    .navigation-options-v a {
        display: block;
        width: fit-content !important;
        margin-bottom: 5px;
    }

pre {
    height: 50vh; /* Altura del 50% de la ventana */
    overflow: auto; /* Permite el desplazamiento */
    padding: 0px !important;
    background-color: #e3e3e3;
    border-radius: 5px;
    word-wrap: break-word; /* Rompe las palabras largas */
    position: relative;
    padding-left: 4em !important; /* Espacio para los nmeros de lnea */
}

code {
    background-color: #e3e3e3 !important;
    padding: 0px !important;
    padding-left: 5px !important;
    display:contents !important;
}

.line-numbers {
    background-color: #d3d3e3;
    position: absolute;
    left: 0;
    top: 0;
    width: 4em;
    padding: 1px 3px;
    text-align: right;
    user-select: none;
    pointer-events: none;
    color: #888;
}

.hidden {
    display: none;
}

.highlight {
    background-color: yellow;
}

.form-switch .form-check-input {
    margin-left: -24px !important;
    padding: 0px !important;
    width: 30px !important;
    height: 20px !important;
}

.form-switch .form-check-input:checked {
    background-position: right center;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

:root {
    --dt-row-selected: 125, 125, 125;
}

.rotate90 {
    height: 600px;
}

img {
    margin:0 !important;
    padding:0 !important;
}

.img-container {
    text-align:center;
    padding:0 !important;
}

#pnlLeft,
#pnlRight {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: auto;
}

#splitContainer {
    display: flex;
    flex-direction: column; /* cambia a row en pantallas grandes */
    width: 100%;
}

.gutter {
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
    cursor: col-resize;
}
    .gutter:hover {
        background-color: #e0a800; /* color ms oscuro al pasar el mouse */
    }

.badge-pill {
    font-size: 0.85em !important;
}

.ReportPanel {
    height: calc(100vh - 260px);
}

table.dataTable > tbody > tr.selected a.btn {
    color: inherit !important;
}

.edm-table {
    border: 1px solid #6c757d; /* Bootstrap primary color */
    border-radius: 0.375rem; /* Bootstrap default rounded */
    padding: 0.5rem; /* Bootstrap p-2 = 0.5rem */
    margin: 0.5rem 0;
}

.dyn-table {
    border: 1px solid #7a5ea9; /* Bootstrap primary color */
    border-radius: 0.375rem; /* Bootstrap default rounded */
    padding: 0.5rem; /* Bootstrap p-2 = 0.5rem */
    background: linear-gradient(135deg, rgba(0, 120, 212, 0.2), rgba(0, 180, 240, 0.2)); /* Degradado con 80% opacidad */
    margin: 0.5rem 0;
}

/* ── Títulos de vista ────────────────────────────────────────────── */
h4.viewTitle {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: -0.3px;
}

h4.viewSubTitle,
h5.viewSubTitle {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 1.2rem;
    letter-spacing: -0.2px;
    color: #333;
}

.fa-bookmark {
    position: relative;
    top: -6px;
    right: -5px;
    font-size: 16px
}

.preview-viewport {
    position: relative;
    overflow: hidden;
    width: 100%;
    /* opcional: para evitar que el body text-center influya raro */
    text-align: left;
    max-height: 100vh;
    min-height: 200px; /* opcional */
}

    .preview-viewport .js-preview-img {
        display: block; /* elimina espacio inline */
        margin: 0 auto; /* si quer�s centrado visual cuando no hay transform */
        transform-origin: 0 0;
        touch-action: none; /* importante para pointer events en mobile */
        user-select: none;
    }

.js-preview-img {
    cursor: grab;
    display: block;
    /*    will-change: transform;
    transform-origin: 0 0;*/
}

    .js-preview-img.grabbing {
        cursor: grabbing;
    }

/* ─── Notification bell + Centro de notificaciones panel (estilo Dynamics) ─── */
.notif-container { position: relative; display: inline-block; }
.notif-badge {
    position: absolute; top: -6px; right: -6px;
    background: #dc3545; color: #fff; font-size: 10px; font-weight: 700;
    padding: 1px 5px; border-radius: 10px; line-height: 14px; min-width: 16px; text-align: center;
    border: 2px solid #fff;
}

/* Campana repicando cuando hay notificaciones pendientes. */
@keyframes bell-ring {
     0%   { transform: rotate(0); }
     3%   { transform: rotate(15deg); }
     6%   { transform: rotate(-13deg); }
     9%   { transform: rotate(11deg); }
    12%   { transform: rotate(-9deg); }
    15%   { transform: rotate(7deg); }
    18%   { transform: rotate(-5deg); }
    21%   { transform: rotate(3deg); }
    24%   { transform: rotate(0); }
    100%  { transform: rotate(0); }
}
.bell-ringing {
    display: inline-block;
    transform-origin: top center;
    animation: bell-ring 3s ease-in-out infinite;
}

.notif-panel {
    position: absolute; top: calc(100% + 6px); right: 0;
    width: 380px; max-width: calc(100vw - 20px); max-height: 520px;
    background: #fff; border: 1px solid #dee2e6; border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    z-index: 1050;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.notif-header {
    padding: 10px 14px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}
.notif-body {
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: 400px;
}
.notif-empty {
    padding: 24px 16px;
    text-align: center;
    color: #6c757d;
}
.notif-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f3f5;
    cursor: pointer;
    transition: background 0.1s ease-in-out;
}
.notif-item:hover { background: #f8f9fa; }
.notif-item:last-child { border-bottom: none; }
.notif-item-icon {
    flex: 0 0 auto;
    font-size: 18px;
    padding-top: 2px;
    width: 24px; text-align: center;
}
.notif-item-body {
    flex: 1 1 auto; min-width: 0;
}
.notif-item-title {
    font-weight: 600; color: #212529;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notif-item-time {
    font-size: 11px; color: #6c757d; margin: 2px 0;
}
.notif-item-msg {
    font-size: 13px; color: #495057;
    overflow-wrap: anywhere;
}
.notif-item-close {
    flex: 0 0 auto;
    background: none; border: none; color: #adb5bd;
    padding: 2px 4px; cursor: pointer;
    font-size: 12px;
}
.notif-item-close:hover { color: #dc3545; }
.notif-footer {
    padding: 8px 14px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}
