body.telegram-agent-chat-body,
.telegram-agent-chat-shell {
  overflow: hidden;
}

.telegram-agent-chat-shell .topbar {
  display: grid;
}

.telegram-agent-chat-shell .overview-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.telegram-agent-chat-workspace {
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
}

.telegram-agent-chat-sidebar-head h2 {
  margin-top: 2px;
  font-size: 18px;
}

.telegram-agent-chat-composer {
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) auto;
  align-items: stretch;
}

.telegram-agent-account-select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  font: inherit;
  color: var(--ink);
}

.telegram-agent-thread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ef5d4c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.telegram-agent-thread-muted {
  color: #5d6a78;
}

.telegram-agent-thread-accounts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.telegram-agent-thread-account-chip,
.telegram-agent-message-account-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(220, 236, 243, 0.86);
  color: #153f50;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.telegram-agent-message-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(220, 236, 243, 0.86);
  color: #153f50;
}

.telegram-agent-message-kind.mention {
  background: rgba(194, 111, 69, 0.16);
  color: #9f4738;
}

.telegram-agent-message-kind.auto_reply,
.telegram-agent-message-kind.manual_message {
  background: rgba(51, 106, 75, 0.14);
  color: #336a4b;
}

.telegram-agent-message-kind.notification,
.telegram-agent-message-kind.manual_notification {
  background: rgba(42, 159, 223, 0.16);
  color: #1f5c74;
}

.telegram-agent-chat-workspace .chat-scroll {
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.84), rgba(248, 241, 233, 0.92));
}

@media (max-width: 860px) {
  .telegram-agent-chat-composer {
    grid-template-columns: 1fr;
  }
}
