/* ============================================
   HACCPGO ADMIN PANEL - MINIMAL DESIGN
   Design pulito, professionale e funzionale
   ============================================ */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;
    --info: #0891b2;
    --text-dark: #1f2937;
    --text-medium: #4b5563;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    --bg-page: #f3f4f6;
    --bg-white: #ffffff;
    --border: #e5e7eb;
    --border-dark: #d1d5db;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --radius: 6px;
    --radius-lg: 8px;
}

/* BASE */
body, .neu-body {
    background: var(--bg-page);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    margin: 0;
    min-height: 100vh;
}

/* NAVBAR */
.neu-navbar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.neu-navbar .navbar-brand {
    font-weight: 600;
    color: var(--primary);
    font-size: 18px;
}

.neu-navbar .nav-link {
    color: var(--text-medium);
    padding: 16px 14px;
    font-size: 14px;
}

.neu-navbar .nav-link:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.neu-navbar .dropdown-menu {
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius);
    padding: 4px 0;
}

.neu-navbar .dropdown-item {
    padding: 8px 16px;
    font-size: 14px;
}

.neu-navbar .dropdown-item:hover {
    background: var(--bg-page);
}

.neu-btn-home {
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    color: var(--text-medium);
    text-decoration: none;
}

.neu-btn-home:hover {
    background: var(--border);
    color: var(--text-dark);
}

.neu-btn-logout {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    cursor: pointer;
}

.neu-btn-logout:hover {
    background: #b91c1c;
    color: white;
}

/* MAIN CONTAINER */
.neu-main-container {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

/* CARDS */
.neu-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.neu-card-header {
    background: var(--primary);
    color: white;
    padding: 16px 24px;
    margin: -24px -24px 24px -24px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Safety-net globale: header sempre a capo su spazi stretti, mai overflow. */
    flex-wrap: wrap;
    gap: 12px;
}

.neu-card-header h1,
.neu-card-header h2,
.neu-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    min-width: 0;
    overflow-wrap: anywhere;
}

.neu-card-header-success { background: var(--success); }
.neu-card-header-danger { background: var(--danger); }
.neu-card-header-warning { background: var(--warning); }

/* STAT CARDS */
.neu-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.neu-stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.neu-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    margin-bottom: 12px;
}

.neu-stat-icon.primary { background: var(--primary); }
.neu-stat-icon.success { background: var(--success); }
.neu-stat-icon.danger { background: var(--danger); }
.neu-stat-icon.warning { background: var(--warning); }
.neu-stat-icon.info { background: var(--info); }

.neu-stat-label {
    color: var(--text-light);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.neu-stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

/* ACTION CARDS */
.neu-actions-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.neu-action-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-decoration: none;
    color: var(--text-dark);
    display: block;
}

.neu-action-card:hover {
    border-color: var(--primary);
    color: var(--text-dark);
}

.neu-action-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 12px;
}

.neu-action-icon.success { background: var(--success); }
.neu-action-icon.danger { background: var(--danger); }
.neu-action-icon.warning { background: var(--warning); }
.neu-action-icon.info { background: var(--info); }

.neu-action-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.neu-action-desc {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
}

/* BUTTONS */
.neu-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    background: var(--bg-white);
    color: var(--text-dark);
}

.neu-btn:hover {
    background: var(--bg-page);
    color: var(--text-dark);
}

.neu-btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.neu-btn-primary:hover {
    background: var(--primary-dark);
    color: white;
}

.neu-btn-success {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.neu-btn-success:hover {
    background: #15803d;
    color: white;
}

.neu-btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.neu-btn-danger:hover {
    background: #b91c1c;
    color: white;
}

.neu-btn-warning {
    background: var(--warning);
    border-color: var(--warning);
    color: white;
}

.neu-btn-info {
    background: var(--info);
    border-color: var(--info);
    color: white;
}

.neu-btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
}

.neu-btn-icon-sm {
    width: 32px;
    height: 32px;
    font-size: 13px;
}

.neu-btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* FORMS */
.neu-form-group {
    margin-bottom: 16px;
}

.neu-label {
    display: block;
    font-weight: 500;
    color: var(--text-medium);
    margin-bottom: 6px;
    font-size: 14px;
}

.neu-label.required::after {
    content: ' *';
    color: var(--danger);
}

.neu-input,
.neu-select,
.neu-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text-dark);
    background: var(--bg-white);
}

.neu-input:focus,
.neu-select:focus,
.neu-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.neu-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.neu-textarea {
    min-height: 100px;
    resize: vertical;
}

.neu-validation-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 4px;
}

/* TABLES */
.neu-table-container {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}

.neu-table-responsive {
    overflow-x: auto;
}

.neu-table {
    width: 100%;
    border-collapse: collapse;
}

.neu-table thead {
    background: var(--bg-page);
}

.neu-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-medium);
    border-bottom: 1px solid var(--border);
}

.neu-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-dark);
}

.neu-table tbody tr:last-child td {
    border-bottom: none;
}

.neu-table tbody tr:hover {
    background: var(--bg-page);
}

.neu-table-actions {
    display: flex;
    gap: 6px;
}

/* BADGES */
.neu-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.neu-badge-primary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.neu-badge-success {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success);
}

.neu-badge-danger {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
}

.neu-badge-warning {
    background: rgba(217, 119, 6, 0.1);
    color: var(--warning);
}

.neu-badge-info {
    background: rgba(8, 145, 178, 0.1);
    color: var(--info);
}

.neu-badge-light {
    background: var(--bg-page);
    color: var(--text-medium);
}

/* ALERTS */
.neu-alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-left: 4px solid;
}

.neu-alert-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.neu-alert-content {
    flex: 1;
}

.neu-alert-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.neu-alert-text {
    font-size: 13px;
}

.neu-alert-success {
    background: rgba(22, 163, 74, 0.05);
    border-color: var(--success);
}

.neu-alert-success .neu-alert-icon {
    background: var(--success);
    color: white;
}

.neu-alert-danger {
    background: rgba(220, 38, 38, 0.05);
    border-color: var(--danger);
}

.neu-alert-danger .neu-alert-icon {
    background: var(--danger);
    color: white;
}

.neu-alert-warning {
    background: rgba(217, 119, 6, 0.05);
    border-color: var(--warning);
}

