body {
    --brand: #891d25;
}

.topbar .navbar-header {
    position: relative;
}

.navbar-brand {
    padding-top: 20px;
    text-align: center;
}

.navbar-brand img {
    max-width: 70%;
}

.left-sidebar {
    padding-top: 0;
    z-index: 65;
}

input[type=file], /* FF, IE7+, chrome (except button) */
input[type=file]::-webkit-file-upload-button { /* chromes and blink button */
    cursor: pointer; 
}

select.select2ajax + span {
    display: block;
    min-width: 100%;
    height: 38px;
}

select.select2ajax + span .select2-selection {
    min-height: 38px;
}

select.select2ajax + span .select2-selection:not(.select2-selection--multiple) .select2-selection__rendered {
    line-height: 38px!important;
}

select.select2ajax + span .select2-selection__arrow {
    height: 35px!important;
}

.select2ajax + span .select2-selection__clear {
    font-size: 22px!important;
    color: var(--bs-danger);
}

.text-brand {
    color: var(--brand);
}

.bg-brand {
    background-color: var(--brand);
}

.btn-brand {
    background-color: var(--brand);
    color: #fff;
}

.btn-brand:hover {
    background-color: var(--brand);
    filter: brightness(1.1);
}

body:has(.error-page) :is(header, aside) {
    display: none!important;
}

.contact_response:has(option:not([data-t="E"]):checked) ~ :is(.contact_appontment, .contact_agenda) {
    display: none!important;
}

.sidebar-nav>ul>li>a.active {
    background-color: var(--brand);
    color: #fff;
}

.sidebar-nav>ul>li>a.active > i {
    color: #fff;
}

form.loading .btn,
.btn.loading {
    opacity: .4;
    filter: grayscale(1);
}

form.loading .btn i:before,
.btn.loading i:before {
    content: "\f110";
    display: inline-block;
    animation: fa-spin 2s infinite linear;
}

label:has(input[type="radio"]),
label:has(input[type="checkbox"]) {
    position: relative;
    width: 20px;
    aspect-ratio: 1 / 1;    
    border: 1px solid #ddd;
    opacity: .7;
    margin: 0;
    transition: .3s;
}

label:has(input[type="radio"]) {
    border-radius: 50%;
}

label:has(input[type="radio"]):hover,
label:has(input[type="checkbox"]):hover {
    border-color: var(--brand);
}

label:has(input[type="radio"]:checked),
label:has(input[type="checkbox"]:checked) {
    background-color: var(--brand);
    opacity: 1;
}

label:has(input[type="radio"]:checked):after,
label:has(input[type="checkbox"]:checked):after {
    content: "\f00c";    
    font: normal normal normal 14px / 1 FontAwesome;
    position: absolute;
    top: calc(50% - 7px);
    left: calc(50% - 7px);
    color: #fff;
}

.popup {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    z-index: 100;
    background-color: rgba(0,0,0,.5);
}

.popup:not(.on) {
    display: none;
}

.popup > .inner {
    position: relative;
    width: 95%;
    height: 95%;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, .1);
}

.popup > .inner > a {
    position: absolute;
    top: 10px;
    right: 15px;
}

.popup > .inner > .wrap {
    padding: 2rem;
}

.dataTables_wrapper:has(.table.d-none) {
    display: none!important;
}

.upload_list {
    position: relative;
}

