.scanner-heading {
  align-items: center;
  flex-wrap: nowrap;
}

.scanner-heading h2,
.scanner-heading .hint {
  white-space: nowrap;
}

.scanner-heading .panel-heading-actions {
  flex-wrap: nowrap;
  margin-left: auto;
  min-width: 0;
}

.scanner-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0f172a;
}

#qr-reader {
  width: 100%;
  min-height: 320px;
  background: #0f172a;
}

#qr-reader video,
#qr-reader canvas {
  border-radius: 0;
}

#qr-reader__dashboard {
  padding: 12px !important;
  background: #fff;
}

#qr-reader__dashboard button,
#qr-reader__dashboard select {
  min-height: 38px;
  border-radius: var(--control-radius);
  border: 1px solid var(--line);
  padding: 8px 10px;
  background: #fff;
  transition: background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, transform 0.08s ease;
}

#qr-reader__dashboard button:active {
  transform: scale(0.98);
}

.operation-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.active-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.active-worker {
  font-size: 12px;
  color: var(--muted);
}
.active-worker strong {
  color: var(--text);
}
.active-status {
  font-size: 15px;
  min-width: 0;
}
.active-idle {
  color: var(--muted);
}
.active-running {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.active-task {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.active-elapsed {
  font-size: 17px;
  font-weight: 800;
  color: var(--success);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.active-elapsed small {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.operation-bar .btn.danger {
  flex: 0 0 auto;
  width: auto;
}
.scanner-running {
  border-left: 4px solid var(--success);
}

.scan-flash {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 120px;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease;
  z-index: 5;
}
.scan-flash.show-success {
  background: rgba(5, 150, 105, 0.9);
  opacity: 1;
}
.scan-flash.show-error {
  background: rgba(180, 35, 24, 0.92);
  opacity: 1;
}

.scanner-controls {
  display: flex;
  gap: 8px;
}
.scanner-controls > .btn:not(.hidden) {
  margin-top: 8px;
}
