:root {
    --vz-icon-inline-item: rgba(0, 0, 0, .5) !important
}

[data-layout-mode=dark] {
    --vz-icon-inline-item: #fff !important
}

#datatablepage {
    width: 100% !important
}

#datatablepage_info, #datatablepage_length {
    float: left !important
}

.col-form-label {
    text-align: right !important
}

#datatablepage tbody tr.selected {
    background-color: #404750 !important
}

table.dataTable > tbody > tr.selected > * {
    box-shadow: none !important;
    color: #fff !important
}

table.dataTable tbody tr.selected > .dtfc-fixed-end, table.dataTable tbody tr.selected > .dtfc-fixed-start {
    background-color: #404750 !important;
    color: #fff !important
}

.px-20 {
    padding-right: 20rem !important;
    padding-left: 20rem !important
}

.px-22 {
    padding-right: 22rem !important;
    padding-left: 22rem !important
}

.dt-buttons {
    display: none
}

.select-item {
    margin: 0 3px !important
}

table.dataTable > tbody > tr .list-inline-item i {
    color: var(--vz-icon-inline-item) !important
}

table.dataTable > tbody > tr.selected .list-inline-item i {
    color: #fff !important
}

.alert.hide, [data-preloader=disable] #preloader {
    opacity: 0;
    visibility: hidden
}

*, html {
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1
}

@supports (-webkit-touch-callout:none) {
    ::-webkit-scrollbar {
        width: 12px;
        height: 12px
    }

    ::-webkit-scrollbar-track {
        background: #f1f1f1
    }

    ::-webkit-scrollbar-thumb {
        background-color: #888;
        border-radius: 10px;
        border: 3px solid #f1f1f1
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #555
    }
}

@supports (scrollbar-width:thin) {
    * {
        scrollbar-width: thin;
        scrollbar-color: #888 #f1f1f1
    }
}

@supports (-ms-overflow-style:-ms-autohiding-scrollbar) {
    * {
        -ms-overflow-style: -ms-autohiding-scrollbar
    }
}

.min-width-40 {
    min-width: 40px
}

.alert {
    transition: opacity .5s ease-out, visibility .5s ease-out
}

.choices {
    margin-bottom: 0 !important
}

table.dataTable tbody tr > .dtfc-fixed-end, table.dataTable tbody tr > .dtfc-fixed-start, table.dataTable tfoot tr > .dtfc-fixed-end, table.dataTable tfoot tr > .dtfc-fixed-start, table.dataTable thead tr > .dtfc-fixed-end, table.dataTable thead tr > .dtfc-fixed-start {
    background-color: var(--vz-border-color) !important
}

.dt-orderable-none {
    position: relative !important;
    padding-right: 30px !important;
}

#btn-allways-show:not(:empty),
#btn-one-row:not(:empty),
#btn-multiple-rows:not(:empty) {
    padding: 0.5rem 0.8rem 0.8rem 1rem;
    align-items: center;
    gap: 0.25rem;
    min-height: 44px;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    border-bottom: none;
    margin-bottom: 0;
}

#btn-allways-show:not(:empty) {
    border-top-right-radius: 0;
}

#btn-one-row:not(:empty),
#btn-multiple-rows:not(:empty) {
    border-left: none;
    border-top-left-radius: 0;
}

.d-flex.justify-content-between {
    min-height: 0;
}

.display-none {
    display: none !important
}

.modal-xxl {
    max-width: 1520px
}

.bg-light-subtle {
    background-color: #f9fbfc !important
}

.dt-buttons {
    padding: 1rem 1rem;
}

.dt-length {
    padding: 1rem 1rem;
}

.dt-info {
    padding: 1rem 1rem;
}

.paging_full_numbers {
    padding: 0 1rem 3rem 1rem;
}

.data-choices-sm .choices__inner {
    padding: 0rem 3.6rem 0rem .5rem !important;
    min-height: 28.5px !important;
    font-size: 0.75rem !important;
}

.choices__item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.datatable-check-all {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    box-sizing: border-box;
    margin-top: -6px;
    margin-left: -6px;
    border: 1px solid;
    border-radius: 3px;
    cursor: pointer;
}