.neu-alert-warning .neu-alert-icon {
    background: var(--warning);
    color: white;
}

.neu-alert-info {
    background: rgba(8, 145, 178, 0.05);
    border-color: var(--info);
}

.neu-alert-info .neu-alert-icon {
    background: var(--info);
    color: white;
}

/* SECTION TITLE */
.neu-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 24px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* WELCOME */
.neu-welcome {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.neu-welcome h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 4px 0;
}

.neu-welcome p {
    color: var(--text-light);
    margin: 0;
    font-size: 14px;
}

/* EMPTY STATE */
.neu-empty-state {
    text-align: center;
    padding: 48px 24px;
}

.neu-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--bg-page);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-light);
}

.neu-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.neu-empty-text {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* DETAILS LIST */
.neu-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.neu-details-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

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

.neu-details-label {
    width: 40%;
    font-weight: 500;
    color: var(--text-light);
    font-size: 14px;
}

.neu-details-value {
    width: 60%;
    /* min-width:0 permette al valore (flex child) di restringersi sotto il min-content;
       overflow-wrap evita che token lunghi non spezzabili (IBAN, email, PEC) sfondino
       la card su schermi stretti → niente scroll orizzontale. */
    min-width: 0;
    color: var(--text-dark);
    font-size: 14px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* CONFIRM CARD */
.neu-confirm-card {
    text-align: center;
    padding: 32px;
}

.neu-confirm-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.neu-confirm-icon.danger {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
}

.neu-confirm-icon.warning {
    background: rgba(217, 119, 6, 0.1);
    color: var(--warning);
}

.neu-confirm-icon.success {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success);
}

.neu-confirm-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.neu-confirm-text {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.neu-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* FILTER BAR */
.neu-filter-bar {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

/* PAGINATION */
.neu-pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.neu-page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
    color: var(--text-medium);
    text-decoration: none;
    font-size: 14px;
}

.neu-page-link:hover {
    background: var(--bg-page);
}

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

/* SEARCH */
.neu-search-container {
    position: relative;
}

.neu-search-input {
    padding-left: 36px;
}

.neu-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* UTILITY */
.text-gradient {
    color: var(--primary);
}

/* HIDE PRELOADER */
.neu-preloader {
    display: none !important;
}

/* Remove animations */
.animate-on-scroll,
.animate-fadeInUp,
.animate-slideInLeft {
    opacity: 1 !important;
    animation: none !important;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .neu-main-container {
        padding: 16px;
    }

    .neu-card {
        padding: 16px;
    }

    .neu-card-header {
        padding: 12px 16px;
        margin: -16px -16px 16px -16px;
    }

    .neu-table th,
    .neu-table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .neu-stats-container {
        grid-template-columns: 1fr 1fr;
    }

    .neu-btn-group {
        flex-direction: column;
    }

    .neu-btn-group .neu-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .neu-stats-container {
        grid-template-columns: 1fr;
    }

    .neu-actions-container {
        grid-template-columns: 1fr;
    }

    .neu-filter-bar {
        flex-direction: column;
    }

    .neu-filter-bar .neu-input,
    .neu-filter-bar .neu-select {
        width: 100%;
    }
}

/* ============================================
   AMMINISTRATORI AZIENDE
   Avatar iniziali, badge categoria, ricerca, filtro a pillole,
   paginazione e tabella responsive "a card" (mobile: ZERO scroll orizzontale).
   Le classi qui sotto sono nuove e scoped: non alterano le altre schermate.
   ============================================ */

/* Avatar con iniziali (sostituisce le icone generiche fa-user-shield) */
.neu-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: .5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}

.neu-avatar.admin { background: linear-gradient(135deg, #6366f1, #4338ca); }
.neu-avatar.abbonato { background: linear-gradient(135deg, #22c55e, #15803d); }
.neu-avatar.demo { background: linear-gradient(135deg, #f59e0b, #b45309); }

/* Badge categoria */
.neu-cat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
    line-height: 1.4;
}

.neu-cat.admin { background: rgba(99, 102, 241, .12); color: #4338ca; border-color: rgba(99, 102, 241, .25); }
.neu-cat.abbonato { background: rgba(34, 197, 94, .12); color: #15803d; border-color: rgba(34, 197, 94, .25); }
.neu-cat.demo { background: rgba(245, 158, 11, .12); color: #b45309; border-color: rgba(245, 158, 11, .25); }

/* Cella nome utente */
.neu-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.neu-user-cell .info { min-width: 0; }
.neu-user-cell .info strong { display: block; color: var(--text-dark); overflow-wrap: anywhere; }
.neu-user-cell .info small { color: var(--text-muted); font-size: 12px; overflow-wrap: anywhere; }

/* Modale Modifica: il <form> è l'unico figlio di .modal-content e si comporta da
   colonna flex, così la .modal-body può scrollare internamente (pulsante Salva
   sempre raggiungibile, anche su mobile con molti campi impilati). */
#tuModalContent > form,
#cuModalContent > form,
#adminAziendaModalContent > form,
#adminNuovoClienteModalContent > form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
}

#tuModalContent > form > .modal-body,
#cuModalContent > form > .modal-body,
#adminAziendaModalContent > form > .modal-body,
#adminNuovoClienteModalContent > form > .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

/* Azioni riga (desktop) */
.neu-row-actions {
    display: inline-flex;
    gap: 6px;
    justify-content: flex-end;
}

.neu-row-actions .neu-btn { padding: 6px 12px; font-size: 13px; }

/* Toolbar filtri */
.neu-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

/* Search migliorata (desktop + mobile) */
.neu-searchbar {
    position: relative;
    flex: 1 1 280px;
    min-width: 0;
}

.neu-searchbar input {
    width: 100%;
    height: 44px;
    padding: 0 40px 0 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--bg-white);
}

.neu-searchbar input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.neu-searchbar .ico {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.neu-searchbar .clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    display: none;
    line-height: 1;
}

.neu-searchbar input:not(:placeholder-shown) ~ .clear { display: block; }

/* Filtro categorie a pillole */
.neu-segment {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.neu-segment-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-medium);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}

.neu-segment-btn:hover { background: var(--bg-page); }
.neu-segment-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.neu-segment-btn .cnt {
    background: rgba(0, 0, 0, .08);
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 700;
}

.neu-segment-btn.active .cnt { background: rgba(255, 255, 255, .28); }

/* Paginazione */
.neu-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-items: center;
    margin-top: 18px;
}

.neu-pager button {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-white);
    color: var(--text-medium);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.neu-pager button:hover:not(:disabled) { background: var(--bg-page); }
.neu-pager button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.neu-pager button:disabled { opacity: .45; cursor: not-allowed; }
.neu-pager button.dots { border: none; background: transparent; }

/* ============================================
   TABELLA RESPONSIVE "A CARD" — solo .neu-cards-table
   Su mobile ogni riga diventa una card con etichette: niente scroll orizzontale,
   si mostra TUTTO il contenuto in verticale.
   ============================================ */
@media (max-width: 820px) {
    /* Nessuno scroll orizzontale: il wrapper non è più un contenitore di scroll
       (il contenuto è impaginato a card in verticale). */
    .neu-cards-wrap { overflow-x: visible; }

    .neu-cards-table thead { display: none; }

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

    .neu-cards-table tr {
        background: var(--bg-white);
        border: 1px solid var(--border);
        border-radius: 12px;
        margin-bottom: 14px;
        padding: 6px 4px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
    }

    .neu-cards-table tr:hover { background: var(--bg-white); }

    .neu-cards-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        text-align: right;
        padding: 9px 14px;
        border: none;
        border-bottom: 1px solid var(--border);
        font-size: 14px;
        /* min-width:0 + overflow-wrap: valori lunghi senza spazi (email/username)
           vanno a capo dentro la card invece di sfondarla. */
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .neu-cards-table td:last-child { border-bottom: none; }

    .neu-cards-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: .4px;
        color: var(--text-light);
        text-align: left;
        flex-shrink: 0;
    }

    /* La pillola categoria (nowrap di default) può andare a capo dentro la card:
       evita micro-overflow orizzontale con l'etichetta più lunga su schermi ~320px. */
    .neu-cards-table td .neu-cat {
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: right;
    }

    /* Header utente della card (avatar + nome), a piena larghezza.
       Niente margini laterali: eviterebbero il micro-overflow orizzontale. */
    .neu-cards-table td.cell-user {
        background: var(--bg-page);
        border-radius: 10px;
        margin: 2px 0 6px 0;
        padding: 12px 14px;
        border-bottom: none;
        text-align: left;
        justify-content: flex-start;
    }

    .neu-cards-table td.cell-user::before { content: none; }

    /* Azioni a piena larghezza, pulsanti affiancati e stretchati */
    .neu-cards-table td.cell-actions {
        text-align: left;
        padding: 10px 14px 6px;
    }

    .neu-cards-table td.cell-actions::before { content: none; }

    .neu-cards-table td.cell-actions .neu-row-actions {
        display: flex;
        width: 100%;
        gap: 10px;
        justify-content: stretch;
    }

    .neu-cards-table td.cell-actions .neu-row-actions .neu-btn {
        flex: 1;
        justify-content: center;
    }
}

/* ============================================
   DIPENDENTI (CompUsers): intestazioni gruppo azienda + selezione bulk
   ============================================ */
.cu-group-header td {
    background: var(--bg-page);
}

.cu-group-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.cu-group-title {
    font-size: 15px;
    color: var(--text-dark);
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.cu-group-title strong { overflow-wrap: anywhere; }

.cu-bulk-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: rgba(37, 99, 235, .08);
    border: 1px solid rgba(37, 99, 235, .25);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
    color: var(--text-dark);
}

.cu-table .cu-check,
.cu-table #cuCheckAll {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.cu-roles {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
}

.cu-roles .neu-badge {
    font-size: 10px;
    padding: 2px 6px;
}

/* Wizard creazione dipendente */
.cu-steps {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.cu-dot {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 110px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--bg-page);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.cu-dot .n {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--border-dark);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.cu-dot.active { background: rgba(37, 99, 235, .1); color: var(--primary); }
.cu-dot.active .n { background: var(--primary); }

/* Mobile: intestazione gruppo come banner (non card) + label sulla cella selezione */
@media (max-width: 820px) {
    .neu-cards-table tr.cu-group-header,
    .neu-cards-table tr.fl-group-header,
    .neu-cards-table tr.dl-group-header {
        border: none;
        box-shadow: none;
        background: transparent;
        margin: 12px 0 2px;
        padding: 0;
    }

    .neu-cards-table td.cell-full {
        display: block;
        text-align: left;
        border: none;
        background: var(--bg-page);
        border-radius: 10px;
        padding: 12px 14px;
    }

    .neu-cards-table td.cell-full::before { content: none; }

    .neu-cards-table td.cell-select { justify-content: space-between; }
    .neu-cards-table td.cell-select::before { content: "Seleziona"; }
}

/* ============================================
   GEO AUTOCOMPLETE STYLES
   ============================================ */

.geo-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
}

.geo-autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border);
    transition: background-color 0.15s ease;
}

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

.geo-autocomplete-item:hover,
.geo-autocomplete-item.active {
    background-color: var(--primary);
    color: white;
}

.geo-autocomplete-item.geo-autocomplete-info {
    color: var(--text-muted);
    cursor: default;
    font-style: italic;
}

.geo-autocomplete-item.geo-autocomplete-info:hover {
    background-color: transparent;
    color: var(--text-muted);
}

/* ============================================
   TICKET MODULE (AdminPanel) — mobile-first
   Palette di stato (riservata, sempre con icona+label) e
   palette categorie validate per CVD.
   ============================================ */

:root {
    /* Stati (state palette) */
    --tk-open: #b45309;
    --tk-open-bg: rgba(217, 119, 6, 0.14);
    --tk-open-solid: #d97706;
    --tk-prog: #1d4ed8;
    --tk-prog-bg: rgba(37, 99, 235, 0.12);
    --tk-prog-solid: #2563eb;
    --tk-done: #15803d;
    --tk-done-bg: rgba(22, 163, 74, 0.12);
    --tk-done-solid: #16a34a;
    --tk-closed: #4b5563;
    --tk-closed-bg: rgba(107, 114, 128, 0.16);
    --tk-closed-solid: #6b7280;
    /* Categorie (categorical identity) */
    --tk-cat-partner: #7c3aed;
    --tk-cat-cliente: #0891b2;
    --tk-cat-interno: #db2777;
}

/* ---- Header ad alto contrasto sui card-header colorati ---- */
.tk-header-side {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tk-hbadge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.42);
    white-space: nowrap;
}

