.nav-crud {
    --offset-w: 0px;
    --offset-y: 0px;
    --nav-border-radius: var(--variable-2);
    /*border-radius: var(--variable-2);*/
    /*box-shadow: 0 0 10px var(--color-lightgrey);*/
    font-family: Oswald, serif;
    font-size: 1.2em;

    & ul {
        margin: 0;
        padding: 0;
        width: 100%;
        display: flex;
        gap: var(--variable-1);
        justify-content: space-between;
        align-items: baseline;

        opacity: 0;
        animation-name: fadeInCRUD;
        animation-duration: 0.9s;
        animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
        animation-fill-mode: forwards;

        & li {
            flex: 1 1 0;
            min-width: 0;
            background: color-mix(in srgb, var(--color-main) 20%, white);
            box-shadow: 0 0 10px var(--color-lightgrey);
            transition: all 0.3s ease;

            &:hover {
                border-top-left-radius: var(--nav-border-radius);
                border-top-right-radius: var(--nav-border-radius);
            }

            & a {
                width: 100%;
                height: 100%;
                padding: var(--variable-1);
                display: flex;
                justify-content: center;
                transition: all 0.3s ease;
                color: var(--color-main);

                &:hover {
                    padding-top: var(--variable-3);
                }
                & span:not(.material-symbols-outlined) {
                    text-wrap: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                }
            }

            &:first-child:not(.active) {
                border-top-left-radius: var(--nav-border-radius);
                /*border-bottom-left-radius: var(--nav-border-radius);*/
            }

            &:last-child:not(.active) {
                border-top-right-radius: var(--nav-border-radius);
                /*border-bottom-right-radius: var(--nav-border-radius);*/
            }

            &.active {
                border-top-left-radius: var(--nav-border-radius);
                border-top-right-radius: var(--nav-border-radius);
                background: linear-gradient(15deg, rgba(var(--color-main-rgb), 1) 0%, 40%, rgba(var(--color-main-rgb), 0.5) 75%);
                box-shadow: 0 10px 35px -25px var(--color-main);

                & a {
                    padding-top: var(--variable-3);

                    & span {
                        color: var(--color-white);
                    }
                }
            }
        }
    }

}

.border-tab {
    box-shadow: 0 0 35px -25px var(--color-main) inset;
    border-radius: 0 0 var(--variable-2) var(--variable-2);
    position: relative;
}

.pagination li {
    box-shadow: 0 0 10px var(--color-lightgrey);

    & a {
        transition: all 0.3s ease;
    }

    &.active a {
        background: linear-gradient(var(--gradient-linear-45-main)) !important;
    }

    &:not(.active):hover a {
        background: linear-gradient(var(--gradient-linear-45-darkwhite)) !important;
    }
}

.nav-crud-tabs {
    border-radius: var(--nav-border-radius);
    height: 3em;
    overflow: hidden;
    margin: 0 0 var(--variable-1) 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-shadow: 0 5px 5px -5px var(--color-darkgrey);

    & li {
        background: linear-gradient(var(--gradient-linear-45-secondary));
        flex: 1 1 0;
        border-top-left-radius: var(--variable-3);
        border-top-right-radius: var(--variable-3);
    }
    & li.active {
        background: linear-gradient(var(--gradient-linear-45-main));
    }
    & li a {
        width: 100%;
        height: 100%;
        padding: var(--variable-2);
        color: white;
        cursor: pointer;
        display: block;
    }

}

.form-control-table {
    width: 100%;
    margin: 0;
    border: 1px solid rgba(0,0,0,0);
    background-color: rgba(0,0,0,0);
    padding: 0 2px;
}
.form-control-table.form-control-table-editable.editando,
.form-control-table.form-control-table-editable.creando {
    border: lightgray solid 1px;
    border-radius: 5px;
    background-color: rgba(255,255,255,255);
}
.form-control-table.form-control-table-editable:not(.editando,.creando),
.form-control-table.form-control-table-no-editable {
    pointer-events: none;
    user-select: none;
    appearance: none;
}

.crud-view{
    border: none !important;
    cursor: default !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /*
    No me hace caso al :focus, es lo que hay
    PD: Son aprox 3650 años
    */
    transition: background-color 1000000000000s !important;
    &:is([type="checkbox"]){
        display: none;
        position: relative;
        &::before ~ span{
            display: flex !important;
            opacity: 1 !important;
            position: absolute !important;
        }
        &:checked ~ .si{
            display: block !important;
            &:before{
                content: ' ';
                position: absolute;
                top: 0;
                left: 0;
                width: 1.5em;
                height: 1.5em;
                transform: translateX(-25%);
                border: var(--color-lightgrey) 2px solid;
            }
        }

        &:not(:checked) ~ .no{
            display: block !important;
            &:before{
                content: '‎';
                position: absolute;
                top: 0;
                left: 0;
                width: 1.5em;
                height: 1.5em;
                transform: translateX(-25%);
                border: var(--color-lightgrey) 2px solid;
            }
        }
    }
    &:not(.textarea){
        overflow: hidden !important;
        text-overflow: ellipsis;
    }
    &.input-buscador{
        height: auto !important;
        padding: 0 !important;
        & input:not(input[id$="_search"]){
            display: flex !important;
            padding: 0 !important;
            margin: 0 !important;
            text-align: center;
            border-right: var(--color-border, var(--color-lightgrey)) 2px solid;
        }
        & input[id$="_search"]{
            border: none !important;
            cursor: default !important;
        }
    }
    &:focus{
        background-color: var(--dark-white) !important;
    }
}

