:root {
  /* base vicino a #1d7890 */
  --pes-primary: #1d7890b7;
  --pes-primary-highlight: color-mix(in srgb, var(--pes-primary), white 30%);
  --pes-secondary: #4a93a6;
  --pes-secondary-highlight: color-mix(in srgb, var(--pes-secondary), white 30%);

  /* neutro icone */
  --pes-icona-index: #212529dc;

  /* pulsanti */
  --pes-btn: #1d7890fc;

  /* gradient: tono un po' più scuro -> un po' più chiaro, ma sempre vicino */
  --pes-btn-gradient-primary: #176073;   /* shade ~20% */
  --pes-btn-gradient-secondary: #4a93a6; /* tint  ~20% */

  /* intestazioni tabella (contrasto sobrio, coerente col base) */
  --pes-table-header-primary: #4a93a6; /* chiaro vicino al base */
  --pes-table-header-secondary: #1a6c82; /* leggermente più scuro */

  /* sfondo con la stessa tinta e trasparenza simile all'originale */
  --pes-sfondo-index: #1d789054;
}

.filtri-home {
    padding: 0 10px;
    margin-top: 10px;
}

.filtri-home > .box {
    width: 100%;
    height:auto;
    display: flex;h
    align-items: center;
    border-radius: 16px;
    background: white;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.15);
}

.form-floating * {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: none;
    border-right: #e3e3e3 1px solid;
}

.form-floating_color{
    border: none; 
    border-bottom: #01b276 2px solid;
    border-radius: 0;
    width: 130px;
    border-right: #e3e3e3 1px solid;
}

.filtri_color:focus, .applica_filtri:focus  {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 109, 253, 0);
    border-bottom: var(--per-border-bottom-hover) 2px solid !important;
}
.filtri_color:hover, .applica_filtri:hover {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 109, 253, 0);
    border-radius: 0;

    border-right: #e3e3e3 1px solid;
    border-bottom: var(--per-border-bottom-hover) 2px solid;
}

.applica_filtri{
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: none;
    border-right: #e3e3e3 1px solid;
    border-bottom: #01b276 2px solid;
    transition-duration: 125ms;
    height: 58px;
}


#table {
    border-collapse: collapse;
}

#table th, #table td {
    font-size: 12px;
    padding: 0;
}


#table tr:nth-child(2n+1) > td {
    background: #f8f8f8;
}

#table th {
    position: sticky;
    background-color: var(--pes-table-header-primary);
    color: white;
    top: 0;
}
#table th i{
    color: white;
}

#table td.hidden, #table th.hidden {
    display: none;
}

#table td {
    height: 30px;
    padding: 5px;
    border-right: #E8E8E8 1px solid;
    border-bottom: #E8E8E8 1px solid;
}

#table th:last-child, #table td:last-child {
    border-right: none;
}

#table th > .title {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

#table th > .title > div {
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#table th > .title > div > p {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    font-size: 14px;

}

#table th > .title > div > button {
    border: none;
    background: transparent;
}

#table th > .title > div > button > img {
    width: 14px;
    height: 14px;
}

#tableSelection {
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
}

#filterContext {
    position: absolute;
    width: 250px;
    min-height: 70px;
    background: white;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    top: 0;
    left: 0;
    display: none;
    flex-direction: column;
}

#filterContext > .sortingType {
    display: flex;
    flex-direction: column;
    width: 100%;
}

#filterContext > .sortingType > button {
    padding: 5px 10px;
    background: transparent;
    border: solid transparent 1px;
    display: flex;
    align-items: center;
    border-bottom: #E8E8E8 1px solid;
}

#filterContext > .sortingType > button:last-child {
    border-bottom: none;
}

#filterContext > .sortingType > button.active {
    color: #0d6efd;
}

#filterContext > .sortingType > button:hover {
    color: #01b276;
}

#filterContext > .sortingType > button > img {
    width: 24px;
}

#filterContext > .sortingType > button > .text {
    flex: 1;
    text-align: start;
    padding: 0 10px;
}

#tableSelection {
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
}

#columnSelector {
    position: fixed;
    display: flex;
    flex-direction: column;
    background: #fff;
    right: 0;
    height: 100%;
    width: 400px;
    top: 0;
    padding: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

