/* Hallmark · pre-emit critique: P4 H4 E5 S5 R5 V4 */
/* Hallmark · genre: modern-minimal utility · macrostructure: task workbench · design-system: design.md · designed-as-app */
.pdf-tool-page {
  --pdf-canvas: #f6f6f6;
  --pdf-surface: #fff;
  --pdf-panel: #fafafa;
  --pdf-ink: #242424;
  --pdf-copy: #444;
  --pdf-muted: #707070;
  --pdf-muted-light: #999;
  --pdf-rule: #dedede;
  --pdf-rule-soft: #ececec;
  --pdf-rule-strong: #bcbcbc;
  --pdf-accent: #16baaa;
  --pdf-accent-dark: #109e91;
  --pdf-focus: rgba(22, 186, 170, .2);
  --pdf-danger: #b42318;
  --pdf-danger-ink: #8a1c13;
  --pdf-danger-soft: #fff4f2;
  --pdf-success: #067647;
  --pdf-stage: #eef0f2;
  --pdf-redaction: #161616;
  --pdf-crop-shade: rgba(20, 20, 20, .52);
  --pdf-disabled: .45;
  --pdf-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  min-height: calc(100vh - 150px);
  padding: 0;
  background: var(--pdf-canvas);
  color: var(--pdf-ink);
}

.pdf-tool-card,
.pdf-tool-sidebar .layui-card {
  border-radius: 0;
  box-shadow: var(--pdf-shadow);
}

.pdf-tool-card,
.pdf-tool-card-body,
.pdf-workspace,
.pdf-workspace-grid,
.pdf-input-column {
  min-width: 0;
}

.pdf-tool-title {
  display: grid;
  height: auto;
  min-height: 52px;
  place-items: center;
  line-height: 1.35;
}

.pdf-tool-title h1 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 24px;
  line-height: 1.35;
}

.pdf-tool-card-body {
  padding: 10px 15px 16px;
}

.pdf-tool-description {
  margin: 10px 0;
  border-radius: 0;
  background: var(--pdf-canvas);
  color: var(--pdf-copy);
  line-height: 1.7;
}

.pdf-tool-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  color: var(--pdf-muted);
  font-size: 12px;
}

.pdf-tool-meta a,
.pdf-tool-meta span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.pdf-tool-meta a,
.pdf-tool-meta span i {
  color: var(--pdf-accent);
}

.pdf-tool-meta a:hover {
  color: var(--pdf-accent-dark);
}

.pdf-tool-sidebar .layui-card-body {
  overflow-wrap: anywhere;
}

.pdf-tool-sidebar .layui-card-body p + p {
  margin-top: 6px;
}

.pdf-workspace,
.pdf-workspace * {
  box-sizing: border-box;
}

.pdf-workspace {
  margin-top: 12px;
  border: 1px solid var(--pdf-rule);
  border-top: 2px solid var(--pdf-accent);
  background: var(--pdf-surface);
}

.pdf-workspace [hidden],
.pdf-local-password-panel[hidden] {
  display: none !important;
}

.pdf-workflow {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--pdf-rule);
  background: var(--pdf-canvas);
}

.pdf-step {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--pdf-muted-light);
  font-size: 13px;
  white-space: nowrap;
}

.pdf-step b {
  display: grid;
  width: 24px;
  height: 24px;
  flex: none;
  place-items: center;
  border: 1px solid var(--pdf-rule-strong);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
}

.pdf-step.is-current,
.pdf-step.is-done {
  color: var(--pdf-ink);
}

.pdf-step.is-current b,
.pdf-step.is-done b {
  border-color: var(--pdf-accent);
  background: var(--pdf-accent);
  color: var(--pdf-surface);
}

.pdf-step-line {
  width: auto;
  height: 1px;
  min-width: 8px;
  flex: 1;
  margin: 0 16px;
  background: var(--pdf-rule);
}

.pdf-workspace-grid {
  display: block;
}

.pdf-workspace-grid:has(> .pdf-job-panel:not([hidden])) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .65fr);
}

.pdf-input-column {
  padding: 24px;
  border-right: 0;
}

.pdf-workspace-grid:has(> .pdf-job-panel:not([hidden])) > .pdf-input-column {
  border-right: 1px solid var(--pdf-rule);
}

.pdf-dropzone {
  display: flex;
  min-height: 200px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 24px;
  border: 1px dashed var(--pdf-rule-strong);
  background: var(--pdf-canvas);
  cursor: pointer;
  text-align: center;
  transition: border-color .16s ease, background-color .16s ease;
}