.tk-hbadge .tk-hbadge-num {
    background: #ffffff;
    color: var(--primary);
    border-radius: 999px;
    padding: 1px 8px;
    font-weight: 700;
    font-size: 12px;
}

/* Bottone chiaro leggibile su header colorato */
.tk-header-btn {
    background: #ffffff;
    color: var(--primary);
    border-color: #ffffff;
    font-weight: 600;
}

.tk-header-btn:hover {
    background: #eef2ff;
    color: var(--primary-dark);
}

/* ---- Dashboard panoramica ---- */
.tk-dash {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.tk-panel {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.tk-panel-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--text-light);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* KPI per stato: 4 tiles cliccabili */
.tk-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.tk-kpi {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-white);
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
    min-width: 0;
}

.tk-kpi:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--text-dark);
}

.tk-kpi.is-active {
    border-color: currentColor;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.tk-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.tk-kpi-ic {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
}

.tk-kpi-num {
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    color: var(--text-dark);
}

.tk-kpi-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tk-open .tk-kpi-ic { background: var(--tk-open-solid); }
.tk-open .tk-kpi-num { color: var(--tk-open); }
.tk-prog .tk-kpi-ic { background: var(--tk-prog-solid); }
.tk-prog .tk-kpi-num { color: var(--tk-prog); }
.tk-done .tk-kpi-ic { background: var(--tk-done-solid); }
.tk-done .tk-kpi-num { color: var(--tk-done); }
.tk-closed .tk-kpi-ic { background: var(--tk-closed-solid); }
.tk-closed .tk-kpi-num { color: var(--tk-closed); }

/* Barra di distribuzione per stato (stacked, gap = 2px surface) */
.tk-statusbar {
    display: flex;
    height: 14px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-page);
    gap: 2px;
    margin-bottom: 12px;
}

