/*========== GOOGLE FONTS ==========*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

:root {
    --light: #f6f6f9;
    --primary: #1976D2;
    --light-primary: #CFE8FF;
    --grey: #eee;
    --dark-grey: #AAAAAA;
    --dark: #363949;
    --danger: #D32F2F;
    --light-danger: #FECDD3;
    --warning: #FBC02D;
    --light-warning: #FFF2C6;
    --success: #388E3C;
    --light-success: #BBF7D0;
    --header-height: 3.5rem;
    --nav-width: 219px;

    /*========== Colors ==========*/
    --first-color: #6923D0;
    --first-color-light: #F4F0FA;
    --title-color: #19181B;
    --text-color: #58555E;
    --text-color-light: #A5A1AA;
    --body-color: #F9F6FD;
    --container-color: #FFFFFF;

    /*========== Font and typography ==========*/
    --body-font: 'Poppins', sans-serif;
    --normal-font-size: .938rem;
    --small-font-size: .75rem;
    --smaller-font-size: .75rem;

    /*========== Font weight ==========*/
    --font-medium: 500;
    --font-semi-bold: 600;

    /*========== z index ==========*/
    --z-fixed: 100;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    user-select: none;
    text-wrap: balance;

    a {
        color: inherit;
    }

    scroll-padding: 20px;

    &::-webkit-scrollbar {
        width: 10px;
        padding: 5px;
    }

    /* Track */
    &::-webkit-scrollbar-track {
        box-shadow: inset 0 0 5px grey;
        border-radius: 10px;
    }

    /* Handle */
    &::-webkit-scrollbar-thumb {
        background: var(--dark);
        border-radius: 10px;
    }

}

.bx,
.fa {
    font-size: 1.7rem;
}

a {
    text-decoration: none;
}

li {
    list-style: none;
}

html {
    overflow-x: hidden;
}

body.dark {
    --light: #181a1e;
    --grey: #25252c;
    --dark: #fbfbfb
}

body {
    background: var(--grey);
    overflow-x: hidden;
}






@media screen and (min-width: 1024px) {
    :root {
        --normal-font-size: 1rem;
        --small-font-size: .875rem;
        --smaller-font-size: .813rem;
    }
}

/*========== BASE ==========*/
*,
::before,
::after {
    box-sizing: border-box;
}

body {
    margin: var(--header-height) 0 0 0;
    padding: 1rem 1rem 0;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--grey);
    color: var(--dark);
    overflow: visible;
}

h3 {
    margin: 0;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/*========== HEADER ==========*/
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--light);
    box-shadow: 0 1px 0 rgba(22, 8, 43, 0.1);
    padding: 0 1rem;
    z-index: var(--z-fixed);
}

.header__container {
    display: flex;
    align-items: center;
    height: var(--header-height);
    justify-content: space-between;
}

.header__img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
}

.header__logo {
    color: var(--dark);
    font-weight: var(--font-medium);
    display: none;
}

.header__search {
    display: flex;
    padding: .40rem .75rem;
    background-color: var(--light);
    border-radius: .25rem;
}

.header__input {
    width: 100%;
    border: none;
    outline: none;
    background-color: var(--light);
}

.header__input::placeholder {
    font-family: var(--body-font);
    color: var(--dark);
}

.header__icon,
.header__toggle {
    font-size: 1.2rem;
}

.header__toggle {
    color: var(--dark);
    cursor: pointer;
}

/*========== NAV ==========*/
.nav {
    position: fixed;
    top: 0;
    left: -100%;
    height: 100vh;
    padding: 1rem 1rem 0;
    background-color: var(--light);
    box-shadow: 1px 0 0 rgba(22, 8, 43, 0.1);
    z-index: var(--z-fixed);
    transition: .4s;
}

.nav__container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 3rem;
    overflow: auto;
    scrollbar-width: none;
    /* For mozilla */
}

/* For Google Chrome and others */
.nav__container::-webkit-scrollbar {
    display: none;
}

.nav__logo {
    font-weight: var(--font-semi-bold);
    margin-bottom: 2.5rem;
}

.nav__list,
.nav__items {
    display: grid;
}

.nav__list {
    row-gap: 2.5rem;
}

.nav__items {
    row-gap: 1.5rem;
}

.nav__subtitle {
    font-size: var(--normal-font-size);
    text-transform: uppercase;
    letter-spacing: .1rem;
    color: var(--dark);
}

.nav__link {
    display: flex;
    align-items: center;
    color: var(--dark);
}

.nav__link:hover {
    color: var(--primary);
}

.nav__icon {
    font-size: 1.2rem;
    margin-right: .5rem;
}