#columnSelector > .selected, #columnSelector > .unselected {
    flex: 3;
    /*box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.1);*/
    box-shadow: 0 5px 26px rgba(0, 0, 0, 0.15);
    margin: 5px;
    overflow-y: auto;
    background: #fff;
}

#columnSelector > .selected > *, #columnSelector > .unselected > * {
    border-bottom: transparent 1px solid;
    cursor: pointer;
    transition-duration: 125ms;
    padding-left: 5px;
}

#columnSelector > .selected > *:hover, #columnSelector > .unselected > *:hover {
    padding: 10px 0;
    background-color: #f1f1f1;
    border-bottom: var(--pes-primary) 1px solid;
    padding-left: 9px;
}

#columnSelector > .footer {
    display: flex;
    justify-content: space-between;
}

#columnSelector > .column-name {
    display: flex;
    align-items: center;
}

#columnSelector > .column-name > .center {
    padding: 0;
    margin: 0;
    flex: 4;
    text-align: center;
}

#columnSelector > .column-name > .right {
    display: flex;
    align-items: center;
    justify-content: end;
}

#columnSelector > .column-name > * {
    flex: 1;
}

.hidden {
    display: none !important;
}

.under-header {
    height: 87px;
    padding: 0 10px;
    margin-top: 10px;
}

.under-header > .box {
    width: 100%;
    display: flex;
    align-items: center;
    border-radius: 16px;
    background: white;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.15);
    height: 56px;
}

.under-header button {
    display: flex;
    color: black;
    align-items: center;
    justify-content: center;
    background: white;
    border: none;
    border-right: var(--pes-border) 1px solid;
    border-bottom: var(--pes-primary) 2px solid;
    transition-duration: 125ms;
    height: 56px;
}

.under-header button > * {
    margin: 0 6px;
}

.under-header button > i {
    display: flex;
    align-items: center;
}

.under-header button:first-child {
    border-radius: 16px 0 0 16px;
}

.under-header button:hover {
    border-bottom: var(--pes-primary-highlight) 2px solid;
}

.pes-btn-clear {
    color: #737373;
    border: none;
    background: none;
    font-weight: 700;
    padding: 8px 12px;

    display: flex;
    justify-content: center;
    align-items: center;
    transition-duration: 125ms;
}

.pes-btn-clear:hover {
    color: #525252;
}

.pes-btn-clear.pes-icon {
    padding: unset;
    width: 24px;
    height: 24px;
    font-size: 18px;
}

.pes-btn-clear.pes-icon > i {
    width: 18px;
    height: 18px;
    transition-duration: 125ms;
}

.pes-btn-clear.pes-icon:active > i {
    font-size: 16px;
}

.pes-btn-gradient {
    outline: none;
    border: none;

    display: flex;
    justify-content: center;
    align-items: center;

    margin: 5px;
    padding: 8px 12px;

    background: linear-gradient(310deg, var(--pes-btn-gradient-primary) 0%,
    var(--pes-btn-gradient-secondary) 100%) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    color: white !important;
    font-weight: 700;
    background-size: 200% 100% !important;
    background-position-x: 100% !important;
    transition: background-position-x 125ms !important;

}

.pes-btn-gradient:hover {
    background-position-x: 0 !important;
    color: white !important;
}

.pes-btn-gradient.pes-icon {
    padding: 0;
    width: 38px;
    height: 38px;
}

.pes-btn-gradient.pes-icon:active > i {
    transition-duration: 125ms;
}

.pes-btn-gradient.pes-icon:active > i {
    font-size: 14px;
}

.filter-input {
    border: #E8E8E8 1px solid;
    width: 100%;
    outline: none;
}

.filter-operator {
    border: #E8E8E8 1px solid;
    outline: none;
}

.filter-group {
    padding: 5px !important;
    display: flex;
    flex-direction: row;

    background-color: var(--pes-table-header-secondary);
    /*border-bottom: #01b276 2px solid;*/
}

.filter-group > .filter-column {
    display: flex;
    flex: 1;
    margin: 0 2px;
    flex-direction: column;
}

.filter-group > .filter-column > * {
    width: 100%;
    margin: 2px 0;
    height: 20px;
}

h4 {
    font-weight: 700
}

#loadingScreen {
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.8);
    backdrop-filter: blur(8px);
}