.tk-statusbar-seg {
    min-width: 4px;
    height: 100%;
}

.tk-statusbar-empty {
    height: 14px;
    border-radius: 8px;
    background: var(--bg-page);
    margin-bottom: 12px;
}

.tk-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.tk-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-medium);
}

.tk-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.tk-legend-num {
    font-weight: 700;
    color: var(--text-dark);
}

/* Categorie: tiles-scorciatoia per le tab */
.tk-cats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.tk-cat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-dark);
    background: var(--bg-white);
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
    min-width: 0;
}

.tk-cat:hover { box-shadow: var(--shadow-md); color: var(--text-dark); }
.tk-cat.is-active { border-color: currentColor; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.04); }

.tk-cat-ic {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
}

.tk-cat--partner { color: var(--tk-cat-partner); }
.tk-cat--partner .tk-cat-ic { background: var(--tk-cat-partner); }
.tk-cat--cliente { color: var(--tk-cat-cliente); }
.tk-cat--cliente .tk-cat-ic { background: var(--tk-cat-cliente); }
.tk-cat--interno { color: var(--tk-cat-interno); }
.tk-cat--interno .tk-cat-ic { background: var(--tk-cat-interno); }

.tk-cat-body { min-width: 0; }
.tk-cat-num { font-size: 20px; font-weight: 800; line-height: 1.1; color: var(--text-dark); }
.tk-cat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tk-cat-sub { font-size: 11px; color: var(--text-light); }

/* ---- Tabs: sempre interamente visibili, MAI scroll orizzontale ---- */
.tk-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border);
}

.tk-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    min-width: 0;
}

.tk-tab:hover { color: var(--text-dark); }
.tk-tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }

.tk-tab-count {
    background: var(--danger);
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    line-height: 1.5;
}

/* ---- Filtri per stato (chips) ---- */
.tk-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding: 14px 0 2px;
}

.tk-filter-label { font-size: 12px; color: var(--text-light); font-weight: 700; }

.tk-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-medium);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    min-height: 40px;
}
.tk-chip:hover { background: var(--bg-page); color: var(--text-dark); }
.tk-chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---- Card-list dei ticket (mobile-first) ---- */
.tk-toolbar { margin: 14px 0; }

.tk-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tk-item {
    position: relative;
    display: grid;
    grid-template-columns: 44px 1fr auto;
    grid-template-areas:
        "id  main   status"
        "id  meta   actions";
    gap: 4px 12px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--border-dark);
    border-radius: var(--radius-lg);
    background: var(--bg-white);
    text-decoration: none;
    color: var(--text-dark);
    transition: box-shadow 0.12s ease, transform 0.12s ease, border-color 0.12s ease;
}

/* Stretched link: l'intera card apre il dettaglio (tap target ampio),
   le azioni restano cliccabili sopra grazie allo z-index. */
.tk-item-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    text-indent: -9999px;
    overflow: hidden;
}
.tk-item-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.tk-item-actions { position: relative; z-index: 2; }

.tk-item:hover {
    box-shadow: var(--shadow-md);
    color: var(--text-dark);
}

.tk-item--open { border-left-color: var(--tk-open-solid); }
.tk-item--prog { border-left-color: var(--tk-prog-solid); }
.tk-item--done { border-left-color: var(--tk-done-solid); }
.tk-item--closed { border-left-color: var(--tk-closed-solid); }

.tk-item-id {
    grid-area: id;
    font-weight: 800;
    font-size: 13px;
    color: var(--text-muted);
    align-self: start;
}

.tk-item-main { grid-area: main; min-width: 0; }
.tk-item-subject {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-dark);
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tk-item-replied {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    color: var(--tk-done);
    font-weight: 600;
    margin-top: 2px;
}

.tk-item-meta {
    grid-area: meta;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 12.5px;
    color: var(--text-light);
    min-width: 0;
}