.nav__name {
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
    white-space: nowrap;
}

.nav__logout {
    margin-top: 5rem;
}

/* Dropdown */
.nav__dropdown {
    overflow: hidden;
    max-height: 21px;
    transition: .4s ease-in-out;
}

.nav__dropdown-collapse {
    background-color: var(--grey);
    border-radius: .25rem;
    margin-top: 1rem;
}

.nav__dropdown-content {
    display: grid;
    row-gap: .5rem;
    padding: .75rem 2.5rem .75rem 1.8rem;
}

.nav__dropdown-item {
    font-size: var(--smaller-font-size);
    font-weight: var(--font-medium);
    color: var(--dark);
}

.nav__dropdown-item:hover {
    color: var(--primary);
}

.nav__dropdown-icon {
    margin-left: auto;
    transition: .4s;
}

/* Show dropdown collapse */
.nav__dropdown:hover {
    max-height: 100rem;
}

/* Rotate icon arrow */
.nav__dropdown:hover .nav__dropdown-icon {
    transform: rotate(180deg);
}

/*===== Show menu =====*/
.show-menu {
    left: 0;
}

/*===== Active link =====*/
.active {
    color: var(--primary);
}

/* ========== MEDIA QUERIES ==========*/
/* For small devices reduce search*/
@media screen and (max-width: 320px) {
    .header__search {
        width: 70%;
    }
}

@media screen and (min-width: 768px) {
    body {
        padding: 1rem 3rem 0 6rem;
    }

    .header {
        padding: 0 3rem 0 6rem;
    }

    .header__container {
        height: calc(var(--header-height) + .5rem);
    }

    .header__search {
        width: 300px;
        padding: .55rem .75rem;
    }

    .header__toggle {
        display: none;
    }

    .header__logo {
        display: block;
    }

    .header__img {
        width: 40px;
        height: 40px;
        order: 1;
    }

    .nav {
        left: 0;
        padding: 1.2rem 1.5rem 0;
        width: 68px;
        /* Reduced navbar */
    }

    .nav__items {
        row-gap: 1.7rem;
    }

    .nav__icon {
        font-size: 1.3rem;
    }

    /* Element opacity */
    .nav__logo-name,
    .nav__name,
    .nav__subtitle,
    .nav__dropdown-icon {
        opacity: 0;
        transition: .3s;
    }


    /* Navbar expanded */
    .nav:hover {
        width: var(--nav-width);
    }

    /* Visible elements */
    .nav:hover .nav__logo-name {
        opacity: 1;
    }

    .nav:hover .nav__subtitle {
        opacity: 1;
    }

    .nav:hover .nav__name {
        opacity: 1;
    }

    .nav:hover .nav__dropdown-icon {
        opacity: 1;
    }
}

main {
    width: 100%;
    max-height: calc(100dvh - 56px);
}

main .header {
    z-index: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    grid-gap: 16px;
    flex-wrap: wrap;
    box-shadow: none;
    background-color: var(--grey);
    padding: 0;
    margin: 0;
}

main .header .left h1 {

    font-size: 26px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary);
}

main .header .left .breadcrumb {
    display: flex;
    align-items: center;
    grid-gap: 16px;
}

main .header .left .breadcrumb li {
    color: var(--dark);
}

main .header .left .breadcrumb li a {
    color: var(--dark-grey);
    /* pointer-events: none; */
}

main .header .left .breadcrumb li a.active {
    color: var(--primary);
    pointer-events: none;
}

.report {
    max-width:  200px;
    height: 36px;
    padding: 0 16px;
    border-radius: 36px;
    background: var(--primary);
    color: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    grid-gap: 10px;
    font-weight: 500;
    cursor: pointer;
}

main .bottom-data {
    display: flex;
    flex-wrap: wrap;
    grid-gap: 24px;
    margin-top: 24px;
    width: 100%;
    color: var(--dark);
    position: relative;
}

main .bottom-data>div {
    border-radius: 20px;
    background: var(--light);
    padding: 24px;
    overflow-x: auto;
    position: relative;
}

main .bottom-data .header {
    display: flex;
    align-items: center;
    grid-gap: 16px;
    margin-bottom: 24px;
    background-color: var(--light);

    &>* {
        color: var(--dark);
    }
}

main .bottom-data .header h3 {
    margin-right: auto;
    font-size: 24px;
    font-weight: 600;

}

main .bottom-data .header .bx,
main .bottom-data .header .fa {
    cursor: pointer;
}