.pdf-dropzone:hover,
.pdf-dropzone.is-dragging {
  border-color: var(--pdf-accent);
  background: var(--pdf-surface);
}

.pdf-dropzone:focus-within {
  outline: 2px solid var(--pdf-accent);
  outline-offset: 2px;
}

.pdf-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.pdf-dropzone > i {
  margin-bottom: 14px;
  color: var(--pdf-accent);
  font-size: 37px;
}

.pdf-dropzone strong {
  font-size: 16px;
  font-weight: 650;
}

.pdf-dropzone span {
  margin-top: 7px;
  color: var(--pdf-muted);
  font-size: 12px;
}

.pdf-file-summary {
  display: flex;
  min-width: 0;
  min-height: 72px;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--pdf-rule);
  background: var(--pdf-canvas);
}

.pdf-file-summary > i {
  color: var(--pdf-accent);
  font-size: 25px;
}

.pdf-file-summary > div {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.pdf-file-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.pdf-file-summary span {
  margin-top: 3px;
  color: var(--pdf-muted);
  font-size: 11px;
}

.pdf-icon-button {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  place-items: center;
  border: 1px solid var(--pdf-rule-strong);
  background: var(--pdf-surface);
  color: var(--pdf-muted);
  cursor: pointer;
}

.pdf-icon-button:hover {
  border-color: var(--pdf-accent);
  color: var(--pdf-accent);
}

.pdf-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}

.pdf-price {
  min-height: 20px;
  color: var(--pdf-muted);
  font-size: 13px;
}

.pdf-price strong {
  color: var(--pdf-ink);
  font-weight: 700;
}

.pdf-primary-button,
.pdf-secondary-button,
.pdf-text-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--pdf-accent);
  border-radius: 2px;
  padding: 0 16px;
  cursor: pointer;
  font-size: 13px;
}

.pdf-primary-button {
  background: var(--pdf-accent);
  color: var(--pdf-surface);
}

.pdf-primary-button:hover {
  border-color: var(--pdf-accent-dark);
  background: var(--pdf-accent-dark);
}

.pdf-secondary-button {
  border-color: var(--pdf-rule-strong);
  background: var(--pdf-surface);
  color: var(--pdf-ink);
}

.pdf-secondary-button:hover {
  border-color: var(--pdf-accent);
  color: var(--pdf-accent);
}

.pdf-text-button {
  min-height: 32px;
  padding: 0 3px;
  border: 0;
  background: transparent;
  color: var(--pdf-muted);
}

.pdf-text-button:hover {
  color: var(--pdf-accent);
}

.pdf-primary-button:focus-visible,
.pdf-secondary-button:focus-visible,
.pdf-text-button:focus-visible,
.pdf-icon-button:focus-visible {
  outline: 2px solid var(--pdf-accent);
  outline-offset: 2px;
}

.pdf-primary-button:disabled,
.pdf-secondary-button:disabled {
  cursor: not-allowed;
  opacity: var(--pdf-disabled);
}

.pdf-login-hint,
.pdf-message {
  margin: 12px 0 0;
  color: var(--pdf-muted);
  font-size: 12px;
}

.pdf-login-hint a {
  color: var(--pdf-accent);
  text-decoration: underline;
}

.pdf-message.is-error {
  color: var(--pdf-danger);
}

.pdf-message.is-success {
  color: var(--pdf-success);
}

.pdf-job-panel {
  min-width: 0;
  padding: 24px;
  background: var(--pdf-canvas);
}

.pdf-job-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pdf-job-panel-head > div {
  display: flex;
  flex-direction: column;
}

.pdf-job-label {
  color: var(--pdf-muted);
  font-size: 11px;
}

.pdf-job-panel-head strong {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 650;
}

.pdf-job-panel-head > span {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.pdf-progress {
  height: 6px;
  margin: 23px 0 20px;
  overflow: hidden;
  background: var(--pdf-rule);
}

.pdf-progress i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--pdf-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .25s ease;
}

.pdf-job-detail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 16px;
  font-size: 12px;
}

.pdf-job-detail span {
  color: var(--pdf-muted);
}

.pdf-job-detail b {
  font-weight: 550;
  text-align: right;
}

.pdf-job-detail code {
  min-width: 0;
  overflow: hidden;
  color: var(--pdf-copy);
  text-align: right;
  text-overflow: ellipsis;
}

