/* filepath: /Users/pietrotudisco/Sites/localhost/attrezzature/css/style.css */
/* Hover uniforme per tutte le voci della navbar */
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    background: linear-gradient(90deg, #00d2ff 0%, #3a7bd5 100%);
    color: #fff !important;
    transition: background 0.2s, color 0.2s;
}

footer {
    margin-top: auto;
    width: 100%;
    position: relative;
    z-index: 1;
    height: 32px;
    min-height: 32px;
    background: #222c3a;
    color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    text-align: center;
    color: #fff;
}


/* Pulsanti eleganti home */

.blue-style,
.button.blue-style {
    background: linear-gradient(90deg, #3a7bd5 0%, #00d2ff 100%);
    color: #fff;
    border: none;
    border-radius: 0.7rem;
    box-shadow: 0 2px 12px rgba(58, 123, 213, 0.12);
    transition: background 0.3s, box-shadow 0.3s, transform 0.2s;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0.75rem 2rem;
    text-align: center;
    display: inline-flex;
    /* era inline-block */
    align-items: center;
    justify-content: center;
}

.blue-style:hover,
.blue-style:focus,
.button.blue-style:hover,
.button.blue-style:focus {
    background: linear-gradient(90deg, #00d2ff 0%, #3a7bd5 100%);
    box-shadow: 0 4px 18px rgba(58, 123, 213, 0.18);
    transform: translateY(-2px) scale(1.03);
    color: #fff;
}

.stylish-btn {
    transition: box-shadow 0.2s, transform 0.2s, background 0.2s;
}

.stylish-btn:hover {
    box-shadow: 0 6px 18px rgba(58, 123, 213, 0.18);
    background: linear-gradient(90deg, #3a7bd5 0%, #00d2ff 100%);
    color: #fff;
    transform: translateY(-2px) scale(1.04);
}

/* Contenitore responsive per form e pulsanti */
.container-responsive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background-color: white;
}

.container-white {
    width: 90%;
    max-width: 1400px;
    background-color: white;
    margin: 20px auto;
    padding: 1rem;
    flex: 1 0 auto;
    opacity: 90%;
}

@media (max-width: 600px) {
    .container-responsive {
        max-width: 98vw;
        padding: 0.2rem;
    }
}



@media (max-width: 600px) {
    nav ul {
        max-width: 98vw !important;
        gap: 0.7rem !important;
        padding: 0.2rem !important;
    }

    nav .button {
        width: 100%;
        font-size: 1.1rem;
        box-sizing: border-box;
    }

    h1 {
        font-size: 1.3rem;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .form-elegante {
        padding: 1rem 0.5rem;
        max-width: 98vw;
        box-shadow: none;
    }

    .form-group label {
        font-size: 1rem;
    }

    .form-elegante input[type="text"],
    .form-elegante input[type="date"],
    .form-elegante input[type="email"],
    .form-elegante input[type="password"],
    .form-elegante select {
        font-size: 1rem;
        padding: 0.5rem 0.6rem;
    }

    .form-elegante input[type="submit"],
    .form-elegante .button {
        width: 100%;
        align-self: stretch;
        font-size: 1.1rem;
    }

    h1 {
        font-size: 1.3rem;
        text-align: center;
    }

    body {
        padding: 0.5rem;
    }
}

/* Form elegante */
.form-elegante {
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    padding: 2.5rem 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(58, 123, 213, 0.10);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 50px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-elegante .row {
    margin-left: 0;
    margin-right: 0;
}

.form-elegante .col-md-6 {
    padding-left: 0;
    padding-right: 0;
}

.form-elegante label {
    font-weight: 500;
    color: #3a7bd5;
    margin-bottom: 0.2rem;
}

.form-elegante input[type="text"],
.form-elegante input[type="date"],
.form-elegante input[type="email"],
.form-elegante input[type="password"],

.form-elegante select {
    padding: 0.6rem 0.8rem;
    border: 1px solid #eaeaea;
    border-radius: 4px;
    font-size: 1rem;
    background: #f6f8fa;
    transition: border 0.2s;
}

.form-elegante input[type="text"]:focus,
.form-elegante input[type="date"]:focus,
.form-elegante input[type="email"]:focus,
.form-elegante input[type="password"]:focus,

.form-elegante select:focus {
    border-color: #3a7bd5;
    outline: none;
}

.form-elegante input[type="submit"],
.form-elegante .button {
    margin-top: 0.8rem;
    align-self: flex-end;
}

/* Elegant table style for Lista Macchinari */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

thead {
    background: linear-gradient(90deg, #3a7bd5 0%, #00d2ff 100%);
    color: #fff;
}

th,
td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eaeaea;
}

th {
    font-weight: 600;
    letter-spacing: 0.05em;
}

tr {
    transition: background 0.2s;
}

table.tableClick .row-cliccabile:hover {
    background: #394149 !important;
}

body {
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0 !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
        linear-gradient(90deg, rgba(58, 123, 213, 0.12) 0%, rgba(0, 210, 255, 0.12) 100%),
        url('../img/background.png') center center/cover no-repeat;
}

.button:hover {
    background: #005fa3;
    box-shadow: 0 4px 12px rgba(58, 123, 213, 0.18);
    transform: translateY(-2px) scale(1.04);
    color: #fff;
}

h1 {
    color: #3a7bd5;
    margin-bottom: 1.5rem;
}

h1 {
    color: #3a7bd5;
    margin-bottom: 1.5rem;
}

/* Contact Card - elegante per dettaglio contatto/fornitore */
.contact-card {
    max-width: 600px;
    margin: 40px auto;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    background: #fff;
    padding: 0;
}

.contact-header {
    background: linear-gradient(90deg, #007bff 60%, #6c757d 100%);
    color: #fff;
    border-radius: 16px 16px 0 0;
    padding: 32px 24px 24px 24px;
    text-align: center;
}

.contact-header .bi-person-square {
    font-size: 3rem;
    margin-bottom: 8px;
}

.contact-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0 12px;
}

.contact-table th {
    width: 35%;
    text-align: right;
    padding-right: 18px;
    font-weight: 600;
    color: #007bff;
    background: none;
    border: none;
}

.contact-table td {
    text-align: left;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px 18px;
    border: none;
}

.contact-actions {
    padding: 24px;
    text-align: center;
    border-radius: 0 0 16px 16px;
    background: #f8f9fa;
}

.contact-actions .btn {
    min-width: 120px;
    margin: 0 8px 8px 0;
}

@media (max-width: 600px) {
    .contact-card {
        padding: 0;
    }

    .contact-header {
        padding: 24px 8px 16px 8px;
    }

    .contact-actions {
        padding: 16px 8px;
    }
}

.card-elegant {
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(58, 123, 213, 0.13);
    background: #fff;
    padding: 2.5rem 2rem 2rem 2rem;
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.gradient-header {
    background: linear-gradient(90deg, #3a7bd5 0%, #00d2ff 100%);
    border-radius: 12px 12px 0 0;
    padding: 1.5rem 2rem;
    color: #fff;
    box-shadow: 0 2px 12px rgba(58, 123, 213, 0.10);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gradient-header i {
    font-size: 2.5rem;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    padding: 0.7rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1.08rem;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #3a7bd5;
    min-width: 180px;
    display: inline-block;
}

.info-value {
    color: #222;
}

@media (max-width: 600px) {
    .card-elegant {
        padding: 1.2rem 0.5rem;
    }

    .gradient-header {
        padding: 1rem 0.7rem;
        font-size: 1.1rem;
    }

    .info-label {
        min-width: 120px;
    }
}

/* Stili esistenti migliorati per il mobile */
.card-info {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 20px;
}

/* Titoli */
.card-info h3 {
    font-size: 1.3rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 15px;
    color: #333;
}

/* Riga informativa */
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f3f3f3;
    flex-wrap: wrap;
    /* Per permettere il ritorno a capo */
}

.info-row:last-child {
    border-bottom: none;
}

/* Etichette e valori */
.label {
    font-weight: bold;
    color: #555;
    flex: 1 1 45%;
    /* Larghezza adattabile */
    min-width: 120px;
}

.value {
    color: #444;
    flex: 1 1 50%;
    text-align: right;
}

/* Bottoni flessibili */
.btn-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.btn-action-modern {
    flex: 1 1 calc(50% - 10px);
    min-width: 140px;
    padding: 10px;
    text-align: center;
    border-radius: 8px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    transition: 0.2s;
}

/* Colori bottoni */
.btn-warning {
    background: #f39c12;
}

.btn-warning:hover {
    background: #d68910;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-info {
    background: #3498db;
}

.btn-info:hover {
    background: #2e86c1;
}

.btn-primary {
    background: #2ecc71;
}

.btn-primary:hover {
    background: #27ae60;
}

.btn-action-modern {
    display: inline-block;
    padding: 10px 14px;
    text-align: center;
    border-radius: 8px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    transition: 0.2s;
}


/* Adattamenti per schermi piccoli */
@media (max-width: 768px) {
    .info-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .value {
        text-align: left;
        margin-top: 4px;
    }

    .btn-action-modern {
        flex: 1 1 100%;
    }
}

/* --- LIST TABLE (detailStyles look) --- */
.table-list-wrapper {
    background: #fff;
    border: 1px solid #dbe6f4;
    border-radius: 18px;
    padding: .4rem .4rem 0;
    overflow: hidden;
    box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .18);
}

.table-list {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
}

.table-list thead th {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 700;
    color: #32507a;
    background: transparent;
    padding: .55rem .85rem .65rem;
    border-bottom: 1px solid #d5e3f6;
}

.table-list tbody tr {
    background: #f7faff;
    transition: .18s;
}

.table-list tbody tr:hover {
    background: #d4e4fa;
}

.table-list tbody tr.clickable-row {
    cursor: pointer;
}

.table-list tbody td {
    font-size: .78rem;
    padding: .55rem .85rem;
    vertical-align: middle;
}

@media (max-width:780px) {

    .table-list thead th,
    .table-list tbody td {
        font-size: .65rem;
        padding: .45rem .55rem;
    }
}

/* === Detail cards (ex detailStyles.php) === */
.bloc-sezione {
    background: #ffffff;
    border-radius: 22px;
    padding: 1.4rem 1.7rem 1.6rem;
    margin-bottom: 2rem;
    position: relative;
    box-shadow: 0 10px 28px -14px rgba(0, 0, 0, .25), 0 4px 10px -4px rgba(0, 0, 0, .12);
    overflow: hidden;
}

.bloc-sezione:before {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    top: -110px;
    right: -90px;
    background: radial-gradient(circle at 30% 30%, rgba(56, 121, 213, .35), rgba(56, 121, 213, 0));
    transform: rotate(25deg);
    pointer-events: none;
}

.bloc-sezione:after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    bottom: -70px;
    left: -50px;
    background: radial-gradient(circle at 55% 55%, rgba(0, 118, 255, .22), rgba(0, 118, 255, 0));
    pointer-events: none;
}

.bloc-sezione h1,
.bloc-sezione h2 {
    font-size: 1.05rem;
    letter-spacing: .6px;
    font-weight: 700;
    margin: 0 0 1.1rem;
    display: flex;
    align-items: center;
    gap: .55rem;
    text-transform: uppercase;
    color: #1c3970;
}

.bloc-sezione h1 {
    font-size: 1.25rem;
}

.sezione-header-badge {
    background: linear-gradient(135deg, #3a7bd5, #1d4e89);
    color: #fff;
    padding: .45rem .9rem;
    border-radius: 14px;
    font-size: .65rem;
    letter-spacing: 1px;
    font-weight: 600;
    box-shadow: 0 3px 10px -3px rgba(0, 0, 0, .25);
}

.tabella-evidenza {
    background: #fff;
    border: 1px solid #dbe6f4;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.tabella-evidenza table {
    border-spacing: 0;
    width: 100%;
}

.tabella-evidenza th,
.tabella-evidenza td {
    border-bottom: 1px solid #eef3fa;
    padding: .6rem .85rem;
    font-size: .78rem;
    vertical-align: middle;
}

.tabella-evidenza tr:last-child td {
    border-bottom: none;
}

.table-list.no-hover tbody tr {
    transition: none;
}

.tabella-evidenza.no-hover table tr:hover {
    background: inherit !important;
    transition: none;
}

.table-list.no-hover tbody tr:hover {
    background: inherit !important;
}

.pill {
    display: inline-block;
    background: #e4efff;
    color: #274b7a;
    padding: .25rem .55rem;
    border-radius: 30px;
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: .5px;
}

.inline-link {
    color: #1d4e89;
    font-weight: 600;
    text-decoration: none;
}

.inline-link:hover {
    text-decoration: underline;
}

@media (max-width:780px) {

    .tabella-evidenza th,
    .tabella-evidenza td {
        font-size: .68rem;
    }
}

/* === BUTTONS (coordinati con bloc-sezione & tabelle) === */
.btn,
.btn-app {
    --btn-radius: 14px;
    --btn-pad-y: .55rem;
    --btn-pad-x: 1.05rem;
    --btn-fsize: .74rem;
    --btn-shadow: 0 4px 14px -6px rgba(0, 0, 0, .28), 0 2px 6px -2px rgba(0, 0, 0, .18);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-weight: 600;
    letter-spacing: .5px;
    border-radius: var(--btn-radius);
    padding: var(--btn-pad-y) var(--btn-pad-x);
    font-size: var(--btn-fsize);
    line-height: 1.1;
    border: 1px solid transparent;
    cursor: pointer;
    text-transform: uppercase;
    text-decoration: none;
    transition: .18s ease;
    -webkit-user-select: none;
    user-select: none;
    background: linear-gradient(135deg, #3a7bd5, #1d4e89);
    color: #fff;
    box-shadow: var(--btn-shadow);
}

.btn:hover,
.btn-app:hover {
    filter: brightness(1.07);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .32), 0 3px 10px -4px rgba(0, 0, 0, .22);
    text-decoration: none;
    color: #fff;
}

.btn:active,
.btn-app:active {
    transform: translateY(0);
    filter: brightness(.92);
}

.btn:focus-visible,
.btn-app:focus-visible {
    outline: 3px solid rgba(56, 121, 213, .45);
    outline-offset: 2px;
}

.btn-sm {
    --btn-pad-y: .4rem;
    --btn-pad-x: .75rem;
    --btn-fsize: .62rem;
    border-radius: 11px;
}

.btn-lg {
    --btn-pad-y: .75rem;
    --btn-pad-x: 1.35rem;
    --btn-fsize: .8rem;
    border-radius: 18px;
}

.btn-icon-only {
    padding: .55rem .6rem;
    width: 40px;
    justify-content: center;
}

.btn-disabled,
.btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    filter: grayscale(.4);
    box-shadow: none;
}

/* Varianti cromatiche */
.btn-submit,
.btn-primary {
    background: linear-gradient(135deg, #2e90ff, #1d4e89);
    border-color: #1d4e89;
}

.btn-modifica,
.btn-warning {
    background: linear-gradient(135deg, #ffb347, #ff8c42);
    border-color: #ff8c42;
}

.btn-annulla,
.btn-secondary {
    background: linear-gradient(135deg, #c9d6e5, #8a9bad);
    border-color: #8293a5;
    color: #1c2f45;
}

.btn-annulla:hover,
.btn-secondary:hover {
    color: #132438;
}

.btn-back {
    background: linear-gradient(135deg, #9aa9bd, #5e6b79);
    border-color: #5e6b79;
}

.btn-danger {
    background: linear-gradient(135deg, #ff4d4d, #c81e1e);
    border-color: #b91919;
}

.btn-success {
    background: linear-gradient(135deg, #3fbf72, #1f8c4e);
    border-color: #1f8c4e;
}

/* Outline variants */
.btn-outline {
    background: transparent;
    color: #1d4e89;
    border: 1px solid #3a7bd5;
    box-shadow: none;
}

.btn-outline:hover {
    background: linear-gradient(135deg, #3a7bd5, #1d4e89);
    color: #fff;
}

/* Raggruppamenti */
.btn-group-inline {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.btn-group-end {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    justify-content: flex-end;
}

/* Pulsante link minimal */
.link-btn {
    background: transparent;
    color: #1d4e89;
    border: none;
    padding: .3rem .4rem;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .5px;
    cursor: pointer;
    text-transform: uppercase;
}

.link-btn:hover {
    text-decoration: underline;
}

/* Stato loading (aggiungi class .is-loading) */
.btn.is-loading {
    pointer-events: none;
    position: relative;
    color: transparent !important;
}

.btn.is-loading:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 3px solid rgba(255, 255, 255, .55);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinBtn .6s linear infinite;
}

@keyframes spinBtn {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive tweak */
@media (max-width:640px) {

    .btn,
    .btn-app {
        --btn-pad-y: .5rem;
        --btn-pad-x: .9rem;
        --btn-fsize: .68rem;
    }
}

/* --- CENTRA TUTTO IL TESTO NELLE TABELLE (override finale) --- */
table th,
table td,
.table-equip thead th,
.table-equip tbody td,
.table-list thead th,
.table-list tbody td,
.tabella-evidenza th,
.tabella-evidenza td {
    text-align: center;
}

/* Utility per riallineare a sinistra dove serve (aggiungi class="text-start") */
.text-start {
    text-align: left !important;
}

.text-end {
    text-align: right !important;
}

/* === Hover righe tabelle (più scuro) ===
   Metto alla fine per sovrascrivere i precedenti */
.table-list tbody tr:hover {
    background: #d4e4fa;
    /* prima era #eef5ff */
}

.tabella-elegante tbody tr:hover {
    background: #d4e4fa;
}

.tabella-evidenza table tr:hover {
    background: #e2eefc;
    transition: .18s;
}

/* Disattiva ogni effetto hover sui th delle nostre tabelle */
.table-list thead th,
.tabella-evidenza table th {
    cursor: default;
}

.table-list thead th:hover,
.tabella-evidenza table th:hover {
    background: inherit !important;
    color: inherit !important;
    filter: none !important;
}

/* Mantieni il colore del testo invariato su hover riga e header */
.table-list tbody tr:hover td,
.table-list tbody tr:hover th,
.tabella-evidenza table tr:hover td,
.tabella-elegante tbody tr:hover td {
    color: inherit !important;
}

/* == NO HOVER OVERRIDES (sempre alla fine) == */
.table-list.no-hover tbody tr,
.tabella-evidenza.no-hover table tr {
    transition: none;
}

.table-list.no-hover tbody tr:hover {
    background: inherit !important;
    color: inherit !important;
}

.tabella-evidenza.no-hover table tr:hover {
    background: inherit !important;
    color: inherit !important;
}

/* Niente cambio colore testo sui TH in hover (rafforzo) */
.table-list thead th:hover,
.tabella-evidenza table th:hover {
    background: inherit !important;
    color: inherit !important;
}

/* === FORM STYLE (coordinato con bloc-sezione / tabella-evidenza) === */
.form-panel {
    background: linear-gradient(145deg, #ffffff, #f3f7fb);
    border: 1px solid #dde6f0;
    border-radius: 22px;
    padding: 1.6rem 1.4rem 1.9rem;
    box-shadow: 0 10px 26px -10px rgba(18, 52, 94, .15), 0 4px 12px -4px rgba(18, 52, 94, .12);
    position: relative;
}

.form-panel h2.form-title {
    margin: -.2rem 0 1.3rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    gap: .55rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem 1.1rem;
    margin-bottom: 1.4rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.form-group label {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .7px;
    color: #1d365a;
    text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
    border: 1px solid #c9d6e5;
    background: #fff;
    border-radius: 14px;
    padding: .65rem .85rem;
    font-size: .72rem;
    line-height: 1.25;
    transition: .18s;
    box-shadow: inset 0 0 0 rgba(0, 0, 0, 0);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3a7bd5;
    box-shadow: 0 0 0 3px rgba(58, 123, 213, .25);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    justify-content: flex-end;
    margin-top: .4rem;
}

.form-actions .spacer {
    flex: 1;
}

/* Help text */
.form-hint {
    font-size: .58rem;
    color: #5b6d80;
    margin-top: -.2rem;
}

/* Stato errore */
.form-group.is-invalid input,
.form-group.is-invalid select,
.form-group.is-invalid textarea {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, .22);
}

.form-group.is-invalid .form-hint {
    color: #c0392b;
}

/* Submit primary override */
.btn-submit {
    background: linear-gradient(135deg, #2e90ff, #1d4e89);
    border-color: #1d4e89;
}

/* Centratura verticale/orizzontale contenuto pulsanti */
.btn,
.btn-app {
    justify-content: center;
    /* centra orizzontalmente icona+testo */
    text-align: center;
}

.btn i,
.btn-app i {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    /* evita disallineamenti verticali */
}

/* (Se qualche pulsante appare più alto) forziamo altezza coerente */
.btn,
.btn-app {
    line-height: 1.1;
}

badge {
    display: inline-block;
    padding: .25rem .55rem;
    font-size: .55rem;
    font-weight: 600;
    line-height: 1;
    border-radius: .5rem;
    letter-spacing: .3px;
    vertical-align: middle;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* Facoltativo: se lo spazio tra icona e testo risulta irregolare,
   puoi rimuovere spazi nello HTML oppure regolare il gap: */
/*
.btn, .btn-app {
    gap: 0.5rem;  // esempio di regolazione gap
}
*/

/* === Responsive table-list (mobile cards) (AGGIORNATO) ===
   Ogni cella diventa blocco: titolo (label) in alto bold/uppercase,
   valore sotto come sottotitolo. Usa data-label già presente. */
@media (max-width:640px) {

    .table-list {
        border-spacing: 0;
    }

    .table-list thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
        border: 0;
    }

    .table-list,
    .table-list tbody,
    .table-list tr,
    .table-list td {
        display: block;
        width: 100%;
    }

    .table-list tbody {
        display: flex;
        flex-direction: column;
        gap: .85rem;
        padding: .25rem 0 1rem;
    }

    .table-list tbody tr {
        background: #fff;
        border: 1px solid #dbe6f4;
        border-radius: 18px;
        padding: .55rem .75rem .6rem;
        box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .14);
        position: relative;
        transition: .18s;
    }

    .table-list tbody tr.clickable-row {
        cursor: pointer;
    }

    .table-list tbody tr:active {
        transform: scale(.995);
    }

    .table-list tbody tr:hover {
        background: #fff;
        box-shadow: 0 6px 20px -6px rgba(0, 0, 0, .18);
    }

    /* Cella come blocco verticale */
    .table-list tbody td {
        border: none;
        border-bottom: 1px solid #eef3fa;
        padding: .55rem 0 .65rem;
        margin: 0;
        background: transparent;
        font-size: .76rem;
        line-height: 1.25;
        display: flex;
        flex-direction: column;
        gap: .15rem;
        text-align: left !important;
    }

    .table-list tbody td:last-child {
        border-bottom: none;
        padding-bottom: .3rem;
    }

    /* Titolo (label) */
    .table-list tbody td:before {
        content: attr(data-label);
        display: block;
        font-size: .58rem;
        letter-spacing: .55px;
        font-weight: 700;
        text-transform: uppercase;
        color: #21456f;
        line-height: 1.1;
    }

    /* Valore (sottotitolo) */
    .table-list tbody td {
        color: #203041;
        font-weight: 500;
    }

    /* Badge / pill compatti */
    .table-list tbody td .score-badge,
    .table-list tbody td .pill,
    .table-list tbody td .badge,
    .table-list tbody td .badge-success,
    .table-list tbody td .badge-danger {
        font-size: .6rem;
        line-height: 1.05;
    }

    /* Progress bar adattata */
    .table-list tbody td .progress-lite {
        height: 10px;
        border-radius: 50px;
        margin-top: .1rem;
    }

    /* Rimuovi centratura forzata globale su mobile per leggibilità */
    .table-list tbody td,
    .table-list tbody td:before {
        text-align: left;
    }


}

/* === BOTTONI AZIONI DETTAGLIO (dimensione uniforme + responsive) === */
.action-btns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .7rem;
    align-items: stretch;
}

.action-btns .btn {
    width: 100%;
    min-height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: .72rem;
    letter-spacing: .4px;
    font-weight: 600;
    line-height: 1.15;
    white-space: normal;
}

@media (max-width:680px) {
    .action-btns {
        grid-template-columns: 1fr;
    }

    .action-btns .btn {
        min-height: 68px;
    }
}

/* === AZIONI NUOVA MANUTENZIONE: bottoni uniformi === */
.actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .7rem;
    align-items: stretch;
    margin-top: 1.4rem;
}

.actions .btn-pro {
    width: 100%;
    min-height: 70px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: .75rem;
    line-height: 1.15;
    white-space: normal;
}

@media (max-width:680px) {
    .actions {
        grid-template-columns: 1fr;
    }

    .actions .btn-pro {
        min-height: 68px;
    }
}

/* === AZIONI DETTAGLIO ASSISTENZA (uniformi + responsive) === */
.action-btns,
.button-group {
    /* mantieni compatibilità col markup esistente */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .7rem;
    align-items: stretch;
    margin-top: 1rem;
}

.action-btns .btn,
.button-group .btn {
    width: 100%;
    min-height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .4px;
    line-height: 1.15;
    white-space: normal;
}

@media(max-width:680px) {

    .action-btns,
    .button-group {
        grid-template-columns: 1fr;
    }

    .action-btns .btn,
    .button-group .btn {
        min-height: 68px;
    }
}

/* ============================================
   MODERN ENTITY CARDS SYSTEM
   ============================================ */

/* Header Cards Generiche */
.entity-header-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px;
    color: white;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.entity-info-main {
    display: flex;
    align-items: center;
    gap: 20px;
}

.entity-icon {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.entity-details .entity-name {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.entity-id {
    margin: 0 0 12px 0;
    opacity: 0.9;
    font-size: 14px;
    font-weight: 500;
}

.entity-location,
.entity-email,
.entity-description {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
}

.entity-location i,
.entity-email i,
.entity-description i {
    font-size: 18px;
}

.entity-badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.entity-badge {
    background: rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.entity-badge-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #ffd700;
}

.entity-badge-success {
    background: rgba(255, 255, 255, 0.15);
    color: #90ee90;
}

.entity-badge-warning {
    background: rgba(255, 255, 255, 0.15);
    color: #ffb347;
}

.entity-badge-primary {
    background: rgba(255, 255, 255, 0.15);
    color: #87ceeb;
}

/* Info Grid */
.entity-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.entity-info-grid.three-cols {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.info-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.info-card-header {
    background: #f8fafc;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-card-header i {
    color: #667eea;
    font-size: 20px;
}

.info-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
}

.info-card-content {
    padding: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: #6b7280;
    font-size: 14px;
}

.info-value {
    font-weight: 600;
    color: #111827;
    text-align: right;
    max-width: 60%;
}

/* Links e Badge */
.contact-link {
    color: #667eea;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

.contact-link i {
    font-size: 14px;
}

.supplier-link {
    color: #059669;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.supplier-link:hover {
    color: #047857;
    text-decoration: underline;
}

.service-link {
    color: #dc2626;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.service-link:hover {
    color: #b91c1c;
    text-decoration: underline;
}

.negozio-link {
    color: #059669;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.negozio-link:hover {
    color: #047857;
    text-decoration: underline;
}

/* Badge Specializzati */
.id-badge {
    background: #dbeafe;
    color: #1e40af;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.role-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.role-admin {
    background: #fef3c7;
    color: #92400e;
}

.role-badge.role-operatore {
    background: #dbeafe;
    color: #1e40af;
}

.role-badge.role-responsabile {
    background: #dcfce7;
    color: #166534;
}

.vat-badge {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.stats-badge {
    background: #e0e7ff;
    color: #3730a3;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.no-assignment,
.no-contact,
.no-data {
    color: #9ca3af;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .entity-header-card {
        flex-direction: column;
        text-align: center;
    }

    .entity-badges {
        align-items: center;
    }

    .entity-info-grid,
    .entity-info-grid.three-cols {
        grid-template-columns: 1fr;
    }

    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .info-value {
        text-align: left;
        max-width: 100%;
    }
}