.upload_list > input {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.dt_lists tr:has(.update_list[type="radio"]:checked) .delete_list {
    display: none!important;
}

table.contacts tr > .note {
    min-width: 300px;
}

.Calendar .change_cal {
    width: 40px;
}

.Calendar .cal {
    display: flex;
    flex-wrap: wrap;
}

.Calendar .cal {
    border: 1px solid rgba(120, 130, 140, 0.13);
}

.Calendar .cal > div {
    position: relative;
    width: calc(100% / 7);
    aspect-ratio: 1/1;
    border: 1px solid rgba(120, 130, 140, 0.13);
    padding: 2rem .5rem;
}

.Calendar .cal > .day:after {
    content: attr(data-d);
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;    
    text-align: center;
}

.Calendar .cal > div:nth-of-type(1):before,
.Calendar .cal > div:nth-of-type(2):before,
.Calendar .cal > div:nth-of-type(3):before,
.Calendar .cal > div:nth-of-type(4):before,
.Calendar .cal > div:nth-of-type(5):before,
.Calendar .cal > div:nth-of-type(6):before,
.Calendar .cal > div:nth-of-type(7):before {
    content: var(--content);
    position: absolute;
    top: -26px;
    left: -2px;
    right: -2px;
    display: block;
    padding: 2px 0;
    background-color: #f2f7f8;
    border: 1px solid #f2f7f8;
    text-align: center;
}

.Calendar .cal > div:nth-of-type(1):before { --content: 'Lunedì'; }    
.Calendar .cal > div:nth-of-type(2):before { --content: 'Martedì'; }    
.Calendar .cal > div:nth-of-type(3):before { --content: 'Mercoledì'; }    
.Calendar .cal > div:nth-of-type(4):before { --content: 'Giovedì'; }    
.Calendar .cal > div:nth-of-type(5):before { --content: 'Venerdì'; }    
.Calendar .cal > div:nth-of-type(6):before { --content: 'Sabato'; }    
.Calendar .cal > div:nth-of-type(7):before { --content: 'Domenica'; }    

.Calendar .cal .appointment {
    font-size: small;
    display: block;
    width: 100%;
    background-color: var(--primary);
    padding: 2px 5px;
    border-radius: 5px;
    color: #fff;
}

.dt_products .image {
    width: 75px;
    aspect-ratio: 1/1;
    object-fit: contain;
}

.dt_products tr > *.img {
    width: 80px!important;
    max-width: 80px;
}

.dt_products tr > :is(.cod, .pri, .vat, .act) {
    width: 60px!important;
    max-width: 60px;
}

.dataTable tr > .actions {
    min-width: 120px;
    width: 120px;
}

.product_image {
    position: relative;
    width: 200px;
    aspect-ratio: 1/1;
}

.product_image > input {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 2;
}

.product_image > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product_infos:not(.show),
.customer_infos:not(.show),
.order_inner:has(.customer_infos.show) .chose_customer,
.customer_infos:has(.tpc option[value="1"]:checked) .tpa,
.customer_infos:has(.tpc option[value="2"]:checked) .tpp,
.product_infos:not(:has(.prods > .product:nth-of-type(1))) .totals,
.order_inner:not(:has(.customer_infos.show)) :is(.nota_order, .product_search, .save_btn) {
    display: none!important;
}

.customer_infos .row > div {
    margin-bottom: .5rem;
}

.product_infos .prods .product {
    position: relative;
    display: flex;
    align-items: center;
}

.product_infos .prods .product .remove_product {
    position: absolute;
    top: 5px;
    right: 5px;
}

.product_infos .prods .product:not(:last-of-type) {
    margin-bottom: 1rem;
}

.product_infos .prods .product > .row > div:not(.name) {
    display: flex;
    flex-direction: column;
}

.product_infos .prods .product .img img {
    max-width: 75px;
}

.product_infos .prods .product .vat span:not(:empty):after {
    content: ' %';
}

.product_infos .prods .product :is(.price, .total, .totalvat) span:not(:empty):after,
.product_infos .totals span:not(:empty):after {
    content: ' €';
}

.product_infos .prods .product .qnt {
    display: flex;
    align-items: center;
    gap: 0 1rem;
}

.product_infos .prods .product .qnt input {
    max-width: 65px;
}

.order_inner .add_docs > div:has(input) {
    position: relative;
    display: inline-block;
}

.order_inner .add_docs input {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 2;
}

.nspvsupdated {
    border:1px solid green;
}