html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.tabposition {
    padding-top: 4px;
}
iframe {
    display: block; /* iframes are inline by default */
    height: 75vh; /* Set height to 100% of the viewport height */
    width: 100%; /* Set width to 100% of the viewport width */
    border: none; /* Remove default border */
    background: lightyellow; /* Just for styling */
}
.tab-content > .active {
    background-color: var(--mainbg) !important;
    border: 1px solid #dee2e6  ;
}

.backcard .card-header {
    background: dodgerblue !important;
    color: white !important;
}
.backcard {
    background: var(--mainbg) !important;
}
h5x.card-title {
    border-bottom: 1px solid #888888;
}
.modale-top-buttons {
    text-align: right;
    padding-right: 10px;
    padding-top: 5px;
    padding-bottom: 4px;
    border-bottom: 1px solid lightgray;
}
.modal-fullscreen {
    border: 1px solid #dee2e6;
    border-radius: var(--bs-card-border-radius);
}
div.dataTables_wrapper div.dataTables_length select {
    width: 60px !important
}
#bloccototali{
    display: none;
}
#bloccocheck{
    display: none;
}
.spinner-wrapper {
    background-color: #000000;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    -webkit-align-items: inherit;
    align-items: center;
    display: flex;
    opacity: .7;
    filter: alpha(opacity=70);
}
.spinner-border{
    width:60px;
    height:60px;
}
.pagination {
    --bs-pagination-padding-x: 0.75rem;
    --bs-pagination-padding-y: 0.375rem;
    --bs-pagination-font-size: 1rem;
    --bs-pagination-color: var(--bs-link-color);
    --bs-pagination-bg: var(--bs-body-bg);
    --bs-pagination-border-width: var(--bs-border-width);
    --bs-pagination-border-color: var(--bs-border-color);
    --bs-pagination-border-radius: var(--bs-border-radius);
    --bs-pagination-hover-color: var(--bs-link-hover-color);
    --bs-pagination-hover-bg: var(--bs-tertiary-bg);
    --bs-pagination-hover-border-color: var(--bs-border-color);
    --bs-pagination-focus-color: var(--bs-link-hover-color);
    --bs-pagination-focus-bg: var(--bs-secondary-bg);
    --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    --bs-pagination-active-color: #fff;
    --bs-pagination-active-bg: #0d6efd;
    --bs-pagination-active-border-color: #0d6efd;
    --bs-pagination-disabled-color: var(--bs-secondary-color);
    --bs-pagination-disabled-bg: var(--bs-secondary-bg);
    --bs-pagination-disabled-border-color: var(--bs-border-color);
    display: flex;
    padding-left: 0;
    list-style: none;
}
.btn-tools {
    margin-right: 2px;
}

.spostasu70 {
    margin-top: -30px !important;
}
/*.nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active {
    background-color: lightskyblue;
}*/
.fasize {
 font-size:30px;
}
.amdropitem {
    padding: 2px 10px;
    white-space: pre-wrap;
}
.amdropwidth{
    width:80% !important;
    max-width:80%;
}
.amdropwidth select, .amdropwidth button {
    width: 80% !important;
}
.amdropwidth ul li span{
    padding: 4px;
}
    .amdropwidth ul li:nth-child(odd) {
        background-color: #f0f0f0; /* Grigio chiaro */
    }

/* Selettore per gli elementi in posizione PARI (2°, 4°, 6°, ...) */
/* Puoi usare anche :nth-child(2n) */
    .amdropwidth ul li:nth-child(even) {
        background-color: #dcdcdc; /* Grigio medio/scuro */
        color: #333; /* Colore testo più scuro per contrasto */
    }
.text-menu{
    font-size:18px;
}
.menu-width{
    width: 204px;
}
.fixed-icon-width{
    width: 40px;
}
/*.overlay-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    z-index: 1060;*/ /* Più alto della modale esterna */
    /*border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}*/

.secondary-overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Grigio scuro semitrasparente */
    z-index: 1060; /* Deve essere più alto della prima modale (1050) */
}

/* Stile per il dialogo vero e proprio */
.overlay-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    /* Centra perfettamente l'elemento */
    transform: translate(-50%, -50%);
    /* Z-index ancora più alto per essere sopra il suo backdrop */
    z-index: 1061;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5); /* Ombra per farlo risaltare */
    padding: 1px;
   
}
.overlay-dialog-son{
    margin: 1px !important;
}
.toast {
    /* Il valore di default di Bootstrap è spesso 1090 o 1100. */
    /* Usare 9999 o superiore garantisce che il Toast sia sempre l'elemento più in alto. */
    z-index: 99999 !important;
    /* Nota: Usare !important è necessario se un'altra regola specifica sta sovrascrivendo l'originale di Bootstrap. */
}

.pdfinside{
    height:99vh;
}
#externalWebModal{
    min-height:680px;
}
#externalIframe {
    min-height: 615px;
}



/* --- STILIZZAZIONE DELLE LINGUETTE DEI TAB --- */

