/* Connection feedback stays compact until attention is needed. */
.connection-status { position: relative; flex: 0 0 44px; width: 44px; }
.connection-status__dot { position: absolute; right: 7px; bottom: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--ds-accent); box-shadow: 0 0 0 2px var(--ds-bg); }
.connection-status[data-status="warning"] { color: #f1bd69 !important; }
.connection-status[data-status="warning"] .connection-status__dot { background: #f1bd69; }
.connection-status[data-status="loading"] .connection-status__dot { background: #8dbfdf; }
.connection-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 16px 26px 4px; padding: 14px 16px; background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: 12px; }
.connection-panel[data-status="warning"] { border-color: #79603b; background: #24221d; }
.connection-panel > div { min-width: 0; }
.connection-panel strong { display: block; color: var(--ds-text); font-size: 13px; line-height: 1.5; }
.connection-panel p { margin: 3px 0 4px; color: var(--ds-muted); font-size: 12px; line-height: 1.6; }
.connection-panel small { color: var(--ds-muted); font-size: 11px; }
.connection-panel__actions { display: flex; flex-shrink: 0; flex-wrap: wrap; gap: 6px; }
.connection-panel__actions .btn { min-height: 44px; padding: 9px 12px; font-size: 12px; white-space: normal; }
.stock-load-error { grid-column: 1 / -1; display: grid; gap: 8px; padding: 28px 16px; text-align: center; color: var(--ds-muted); font-size: 13px; }
.stock-load-error strong { color: var(--ds-text); }
@media (max-width: 1199px) { .connection-panel { margin-inline: 18px; } }
@media (max-width: 767px) {
  .connection-panel { margin: 12px 12px 4px; padding: 12px; flex-direction: column; align-items: stretch; gap: 10px; }
  .connection-panel__actions { justify-content: flex-end; }
  .topbar__right { gap: 4px !important; }
}

/* One control communicates refresh progress without another header button. */
.connection-status[aria-busy="true"] .connection-status__dot {
  width: 10px;
  height: 10px;
  border: 2px solid var(--ds-border);
  border-top-color: var(--ds-accent);
  background: var(--ds-surface);
  animation: connection-refresh 800ms linear infinite;
}
@keyframes connection-refresh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .connection-status[aria-busy="true"] .connection-status__dot { animation: none; }
}