.crud-label{
    position: relative;
    white-space: nowrap;
    display: flex;
    flex-wrap: nowrap;
    &:is(label:has(+ div .parsley-error)){
        color: var(--color-danger) !important;
    }
    & .crud-label-text {
        display: flex;
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
label:has( .checkmark){
    cursor: pointer;
}
div:has(>.parsley-error){
    animation: error-pulse 1.5s linear infinite;
}
@keyframes error-pulse {
    0% {
        box-shadow:
                0 0 0 2px var(--color-danger),
                0 0 0 0px rgba(var(--color-danger-rgb), 0.7);
    }
    70% {
        /* La onda se expande y se desvanece */
        box-shadow:
                0 0 0 2px var(--color-danger),
                0 0 0 10px rgba(var(--color-danger-rgb), 0);
    }
    100% {
        box-shadow:
                0 0 0 2px var(--color-danger),
                0 0 0 0px rgba(var(--color-danger-rgb), 0);
    }
}
.crud-line:not(td):not(th) {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5px;
    &:not(.fake-label){
        margin-top: 5px;
    }
    &>div, &>input, &>select, &>textarea{
        flex: 1;
    }
}
.fake-label {
    margin-top: calc(25px);
}


/*CTX LISTAR*/
#ctxtListar{

}
.pt-ctxListar{
    padding-top: var(--variable-2) !important;
}
.crud-table{
    --color-table: var(--color-darkwhite)
}
.crud-table-header{
    & tr {
        background: none !important;
    }
    & th{
        position: relative;
        padding:  var(--variable-2) !important;
        font-weight: bold;
        font-size: 14px;
        white-space: nowrap;
        text-overflow: ellipsis;
        top: 0;
        background: var(--color-table) !important;

        color: var(--color-main);
        &:first-of-type{
            width: 0px;
            border-radius: var(--variable-2) 0 0 var(--variable-2);
        }
        &:not(:nth-child(1 of .crud-table-cell)):not(.crud-table-void):before{
            content: "";
            border-left: var(--color-main) 1px solid;
            position: absolute;
            width: 100%;
            height: 60%;
            top: 50%;
            left: 0;
            transform: translateY(-50%);
        }
        &:last-of-type{
            border-radius: 0 var(--variable-2) var(--variable-2) 0;
        }
    }
}
.crud-table-content{

}
.crud-table-row{
    position: relative;
    font-weight: 400;
    color: black;
    background: none;
    &:not(.crud-anulado) td:first-of-type{
        background: var(--color-table) !important;
        /*border-top: var(--color-table) 1px solid !important;*/
        color: var(--white);
        height: 100%;
    }
    &.crud-anulado td:first-of-type{
        background: var(--color-darkdanger) !important;
        border-top: var(--color-darkdanger) 1px solid !important;
        color: var(--white);
        height: 100%;
    }
    & td:not(:first-of-type){
        transition: box-shadow .5s, color .5s;
    }
    &.crud-anulado td:not(:first-of-type):before{
        content: '';
        background-color: var(--color-white);
        height: 2px;
        position: absolute;
        top: 50%;
        transition: transform .5s;
    }
    &:nth-of-type(even):not(.crud-anulado):hover{
        & td:not(:first-of-type) {
            box-shadow:
                /* Hacia abajo*/
                    rgba(var(--color-lightinfo-rgb), 1) 0px 5px inset,
                    rgba(var(--color-lightinfo-rgb), 0.5) 0px 10px inset,
                    rgba(var(--color-lightinfo-rgb), 0.25) 0px 15px inset,
                        /* Hacia arriba*/
                    rgba(var(--color-lightinfo-rgb), 1) 0px -5px inset,
                    rgba(var(--color-lightinfo-rgb), 0.5) 0px -10px inset,
                    rgba(var(--color-lightinfo-rgb), 0.25) 0px -15px inset;
        }
    }
    &:nth-of-type(odd):not(.crud-anulado):hover{
        & td:not(:first-of-type) {
            box-shadow:
                /* Hacia abajo*/
                    rgba(var(--color-lightgrey-rgb), 0.3) 0px 5px inset,
                    rgba(var(--color-lightgrey-rgb), 0.15) 0px 10px inset,
                    rgba(var(--color-lightgrey-rgb), 0.05) 0px 15px inset,
                        /* Hacia arriba*/
                    rgba(var(--color-lightgrey-rgb), 0.3) 0px -5px inset,
                    rgba(var(--color-lightgrey-rgb), 0.15) 0px -10px inset,
                    rgba(var(--color-lightgrey-rgb), 0.05) 0px -15px inset;
        }
    }
    &:hover{
        & td:not(:first-of-type) {
            color: var(--color-main) !important;
        }
        &.crud-anulado{
            background-color: var(--color-danger) !important;
            & td:not(:first-of-type) {
                box-shadow:
                    /* Hacia abajo*/
                        rgba(var(--color-lightdanger-rgb), 0.3) 0px 5px inset,
                        rgba(var(--color-lightdanger-rgb), 0.15) 0px 10px inset,
                        rgba(var(--color-lightdanger-rgb), 0.05) 0px 15px inset,
                            /* Hacia arriba*/
                        rgba(var(--color-lightdanger-rgb), 0.3) 0px -5px inset,
                        rgba(var(--color-lightdanger-rgb), 0.15) 0px -10px inset,
                        rgba(var(--color-lightdanger-rgb), 0.05) 0px -15px inset;
            }
            & td:before{
                transform: translateY(10px);
            }
        }
    }
}
.crud-table-row:last-of-type td:first-of-type{
    border-radius: 0 0 0 var(--variable-2);
}
.crud-table-row:nth-of-type(even):not(.crud-anulado){
    background-color: rgba(var(--color-lightinfo-rgb), .2) !important;
}
.crud-anulado{
    background-color: var(--color-danger);
    color: var(--color-white);
}
.crud-table-group{
    & td{
        background: var(--color-table) !important;
        color: var(--color-main);
        padding-left: var(--variable-2) !important;
        &:first-of-type{
            &:not(.crud-table-groupend>td){
                border-radius: var(--variable-2) 0 0 0 !important;
            }
            &:is(.crud-table-groupend>td){
                border-radius: 0 0 0 var(--variable-2) !important;
            }
        }
        &:last-of-type{
            &:not(.crud-table-groupend>td){
                border-radius: 0 var(--variable-2) 0 0 !important;
            }
            &:is(.crud-table-groupend>td){
                border-radius: 0 0 var(--variable-2) 0 !important;

            }
        }
    }
}
@media (min-width: 767px) {
    .w-imagen-crud{
        max-width: 150px;
        height: 50px;
    }
}
@media (max-width: 767px) {
    .w-imagen-crud{
        max-width: 50px;
        height: 15px;
    }
    .dataview.w-5    { width: calc( 50% - var(--offset-w)); }
    .dataview.w-10   { width: calc( 50% - var(--offset-w)); }
    .dataview.w-15   { width: calc( 50% - var(--offset-w)); }
    .dataview.w-20   { width: calc( 50% - var(--offset-w)); }
    .dataview.w-25   { width: calc( 50% - var(--offset-w)); }
    .dataview.w-30   { width: calc( 100% ) }
    .dataview.w-35   { width: calc( 100% ) }
    .dataview.w-40   { width: calc( 100% ) }
    .dataview.w-45   { width: calc( 100% ) }
    .dataview.w-50   { width: calc( 100% ) }
    .dataview.w-55   { width: calc( 100% ) }
    .dataview.w-60   { width: calc( 100% ) }
    .dataview.w-65   { width: calc( 100% ) }
    .dataview.w-70   { width: calc( 100% ) }
    .dataview.w-75   { width: calc( 100% ) }
    .dataview.w-80   { width: calc( 100% ) }
    .dataview.w-85   { width: calc( 100% ) }
    .dataview.w-90   { width: calc( 100% ) }
    .dataview.w-95   { width: calc( 100% ) }
    .dataview.w-100  { width: calc( 100% ) }

    .dataview.w-1÷7 { width: calc( 50% - var(--offset-w)); }
    .dataview.w-1d7 { width: calc( 50% - var(--offset-w)); }
    .dataview.w-1d8 { width: calc( 50% - var(--offset-w)); }
    .dataview.w-33  { width: calc( 100% ) }
    .dataview.w-66  { width: calc( 100% ) }
    .dataview.w-date { width: calc( 50% - var(--offset-w)); }

}

.bloque-crud, #ctxtListar{
    opacity: 0;
    animation-name: fadeInCRUD;
    animation-duration: 0.9s;
    animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
    animation-fill-mode: forwards;
}

@keyframes fadeInCRUD {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


.dataview{
    position: relative;
    z-index: 1;
}

/** ICONOS **/

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}

.icon-label {
    font-size: 0.85rem;
    color: #6c757d;
    text-align: center;
    word-break: break-word;
}