.source-avatar {
  object-fit: cover;
  flex-shrink: 0;
}

.source-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.avatar-fallback-group {
  background: #198754;
}

.avatar-fallback-user {
  background: #6c757d;
}

.navbar-dark .nav-link.active {
  color: #fff;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-shell .card {
  width: min(100%, 420px);
}

.sidebar-card {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 6rem);
  overflow: auto;
}

.sidebar-card .list-group-item.active {
  border-left: 3px solid var(--bs-success);
}

.sidebar-group-row {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.sidebar-group-row.active {
  border-left: 3px solid var(--bs-success);
}

.sidebar-group-link {
  min-width: 0;
}

.sidebar-group-menu-btn {
  line-height: 1;
  padding: 0.125rem 0.375rem;
  text-decoration: none;
}

.sidebar-group-menu-btn:hover,
.sidebar-group-menu-btn:focus,
.sidebar-group-menu-btn.show {
  color: var(--bs-body-color);
}

.font-monospace {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.payload-pre {
  padding: 1rem;
  background: #f8f9fa;
  font-size: 0.85rem;
  line-height: 1.45;
  overflow: auto;
  max-height: 60vh;
}

.list-group-item-action:hover {
  background-color: rgba(25, 135, 84, 0.05);
}

.message-media {
  display: block;
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
  background: #f8f9fa;
  object-fit: cover;
}

.message-media-sm {
  max-width: 180px;
  max-height: 140px;
}

.message-media-lg {
  max-width: min(100%, 640px);
  max-height: 480px;
  object-fit: contain;
}

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