.tk-item-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.tk-item-status { grid-area: status; justify-self: end; align-self: start; }
.tk-item-actions {
    grid-area: actions;
    justify-self: end;
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Badge stato riutilizzabile (icona + label sempre presenti) */
.tk-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.tk-status--open { background: var(--tk-open-bg); color: var(--tk-open); }
.tk-status--prog { background: var(--tk-prog-bg); color: var(--tk-prog); }
.tk-status--done { background: var(--tk-done-bg); color: var(--tk-done); }
.tk-status--closed { background: var(--tk-closed-bg); color: var(--tk-closed); }

/* Badge categoria */
.tk-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
}
.tk-cat-badge--consulente { background: rgba(124, 58, 237, 0.12); color: var(--tk-cat-partner); }
.tk-cat-badge--sponsor { background: rgba(217, 119, 6, 0.14); color: var(--tk-open); }
.tk-cat-badge--interno { background: rgba(219, 39, 119, 0.12); color: var(--tk-cat-interno); }

/* Bottone azione icona nella lista (tap target >=40px) */
.tk-iconbtn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-medium);
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    flex-shrink: 0;
}
.tk-iconbtn:hover { background: var(--bg-page); color: var(--text-dark); }
.tk-iconbtn--danger:hover { background: rgba(220, 38, 38, 0.08); color: var(--danger); border-color: rgba(220, 38, 38, 0.3); }

/* ---- Meta-grid anti-overlap (Details) ---- */
.tk-meta {
    display: grid;
    /* min(100%,200px): su viewport ultra-stretti (<296px) la colonna si restringe
       invece di sforare -> nessun overflow orizzontale a nessuna larghezza. */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 14px 20px;
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 20px;
}

.tk-meta-item { min-width: 0; }

.tk-meta-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 3px;
}

.tk-meta-value {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--text-dark);
    /* Anti-overlap definitivo: qualunque stringa lunga va a capo, mai overflow. */
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

.tk-meta-value i { flex-shrink: 0; color: var(--text-light); }

/* ---- Layout dettaglio (2 colonne desktop, stack su mobile) ---- */
.tk-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.tk-detail-main { min-width: 0; }
.tk-detail-side { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.tk-box {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    background: var(--bg-white);
}
.tk-box--muted { background: var(--bg-page); }
.tk-box-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tk-message {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 0;
    color: var(--text-dark);
    line-height: 1.6;
}

.tk-allegati {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.tk-allegato {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
    color: var(--text-dark);
    text-decoration: none;
    font-size: 13px;
    min-height: 40px;
}
.tk-allegato span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.tk-allegato:hover { background: var(--bg-page); }

/* Timeline dettaglio */
.tk-timeline { border-left: 2px solid var(--border-dark); padding-left: 16px; margin: 0; }
.tk-timeline-item { position: relative; padding-bottom: 16px; }
.tk-timeline-item:last-child { padding-bottom: 0; }
.tk-timeline-item::before {
    content: "";
    position: absolute;
    left: -21px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-dark);
}
.tk-timeline-time { font-size: 12px; color: var(--text-light); }

/* Chat / conversazione */
.tk-msg {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px;
    margin-bottom: 10px;
}
.tk-msg--admin { background: rgba(37, 99, 235, 0.05); border-color: rgba(37, 99, 235, 0.18); }
.tk-msg-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.tk-msg-author { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .tk-dash { grid-template-columns: 1fr; }
    .tk-detail-grid { grid-template-columns: 1fr; }
    /* Su mobile la sidebar (stato/azioni) va sopra per l'accesso rapido */
    .tk-detail-side { order: -1; }
}

@media (max-width: 640px) {
    .tk-kpis { grid-template-columns: repeat(2, 1fr); }
    .tk-cats { grid-template-columns: 1fr; }

    /* Tab a larghezza uguale che riempiono la riga: entrano sempre, niente scroll */
    .tk-tab { flex: 1 1 0; padding: 11px 8px; font-size: 13.5px; gap: 6px; }

    /* Card ticket: layout impilato; azione elimina compatta in basso a destra */
    .tk-item {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "id     status"
            "main   main"
            "meta   actions";
        gap: 8px 12px;
        padding: 14px;
    }
    .tk-item-id { align-self: center; }
    .tk-item-meta { align-self: center; }
    .tk-item-actions { justify-self: end; align-self: end; }
    .tk-item-status { align-self: center; }
}

/* Su schermi molto stretti il contatore sulla tab viene nascosto (l'informazione
   "aperti" resta comunque nella dashboard sopra) per far entrare le 3 tab senza scroll. */
@media (max-width: 420px) {
    .tk-tab { padding: 10px 5px; font-size: 12.5px; gap: 5px; }
    .tk-tab-count { display: none; }
}

/* Riduce il salto di tap su iOS e migliora la scorrevolezza */
@media (hover: none) {
    .tk-item:active { transform: scale(0.995); }
    .tk-kpi:active, .tk-cat:active { transform: scale(0.98); }
}

/* ---- Focus keyboard coerente su tutti i controlli del modulo ---- */
.tk-kpi:focus-visible,
.tk-cat:focus-visible,
.tk-chip:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
/* I tab stanno in un contenitore overflow-x:auto che ritaglia l'outline:
   uso un ring interno (box-shadow inset) cosi' resta sempre visibile. */
.tk-tab:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--primary);
    border-radius: 4px 4px 0 0;
}
/* Bottone chiaro su header colorato: ring bianco ad alto contrasto sul blu */
.tk-header-btn:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* ---- Tap target minimo 40px sui bottoni testuali su touch/mobile ---- */
@media (max-width: 768px) {
    .neu-btn { min-height: 40px; }
}

/* ============================================
   NO AUTO-ZOOM SUL FOCUS DEI CAMPI (iOS/Android)
   iOS/Safari zooma automaticamente sull'input quando il suo
   font-size e' < 16px. Portiamo TUTTI i controlli di form a 16px
   su mobile/tablet: cosi' il browser non zooma piu' al focus.
   NON tocchiamo il meta viewport (niente user-scalable=no): il
   pinch-zoom manuale dell'utente resta pienamente disponibile.
   ============================================ */
@media (max-width: 1024px) {
    .neu-input,
    .neu-select,
    .neu-textarea,
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
    select,
    textarea,
    .form-control,
    .form-select {
        font-size: 16px !important;
    }
}

/* ============================================
   BULK SELECTION (barra azioni multiple) — condiviso
   Riusabile in TenantUsers/CompUsers e future liste.
   ============================================ */
.neu-bulk-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: rgba(37, 99, 235, .08);
    border: 1px solid rgba(37, 99, 235, .25);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
    color: var(--text-dark);
}

