.personal-workbench {
  box-sizing: border-box;
  width: 100%;
  max-width: 1560px;
  min-width: 0;
  margin: 0 auto;
  padding: 2px 84px 36px 24px;
  color: var(--lf-text);
}

.image-ocr-source-status {
  padding: 24px 12px;
  color: var(--lf-text-2);
  text-align: center;
}

.image-ocr-source-status--error {
  color: var(--lf-danger);
}

.image-ocr-source-viewport {
  display: flex;
  max-height: 68vh;
  justify-content: center;
  overflow: auto;
  padding: 4px;
}

.image-ocr-source-canvas {
  position: relative;
  display: inline-block;
  max-width: 100%;
  max-height: 68vh;
  line-height: 0;
}

.image-ocr-source-canvas img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
}

.image-ocr-source-highlight {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid var(--lf-danger);
  background: rgb(235 87 87 / 14%);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 78%);
  pointer-events: none;
}

@media (max-width: 640px) {
  .image-ocr-source-viewport { max-height: 60vh; }
  .image-ocr-source-canvas,
  .image-ocr-source-canvas img { max-height: 60vh; }
}

.dashboard-shell .review-sidebar-root,
.dashboard-shell .aux-drawer-root {
  display: none;
}

.workbench-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.workbench-header .page-head {
  margin: 0;
}

.workbench-header .page-head h1 {
  font-size: 24px;
  line-height: 1.25;
}

.workbench-header .el-button {
  min-height: 38px;
  flex-shrink: 0;
  border-radius: 6px;
  font-weight: 600;
}

.workbench-queue {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid var(--lf-border);
  border-radius: 8px;
  background: var(--lf-card);
}

.workbench-queue-item {
  position: relative;
  display: grid;
  min-height: 104px;
  grid-template-columns: minmax(0, 1fr) 20px;
  grid-template-rows: auto auto auto;
  align-content: center;
  gap: 2px 10px;
  padding: 14px 18px;
  border: 0;
  background: transparent;
  color: var(--lf-text);
  cursor: pointer;
  text-align: left;
  transition: background-color .15s ease;
}

.workbench-queue-item + .workbench-queue-item {
  border-left: 1px solid var(--lf-border);
}

.workbench-queue-item:hover {
  background: var(--lf-surface-2);
}

.workbench-queue-label {
  display: inline-flex;
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
  align-items: center;
  gap: 8px;
  color: var(--lf-text-2);
  font-size: 13px;
  font-weight: 600;
}

.workbench-queue-label i,
.workbench-status i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--lf-primary);
}

.workbench-queue-item strong {
  grid-column: 1;
  grid-row: 2;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.workbench-queue-hint {
  grid-column: 1;
  grid-row: 3;
  overflow: hidden;
  color: var(--lf-text-3);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-queue-arrow {
  grid-column: 2;
  grid-row: 1 / span 3;
  justify-self: end;
  color: var(--lf-text-3);
  font-size: 15px;
  transition: transform .15s ease, color .15s ease;
}

.workbench-queue-item:hover .workbench-queue-arrow {
  color: var(--lf-primary);
  transform: translateX(2px);
}

.workbench-queue-item.processing .workbench-queue-label i {
  background: var(--lf-success);
}

.workbench-queue-item.failed .workbench-queue-label i {
  background: var(--lf-danger);
}

.workbench-task-section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--lf-border);
  border-radius: 8px;
  background: var(--lf-card);
}

.workbench-task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 14px;
}

.workbench-task-head h2 {
  margin: 0;
  color: var(--lf-text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.workbench-task-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.workbench-view-all.el-button {
  height: 28px;
  margin: 0;
  padding: 0 4px;
  font-weight: 600;
}

.workbench-task-head p {
  margin: 3px 0 0;
  color: var(--lf-text-3);
  font-size: 12px;
  line-height: 1.5;
}

.workbench-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.workbench-search {
  width: 250px;
}

.workbench-search .el-input__wrapper {
  min-height: 34px;
  border-radius: 5px;
}

.workbench-tools > .el-button {
  width: 36px;
  height: 36px;
  border-radius: 5px;
}

.workbench-filter-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 0 20px 12px;
  scrollbar-width: thin;
}

.workbench-filter-bar button {
  display: inline-flex;
  min-height: 30px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--lf-text-2);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  line-height: 1.3;
}

.workbench-filter-bar button:hover {
  background: var(--lf-surface-2);
}

.workbench-filter-bar button.active {
  border-color: var(--lf-primary-light);
  background: var(--lf-primary-light);
  color: var(--lf-primary);
  font-weight: 600;
}

.workbench-filter-bar button span {
  color: var(--lf-text-3);
  font-variant-numeric: tabular-nums;
}

.workbench-filter-bar button.active span {
  color: inherit;
}

