.chat-container {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 140px);
  min-height: 420px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: var(--bs-tertiary-bg);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.message {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 16px;
  max-width: 85%;
  width: fit-content;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.message.pre {
  white-space: pre-line;
}

.message.bot {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  margin-right: auto;
}

.message.user {
  background: var(--bs-primary);
  color: #fff;
  margin-left: auto;
}

.chat-input-area {
  position: sticky;
  bottom: 0;
  background: var(--bs-body-bg);
  padding-top: 8px;
}

.chart-box {
  position: relative;
  height: 280px;
}

#status-indicator.text-bg-danger {
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
  #status-indicator.text-bg-danger { animation: none; }
}

.cat-badge {
  --item-color: #6c757d;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--item-color);
  background: color-mix(in srgb, var(--item-color) 14%, transparent);
  white-space: nowrap;
}

.color-dot {
  --item-color: #6c757d;
  display: inline-block;
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
  background: var(--item-color);
}

.icon-tile {
  --item-color: #6c757d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .6rem;
  color: #fff;
  background: var(--item-color);
  flex-shrink: 0;
}

.ws-switch { max-width: 11rem; }

.plan-option { cursor: pointer; border-width: 2px; }
.btn-check:checked + .plan-option { border-color: var(--bs-primary); box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .15); }
.btn-check:focus-visible + .plan-option { outline: 3px solid var(--bs-primary); outline-offset: 2px; }
.pix-qr { width: min(260px, 80%); height: auto; background: #fff; border-radius: .5rem; padding: .25rem; }
.legal-text { max-width: 70ch; }

.stat-value { font-size: clamp(.95rem, 3.6vw, 1.25rem); white-space: nowrap; }