.neu-check,
.neu-check-all {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

/* ============================================
   AZIENDA AUTOCOMPLETE (ricerca testuale, no dropdown)
   Riusa lo stile .geo-autocomplete-*; serve solo il wrapper
   posizionato per ancorare la tendina dei suggerimenti.
   ============================================ */
.az-ac-wrap {
    position: relative;
}

/* La tendina dell'autocomplete dentro un modale deve stare sopra
   agli altri campi ma dentro il flusso della modal-body. */
.az-ac-wrap .geo-autocomplete-results {
    z-index: 1080;
}

/* ============================================
   MODALI full-screen su mobile: usiamo Bootstrap `modal-fullscreen-sm-down`
   che gestisce correttamente lo scroll interno della .modal-body.
   Qui rifiniamo solo lo scroll fluido + un fondo comodo su iOS.
   ============================================ */
@media (max-width: 576px) {
    .modal-fullscreen-sm-down .modal-body {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* Riepilogo password generata (post-creazione cliente/reset) */
.admin-cred-box {
    background: var(--bg-page);
    border: 2px dashed var(--primary);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin: 14px 0;
}
.admin-cred-box code {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    user-select: all;
    word-break: break-all;
    padding: 8px 0;
}

/* ============================================================
   ADMINPANEL SHELL 2026 — navbar + sidebar + dashboard
   Variante "puro testo minimale": ZERO icone, ZERO lettere-sigla.
   Il colore vive solo come filo sottile (accento). Classi nuove
   .ap-* per non toccare le .neu-* esistenti (usate ovunque).
   ============================================================ */
:root { --ap-nav-h: 64px; --ap-side-w: 248px; }

/* Accento colore per categoria (solo un filo di colore) */
.ap-tok-primary { --c: #2563eb; --c2: #1d4ed8; }
.ap-tok-success { --c: #16a34a; --c2: #15803d; }
.ap-tok-danger  { --c: #dc2626; --c2: #b91c1c; }
.ap-tok-warning { --c: #d97706; --c2: #b45309; }
.ap-tok-info    { --c: #0891b2; --c2: #0e7490; }
.ap-tok-muted   { --c: #9ca3af; --c2: #6b7280; }

/* ---------- TOPBAR ---------- */
.ap-topbar {
    position: sticky; top: 0; z-index: 1000; height: var(--ap-nav-h);
    background: var(--bg-white); border-bottom: 1px solid var(--border);
}
.ap-topbar-inner { height: 100%; padding: 0 16px; display: flex; align-items: center; gap: 12px; }

.ap-burger {
    display: none; width: 42px; height: 42px; flex-shrink: 0;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-white);
    padding: 0; align-items: center; justify-content: center;
}
.ap-burger:hover { background: var(--bg-page); }
.ap-burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text-medium); position: relative; }
.ap-burger span::before, .ap-burger span::after { content: ''; position: absolute; left: 0; width: 18px; height: 2px; border-radius: 2px; background: var(--text-medium); }
.ap-burger span::before { top: -6px; } .ap-burger span::after { top: 6px; }

/* Pill "App" verso "/" (app.haccpgo.it) — NON una casa */
.ap-apppill {
    display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
    height: 36px; padding: 0 12px; background: var(--bg-page);
    border: 1px solid var(--border-dark); border-radius: var(--radius-lg);
    color: var(--text-medium); font-size: 12.5px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase;
    transition: transform .15s ease, border-color .15s ease, color .15s ease;
}
.ap-apppill .ap-glyph { width: 14px; height: 14px; border-radius: 4px; background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.ap-apppill svg { width: 13px; height: 13px; opacity: .6; }
.ap-apppill:hover { border-color: var(--primary); color: var(--primary-dark); transform: translateY(-1px); }
.ap-apppill:hover svg { opacity: 1; }

.ap-divider { width: 1px; height: 24px; background: var(--border); flex-shrink: 0; }

.ap-wordmark { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ap-wordmark .ap-name { font-size: 17px; font-weight: 700; color: var(--text-dark); letter-spacing: -.2px; }
.ap-wordmark .ap-name b { color: var(--primary); }
.ap-wordmark .ap-tag { font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--text-light); border: 1px solid var(--border-dark); padding: 2px 6px; border-radius: 4px; }
.ap-wordmark .ap-short { display: none; }

/* Searchbox centrale */
.ap-search { position: relative; flex: 1 1 auto; max-width: 520px; margin: 0 auto; }
.ap-search > svg.ap-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); pointer-events: none; }
.ap-search input {
    width: 100%; height: 40px; padding: 0 44px 0 38px; background: var(--bg-page);
    border: 1px solid var(--border); border-radius: var(--radius-lg); font-size: 16px; color: var(--text-dark); font-family: inherit;
}
.ap-search input::placeholder { color: var(--text-muted); font-size: 14px; }
.ap-search input:focus { outline: none; background: var(--bg-white); border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.ap-search .ap-kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--text-muted); border: 1px solid var(--border-dark); border-radius: 4px; padding: 1px 6px; line-height: 1.5; pointer-events: none; transition: opacity .12s ease; }
.ap-search input:focus ~ .ap-kbd { opacity: 0; }

.ap-results {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--bg-white);
    border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 8px 24px rgba(0,0,0,.12);
    max-height: 360px; overflow-y: auto; padding: 6px; display: none; z-index: 1200;
}
.ap-results.open { display: block; }
.ap-results .ap-empty { padding: 14px 12px; color: var(--text-muted); font-size: 13px; text-align: center; }
.ap-res-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius); min-height: 40px; color: var(--text-dark); text-decoration: none; }
.ap-res-item .ap-r-label { font-size: 14px; color: var(--text-dark); flex: 1; min-width: 0; }
.ap-res-item .ap-r-label b { background: rgba(37,99,235,.16); border-radius: 3px; padding: 0 1px; color: var(--primary-dark); font-weight: 600; }
.ap-res-item .ap-r-group { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; flex-shrink: 0; }
.ap-res-item.active, .ap-res-item:hover { background: rgba(37,99,235,.06); }

/* Lato destro */
.ap-right { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.ap-btn-new {
    display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 18px; border: none; border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; font-size: 14px; font-weight: 600;
    box-shadow: 0 2px 8px rgba(22,163,74,.28); transition: transform .15s ease, box-shadow .15s ease; cursor: pointer;
}
.ap-btn-new .ap-plus { font-size: 17px; font-weight: 500; margin-top: -1px; }
.ap-btn-new:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(22,163,74,.42); color: #fff; }

.ap-profile { position: relative; flex-shrink: 0; }
.ap-profile-trigger {
    display: inline-flex; align-items: center; gap: 7px; max-width: 190px; height: 40px; padding: 0 12px;
    background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg);
    color: var(--text-medium); font-size: 14px; font-weight: 500; cursor: pointer;
}
.ap-profile-trigger:hover { background: var(--bg-page); }
.ap-profile-trigger .ap-pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-profile-trigger .ap-pname.ap-short { display: none; }
.ap-profile-trigger .ap-chev { color: var(--text-muted); font-size: 11px; }

.ap-menu { position: absolute; top: calc(100% + 8px); right: 0; width: 250px; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 6px; z-index: 1200; display: none; }
.ap-menu.open { display: block; }
.ap-menu-head { padding: 10px 12px; }
.ap-menu-head strong { display: block; font-size: 14px; color: var(--text-dark); overflow-wrap: anywhere; }
.ap-menu-head span { font-size: 12px; color: var(--text-muted); }
.ap-menu-sep { height: 1px; background: var(--border); margin: 4px 6px; }
.ap-menu a, .ap-menu .ap-mi { display: flex; align-items: center; width: 100%; padding: 10px 12px; min-height: 44px; border-radius: var(--radius); font-size: 14px; color: var(--text-medium); background: transparent; border: none; text-align: left; text-decoration: none; cursor: pointer; }
.ap-menu a:hover, .ap-menu .ap-mi:hover { background: var(--bg-page); }
.ap-menu .ap-mi.danger { color: var(--danger); }

/* ---------- SHELL / SIDEBAR ---------- */
.ap-shell { display: flex; align-items: flex-start; }
.ap-sidebar {
    position: sticky; top: var(--ap-nav-h); width: var(--ap-side-w); flex-shrink: 0; height: calc(100vh - var(--ap-nav-h));
    background: var(--bg-white); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden;
}
.ap-side-scroll { flex: 1; overflow-y: auto; padding: 8px 0; }
.ap-side-scroll::-webkit-scrollbar { width: 8px; }
.ap-side-scroll::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 8px; }
.ap-drawer-only { display: none; }

