/* ========================================
   MODAL GESTIONE CLIENTI (Semplificato - Solo Elenco)
   Brand: Verde Salvia, Rosso Salmone, Giallo Ocra, Sabbia
======================================== */

/* OVERLAY */
#modal-gestione-clienti {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#modal-gestione-clienti.hidden {
    display: none;
}

/* CONTAINER MODALE */
.modal-gestione-clienti-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    width: 95%;
    max-width: 900px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* HEADER */
.modal-gestione-clienti-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #71A894 0%, #5a8a77 100%);
    color: white;
    flex-shrink: 0;
}

.modal-gestione-clienti-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.btn-close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* BARRA RICERCA */
.search-bar-clienti {
    padding: 20px 24px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-shrink: 0;
}

#search-clienti-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
}

#search-clienti-input:focus {
    outline: none;
    border-color: #71A894;
    box-shadow: 0 0 0 3px rgba(113, 168, 148, 0.1);
}

.search-count {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

/* LISTA CLIENTI */
.lista-clienti-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    background: #f8f9fa;
}

.cliente-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
}

.cliente-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.cliente-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.cliente-status {
    font-size: 20px;
}

.cliente-nome {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.cliente-card-body {
    margin-bottom: 12px;
}

.cliente-card-body p {
    margin: 6px 0;
    font-size: 14px;
    color: #666;
}

.cliente-card-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.stat-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #f0f0f0;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.cliente-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.btn-small {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #71A894;
    color: white;
}

.btn-primary:hover {
    background: #5a8a77;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #EBD9B4;
    color: #333;
}

.btn-secondary:hover {
    background: #ddc89f;
    transform: translateY(-1px);
}

/* STATI VUOTI / LOADING */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state p {
    font-size: 16px;
    margin: 0;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #71A894;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .modal-gestione-clienti-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .cliente-card-stats {
        flex-direction: column;
        gap: 8px;
    }

    .cliente-card-actions {
        flex-direction: column;
    }

    .btn-small {
        width: 100%;
    }
}
