/* App shell additions on top of montyguard.css (owned by the shell; pages put their CSS in app-sites.css and
   app-ops.css). Tokens only: no raw colours here. */

.icon { flex: none; }
.btn .icon { width: 16px; height: 16px; }

/* Top bar context: org name / switcher and the "working on" indicator. */
.topbar__context { display: flex; align-items: center; gap: var(--mg-space-3); min-width: 0; }
.topbar__org { font-weight: var(--mg-fw-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-switch .select { width: auto; min-width: 180px; }
.topbar__activity:empty { display: none; }
.user-button__name { max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-button .icon { width: 14px; height: 14px; color: var(--mg-text-muted); }
.menu__item .icon { width: 16px; height: 16px; color: var(--mg-text-muted); }
.menu__header > div + div { margin-top: 2px; }

@media (max-width: 1100px) {
  .org-switch > span, .topbar__activity { display: none; }
  .org-switch .select { min-width: 0; max-width: 200px; }
}
@media (max-width: 640px) {
  .topbar__context { display: none; }
}
@media (max-width: 640px) {
  .user-button__name { display: none; }
  [data-freeze-btn] span { display: none; }
}

/* The page container is focusable for the skip link; no outline on programmatic focus. */
.page:focus { outline: none; }
.page-header__title:focus { outline: none; }

/* Dialog error slot. */
.dialog__error:empty { display: none; }

/* Boot state before the shell renders. */
body.app-loading { background: var(--mg-surface-subtle); }
