/* 1. VARIABILI GLOBALI E COLORI
 * ---------------------------------------- */
:root {
  /* Palette Colori */
  --primary-color: #10367A;   /* Blu Edison */
  --primary-dark: #0b2656;    /* Blu scurito perr */
  --edison-blue: #10367A;     /* Alias per compatibilità */
  --secondary-color: #6c757d; /* Grigio */
  --success-color: #198754;   /* Verde "Play" per conferme */
  --danger-color: #dc3545;    /* Rosso per errori */
  --light-bg: #f8f9fa;       /* Sfondo pagina */
  --white-bg: #ffffff;       /* Sfondo card/form */
  --text-color: #2d2d2d;      /* Testo scuro */
  --text-muted: #6c757d;      /* Testo grigio */
  --border-color: #dee2e6;    /* Colore bordi */

  /* Layout */
  --navbar-height: 65px; /* Altezza della navbar fissa */
  --border-radius-base: 0.375rem; /* Bootstrap default */
  --border-radius-pill: 10px;    /* Per i bottoni */
}

/* ============================================================
   GLOBAL BOOTSTRAP OVERRIDES
   ============================================================ */
/* Forza il blu Edison su tutti i componenti "Primary" di Bootstrap */
.btn-primary, .bg-primary, .badge.bg-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.text-primary, .btn-link {
    color: var(--primary-color) !important;
}

.progress-bar {
    background-color: var(--primary-color) !important;
}

/* 1. PAGINAZIONE UNIFICATA: Colore dei numeri e bordi */
.pagination .page-link {
    color: var(--primary-color) !important;
    border-color: var(--border-color);
    transition: all 0.2s;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.pagination .page-link:hover {
    background-color: #f1f5f9;
    color: var(--primary-dark) !important;
}

/* 2. BOTTONE OUTLINE EDISON (Per Log e Dashboard) */
.btn-outline-primary, .btn-outline-edison {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover, .btn-outline-edison:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* FIX POSIZIONAMENTO MODALI JQGRID (EDIT/ADD) */
    .ui-jqdialog {
        position: fixed !important; /* La blocca rispetto al browser, non alla griglia */
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important; /* Centratura perfetta */
        height: auto !important;
        max-height: 90vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
        border: none !important;
        border-radius: 15px !important;
        background: #fff;
    }

    /* Header della modale (titolo) */
    .ui-jqdialog .ui-jqdialog-titlebar {
        background: #f8f9fa !important;
        border-bottom: 1px solid #eee !important;
        padding: 15px 20px !important;
        font-weight: 700 !important;
        color: #10367A !important;
    }

    /* Contenuto interno (form) */
    .ui-jqdialog .ui-jqdialog-content {
        padding: 20px !important;
        background: white !important;
        overflow-y: auto !important;
    }

    /* Footer (bottoni Invia/Chiudi) */
    .ui-jqdialog .EditTable {
        background: #f8f9fa !important;
        border-top: 1px solid #eee !important;
        padding: 10px !important;
    }

    /* Overlay scuro dietro la modale */
    .ui-widget-overlay {
        background: rgba(0, 0, 0, 0.5) !important;
        opacity: 1 !important;
        z-index: 900 !important;
    }

  /* Fissa la riga dei bottoni (Invia/Chiudi) in fondo */
  .EditBottomLine {
      position: sticky;
      bottom: 0;
      background: #fff;
      border-top: 1px solid #ddd;
      z-index: 999;
  }

  /* Rimpicciolisce un po' i margini interni per recuperare spazio */
  .FormGrid .EditTable td {
      padding: 4px !important;
  }

  /* FIX POSIZIONAMENTO MODALI JQGRID (EDIT/ADD) */
    /* Aggiungiamo :not(.search-dialog) per lasciare libera la modale ricerca */
    .ui-jqdialog:not(.search-dialog) {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 550px !important; /* Larghezza fissa per Edit/Add */
        height: auto !important;
        max-height: 90vh;
        box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
        border: none !important;
        border-radius: 15px !important;
        background: #fff;
    }

    /* Stile specifico per la modale RICERCA (per allargarla) */
    .ui-jqdialog.search-dialog {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 800px !important; /* <--- QUI DECIDI LA LARGHEZZA DEI FILTRI */
        border-radius: 15px !important;
        box-shadow: 0 10px 40px rgba(0,0,0,0.3) !important;
        border: 1px solid var(--primary-color) !important;
    }


/* ============================================================
   LAYOUT E TIPOGRAFIA
   ============================================================ */

body {
  font-family:'Plus Jakarta Sans',-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:14px;
  font-weight:400;
  background-color: var(--light-bg);
  color: var(--text-color);
  padding-top: var(--navbar-height);
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  margin: 0;
}

.main-content {
    flex: 1; /* Questo dice: "prenditi tutto lo spazio vuoto che trovi" */
}

.page-footer {
    /* Niente posizioni fisse, niente fisse moleste. Solo un po' di stile */
    background-color: #fff;
    border-top: 1px solid #f1f5f9;
}

.main-content { flex-grow: 1; }
.main-content.pt-navbar { padding-top: 2rem; }

h1,h2,h3,h4,h5,h6{
    font-weight:600;
    letter-spacing:-0.01em;
    color: var(--primary-color);
}

a,
a:hover,
a:focus,
a:active {
    text-decoration: none;
}

.form-select, .form-control {
    font-size:14px;
    padding:0.45rem 0.75rem;
    border-radius: var(--border-radius-base);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(16, 54, 122, 0.15);
}

.btn {
  border-radius: var(--border-radius-pill);
  font-size:13px;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  transition: all 0.2s ease-in-out;
}

.card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  background-color: var(--white-bg);
}

    .search-pill {
        position: relative;
        display: flex;
        align-items: center;
    }

    .clear-search {
        position: absolute;
        right: 10px;
        color: #94a3b8;
        transition: color 0.2s;
        z-index: 5;
    }

    .clear-search:hover {
        color: #64748b;
    }

    /* Evita che il testo finisca sotto la X */
    #searchAdmin {
        padding-right: 30px !important;
    }

/* ===============================
   MAILING & LOG SPECIFICS
================================ */

.mailing-card, .card-stat, .card-stat-log, .card-stat-mailing {
    border-left: 5px solid var(--primary-color) !important;
}

.badge-edison {
    background-color: rgba(16, 54, 122, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(16, 54, 122, 0.2);
    font-weight: 700;
}

.alert-edison {
    background-color: #f8fafc;
    border-left: 5px solid var(--primary-color);
    color: #1e293b;
    border-radius: 12px;
}

.email-preview-container {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
}

.preview-label {
    background: var(--primary-color);
    padding: 5px 20px;
    border-radius: 20px;
    display: inline-block;
    font-size: 0.70rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 10px;
}

/* ===============================
   DASHBOARD & DOCS
=============================== */

.status-ring {
    width: 45px; height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.doc-scroll-area {
    max-height: 420px;
    overflow-y: auto;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.doc-scroll-area:hover {
    border-color: var(--primary-color);
}

/* ===============================
   SWEETALERT STYLE
================================ */
.swal2-confirm {
    background-color: var(--primary-color) !important;
    border-radius: 50px !important;
}

.swal2-popup {
  width: 420px !important;
  padding: 2em !important;
  border-radius: 14px !important;
}

.swal2-title {
  font-size: 1.35rem !important;
  font-weight: 600 !important;
  color: var(--text-color);
}

.swal2-html-container {
  font-size: 0.95rem !important;
  color: var(--text-muted);
  line-height: 1.5;
}

.swal2-icon {
  margin-bottom: 10px;
}

.swal2-confirm {
  border-radius: 10px !important;
  padding: 10px 22px !important;
  font-weight: 600 !important;
}

.swal2-cancel {
  border-radius: 10px !important;
  padding: 10px 22px !important;
}


/* 3. STILI COMPONENTI BASE (Bottoni, Card, Navbar)
 * ---------------------------------------- */

 /* ===============================
   TITOLI
=============================== */
h1,h2,h3,h4,h5,h6{
    font-weight:600;
    letter-spacing:-0.01em;
    color: var(--primary-color);
}

/* ===============================
   TABLE / UI TEXT
=============================== */
.table{
    font-size:13.5px;
}

/* Navbar */
.navbar.fixed-top {
  height: var(--navbar-height);
  z-index: 1050; /* Mette la navbar sopra a tutto */
}
.navbar-brand {
  font-weight: 700;
  font-size: 1.4rem;
}

/* Bottoni */
.btn {
  border-radius: var(--border-radius-pill);
  font-size:13px;
  padding: 0.6rem 1.25rem;
  transition: all 0.2s ease-in-out;
}
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}
.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 87, 183, 0.25);
}
.btn-success {
  background-color: var(--success-color);
  border-color: var(--success-color);
}
.btn-success:hover {
  background-color: #146c43;
  border-color: #146c43;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(25, 135, 84, 0.25);
}

/* --- TEMA UNIFICATO EDISON --- */
    :root {
        --edison-blue: #10367A;
    }

    /* 1. PAGINAZIONE: Colore dei numeri e bordi */
    .pagination .page-link {
        color: var(--edison-blue) !important;
        border-color: #dee2e6; /* Grigio standard per i bordi */
    }

    /* Pagina attiva */
    .pagination .page-item.active .page-link {
        background-color: var(--edison-blue) !important;
        border-color: var(--edison-blue) !important;
        color: white !important;
    }

    /* Effetto hover sui numeri */
    .pagination .page-link:hover {
        background-color: #f8fafc;
        color: var(--edison-blue) !important;
    }

    /* Stato disabilitato */
    .pagination .page-item.disabled .page-link {
        color: #6c757d !important;
    }

    /* 2. BOTTONE REINVIA / OUTLINE GENERALE */
    .btn-outline-edison {
        color: var(--edison-blue) !important;
        border-color: var(--edison-blue) !important;
        background-color: transparent;
        transition: all 0.2s;
    }

    .btn-outline-edison:hover {
        background-color: var(--edison-blue) !important;
        color: white !important;
    }

    /* 3. BOTTONE PIENO EDISON (Primary) */
    .bg-edison, .btn-edison {
        background-color: var(--edison-blue) !important;
        color: white !important;
        border: none;
    }

/* Card */
.card {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-base);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  background-color: var(--white-bg);
}

/* Override dei colori di Bootstrap per usare le nostre variabili */
.bg-primary {
  background-color: var(--primary-color) !important;
}

.text-primary {
  color: var(--primary-color) !important;
}

.btn-sm, .btn-group-sm > .btn {
  /* Il valore di default di Bootstrap è circa 0.25rem (sopra/sotto) e 0.5rem (lati).
    Noi li riduciamo. Gioca con questi due valori:
  */
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
  padding-left: 0.6rem;  /* Lasciamo un po' di spazio laterale */
  padding-right: 0.6rem;

  /* Puoi anche ridurre un po' il font se sembrano ancora grandi */
  /* font-size: 0.85rem; */
}

/* navbar_ext.php
 * ---------------------------------------- */
    /* NAVBAR DESIGN "EDISON" ESTERNA */
    .navbar-edison-ext {
        background: var(--primary-color) !important;
        backdrop-filter: blur(10px);
        padding: 0.75rem 0;
        border-bottom: none !important;
    }

    .navbar-brand-ext {
        letter-spacing: -0.5px;
        font-size: 1.4rem;
        transition: transform 0.2s;
    }
    .navbar-brand-ext:hover { transform: scale(1.02); }

    /* FIX PER MOBILE (Evita sovrapposizioni e trasparenze) */
    @media (max-width: 991.98px) {
        .navbar-collapse {
            background-color: var(--primary-color) !important;
            border-radius: 1.5rem;
            margin-top: 15px;
            padding: 1rem;
            box-shadow: 0 15px 40px rgba(0,0,0,0.4);
            z-index: 1050;
        }
        .navbar-edison-ext {
            backdrop-filter: none !important;
        }
    }

