.nexus-file-workflow .nexus-file-job {
  position: relative;
  background: #0c1c30;
  border: 1px solid #254363;
  border-radius: 16px;
  padding: 14px 18px;
  margin: 0 0 18px;
  color: #dfeeff;
}
.nexus-file-job p {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.nexus-file-job p.error {
  color: #ffb5bd;
}
.nexus-file-job > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.nexus-file-job button,
.nexus-file-workflow .raster-save,
.nexus-file-confirm button {
  min-height: 44px;
  min-width: 44px;
  border: 1px solid #365c7b;
  border-radius: 10px;
  background: #132d48;
  color: #e0f2ff;
  padding: 9px 14px;
  font: inherit;
  cursor: pointer;
}
.nexus-file-job button:disabled {
  opacity: 0.5;
  cursor: default;
}
.nexus-file-job progress {
  width: 100%;
  height: 8px;
  margin: 2px 0 8px;
  accent-color: #59c9f1;
}
.nexus-file-workflow button:focus-visible,
.nexus-file-workflow a:focus-visible,
.nexus-file-confirm button:focus-visible {
  outline: 3px solid #76daff;
  outline-offset: 3px;
}
.nexus-file-workflow .raster-save {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.nexus-file-workflow .result-card,
.nexus-file-workflow .image-item {
  min-width: 0;
  overflow-wrap: anywhere;
}
.nexus-file-workflow .result-card img {
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
}
.nexus-file-workflow .raster-source-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  margin-top: 12px;
}
.nexus-file-workflow .raster-source-list .image-item {
  border: 1px solid #284463;
  border-radius: 12px;
  padding: 12px;
}
.nexus-file-workflow .raster-source-list img {
  max-width: 100%;
  height: 100px;
  object-fit: contain;
}
.nexus-file-workflow .raster-source-list button {
  min-height: 44px;
  width: 100%;
}
.nexus-file-workflow #previewModal {
  max-width: min(94vw, 1100px);
  max-height: 90dvh;
  overflow: auto;
  color: #dfedff;
  background: #0b192b;
  border: 1px solid #315774;
  border-radius: 18px;
  padding: 18px;
}
.nexus-file-workflow #previewModal::backdrop {
  background: #020811bf;
}
.nexus-file-confirm {
  max-width: min(94vw, 480px);
  background: #0b192b;
  color: #dfedff;
  border: 1px solid #315774;
  border-radius: 18px;
  padding: 24px;
}
.nexus-file-confirm::backdrop {
  background: #020811bf;
}
.nexus-file-confirm form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.nexus-file-workflow .raster-zip {
  padding: 12px;
  border: 1px solid #284463;
  border-radius: 12px;
  margin-top: 12px;
}
.nexus-file-workflow .nexus-app-notice {
  bottom: calc(160px + env(safe-area-inset-bottom));
}
.nexus-file-workflow .raster-output-note {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #adc9df;
}
.nexus-file-workflow .card-actions {
  flex-wrap: wrap;
  gap: 8px;
}
.nexus-file-workflow .card-actions button {
  min-height: 44px;
}
.nexus-file-workflow .result-card label {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
}
.nexus-file-workflow .result-card input[type="checkbox"] {
  min-width: 24px;
  min-height: 24px;
}
.nexus-file-workflow .hidden,
.nexus-file-workflow [hidden] {
  display: none !important;
}
@media (max-width: 700px) {
  .nexus-file-workflow .nexus-file-job {
    position: fixed;
    z-index: 80;
    bottom: calc(var(--file-keyboard, 0px) + var(--file-nav, 0px) + 8px);
    left: 8px;
    right: 8px;
    margin: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -5px 25px #02081270;
  }
  .nexus-file-workflow .nexus-file-job p {
    font-size: 0.82rem;
    max-height: 3em;
    overflow: auto;
    margin-bottom: 6px;
  }
  .nexus-file-workflow .nexus-file-job button {
    padding: 7px 10px;
    font-size: 0.8rem;
    flex: 1;
  }
  .nexus-file-workflow .lab-main {
    padding-bottom: calc(
      210px + var(--file-nav, 0px) + env(safe-area-inset-bottom)
    ) !important;
  }
  .nexus-file-workflow .lab-statusbar {
    display: none;
  }
  .nexus-file-workflow .lab-canvas-body,
  .nexus-file-workflow .lab-option-body {
    overflow: visible !important;
    max-height: none !important;
  }
  .nexus-file-workflow .lab-workbench,
  .nexus-file-workflow .lab-main,
  .nexus-file-workflow .lab-layout,
  .nexus-file-workflow .lab-canvas {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  .nexus-file-workflow #previewModal {
    padding: 12px;
    width: 96vw;
    max-width: 96vw;
  }
  .nexus-file-workflow .raster-source-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  .nexus-file-workflow * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
@media print {
  .nexus-file-job,
  .raster-source-list,
  .nexus-file-confirm {
    display: none !important;
  }
}

.nexus-file-workflow .raster-toggle,
.nexus-file-workflow .cyber-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 0.85rem;
  cursor: pointer;
}
.nexus-file-workflow .raster-toggle input,
.nexus-file-workflow .cyber-checkbox-label input {
  height: 24px;
  min-width: 24px;
  accent-color: #59c9f1;
}

@media (max-width: 700px) {
  .nexus-file-workflow .lab-rail {
    bottom: var(--file-keyboard, 0px) !important;
  }
  .nexus-file-workflow .nexus-app-notice {
    bottom: calc(var(--file-keyboard, 0px) + var(--file-nav, 0px) + 170px);
  }
}
@media (max-width: 430px) {
  .nexus-file-workflow .settings-grid {
    grid-template-columns: 1fr !important;
  }
}

.nexus-file-workflow #previewModal button {
  min-height: 44px;
  min-width: 44px;
}
