/* ============================================
   CLIENTES.CSS
   Barra de busca, lista de clientes/conversas
   e mensagens do chat dentro do modal.
   ============================================ */

.search-bar-wrap {
  position: relative;
  margin-bottom: 4px;
}
.search-bar-wrap .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  width: 16px;
  height: 16px;
}
.search-bar {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px 12px 40px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  width: 100%;
  transition: border-color .2s;
}
.search-bar:focus { border-color: var(--accent-dim); }
.search-bar::placeholder { color: var(--muted); }

.client-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.client-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color .2s;
}
.client-item:hover { border-color: var(--accent-dim); }

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--on-accent);
  flex-shrink: 0;
}
.client-name { font-size: 15px; font-weight: 500; }
.client-preview {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* ---------- Mensagens do chat ---------- */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 60vh;
}
.msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}
.msg-user {
  background: var(--surface2);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.msg-assistant {
  background: rgba(var(--accent-rgb), .12);
  border: 1px solid rgba(var(--accent-rgb), .2);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.msg-label {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 3px;
  font-weight: 600;
}
.msg-user .msg-label { color: var(--muted); }
.msg-assistant .msg-label { color: var(--accent-dim); }
.msg-time { font-size: 10px; color: var(--muted); margin-top: 3px; }