main .bottom-data article {
    width: 100%;
    display: flex;
    align-items: center;
    flex-direction: column;
    grid-gap: 16px;
    margin-bottom: 24px;

    section {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: var(--font-medium);

        b {
            padding-right: 5px;
        }

        p {
            text-align: right;
            text-wrap: balance;
        }
    }
}

main .bottom-data .orders {
    flex-grow: 1;
    flex-basis: 500px;
}


.bottom-data .orders {
    table {
        width: 100%;
        border-collapse: collapse;
    }

    th,
    td {
        padding: 8px;
        border: 1px solid #ddd;
    }


}

.reminders {
        box-shadow: 0px 0px 1px var(--dark), 0px 3px 7px var(--dark), 0px 0px 1px var(--light) inset, 0px -3px 2px rgba(0,0,0,0.25) inset; 
    &>* {
        color: var(--dark);
    }
}


.status {
    font-size: 10px;
    padding: 6px 16px;
    color: var(--light);
    border-radius: 20px;
    font-weight: 700;
}

.status.executed {
    background: var(--success);
}

.status.progress {
    background: var(--warning);
}

.status.open {
    background: var(--primary);
}

.status.cancel {
    background: var(--danger);
}


tr.htmx-swapping td {
    opacity: 0;
    transition: opacity 1s ease-out;
}

/* Estilo para el buscador */
.dataTables_length>label>select,
input {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 5px;
}

.dataTables_filter>label>select,
input {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 5px;
}

/* Estilo para los botones de paginación */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    background-color: #4CAF50;
    color: white !important;
    border: none;
    padding: 5px 10px;
    margin: 2px;
    border-radius: 3px;
}

/* Cambiar el estilo cuando el botón está activo */
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: #007BFF;
}

/* Cambiar el estilo cuando el botón está deshabilitado */
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    background-color: #e0e0e0;
    color: #888 !important;
}

.dataTables_length,
.dataTables_filter,
#dataTables_info,
.dataTables_paginate {
    width: 40%;
    height: auto;
    display: inline-block;
    padding: 5px;
    margin: 10px;
    text-align: center;

    input,
    select {
        width: 30%;
        margin: 10px;
    }
}

/** TABS*/
.tabs {
    width: 100%;
    display: inline-block;

    ul {
        display: flex;
        flex-wrap: wrap;
    }
}

/*----- Tab Links -----*/
/* Clearfix */
.tab-links:after {
    display: block;
    clear: both;
    content: '';
}

.tab-links li {
    margin: 0px 5px;
    float: left;
    list-style: none;
}

.tab-links a {
    padding: 9px 15px;
    display: inline-block;
    border-radius: 3px 3px 0px 0px;
    background: var(--grey);
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    transition: all linear 0.15s;
}

.tab-links a:hover {
    background: var(--light-danger);
    color: var(--dark);
    text-decoration: none;
}

li.active a,
li.active a:hover {
    background: var(--dark);
    color: var(--light);
}

/*----- Content of Tabs -----*/
.tab-content {
    margin-top: 2px;
    padding: 15px;
    border-radius: 3px;
    box-shadow: -1px 1px 1px rgba(0, 0, 0, 0.15);
    background: var(--grey);
}

.tab {
    display: none;
    color: var(--dark);

    table {
        width: 100%;
        border-collapse: collapse;
    }

    th,
    td {
        padding: 8px;
        border: 1px solid #ddd;
    }


}

.tab.active {
    display: block;
}



.formbold-mb-3 {
    margin-bottom: 5px;
}

.formbold-relative {
    position: relative;
}

.formbold-opacity-0 {
    opacity: 0;
}

.formbold-stroke-current {
    stroke: currentColor;

}

.formbold-input-checkbox:checked~div span {
    opacity: 1;
}

.formbold-main-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.formbold-form-wrapper {
    margin: 0 auto;
    max-width: 50vw;
    width: 100%;
    padding: 10px;
}

.formbold-img {
    margin-bottom: 45px;
}

.formbold-form-title {
    margin-bottom: 30px;
}

.formbold-form-title h2 {
    font-weight: 600;
    font-size: 28px;
    line-height: 34px;
    color: var(--dark);
}

.formbold-form-title p {
    font-size: 16px;
    line-height: 24px;
    color: #536387;
    margin-top: 12px;
}

.formbold-input-flex {
    display: flex;
    margin-bottom: 5px;
    flex-direction: row;
    flex-wrap: wrap;
}

.formbold-input-flex>.formbold-mb-3 {
    width: 50%;
    padding: 10px;


}

.formbold-input-flex>.formbold-mb-4 {
    width: 33%;
}

.formbold-form-input[readonly] {
    background-color: #e9ecef;
    color: #000;

}

