/* Final workbench layout overrides. Keep these after the shared responsive rules. */
.sidebar-action {
  width: 100%;
  min-height: 46px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #465362;
}

.sidebar-action:hover {
  border-color: var(--line);
  background: #f3f6f8;
  color: var(--brand-dark);
}

.sidebar-action svg {
  width: 20px;
  height: 20px;
}

.sidebar-action > span {
  display: none;
}

body.workbench-focus .topbar,
body.workbench-focus #page-workbench > .printer-strip {
  display: none;
}

body.workbench-focus #page-workbench {
  min-height: 100vh;
  padding: 8px 10px 10px;
}

body.workbench-focus .workbench-grid {
  margin-top: 0;
  gap: 0;
}

body.workbench-focus .workflow-column {
  border-radius: 0;
}

body.workbench-focus .compact-scan-section {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

body.workbench-focus .scan-advanced-controls {
  display: none;
}

body.workbench-focus .scan-command-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(330px, 1fr) auto auto auto minmax(150px, 220px);
  gap: 8px;
  align-items: center;
}

body.workbench-focus .compact-query-status {
  display: none;
}

body.workbench-focus .scan-input-wrap {
  min-height: 42px;
  padding: 3px 3px 3px 10px;
  grid-template-columns: auto minmax(0, 1fr) 28px 38px;
  gap: 5px;
  border-width: 1px;
  box-shadow: 0 0 0 3px rgba(13, 120, 104, 0.05);
}

body.workbench-focus .scan-input-wrap > svg {
  width: 18px;
  height: 18px;
}

body.workbench-focus .scan-input-wrap input {
  height: 32px;
  font-size: 15px;
}

body.workbench-focus .scan-input-wrap .primary-btn {
  min-width: 38px;
  min-height: 34px;
  padding: 0;
}

body.workbench-focus .scan-input-wrap .primary-btn span {
  display: none;
}

body.workbench-focus .scan-input-wrap .clear-scan {
  width: 28px;
  height: 28px;
}

body.workbench-focus .quick-print-btn {
  min-width: 124px;
  min-height: 38px;
  padding: 6px 10px;
  white-space: nowrap;
}

body.workbench-focus .box-print-btn {
  min-width: 118px;
  min-height: 38px;
  padding: 6px 9px;
}

body.workbench-focus .auto-print-control {
  min-height: 38px;
  white-space: nowrap;
}

body.workbench-focus .scan-command-row #queryRuntimeStatus {
  min-width: 0;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.workbench-focus .scan-command-row #queryRuntimeStatus span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.workbench-focus .compact-print-runtime {
  min-width: 0;
  min-height: 38px;
  margin: 0;
  padding: 5px 7px;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
}

body.workbench-focus .compact-print-runtime > div span,
body.workbench-focus .compact-print-runtime > .text-btn {
  display: none;
}

body.workbench-focus .compact-print-runtime strong {
  overflow: hidden;
  display: block;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.workbench-focus .print-content-section {
  padding: 7px 10px 8px;
  border-bottom: 0;
}

body.workbench-focus .manual-context-bar,
body.workbench-focus .manual-purpose-note,
body.workbench-focus .label-list-toolbar,
body.workbench-focus .active-purpose-bar,
body.workbench-focus .manual-selection-footer,
body.workbench-focus .sample-results-section {
  display: none !important;
}

body.workbench-focus .category-selector {
  margin-top: 0;
  gap: 6px;
}

body.workbench-focus .category-selector .category-tile {
  min-height: 46px;
  padding: 5px 8px;
  gap: 6px;
}

body.workbench-focus .category-selector .category-tile > svg {
  width: 16px;
}

body.workbench-focus .category-copy strong {
  font-size: 10px;
}

body.workbench-focus .category-copy small {
  margin-top: 0;
}

body.workbench-focus .category-count {
  min-width: 23px;
  height: 23px;
}

body.workbench-focus .label-option-list {
  min-height: calc(100vh - 128px);
  max-height: calc(100vh - 128px);
  margin-top: 6px;
}

body.workbench-focus .label-option-group-head {
  min-height: 26px;
  padding: 4px 8px;
}

body.workbench-focus .label-option-group-grid {
  padding: 5px;
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  gap: 5px;
}

body.workbench-focus .label-option {
  min-height: 55px;
  padding: 7px 8px;
  gap: 5px;
}

body.workbench-focus .label-option-marker {
  width: 16px;
  height: 16px;
}

body.workbench-focus .label-option strong {
  min-height: 27px;
  font-size: 11px;
  line-height: 1.25;
}

body.workbench-focus .label-option small {
  margin-top: 2px;
  font-size: 8px;
}

body.workbench-focus .queue-section {
  display: none;
}

body.workbench-focus.print-settings-open .queue-section {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  width: min(390px, calc(100vw - 88px));
  padding: 16px;
  display: block;
  overflow: auto;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: -14px 0 30px rgba(24, 33, 43, 0.16);
}

body.workbench-focus.print-settings-open .queue-section .primary-print-actions,
body.workbench-focus.print-settings-open .queue-section .print-options {
  grid-template-columns: 1fr;
}

@media (max-width: 1320px) {
  body.workbench-focus .scan-command-row {
    grid-template-columns: minmax(310px, 1fr) auto auto auto;
  }

  body.workbench-focus .compact-print-runtime {
    display: none;
  }
}

@media (max-width: 920px) {
  .sidebar-action {
    display: none;
  }

  body.workbench-focus .topbar {
    display: flex;
  }

  body.workbench-focus #page-workbench {
    min-height: auto;
    padding: 8px;
  }

  body.workbench-focus .scan-command-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  body.workbench-focus .scan-input-wrap {
    grid-column: 1 / -1;
  }

  body.workbench-focus .scan-command-row #queryRuntimeStatus {
    display: none;
  }

  body.workbench-focus .auto-print-control {
    justify-self: end;
  }

  body.workbench-focus .category-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.workbench-focus .label-option-list {
    min-height: 420px;
    max-height: none;
  }
}