.ap-grp { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); padding: 16px 20px 6px; }
.ap-nav-item {
    position: relative; display: flex; align-items: center; gap: 10px; margin: 1px 8px; padding: 8px 14px;
    border-radius: var(--radius); color: var(--text-medium); font-size: 14px; font-weight: 500; min-height: 40px; text-decoration: none;
}
.ap-nav-item .ap-n-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-nav-item .ap-ext { color: var(--text-muted); font-size: 11px; flex-shrink: 0; }
.ap-nav-item:hover { background: var(--bg-page); color: var(--text-dark); }
.ap-nav-item.active { background: rgba(37,99,235,.06); color: var(--primary-dark); font-weight: 600; }
.ap-nav-item.active::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 20px; border-radius: 3px; background: var(--primary); }

.ap-side-foot { border-top: 1px solid var(--border); padding: 12px 16px; display: flex; align-items: center; gap: 10px; background: var(--bg-white); }
.ap-side-foot .ap-who { min-width: 0; flex: 1; }
.ap-side-foot .ap-who strong { display: block; font-size: 13px; color: var(--text-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-side-foot .ap-who span { font-size: 11.5px; color: var(--success); display: inline-flex; align-items: center; gap: 5px; }
.ap-dot-online { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 2px rgba(22,163,74,.18); }

.ap-drawer-head { align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.ap-x-close { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-white); display: inline-flex; align-items: center; justify-content: center; color: var(--text-medium); cursor: pointer; }
.ap-x-close:hover { background: var(--bg-page); } .ap-x-close svg { width: 16px; height: 16px; }
.ap-drawer-top { padding: 12px 12px 4px; display: flex; flex-direction: column; gap: 10px; }
.ap-drawer-top .ap-search { max-width: none; margin: 0; }
.ap-drawer-top .ap-btn-new { width: 100%; justify-content: center; height: 44px; }

.ap-scrim { position: fixed; inset: 0; background: rgba(17,24,39,.45); z-index: 1050; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.ap-scrim.open { opacity: 1; pointer-events: auto; }

/* ---------- MAIN ---------- */
.ap-main { flex: 1; min-width: 0; }

/* ---------- DASHBOARD (icon-free) ---------- */
.ap-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.ap-stat { position: relative; overflow: hidden; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; transition: border-color .15s ease, box-shadow .15s ease; }
.ap-stat::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--c), var(--c2)); }
.ap-stat:hover { border-color: var(--border-dark); box-shadow: var(--shadow); }
.ap-stat-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-light); }
.ap-stat-num { font-size: 34px; font-weight: 700; color: var(--text-dark); font-variant-numeric: tabular-nums; margin: 10px 0 2px; line-height: 1; }
.ap-stat-ctx { font-size: 12px; color: var(--text-muted); }

.ap-section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ap-section-head h2 { margin: 0; font-size: 16px; font-weight: 600; color: var(--text-dark); }
.ap-section-head p { margin: 0; font-size: 13px; color: var(--text-muted); }

.ap-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.ap-action { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px 16px 20px; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.ap-action::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); opacity: .55; transition: opacity .15s ease; }
.ap-action .ap-a-body { flex: 1; min-width: 0; }
.ap-action .ap-a-title { display: block; font-size: 14px; font-weight: 600; color: var(--text-dark); }
.ap-action .ap-a-desc { display: block; font-size: 12.5px; color: var(--text-light); margin-top: 3px; line-height: 1.45; }
.ap-action .ap-arrow { font-size: 16px; color: var(--border-dark); transition: color .15s ease, transform .15s ease; flex-shrink: 0; }
.ap-action:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.ap-action:hover::before { opacity: 1; }
.ap-action:hover .ap-arrow { color: var(--primary); transform: translateX(3px); }