.swal2-container, .swal2-html-container, swal2-actions {
    z-index: 1100 !important;
    overflow: visible !important;
}

.flatpickr-calendar {
    z-index: 20000 !important;
}

.choices__list--dropdown {
    z-index: 20000 !important;
}

.swal2-backdrop-show {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.swal2-validation-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 10px;
    margin: 20px 1.5rem 15px 1.5rem;
    font-size: 14px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swal2-custom-swal-popup {
    max-height: 90vh;
    overflow-y: auto;
}

/* Ajustes para pantallas pequeñas */
@media (max-width: 768px) {
    .swal2-custom-swal-popup {
        width: 95% !important;
        max-height: 90vh;
    }
}

.table-responsive {
    overflow-x: hidden;
    overflow-y: hidden;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.table-responsive:hover,
.table-responsive:focus-within {
    overflow-x: auto;
}

/* Estilos para skeletons gruesos */
.skeleton-container {
    overflow: hidden;
    position: relative;
}

.skeleton-line {
    background-color: #e9ecef;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.skeleton-line.thick {
    height: 1.25rem;
}

.skeleton-line.extra-thick {
    height: 2rem;
}

/* Efecto de shimmer más pronunciado */
@keyframes shimmerWave {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.skeleton-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0) 100%);
    animation: shimmerWave 1.5s infinite;
    transform: translateX(-100%);
}

/* Ajustes para cards específicas */
.card-primary .skeleton-line {
    background-color: rgba(13, 110, 253, 0.15);
}

.card-success .skeleton-line {
    background-color: rgba(25, 135, 84, 0.15);
}

.card-danger .skeleton-line {
    background-color: rgba(220, 53, 69, 0.15);
}

.card-warning .skeleton-line {
    background-color: rgba(255, 193, 7, 0.15);
}

/* Estilos para el esqueleto del gráfico */
.chart-skeleton {
    position: relative;
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.skeleton-axis {
    background-color: #e9ecef;
    z-index: 1;
}

.skeleton-grid-line {
    background-color: rgba(0, 0, 0, 0.05);
}

.skeleton-bar {
    position: absolute;
    bottom: 0;
    background-color: #e9ecef;
    border-radius: 4px 4px 0 0;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
    opacity: 0.7;
}

.skeleton-line-graph {
    position: absolute;
    background-color: #e9ecef;
    border-radius: 2px;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
    opacity: 0.7;
}

@keyframes skeleton-pulse {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.9;
    }
    100% {
        opacity: 0.6;
    }
}

/* Efecto de onda para coincidir con los otros skeletons */
.skeleton-bar::after,
.skeleton-line-graph::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0) 100%);
    animation: shimmerWave 1.5s infinite;
    transform: translateX(-100%);
}