/* navbar.php
 * ---------------------------------------- */

    /* NAVBAR DESIGN "SPACCA" */
    .navbar-edison {
        background: var(--primary-color) !important;
        backdrop-filter: blur(10px);
        border-bottom: none !important;
        padding: 0.75rem 0;
    }

    .navbar-brand {
        letter-spacing: -0.5px;
        font-size: 1.4rem;
        transition: transform 0.2s;
    }
    .navbar-brand:hover { transform: scale(1.02); }

    /* MENU CENTRALE A PILLOLA */
    .nav-custom-pills .nav-link {
        color: rgba(255,255,255,0.8) !important;
        font-weight: 500;
        padding: 0.6rem 1.2rem !important;
        border-radius: 50px;
        transition: all 0.3s ease;
        margin: 0 2px;
        border-bottom: none !important;
        text-decoration: none !important;
    }

    .nav-custom-pills .nav-link:hover {
        color: #fff !important;
        background: rgba(255,255,255,0.1);
    }

    .nav-custom-pills .nav-link.active {
        color: var(--primary-color) !important;
        background: #fff !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        border-bottom: none !important;
    }

    /* AREA UTENTE E DROPDOWN */
    .user-pill {
        background: rgba(255,255,255,0.1);
        padding: 5px 15px 5px 8px;
        border-radius: 50px;
        border: 1px solid rgba(255,255,255,0.2);
        transition: all 0.3s;
    }
    .user-pill:hover {
        background: rgba(255,255,255,0.2);
    }

    .dropdown-menu-modern {
        border: none !important;
        box-shadow: 0 15px 35px rgba(0,0,0,0.2) !important;
        border-radius: 1.2rem !important;
        padding: 1rem !important;
        min-width: 240px;
        margin-top: 15px !important;
    }

    .dropdown-item {
        padding: 0.7rem 1rem !important;
        border-radius: 0.8rem !important;
        font-weight: 500;
        color: #4b5563;
        display: flex;
        align-items: center;
        transition: all 0.2s;
    }

    .dropdown-item i {
        font-size: 1.1rem;
        margin-right: 12px;
        width: 20px;
        text-align: center;
    }

    .dropdown-item:hover {
        background-color: var(--light-bg) !important;
        color: var(--primary-color) !important;
        transform: translateX(5px);
    }

    .dropdown-item.active {
        background-color: var(--primary-color) !important;
        color: #fff !important;
    }

    .admin-section-header {
        font-size: 0.7rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: #9ca3af;
        padding: 0.5rem 1rem;
    }

    .logout-item:hover {
        background-color: #fef2f2 !important;
        color: #dc2626 !important;
    }

    /* FIX PER IL MENU MOBILE (MOBILE & TABLET) */
    @media (max-width: 991.98px) {
        .navbar-collapse {
            /* Diamo un colore solido e scuriamo leggermente per distacco */
            background-color: var(--primary-color) !important;
            /* Arrotondiamo il menu a tendina per stile Edison */
            border-radius: 1.5rem;
            margin-top: 15px;
            padding: 1.5rem;
            /* Ombra profonda per "staccare" dal contenuto della pagina */
            box-shadow: 0 15px 40px rgba(0,0,0,0.4);
            /* Assicuriamo che stia sopra a tutto */
            z-index: 1050;
        }

        /* Allineiamo le pillole al centro su mobile */
        .nav-custom-pills .nav-link {
            margin: 5px 0;
            text-align: center;
        }

        /* Adattiamo l'area utente su mobile per non sbordare */
        .user-pill {
            width: 100%;
            justify-content: center;
            margin-top: 15px;
        }
        
        /* Correzione per evitare l'effetto "trasparenza" che fa intravedere i testi sotto */
        .navbar-edison {
            backdrop-filter: none !important; /* Disabilitiamo il blur su mobile per stabilità */
        }
    }

/* ===========================
   PRATICHE - TABELLA SUPER COMPATTA
=========================== */

.table-pratiche-compact{
    font-size:12px;
}

.table-pratiche-compact thead th{
    font-size:11.5px;
    font-weight:600;
    padding:8px 10px;
    white-space:nowrap;
}

.table-pratiche-compact tbody td{
    padding:6px 10px;
    white-space:nowrap;
    vertical-align:middle;
}

.table-pratiche-compact .btn-sm{
    font-size:11.5px;
    padding:0.08rem 0.5rem;
    border-radius:999px;
}

.table-pratiche-compact .badge{
    font-size:11px;
    padding:0.28rem 0.55rem;
}

/* Colonna Sotto categoria (6) e Note (10) possono andare a capo */
.table-pratiche-compact td:nth-child(6),
.table-pratiche-compact th:nth-child(6),
.table-pratiche-compact td:nth-child(10),
.table-pratiche-compact th:nth-child(10){
    white-space:normal;
}

/* Limita larghezza per evitare tabella enorme */
.table-pratiche-compact td:nth-child(6){
    max-width:340px;
}

.table-pratiche-compact td:nth-child(10){
    max-width:260px;
}

/* Se vuoi ancora più “tight” */
.table-pratiche-compact tbody tr{
    line-height:1.15;
}

/* pulsanti disabilitati revisione pratiche */

.btn-disabled{
background:#d6d6d6 !important;
border-color:#d6d6d6 !important;
color:#888 !important;
cursor:not-allowed !important;
box-shadow:none !important;
}

.btn-disabled:hover{
background:#d6d6d6 !important;
border-color:#d6d6d6 !important;
color:#888 !important;
}

/* pulsanti disabilitati più chiari */

.btn-secondary:disabled{
background-color:#e9ecef !important;
border-color:#e9ecef !important;
color:#6c757d !important;
opacity:1;
}

/* pulsanti disabilitati grigio medio */

.btn-disabled-soft{
background:#dee2e6 !important;
border-color:#dee2e6 !important;
color:#6c757d !important;
cursor:not-allowed;
}

.btn-disabled-soft:hover{
background:#dee2e6 !important;
border-color:#dee2e6 !important;
color:#6c757d !important;
}

/* ===========================
   PRATICHE - FILTER BAR
=========================== */

.pratiche-filters{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:12px 14px;
    background:var(--white-bg);
    border:1px solid var(--border-color);
    border-radius:16px;
    box-shadow:0 3px 10px rgba(0,0,0,0.04);
}

.pratiche-filters-left{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

.pratiche-filters-right{
    display:flex;
    align-items:center;
    gap:10px;
}

.search-pill{
    display:flex;
    align-items:center;
    gap:8px;
    padding:6px 10px;
    border:1px solid var(--border-color);
    border-radius:999px;
    background:var(--white-bg);
    box-shadow:0 2px 8px rgba(0,0,0,0.04);
    transition:all .2s ease;
    min-height:36px;
    width:280px;
    max-width:42vw;
}

.search-pill:hover{
    border-color:rgba(0,87,183,0.35);
    box-shadow:0 6px 16px rgba(0,0,0,0.06);
}

.search-pill:focus-within{
    border-color:var(--primary-color);
    box-shadow:0 0 0 0.2rem rgba(0,87,183,0.18);
}

.search-pill i{
    font-size:14px;
    color:var(--primary-color);
    opacity:.9;
}

.search-pill .form-control{
    border:0 !important;
    box-shadow:none !important;
    padding:0 !important;
    background:transparent !important;
    font-size:13px;
    font-weight:500;
}

@media (max-width: 768px){
    .pratiche-filters{
        flex-direction:column;
        align-items:stretch;
    }
    .search-pill{
        width:100%;
        max-width:100%;
    }
}

/* 3.1 STILI NAVBAR MOBILE (Menu a tendina)
 * ---------------------------------------- */

/* Si applica solo a schermi più piccoli di 992px (il breakpoint 'lg' di Bootstrap) */
/* 3.1 STILI NAVBAR MOBILE (Menu a tendina)
 * ---------------------------------------- */

/* Si applica solo a schermi più piccoli di 992px */
@media (max-width: 991.98px) {
  
  /* --- Stile per NAVBAR UTENTE (BLU) --- */
  .navbar.bg-primary .navbar-collapse {
    background-color: var(--primary-color);
    margin-top: 0.5rem;
    border-top: 1px solid var(--primary-dark);
    border-bottom-left-radius: var(--border-radius-base);
    border-bottom-right-radius: var(--border-radius-base);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem;
  }
  .navbar.bg-primary .nav-link:hover {
    background-color: var(--primary-dark);
  }

  
  /* --- Stile per NAVBAR ADMIN (NERA) --- */
  .navbar.bg-dark .navbar-collapse {
    background-color: #212529; /* Colore bg-dark di Bootstrap */
    margin-top: 0.5rem;
    border-top: 1px solid #444; /* Bordo grigio scuro */
    border-bottom-left-radius: var(--border-radius-base);
    border-bottom-right-radius: var(--border-radius-base);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem;
  }
  .navbar.bg-dark .nav-link:hover {
    background-color: #343a40; /* Grigio più scuro per hover */
  }


  /* --- Regole COMUNI per entrambi i menu mobile --- */
  .navbar-nav .nav-item.me-3 {
    margin-right: 0 !important;
  }
  .navbar-nav .nav-link {
    padding: 0.75rem 0.5rem;
    border-radius: var(--border-radius-base);
  }
  .navbar-nav .dropdown-toggle {
    display: flex;
    align-items: center;
  }
  .navbar-nav .dropdown-toggle .bi-person-circle {
    font-size: 1.5rem;
  }
}

/* 4. STILI SPECIFICI PAGINA (Form, Step)
 * ---------------------------------------- */

/* Step 1: Codice Invito */
#login-container {
  max-width: 500px;
}

#register-container {
  max-width: 800px;
}

#step1 {
  max-width: 550px; /* Più stretto del form */
  margin-left: auto;
  margin-right: auto;
}
#step1 .card {
  border-top: 4px solid var(--primary-color);
}
#msgErrore {
  font-weight: 600;
}

/* Step 2: Form Registrazione */
#step2 .form-label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: #333;
}

#login-card .form-label{
  margin-bottom: 0.1rem;
}

.form-control,
.form-select {
  border-radius: var(--border-radius-base);
  border-color: var(--border-color);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(0, 87, 183, 0.25);
}

/* Rende leggibili i campi disabilitati/readonly */
.form-control:disabled, 
.form-control[readonly],
.form-select:disabled {
  background-color: #e9ecef;
  opacity: 1;
  color: #495057;
}

.form-check-label a {
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
}
.form-check-label a:hover {
  text-decoration: underline;
}

/* Stile per il box di login (aggiunge bordo blu) */
#login-card {
  border-top: 4px solid var(--primary-color);
}

/* pagina iscrizioni admin */
#admin-iscrizioni-container {
  max-width: 1320px;
}

#dashboard-container {
  max-width: 960px;
}

/* * pagina di iscrizione */
#iscrizione-container {
  max-width: 800px;
}

#calendario-container {
  max-width: 1140px; 
}

#documenti-container {
  max-width: 1140px; /* Come il calendario, ottima per tabelle */
}

/* * pagina di upload */
#upload-container {
  max-width: 700px; /* La larghezza che avevi scelto, ora è in CSS */
}

/* * lista eventi admin */
#admin-eventi-container {
  max-width: 1140px; /* Ideale per tabelle */
}

/* * lista documenti admin */
#admin-documenti-container {
  max-width: 1140px; /* Ideale per tabelle */
}

/* * pagina mailing admin */
#admin-mailing-container {
  max-width: 1140px; 
}

#admin-soci-container {
  max-width: 1140px; 
}


/* ========================================
   admin/eventi.php
======================================== */

/* Contenitore principale dei filtri */
.eventi-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.eventi-filters-left, .eventi-filters-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* La pillola per la SELECT */
.select-pill-eventi {
    display: flex;
    align-items: center;
    padding: 2px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
    min-width: 200px;
}

.select-pill-eventi select {
    cursor: pointer;
    font-weight: 500;
}

/* La pillola per la RICERCA */
.search-pill-eventi {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    background: #f1f5f9; /* Grigio leggermente più scuro */
    width: 280px;
}

.search-pill-eventi i {
    color: var(--primary-color);
    font-size: 14px;
}

.search-pill-eventi .form-control {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    font-size: 13px;
    font-weight: 500;
}

/* Responsive: su mobile vanno uno sotto l'altro */
@media (max-width: 768px) {
    .eventi-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .search-pill-eventi {
        width: 100%;
    }
}