/* 1. Stato di Default (Tab NON ATTIVI / Inattivi) */
.nav-tabs .nav-link {
    color: #495057 !important; /* Grigio scuro neutro per massima leggibilità */
    background-color: #f8f9fa !important; /* Sfondo grigio chiarissimo molto discreto */
    border: 1px solid #dee2e6 !important; /* Bordino sottile coordinato con la tabella */
    border-bottom-color: transparent !important;
    margin-right: 4px;
    border-radius: 6px 6px 0 0; /* Arrotondamento moderno solo sugli angoli superiori */
    transition: all 0.2s ease-in-out;
}

    /* 2. Stato al passaggio del mouse (Hover) sui Tab inattivi */
    .nav-tabs .nav-link:hover {
        color: #212529 !important;
        background-color: #e9ecef !important; /* Si scurisce leggermente per dare feedback */
        border-color: #dee2e6 #dee2e6 #fff !important;
    }

    /* 3. Stato ATTIVO (Il Tab attualmente selezionato) */
    .nav-tabs .nav-item.show .nav-link,
    .nav-tabs .nav-link.active {
        color: #ffffff !important; /* Testo bianco puro */
        background-color: #0d6efd !important; /* Blu Corporate Bootstrap (sostituisce il vecchio azzurro o blu elettrico) */
        border-color: #0d6efd #0d6efd transparent !important; /* Il bordo si fonde con lo sfondo del tab */
        font-weight: 500; /* Testo leggermente più marcato per evidenziare la selezione */
    }

    /* 4. Icona di chiusura dentro i Tab */
    .nav-tabs .nav-link i.fa-times {
        font-size: 11px;
        margin-left: 6px;
        transition: color 0.2s ease;
    }
    /* L'icona diventa rossa solo quando l'utente ci passa sopra espressamente */
    .nav-tabs .nav-link:not(.active) i.fa-times {
        color: #adb5bd;
    }

    .nav-tabs .nav-link i.fa-times:hover {
        color: #dc3545 !important;
    }


    /*COLORI ICONE RIGHE*/
/* --- STILIZZAZIONE ICONE AZIONE NELLE TABELLE (IN LINEA) --- */

/* Contenitore per forzare le icone su un'unica riga senza andare a capo */
.table-actions-container {
    display: inline-flex !important;
    align-items: center;
    gap: 12px; /* Spazio uniforme tra un'icona e l'altra */
    white-space: nowrap !important;
}

/* Regola generale per i link-icona della tabella */
.table-action-btn {
    font-size: 20px; /* Dimensione bilanciata con il testo della tabella */
    text-decoration: none !important;
    display: inline-block;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

    /* Effetto micro-interazione al passaggio del mouse */
    .table-action-btn:hover {
        transform: scale(1.15); /* L'icona si ingrandisce leggermente */
        opacity: 0.9;
    }

    /* Colore Icona: Modifica/Edit (Verde Corporate) */
    .table-action-btn.action-edit {
        color: #198754 !important; /* Verde standard Bootstrap, più morbido */
    }

    /* Colore Icona: Elimina/Trash (Rosso Alert) */
    .table-action-btn.action-delete {
        color: #dc3545 !important; /* Rosso desaturato professionale */
    }

    /* Colore Icona: Chiavi/Keys (Giallo/Arancio Sicurezza) */
    .table-action-btn.action-key {
        color: #fd7e14 !important; /* Arancione di sicurezza per le chiavi */
    }

    /* Colore Icona: Download (Blu/Azzurro Action) */
    .table-action-btn.action-download {
        color: #0d6efd !important; /* Blu abbinato ai tuoi tab attivi */
    }
.topbar {
    z-index: 1230;
    position: fixed;
    width: 100%;
}
.topbarcontent {
    padding-top: 70px !important;
}

/* Forza il colore rosso su tutto il corpo del toast */
.alertbottom .toast {
    background-color: #dc3545 !important; /* bg-danger */
    color: #fff !important;
}

/* Rende trasparente l'header del plugin per mostrare il rosso sottostante */
.alertbottom .toast-header {
    background-color: rgba(0, 0, 0, 0.1) !important; /* Crea un leggero stacco elegante */
    color: #fff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

    /* Trasforma la "X" di chiusura da nera a bianca */
    .alertbottom .toast-header .btn-close {
        filter: invert(1) brightness(2) !important;
    }

.btn-outline-light:hover {
    color: #000 !important;
  
}
.btn-check:active + .btn-outline-light, .btn-check:checked + .btn-outline-light, .btn-outline-light.active, .btn-outline-light.dropdown-toggle.show, .btn-outline-light:active {
    color: #000 !important;

}

.gruppi-schede {
    border: 0;
    background: #F8F8F8;
}
.btn-plus {
    height: 30px;
    padding-left: 16px;
    padding-top: 0px;
    padding-bottom: 0px;
    padding-right: 16px;
}
.dropdown-select {
 
    background: white;
    border: 1px solid gray !important;
    border-radius: 6px;
}
.dropdown-select button{
    padding: 4px !important;
}
.bloccoinfo{
    padding: 20px;
}