/**
 * AryConnect — botones pill unificados (tenant + platform).
 * Pares: btn-primary / btn-secondary · btn-text (ghost)
 * Alias SmartChat: sc-btn-accent / sc-btn-outline / sc-btn-ghost
 */

.sc-btn,
.btn-primary,
.btn-secondary,
.btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin: 0;
  padding: 0.28rem 0.82rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  cursor: pointer;
  box-shadow: none;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.btn-secondary,
.sc-btn-outline {
  color: #475569;
}

.btn-secondary:hover,
.sc-btn-outline:hover,
.sc-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
  color: #475569;
}

.btn-primary,
.sc-btn-accent {
  border-color: var(--teal, #0d9488);
  color: var(--teal-dark, #0f766e);
}

.btn-primary:hover,
.sc-btn-accent:hover {
  background: #f0fdfa;
  border-color: var(--teal-dark, #0f766e);
  color: var(--teal-dark, #0f766e);
}

.btn-text,
.sc-btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text-muted, #64748b);
  padding-inline: 0.55rem;
}

.btn-text:hover,
.sc-btn-ghost:hover {
  background: #f1f5f9;
  border-color: transparent;
  color: var(--text, #0f172a);
}

.btn-small,
.btn-sm,
.sc-btn-sm {
  padding: 0.22rem 0.65rem;
  font-size: 0.74rem;
}

.sc-btn,
.btn-primary,
.btn-secondary,
.btn-text,
.btn-small,
.sc-btn-sm {
  min-height: unset;
}

button:disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-text:disabled,
.sc-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Barra compacta reutilizable (Prompts, FAQs, Informes, Conversaciones) */
.sc-page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.55rem;
  background: #fff;
}

.sc-page-toolbar > h2,
.sc-page-toolbar > h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text, #0f172a);
  flex: 1 1 auto;
  min-width: 6rem;
}

.sc-page-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}

.sc-page-filter span {
  white-space: nowrap;
}

.sc-page-filter select,
.sc-page-filter input[type="date"] {
  width: auto;
  min-width: 9rem;
  margin: 0;
  padding: 0.32rem 0.5rem;
  font-size: 0.88rem;
  font-weight: 400;
}

.sc-page-count {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  background: #f1f5f9;
  white-space: nowrap;
}

.sc-page-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-left: auto;
}

.sc-page-toolbar .btn-text,
.sc-page-toolbar .sc-btn-ghost {
  margin-left: auto;
}

@media (max-width: 640px) {
  .sc-page-toolbar .btn-text,
  .sc-page-toolbar .sc-btn-ghost,
  .sc-page-toolbar-actions {
    margin-left: 0;
  }

  .sc-page-toolbar-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
