/* Каркас: верхня панель, стрічка ліворуч, бічна панель праворуч. */

/* Одна гарнітура й один розмір на всю шапку; відрізняються лише вага й колір:
   білий — назва, ім'я, числа; приглушений — підписи. */
.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  min-height: 56px;
  padding: 10px 24px;
  background: #16202E;
  color: #AEB9CA;
  font: 13px/20px var(--font);
  font-variant-numeric: tabular-nums;
}
.topbar strong { color: #FFFFFF; font-weight: 600; }
.topbar__title { color: #FFFFFF; font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.topbar__push { margin-left: auto; }

/* Лічильники: підпис і число в капсулі. */
.topbar__wait, .topbar__meta { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.topbar__wait { margin-right: auto; }
.topbar__wait strong, .topbar__meta strong {
  min-width: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  text-align: center;
}
.topbar__wait.is-alert strong { background: #DC2626; animation: topbar-pulse 1.6s ease-in-out infinite; }
@keyframes topbar-pulse { 50% { box-shadow: 0 0 0 4px rgba(220, 38, 38, .35); } }
@media (prefers-reduced-motion: reduce) { .topbar__wait.is-alert strong { animation: none; } }

.topbar__status { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.topbar__status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FBBF24;
}
.topbar__status.is-online::before { background: #4ADE80; }
.topbar__status.is-offline::before { background: #F87171; }
.topbar__status.is-offline { color: #FECACA; }

.topbar__user { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.topbar__name { color: #FFFFFF; font-weight: 600; }
.topbar__role:empty { display: none; }
.topbar__role::before { content: "· "; }

.topbar__nav {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-left: 24px;
  border-left: 1px solid rgba(255, 255, 255, .16);
}
.topbar__nav a, .topbar__link {
  border: 0;
  padding: 0;
  background: none;
  color: #AEB9CA;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.topbar__nav a:hover, .topbar__link:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }

/* Стрічка й панель прокручуються окремо: довга розмова не ховає звернення. */
.workspace { flex: 1; min-height: 0; display: flex; align-items: stretch; }

.feed {
  flex: 999 1 560px;
  min-width: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.panel {
  flex: 1 1 520px;
  max-width: 600px;
  min-width: 0;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

@keyframes panel-in {
  from { transform: translateX(48px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.panel.is-entering { animation: panel-in .28s cubic-bezier(.2, .8, .2, 1); }
@media (prefers-reduced-motion: reduce) { .panel.is-entering { animation: none; } }

.banners { display: flex; flex-direction: column; gap: 8px; }
.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--warn-border);
  background: var(--warn-soft);
  color: var(--warn-text);
}
.banner--error { border-color: #E5A29B; background: var(--danger-soft); color: #8F1D1D; }
.banner .button { margin-left: auto; min-height: 36px; flex: none; }