.pdf-job-background-notice {
  margin: 18px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--pdf-accent);
  background: var(--pdf-surface);
  color: var(--pdf-copy);
  font-size: 12px;
  line-height: 1.65;
}

.pdf-job-error {
  margin: 20px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--pdf-danger);
  background: var(--pdf-danger-soft);
  color: var(--pdf-danger-ink);
  font-size: 12px;
}

.pdf-job-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.pdf-workspace.is-disabled {
  opacity: .8;
}

.pdf-workspace.is-disabled .pdf-dropzone {
  cursor: not-allowed;
}

.pdf-workspace.is-busy .pdf-dropzone {
  pointer-events: none;
  opacity: .6;
}

.pdf-worker-options {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--pdf-rule);
  background: var(--pdf-canvas);
}

.pdf-worker-options label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: var(--pdf-copy);
  font-size: 13px;
  font-weight: 650;
}

.pdf-worker-options select,
.pdf-worker-options input[type="text"],
.pdf-worker-options input[type="password"],
.pdf-worker-options textarea {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--pdf-rule-strong);
  border-radius: 0;
  background: var(--pdf-surface);
  padding: 0 10px;
  color: var(--pdf-ink);
  font: inherit;
  font-weight: 400;
}

.pdf-worker-options textarea {
  min-height: 132px;
  resize: vertical;
  padding-block: 9px;
  line-height: 1.55;
}

.pdf-worker-options select:focus,
.pdf-worker-options textarea:focus,
.pdf-worker-options input:focus {
  border-color: var(--pdf-accent);
  box-shadow: 0 0 0 2px var(--pdf-focus);
}

.pdf-worker-options .pdf-option-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pdf-worker-options .pdf-checkbox-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row;
  gap: 8px;
}

.pdf-worker-options .pdf-checkbox-label input {
  width: 16px;
  height: 16px;
  flex: none;
  accent-color: var(--pdf-accent);
}

.pdf-worker-options p {
  margin: 0;
  color: var(--pdf-muted);
  font-size: 11px;
  line-height: 1.6;
}

.pdf-worker-page-picker {
  min-width: 0;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--pdf-rule);
}

.pdf-worker-page-picker[hidden] {
  display: none !important;
}

.pdf-worker-options-visual {
  display: block;
  padding: 0;
  border-color: var(--pdf-rule);
  background: var(--pdf-surface);
}

.pdf-tool-page.is-visual-page > .layui-container {
  width: min(1480px, calc(100% - 30px));
  max-width: none;
}

.pdf-tool-page.is-visual-page .pdf-workspace-grid:has(> .pdf-job-panel:not([hidden])) {
  display: block;
}

.pdf-tool-page.is-visual-page .pdf-workspace-grid:has(> .pdf-job-panel:not([hidden])) > .pdf-input-column {
  border-right: 0;
  border-bottom: 1px solid var(--pdf-rule);
}

@media (max-width: 900px) {
  .pdf-workspace-grid:has(> .pdf-job-panel:not([hidden])) {
    display: block;
  }

  .pdf-workspace-grid:has(> .pdf-job-panel:not([hidden])) > .pdf-input-column {
    border-right: 0;
    border-bottom: 1px solid var(--pdf-rule);
  }
}

@media (max-width: 760px) {
  .pdf-tool-title h1 {
    font-size: 22px;
  }

  .pdf-tool-card-body {
    padding: 10px 12px 14px;
  }

  .pdf-tool-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .pdf-workflow {
    padding: 13px 14px;
  }

  .pdf-step {
    gap: 5px;
    font-size: 11px;
  }

  .pdf-step-line {
    margin: 0 7px;
  }

  .pdf-input-column,
  .pdf-job-panel {
    padding: 20px 14px;
  }

  .pdf-dropzone {
    min-height: 170px;
  }

  .pdf-submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  .pdf-submit-row .pdf-primary-button {
    width: 100%;
  }

}

@media (max-width: 560px) {
  .pdf-worker-options .pdf-option-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 430px) {
  .pdf-workflow {
    display: grid;
    width: 100%;
    grid-template-columns: max-content minmax(8px, 1fr) max-content minmax(8px, 1fr) max-content;
    padding: 13px 10px;
  }

  .pdf-step {
    gap: 4px;
    font-size: 10px;
  }

  .pdf-step span {
    font-size: 10px;
  }

  .pdf-step-line {
    min-width: 8px;
    margin: 0 4px;
  }

  .pdf-step b {
    width: 22px;
    height: 22px;
  }
}
