/* ===== MÓDULO CLIENTES ===== */

.clientes-header {
    margin-bottom: 2rem;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filtros {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.input-busca {
    padding: 0.75rem 1rem;
    border: 2px solid #d4d4d5;
    border-radius: 8px;
    background: white;
    color: #001738;
    font-size: 0.875rem;
    min-width: 250px;
    transition: all 0.3s ease;
}

.input-busca:focus {
    outline: none;
    border-color: #00b4f6;
    box-shadow: 0 0 0 3px rgba(0, 180, 246, 0.1);
}

.select-filtro {
    padding: 0.75rem 1rem;
    border: 2px solid #d4d4d5;
    border-radius: 8px;
    background: white;
    color: #001738;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-filtro:focus {
    outline: none;
    border-color: #00b4f6;
    box-shadow: 0 0 0 3px rgba(0, 180, 246, 0.1);
}

/* Lista envolve cabeçalho + grid de cards — não usar grid aqui (evita coluna única centralizada) */
.clientes-lista {
    display: block;
    width: 100%;
}

.clientes-grid-cards {
    width: 100%;
}

.cliente-card {
    background: white;
    border-radius: 12px;
    padding: 1rem 1rem 0.75rem;
    box-shadow: 0 4px 24px rgba(0,23,56,0.08);
    border: 1px solid rgba(212,212,213,0.3);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.cliente-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,23,56,0.12);
}

.cliente-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cliente-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.cliente-info {
    flex: 1;
    min-width: 0;
}

.cliente-nome {
    font-size: 1rem;
    font-weight: 700;
    color: #001738;
    margin: 0 0 0.2rem 0;
    line-height: 1.3;
    word-break: break-word;
}

.cliente-documento {
    font-size: 0.8125rem;
    color: #305371;
    margin: 0 0 0.35rem 0;
}

.cliente-tipo {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.cliente-tipo.PJ {
    background: rgba(0, 180, 246, 0.1);
    color: #00b4f6;
}

.cliente-tipo.PF {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.cliente-detalhes {
    margin-bottom: 0.5rem;
    margin-top: 0.25rem;
    flex: 1;
    min-height: 0;
}

.cliente-card-linha-contato {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.45;
    margin-bottom: 0.35rem;
}

.cliente-detalhes .detalhe-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: #305371;
    font-size: 0.875rem;
}

.cliente-detalhes .detalhe-item i {
    width: 16px;
    color: #00b4f6;
    flex-shrink: 0;
}

.cliente-detalhes .detalhe-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cliente-acoes {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 0.65rem;
    border-top: 1px solid #f1f5f9;
}

.cliente-acoes button {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #305371;
    background: #f1f0f0;
}

.cliente-acoes button:hover {
    background: #00b4f6;
    color: white;
    transform: translateY(-1px);
}

.cliente-acoes button:last-child:hover {
    background: #ef4444;
}

/* Modal de Detalhes */
.cliente-detalhes-completo {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.detalhe-section h3 {
    color: #001738;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #00b4f6;
}

.detalhe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.detalhe-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detalhe-item label {
    font-weight: 600;
    color: #305371;
    font-size: 0.875rem;
}

.detalhe-item span {
    color: #001738;
    font-size: 1rem;
}

/* Formulários */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.form-group label {
    font-weight: 600;
    color: #305371;
    font-size: 0.875rem;
}

.form-input {
    padding: 0.75rem 1rem;
    border: 2px solid #d4d4d5;
    border-radius: 8px;
    background: white;
    color: #001738;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #00b4f6;
    box-shadow: 0 0 0 3px rgba(0, 180, 246, 0.1);
}

.form-input::placeholder {
    color: #64748b;
}

/* Responsividade */
@media (max-width: 768px) {
    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filtros {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .input-busca {
        min-width: auto;
    }
    
    .clientes-lista {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .detalhe-grid {
        grid-template-columns: 1fr;
    }
    
    .cliente-acoes {
        justify-content: stretch;
    }
    
    .cliente-acoes button {
        flex: 1;
    }
}