/* ---------- Focus visibile (accessibilità) ---------- */
.ap-nav-item:focus-visible, .ap-res-item:focus-visible, .ap-action:focus-visible,
.ap-apppill:focus-visible, .ap-wordmark:focus-visible, .ap-btn-new:focus-visible,
.ap-profile-trigger:focus-visible, .ap-burger:focus-visible, .ap-x-close:focus-visible {
    outline: 2px solid var(--primary); outline-offset: 2px;
}
.ap-search input:focus-visible { outline: none; }

/* ---------- RESPONSIVE (<1024px = drawer) ---------- */
@media (max-width: 1023px) {
    .ap-burger { display: inline-flex; }
    .ap-topbar .ap-search { display: none; }
    .ap-right .ap-btn-new { display: none; }
    .ap-wordmark { margin-right: auto; }
    .ap-sidebar {
        position: fixed; top: 0; left: 0; z-index: 1100; width: 280px; max-width: 86vw; height: 100dvh;
        transform: translateX(-100%); transition: transform .22s ease; box-shadow: 0 8px 24px rgba(0,0,0,.18);
    }
    .ap-sidebar.open { transform: translateX(0); }
    .ap-drawer-only { display: flex; flex-direction: column; }
}
@media (max-width: 620px) {
    .ap-apppill .ap-txt { display: none; }
    .ap-apppill { padding: 0 10px; }
    .ap-profile-trigger .ap-pname.ap-full { display: none; }
    .ap-profile-trigger .ap-pname.ap-short { display: inline; }
}
@media (max-width: 380px) {
    .ap-wordmark .ap-full { display: none; }
    .ap-wordmark .ap-short { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
    .ap-sidebar, .ap-action, .ap-stat, .ap-apppill, .ap-btn-new, .ap-scrim { transition: none !important; }
}

/* ============================================================
   AREAPARTNER · PAGE KIT
   Linguaggio "minimale / testo puro" condiviso da TUTTE le viste
   dell'Area Partner (Dashboard, Clienti, Aziende, Commissioni,
   Ticket, Sandbox, Nuovo Cliente). Wrapper di pagina: .ppage.
   Tutto scoped sotto .ppage / .pp-*: l'AdminPanel (che non usa
   .ppage) resta INTATTO. Mobile-first: mai scroll orizzontale.
   ============================================================ */

/* --- Card: superficie pulita + hairline d'accento in alto
       (stesso linguaggio di .ap-stat). Il colore viene da .ap-tok-*. --- */
.ppage .pcard { position: relative; overflow: hidden; }
.ppage .pcard::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--c, var(--primary)), var(--c2, var(--primary-dark)));
}

/* --- Header card: da blocco blu pieno a "testo puro" con hairline sotto --- */
.ppage .neu-card-header {
    background: transparent; color: var(--text-dark);
    padding: 0 0 14px 0; margin: 0 0 18px 0; border-radius: 0;
    border-bottom: 1px solid var(--border);
}
.ppage .neu-card-header h1,
.ppage .neu-card-header h2,
.ppage .neu-card-header h3 { font-size: 16px; font-weight: 600; color: var(--text-dark); }
.ppage .neu-card-header .neu-btn-onhead {
    background: transparent; color: var(--c, var(--primary)); border-color: transparent;
    padding: 6px 8px; font-weight: 600;
}
.ppage .neu-card-header .neu-btn-onhead:hover {
    background: color-mix(in srgb, var(--c, var(--primary)) 10%, transparent);
    color: var(--c, var(--primary));
}

/* --- Welcome header (titolo + sottotitolo + eventuale CTA a destra) --- */
.pp-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pp-head .pp-head-txt { min-width: 0; }
.pp-head .pp-head-cta { flex-shrink: 0; }
@media (max-width: 575px) { .pp-head .pp-head-cta { width: 100%; justify-content: center; } }

/* --- code / P.IVA: chip monospazio pulito (niente stile bootstrap rosa) --- */
.ppage code {
    font-family: ui-monospace, 'SFMono-Regular', 'Menlo', monospace;
    background: var(--bg-page); border: 1px solid var(--border); color: var(--text-dark);
    padding: 2px 7px; border-radius: 6px; font-size: .85em; letter-spacing: .3px;
}

/* --- Barra filtri: GRID responsiva.
       Sostituisce la vecchia .neu-filter-bar (flex): in flex-direction:column
       su mobile il "flex: 1 1 180px" dei gruppi diventava un'ALTEZZA di 180px,
       creando enormi spazi vuoti verticali. La grid non ha questo problema:
       1 colonna (mobile) · 2 (tablet) · 4 (desktop); azioni su riga propria. --- */
.pp-filters { display: grid; grid-template-columns: 1fr; gap: 14px 16px; align-items: end; }
@media (min-width: 600px)  { .pp-filters { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .pp-filters { grid-template-columns: repeat(4, 1fr); } }
.pp-filters .neu-form-group { margin-bottom: 0; min-width: 0; }
.pp-filters .pp-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.pp-filters .pp-actions .neu-btn { min-width: 120px; justify-content: center; }
@media (max-width: 599px) { .pp-filters .pp-actions .neu-btn { flex: 1; } }

/* --- Lista "feature / tips" testo puro (vantaggi profilo, suggerimenti sicurezza):
       righe separate da hairline, nessuna icona/spunta. --- */
.pp-list { list-style: none; padding: 0; margin: 0; }
.pp-list li { padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text-medium); font-size: 14px; }
.pp-list li:last-child { border-bottom: none; }

/* --- Utility --- */
.ppage .u-center { text-align: center; }

/* --- Stat card (.ap-stats/.ap-stat): 2-up compatto su telefono, feel app-like.
       Il numero è FLUIDO (clamp) e può andare a capo (overflow-wrap): così i valori
       in euro lunghi (es. "€12.345,67") non vengono tagliati da .ap-stat{overflow:hidden}
       nella cella stretta della griglia 2-up su schermi ~320-360px. --- */
.ppage .ap-stats { margin-bottom: 24px; }
@media (max-width: 600px) {
    .ppage .ap-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .ppage .ap-stat { padding: 14px; }
    .ppage .ap-stat-num { font-size: clamp(18px, 5.5vw, 26px); margin: 6px 0 2px; overflow-wrap: anywhere; }
    .ppage .ap-stat-label { font-size: 11px; }
    .ppage .ap-stat-ctx { font-size: 11px; }
}
