*, *::before, *::after {
    box-sizing: border-box;
}

/* Senza questo reset, elementi come .container (width in % + padding fisso
   in px, sotto) calcolano la propria larghezza come width + padding invece
   che width totale: bastano pochi px di troppo per innescare lo scroll
   orizzontale su tutta la pagina, e con esso anche gli elementi
   position:fixed a piena larghezza (es. bottom-nav) che si allargano di
   conseguenza fino al nuovo "viewport di layout" gonfiato dal browser. */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f5f7fb;
    color: #222;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

.navbar {
    background: #0f172a;
    padding: 14px 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

/* Hamburger — visibile solo su mobile */
.navbar-toggle {
    display: none;
}

/* Su desktop i link fluiscono direttamente nel flex container */
.navbar-links {
    display: contents;
}

.navbar a {
    color: #e5e7eb;
    text-decoration: none;
    padding: 9px 12px;
    border-radius: 8px;
    font-weight: bold;
    transition: 0.2s;
}

.navbar a:hover {
    background: #1e293b;
    color: white;
    text-decoration: none;
}

.navbar a:hover {
    text-decoration: underline;
}

/* Accordion base: nasconde il marker nativo del <details>, ruota una
   chevron "▸" su [open]. Riusata da .nav-adv-group qui sotto e da
   .advanced-fiscal (lavoro_modifica.html, stesso <details class="collapsible ...">)
   invece di due copie indipendenti dello stesso trucco con glifi/pseudo-elementi
   diversi — ognuna aggiunge solo i propri colori/spaziature sopra questa. */
.collapsible summary {
    cursor: pointer;
    list-style: none;
}
.collapsible summary::-webkit-details-marker { display: none; }
.collapsible summary::before {
    content: '▸';
    display: inline-block;
    font-size: 9px;
    transition: transform 0.15s;
}
.collapsible[open] summary::before { transform: rotate(90deg); }

/* Gruppo "Contabilità avanzata" — collassabile, chiuso di default */
.nav-adv-group summary {
    color: #e5e7eb;
    padding: 9px 12px;
    border-radius: 8px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}
.nav-adv-group summary::before { color: #94a3b8; }
.nav-adv-group summary:hover { background: #1e293b; color: white; }
.nav-adv-links {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}
.nav-adv-group[open] .nav-adv-links {
    margin-top: 2px;
    padding: 4px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
}

/* ── VALIDAZIONE CAMPI FISCALI ── */
.val-hint {
    font-size: 11px;
    font-weight: 600;
    margin-top: 3px;
    min-height: 15px;
    display: block;
}
.val-hint-ok  { color: #16a34a; }
.val-hint-err { color: #dc2626; }
.val-ok { border-color: #16a34a !important; box-shadow: 0 0 0 2px rgba(22,163,74,0.12) !important; }
.val-err { border-color: #dc2626 !important; box-shadow: 0 0 0 2px rgba(220,38,38,0.12) !important; }

/* ── RICERCA GLOBALE ── */
.search-wrap {
    position: relative;
    margin-left: auto;
}
#global-search {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px;
    color: white;
    font-size: 13px;
    font-family: inherit;
    padding: 8px 14px 8px 34px;
    width: 180px;
    outline: none;
    transition: width 0.25s, background 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
}
#global-search::placeholder { color: #9ca3af; }
#global-search:focus {
    width: 260px;
    background-color: rgba(255,255,255,0.15);
    border-color: rgba(124,58,237,0.7);
    box-shadow: 0 0 0 2px rgba(124,58,237,0.25);
}
#search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 320px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.14);
    z-index: 9999;
    overflow: hidden;
    max-height: 420px;
    overflow-y: auto;
}
.sr-section {
    padding: 8px 14px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #9ca3af;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}
.sr-item {
    display: flex;
    flex-direction: column;
    padding: 9px 14px;
    text-decoration: none;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.12s;
}
.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: #f0f4ff; }
.sr-label {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}
.sr-sub {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 1px;
}
.sr-empty {
    padding: 18px 14px;
    font-size: 13px;
    color: #9ca3af;
    text-align: center;
}

/* ── RICERCA MOBILE (dentro hamburger) ── */
.nav-search-mobile {
    display: none; /* nascosta su desktop */
    position: relative;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 4px;
}
.nav-search-mobile input {
    width: 100%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px;
    color: white;
    font-size: 15px;
    font-family: inherit;
    padding: 10px 14px;
    outline: none;
    box-sizing: border-box;
}
.nav-search-mobile input::placeholder { color: #9ca3af; }
#search-dropdown-mobile {
    display: none;
    position: absolute;
    top: calc(100% - 4px);
    left: 14px;
    right: 14px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    z-index: 9999;
    overflow: hidden;
    max-height: 300px;
    overflow-y: auto;
}

/* ── LOGOUT BUTTON STILE ── */
.nav-logout-btn {
    color: #f87171 !important;
    font-weight: 700 !important;
    border-top: 1px solid rgba(255,255,255,0.07);
    margin-top: 4px;
    padding-top: 12px !important;
}
.nav-logout-btn:hover {
    background: rgba(220,38,38,0.15) !important;
    color: #fca5a5 !important;
}

.container {
    width: 90%;
    max-width: 1300px;
    margin: 30px auto;
    background: #ffffff;
    padding: 28px;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

h1, h2, h3 {
    color: #1f2d3d;
}

.subtitle {
    color: #666;
    margin-top: -10px;
    margin-bottom: 25px;
}

.dashboard-grid,
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin: 20px 0 35px 0;
}

.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    transition: 0.2s;
    text-decoration: none;
    color: inherit;
}

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

.card h3 {
    margin-top: 0;
    font-size: 16px;
    color: #333;
}

.big-number,
.card .value {
    font-size: 34px;
    font-weight: bold;
    color: #2563eb;
    margin: 12px 0;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.btn:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

.alert {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 6px;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

th, td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

th {
    color: #374151;
    font-size: 14px;
}
.btn-small {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 6px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}

.btn-small:hover {
    background: #1d4ed8;
}
.badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 13px;
}

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

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

.bar-container {
    width: 100%;
    height: 18px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
}

.bar {
    height: 100%;
    border-radius: 999px;
}

.bar-green {
    background: #16a34a;
}

.bar-red {
    background: #dc2626;
}

.bar-blue {
    background: #2563eb;
}

.bar-orange {
    background: #f97316;
}

.bar-purple {
    background: #7c3aed;
}

.foto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.badge-orange {
    background: #f97316;
    color: white;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 0.85rem;
}

.badge-blue {
    background: #2563eb;
    color: white;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 0.85rem;
}

.text-green {
    color: #16a34a !important;
}

.text-red {
    color: #dc2626 !important;
}

.btn-danger {
    background: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
}
.kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

.kpi-card {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.kpi-label {
    display: block;
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.kpi-value {
    font-size: 38px;
    font-weight: bold;
}

.kpi-card .text-green {
    color: #4ade80 !important;
}

.kpi-card .text-red {
    color: #f87171 !important;
}
@media (max-width: 900px) {

    .container {
        width: 95%;
        padding: 18px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* L'ultima colonna (di norma il Totale) resta ancorata a destra mentre
       il resto della tabella scorre orizzontalmente, cosi' non finisce mai
       fuori schermo su mobile. */
    table th:last-child,
    table td:last-child {
        position: sticky;
        right: 0;
        background: #ffffff;
        box-shadow: -6px 0 6px -6px rgba(0, 0, 0, 0.2);
    }

    table th:last-child {
        background: #f5f7fb;
    }

    .navbar {
        flex-wrap: wrap;
        padding: 10px 16px;
        gap: 8px;
        align-items: center;
    }

    .navbar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: #e5e7eb;
        font-size: 22px;
        cursor: pointer;
        padding: 6px 8px;
        border-radius: 6px;
        order: 1;
        flex-shrink: 0;
        line-height: 1;
    }

    .navbar-toggle:hover {
        background: #1e293b;
    }

    .navbar-links {
        display: none;
    }

    .navbar.nav-open .navbar-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        position: fixed;
        top: 60px; /* sovrascritta da JS */
        left: 0;
        right: 0;
        bottom: 0;
        background: #0f172a;
        z-index: 10000;
        overflow-y: auto;
        overscroll-behavior: contain;
        touch-action: pan-y;
        padding: 8px 8px 100px;
        border-top: 1px solid rgba(255,255,255,0.08);
    }

    .navbar-links a,
    .navbar-links button#btn-installa-pwa {
        padding: 10px 14px;
        border-radius: 7px;
        width: 100%;
        box-sizing: border-box;
        text-align: left;
        margin-right: 0;
    }

    .search-wrap {
        display: none; /* nascosta dalla top-bar su mobile */
    }

    .nav-search-mobile {
        display: block; /* visibile solo nel menu hamburger aperto */
    }

    .navbar a {
        margin-right: 0;
    }

    .big-number,
    .kpi-value {
        font-size: 28px;
    }
}
.alert-dashboard {
    margin: 20px 0 25px 0;
}

.alert-box {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 10px;
    font-weight: bold;
}

.alert-box.danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-box.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-box.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.health-box {
    margin: 20px 0 35px 0;
}

.health-status {
    padding: 18px 22px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: bold;
}

.health-good {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.health-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.health-bad {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.health-neutral {
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
}
.priority-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.priority-list li {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-weight: bold;
}

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

.priority-warning {
    background: #fef3c7;
    color: #92400e;
}

.priority-info {
    background: #dbeafe;
    color: #1e40af;
}

.priority-success {
    background: #dcfce7;
    color: #166534;
}
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.main-title {
    margin: 0;
    font-size: 34px;
    color: #111827;
}

.main-subtitle {
    margin-top: 6px;
    color: #6b7280;
}

.top-date {
    background: #111827;
    color: white;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.performance-card {
    min-height: 180px;
}

.performance-card h3 {
    margin-bottom: 18px;
}
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 18px;

    background: white;
    border-radius: 18px;
    padding: 22px;

    text-decoration: none;
    color: inherit;

    border: 1px solid #e5e7eb;

    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.10);
}

.action-icon {
    width: 60px;
    height: 60px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 16px;

    background: #eff6ff;

    font-size: 28px;
}

.action-card h3 {
    margin: 0 0 6px 0;
    color: #111827;
}

.action-card p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}
.economy-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;

    margin-bottom: 25px;
}

.economy-item {
    background: linear-gradient(135deg, #0f172a, #1e293b);

    border-radius: 18px;

    padding: 24px;

    color: white;

    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.economy-label {
    display: block;

    font-size: 14px;

    opacity: 0.75;

    margin-bottom: 12px;
}

.economy-value {
    font-size: 34px;
    font-weight: bold;
}

.economy-item .text-green {
    color: #4ade80 !important;
}

.economy-item .text-red {
    color: #f87171 !important;
}
.small-note {
    color: #6b7280;
    font-size: 13px;
    margin-top: 10px;
}
.cliente-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 20px;
}

.cliente-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cliente-info-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 30px;
}

.info-label {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 6px;
}
.timeline-item {
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.timeline-item:last-child {
    border-bottom: none;
}
.btn-active {
    outline: 3px solid #facc15;
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.25);
}
.row-warning {
    background-color: #fff8e1;
}

.row-info {
    background-color: #e8f4fd;
}

/* ══ FAB — Floating Action Button ══════════════════════════════════════ */

.fab-container {
    position: fixed;
    right: 20px;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    z-index: 700;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none;
}

@media (min-width: 901px) {
    .fab-container { bottom: 24px; }
}

.fab-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #7c3aed;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
    box-shadow: 0 4px 20px rgba(124,58,237,0.50);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    flex-shrink: 0;
    pointer-events: auto;
}

.fab-main:hover { box-shadow: 0 6px 28px rgba(124,58,237,0.60); }
.fab-main:active { transform: scale(0.92); }
.fab-container.fab-open .fab-main { transform: rotate(45deg); }

.fab-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.fab-container.fab-open .fab-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.fab-action {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.fab-action-label {
    background: #1e293b;
    color: white;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

.fab-action-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    flex-shrink: 0;
    transition: transform 0.15s;
}

.fab-action:active .fab-action-btn { transform: scale(0.92); }

/* ══ MOBILE / ANDROID ══════════════════════════════════════════════════ */

/* Bottom nav: nascosta su desktop, mostrata solo via media query */
.bottom-nav { display: none; }

/* Etichette gruppo navbar: invisibili su desktop (non interferiscono col flex) */
.nav-group-label,
.nav-group-sep {
    display: none;
}

@media (max-width: 900px) {
    /* Etichette gruppo nel menu hamburger */
    .nav-group-label {
        display: block;
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1.2px;
        color: #64748b;
        padding: 10px 14px 3px;
        pointer-events: none;
    }

    .nav-group-sep {
        display: block;
        height: 1px;
        background: rgba(255,255,255,0.07);
        margin: 6px 0 2px;
    }

    /* Previene zoom automatico su Android/iOS quando si tocca un campo
       (il browser zooma se font-size < 16px) */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="password"],
    input[type="search"],
    input[type="date"],
    input[type="datetime-local"],
    input[type="time"],
    select,
    textarea {
        font-size: 16px;
    }

    /* Navbar sempre visibile anche durante lo scroll */
    .navbar {
        position: sticky;
        top: 0;
        z-index: 500;
    }

    /* Spazio extra in fondo perché la bottom nav non copra i contenuti */
    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    /* Bottom navigation bar — stile Android */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 600;
        background: #0f172a;
        border-top: 1px solid rgba(255,255,255,0.10);
        height: 60px;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        box-shadow: 0 -2px 16px rgba(0,0,0,0.30);
    }

    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #64748b;
        text-decoration: none;
        font-size: 10px;
        font-family: inherit;
        gap: 3px;
        padding: 6px 4px;
        border: none;
        background: none;
        cursor: pointer;
        transition: color 0.15s;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        min-height: 44px; /* touch target minimo WCAG */
    }

    .bottom-nav-item .bn-icon {
        font-size: 20px;
        line-height: 1;
        display: block;
    }

    .bottom-nav-item:active {
        color: #a78bfa;
    }

    .bottom-nav-item.bn-active {
        color: #7c3aed;
    }

    /* Pill evidenziatore sotto item attivo */
    .bottom-nav-item.bn-active .bn-icon {
        background: rgba(124,58,237,0.15);
        border-radius: 14px;
        padding: 2px 14px;
    }

    /* Container principale: non tagliare il contenuto orizzontalmente */
    .container {
        overflow-x: hidden;
    }

    /* Titoli più compatti */
    .main-title { font-size: 24px; }
    h1 { font-size: 22px; }
    h2 { font-size: 18px; }

    /* Grid con colonna singola su schermi molto stretti */
    .action-grid,
    .economy-banner,
    .cliente-info-box {
        grid-template-columns: 1fr;
    }

    /* KPI compatti */
    .kpi-card { padding: 16px; }

    /* Top header: stack verticale */
    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Pulsanti azione full-width su mobile */
    .cliente-actions {
        width: 100%;
    }
    .cliente-actions .btn,
    .cliente-actions a {
        flex: 1;
        text-align: center;
    }
}
/* Note sotto i campi prezzo: dichiarano se l'importo e' netto o lordo.
   Unica classe condivisa cosi' la convenzione ha lo stesso aspetto ovunque. */
.hint-iva {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
    color: #6b7280;
}