.formbold-form-input {
    text-align: center;
    width: 100%;
    padding: 10px 19px;
    border-radius: 5px;
    border: 1px solid var(--light-primary);
    background: var(--light);
    font-weight: 500;
    font-size: 13px;
    color: var(--dark);
    outline: none;
    resize: none;
}

.formbold-form-input textarea {
    text-align: justify !important;
}

.formbold-form-input:focus {
    border-color: var(--primary);
    box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.05);
}

.formbold-form-label {
    color: var(--dark);
    font-size: 14px;
    line-height: 24px;
    display: block;
    margin-bottom: 10px;
}

.formbold-checkbox-label {
    display: flex;
    cursor: pointer;
    user-select: none;
    font-size: 16px;
    line-height: 24px;
    color: #536387;
}

.formbold-checkbox-label a {
    margin-left: 5px;
    color: #6a64f1;
}

.formbold-input-checkbox {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.formbold-checkbox-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 16px;
    margin-top: 2px;
    border: 0.7px solid #dde3ec;
    border-radius: 3px;
}



.formbold-btn {
    font-size: 16px;
    border-radius: 5px;
    padding: 10px 18px;
    border: none;
    font-weight: 500;
    background-color: #6a64f1;
    color: white;
    cursor: pointer;
    margin-top: 20px;
    border-radius: 8px;
}

.formbold-btn:hover {
    box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.05);
}

.paging_simple_numbers {
    width: 100%;
}

input,
select {
    background: var(--light);
    color: var(--dark);
}

/**
*MODAL
*/
.modal {
    width: 100vw;
    height: 100dvh;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    /* Fondo translúcido para el modal */
    backdrop-filter: blur(5px);
    /* Efecto de desenfoque para el fondo */
    transition: background-color 0.3s ease;

    section {
        display: flex;
        justify-content: space-between;
    }
}

.modal__contend {
    position: relative;
    width: 60%;
    max-width: 800px;
    height: auto;
    min-width: 400px;
    max-height: 60vh;
    background-color: var(--light);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    scroll-padding: 100px 0px 0px 100px !important;
    scroll-snap-type: y mandatory;

}

.modal__contend.active {
    transform: scale(1);
}

.modal__contend .formbold-main-wrapper {
    width: 100%;
    padding: 0;

    .formbold-form-wrapper {
        padding: 15px;
        max-width: none;
    }
}

.modal__contend form {
    position: relative;
    max-height: 55vh;
    width: 100%;
    overflow: auto;

    div {

        padding: 10px;
    }

}

textarea {
    field-sizing: content !important;
}

/* IMAGES */


.img-zoom-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.img-zoom-lens {
    position: absolute;
    border: 1px solid var(--grey);
    width: 40px;
    height: 40px;
}

.img-zoom-result {
    border: 1px solid var(--grey);
    width: 300px;
    height: 300px;
}

.none {
    display: none;
}

.bx-trash {
    color: var(--danger);
}


.formbold-main-wrapper {
    container-type: inline-size;
}

/* Luego, aplica estilos según su tamaño */
@container (max-width: 600px) {
    .formbold-form-wrapper {
        max-width: 80vw;
    }

    .formbold-input-flex>.formbold-mb-3,
    .formbold-input-flex>.formbold-mb-4 {
        width: 100%;
    }
}

@media screen and (max-width: 600px) {

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        margin-bottom: 20px;
        border: 1px solid #ddd;
    }

    td {
        border: none;
        position: relative;
        padding-right: 10px !important;
        padding-left: 5px !important;
        padding-top: 40px !important;
        text-align: start !important;
        text-wrap: balance;
    }

    td:before {
        height: 20px;
        top: 0;
        padding-top: 8px;
        position: absolute;
        left: 6px;
        content: attr(data-label);
        font-weight: bold;
        text-wrap: balance;
        text-align: center;
    }

    .dataTables_length,
    .dataTables_filter,
    #dataTables_info,
    .dataTables_paginate {
        display: block;
        width: 100% !important;
    }

    .bottom-data .orders table th {
        padding-bottom: 12px;
        font-size: 13px;
        text-align: left;
        border-bottom: 3px solid var(--grey);
        text-align: center;
    }

    .bottom-data .orders table td {
        padding: 16px 0;
        text-align: center;
        vertical-align: middle;

        a {
            color: var(--color);
        }
    }


    .bottom-data .orders table td img {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        object-fit: cover;
    }

    .bottom-data .orders table tbody tr {
        cursor: pointer;
        transition: all 0.3s ease;

    }

    .bottom-data .orders table tbody tr:hover {
        background: var(--grey);
    }





}