/* Compact admin top bar. Scoped so the classic header is unchanged. */

.icam-shell-topbar {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid #e6eaf0;
  position: sticky;
  top: 0;
  z-index: 30;
}

.icam-shell-topbar__icon {
  width: 28px;
  height: 28px;
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  background: #fff;
  display: grid;
  place-items: center;
  color: #475569;
  cursor: pointer;
}

.icam-shell-topbar__icon .material-symbols-outlined {
  font-size: 16px;
}

.icam-shell-topbar__crumbs {
  min-width: 0;
  max-width: 220px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 750;
  color: #0f172a;
}

.icam-shell-topbar__title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icam-shell-topbar__results {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 650;
  color: #64748b;
}

.icam-shell-topbar__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 0 1 auto;
  overflow: auto;
}

.icam-shell-topbar__env,
.icam-shell-topbar__theme {
  flex: 0 0 auto;
}

.icam-shell-topbar__module {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1d4ed8;
  background: #eff6ff;
  border-radius: 999px;
  padding: 2px 6px;
}

.icam-shell-topbar__search {
  flex: 1 1 auto;
  min-width: 0;
  height: 28px;
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}

.icam-shell-topbar__search .material-symbols-outlined {
  font-size: 14px;
  flex: 0 0 auto;
}

.icam-shell-topbar__search span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icam-shell-topbar__search kbd {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  border: 1px solid #e6eaf0;
  background: #fff;
  border-radius: 4px;
  padding: 1px 4px;
}

.icam-shell-topbar__counts {
  display: flex;
  flex: 0 0 auto;
  height: 28px;
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.icam-shell-topbar__counts a,
.icam-shell-topbar__counts span {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  text-decoration: none;
  border-left: 1px solid #eef1f5;
}

.icam-shell-topbar__counts a:first-child,
.icam-shell-topbar__counts span:first-child {
  border-left: 0;
}

.icam-shell-topbar__counts a:hover {
  background: #f8fafc;
}

.icam-shell-topbar__counts .is-quiet {
  color: #94a3b8;
}

.icam-shell-topbar__counts .is-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
}

.icam-shell-topbar__counts .is-live.has-live i {
  background: #16a34a;
  animation: icam-live-pulse 1.8s ease-out infinite;
}

@keyframes icam-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45); }
  70% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.icam-shell-topbar__icon:focus-visible,
.icam-shell-topbar__search:focus-visible,
.icam-shell-topbar__who:focus-visible,
.icam-shell-topbar__counts a:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.icam-shell-topbar__counts em {
  font-style: normal;
  color: #94a3b8;
  font-weight: 650;
  font-size: 10px;
}

.icam-shell-topbar__account {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
}

.icam-shell-topbar__who {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 3px;
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.icam-shell-topbar__who strong {
  display: block;
  font-size: 11px;
  line-height: 1.1;
}

.icam-shell-topbar__who small {
  display: block;
  font-size: 9px;
  color: #64748b;
  font-weight: 600;
}

.icam-shell-topbar__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 220px;
  background: #fff;
  border: 1px solid #e6eaf0;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  z-index: 80;
  padding: 4px 0;
}

html.dark .icam-shell-topbar,
html.dark .icam-shell-topbar__counts,
html.dark .icam-shell-topbar__who,
html.dark .icam-shell-topbar__icon,
html.dark .icam-shell-topbar__menu {
  background: #0f172a;
  border-color: #1e293b;
  color: #e2e8f0;
}

html.dark .icam-shell-topbar__module {
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.22);
}

html.dark .icam-shell-topbar__search {
  background: #111827;
  border-color: #1e293b;
  color: #94a3b8;
}

html.dark .icam-shell-panel,
html.dark .icam-shell-stage,
html.dark .icam-shell-sidebar {
  background: #0f172a;
  color: #e2e8f0;
}

html.dark .icam-shell-link {
  color: #e2e8f0;
}

html.dark .icam-shell-link.is-on {
  background: rgba(37, 99, 235, 0.22);
  color: #bfdbfe;
}

@media (prefers-reduced-motion: reduce) {
  .icam-shell-sidebar,
  .icam-shell-topbar__counts .is-live.has-live i {
    transition: none;
    animation: none;
  }
}

@media (max-width: 1279px) {
  .icam-shell-topbar__counts em {
    display: none;
  }
}

@media (max-width: 1023px) {
  .icam-shell-topbar__counts,
  .icam-shell-topbar__search kbd,
  .icam-shell-topbar__who small,
  .icam-shell-topbar__who strong {
    display: none;
  }
}

@media (min-width: 1024px) {
  .icam-shell-topbar__icon.icam-shell-topbar__icon--mobile {
    display: none !important;
  }
}

@media (max-width: 639px) {
  .icam-shell-topbar__search span,
  .icam-shell-topbar__search kbd,
  .icam-shell-topbar__crumbs .icam-shell-topbar__title,
  .icam-shell-topbar__results {
    display: none;
  }

  .icam-shell-topbar__search {
    width: 32px;
    min-width: 32px;
    padding: 0;
    justify-content: center;
  }

  .icam-shell-topbar__crumbs {
    max-width: none;
    flex: 1;
  }
}
