.app-topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  height: auto;
  padding-right: 0.75rem;
  padding-left: 0.75rem;
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}

.app-topbar-title {
  flex: 1 1 auto;
  min-width: 0;
}

#batch-intake-status {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  min-width: 0;
  max-width: calc(100vw - var(--batch-intake-sidebar-offset, 0px) - 1rem);
  margin-left: auto;
  padding: 0.15rem 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.batch-intake-chip {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 3px;
  align-items: center;
  gap: 0.2rem 0.4rem;
  min-width: 6rem;
  max-width: 9rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid rgba(127, 127, 127, 0.28);
  border-radius: 999px;
  background: rgba(127, 127, 127, 0.08);
}

.batch-intake-summary {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  color: inherit;
  font-size: 0.65rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.batch-intake-summary:hover {
  color: inherit;
}

.batch-intake-state-dot {
  flex: 0 0 auto;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #64748b;
}

.batch-intake-state-dot.is-running,
.batch-intake-state-dot.is-cancelling {
  background: #0d6efd;
}

.batch-intake-state-dot.is-completed {
  background: #198754;
}

.batch-intake-state-dot.is-partial {
  background: #f0ad4e;
}

.batch-intake-state-dot.is-failed {
  background: #dc3545;
}

.batch-intake-progress {
  grid-column: 1 / -1;
  display: block;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(127, 127, 127, 0.24);
}

.batch-intake-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0d6efd;
  transition: width 180ms ease;
}

.batch-intake-progress.is-completed > span {
  background: #198754;
}

.batch-intake-progress.is-partial > span {
  background: #f0ad4e;
}

.batch-intake-progress.is-failed > span {
  background: #dc3545;
}

.batch-intake-cancel {
  grid-column: 2;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #dc3545;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.batch-intake-cancel:hover,
.batch-intake-cancel:focus-visible {
  background: rgba(220, 53, 69, 0.12);
  color: #b02a37;
}

.batch-intake-cancel:disabled {
  cursor: wait;
  opacity: 0.6;
}

@media (max-width: 700px) {
  .app-topbar-title {
    display: none;
  }

  #batch-intake-status {
    max-width: calc(100vw - var(--batch-intake-sidebar-offset, 0px) - 0.5rem);
  }
}