.swal-popover-zindex-fix {
    z-index: 9999 !important;
    max-width: 480px !important; /* Evita que sea gigante */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.swal-popover-zindex-fix .popover-body {
    max-height: 540px; /* Scroll si es muy largo */
    overflow-y: auto;
}

.avatar-xs {
    height: 2rem;
    width: 2rem;
}

.avatar-sm {
    height: 3rem;
    width: 3rem;
}

.avatar-title {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #fff;
    font-weight: 600;
}

.bg-soft-primary {
    background-color: rgba(64, 81, 137, 0.1) !important;
    color: #405189 !important;
}

.bg-soft-success {
    background-color: rgba(10, 179, 156, 0.1) !important;
    color: #0ab39c !important;
}

.bg-soft-warning {
    background-color: rgba(247, 184, 75, 0.1) !important;
    color: #f7b84b !important;
}

.bg-soft-danger {
    background-color: rgba(240, 101, 72, 0.1) !important;
    color: #f06548 !important;
}

.bg-soft-info {
    background-color: rgba(41, 156, 219, 0.1) !important;
    color: #299cdb !important;
}

.btn-soft-primary {
    color: #405189;
    background-color: rgba(64, 81, 137, 0.1);
    border: none;
}

.btn-soft-primary:hover {
    color: #fff;
    background-color: #405189;
}

.btn-soft-danger {
    color: #f06548;
    background-color: rgba(240, 101, 72, 0.1);
    border: none;
}

.badge-soft-warning {
    color: #f7b84b;
    background-color: rgba(247, 184, 75, 0.1);
}

.badge-soft-success {
    color: #0ab39c;
    background-color: rgba(10, 179, 156, 0.1);
}

.btn-dashed {
    border: 2px dashed #e9ebec;
    background-color: #fff;
    color: #878a99;
    transition: all 0.3s ease;
}

.btn-dashed:hover {
    background-color: #f3f6f9;
    border-color: #405189;
    color: #405189;
}

.fade-in-animation {
    animation: fadeInRow 0.3s ease-in-out;
}

@keyframes fadeInRow {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.choices__list.choices__list--dropdown {
    z-index: 1050 !important;
    word-break: break-word;
}

thead.sticky-top {
    z-index: 1040 !important;
}

.choices[data-type*=select-multiple] .choices__button, .choices[data-type*=text] .choices__button {
    position: relative;
    display: inline-block;
    margin: 0 -4px 0 8px;
    padding-left: 16px;
    border-left: 1px solid #003642;
    background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);
    background-size: 8px;
    width: 8px;
    line-height: 1;
    opacity: .75;
    border-radius: 0
}

.choices__list--multiple .choices__item {
    display: inline-block;
    vertical-align: middle;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 3.75px;
    margin-bottom: 3.75px;
    background-color: #005f75;
    border: 1px solid #004a5c;
    color: #fff;
    word-break: break-all;
    box-sizing: border-box
}

.choices__list--multiple .choices__item[data-deletable] {
    padding-right: 5px
}

.choices__list--dropdown .choices__item--selectable.is-highlighted::after, .choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after {
    opacity: .5
}

.choices__item {
    cursor: default
}

.choices__item--selectable {
    cursor: pointer
}

.choices__item--disabled {
    cursor: not-allowed;
    -webkit-user-select: none;
    user-select: none;
    opacity: .5
}

.choices__heading {
    font-weight: 600;
    font-size: 12px;
    padding: 10px;
    border-bottom: 1px solid #f7f7f7;
    color: gray
}

.choices__button {
    text-indent: -9999px;
    appearance: none;
    border: 0;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer
}

.choices__button:focus, .choices__input:focus {
    outline: 0
}

.choices__input {
    display: inline-block;
    vertical-align: baseline;
    background-color: #f9f9f9;
    font-size: 14px;
    margin-bottom: 5px;
    border: 0;
    border-radius: 0;
    max-width: 100%;
    padding: 4px 0 4px 2px
}

.choices__input::-webkit-search-cancel-button, .choices__input::-webkit-search-decoration, .choices__input::-webkit-search-results-button, .choices__input::-webkit-search-results-decoration {
    display: none
}

div.dt-button-collection div[role="menu"] {
    max-height: 30vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

#datatable-skeleton-container {
    width: 100%;
    background: #fff;
    z-index: 5;
}

.stimulus-controller-datatable.opacity-100 {
    position: relative;
    z-index: 10;
}

.dtfc-fixed-right{
    position: sticky !important;
    right: 0;
    z-index: 5;
    background: inherit;
}

.dtfc-fixed-right::before{
    content: "";
    position: absolute;
    top: 0;
    height: 100%;
    width: 2px;
    background: inherit;
}

.dataTable tbody td{
    background-clip: padding-box;
}

/* Corrección para NovaShip: Permitir que dropdowns escapen de columnas fijas */
.dataTables_scrollBody,
.dataTables_scrollBody table,
.dtfc-fixed-right,
.dtfc-fixed-left {
    /* Permitir visibilidad de elementos posicionados fuera del contenedor */
    overflow: visible !important;
}

/* Forzar que el menú de Bootstrap esté siempre por encima de las capas de DataTables */
.dropdown-menu.show {
    z-index: 2500 !important;
}

/* Estilo para que el dropdown no se vea transparente sobre la fila seleccionada */
.dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid rgba(0,0,0,.1);
}

div.dt-container div.dt-paging ul.pagination {
    margin-bottom: 10px!important;
}