/* PULSANTI AZIONE ADMIN - RE-DESIGN */
.btn-action-admin {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px !important; /* Arrotondati ma non cerchi perfetti, più moderni */
    border: none !important;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

/* Hover generico */
.btn-action-admin:hover {
    transform: translateY(-2px);
    filter: brightness(0.95);
}

/* Colori Pastello Specifici (Coerenti con pratiche.php) */
.btn-iscritti-subtle { background-color: #e0f2fe !important; color: #0369a1 !important; } /* Azzurro */
.btn-pdf-subtle      { background-color: #f1f5f9 !important; color: #475569 !important; } /* Grigio/Slate */
.btn-edit-subtle     { background-color: #e0e7ff !important; color: #4338ca !important; } /* Indigo/Blu */
.btn-del-subtle      { background-color: #fee2e2 !important; color: #b91c1c !important; } /* Rosso */

/* Icone all'interno */
.btn-action-admin i {
    font-size: 14px;
}

.pdf-gutter { width: 35px; flex-shrink: 0; display: flex; align-items: center; justify-content: flex-start; }
.th-evento-allineato { padding-left: 45px !important; }

.table-scroll-container {
    max-height: 500px; /* Altezza massima della tabella */
    overflow-y: auto;  /* Attiva lo scroll verticale */
    position: relative;
}

/* Rende l'intestazione fissa durante lo scroll */
.table-scroll-container thead th {
    position: sticky;
    top: 0;
    background-color: #fff; /* O il colore del tuo header */
    z-index: 10;
    box-shadow: inset 0 -1px 0 #dee2e6; /* Linea di divisione */
}

/* La card non deve avere altezza fissa, così si adatta se ci sono pochi risultati */
.mailing-card {
    display: flex;
    flex-direction: column;
}

/* Il footer deve essere compatto */
.card-footer-fixed {
    background: #fff; /* Bianco pulito */
    padding: 10px 24px !important; /* Ridotto il padding verticale a 10px */
    min-height: 45px; /* Altezza minima contenuta */
}



/* ========================================
   eventi.php
======================================== */
/* Opacità ridotta per le righe dopo il separatore (storico) */
#tabellaEventi tr.bg-light ~ tr {
    opacity: 0.7;
    background-color: #fafafa;
}

#tabellaEventi tr.bg-light ~ tr:hover {
    opacity: 1;
}

/* 1. Barra Filtri Specifica */
.calendario-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.04);
}

/* 2. Tabella Calendario */
.table-calendario-compact thead th {
    background-color: #f8fafc !important;
    color: #6b7280 !important; /* Grigio ardesia */
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 12px 15px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    font-weight: 600 !important;
}

.table-calendario-compact tbody td {
    padding: 10px 15px !important;
    vertical-align: middle !important;
}

/* 3. Bottoni Azione Uniformi (Risolve lo scalino) */
.btn-calendario-action {
    min-width: 105px; /* Larghezza fissa per allineamento perfetto */
    justify-content: center;
    display: inline-flex;
    align-items: center;
    font-weight: 700 !important;
    font-size: 11px !important;
    padding: 6px 12px !important;
    border-radius: 50px !important;
    height: 32px;
}

.btn-calendario-secondary {
    background-color: rgba(16, 54, 122, 0.05) !important;
    border: 1px solid rgba(16, 54, 122, 0.15) !important;
    color: #10367A !important;
    text-decoration: none !important; /* <--- AGGIUNGI QUESTA */
    min-width: 105px;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    font-weight: 700 !important;
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px !important;
    border-radius: 50px !important;
    height: 32px;
}

.btn-calendario-primary {
    background-color: #10367A !important;
    color: #ffffff !important;
    text-decoration: none !important;
    min-width: 105px;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    font-weight: 700 !important;
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px !important;
    border-radius: 50px !important;
    height: 32px;
    border: none !important;
}

/* Rimuove la sottolineatura anche quando ci passi sopra col mouse */
.btn-calendario-secondary:hover, 
.btn-calendario-primary:hover {
    text-decoration: none !important;
    color: #fff !important; /* Solo per il secondario che cambia colore */
}

/* PULSANTE PDF NELLA TABELLA (Pillola sottile) */
.btn-pdf-pill {
    background-color: rgba(16, 54, 122, 0.05) !important; /* Blu chiarissimo */
    border: 1px solid rgba(16, 54, 122, 0.15) !important;
    color: #10367A !important;
    width: 42px;
    height: 28px; /* Più bassa e allungata come una pillola */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.btn-pdf-pill:hover {
    background-color: #10367A !important;
    color: #fff !important;
}

.btn-pdf-pill i {
    font-size: 14px;
    line-height: 1;
}

/* PULSANTE CALENDARIO (Header) */
.btn-cal-header {
    background-color: #fff !important;
    border: 1px solid rgba(16, 54, 122, 0.2) !important;
    color: #10367A !important;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important; /* Cerchio perfetto */
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.btn-cal-header:hover {
    background-color: #f8fafc !important;
    border-color: #10367A !important;
    transform: translateY(-1px);
}

.btn-iscritti-pill {
    background-color: #e0f2fe; /* Azzurro pastello */
    color: #0369a1; /* Testo blu scuro */
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    border: 1px solid #bae6fd;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-iscritti-pill:hover {
    background-color: #bae6fd;
    color: #0c4a6e;
    transform: translateY(-1px);
}

/* STATO: ISCRIZIONI APERTE (Azzurro) */
.badge-aperto {
    background-color: #e0f2fe !important; /* Sfondo azzurro chiaro */
    color: #0369a1 !important;            /* Testo blu scuro */
    border: 1px solid #bae6fd !important;
}

/* STATO: CONFERMATA (Verde) */
.badge-confermata {
    background-color: #dcfce7 !important; /* Sfondo verde chiaro */
    color: #166534 !important;            /* Testo verde bosco */
    border: 1px solid #bbf7d0 !important;
}

/* STATO: IN VALUTAZIONE (Giallo/Arancio) */
.badge-valutazione {
    background-color: #fef9c3 !important;
    color: #854d0e !important;
    border: 1px solid #fef08a !important;
}

/* STATO: CHIUSO/CONCLUSO (Grigio) */
.badge-chiuso {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}

.badge-concluso {
    background-color: #f8fafc; /* Grigio ANCORA più chiaro (quasi bianco) */
    color: #94a3b8; /* Testo grigio chiaro, meno leggibile per indicare che è passato */
    border: 1px solid #f1f5f9;
    opacity: 0.8; /* Aggiungiamo una leggera trasparenza per spegnerlo ulteriormente */
}

/* Fix per la card principale: aggiunge il bordino blu istituzionale a sinistra */
.mailing-card {
    border-left: 6px solid var(--primary-color) !important;
}

/* Stile per le righe a cui sei iscritto: verde Edison molto soft */
.bg-success-subtle.bg-opacity-10 {
    background-color: rgba(25, 135, 84, 0.08) !important;
}

/* Compattezza intestazione tabella eventi */
#tabellaEventi thead th {
    background-color: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b !important;
    font-size: 11px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 12px 15px;
}

/* Hover righe più elegante */
#tabellaEventi tbody tr {
    transition: background-color 0.2s ease;
}

#tabellaEventi tbody tr:hover {
    background-color: #f1f5f9 !important;
}

/* Allineamento selettori barra filtri */
.pratiche-filters .select-pill select {
    border: 1px solid #dee2e6;
    border-radius: 50px;
    padding-left: 35px; /* Spazio per l'icona SVG */
    background-color: #fff;
    cursor: pointer;
    font-weight: 500;
}

/* Icone badge nella tabella */
.smaller i {
    width: 16px;
    text-align: center;
}