.workbench-table-scroll {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  border-top: 1px solid var(--lf-border);
}

.workbench-mobile-tasks {
  display: none;
}

.workbench-task-table {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
  border-collapse: collapse;
  color: var(--lf-text);
  font-size: 13px;
}

.workbench-task-table th {
  height: 38px;
  padding: 8px 14px;
  background: var(--lf-surface-2);
  color: var(--lf-text-3);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.workbench-task-table th:nth-child(1) { width: 40%; }
.workbench-task-table th:nth-child(2) { width: 17%; }
.workbench-task-table th:nth-child(3) { width: 14%; }
.workbench-task-table th:nth-child(4) { width: 17%; }
.workbench-task-table th:nth-child(5) { width: 12%; }

.workbench-task-table td {
  min-height: 64px;
  padding: 11px 14px;
  border-top: 1px solid var(--lf-border);
  vertical-align: middle;
}

.workbench-task-table tbody tr:hover {
  background: var(--lf-surface-2);
}

.workbench-file {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.workbench-file > .el-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 5px;
  background: var(--lf-primary-light);
  color: var(--lf-primary);
  font-size: 15px;
}

.workbench-file > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.workbench-file strong {
  overflow: hidden;
  color: var(--lf-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
}

.workbench-file span {
  overflow: hidden;
  color: var(--lf-text-3);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--lf-text-2);
  font-size: 12px;
  white-space: nowrap;
}

.workbench-status i {
  width: 7px;
  height: 7px;
  flex-basis: 7px;
  background: var(--lf-primary);
}

.workbench-status.is-complete i { background: var(--lf-success); }
.workbench-status.is-failed i { background: var(--lf-danger); }
.workbench-status.is-processing i { background: var(--lf-primary); }

.workbench-task-error {
  display: block;
  max-width: 190px;
  overflow: hidden;
  margin-top: 4px;
  color: var(--lf-danger);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-progress-value {
  color: var(--lf-text-2);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.workbench-task-table .el-progress {
  width: min(120px, 100%);
  margin-top: 5px;
}

.workbench-updated {
  color: var(--lf-text-2);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.workbench-row-action {
  max-width: 100%;
  padding: 6px 0;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.workbench-row-action .el-icon {
  margin-right: 4px;
}

.workbench-state,
.workbench-empty {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 18px;
  color: var(--lf-text-3);
  font-size: 13px;
  text-align: center;
}

.workbench-state.error {
  color: var(--lf-danger);
}

.workbench-empty {
  flex-direction: column;
  border-top: 1px solid var(--lf-border);
}

.workbench-empty > .el-icon {
  color: var(--lf-text-3);
  font-size: 24px;
}

.workbench-empty strong {
  color: var(--lf-text-2);
  font-size: 14px;
}

@media (max-width: 980px) {
  .workbench-search { width: 210px; }
  .workbench-task-head { align-items: flex-start; }
}

@media (max-width: 760px) {
  .personal-workbench { padding: 0 68px 32px 12px; }

  .dashboard-shell .help-fab {
    right: 12px;
    bottom: 12px;
  }

  .workbench-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
  }

  .workbench-header .el-button { align-self: flex-start; }

  .workbench-queue {
    grid-template-columns: 1fr;
    margin-bottom: 16px;
  }

  .workbench-queue-item {
    min-height: 82px;
    grid-template-columns: minmax(0, 1fr) 20px;
    padding: 11px 14px;
  }

  .workbench-queue-item + .workbench-queue-item {
    border-top: 1px solid var(--lf-border);
    border-left: 0;
  }

  .workbench-task-head {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 15px 14px 12px;
  }

  .workbench-tools { width: 100%; }
  .workbench-search { width: auto; flex: 1; min-width: 0; }
  .workbench-filter-bar {
    flex-wrap: wrap;
    overflow: visible;
    gap: 4px 6px;
    padding: 0 14px 10px;
    scrollbar-width: auto;
  }
  .workbench-state { flex-wrap: wrap; }
  .workbench-desktop-table { display: none; }

  .workbench-mobile-tasks {
    display: block;
    padding: 0 12px 8px;
    border-top: 1px solid var(--lf-border);
  }

  .workbench-mobile-task {
    display: grid;
    gap: 8px;
    padding: 12px 0;
  }

  .workbench-mobile-task + .workbench-mobile-task {
    border-top: 1px solid var(--lf-border);
  }

  .workbench-mobile-task-head {
    display: grid;
    min-width: 0;
    gap: 8px;
  }

  .workbench-mobile-task-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--lf-text-3);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
  }

  .workbench-mobile-task .el-progress { width: 100%; }
  .workbench-mobile-task .workbench-task-error { max-width: 100%; }
  .workbench-mobile-task .workbench-row-action { justify-self: end; }
}
