/* ================================================================
   app-clienteswa.css — Módulo Clientes WhatsApp
   ================================================================ */

/* ── Tabla de clientes ───────────────────────────────────────── */
.cwa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 550px;
}

.cwa-table thead tr { border-bottom: 2px solid var(--border-color); }

.cwa-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-card);
}

.cwa-table th.center { text-align: center; }

.cwa-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition);
}

.cwa-table tbody tr:hover { background: rgba(37, 211, 102, 0.04); }

.cwa-table td { padding: 10px 16px; vertical-align: middle; }

/* ── Teléfono con icono WA ───────────────────────────────────── */
.cwa-phone {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cwa-phone i { color: #25D366; font-size: 1rem; }

/* ── Badges plan ─────────────────────────────────────────────── */
.cwa-plan {
  display: inline-flex;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.cwa-plan.asociado    { background: #3B82F61a; color: #3B82F6; }
.cwa-plan.premium     { background: #F59E0B1a; color: #F59E0B; }
.cwa-plan.corporativo { background: #8B5CF61a; color: #8B5CF6; }
.cwa-plan.sin-plan    { background: #6B72801a; color: #6B7280; }

/* ── Estado toggle ───────────────────────────────────────────── */
.cwa-estado {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.82rem;
  transition: opacity var(--transition);
}

.cwa-estado:hover { opacity: 0.7; }
.cwa-estado.activo { color: #10B981; }
.cwa-estado.inactivo { color: #EF4444; }

/* ── Botón editar ────────────────────────────────────────────── */
.cwa-btn-edit {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.cwa-btn-edit:hover {
  border-color: #25D366;
  color: #25D366;
  background: rgba(37, 211, 102, 0.08);
}

/* ── Modal ────────────────────────────────────────────────────── */
.cwa-modal {
  max-width: 460px;
  width: 92%;
  padding: 32px;
}

.cwa-modal-title {
  font-family: Outfit, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cwa-modal-title i { color: #25D366; }

.cwa-field {
  margin-bottom: 16px;
}

.cwa-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-main);
}

.cwa-field label .req { color: #EF4444; }
.cwa-field .form-control { width: 100%; }
.cwa-field .form-control:disabled { opacity: 0.5; cursor: not-allowed; }

.cwa-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

/* ── Empty ────────────────────────────────────────────────────── */
.cwa-empty {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
}

.cwa-empty i {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
  color: #25D366;
  opacity: 0.4;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cwa-table { min-width: 400px; }
  .cwa-table th:nth-child(3),
  .cwa-table td:nth-child(3) { display: none; }
  .cwa-modal { padding: 20px; width: 95%; }
}

@media (max-width: 480px) {
  .cwa-table th:nth-child(4),
  .cwa-table td:nth-child(4) { display: none; }
}