/* PULSANTI AZIONE - QUADROTTO ARROTONDATO ESATTO */
.btn-action-admin {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px !important; /* La curva morbida dello screen */
    border: none !important;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.btn-action-admin:hover {
    transform: translateY(-2px);
    filter: brightness(0.95);
}

.btn-action-admin i {
    font-size: 16px;
}

/* Palette Pastello richiesta */
.btn-iscritti-subtle { background-color: #e0f2fe !important; color: #0369a1 !important; } /* Azzurro (Utenti) */
.btn-pdf-subtle      { background-color: #f1f5f9 !important; color: #475569 !important; } /* Grigio (PDF) */
.btn-edit-subtle     { background-color: #e0e7ff !important; color: #4338ca !important; } /* Indigo (Edit) */
.btn-del-subtle      { background-color: #fee2e2 !important; color: #b91c1c !important; } /* Rosso (Trash) */

/* Badge di stato (Pillole leggere) */
.badge-edison-status {
    border: none !important;
    padding: 6px 12px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    border-radius: 50px !important;
}


/* Stile cella data doppia */
.cella-data-doppia {
    min-width: 120px;
    vertical-align: middle !important;
}

.badge-data-label {
    font-size: 9px;
    font-weight: 800;
    color: #94a3b8; /* Grigio slate leggero */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    display: block;
}

.date-wrapper .main-text {
    font-size: 13px !important;
}

/* ========================================
   eventi_grafico.php
======================================== */
    /* Griglia a dimensione fissa  */
    .calendar-grid { 
        display: grid; 
        grid-template-columns: repeat(7, 1fr); 
        border: 1px solid #e2e8f0; 
        background: #f1f5f9; 
        gap: 1px; 
        border-radius: 12px; 
        overflow: hidden; 
    }
    .cal-header { 
        background: #10367A; 
        color: white; 
        text-align: center; 
        padding: 10px; 
        font-size: 11px; 
        font-weight: 700; 
        text-transform: uppercase; 
    }
    .cal-day {
        height: 100px; /* Altezza FISSA per box tutti uguali */
        background: white; 
        padding: 6px; 
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .cal-day.empty { background: #f8fafc; }
    .cal-day.today { background: #f0f7ff; }
    .day-num { font-size: 10px; font-weight: 800; color: #cbd5e1; margin-bottom: 8px; }
    .today .day-num { color: #10367A; }

    /* Contenitore eventi interno con scroll se necessario */
    .events-scroll-container {
        flex-grow: 1;
        overflow-y: auto;
        scrollbar-width: none; /* Nasconde scrollbar su Firefox */
        -ms-overflow-style: none; /* Nasconde scrollbar su IE/Edge */
    }
    .events-scroll-container::-webkit-scrollbar { display: none; } /* Nasconde scrollbar su Chrome/Safari */

    .event-tag { 
        font-size: 9px; 
        padding: 4px 6px; 
        border-radius: 4px; 
        margin-bottom: 4px; 
        display: flex; 
        align-items: flex-start; /* Allinea l'icona in alto se il testo va a capo */
        text-decoration: none; 
        border-left: 3px solid rgba(0,0,0,0.1); 
        font-weight: 700; 
        line-height: 1.2;
        
        /* Modifiche per il ritorno a capo */
        white-space: normal;       /* Permette il ritorno a capo standard */
        word-wrap: break-word;     /* Rompe parole troppo lunghe se necessario */
        overflow: visible;         /* Assicura che il testo non venga nascosto */
        text-overflow: clip;       /* Rimuove i puntini sospensivi */
    }

    /* Piccola rifinitura per l'icona quando il testo è multi-riga */
    .event-tag i {
        margin-top: 2px;
        min-width: 12px;
    }
    .event-tag:hover { filter: brightness(0.95); color: inherit; }
    .month-nav-box { background: white; border-radius: 50px; padding: 8px 25px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }


/* ========================================
   iscrizione_evento.php
======================================== */

/* Trova questa riga e cambia da 800px a 1140px (o 1000px se preferisci più compatto) */
#iscrizione-container {
    max-width: 1000px; /* Larghezza standard Edison per tabelle e moduli ampi */
    margin: 0 auto;
}

.iscrizione-evento-card {
    border: none !important;
    border-left: 6px solid #10367A !important; /* Firma visiva Edison */
    border-radius: 20px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05) !important;
}

.event-detail-box {
    background-color: #f8fafc;
    border-radius: 12px;
    padding: 15px 20px;
    border: 1px solid #e2e8f0;
}

.btn-programma-edison {
    background-color: rgba(16, 54, 122, 0.05) !important; /* Fondo blu chiarissimo */
    border: 1px solid rgba(16, 54, 122, 0.15) !important;
    color: #10367A !important; /* Testo Blu Edison */
    font-weight: 700 !important;
    padding: 10px 22px !important;
    border-radius: 50px !important; /* Pillola perfetta */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 12px !important;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
}

.btn-programma-edison i {
    font-size: 15px;
    margin-right: 8px;
    color: #10367A;
    transition: color 0.3s ease;
}

/* Effetto Hover: inversione colori e ombra */
.btn-programma-edison:hover {
    background-color: #10367A !important;
    color: #ffffff !important;
    border-color: #10367A !important;
    box-shadow: 0 4px 12px rgba(16, 54, 122, 0.25);
    transform: translateY(-1px);
}

.btn-programma-edison:hover i {
    color: #ffffff;
}

/* Miglioramento spaziatura etichette nella card iscrizione */
#iscrizione-container .label-edison {
    font-size: 0.65rem;
    font-weight: 800;
    color: #64748b;
}

/* Bilanciamento titolo evento */
#iscrizione-container h3.text-dark {
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* PULSANTE PDF (Header) */
.btn-pdf-header {
    background-color: #fff !important;
    border: 1px solid rgba(16, 54, 122, 0.2) !important;
    color: #10367A !important;
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important; /* Cerchio perfetto */
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.btn-pdf-header:hover {
    background-color: #f8fafc !important;
    border-color: #10367A !important;
    transform: translateY(-1px);
}

.btn-pdf-header i {
    font-size: 26px;
}


/* ========================================
   mailing_new.php
======================================== */
    .mailing-card { border-left: 4px solid var(--primary-color) !important; }
    .attachment-badge { font-size: 0.75rem; padding: 5px 10px; }
    .tox-tinymce { border-radius: 12px !important; border: 1px solid var(--border-color) !important; }

    /* STILE EDISON - MAILING NEW */
    .mailing-card { 
        border: none !important; 
        border-left: 5px solid #10367A !important; 
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05); 
    }
    
    .form-section-title {
        font-size: 0.75rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 1.2px;
        color: #94a3b8;
        margin-bottom: 1.5rem;
        display: flex;
        align-items: center;
    }
    
    .form-section-title::after {
        content: "";
        flex-grow: 1;
        height: 1px;
        background: #f1f5f9;
        margin-left: 15px;
    }

    .label-edison { 
        font-size: 0.85rem; 
        font-weight: 700; 
        color: #1e293b; 
        margin-bottom: 8px; 
    }

    /* Badge Destinatari Pastello */
    #badge_count {
        font-size: 0.75rem;
        font-weight: 700;
        padding: 0.5rem 1rem;
    }


    .drop-zone { transition: all 0.3s ease; border-width: 2px !important; }
    .drop-zone.dragover { background-color: rgba(16, 54, 122, 0.1) !important; border-color: #10367A !important; border-style: solid !important; }

    .drop-zone {
        min-height: 150px;
        height: auto !important; /* Permette al box di allungarsi se carichi molti file */
        transition: all 0.3s ease;
    }
    #existing_files_container {
        position: relative;
        z-index: 10; /* Per essere sicuri che la 'X' sia cliccabile sopra l'input proxy */
    }

    /* L'input deve coprire l'area ma stare sotto la lista dei file se presente */
    #attachments_proxy {
        z-index: 5;
    }

    /* La preview deve stare sopra l'input per permettere il click sulla X */
    #file_list_preview {
        position: relative;
        z-index: 10;
    }


/* ========================================
   mailing_review.php
======================================== */
    /* Styling specifico per la tabella dei destinatari */
    .recipient-scroll-area {
        max-height: 400px;
        overflow-y: auto;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        background: #fff;
    }
    /* Scrollbar sottile Edison style */
    .recipient-scroll-area::-webkit-scrollbar { width: 5px; }
    .recipient-scroll-area::-webkit-scrollbar-thumb { background-color: var(--border-color); border-radius: 10px; }

    .table-recipients thead th {
        position: sticky;
        top: 0;
        background: #f8f9fa;
        z-index: 10;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #6c757d;
        border-bottom-width: 1px;
    }
    
    .mailing-card { border-left: 4px solid var(--primary-color) !important; }

    /* STILE EDISON ORIGINALE */
    .mailing-card { border: none !important; border-left: 5px solid #10367A !important; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05); }
    .bg-edison { background-color: #10367A !important; color: white !important; }
    .text-edison { color: #10367A !important; }
    .badge-edison { background-color: rgba(16, 54, 122, 0.1); color: #10367A; border: 1px solid rgba(16, 54, 122, 0.2); font-weight: 700; }
    
    .alert-edison { background: #f8fafc; border: none; border-left: 5px solid #10367A; border-radius: 12px; color: #1e293b; }
    
    .search-pill { background: #f1f5f9; border-radius: 50px; padding: 8px 20px; border: 1px solid #e2e8f0; display: flex; align-items: center; width: 100%; max-width: 350px; }
    .search-pill input { background: transparent; border: none; outline: none; width: 100%; margin-left: 10px; font-size: 0.85rem; }

    /* Anteprima Email */
    .email-preview-container { background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 30px; box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); max-height: 500px; overflow-y: auto; }
    .preview-label { background: #10367A; padding: 5px 20px; border-radius: 20px; display: inline-block; font-size: 0.70rem; font-weight: 800; text-transform: uppercase; color: #fff; margin-bottom: 10px; }

    /* Correzioni Tabella per coerenza pratiche.php */
    .table-mailing-review-compact thead tr { font-size: 11px; color: #6b7280; letter-spacing: 0.5px; }

    .table-scroll-mailing{
        max-height:330px;
        overflow-y:auto;
    }

    .table-scroll-mailing table{
        margin-bottom:0;
    }

    .table-scroll-mailing thead th{
        position:sticky;
        top:0;
        background:#f8f9fa;
        z-index:5;
    }

    #recipientTable tbody tr{
        contain: layout style;
    }


/* ========================================
   mailing_list.php
======================================== */
    .card-stat-mailing { border-left: 4px solid var(--primary-color) !important; }
    .table-mailing thead th { 
        font-size: 0.75rem; 
        text-transform: uppercase; 
        letter-spacing: 0.5px; 
        color: #6c757d; 
        background-color: #f8f9fa; 
        border-top: none;
    }
    .stats-pill { font-size: 0.75rem; font-weight: 700; }
    

    .btn-action-sm { 
        width: 30px; 
        height: 30px; 
        display: inline-flex; 
        align-items: center; 
        justify-content: center; 
        border-radius: 12px; 
        transition: all 0.2s ease; 
        border: none !important;
        text-decoration: none !important;
        margin-left: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    .btn-action-sm i {
        font-size: 0.85rem !important;
        text-decoration: none !important;
    }

    /* DUPLICA: Blu Edison (Sfondo chiarissimo, Icona scura) */
    .btn-duplicate { background-color: #e7ebf2; color: #10367A; }
    .btn-duplicate:hover { background-color: #10367A; color: white; transform: translateY(-2px); }

    /* VISUALIZZA: Grigio Professionale (meno giallo, più neutro) */
    .btn-view { background-color: #f0f2f5; color: #5a6a85; }
    .btn-view:hover { background-color: #5a6a85; color: white; transform: translateY(-2px); }

    /* MODIFICA: Oro/Ambra (più elegante del solito arancio) */
    .btn-edit { background-color: #fff8e6; color: #b08905; }
    .btn-edit:hover { background-color: #b08905; color: white; transform: translateY(-2px); }

    /* STOP: Rosso Mattone / Bordeaux (più serio del rosso fragola) */
    .btn-stop { background-color: #fdeaea; color: #c92a2a; }
    .btn-stop:hover { background-color: #c92a2a; color: white; transform: translateY(-2px); }

    /* RESUME: Verde Petrolio/Scuro */
    .btn-resume { background-color: #e6f6f4; color: #087f5b; }
    .btn-resume:hover { background-color: #087f5b; color: white; transform: translateY(-2px); }


    .attachment-badge {
        background-color: #f8f9fa; /* Sfondo light */
        color: #333;               /* Numero scuro */
        border: 1px solid #dee2e6; /* IL BORDO CHE MANCAVA */
        box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* Leggera profondità */
        border-radius: 50px;       /* Forma a pillola */
        padding: 2px 8px;          /* Spaziatura interna */
        display: inline-flex;
        align-items: center;
        gap: 4px;
        font-size: 11px;
        font-weight: 700;
        height: 26px;              /* Altezza bilanciata */
        transition: all 0.2s;
    }

    .attachment-badge i {
        color: #10367A;            /* Blu Edison per la graffetta */
        font-size: 0.85rem;
    }

    /* Effetto al passaggio del mouse */
    .attachment-badge:hover {
        border-color: #10367A;
        background-color: #fff;
    }


    /* Wrapper per un allineamento perfetto */
    .stats-wrapper {
        display: flex;
        justify-content: space-around;
        gap: 12px;
        background: #f8f9fa; /* Uno sfondo leggerissimo per raggrupparli */
        padding: 6px 10px;
        border-radius: 10px;
        border: 1px solid #edf0f2;
    }

    /* Stile raffinato per ogni statistica */
    .stats-pill {
        display: inline-flex;
        align-items: center;
        font-size: 0.8rem;
        font-weight: 600;
        gap: 5px;
    }

    /* Colori coordinati: meno neon, più professionali */
    .text-pending { color: #856404; } /* Oro antico invece di giallo */
    .text-sent    { color: #2d6a4f; } /* Verde bosco invece di verde brillante */
    .text-error   { color: #a4161a; } /* Rosso granata invece di rosso acceso */

    .stats-pill i {
        font-size: 0.9rem;
        opacity: 0.8;
    }

    .btn-action-admin {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        border: none;
        transition: all 0.2s ease;
        text-decoration: none;
        font-size: 14px;
    }

    /* Stile Blu/Grigio (Visualizza/Modifica) */
    .btn-view-subtle {
        background-color: #f1f5f9;
        color: #475569;
    }
    .btn-view-subtle:hover {
        background-color: #e2e8f0;
        color: #1e293b;
        transform: translateY(-2px);
    }

    /* Stile Rosso (Elimina/Stop) */
    .btn-del-subtle {
        background-color: #fff5f5;
        color: #dc3545;
    }
    .btn-del-subtle:hover {
        background-color: #fee2e2;
        color: #b91c1c;
        transform: translateY(-2px);
    }

    /* Stile Verde (Riprendi) */
    .btn-resume-subtle {
        background-color: #f0fdf4;
        color: #198754;
    }
    .btn-resume-subtle:hover {
        background-color: #dcfce7;
        color: #15803d;
        transform: translateY(-2px);
    }

    /* Stato Disabilitato (Ghost) */
    .btn-action-admin.disabled-ghost {
        opacity: 0.25;
        filter: grayscale(1);
        pointer-events: none;
        cursor: default;
        background-color: #f8fafc;
    }

/* ========================================
   mailing_log.php
======================================== */
    /* LOG & TABELLE */
    .card-stat-log { border-left: 4px solid #10367A !important; }
    
    .table-log thead th {
        background-color: #f8f9fa;
        text-transform: uppercase;
        font-size: 0.7rem;
        letter-spacing: 1px;
        color: #94a3b8;
        padding: 15px 10px;
        border-bottom: 1px solid #edf2f7;
    }

    .btn-table-action { 
        width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; 
        border-radius: 10px; transition: all 0.2s; background: #f1f5f9; color: #10367A; border: none;
    }
    .btn-table-action:hover { background: #10367A; color: white; }

    /* Pulsanti Pill (Edison Style) */
    .btn-edison-pill { 
        border-radius: 50px !important; 
        font-weight: 700; 
        padding: 8px 20px; 
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Modal Styling */
    .modal-header { background-color: #f8f9fa; border-bottom: none; }
    .modal-footer { border-top: none; }
    .label-modal { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; color: #94a3b8; letter-spacing: 0.5px; }


/* ========================================
   mailing_view.php
======================================== */

    /* Colori Istituzionali Edison */
    .bg-edison { background-color: #10367A !important; color: white !important; }
    .text-edison { color: #10367A !important; }
    
    /* Alert e Badge personalizzati */
    .alert-edison { 
        background-color: #f8fafc; 
        border-left: 5px solid #10367A; 
        color: #1e293b;
        border-radius: 12px;
    }
    
    .badge-edison {
        background-color: rgba(16, 54, 122, 0.1);
        color: #10367A;
        border: 1px solid rgba(16, 54, 122, 0.2);
        font-weight: 700;
    }

    .mailing-card { 
        border: none !important; 
        border-top: 5px solid #10367A !important; 
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05); 
    }

    .search-pill {
        background: #f1f5f9;
        border-radius: 50px;
        padding: 10px 20px;
        border: 1px solid #e2e8f0;
        display: flex;
        align-items: center;
    }

    .search-pill input {
        background: transparent;
        border: none;
        outline: none;
        width: 100%;
        margin-left: 10px;
    }

    /* Anteprima Email */
    .email-preview-container {
        background: white;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 30px;
        box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
        max-height: 500px;
        overflow-y: auto;
    }
    .preview-label {
        background: #f8fafc;
        padding: 10px 20px;
        border-radius: 8px 8px 0 0;
        border: 1px solid #e2e8f0;
        border-bottom: none;
        display: inline-block;
        font-size: 0.75rem;
        font-weight: 800;
        text-transform: uppercase;
        color: #64748b;
    }

    .mailing-view-card { border: none !important; border-left: 5px solid #10367A !important; }
    .bg-edison { background-color: #10367A !important; color: white !important; }
    .text-edison { color: #10367A !important; }
    .btn-outline-edison { color: #10367A !important; border-color: #10367A !important; }
    .btn-outline-edison:hover { background-color: #10367A !important; color: white !important; }
    
    /* Tabella Review Style */
    .table-scroll-mailing { max-height: 330px; overflow-y: auto; position: relative; }
    .table-mailing-review-compact thead th { position: sticky; top: 0; background: #f8f9fa; z-index: 10; font-size: 0.7rem; border-bottom: 2px solid #dee2e6; }
    .search-pill { background: #f1f5f9; border-radius: 50px; padding: 6px 15px; display: flex; align-items: center; border: 1px solid #e2e8f0; width: 300px; }
    .search-pill input { border: none; background: transparent; outline: none; margin-left: 10px; font-size: 0.85rem; width: 100%; }
    .badge-edison { background: #10367A; color: white; font-size: 0.85rem; }
    .preview-iframe-wrapper { border-radius: 12px; border: 1px solid #dee2e6; overflow: hidden; background: #fff; }

/* ========================================
   mail_log.php
======================================== */
    .card-stat-log { border-left: 4px solid var(--primary-color) !important; }
    .table-log thead th { 
        font-size: 0.75rem; 
        text-transform: uppercase; 
        letter-spacing: 0.5px; 
        color: #6c757d; 
        background-color: #f8f9fa; 
    }
    .btn-table-action { 
        width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; 
        border-radius: 8px; transition: all 0.2s; background: #f8f9fa; border: 1px solid #dee2e6;
    }
    .btn-table-action:hover { background: var(--primary-color); color: white; border-color: var(--primary-color); }

/* ========================================
   coming_soon.php
======================================== */
    /* Styling specifico per la pagina di attesa Edison Style */
    .coming-soon-wrapper {
        min-height: 70vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .card-coming {
        border-left: 4px solid var(--primary-color) !important;
        max-width: 550px;
        width: 100%;
    }

    .icon-box-work {
        width: 80px;
        height: 80px;
        background: var(--light-bg);
        color: var(--primary-color);
        border-radius: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 25px;
        font-size: 2rem;
        position: relative;
    }

    /* Animazione ingranaggio */
    .gear-animate {
        animation: fa-spin 4s linear infinite;
    }

    .dots-loader {
        display: flex;
        justify-content: center;
        gap: 6px;
        margin-top: 15px;
    }

    .dots-loader span {
        width: 8px;
        height: 8px;
        background-color: var(--primary-color);
        border-radius: 50%;
        display: inline-block;
        opacity: 0.3;
        animation: dots-blink 1.4s infinite both;
    }

    .dots-loader span:nth-child(2) { animation-delay: 0.2s; }
    .dots-loader span:nth-child(3) { animation-delay: 0.4s; }

    @keyframes dots-blink {
        0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
        40% { opacity: 1; transform: scale(1.1); }
    }


/* ========================================
   regolamento.php
======================================== */
    .card-stat-regolamento { border-left: 4px solid var(--primary-color) !important; }
    .sticky-sidebar { position: sticky; top: 100px; z-index: 10; }
    
    .nav-regolamento .nav-link {
        color: #6c757d; font-size: 0.85rem; padding: 6px 12px;
        border-radius: 8px; transition: all 0.2s; border-left: 2px solid transparent;
    }
    .nav-regolamento .nav-link:hover { background: #f8f9fa; color: var(--primary-color); }
    .nav-regolamento .nav-link.active {
        color: var(--primary-color); font-weight: 700;
        background-color: #f0f7ff; border-left-color: var(--primary-color);
    }

    section { scroll-margin-top: 110px; margin-bottom: 3.5rem; }
    .art-title { color: var(--primary-color); font-weight: 800; text-transform: uppercase; font-size: 1rem; margin-bottom: 1.2rem; display: flex; align-items: center; }
    .art-title i { margin-right: 10px; opacity: 0.5; font-size: 0.9rem; }
    
    .regolamento-content p, .regolamento-content li { line-height: 1.7; color: #4b5563; font-size: 0.95rem; }
    .regolamento-content ul { padding-left: 1.2rem; }
    .regolamento-content li { margin-bottom: 0.5rem; }

    /* TABELLA QUOTE */
    .table-quote { border-radius: 12px; overflow: hidden; border: 1px solid #eef2f7; font-size: 0.9rem; }
    .table-quote thead th { background: #f8f9fa; color: #475569; font-weight: 700; text-transform: uppercase; font-size: 0.7rem; padding: 12px; }
    .price-tag { font-weight: 800; color: var(--primary-color); font-size: 1rem; }

    .hover-lift {
    transition: transform 0.2s ease-in-out, shadow 0.2s ease-in-out;
}
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}


/* ========================================
   documenti_upload.php
======================================== */
    .card-stat-upload { border-left: 6px solid var(--primary-color) !important; }
    .form-section-label { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: #10367A; }
    
    /* Box di caricamento evoluto */
    .upload-box { 
        border: 2px dashed #cbd5e1; 
        border-radius: 16px; 
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
        background: #f8fafc; 
        cursor: pointer;
        position: relative;
        overflow: hidden;
    }
    
    .upload-box:hover, .upload-box.dragover { 
        border-color: var(--primary-color); 
        background: #f0f7ff; 
        transform: translateY(-2px);
    }

    .upload-icon {
        font-size: 2.5rem;
        color: #94a3b8;
        margin-bottom: 10px;
        transition: color 0.3s;
    }

    .upload-box:hover .upload-icon, .upload-box.dragover .upload-icon {
        color: var(--primary-color);
    }

    /* Nascondiamo l'input originale ma lo rendiamo cliccabile su tutta l'area */
    .upload-box input[type="file"] {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        opacity: 0;
        cursor: pointer;
    }

    .file-name-preview {
        display: none;
        font-weight: 700;
        color: var(--primary-color);
        background: #e0e7ff;
        padding: 5px 15px;
        border-radius: 50px;
        margin-top: 10px;
        font-size: 0.85rem;
    }

    .file-name-preview {
    display: none;
    margin-top: 15px;
    padding: 8px 35px 8px 15px; /* Spazio a destra per la X */
    background: #e0f2fe; /* Azzurro pastello coerente con Iscritti */
    color: #0369a1;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    position: relative; /* Necessario per posizionare la X */
    border: 1px solid #bae6fd;
}

.btn-remove-file {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #ef4444;
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 20; /* Deve stare sopra l'input invisibile */
}

.btn-remove-file:hover {
    background: #b91c1c;
    transform: translateY(-50%) scale(1.1);
}

/* ========================================
   iscrizioni.php
======================================== */
    .ui-jqgrid { border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color) !important; font-family: inherit !important; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
    .ui-jqgrid .ui-jqgrid-hdiv { background: #f8f9fa !important; border-bottom: 1px solid var(--border-color) !important; }
    .ui-jqgrid .ui-jqgrid-htable th { font-weight: 700 !important; text-transform: uppercase; font-size: 10px; color: #4b5563; padding: 12px 5px !important; }
    .ui-jqgrid .ui-jqgrid-pager { border-top: 1px solid var(--border-color) !important; background: #fff !important; padding: 10px !important; height: auto !important; }
    
    /* FIX ICONE PAGER */
    .ui-jqgrid .ui-jqgrid-pager .fa { font-size: 14px; width: 1.2em; text-align: center; }
    .ui-jqgrid .ui-pg-button:hover { background-color: #f3f4f6 !important; border-radius: 6px; }
    
    .btn-docs-pill { padding: 4px 10px; border-radius: 20px; background: #f1f3f5; border: 1px solid #dee2e6; display: inline-flex; align-items: center; gap: 4px; }
    .status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,0.1); }

    /* 1. COMPRESSIONE RIGA TITOLI (NOME, COGNOME, ECC.) */
    .ui-jqgrid .ui-jqgrid-htable th {
        height: 22px !important; /* Riduce l'altezza totale della cella */
        padding: 2px 4px !important; /* Riduce lo spazio sopra e sotto il testo */
    }

    .ui-jqgrid .ui-jqgrid-htable th div {
        line-height: 1.1 !important; /* Avvicina le righe di testo se lunghe */
        height: auto !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    /* 2. COMPRESSIONE RIGA FILTRI (INPUT E SELETTORI OPERATORI) */
    .ui-jqgrid .ui-search-toolbar td {
        padding: 1px 2px !important; /* Stringe lo spazio attorno agli input */
        height: 24px !important;
    }

    /* Rimpicciolisce gli input di testo della ricerca */
    .ui-jqgrid .ui-search-toolbar input {
        height: 18px !important;
        font-size: 10px !important;
        padding: 0 4px !important;
        margin: 0 !important;
    }

    /* Rimpicciolisce i selettori degli operatori (~, ==, ecc.) e le select (Tutti, Si, No) */
    .ui-jqgrid .ui-search-toolbar select {
        height: 18px !important;
        font-size: 10px !important;
        padding: 0 !important;
        margin: 0 !important;
        line-height: 1 !important;
    }

    /* Rimpicciolisce il tasto "x" per pulire il filtro */
    .ui-jqgrid .ui-search-toolbar .s-ico {
        display: none !important; /* Opzionale: nasconde icone di ordinamento se disturbano */
    }
    
    .ui-jqgrid .clearsearchclass {
        font-size: 10px !important;
        line-height: 1 !important;
        padding: 0 2px !important;
    }
    /* 1. DISTRIBUZIONE SPAZI PAGER PER CENTRAGGIO REALE */
    .ui-jqgrid .ui-pager-control > table {
        width: 100% !important;
        table-layout: fixed !important;
    }

    /* Riduciamo lo spazio a sinistra per non spingere il centro troppo a destra */
    #iscrizioni_pager_left { 
        width: 30% !important; 
    }

    #iscrizioni_pager_center { 
        width: 40% !important; 
        text-align: center !important;
    }

    #iscrizioni_pager_right { 
        width: 30% !important; 
    }

    /* 2. ICONE E TESTO: DIMENSIONE MICRO */
    .ui-jqgrid .ui-pg-button { 
        padding: 0px 1px !important; /* Spazio laterale quasi nullo */
        margin: 0 !important; 
        height: 20px !important; /* Barra molto sottile */
    }

    /* Icone rimpicciolite ulteriormente */
    .ui-jqgrid .ui-pg-div i, 
    .ui-jqgrid .ui-pg-button i,
    .ui-jqgrid .ui-pg-button .fa { 
        font-size: 9px !important; 
        width: 12px !important;
        line-height: 20px !important;
    }

    /* Testo "Mail" e "Liste" piccolissimo e attaccato all'icona */
    .ui-jqgrid .ui-pg-div { 
        font-size: 9px !important; 
        gap: 2px !important; 
        padding: 0 2px !important;
        letter-spacing: -0.2px;
    }

    /* 3. AZZERAMENTO SPAZI TABELLA */
    .ui-jqgrid .ui-pg-table.navtable {
        border-spacing: 0 !important;
    }

    .ui-jqgrid .ui-pg-table.navtable td {
        padding: 0 !important;
    }

    /* Riduciamo il separatore verticale a un filo */
    .ui-jqgrid .ui-pg-button.ui-state-disabled {
        width: 4px !important;
        min-width: 4px !important;
        border-left: 1px solid #ddd !important;
        margin: 0 4px !important;
    }

    /* 4. COMPATTAZIONE PAGINAZIONE CENTRALE */
    .ui-pg-input, .ui-pg-selbox {
        font-size: 9px !important;
        height: 18px !important;
        padding: 0 2px !important;
    }

    .ui-jqgrid .ui-pg-table td {
        padding: 0 1px !important; /* Avvicina le frecce di paginazione */
    }

    /* STILE MODAL EDISON */
    .modal-edison .modal-content { border: none; border-left: 5px solid #10367A !important; border-radius: 15px; }
    .label-edison { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; color: #94a3b8; letter-spacing: 0.5px; margin-bottom: 5px; }
    .btn-edison-pill { border-radius: 50px !important; font-weight: 700; padding: 10px 25px; text-transform: uppercase; letter-spacing: 0.5px; }
    .status-dot { height: 10px; width: 10px; border-radius: 50%; display: inline-block; margin-left: 2px; }


/* ========================================
   coming_soon.php
======================================== */

.coming-wrapper{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:75vh;
}

.coming-content{
  text-align:center;
  max-width:460px;
}

/* Loader animato */

.coming-loader{
  display:flex;
  justify-content:center;
  gap:10px;
  margin-bottom:35px;
}

.coming-loader span{
  width:12px;
  height:12px;
  border-radius:50%;
  background:var(--primary-color);
  opacity:0.3;
  animation: comingPulse 1.4s infinite;
}

.coming-loader span:nth-child(2){
  animation-delay:0.2s;
}

.coming-loader span:nth-child(3){
  animation-delay:0.4s;
}

@keyframes comingPulse{
  0%{transform:scale(0.7);opacity:0.3;}
  50%{transform:scale(1);opacity:1;}
  100%{transform:scale(0.7);opacity:0.3;}
}

/* Titolo */

.coming-title{
  font-size:2.6rem;
  font-weight:700;
  margin-bottom:12px;
}

/* testo */

.coming-text{
  font-size:1.15rem;
  color:var(--text-muted);
  line-height:1.6;
  margin-bottom:35px;
}

/* bottone */

.coming-btn{
  padding:12px 28px;
  font-size:1.05rem;
  border-radius:12px;
}

/* ===========================
pratiche.php
=========================== */
/* disabilita animazione hover card */
#pratiche-container .card{
transition:none !important;
transform:none !important;
}

#pratiche-container .card:hover{
transform:none !important;
box-shadow:0 4px 12px rgba(0,0,0,0.05) !important;
}

.pratica-container{
    max-width:1200px;
}

.pratica-table td{
    vertical-align:middle;
}

.pratica-table tr:hover{
    background:#f8f9fa;
}


/* Custom style per la gestione admin */
.table-pratiche-compact tbody tr { transition: all 0.2s; }
.table-pratiche-compact tbody tr:hover { background-color: #fcfdfe !important; }
.btn-table-action { 
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; 
    border-radius: 8px; transition: all 0.2s; background: #f8f9fa; border: 1px solid #dee2e6;
}
.btn-table-action:hover { background: var(--primary-color); color: white; border-color: var(--primary-color); }
.badge-admin-status { 
    display: inline-flex;    /* Usa flex per centrare meglio il contenuto */
    align-items: center;
    justify-content: center;
    /* width: 110px; */
    min-width: 100px;        /* Opzionale: mantiene una dimensione minima estetica */
    width: auto;             /* Lo rende dinamico */
    padding: 6px 16px;       /* Questo crea lo spazio dinamico ai lati della scritta */
    font-weight: 700;        /* Un po' più grassetto aiuta la leggibilità */
    text-transform: uppercase; 
    font-size: 10px; 
    letter-spacing: 0.5px;
    white-space: nowrap;     /* Impedisce alla scritta di andare a capo */
    border-radius: 50px;     /* Mantiene la forma a pillola */
}


/* ========================================
   icone nei select
======================================== */
.select-pill .form-select {
    min-width: 200px; /* Regola questo valore in base a quanto li vuoi larghi */
    cursor: pointer;
}

/* larghezza menu filtri */
.pratiche-filters .select-pill select{
    min-width:180px;
}

.pratiche-filters .form-select{
appearance:none;
-webkit-appearance:none;
-moz-appearance:none;

padding-left:36px;
padding-right:34px;

background-repeat:no-repeat;
background-position:left 12px center, right 12px center;
background-size:16px,12px;
}

/* filtro stato */
.select-icon-filter{
background-image:
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M6 10.117V15l4-2v-2.883l5-6V1H1v3.117l5 6z'/%3E%3C/svg%3E"),
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 5l6 6 6-6'/%3E%3C/svg%3E");
}

/* filtro categoria */
.select-icon-category{
background-image:
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M2 2h4v4H2V2zm0 6h4v4H2V8zm6-6h4v4H8V2zm0 6h4v4H8V8z'/%3E%3C/svg%3E"),
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 5l6 6 6-6'/%3E%3C/svg%3E");
}

/* ===============================
   STATISTICHE PRATICHE
=============================== */

.pratica-stat-card{
    border:0;
    border-radius:16px;
    box-shadow:0 3px 10px rgba(0,0,0,0.05);
}

.stat-label{
    font-size:13px;
    color:#6b7280;
    margin-bottom:4px;
}

.stat-value{
    font-size:26px;
    font-weight:600;
}


/* ===============================
   BADGE STATO PRATICA
=============================== */

.badge-success{
    background:#28a745;
}

.badge-warning{
    background:#ffc107;
    color:#000;
}

.badge-danger{
    background:#dc3545;
}

/* ===========================
pratica_view.php
=========================== */

    /* TEMA EDISON COMPACT */
    .modal-side-info { background-color: #ffffff; border-right: 1px solid #f1f5f9; }
    .card-edison-modal { border-left: 4px solid #10367A !important; background: transparent; }
    
    .label-edison { 
        display: block;
        font-size: 0.65rem; 
        font-weight: 800; 
        text-transform: uppercase; 
        letter-spacing: 1px; 
        color: #94a3b8; 
        margin-bottom: 2px; 
    }
    
    .value-edison { 
        font-weight: 700; 
        color: #1e293b; 
        margin-bottom: 0.75rem; /* Ridotto da 1.25rem */
        font-size: 0.88rem; 
        line-height: 1.1;
    }

    .info-icon-edison {
        width: 26px; /* Ridotto */
        height: 26px; /* Ridotto */
        background: #f8fafc;
        border-radius: 6px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #10367A;
        margin-right: 8px;
        border: 1px solid #e2e8f0;
        font-size: 0.75rem;
    }
    
    .preview-edison-container {
        background: #f1f5f9;
        border-radius: 12px;
        padding: 1rem; /* Ridotto */
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .preview-edison-box { 
        background: #ffffff; 
        border: 1px solid #e2e8f0; 
        border-radius: 10px; 
        overflow: hidden; 
        flex-grow: 1;
        min-height: 70vh; /* Aumentato per sfruttare l'altezza senza allungare la colonna info */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .note-box-edison {
        background: #f8fafc;
        border-left: 3px solid #cbd5e1;
        padding: 0.75rem;
        border-radius: 0 8px 8px 0;
        font-size: 0.82rem;
        color: #475569;
        font-style: italic;
    }

    .btn-edison-pill { 
        border-radius: 50px !important; 
        font-weight: 700; 
        padding: 8px 20px; /* Ridotto */
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .btn-disabled-soft { opacity: 0.2; filter: grayscale(1); cursor: not-allowed; pointer-events: none; }

    .pratica-container{
    max-width:1400px;
    }

    .pratica-card{
    border-radius:14px;
    }

    .pratica-preview-card{
    border-radius:14px;
    height:80vh;
    }

    .pratica-dati{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px 20px;
    font-size:15px;
    }

    .pratica-table td{
    vertical-align:middle;
    }

    .pratica-azioni{
    display:flex;
    gap:10px;
    margin-top:10px;
    }

    .input-edison-readonly {
        border: 1px solid transparent !important;
        background-color: transparent !important;
        padding: 0 !important;
        font-weight: 600;
        color: #334155;
        pointer-events: none; /* Disabilita click in modalità lettura */
    }

    .input-edison-editable {
        border: 1px solid #cbd5e1 !important;
        background-color: #ffffff !important;
        padding: 0.25rem 0.5rem !important;
        pointer-events: auto !important;
    }

/* ===========================
PREVIEW PDF
=========================== */

#pdfPreview{
height:70vh;
background:#f7f7f7;
border-radius:10px;
display:flex;
align-items:center;
justify-content:center;
overflow:hidden;
}

.pdf-frame{
width:100%;
height:100%;
border:0;
}

.preview-placeholder{
color:#888;
font-size:14px;
}

/* ===========================
STATI DOCUMENTO
=========================== */

.stato-IN_REVISIONE{
    background:#ffc107;
    color:#000;
}

.stato-VALIDO{
    background:#28a745;
}

.stato-RIFIUTATO{
    background:#dc3545;
}


/* 4.2 documenti.php
 * ---------------------------------------- */

/* Stile dei box di riepilogo 
   usiamo la classe .recap-box aggiunta alla .card
*/
.recap-box {
  padding: 1rem;
  transition: all 0.2s ease-in-out;
  border: 1px solid var(--border-color);
  /* Aggiunto h-100 nel PHP per farli alti uguali */
}
.recap-box:hover { 
  transform: translateY(-3px); /* Effetto hover coerente */
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Titolo dentro il box (ex .recap-title) */
.recap-box .recap-title { 
  font-weight: 600; 
  margin-bottom: 4px; 
  font-size: 0.95rem; 
  color: var(--primary-color); /* Titolo blu */
}

/* Data dentro il box (ex .recap-date) */
.recap-box .recap-date { 
  font-size: 0.8rem; 
  color: var(--text-muted); 
  margin-bottom: 8px; 
}

/* ========================================
   register.php
======================================== */
    .register-card { 
        border: none !important; 
        border-left: 6px solid #10367A !important; 
        border-radius: 20px !important;
        box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
    }
    
    .form-section-title {
        font-size: 0.75rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        color: #10367A;
        margin-top: 2.5rem;
        margin-bottom: 1.5rem;
        display: flex;
        align-items: center;
    }
    
    .form-section-title::after {
        content: "";
        flex-grow: 1;
        height: 1px;
        background: #e2e8f0;
        margin-left: 15px;
    }

    .label-edison { 
        font-size: 0.75rem; 
        font-weight: 800; 
        text-transform: uppercase; 
        color: #94a3b8; 
        letter-spacing: 0.5px; 
        margin-bottom: 8px; 
        display: block;
    }

    .btn-edison-pill {
        border-radius: 50px !important;
        font-weight: 700;
        padding: 12px 30px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .form-control, .form-select {
        border-radius: 12px;
        padding: 0.75rem 1rem;
        border: 2px solid #f1f5f9;
        background-color: #f8fafc;
        transition: all 0.2s;
    }

    .form-control:focus, .form-select:focus {
        background-color: #fff;
        border-color: #10367A;
        box-shadow: 0 0 0 4px rgba(16, 54, 122, 0.1);
        outline: none;
    }

    .password-strength-wrapper {
        background: #f8fafc;
        padding: 10px;
        border-radius: 10px;
        border: 1px solid #f1f5f9;
        display: none;
    }

/* ========================================
   activate.php
======================================== */
    #activation-card {
      border-top: 4px solid var(--primary-color);
    }

    .code-wrapper {
      display: flex;
      justify-content: center;
      gap: 12px;
    }

    .code-box {
      width: 60px;
      height: 65px;
      text-align: center;
      font-size: 1.8rem;
      border-radius: 12px;
    }

    .code-box:focus {
      border-color: var(--primary-color);
      box-shadow: 0 0 0 0.2rem rgba(0, 87, 183, 0.25);
    }


/* ========================================
   password_recover.php
======================================== */
    .recovery-card { 
        border: none !important; 
        border-left: 6px solid #10367A !important; 
        border-radius: 20px !important;
        box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
    }

    .label-edison { 
        font-size: 0.75rem; 
        font-weight: 800; 
        text-transform: uppercase; 
        color: #94a3b8; 
        letter-spacing: 0.5px; 
        margin-bottom: 8px; 
        display: block;
    }

    .btn-edison-pill {
        border-radius: 50px !important;
        font-weight: 700;
        padding: 12px 30px;
        text-transform: uppercase;
        letter-spacing: 1px;
        transition: all 0.3s;
    }
    
    .btn-edison-pill:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(16, 54, 122, 0.2) !important;
    }

    .form-control {
        border-radius: 12px;
        padding: 0.75rem 1rem;
        border: 2px solid #f1f5f9;
        background-color: #f8fafc;
        transition: all 0.2s;
    }

    .form-control:focus {
        background-color: #fff;
        border-color: #10367A;
        box-shadow: 0 0 0 4px rgba(16, 54, 122, 0.1);
        outline: none;
    }

    .form-control[readonly] {
        background-color: #f1f5f9;
        cursor: not-allowed;
        color: #64748b;
    }

/* ========================================
   password_reset_code.php
======================================== */
    .recovery-card { 
        border: none !important; 
        border-left: 6px solid #10367A !important; 
        border-radius: 20px !important;
        box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
        overflow: hidden;
    }

    .code-wrapper {
        display: flex;
        gap: 12px;
        justify-content: center;
    }

    .code-box {
        width: 60px;
        height: 75px;
        text-align: center;
        font-size: 2rem;
        font-weight: 800;
        border: 2px solid #e2e8f0;
        border-radius: 12px;
        background-color: #f8fafc;
        color: #10367A;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .code-box:focus {
        border-color: #10367A;
        background-color: #fff;
        box-shadow: 0 0 0 4px rgba(16, 54, 122, 0.15);
        outline: none;
        transform: translateY(-3px);
    }

    .btn-edison-pill {
        border-radius: 50px !important;
        font-weight: 700;
        padding: 14px 30px;
        text-transform: uppercase;
        letter-spacing: 1.2px;
    }

    /* Footer istruzioni */
    .help-footer {
        background-color: #f8fafc;
        border-top: 1px solid #f1f5f9;
        margin: 0 -3rem -3rem -3rem; 
        padding: 1.5rem 2.5rem;
    }


/* ========================================
   password_new.php
======================================== */
    .recovery-card { 
        border: none !important; 
        border-left: 6px solid #10367A !important; 
        border-radius: 20px !important;
        box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
    }

    .label-edison { 
        font-size: 0.75rem; 
        font-weight: 800; 
        text-transform: uppercase; 
        color: #94a3b8; 
        letter-spacing: 0.5px; 
        margin-bottom: 8px; 
        display: block;
    }

    .btn-edison-pill {
        border-radius: 50px !important;
        font-weight: 700;
        padding: 12px 30px;
        text-transform: uppercase;
        letter-spacing: 1px;
        transition: all 0.3s;
    }
    
    .btn-edison-pill:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(16, 54, 122, 0.2) !important;
    }

    .form-control {
        border-radius: 12px;
        padding: 0.75rem 1rem;
        border: 2px solid #f1f5f9;
        background-color: #f8fafc;
        transition: all 0.2s;
    }

    .form-control:focus {
        background-color: #fff;
        border-color: #10367A;
        box-shadow: 0 0 0 4px rgba(16, 54, 122, 0.1);
        outline: none;
    }

    /* Forza Password styling */
    .password-strength-wrapper {
        background: #f8fafc;
        padding: 10px;
        border-radius: 10px;
        border: 1px solid #f1f5f9;
    }
    
    .progress {
        background-color: #e2e8f0;
        border-radius: 10px;
    }


/* ========================================
   login.php
======================================== */
    .page-footer a:hover {
        color: #10367A !important; /* Il tuo blu Edison */
        text-decoration: underline !important;
    }

    .login-card { 
        border: none !important; 
        border-left: 6px solid #10367A !important; 
        border-radius: 20px !important;
        box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
    }

    .label-edison { 
        font-size: 0.75rem; 
        font-weight: 800; 
        text-transform: uppercase; 
        color: #94a3b8; 
        letter-spacing: 0.5px; 
        margin-bottom: 8px; 
        display: block;
    }

    .btn-edison-pill {
        border-radius: 50px !important;
        font-weight: 700;
        padding: 12px 30px;
        text-transform: uppercase;
        letter-spacing: 1px;
        transition: all 0.3s;
    }
    
    .btn-edison-pill:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(16, 54, 122, 0.2) !important;
    }

    .form-control {
        border-radius: 12px;
        padding: 0.75rem 1rem;
        border: 2px solid #f1f5f9;
        background-color: #f8fafc;
        transition: all 0.2s;
    }

    .form-control:focus {
        background-color: #fff;
        border-color: #10367A;
        box-shadow: 0 0 0 4px rgba(16, 54, 122, 0.1);
        outline: none;
    }

    .input-group-text-view {
        background: transparent;
        border: none;
        color: #94a3b8;
        padding-right: 15px;
    }

/* ========================================
   dashboard.php
======================================== */
    #previewContainer {
        width: 100%;
        /* Assicura che il contenitore occupi spazio ma non esploda */
        min-height: 400px; 
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden; /* Evita scrollbar strane del contenitore */
    }

    #previewContainer img {
        /* L'immagine non supererà mai la larghezza del contenitore */
        max-width: 100%;
        /* L'immagine non supererà mai l'80% dell'altezza dello schermo */
        max-height: 75vh; 
        height: auto;
        width: auto;
        display: block;
        object-fit: contain; /* Mantiene le proporzioni senza tagliare */
        border-radius: 8px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        transition: all 0.3s ease;
    }
    
    #previewContainer iframe {
        width: 100%;
        height: 75vh;
        border: none;
        border-radius: 8px;
    }

    /* Rende la modal più pulita su mobile */
    @media (max-width: 576px) {
        #previewContainer img {
            max-height: 60vh;
        }
    }

    /* MIGLIORAMENTI DASHBOARD */
    .progress-custom { height: 10px; border-radius: 20px; background-color: #e9ecef; }
    .card-stat { border-left: 4px solid var(--primary-color) !important; }
    .doc-card-hover { transition: all 0.2s ease; border: 1px solid var(--border-color); }
    .doc-card-hover:hover { border-color: var(--primary-color); background-color: #fcfdfe; }
    
    /* Contenitore Certificati con Hover */
    .doc-scroll-area {
        max-height: 420px;
        overflow-y: auto;
        background-color: transparent !important;
        border: none !important; /* Elimina il bordo solido non tratteggiato */
        border-radius: 16px;
        transition: none; /* Rimuoviamo transizioni non necessarie qui */
    }

    /* Togliamo ogni effetto hover dall'area di scroll per non creare conflitti */
    .doc-scroll-area:hover {
        border-color: transparent !important;
        background-color: transparent !important;
        box-shadow: none !important;
    }

    /* Gestione righe interne alla lista */
    .doc-item-list {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1.25rem 1rem;
        border-bottom: 1px solid #f1f1f1;
        transition: background-color 0.2s;
    }

    /* Rimuove il bordo solo se è l'ultimo della lista */
    .doc-item-list:last-child {
        border-bottom: none !important;
    }

    /* Icona Stato Perfetta */
    .status-ring {
        width: 45px !important;
        height: 45px !important;
        min-width: 45px !important;
        min-height: 45px !important;
        flex-shrink: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--light-bg);
        color: var(--primary-color);
        border: 1px solid var(--border-color);
        font-size: 1.2rem;
        aspect-ratio: 1/1;
    }

    /* Placeholder Edison unificato per Dashboard */
    .card-placeholder {
        border: 2px dashed #e2e8f0 !important;
        background-color: #f8fafc !important; 
        border-radius: 20px !important;
        transition: border-color 0.2s ease, background-color 0.2s ease; /* Solo colore, no trasformazioni */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 200px;
    }

    .card-placeholder:hover {
        border-color: #10367A !important; /* Diventa Blu Edison */
        background-color: #f1f5f9 !important;
        transform: none !important; /* BLOCCA IL MOVIMENTO VERSO L'ALTO */
    }

  /* Link con freccia stile Edison */
  .btn-link-edison {
      font-weight: 700;
      text-decoration: none !important;
      font-size: 0.85rem;
      transition: all 0.2s;
  }

  .btn-link-edison:hover {
      color: #0b2656 !important;
      padding-left: 5px; /* Piccolo effetto movimento */
  }

  /* Allineamento altezze Dashboard */
  .dashboard-main-row {
      display: flex;
      align-items: stretch; /* Forza le colonne ad avere la stessa altezza */
  }

  .card-container-edison {
      background: #fff;
      border: 1px solid var(--border-color);
      border-radius: 20px;
      height: 100%;
      display: flex;
      flex-direction: column;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }

  .card-container-header {
      padding: 1.5rem 1.5rem 1rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
  }

  .card-container-body {
      padding: 0 1.5rem 1.5rem;
      flex-grow: 1;
  }

  /* Fix per le tessere annidate */
  .nested-doc-card {
      border: 1px solid #f1f5f9 !important;
      background: #f8fafc !important;
      transition: border-color 0.2s ease;
  }

  .nested-doc-card:hover {
      border-color: #10367A !important;
      background: #fff !important;
      transform: none !important; /* BLOCCA IL MOVIMENTO VERSO L'ALTO */
  }

  /* 1. Forza la scomparsa della barra orizzontale fantasma sui box documenti */
    .card-container-body, 
    .doc-scroll-area {
        overflow-x: hidden !important;
        width: 100%;
    }

    /* 2. Fix per le card interne (nested-doc-card) */
    /* Impedisce che il contenuto flex faccia allargare la card */
    .nested-doc-card .card-body {
        overflow: hidden;
        min-width: 0; 
    }

    /* 3. Gestione corretta del testo lungo (Nome documento) */
    /* Evita che il nome del documento "spinga" fuori il pulsante search */
    .nested-doc-card .text-truncate {
        display: block;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 4. Fix per i Placeholder (Tratteggiati) */
    /* Firefox a volte calcola male il bordo tratteggiato nel box-sizing */
    .card-placeholder {
        max-width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        overflow: hidden;
    }

    /* 5. Fix Globale per Firefox: impedisce ai flex-item di superare il genitore */
    .d-flex {
        min-width: 0;
    }

/* ========================================
   profile.php
======================================== */
    .profile-section-title {
        font-size: 0.9rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--primary-color);
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 8px;
        margin-bottom: 20px;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .read-only-box {
        background-color: #f8f9fa;
        border-color: #e9ecef;
        color: #6c757d;
        font-weight: 500;
    }
    .form-check-pill {
        display: inline-block;
        margin-right: 10px;
        margin-bottom: 10px;
    }
    .form-check-pill input { display: none; }
    .form-check-pill label {
        padding: 8px 16px;
        border: 1px solid var(--border-color);
        border-radius: 50px;
        cursor: pointer;
        transition: all 0.2s;
        font-weight: 500;
        font-size: 13px;
    }
    .form-check-pill input:checked + label {
        background-color: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
        box-shadow: 0 4px 10px rgba(16, 54, 122, 0.2);
    }
  
/* ========================================
   quote.php
======================================== */
    
/* BOX BONIFICO - RE-DESIGN */
.pay-box {
    background-color: #f8fafc !important; /* Grigio chiarissimo Edison */
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 1.5rem !important;
}

.pay-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Allinea in alto se il testo va a capo */
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
    gap: 20px; /* Spazio minimo tra etichetta e valore */
}

.pay-value {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.9rem;
    text-align: right;
    /* Rimuovi white-space: nowrap se presente e aggiungi: */
    word-wrap: break-word;
    max-width: 70%; /* Lascia spazio alla label a sinistra */
}

.pay-item:last-child { border-bottom: none; }

.pay-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.5px;
}

.iban-badge {
    background: white;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-radius: 8px;
    font-family: 'Monaco', 'Consolas', monospace;
    color: #10367A;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* BOX STATO REJECTION/PENDING EDISON */
.status-alert-card {
    background-color: #fff;
    border-radius: 20px !important;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.rejected-sidebar { border-left: 6px solid #ef4444 !important; }
.waiting-sidebar { border-left: 6px solid #f59e0b !important; }

.rejected-note-box {
    background-color: #fef2f2; /* Rosso chiarissimo pastello */
    border: 1px dashed #fecaca;
    border-radius: 14px;
    padding: 1.25rem;
    position: relative;
}

.rejected-note-box .note-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #ef4444;
    letter-spacing: 1px;
    margin-bottom: 5px;
    display: block;
}

.rejected-note-text {
    color: #991b1b;
    font-weight: 600;
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.4;
}

.status-icon-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}


/* 5. FIX STILE SELECT2 PER BOOTSTRAP 5
 * (Questo è essenziale per far sembrare Select2
 * parte integrante di Bootstrap)
 * ---------------------------------------- */

/* Contenitore principale di Select2 */
.select2-container .select2-selection {
  height: calc(3.5rem + 2px); /* Altezza multi-select */
  border-radius: var(--border-radius-base);
  border: 1px solid var(--border-color);
  background-color: var(--white-bg);
  padding: 0.375rem 0.5rem;
  font-family: inherit;
  font-size: 1rem;
}

/* Stile per selezione singola */
.select2-container--default .select2-selection--single {
  height: calc(2.375rem + 10px); /* Altezza form-control di BS */
  padding: 0.375rem 0.75rem;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 2.1rem;
  padding-left: 0;
  color: var(--text-color);
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: calc(2.375rem + 8px);
  right: 0.5rem;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: var(--text-muted);
}

/* Stile per selezione multipla */
.select2-container--default .select2-selection--multiple {
  min-height: calc(2.375rem + 10px);
  padding-bottom: 0;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: var(--primary-color);
  border-color: var(--primary-dark);
  color: white;
  border-radius: var(--border-radius-base);
  padding: 0.25rem 0.5rem;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: rgba(255, 255, 255, 0.7);
  margin-right: 0.25rem;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
  color: white;
}
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
  color: var(--text-muted);
  margin-top: 5px;
}

/* Stile al focus (bordo blu) */
.select2-container--default.select2-container--focus .select2-selection {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(0, 87, 183, 0.25);
}

/* Stile del dropdown */
.select2-dropdown {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-base);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-base);
}
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background-color: var(--primary-color);
  color: white;
}

/* 6. FIX GRAFICI JQGRID (dal progetto funzionante)
 * ---------------------------------------- */

/* Messaggio di caricamento bianco */
.ui-jqgrid .loading {
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #ddd !important;
    font-weight: bold;
    padding: 10px;
}

/* Altezza e stile header tabella */
.ui-jqgrid .ui-jqgrid-htable th div {
    height: 25px !important;
    line-height: 25px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold !important;
    text-transform: uppercase;
}
.ui-jqgrid .ui-jqgrid-htable {
    /* Assicura che l'header non si "rompa" */
    table-layout: fixed;
}
.ui-jqgrid .ui-jqgrid-htable th {
    white-space: nowrap;
}


/* Stile bottoni piccoli nella griglia */
.ui-jqgrid .ui-jqgrid-btable .btn {
    padding: 3px 6px;
    font-size: 10px;
    line-height: 1;
}

/* Gestione larghezza colonne e testo a capo */
.ui-jqgrid-btable {
    table-layout: fixed;
}
.ui-jqgrid-btable td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Puntini ... se il testo è troppo lungo */
}

/* Stile pager e bottoni (meglio del nostro fix precedente) */
.ui-jqgrid .ui-pg-selbox,
.ui-jqgrid .ui-pg-input {
  border-radius: var(--border-radius-base);
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.4rem;
  height: 30px;
}
.ui-jqgrid .ui-pg-button {
  cursor: pointer;
}

/* Stile barra dei filtri (toppager) */
.ui-jqgrid .ui-search-toolbar input,
.ui-jqgrid .ui-search-toolbar select {
  font-size: 0.85rem;
  padding: 0.2rem 0.4rem;
  height: 30px;
  border-color: #ccc;
  border-radius: var(--border-radius-base);
  border: 1px solid var(--border-color);
}
.ui-jqgrid .ui-search-toolbar input:focus,
.ui-jqgrid .ui-search-toolbar select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(0, 87, 183, 0.25);
}

/* Titolo della griglia */
.ui-jqgrid .ui-jqgrid-titlebar {
  background-color: var(--white-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
}

.row-saved {
    background:#d4edda !important;
    transition: background 1.5s ease;
}



/* --- ETICHETTE E TITOLI SEZIONE --- */
.label-edison {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.form-section-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-color);
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.form-section-title::after {
    content: "";
    flex-grow: 1;
    height: 1px;
    background: var(--border-color);
    margin-left: 15px;
}

/* --- RECOVERY CODE BOXES --- */
.code-wrapper {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.code-box {
    width: 60px;
    height: 75px;
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--light-bg);
    color: var(--primary-color);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.code-box:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(16, 54, 122, 0.15);
    outline: none;
    transform: translateY(-3px); /* Effetto salto Edison */
}

/* Footer info in fondo alla card recovery */
.help-footer {
    background-color: var(--light-bg);
    border-top: 1px solid #f1f5f9;
    margin: 2rem -3rem -3rem -3rem; 
    padding: 1.5rem 2.5rem;
}


/* --- SWEETALERT CUSTOM EDISON --- */
.swal2-popup.rounded-4 {
    border-radius: 20px !important;
    padding: 2rem !important;
}

.swal2-confirm.swal2-styled {
    background-color: var(--primary-color) !important;
    border-radius: 50px !important; /* Forza pillola */
    padding: 10px 30px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(16, 54, 122, 0.2) !important;
}

.swal2-title {
    color: var(--primary-color) !important;
    font-weight: 700 !important;
}


/* --- EFFETTI HOVER GLOBALI --- */
.btn-edison-pill, .btn-primary.rounded-pill {
    transition: all 0.3s ease;
}

.btn-edison-pill:hover, .btn-primary.rounded-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--primary-dark) !important;
    opacity: 0.95;
}

.mailing-card, .login-card, .register-card, .recovery-card {
    border: none !important;
    border-left: 6px solid var(--primary-color) !important; /* Bordo blu spesso a sinistra */
    border-radius: 20px !important;
}


/* ========================================
   UNIFORMITÀ TESTATE TABELLE (Grigio Edison)
======================================== */
.table thead th, 
.table-mailing thead th, 
.table-pratiche-compact thead th {
    color: #6b7280 !important; /* Grigio ardesia uniforme */
    font-weight: 600 !important; 
    text-transform: uppercase !important; 
    font-size: 11px !important; /* Dimensione ridotta come in pratiche.php */
    letter-spacing: 0.5px !important;
    background-color: #f8fafc !important; /* Sfondo leggero */
    border-bottom: 1px solid #e2e8f0 !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

/* Rimuove eventuali classi Bootstrap che forzano il nero */
.text-dark {
    --bs-text-opacity: 1;
}

/* Fix specifico per la riga della tabella */
thead tr {
    border-bottom: 1px solid #e2e8f0 !important;
}


/* ============================================================
   VALIDAZIONE FORM GENERICA
============================================================ */

/* RADIO e CHECKBOX: stile normale sempre attivo */
.form-check-input:checked {
    background-color: #10367A !important;
    border-color: #10367A !important;
    box-shadow: none !important;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(16, 54, 122, 0.20) !important;
}

/* CHECKBOX: spunta bianca */
input[type="checkbox"].form-check-input:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
}

/* RADIO: pallino bianco */
input[type="radio"].form-check-input:checked {
    background-image: radial-gradient(circle, #fff 0, #fff 32%, transparent 35%) !important;
}

/* INPUT e SELECT invalidi */
.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
    border-color: #dc3545 !important;
    background-image: none !important;
}

/* INPUT e SELECT invalidi in focus */
.was-validated .form-control:invalid:focus,
.was-validated .form-select:invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
    background-color: #fff !important;
    outline: none !important;
}

/* INPUT e SELECT validi: neutri, non verdi */
.was-validated .form-control:valid,
.was-validated .form-select:valid {
    border-color: #dee2e6 !important;
    box-shadow: none !important;
    background-image: none !important;
}

/* INPUT e SELECT validi in focus */
.was-validated .form-control:valid:focus,
.was-validated .form-select:valid:focus {
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
    background-color: #fff !important;
}

/* RADIO e CHECKBOX validi: mai verdi */
.was-validated .form-check-input:valid {
    border-color: #adb5bd !important;
    box-shadow: none !important;
    background-color: #fff !important;
}

/* RADIO e CHECKBOX validi e selezionati: mantengono il blu Edison */
.was-validated .form-check-input:valid:checked {
    background-color: #10367A !important;
    border-color: #10367A !important;
    box-shadow: none !important;
}

/* RADIO e CHECKBOX invalidi */
.was-validated .form-check-input:invalid {
    border-color: #dc3545 !important;
    box-shadow: none !important;
}

/* RADIO e CHECKBOX invalidi in focus */
.was-validated .form-check-input:invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
}

/* LABEL sempre normali */
.was-validated .form-check-label,
.was-validated .form-check-input:invalid + .form-check-label,
.was-validated .form-check-input:valid + .form-check-label {
    color: inherit !important;
}

/* ============================================================
   MOBILE SETTINGS (max-width: 767.98px)
   ============================================================ */

@media (max-width: 767.98px) {
    
    /* --- 1. RESET STRUTTURALE & FOOTER --- */
    .card-stat, .mailing-card, .card-stat-mailing, #tableWrapper, #cardTabellaMailing {
        height: auto !important;
        max-height: none !important;
        display: block !important;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .card-stat .card-body, .mailing-card .card-body, .table-responsive {
        display: block !important;
        overflow: visible !important;
        padding: 0 !important;
    }

    .table-scroll-container {
        max-height: none !important;
        overflow: visible !important;
        display: block !important;
    }

    .page-footer {
        position: relative !important;
        display: block !important;
        width: 100% !important;
        margin-top: 30px !important;
        padding: 20px 0 !important;
        clear: both !important;
        background: #fff;
    }

    /* 1. Sistemiamo l'intestazione sopra la tabella */
    .card-body .d-flex.justify-content-between.align-items-center.mb-4 {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }

    #countBadge {
        margin-left: 10px !important;
    }

    /* 2. Il campo ricerca a tutta larghezza */
    .card-body .search-pill {
        width: 100% !important;
        max-width: 100% !important;
    }

    .table-scroll-container {
        overflow-x: auto !important; /* Abilitiamo lo scroll solo se necessario */
        -webkit-overflow-scrolling: touch;
    }

    .table-mailing-review-compact {
        display: table !important;
        width: 100% !important;
        table-layout: auto !important; /* Torniamo all'auto-layout per far calcolare le larghezze al browser */
        min-width: 0 !important;
        font-size: 11px !important;
    }

    /* Gestione intelligente delle colonne */
    
    /* 1. Colonna Iscritto: può restringersi, il testo va a capo */
    .table-mailing-review-compact th:nth-child(1),
    .table-mailing-review-compact td:nth-child(1) {
        width: 35% !important;
        white-space: normal !important; /* Permette il wrap del nome */
    }
    
    /* 2. Colonna Email: può restringersi molto, spezza le parole se necessario */
    .table-mailing-review-compact th:nth-child(2),
    .table-mailing-review-compact td:nth-child(2) {
        width: 30% !important;
        white-space: normal !important;
        word-break: break-all !important; /* Spezza le mail lunghe a metà carattere */
    }

    /* 3. Colonna Stato: stretta e centrata */
    .table-mailing-review-compact th:nth-child(3),
    .table-mailing-review-compact td:nth-child(3) {
        width: 15% !important;
        text-align: center !important;
    }

    /* Nascondiamo la colonna Data Invio per guadagnare spazio */
    .table-mailing-review-compact th:nth-child(4), 
    .table-mailing-review-compact td:nth-child(4) {
        display: none !important;
    }

    /* 4. Colonna Azioni (Bottone): LARGHEZZA FISSA E MINIMA */
    .table-mailing-review-compact th:nth-child(5), 
    .table-mailing-review-compact td:nth-child(5) {
        width: 20% !important; /* Percentuale indicativa */
        min-width: 90px !important; /* QUESTO È IL FIX: garantisce lo spazio per il bottone intero */
        white-space: nowrap !important; /* Impedisce che il bottone o il suo testo vadano a capo */
        text-align: right !important;
        padding-right: 8px !important;
    }

    .table-mailing-review-compact td {
        padding: 10px 4px !important;
        vertical-align: middle !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }

    /* Stile bottone Reinvia per mobile */
    .btn_resend {
        padding: 6px 10px !important; /* Padding comodo per il tocco */
        font-size: 10px !important;
        text-transform: uppercase;
        display: inline-flex !important; /* Mantiene icona e testo allineati */
        align-items: center;
        justify-content: center;
    }

    .preview-iframe-wrapper {
        width: 100% !important;
        overflow: hidden !important;
        border-radius: 8px;
    }

    #viewIframe {
        width: 100% !important;
        /* Opzionale: forziamo un'altezza minima se serve */
        min-height: 500px !important; 
    }

    /* --- 2. TRASFORMAZIONE TABELLE IN CARDS --- */
    #tabellaPratiche, #tabellaEventi, .table-mailing,
    #tabellaPratiche tbody, #tabellaEventi tbody, .table-mailing tbody {
        display: block !important;
        width: 100% !important;
    }

    .table-pratiche-compact thead, 
    .table-calendario-compact thead, 
    .table-mailing thead {
        display: none !important;
    }

    .table-pratiche-compact tbody tr, 
    .table-calendario-compact tbody tr,
    .table-mailing tbody tr {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin-bottom: 1.5rem !important;
        background: #fff !important;
        border: 1px solid #e2e8f0 !important;
        border-left: 5px solid #10367A !important; /* Bordino Blu Edison */
        border-radius: 14px !important;
        padding: 15px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
        position: relative !important;
        overflow: hidden;
    }

    .table-pratiche-compact tbody td, 
    .table-calendario-compact tbody td,
    .table-mailing tbody td {
        display: block !important;
        width: 100% !important;
        padding: 6px 0 !important;
        border: none !important;
        text-align: left !important;
        background: transparent !important;
    }
    

    /* --- 3. FIX HOVER MOBILE & PADDING --- */
    .table-pratiche-compact tbody tr:hover,
    .table-calendario-compact tbody tr:hover,
    .table-mailing tbody tr:hover {
        background-color: #fff !important; 
        transform: none !important;
    }

    .table-hover > tbody > tr:hover > * {
        --bs-table-accent-bg: transparent !important;
        background-color: transparent !important;
        box-shadow: none !important;
    }

    .ps-4, .pe-4, .ps-lg-4, .pe-lg-4 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* --- 4. BOTTONI AZIONE & FOOTER TABELLA --- */
    .table-calendario-compact .justify-content-end,
    .table-mailing .justify-content-end,
    .table-pratiche-compact td:first-child {
        display: flex !important;
        justify-content: flex-start !important;
        gap: 12px !important;
        margin-top: 10px;
        padding-top: 10px !important;
        border-top: 1px solid #f1f5f9 !important;
    }

    .btn-action-admin, .btn-table-action {
        flex: none !important;
        width: 40px !important;
        height: 40px !important;
    }

    .card-footer-fixed {
        position: relative !important;
        display: block !important;
        width: 100% !important;
        background: #fff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        margin-bottom: 20px;
    }

    /* --- 5. JQGRID PAGER (ICONE AFFIANCATE) --- */
    .ui-jqgrid .ui-jqgrid-pager {
        height: auto !important;
        padding: 10px 5px !important;
    }

    .ui-pager-control > table, 
    .ui-pager-control > table > tbody, 
    .ui-pager-control > table > tbody > tr {
        display: block !important;
        width: 100% !important;
    }

    .ui-pager-control td[id$="_left"],
    .ui-pager-control td[id$="_center"],
    .ui-pager-control td[id$="_right"] {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        padding: 5px 0 !important;
        height: auto !important;
    }

    .ui-pager-control td[id$="_left"] table,
    .ui-pager-control td[id$="_left"] tbody,
    .ui-pager-control td[id$="_left"] tr {
        display: inline !important;
    }

    .ui-pager-control td[id$="_left"] td {
        display: inline-block !important;
        width: auto !important;
        padding: 2px !important;
        vertical-align: middle !important;
    }

    .ui-jqgrid .ui-pg-button {
        width: 32px !important;
        height: 32px !important;
        margin: 1px !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 6px !important;
        background: #fff !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .ui-pg-button .ui-pg-div {
        display: block !important;
        font-size: 0 !important;
    }

    .ui-pg-button i, .ui-pg-button span.fa {
        font-size: 14px !important;
        margin: 0 !important;
    }

    .ui-pager-control td[id$="_center"] .ui-pg-table {
        margin: 0 auto !important;
        display: inline-table !important;
    }

    .ui-pg-input { width: 35px !important; height: 26px !important; }
    .ui-pg-selbox { height: 26px !important; margin-left: 5px !important; }

    .ui-pg-button.ui-state-disabled, 
    #first_iscrizioni_pager, 
    #last_iscrizioni_pager { 
        display: none !important; 
    }

    .ui-paging-info {
        display: block !important;
        font-size: 10px !important;
        color: #94a3b8 !important;
        padding-top: 5px !important;
    }

    /* --- 6. MODALI JQGRID (CENTRATURA ASSOLUTA) --- */
    .ui-jqdialog[id^="editmod"], 
    .ui-jqdialog[id^="addmod"], 
    .ui-jqdialog[id^="searchmod"],
    .ui-jqdialog[style] {
        width: 94vw !important;
        height: 85vh !important;
        left: 3vw !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        position: fixed !important;
        display: flex !important;
        flex-direction: column !important;
        box-shadow: 0 10px 40px rgba(0,0,0,0.5) !important;
    }

    .ui-jqdialog .ui-jqdialog-titlebar {
        padding: 12px 15px !important;
        background: #f8fafc !important;
        flex-shrink: 0 !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }

    .ui-jqdialog-content, 
    .ui-jqdialog .ui-jqdialog-content[style] {
        width: 100% !important;
        height: auto !important; 
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 15px !important;
        box-sizing: border-box !important;
        background: #fff !important;
    }

    .ui-jqdialog .EditTable:last-child,
    .ui-jqdialog .EditBottomLine {
        position: relative !important;
        width: 100% !important;
        display: flex !important;
        justify-content: flex-end !important;
        gap: 10px !important;
        padding: 12px 15px !important;
        background: #f8fafc !important;
        border-top: 1px solid #e2e8f0 !important;
        flex-shrink: 0 !important;
    }

    .FormGrid, .EditTable { display: block !important; width: 100% !important; }
    
    .FormData {
        display: block !important;
        width: 100% !important;
        margin-bottom: 12px !important;
    }

    .CaptionTD {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
        padding: 0 0 4px 0 !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        color: #64748b !important;
        text-transform: uppercase !important;
    }

    .DataTD {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .DataTD input, .DataTD select, .DataTD textarea {
        width: 100% !important;
        height: 44px !important;
        font-size: 16px !important;
        border: 1px solid #cbd5e1 !important;
        border-radius: 8px !important;
    }

    .ui-jqdialog .fm-button {
        padding: 0 20px !important;
        height: 40px !important;
        border-radius: 50px !important;
        font-weight: 700 !important;
        display: inline-flex !important;
        align-items: center !important;
        margin: 0 !important;
    }

    .EditTable tr[style*="height:0"], .EditTable tr[style*="height: 0"] {
        display: none !important;
    }
}

/* --- 7. HOVER SOLO DESKTOP (Fuori dalla media query mobile) --- */
@media (min-width: 768px) {
    .table-hover tbody tr:hover {
        background-color: #f8fafc !important; 
        transition: background-color 0.2s ease;
        cursor: pointer;
    }
}

/* ========================================
   MODAL COLONNE - STILE EDISON
======================================== */
#modalColonne .modal-dialog {
    max-height: 70vh;
}

#modalColonne .modal-body {
    padding: 1rem 1.75rem;  /* era 1.5rem, lo riduciamo */
    max-height: 50vh;
    overflow-y: auto;
}

#modalColonne .modal-content {
    border: none !important;
    border-left: 5px solid var(--primary-color) !important;
    border-radius: 20px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12) !important;
}

#modalColonne .modal-header {
    background-color: var(--light-bg);
    border-bottom: 1px solid #f1f5f9;
    padding: 1.4rem 1.75rem;
    border-radius: 20px 20px 0 0;
}

#modalColonne .modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.01em;
}

#modalColonne .modal-body {
    padding: 1.5rem 1.75rem;
    background: #fff;
}

#modalColonne .modal-footer {
    background-color: var(--light-bg);
    border-top: 1px solid #f1f5f9;
    padding: 1rem 1.75rem;
    border-radius: 0 0 20px 20px;
}

/* Pulsanti Seleziona/Deseleziona tutte */
#modalColonne #btnSelTutte,
#modalColonne #btnDeselTutte {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: 50px !important;
    border-color: #e2e8f0 !important;
    color: var(--text-muted) !important;
    background: #f8fafc !important;
    transition: all 0.2s;
}

#modalColonne #btnSelTutte:hover {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}

#modalColonne #btnDeselTutte:hover {
    background: #64748b !important;
    border-color: #64748b !important;
    color: #fff !important;
}

/* Singolo item checkbox */
#colonneCheckboxList .form-check {
    cursor: pointer;
    border-radius: 10px !important;
    transition: all 0.15s ease;
    padding: 8px 12px !important;
    margin: 0;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Stato NON selezionato */
#colonneCheckboxList .form-check.border-light {
    border-color: #e9ecef !important;
    background: #f8fafc !important;
}

#colonneCheckboxList .form-check.border-light:hover {
    border-color: #cbd5e1 !important;
    background: #f1f5f9 !important;
}

/* Stato SELEZIONATO */
#colonneCheckboxList .form-check.border-primary {
    border-color: rgba(16, 54, 122, 0.25) !important;
    background: rgba(16, 54, 122, 0.06) !important;
}

#colonneCheckboxList .form-check-input {
    width: 15px;
    height: 15px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px !important;
}

#colonneCheckboxList .form-check-input:checked {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

#colonneCheckboxList .form-check-input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#colonneCheckboxList .form-check-label {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
    flex: 1;
}

#colonneCheckboxList .form-check-label .fa-lock {
    color: #94a3b8;
    font-size: 10px;
}

/* Bottone Applica */
#btnApplicaColonne {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 9px 22px;
    border-radius: 50px !important;
}

/* Bottone Annulla */
#modalColonne .btn-light {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 9px 22px;
    border-radius: 50px !important;
    color: var(--text-muted) !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
}

#modalColonne .btn-light:hover {
    background: #e2e8f0 !important;
}

