/* Estilos para o painel de cliente */
#clientePanel {
  flex-shrink: 0;
  width: 0;
  min-width: 0;
  overflow: hidden;
  background: #f4f6f8;
  border-left: 0 solid var(--border-color, #e0e0e0);
  transition: width 0.3s ease, border-left-width 0.3s ease;
  display: flex;
  flex-direction: column;
}

#clientePanel.open {
  width: 380px;
  min-width: 380px;
  border-left-width: 1px;
}

.chat-action-btn.toggle-client-panel.active {
  color: var(--primary-color);
  background-color: rgba(74, 108, 247, 0.1);
}

.cliente-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: white;
  border-bottom: 1px solid #eaeaea;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  z-index: 10;
}

.cliente-panel-title {
  font-weight: 600;
  font-size: 1.15rem;
  color: #1f2937;
  margin: 0;
}

.close-panel-btn {
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.close-panel-btn:hover {
  background-color: #f3f4f6;
  color: #1f2937;
}

.cliente-panel-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

/* Seção de informações (Cards) */
.client-info-section {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid #f0f0f0;
}

.client-info-section h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
  margin-top: 0;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f3f4f6;
  font-weight: 600;
}

.client-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.client-info-item {
  margin-bottom: 0;
}

.client-info-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #9ca3af;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.client-info-value {
  font-size: 0.95rem;
  color: #374151;
  font-weight: 500;
  word-break: break-word;
}

/* Cartões de contrato */
.client-contract-card {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
  border-left: 4px solid var(--primary-color, #4a6cf7);
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.contract-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.status-active {
  background-color: #dcfce7;
  color: #166534;
}

.status-inactive {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Tags do cliente */
.client-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.client-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Estados vazios */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  text-align: center;
  color: #6b7280;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.empty-state .material-icons {
  font-size: 3.5rem;
  margin-bottom: 16px;
  color: #d1d5db;
}

/* Loading spinner */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  color: #6b7280;
}

.loading-spinner .material-icons.spin {
  animation: spin 1s linear infinite;
  font-size: 2.5rem;
  margin-bottom: 16px;
  color: var(--primary-color, #4a6cf7);
}

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

/* Botões de ação */
.cliente-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  background-color: var(--primary-color, #4a6cf7);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 12px;
  transition: background-color 0.2s, transform 0.1s;
  box-shadow: 0 2px 4px rgba(74, 108, 247, 0.2);
  min-height: 44px;
}

.cliente-action-btn * {
  pointer-events: none;
}

.cliente-action-btn .material-icons {
  font-size: 1.1rem;
  margin-right: 8px;
}

.cliente-action-btn:hover {
  background-color: #3b5bdb;
  transform: translateY(-1px);
}

.cliente-action-btn:active {
  transform: translateY(0);
}

/* Endereços formatados */
.address-formatted {
  line-height: 1.5;
}
