/* DD Raport — archive tree styles for the ElectroReports orange/red theme. */

/* Prevent the Step 6 full-bleed negative margins from triggering a horizontal
   scrollbar on wide displays. */
html,
body {
  overflow-x: clip;
}

.archive-panel {
  border-radius: 1.25rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(28, 8, 0, 0.85));
  border: 1px solid rgba(249, 115, 22, 0.22);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(249, 115, 22, 0.06);
}

.archive-input-label {
  display: inline-block;
  margin: 0.6rem 0 0.5rem;
  font-weight: 600;
  color: #fde68a;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

#archive-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.archive-dropzone {
  position: relative;
  border: 1.5px dashed rgba(249, 115, 22, 0.45);
  border-radius: 0.9rem;
  padding: 1.6rem 1.1rem;
  text-align: center;
  background: rgba(28, 8, 0, 0.55);
  cursor: pointer;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease, background 0.22s ease;
}

.archive-dropzone:hover {
  transform: translateY(-2px);
  border-color: #F97316;
  background: rgba(249, 115, 22, 0.08);
}

.archive-dropzone:focus-visible {
  outline: 2px solid #F97316;
  outline-offset: 3px;
}

.archive-dropzone.is-drag-over {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25), 0 0 32px rgba(249, 115, 22, 0.35);
  background: rgba(249, 115, 22, 0.12);
}

.dropzone-title {
  margin: 0;
  font-weight: 700;
  color: #fff7ed;
  font-size: 1rem;
}

.dropzone-subtitle {
  margin: 0.35rem 0 0;
  color: #a8a29e;
  font-size: 0.85rem;
}

.archive-status {
  margin: 0.9rem 0 0.4rem;
  color: #fde68a;
  font-size: 0.9rem;
  font-family: 'Fira Code', monospace;
}

.archive-summary {
  margin: 0 0 0.9rem;
  color: #a8a29e;
  font-size: 0.84rem;
}

.archive-search {
  width: 100%;
  margin-top: 0.35rem;
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: 0.7rem;
  background: rgba(17, 4, 0, 0.75);
  color: #fef3c7;
  padding: 0.65rem 0.85rem;
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.archive-search:focus {
  outline: none;
  border-color: #F97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.archive-search::placeholder {
  color: rgba(168, 162, 158, 0.6);
}

.classifier-controls {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.45rem;
}

.classifier-hint {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: rgba(168, 162, 158, 0.95);
  line-height: 1.35;
}

.classify-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: start;
  margin-top: 0.6rem;
  padding: 0.7rem 1.25rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: linear-gradient(90deg, #F97316, #EF4444);
  color: #1a0a00;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 8px 22px rgba(239, 68, 68, 0.28);
}

.classify-btn:hover:not([disabled]) {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.4);
}

.classify-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.cert-extract-workspace {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
  align-items: start;
}

@media (min-width: 960px) {
  .cert-extract-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 1fr);
    gap: 1.25rem;
  }

  .cert-extract-right {
    position: sticky;
    top: 5rem;
  }
}

/* ── Pasul 1 (after upload) / Pasul 2 / Pasul 3 — "Claude-style" full-bleed
   PDF preview. The whole stepper panel breaks out of the page's max-w
   container and spans the viewport. The left becomes a compact sidebar;
   the preview takes the rest at full viewport height. Triggers as soon as
   the archive is loaded (i.e. the workspace is visible). */
@media (min-width: 880px) {
  /* Break the panel out of the parent .max-w-[92rem] container so it spans
     the FULL viewport width — the PDF preview will sit flush against the
     screen's right edge. */
  .dd-stepper-root:has(#dd-workspace:not(.dd-is-hidden))[data-current-step="1"],
  .dd-stepper-root[data-current-step="2"],
  .dd-stepper-root[data-current-step="3"] {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 0.9rem 0 1rem 1.1rem;     /* zero right padding → iframe touches edge */
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  /* Compact the step lane so it doesn't eat vertical space. */
  .dd-stepper-root:has(#dd-workspace:not(.dd-is-hidden))[data-current-step="1"] .dd-stepper.dd-stepper--lane,
  .dd-stepper-root[data-current-step="2"] .dd-stepper.dd-stepper--lane,
  .dd-stepper-root[data-current-step="3"] .dd-stepper.dd-stepper--lane {
    padding: 0.95rem 0.9rem 0.65rem;
    margin-bottom: 0.55rem;
  }
  .dd-stepper-root:has(#dd-workspace:not(.dd-is-hidden))[data-current-step="1"] .dd-step-nav-row,
  .dd-stepper-root[data-current-step="2"] .dd-step-nav-row,
  .dd-stepper-root[data-current-step="3"] .dd-step-nav-row {
    margin-bottom: 0.65rem;
  }

  /* True 50/50 split: left tools take exactly the left half, PDF preview
     takes exactly the right half of the screen. */
  .dd-stepper-root:has(#dd-workspace:not(.dd-is-hidden))[data-current-step="1"] .cert-extract-workspace,
  .dd-stepper-root[data-current-step="2"] .cert-extract-workspace,
  .dd-stepper-root[data-current-step="3"] .cert-extract-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.85rem;
    margin-top: 0.4rem;
  }

  .dd-stepper-root:has(#dd-workspace:not(.dd-is-hidden))[data-current-step="1"] .cert-extract-left,
  .dd-stepper-root[data-current-step="2"] .cert-extract-left,
  .dd-stepper-root[data-current-step="3"] .cert-extract-left {
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    padding-right: 0.35rem;
  }

  /* Preview frame fills the viewport height end-to-end with NO chrome around
     the iframe (no inner padding, no dark box, no border). Just the PDF.
     Right padding is 0 so the iframe sits flush against the screen edge. */
  .dd-stepper-root:has(#dd-workspace:not(.dd-is-hidden))[data-current-step="1"] .cert-extract-right .archive-preview--main,
  .dd-stepper-root[data-current-step="2"] .cert-extract-right .archive-preview--main,
  .dd-stepper-root[data-current-step="3"] .cert-extract-right .archive-preview--main {
    min-height: calc(100vh - 5rem);
    height: calc(100vh - 5rem);
    padding: 0.5rem 0 0.35rem 0.4rem;
    border-right: 0;
    border-radius: 0.7rem 0 0 0.7rem;
  }

  /* Tighten title + hint above the iframe so they take less vertical space. */
  .dd-stepper-root:has(#dd-workspace:not(.dd-is-hidden))[data-current-step="1"] .cert-extract-right .archive-preview--main > h3,
  .dd-stepper-root[data-current-step="2"] .cert-extract-right .archive-preview--main > h3,
  .dd-stepper-root[data-current-step="3"] .cert-extract-right .archive-preview--main > h3 {
    margin: 0 0 0.3rem;
    font-size: 0.85rem;
  }

  .dd-stepper-root:has(#dd-workspace:not(.dd-is-hidden))[data-current-step="1"] .cert-extract-right .archive-preview-hint,
  .dd-stepper-root[data-current-step="2"] .cert-extract-right .archive-preview-hint,
  .dd-stepper-root[data-current-step="3"] .cert-extract-right .archive-preview-hint {
    display: none;
  }

  /* Strip the dark inner frame so the iframe sits edge-to-edge in the panel. */
  .dd-stepper-root:has(#dd-workspace:not(.dd-is-hidden))[data-current-step="1"] .cert-extract-right .preview-content,
  .dd-stepper-root[data-current-step="2"] .cert-extract-right .preview-content,
  .dd-stepper-root[data-current-step="3"] .cert-extract-right .preview-content {
    min-height: 0;
    height: 100%;
    flex: 1 1 auto;
    padding: 0;
    border: 0;
    border-radius: 0.55rem;
    background: transparent;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .dd-stepper-root:has(#dd-workspace:not(.dd-is-hidden))[data-current-step="1"] .cert-extract-right .preview-content iframe,
  .dd-stepper-root[data-current-step="2"] .cert-extract-right .preview-content iframe,
  .dd-stepper-root[data-current-step="3"] .cert-extract-right .preview-content iframe {
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    min-height: calc(100vh - 7.5rem);
    border-radius: 0.55rem 0 0 0.55rem;
  }

  .dd-stepper-root:has(#dd-workspace:not(.dd-is-hidden))[data-current-step="1"] .cert-extract-right .preview-content img,
  .dd-stepper-root[data-current-step="2"] .cert-extract-right .preview-content img,
  .dd-stepper-root[data-current-step="3"] .cert-extract-right .preview-content img {
    max-height: calc(100vh - 8rem);
  }
}

.cert-extract-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.cu-session-panel {
  padding: 1rem 1.1rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(249, 115, 22, 0.22);
  background: rgba(10, 3, 0, 0.45);
}

.cu-session-title {
  margin: 0 0 0.35rem;
  font-family: 'Fira Code', monospace;
  font-size: 1rem;
  color: #fef3c7;
}

.cu-session-hint {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: #a8a29e;
  line-height: 1.45;
}

.cu-cert-list {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cu-cert-item {
  display: inline-flex;
  align-items: stretch;
  border-radius: 0.55rem;
  border: 1px solid rgba(249, 115, 22, 0.28);
  background: rgba(17, 4, 0, 0.65);
  overflow: hidden;
}

.cu-cert-item.is-active {
  border-color: #f97316;
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.35);
}

.cu-cert-select {
  border: 0;
  background: transparent;
  color: #fde68a;
  font-family: 'Fira Code', monospace;
  font-size: 0.78rem;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  max-width: 14rem;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cu-cert-item.is-active .cu-cert-select {
  color: #fff;
  background: rgba(249, 115, 22, 0.15);
}

.cu-cert-remove {
  border: 0;
  border-left: 1px solid rgba(249, 115, 22, 0.22);
  background: rgba(0, 0, 0, 0.25);
  color: #fca5a5;
  width: 2rem;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cu-cert-remove:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fff;
}

.cu-cert-add-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  flex-wrap: wrap;
}

.cu-add-pdf-select {
  flex: 1;
  min-width: 12rem;
}

.cu-add-cert-btn {
  border: 1px solid rgba(249, 115, 22, 0.45);
  background: rgba(249, 115, 22, 0.12);
  color: #fde68a;
  padding: 0.55rem 1rem;
  border-radius: 0.65rem;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.cu-add-cert-btn:hover:not([disabled]) {
  background: rgba(249, 115, 22, 0.22);
  color: #fff;
}

.cu-add-cert-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.archive-files-panel {
  padding-top: 0.25rem;
}

.archive-files-title {
  margin: 0 0 0.5rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.95rem;
  color: #fef3c7;
}

.cert-extract-right .archive-preview--main {
  min-height: min(75vh, 52rem);
}

.archive-preview-hint {
  margin: -0.35rem 0 0.65rem;
  font-size: 0.78rem;
  color: #a8a29e;
  line-height: 1.35;
}

.cert-extract-right .preview-content {
  min-height: min(65vh, 44rem);
}

.cert-extract-right .preview-content iframe {
  min-height: min(62vh, 40rem);
}

/* Larger PDF preview on Pasul 2 and Pasul 3. */
.dd-stepper-root[data-current-step="2"] .cert-extract-right .archive-preview--main,
.dd-stepper-root[data-current-step="3"] .cert-extract-right .archive-preview--main {
  min-height: min(88vh, 64rem);
}

/* Step 2 focuses on CU analysis + preview; hide the archive file list there. */
.dd-stepper-root[data-current-step="2"] .archive-files-panel {
  display: none;
}

.dd-stepper-root[data-current-step="2"] .cert-extract-right .preview-content,
.dd-stepper-root[data-current-step="3"] .cert-extract-right .preview-content {
  min-height: min(80vh, 56rem);
}

.dd-stepper-root[data-current-step="2"] .cert-extract-right .preview-content iframe,
.dd-stepper-root[data-current-step="3"] .cert-extract-right .preview-content iframe {
  min-height: min(78vh, 54rem);
}

.dd-stepper-root[data-current-step="2"] .cert-extract-right .preview-content img,
.dd-stepper-root[data-current-step="3"] .cert-extract-right .preview-content img {
  max-height: min(76vh, 52rem);
}

.archive-tree {
  border: 1px solid rgba(249, 115, 22, 0.22);
  border-radius: 0.9rem;
  background: rgba(17, 4, 0, 0.65);
  padding: 0.95rem 1.05rem;
  max-height: 30rem;
  overflow: auto;
  font-family: 'Fira Code', monospace;
}

.archive-tree ul {
  list-style: none;
  margin: 0;
  padding-left: 1rem;
}

.archive-tree > ul {
  padding-left: 0;
}

.archive-tree li,
.archive-tree summary {
  color: #fef3c7;
  font-size: 0.82rem;
  line-height: 1.75;
}

.archive-tree details {
  margin: 0.05rem 0;
}

.archive-tree summary {
  cursor: pointer;
  list-style: none;
  padding: 0.1rem 0.25rem;
  border-radius: 0.35rem;
  transition: background 0.15s ease;
}

.archive-tree summary::-webkit-details-marker {
  display: none;
}

.archive-tree summary:hover {
  background: rgba(249, 115, 22, 0.08);
}

.archive-tree .tree-folder::before {
  content: "📁 ";
}

.archive-tree details[open] > summary.tree-folder::before {
  content: "📂 ";
}

.archive-tree .tree-file::before {
  content: "📄 ";
}

.archive-tree .tree-file-button {
  border: 0;
  background: transparent;
  color: #fef3c7;
  font: inherit;
  padding: 0.05rem 0.25rem;
  margin-left: -0.25rem;
  cursor: pointer;
  text-align: left;
  border-radius: 0.3rem;
  transition: color 0.15s ease, background 0.15s ease;
}

.archive-tree .tree-file-button:hover {
  color: #ffffff;
  background: rgba(249, 115, 22, 0.1);
}

.archive-tree .tree-file-button:focus-visible {
  outline: 2px solid #F97316;
  outline-offset: 1px;
}

.archive-tree .tree-file-button.active {
  color: #F97316;
  background: rgba(249, 115, 22, 0.14);
}

.archive-tree .tree-class-label {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.08rem 0.45rem;
  border-radius: 0.45rem;
  font-size: 0.7rem;
  font-family: 'Fira Code', monospace;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #d6d3d1;
  background: rgba(255, 255, 255, 0.06);
}

.archive-tree .tree-class-label.success {
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
}

.archive-tree .tree-class-label.error {
  border-color: rgba(248, 113, 113, 0.4);
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.14);
}

.archive-tree .tree-class-label.pending {
  border-color: rgba(250, 204, 21, 0.4);
  color: #fde68a;
  background: rgba(250, 204, 21, 0.12);
}

.archive-tree .tree-empty {
  color: #a8a29e;
  font-style: italic;
  margin: 0.5rem 0;
}

.archive-preview {
  border-radius: 0.9rem;
  border: 1px solid rgba(249, 115, 22, 0.22);
  background: rgba(17, 4, 0, 0.65);
  padding: 1rem 1.1rem;
  min-height: 30rem;
  display: flex;
  flex-direction: column;
}

.archive-preview h3 {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
  color: #fef3c7;
  font-family: 'Fira Code', monospace;
  word-break: break-all;
}

.preview-content {
  border: 1px solid rgba(249, 115, 22, 0.14);
  border-radius: 0.7rem;
  background: rgba(10, 3, 0, 0.6);
  padding: 0.85rem;
  min-height: 24rem;
  overflow: auto;
  flex: 1;
}

.preview-content pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #fef3c7;
  font-size: 0.8rem;
  line-height: 1.6;
  font-family: 'Fira Code', monospace;
}

.preview-content iframe,
.preview-content img {
  width: 100%;
  border: 0;
  border-radius: 0.55rem;
}

.preview-content iframe {
  min-height: 560px;
}

.preview-content img {
  object-fit: contain;
  max-height: 32rem;
}

.preview-hint {
  color: #a8a29e;
  font-size: 0.82rem;
  margin: 0.25rem 0;
}

/* ── 2.3 / 2.4 Certificat de Urbanism analysis panel ───────────────────── */
.cu-panel {
  margin-top: 1.1rem;
  padding: 1.1rem 1.2rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(249, 115, 22, 0.22);
  background: rgba(10, 3, 0, 0.55);
}

.cu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}

.cu-header h3 {
  margin: 0;
  color: #fef3c7;
  font-family: 'Fira Code', monospace;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.cu-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.cu-preview-btn {
  border: 1px solid rgba(249, 115, 22, 0.45);
  background: transparent;
  color: #fde68a;
  padding: 0.4rem 0.85rem;
  border-radius: 0.55rem;
  font-size: 0.8rem;
  font-family: 'Fira Code', monospace;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.cu-preview-btn:hover {
  background: rgba(249, 115, 22, 0.14);
  color: #ffffff;
  border-color: #F97316;
}

.cu-status {
  margin: 0 0 0.35rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.55rem;
  font-size: 0.88rem;
  font-family: 'Fira Code', monospace;
  line-height: 1.45;
}

.cu-status-pending {
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.25);
  color: #fde68a;
}

.cu-status-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.cu-status-warn {
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.35);
  color: #fdba74;
}

.cu-status-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.cu-info {
  margin: 0.35rem 0 0.7rem;
  color: #d6d3d1;
  font-size: 0.85rem;
  word-break: break-all;
}

.cu-info code {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.08rem 0.35rem;
  border-radius: 0.3rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.82rem;
  color: #fde68a;
}

.cu-preview-wrap {
  margin: 0.55rem 0 0.85rem;
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 0.7rem;
  overflow: hidden;
  background: #0b0300;
}

.cu-preview-iframe {
  width: 100%;
  min-height: 420px;
  border: 0;
  display: block;
}

.is-hidden {
  display: none !important;
}

.cu-avize-wrap {
  margin-top: 0.9rem;
}

.cu-avize-header h4 {
  margin: 0 0 0.2rem;
  color: #fef3c7;
  font-family: 'Fira Code', monospace;
  font-size: 0.95rem;
}

.cu-avize-hint {
  margin: 0 0 0.7rem;
  color: #a8a29e;
  font-size: 0.82rem;
}

.cu-ai-list {
  list-style: none;
  margin: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 0.7rem;
  background: rgba(17, 4, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: #fef3c7;
}

.cu-ai-list li {
  position: relative;
  padding: 0.25rem 0.4rem 0.25rem 1.25rem;
  border-radius: 0.35rem;
  background: rgba(249, 115, 22, 0.06);
  line-height: 1.35;
}

.cu-ai-list li::before {
  content: "•";
  position: absolute;
  left: 0.45rem;
  top: 0.18rem;
  color: #fdba74;
  font-weight: 700;
}

.cu-ai-list-empty {
  color: #d6d3d1;
  font-style: italic;
  background: transparent;
  padding-left: 0.4rem;
}

.cu-ai-list-empty::before {
  content: none;
}

.cu-table-scroller {
  overflow-x: auto;
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 0.75rem;
}

.cu-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  font-family: 'Fira Sans', system-ui, sans-serif;
  color: #fef3c7;
  background: rgba(17, 4, 0, 0.4);
}

.cu-table thead th {
  background: rgba(249, 115, 22, 0.14);
  color: #fde68a;
  text-align: left;
  font-weight: 600;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid rgba(249, 115, 22, 0.3);
  font-family: 'Fira Code', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cu-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

.cu-aviz-row:hover {
  background: rgba(249, 115, 22, 0.05);
}

.cu-table .cu-col-index {
  width: 2.2rem;
  text-align: center;
  color: #a8a29e;
  font-family: 'Fira Code', monospace;
}

.cu-table .cu-col-tip {
  min-width: 14rem;
  color: #fff7ed;
  font-weight: 500;
}

.cu-table .cu-col-emitent {
  min-width: 11rem;
  color: #d6d3d1;
}

.cu-table .cu-col-date,
.cu-table .cu-col-val {
  white-space: nowrap;
  color: #fde68a;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
}

.cu-table .cu-col-action {
  white-space: nowrap;
  width: 12rem;
}

.cu-table .cu-col-validate {
  width: 5.5rem;
  text-align: center;
  white-space: nowrap;
}

.cu-table .cu-col-delete {
  width: 4rem;
  text-align: center;
  white-space: nowrap;
}

/* When `CU_SHOW_SUGESTII_COLUMN` is false, cu-analyzer.js adds this class. */
.cu-avize-wrap.cu-suggestii-column-hidden th.cu-col-action {
  display: none;
}

/* ── Editable cells (Tip / Emitent / Data / Valabilitate) ───────────────── */
.cu-editable {
  display: block;
  min-height: 1.25rem;
  border-radius: 0.4rem;
  padding: 0.18rem 0.4rem;
  margin: -0.18rem -0.4rem;
  outline: none;
  cursor: text;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  white-space: pre-wrap;
  word-break: break-word;
}

.cu-editable:hover {
  background: rgba(249, 115, 22, 0.06);
}

.cu-editable:focus {
  background: rgba(249, 115, 22, 0.1);
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.45);
}

.cu-editable:empty::before {
  content: attr(data-placeholder);
  color: rgba(168, 162, 158, 0.55);
  font-style: italic;
  pointer-events: none;
}

/* ── Validate column (custom checkbox) ──────────────────────────────────── */
.cu-validate-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.cu-validate-checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.cu-validate-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 0.4rem;
  border: 1.5px solid rgba(249, 115, 22, 0.5);
  background: rgba(17, 4, 0, 0.6);
  color: transparent;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.cu-validate-tick svg {
  width: 0.95rem;
  height: 0.95rem;
}

.cu-validate-label:hover .cu-validate-tick {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.14);
}

.cu-validate-checkbox:focus-visible + .cu-validate-tick {
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.35);
}

.cu-validate-checkbox:checked + .cu-validate-tick {
  background: linear-gradient(135deg, #84cc16, #22c55e);
  border-color: #65a30d;
  color: #0b1f00;
  box-shadow: 0 0 12px rgba(132, 204, 22, 0.45);
}

.cu-aviz-row--validated {
  background: rgba(34, 197, 94, 0.06);
}

.cu-aviz-row--validated .cu-col-tip,
.cu-aviz-row--validated .cu-col-emitent {
  color: #d9f99d;
}

/* ── Delete row button ──────────────────────────────────────────────────── */
.cu-row-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.cu-row-delete svg {
  width: 1rem;
  height: 1rem;
}

.cu-row-delete:hover {
  background: rgba(239, 68, 68, 0.22);
  color: #fff;
  border-color: #ef4444;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.25);
}

.cu-row-delete:focus-visible {
  outline: 2px solid #ef4444;
  outline-offset: 2px;
}

/* ── Toolbar below the avize table (validation summary chip) ────────────── */
.cu-table-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem 1rem;
  margin-top: 0.7rem;
}

/* ── "Validează toate" toggle button ────────────────────────────────────── */
.cu-validate-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(132, 204, 22, 0.45);
  background: rgba(132, 204, 22, 0.08);
  color: #d9f99d;
  padding: 0.45rem 0.9rem;
  border-radius: 0.55rem;
  font-weight: 600;
  font-size: 0.82rem;
  font-family: 'Fira Sans', system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.cu-validate-all-btn svg {
  width: 0.95rem;
  height: 0.95rem;
}

.cu-validate-all-btn:hover:not(:disabled) {
  background: rgba(132, 204, 22, 0.18);
  color: #f7fee7;
  border-color: #84cc16;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(132, 204, 22, 0.25);
}

.cu-validate-all-btn:focus-visible {
  outline: 2px solid #84cc16;
  outline-offset: 2px;
}

.cu-validate-all-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cu-validate-all-btn.is-active {
  background: linear-gradient(135deg, #84cc16, #22c55e);
  border-color: #65a30d;
  color: #0b1f00;
  box-shadow: 0 0 14px rgba(132, 204, 22, 0.4);
}

.cu-validate-all-btn.is-active:hover:not(:disabled) {
  background: linear-gradient(135deg, #a3e635, #4ade80);
  color: #0b1f00;
}

/* ── "+ Adaugă document" row: full-width add CTA inside the table ──────── */
.cu-add-row td {
  padding: 0;
  border-bottom: 0;
  background: rgba(132, 204, 22, 0.04);
}

.cu-add-row-cell {
  text-align: center;
}

.cu-add-aviz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  border: 1px dashed rgba(132, 204, 22, 0.45);
  border-radius: 0;
  background: transparent;
  color: #bef264;
  padding: 0.7rem 1rem;
  font-weight: 600;
  font-size: 0.88rem;
  font-family: 'Fira Sans', system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.cu-add-aviz-btn svg {
  width: 1.05rem;
  height: 1.05rem;
}

.cu-add-aviz-btn:hover {
  background: rgba(132, 204, 22, 0.12);
  color: #f7fee7;
  border-color: #84cc16;
  border-style: solid;
}

.cu-add-aviz-btn:focus-visible {
  outline: 2px solid #84cc16;
  outline-offset: -2px;
}

/* No hover orange tint on the add row. */
.cu-add-row:hover td {
  background: rgba(132, 204, 22, 0.08);
}

.cu-validate-summary {
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  color: #fde68a;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.28);
  border-radius: 0.45rem;
  padding: 0.25rem 0.65rem;
}

.cu-validate-summary:empty {
  display: none;
}

.cu-table-empty {
  text-align: center;
  color: #a8a29e;
  font-style: italic;
  padding: 1.2rem !important;
}

.cu-suggest-toggle {
  border: 1px solid rgba(249, 115, 22, 0.4);
  background: rgba(249, 115, 22, 0.08);
  color: #fde68a;
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.78rem;
  font-family: 'Fira Code', monospace;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.cu-suggest-toggle:hover {
  background: rgba(249, 115, 22, 0.18);
  color: #ffffff;
}

.cu-suggest-row {
  background: rgba(6, 2, 0, 0.6);
}

.cu-suggest-cell {
  padding: 0.85rem 1rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cu-suggest-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.cu-suggest-item {
  display: grid;
  grid-template-columns: 2.3rem minmax(0, 1fr) 4.5rem auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(249, 115, 22, 0.14);
  border-radius: 0.55rem;
  background: rgba(17, 4, 0, 0.5);
}

.cu-suggest-rank {
  font-family: 'Fira Code', monospace;
  font-weight: 700;
  color: #F97316;
  text-align: center;
}

.cu-suggest-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.cu-suggest-name {
  color: #fff7ed;
  font-weight: 500;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cu-suggest-path {
  color: #a8a29e;
  font-size: 0.74rem;
  font-family: 'Fira Code', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cu-suggest-class {
  display: inline-block;
  margin-top: 0.2rem;
  align-self: flex-start;
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  color: #fde68a;
  background: rgba(249, 115, 22, 0.18);
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 0.35rem;
  padding: 0.1rem 0.45rem;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cu-suggest-score {
  text-align: center;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  color: #86efac;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 0.35rem;
  padding: 0.15rem 0.4rem;
}

.cu-suggest-preview {
  border: 1px solid rgba(249, 115, 22, 0.45);
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.9), rgba(239, 68, 68, 0.9));
  color: #1a0a00;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cu-suggest-preview:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(239, 68, 68, 0.3);
}

.cu-suggest-empty {
  margin: 0.25rem 0;
  color: #a8a29e;
  font-style: italic;
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .cu-suggest-item {
    grid-template-columns: 2rem minmax(0, 1fr);
    grid-template-rows: auto auto;
  }
  .cu-suggest-score,
  .cu-suggest-preview {
    grid-column: 2;
    justify-self: start;
  }
}

/* ── DD Raport stepper (9 steps) — capsule-rail design ─────────────────── */

.dd-is-hidden {
  display: none !important;
}

/* Outer panel — soft, dark "coffee" surface like the reference image. */
.dd-stepper.dd-stepper--lane {
  margin: 0 0 0.85rem;
  padding: 1.6rem 1.1rem 1.2rem;
  border-radius: 1.1rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 255, 255, 0.04), transparent 70%),
    linear-gradient(180deg, #2b1a12 0%, #1c0f08 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 24px rgba(0, 0, 0, 0.35);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dd-lane-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  min-width: min(100%, 72rem);
  margin: 0 auto;
  padding: 0 0.4rem 0.2rem;
  position: relative;
}

.dd-lane-step {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

/* Connector between steps. Default = invisible. When .is-done = white pill rail. */
.dd-lane-seg {
  flex: 1 1 0;
  min-width: 0.5rem;
  max-width: 5.25rem;
  align-self: flex-start;
  height: 1.05rem;
  margin-top: 0.45rem;          /* aligns rail center with dot center */
  border-radius: 999px;
  background: transparent;
  position: relative;
  z-index: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, margin 0.3s ease;
}

.dd-lane-seg.is-done {
  background: linear-gradient(180deg, #ffffff 0%, #f3f4f6 100%);
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.45),
    0 0 6px rgba(255, 255, 255, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08);
  /* Pull into the white halo of adjacent .is-done dots so the rail looks continuous. */
  margin-left: -0.55rem;
  margin-right: -0.55rem;
}

.dd-lane-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  width: 6rem;
  max-width: 22vw;
  padding: 0 0.15rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: opacity 0.2s ease, transform 0.2s ease;
  position: relative;
  z-index: 2;
}

.dd-lane-node:not(.is-view) { opacity: 0.85; }
.dd-lane-node.is-view { opacity: 1; }
.dd-lane-node:hover { opacity: 1; }

.dd-lane-node:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 4px;
  border-radius: 0.6rem;
}

/* ── The dot ── */
.dd-lane-dot {
  position: relative;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: rgba(28, 8, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
  z-index: 2;
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* White halo behind each dot — invisible by default; visible for .is-done so it
   merges seamlessly with the .is-done segments and forms one continuous capsule. */
.dd-lane-dot::before {
  content: "";
  position: absolute;
  inset: -0.55rem;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  z-index: -1;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* DONE — green glowing dot inside a continuous white rail capsule. */
.dd-lane-node.is-done .dd-lane-dot {
  background: radial-gradient(circle at 32% 28%, #ecfccb 0%, #a3e635 45%, #65a30d 92%);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 18px rgba(132, 204, 22, 0.55),
    0 0 6px rgba(190, 242, 100, 0.6),
    inset 0 -2px 3px rgba(0, 0, 0, 0.18),
    inset 0 1px 1px rgba(255, 255, 255, 0.55);
}

.dd-lane-node.is-done .dd-lane-dot::before {
  background: linear-gradient(180deg, #ffffff 0%, #f3f4f6 100%);
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.45),
    0 0 6px rgba(255, 255, 255, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* CURRENT — plain white-ish glowing disk, sitting OUTSIDE the rail. */
.dd-lane-node.is-current .dd-lane-dot {
  background: radial-gradient(circle at 32% 28%, #ffffff 0%, #f5f5f4 60%, #d6d3d1 100%);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 22px rgba(255, 255, 255, 0.55),
    0 0 8px rgba(255, 255, 255, 0.85),
    inset 0 -2px 3px rgba(0, 0, 0, 0.12);
}

/* FUTURE (not done, not current) — quiet outlined ring. */
.dd-lane-node:not(.is-done):not(.is-current) .dd-lane-dot {
  background: rgba(28, 8, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 8px rgba(255, 255, 255, 0.08);
}

/* ── Labels under the dot ── */
.dd-lane-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-top: 0.15rem;
}

@media (min-width: 900px) {
  .dd-lane-title { font-size: 0.86rem; }
}

.dd-lane-sub {
  font-size: 0.66rem;
  font-weight: 500;
  color: #a8a29e;
  text-align: center;
  line-height: 1.3;
  max-width: 5.6rem;
}

.dd-lane-node.is-view .dd-lane-sub { color: #d6d3d1; }

.dd-step-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1.1rem;
  padding: 0 0.15rem;
}

.dd-step-nav-btn {
  border: 1px solid rgba(249, 115, 22, 0.45);
  background: rgba(17, 4, 0, 0.55);
  color: #fde68a;
  padding: 0.5rem 1.15rem;
  border-radius: 0.65rem;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.dd-step-nav-btn:hover:not(:disabled) {
  background: rgba(249, 115, 22, 0.18);
  color: #fff;
}

.dd-step-nav-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.dd-step-nav-btn--primary {
  border: none;
  color: #1a0a00;
  background: linear-gradient(90deg, #bef264, #84cc16);
  box-shadow: 0 4px 18px rgba(132, 204, 22, 0.35);
}

.dd-step-nav-btn--primary:hover:not(:disabled) {
  background: linear-gradient(90deg, #d9f99d, #a3e635);
  color: #1a0a00;
}

.dd-step1-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(249, 115, 22, 0.28);
  background: rgba(17, 4, 0, 0.55);
  margin-bottom: 0.35rem;
}

.dd-step1-summary-label {
  font-size: 0.85rem;
  color: #a8a29e;
}

.dd-step1-summary-name {
  font-family: "Fira Code", monospace;
  font-size: 0.88rem;
  color: #fde68a;
}

.dd-change-archive-btn {
  margin-left: auto;
  border: 1px solid rgba(249, 115, 22, 0.45);
  background: rgba(249, 115, 22, 0.12);
  color: #fde68a;
  padding: 0.45rem 0.85rem;
  border-radius: 0.55rem;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.dd-change-archive-btn:hover {
  background: rgba(249, 115, 22, 0.22);
  color: #fff;
}

.dd-extract-avize-block {
  padding: 0.85rem 1rem 1rem;
  margin: 0 0 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(239, 68, 68, 0.28);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(28, 8, 0, 0.4));
}

.dd-extract-hint {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: #d6d3d1;
  line-height: 1.45;
}

.dd-extract-avize-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: none;
  border-radius: 0.75rem;
  padding: 0.65rem 1.35rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  color: #1a0a00;
  background: linear-gradient(90deg, #ef4444 0%, #f97316 100%);
  box-shadow: 0 8px 22px rgba(239, 68, 68, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.dd-extract-avize-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.4);
}

.dd-extract-avize-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.dd-steps-future {
  margin-top: 1.25rem;
  padding: 1.25rem 1.1rem;
  border-radius: 1rem;
  border: 1px dashed rgba(249, 115, 22, 0.35);
  background: rgba(10, 3, 0, 0.35);
}

.dd-placeholder-panel {
  display: none;
  max-width: 40rem;
}

.dd-placeholder-panel[data-step-panel="6"] {
  max-width: none;
}

.dd-placeholder-panel.is-active {
  display: block;
  animation: dd-fade-in 0.25s ease;
}

@keyframes dd-fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dd-placeholder-badge {
  display: inline-block;
  font-family: "Fira Code", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.45);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}

.dd-placeholder-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: #fff7ed;
}

.dd-placeholder-body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #a8a29e;
}

.dd-step6-status {
  margin: 0.9rem 0 0;
  color: #fde68a;
  font-family: "Fira Code", monospace;
  font-size: 0.8rem;
}

.dd-step6-grid {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr) minmax(0, 2.6fr);
  gap: 0.75rem;
  align-items: stretch;
}

.dd-step6-card {
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: 0.8rem;
  background: rgba(17, 4, 0, 0.45);
  padding: 0.75rem 0.85rem;
  min-height: 10rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dd-step6-card-title {
  margin: 0;
  font-size: 0.88rem;
  color: #fff7ed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dd-step6-count {
  font-family: "Fira Code", monospace;
  font-size: 0.74rem;
  color: #fde68a;
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

.dd-step6-list {
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  grid-auto-rows: max-content;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.dd-step6-item {
  border: 1px solid rgba(249, 115, 22, 0.18);
  border-radius: 0.55rem;
  background: rgba(28, 8, 0, 0.55);
  padding: 0.45rem 0.55rem;
}

.dd-step6-item-cu,
.dd-step6-item-meta-doc {
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.dd-step6-item-cu:hover,
.dd-step6-item-cu:focus-visible,
.dd-step6-item-meta-doc:hover,
.dd-step6-item-meta-doc:focus-visible {
  border-color: rgba(249, 115, 22, 0.6);
  background: rgba(28, 8, 0, 0.75);
  outline: none;
  transform: translateY(-1px);
}

.dd-step6-item-cu.is-active,
.dd-step6-item-meta-doc.is-active {
  border-color: rgba(251, 191, 36, 0.75);
  background: rgba(120, 53, 15, 0.42);
}

.dd-step6-item-title {
  display: block;
  color: #fef3c7;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.dd-step6-item-meta {
  display: block;
  margin-top: 0.2rem;
  color: #a8a29e;
  font-size: 0.75rem;
  line-height: 1.35;
  word-break: break-word;
}

.dd-step6-empty {
  color: #a8a29e;
  font-size: 0.82rem;
  font-style: italic;
}

.dd-step6-card-preview {
  min-height: min(82vh, 56rem);
}

.dd-step6-preview-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.dd-step6-preview-title {
  margin: 0;
}

.dd-step6-preview-meta {
  font-family: "Fira Code", monospace;
  font-size: 0.72rem;
  color: rgba(168, 162, 158, 0.85);
  word-break: break-all;
  max-width: 100%;
}

.dd-step6-preview-content {
  margin-top: 0.6rem;
  border: 1px solid rgba(249, 115, 22, 0.18);
  border-radius: 0.6rem;
  background: rgba(2, 10, 13, 0.8);
  padding: 0.6rem;
  flex: 1 1 auto;
  min-height: min(76vh, 50rem);
  max-height: none;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.dd-step6-preview-content > .dd-step6-empty {
  margin: auto;
  text-align: center;
}

.dd-step6-preview-content pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #fef3c7;
  font-size: 0.78rem;
  line-height: 1.55;
  font-family: "Fira Code", monospace;
}

.dd-step6-preview-content iframe,
.dd-step6-preview-content img {
  width: 100%;
  border: 0;
  border-radius: 0.5rem;
}

.dd-step6-preview-content iframe {
  flex: 1 1 auto;
  min-height: min(74vh, 48rem);
}

.dd-step6-preview-content img {
  object-fit: contain;
  max-height: min(72vh, 46rem);
}

.dd-step6-preview-hint {
  color: #a8a29e;
  font-size: 0.8rem;
  margin: 0.25rem 0;
}

/* On Step 6 view: aggregated panel goes first, archive tree goes below.
   The negative margins break out of the 92rem container and let the panel
   stretch to the full viewport width (with a 1.25rem gutter on each side). */
.dd-stepper-root[data-current-step="6"] {
  display: flex;
  flex-direction: column;
  margin-left: min(0px, calc(50% - 50vw + 1.25rem));
  margin-right: min(0px, calc(50% - 50vw + 1.25rem));
}

.dd-stepper-root[data-current-step="6"] > #dd-steps-future {
  order: 1;
  margin-top: 0.5rem;
}

.dd-stepper-root[data-current-step="6"] > #dd-workspace {
  order: 2;
  margin-top: 1.25rem;
}

@media (max-width: 1100px) {
  .dd-step6-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  }
  .dd-step6-card-preview {
    grid-column: 1 / -1;
    min-height: min(70vh, 44rem);
  }
}

@media (max-width: 720px) {
  .dd-step6-grid {
    grid-template-columns: 1fr;
  }
  .dd-step6-card-preview {
    grid-column: auto;
    min-height: min(60vh, 36rem);
  }
}

/* ── Step 4 — Clasificare documente din arhivă ───────────────────────── */

/* On Step 4 we only want the file list + classification labels.
   Hide the CU avize/extraction panel, the cert-in-session list, and the
   preview pane; collapse the workspace to a single full-width column. */
.dd-workspace.dd-cu-collapsed .cu-panel,
.dd-workspace.dd-cu-collapsed .cu-session-panel,
.dd-workspace.dd-cu-collapsed .cert-extract-right {
  display: none;
}

.dd-workspace.dd-cu-collapsed.cert-extract-workspace {
  grid-template-columns: minmax(0, 1fr);
}

.dd-workspace.dd-cu-collapsed .cert-extract-left {
  width: 100%;
}

.dd-workspace.dd-cu-collapsed .archive-files-panel {
  width: 100%;
  max-width: none;
}

.dd-step4-zone {
  margin: 1.25rem 0 1.25rem;
  padding: 1.5rem 1.5rem 1.25rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(249, 115, 22, 0.3);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(239, 68, 68, 0.18) 0%, transparent 55%),
    radial-gradient(140% 140% at 100% 100%, rgba(249, 115, 22, 0.16) 0%, transparent 60%),
    rgba(28, 8, 0, 0.7);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  animation: dd-fade-in 0.25s ease;
}

.dd-step4-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.dd-step4-hero-text {
  flex: 1 1 22rem;
  min-width: 0;
}

.dd-step4-title {
  margin: 0.45rem 0 0.4rem;
  font-size: 1.45rem;
  color: #fff7ed;
  letter-spacing: -0.01em;
}

.dd-step4-subtitle {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #d6d3d1;
  max-width: 44rem;
}

.dd-step4-zone .dd-mono {
  font-family: "Fira Code", monospace;
  color: #fb923c;
  font-size: 0.85em;
  background: rgba(249, 115, 22, 0.1);
  padding: 0.1rem 0.35rem;
  border-radius: 0.3rem;
}

.dd-step4-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: none;
  border-radius: 1rem;
  padding: 0.95rem 1.6rem;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.005em;
  cursor: pointer;
  color: #1a0a00;
  background: linear-gradient(95deg, #ef4444 0%, #f97316 50%, #fb923c 100%);
  box-shadow:
    0 12px 28px rgba(239, 68, 68, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, filter 0.18s ease;
  white-space: nowrap;
}

.dd-step4-cta svg {
  width: 1.15rem;
  height: 1.15rem;
}

.dd-step4-cta:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow:
    0 18px 36px rgba(239, 68, 68, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.dd-step4-cta:focus-visible {
  outline: 2px solid #fde68a;
  outline-offset: 3px;
}

.dd-step4-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: grayscale(0.2);
}

.dd-step4-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.dd-step4-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dd-step4-refresh:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(79, 70, 229, 0.6);
  color: #1e1b4b;
}

.dd-step4-refresh input[type="checkbox"] {
  margin: 0;
  accent-color: #4f46e5;
  cursor: pointer;
}

.dd-step4-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin: 1rem 0 0;
}

.dd-step4-progress .cu-status {
  margin: 0;
  flex: 1 1 16rem;
}

.dd-classify-summary {
  font-family: "Fira Code", monospace;
  font-size: 0.82rem;
  color: #fde68a;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.28);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  min-width: 4rem;
  text-align: center;
}

.dd-classify-summary:empty {
  display: none;
}

.dd-classify-results {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  max-height: 26rem;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}

.dd-classify-results:empty {
  display: none;
}

.dd-classify-result-row {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) auto;
  grid-template-areas:
    "name class"
    "path class";
  align-items: start;
  gap: 0.15rem 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(249, 115, 22, 0.18);
  background: rgba(28, 8, 0, 0.55);
  font-size: 0.85rem;
  transition: background 0.2s ease, border-color 0.2s ease;
  min-width: 0;
}

.dd-classify-result-name {
  grid-area: name;
  color: #fef3c7;
  font-weight: 600;
  word-break: break-word;
}

.dd-classify-result-path {
  grid-area: path;
  font-family: "Fira Code", monospace;
  font-size: 0.72rem;
  color: rgba(168, 162, 158, 0.85);
  word-break: break-all;
  min-width: 0;
}

.dd-classify-result-label {
  grid-area: class;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.dd-classify-result-class-wrap {
  grid-area: class;
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 0.35rem;
  min-width: 0;
}

.dd-classify-result-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 1.6rem 0.25rem 0.6rem;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 0.85rem) 50%,
    calc(100% - 0.55rem) 50%;
  background-size: 0.32rem 0.32rem, 0.32rem 0.32rem;
  background-repeat: no-repeat;
}

.dd-classify-result-select:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.dd-classify-result-select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.dd-classify-result-select option {
  color: #1f1144;
  background: #fef3c7;
  font-weight: 600;
}

.dd-classify-result-row .dd-classify-result-select { display: none; }
#dd-mentiuni-results .dd-classify-result-row--success .dd-classify-result-select { display: inline-flex; }
#dd-mentiuni-results .dd-classify-result-row--success .dd-classify-result-label { display: none; }

#dd-mentiuni-results .dd-classify-result-row--success .dd-classify-result-select {
  color: #bbf7d0;
  background-color: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.5);
}

.dd-classify-result-row--manual.dd-classify-result-row--success .dd-classify-result-select {
  color: #ccfbf1;
  background-color: rgba(20, 184, 166, 0.26);
  border-color: rgba(45, 212, 191, 0.6);
}

.dd-classify-result-row--manual {
  border-color: rgba(45, 212, 191, 0.65);
  background: rgba(13, 148, 136, 0.14);
  box-shadow: inset 3px 0 0 #2dd4bf;
}

.dd-classify-result-manual-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ccfbf1;
  background: rgba(20, 184, 166, 0.26);
  border: 1px solid rgba(45, 212, 191, 0.6);
  border-radius: 0.4rem;
  padding: 0.06rem 0.35rem;
}

.dd-classify-result-row--pending .dd-classify-result-label {
  color: #fde68a;
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(249, 115, 22, 0.32);
}

.dd-classify-result-row--success {
  border-color: rgba(34, 197, 94, 0.45);
}

.dd-classify-result-row--success .dd-classify-result-label {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.5);
}

.dd-classify-result-row--error {
  border-color: rgba(239, 68, 68, 0.5);
}

.dd-classify-result-row--error .dd-classify-result-label {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.55);
}

.dd-classify-result-row--previewed {
  border-color: rgba(196, 181, 253, 0.75);
  box-shadow: inset 3px 0 0 #c4b5fd;
}

/* ── Step 7 — Clasificare mențiuni raport ─────────────────────────────── */

.dd-step7-zone {
  margin: 1.25rem 0 1.25rem;
  padding: 1.5rem 1.5rem 1.25rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(129, 140, 248, 0.34);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(99, 102, 241, 0.2) 0%, transparent 55%),
    radial-gradient(140% 140% at 100% 100%, rgba(168, 85, 247, 0.18) 0%, transparent 60%),
    rgba(19, 8, 33, 0.72);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  animation: dd-fade-in 0.25s ease;
  overflow-x: hidden;
}

.dd-step7-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.dd-step7-hero-text {
  flex: 1 1 24rem;
  min-width: 0;
}

.dd-step7-title {
  margin: 0.45rem 0 0.4rem;
  font-size: 1.45rem;
  color: #fff7ed;
  letter-spacing: -0.01em;
}

.dd-step7-subtitle {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #d6d3d1;
  max-width: 50rem;
}

.dd-step7-zone .dd-mono {
  font-family: "Fira Code", monospace;
  color: #c4b5fd;
  font-size: 0.85em;
  background: rgba(99, 102, 241, 0.16);
  padding: 0.1rem 0.35rem;
  border-radius: 0.3rem;
}

.dd-step7-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: none;
  border-radius: 1rem;
  padding: 0.95rem 1.6rem;
  font-weight: 700;
  font-size: 1.02rem;
  cursor: pointer;
  color: #1f1144;
  background: linear-gradient(95deg, #818cf8 0%, #8b5cf6 50%, #a78bfa 100%);
  box-shadow:
    0 12px 28px rgba(99, 102, 241, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, filter 0.18s ease;
  white-space: nowrap;
}

.dd-step7-cta svg {
  width: 1.15rem;
  height: 1.15rem;
}

.dd-step7-cta:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow:
    0 18px 36px rgba(99, 102, 241, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.dd-step7-cta:focus-visible {
  outline: 2px solid #fde68a;
  outline-offset: 3px;
}

.dd-step7-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: grayscale(0.2);
}

.dd-step7-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.dd-step7-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(129, 140, 248, 0.35);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dd-step7-refresh:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(99, 102, 241, 0.6);
  color: #312e81;
}

.dd-step7-refresh input[type="checkbox"] {
  margin: 0;
  accent-color: #6366f1;
  cursor: pointer;
}

.dd-step7-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin: 1rem 0 0;
}

.dd-step7-progress .cu-status {
  margin: 0;
  flex: 1 1 16rem;
}

.dd-step7-split {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  min-width: 0;
  overflow-x: hidden;
}

@media (max-width: 720px) {
  .dd-step7-split {
    grid-template-columns: 1fr;
  }
}

.dd-step7-left,
.dd-step7-right {
  border-radius: 0.85rem;
  border: 1px solid rgba(129, 140, 248, 0.22);
  background: rgba(16, 9, 27, 0.72);
  padding: 0.95rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  min-height: 22rem;
  min-width: 0;
  overflow-x: hidden;
}

.dd-step7-left-title,
.dd-step7-right-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: #fef3c7;
  letter-spacing: -0.005em;
}

.dd-step7-left-hint {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: rgba(168, 162, 158, 0.85);
  line-height: 1.45;
}

.dd-step7-right-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}

.dd-step7-right-meta {
  font-size: 0.74rem;
  font-family: "Fira Code", monospace;
  color: rgba(168, 162, 158, 0.85);
}

.dd-step7-preview-content {
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 0.6rem;
  background: rgba(2, 10, 13, 0.8);
  padding: 0.7rem;
  min-height: 20rem;
  max-height: 38rem;
  overflow: auto;
  flex: 1 1 auto;
}

.dd-step7-preview-content pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #fef3c7;
  font-size: 0.8rem;
  line-height: 1.6;
  font-family: "Fira Code", monospace;
}

.dd-step7-preview-content iframe,
.dd-step7-preview-content img {
  width: 100%;
  border: 0;
  border-radius: 0.5rem;
}

.dd-step7-preview-content iframe {
  min-height: 32rem;
}

.dd-step7-preview-content img {
  object-fit: contain;
  max-height: 36rem;
}

.dd-step7-preview-hint {
  color: #a8a29e;
  font-size: 0.82rem;
  margin: 0.25rem 0;
}

/* ── Pasul 7 — full-bleed split (sidebar list + tall PDF preview) ─────── */
@media (min-width: 880px) {
  .dd-stepper-root[data-current-step="7"] {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 0.9rem 0.75rem 1rem;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    overflow-x: hidden;
  }

  .dd-stepper-root[data-current-step="7"] .dd-stepper.dd-stepper--lane {
    padding: 0.95rem 0.9rem 0.65rem;
    margin-bottom: 0.55rem;
  }

  .dd-stepper-root[data-current-step="7"] .dd-step-nav-row {
    margin-bottom: 0.65rem;
  }

  .dd-stepper-root[data-current-step="7"] .dd-step7-zone {
    margin: 0.4rem 0 0;
    padding: 1rem 0.6rem 0.75rem 0.5rem;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .dd-stepper-root[data-current-step="7"] .dd-step7-hero {
    gap: 0.85rem;
    padding-right: 0.5rem;
  }

  .dd-stepper-root[data-current-step="7"] .dd-step7-progress {
    margin: 0.6rem 0 0;
    padding-right: 0.5rem;
  }

  .dd-stepper-root[data-current-step="7"] .dd-step7-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.85rem;
    margin-top: 0.7rem;
    align-items: stretch;
    height: calc(100vh - 14rem);
    min-height: 32rem;
  }

  .dd-stepper-root[data-current-step="7"] .dd-step7-left,
  .dd-stepper-root[data-current-step="7"] .dd-step7-right {
    min-height: 0;
    height: 100%;
    padding: 0.85rem 0.9rem 0.9rem;
    border-radius: 0.7rem 0 0 0.7rem;
  }

  .dd-stepper-root[data-current-step="7"] .dd-step7-right {
    border-radius: 0.7rem 0 0 0.7rem;
    padding-right: 0;
  }

  .dd-stepper-root[data-current-step="7"] #dd-mentiuni-results {
    max-height: none;
    flex: 1 1 auto;
    overflow-y: auto;
  }

  .dd-stepper-root[data-current-step="7"] .dd-step7-preview-content {
    max-height: none;
    height: 100%;
    flex: 1 1 auto;
    padding: 0;
    border: 0;
    border-radius: 0.55rem 0 0 0.55rem;
    background: transparent;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .dd-stepper-root[data-current-step="7"] .dd-step7-preview-content iframe {
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
    border-radius: 0.55rem 0 0 0.55rem;
  }

  .dd-stepper-root[data-current-step="7"] .dd-step7-preview-content img {
    max-height: 100%;
  }
}

/* ── Step 5 — Metadate documente ─────────────────────────────────────── */

.dd-workspace.dd-is-hidden-step5 {
  display: none !important;
}

.dd-step5-zone {
  margin: 1.25rem 0 1.25rem;
  padding: 1.5rem 1.5rem 1.25rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(34, 197, 94, 0.32);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(34, 197, 94, 0.16) 0%, transparent 55%),
    radial-gradient(140% 140% at 100% 100%, rgba(249, 115, 22, 0.14) 0%, transparent 60%),
    rgba(28, 8, 0, 0.72);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  animation: dd-fade-in 0.25s ease;
}

.dd-step5-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.dd-step5-hero-text {
  flex: 1 1 24rem;
  min-width: 0;
}

.dd-step5-title {
  margin: 0.45rem 0 0.4rem;
  font-size: 1.45rem;
  color: #fff7ed;
  letter-spacing: -0.01em;
}

.dd-step5-subtitle {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #d6d3d1;
  max-width: 50rem;
}

.dd-step5-subtitle strong {
  color: #fde68a;
  font-weight: 600;
}

.dd-step5-zone .dd-mono {
  font-family: "Fira Code", monospace;
  color: #86efac;
  font-size: 0.85em;
  background: rgba(34, 197, 94, 0.12);
  padding: 0.1rem 0.35rem;
  border-radius: 0.3rem;
}

.dd-step5-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: none;
  border-radius: 1rem;
  padding: 0.95rem 1.6rem;
  font-weight: 700;
  font-size: 1.02rem;
  cursor: pointer;
  color: #052e16;
  background: linear-gradient(95deg, #16a34a 0%, #22c55e 50%, #4ade80 100%);
  box-shadow:
    0 12px 28px rgba(34, 197, 94, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, filter 0.18s ease;
  white-space: nowrap;
}

.dd-step5-cta svg {
  width: 1.15rem;
  height: 1.15rem;
}

.dd-step5-cta:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow:
    0 18px 36px rgba(34, 197, 94, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.dd-step5-cta:focus-visible {
  outline: 2px solid #fde68a;
  outline-offset: 3px;
}

.dd-step5-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: grayscale(0.2);
}

.dd-step5-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.dd-step5-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dd-step5-refresh:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(22, 163, 74, 0.6);
  color: #052e16;
}

.dd-step5-refresh input[type="checkbox"] {
  margin: 0;
  accent-color: #16a34a;
  cursor: pointer;
}

.dd-step5-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin: 1rem 0 0.65rem;
}

.dd-step5-progress .cu-status {
  margin: 0;
  flex: 1 1 16rem;
}

.dd-step5-table-scroller {
  margin-top: 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(249, 115, 22, 0.18);
  background: rgba(10, 3, 0, 0.55);
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 32rem;
}

.dd-meta-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
  color: #fef3c7;
  table-layout: auto;
}

.dd-meta-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(28, 8, 0, 0.92);
  color: #fde68a;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid rgba(249, 115, 22, 0.3);
}

.dd-meta-table tbody td {
  padding: 0.65rem 0.85rem;
  vertical-align: top;
  border-bottom: 1px solid rgba(249, 115, 22, 0.1);
}

.dd-meta-row:last-child td {
  border-bottom: none;
}

.dd-meta-empty-row td {
  text-align: center;
  color: #a8a29e;
  font-style: italic;
  padding: 1.4rem 1rem;
}

.dd-meta-col-index {
  width: 2.5rem;
  font-family: "Fira Code", monospace;
  color: rgba(168, 162, 158, 0.85);
  font-size: 0.8rem;
}

.dd-meta-col-file {
  min-width: 14rem;
}

.dd-meta-file-name {
  display: block;
  font-weight: 600;
  word-break: break-word;
  color: #fef3c7;
}

.dd-meta-file-path {
  display: block;
  margin-top: 0.15rem;
  font-family: "Fira Code", monospace;
  font-size: 0.7rem;
  color: rgba(168, 162, 158, 0.85);
  word-break: break-all;
}

.dd-meta-col-class {
  min-width: 10rem;
}

.dd-meta-class {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.16);
  color: #fde68a;
  border: 1px solid rgba(249, 115, 22, 0.4);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: normal;
  line-height: 1.3;
}

.dd-meta-class--empty {
  background: transparent;
  color: rgba(168, 162, 158, 0.85);
  border-color: rgba(168, 162, 158, 0.35);
  font-style: italic;
  font-weight: 400;
}

.dd-meta-col-nr,
.dd-meta-col-date {
  font-family: "Fira Code", monospace;
  font-size: 0.82rem;
  white-space: nowrap;
}

.dd-meta-col-val {
  font-family: "Fira Code", monospace;
  font-size: 0.82rem;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 9rem;
  max-width: 16rem;
  line-height: 1.35;
}

.dd-meta-col-emitent {
  min-width: 10rem;
  max-width: 16rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.dd-meta-col-judet {
  min-width: 8rem;
  white-space: nowrap;
}

.dd-meta-judet {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(168, 162, 158, 0.12);
  color: #fef3c7;
  border: 1px solid rgba(168, 162, 158, 0.35);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.dd-meta-judet--unknown {
  background: transparent;
  color: rgba(168, 162, 158, 0.7);
  border-color: rgba(168, 162, 158, 0.25);
  font-weight: 400;
  font-style: italic;
}

.dd-meta-judet--reference {
  background: rgba(56, 189, 248, 0.18);
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.55);
}

.dd-meta-judet--match {
  background: rgba(34, 197, 94, 0.16);
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.45);
}

.dd-meta-judet--mismatch {
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.55);
  animation: dd-meta-pulse 2.4s ease-in-out infinite;
}

.dd-meta-judet-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(56, 189, 248, 0.2);
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.55);
  vertical-align: middle;
}

.dd-meta-judet-tag--warn {
  background: rgba(239, 68, 68, 0.25);
  color: #fee2e2;
  border-color: rgba(239, 68, 68, 0.7);
}

.dd-meta-row--judet-mismatch {
  box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.7);
}

.dd-meta-value {
  color: #fef3c7;
}

.dd-meta-empty-cell {
  color: rgba(168, 162, 158, 0.7);
}

.dd-meta-col-status {
  width: 7rem;
}

.dd-meta-status {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}

.dd-meta-status--pending {
  color: rgba(168, 162, 158, 0.95);
  background: rgba(168, 162, 158, 0.1);
  border-color: rgba(168, 162, 158, 0.3);
}

.dd-meta-status--running {
  color: #fde68a;
  background: rgba(249, 115, 22, 0.18);
  border-color: rgba(249, 115, 22, 0.45);
  animation: dd-meta-pulse 1.4s ease-in-out infinite;
}

.dd-meta-status--success {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.5);
}

.dd-meta-status--error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.55);
}

.dd-meta-row--running {
  background: rgba(249, 115, 22, 0.05);
}

.dd-meta-row--success {
  background: rgba(34, 197, 94, 0.05);
}

.dd-meta-row--success.dd-meta-row--cache {
  background: rgba(56, 189, 248, 0.07);
  box-shadow: inset 3px 0 0 rgba(14, 165, 233, 0.55);
}

.dd-meta-row--error {
  background: rgba(239, 68, 68, 0.05);
}

@keyframes dd-meta-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ── Step 8 — Extragere mențiuni documente ───────────────────────────── */

.dd-workspace.dd-is-hidden-step8 {
  display: none !important;
}

.dd-step8-zone {
  margin: 1.25rem 0 1.25rem;
  padding: 1.5rem 1.5rem 1.25rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(20, 184, 166, 0.34);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(20, 184, 166, 0.18) 0%, transparent 55%),
    radial-gradient(140% 140% at 100% 100%, rgba(56, 189, 248, 0.16) 0%, transparent 60%),
    rgba(8, 22, 25, 0.74);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  animation: dd-fade-in 0.25s ease;
}

.dd-step8-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.dd-step8-hero-text {
  flex: 1 1 24rem;
  min-width: 0;
}

.dd-step8-title {
  margin: 0.45rem 0 0.4rem;
  font-size: 1.45rem;
  color: #fff7ed;
  letter-spacing: -0.01em;
}

.dd-step8-subtitle {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #d6d3d1;
  max-width: 50rem;
}

.dd-step8-zone .dd-mono {
  font-family: "Fira Code", monospace;
  color: #99f6e4;
  font-size: 0.85em;
  background: rgba(20, 184, 166, 0.16);
  padding: 0.1rem 0.35rem;
  border-radius: 0.3rem;
}

.dd-step8-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: none;
  border-radius: 1rem;
  padding: 0.95rem 1.6rem;
  font-weight: 700;
  font-size: 1.02rem;
  cursor: pointer;
  color: #062b29;
  background: linear-gradient(95deg, #2dd4bf 0%, #14b8a6 50%, #38bdf8 100%);
  box-shadow:
    0 12px 28px rgba(20, 184, 166, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, filter 0.18s ease;
  white-space: nowrap;
}

.dd-step8-cta svg {
  width: 1.15rem;
  height: 1.15rem;
}

.dd-step8-cta:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow:
    0 18px 36px rgba(20, 184, 166, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.dd-step8-cta:focus-visible {
  outline: 2px solid #fde68a;
  outline-offset: 3px;
}

.dd-step8-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: grayscale(0.2);
}

.dd-step8-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.dd-step8-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: #062b29;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(20, 184, 166, 0.38);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dd-step8-refresh:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(20, 184, 166, 0.65);
  color: #042f2e;
}

.dd-step8-refresh input[type="checkbox"] {
  margin: 0;
  accent-color: #14b8a6;
  cursor: pointer;
}

.dd-step8-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin: 1rem 0 0;
}

.dd-step8-progress .cu-status {
  margin: 0;
  flex: 1 1 16rem;
}

.dd-step8-split {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(20rem, 1.4fr);
  gap: 1rem;
  align-items: stretch;
}

@media (max-width: 64rem) {
  .dd-step8-split {
    grid-template-columns: 1fr;
  }
}

.dd-step8-left,
.dd-step8-right {
  border-radius: 0.85rem;
  border: 1px solid rgba(20, 184, 166, 0.22);
  background: rgba(6, 18, 22, 0.7);
  padding: 0.95rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  min-height: 22rem;
}

.dd-step8-left-title,
.dd-step8-right-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: #fef3c7;
  letter-spacing: -0.005em;
}

.dd-step8-left-hint {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: rgba(168, 162, 158, 0.85);
  line-height: 1.45;
}

.dd-step8-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 28rem;
  min-width: 0;
}

.dd-step8-empty {
  padding: 0.85rem 0.75rem;
  border-radius: 0.6rem;
  border: 1px dashed rgba(168, 162, 158, 0.4);
  background: rgba(6, 18, 22, 0.4);
  color: rgba(168, 162, 158, 0.85);
  font-style: italic;
  font-size: 0.82rem;
  text-align: center;
}

.dd-step8-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name status"
    "path status";
  align-items: center;
  gap: 0.15rem 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(20, 184, 166, 0.18);
  background: rgba(6, 18, 22, 0.55);
  font-size: 0.85rem;
  cursor: not-allowed;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.2s ease, transform 0.15s ease;
  /* Greyed-out state by default — colors below override per state. */
  color: rgba(168, 162, 158, 0.62);
  opacity: 0.7;
  min-width: 0;
}

.dd-step8-row-name {
  grid-area: name;
  font-weight: 600;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

.dd-step8-row-path {
  grid-area: path;
  font-family: "Fira Code", monospace;
  font-size: 0.7rem;
  word-break: break-all;
  overflow-wrap: anywhere;
  color: inherit;
  opacity: 0.85;
  min-width: 0;
}

.dd-step8-row-status {
  grid-area: status;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid transparent;
  background: rgba(168, 162, 158, 0.12);
  color: rgba(168, 162, 158, 0.95);
}

.dd-step8-row--running {
  border-color: rgba(20, 184, 166, 0.45);
  background: rgba(20, 184, 166, 0.1);
  opacity: 0.95;
  color: #ccfbf1;
  animation: dd-meta-pulse 1.4s ease-in-out infinite;
}

.dd-step8-row--running .dd-step8-row-status {
  background: rgba(20, 184, 166, 0.22);
  color: #99f6e4;
  border-color: rgba(20, 184, 166, 0.5);
}

.dd-step8-row--success {
  /* Activated row — fully visible white text and clickable. */
  cursor: pointer;
  opacity: 1;
  color: #fef3c7;
  border-color: rgba(45, 212, 191, 0.5);
  background: rgba(20, 184, 166, 0.08);
}

.dd-step8-row--success:hover {
  background: rgba(20, 184, 166, 0.16);
  border-color: rgba(45, 212, 191, 0.75);
  transform: none;
}

.dd-step8-row--success:focus-visible {
  outline: 2px solid #fde68a;
  outline-offset: 2px;
}

.dd-step8-row--success .dd-step8-row-status {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.45);
}

.dd-step8-row--selected {
  background: rgba(20, 184, 166, 0.22);
  border-color: #2dd4bf;
  box-shadow: inset 3px 0 0 #2dd4bf;
}

.dd-step8-row--selected .dd-step8-row-status {
  background: rgba(20, 184, 166, 0.3);
  color: #ccfbf1;
  border-color: rgba(45, 212, 191, 0.65);
}

.dd-step8-row--error {
  cursor: not-allowed;
  opacity: 0.95;
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.06);
}

.dd-step8-row--error .dd-step8-row-status {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.55);
}

.dd-step8-right-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}

.dd-step8-right-meta {
  font-size: 0.74rem;
  font-family: "Fira Code", monospace;
  color: rgba(168, 162, 158, 0.85);
}

.dd-step8-viewer {
  flex: 1 1 auto;
  margin: 0;
  padding: 0.85rem 0.95rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(20, 184, 166, 0.2);
  background: rgba(2, 10, 13, 0.85);
  color: #fef3c7;
  font-family: "Fira Code", monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
  min-height: 18rem;
  max-height: 36rem;
}

.dd-step8-viewer-empty {
  display: block;
  color: rgba(168, 162, 158, 0.85);
  font-family: "Fira Sans", sans-serif;
  font-style: italic;
  font-size: 0.85rem;
}

.dd-step8-viewer-empty--error {
  color: #fecaca;
  font-style: normal;
}

/* ──────────────────────────────────────────────────────────────────────
   Step 9 — Final permits table (DD raport export view).
   The Step 9 zone aggregates Step 4 classifications with Step 5 metadata
   into the chaptered table required for the DD report.
   ────────────────────────────────────────────────────────────────────── */
.dd-step9-zone {
  margin: 1.25rem 0 1.25rem;
  padding: 1.5rem 1.5rem 1.25rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(217, 70, 239, 0.32);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(217, 70, 239, 0.16) 0%, transparent 55%),
    radial-gradient(140% 140% at 100% 100%, rgba(249, 115, 22, 0.14) 0%, transparent 60%),
    rgba(28, 8, 0, 0.72);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  animation: dd-fade-in 0.25s ease;
}

.dd-step9-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.dd-step9-hero-text {
  flex: 1 1 24rem;
  min-width: 0;
}

.dd-step9-title {
  margin: 0.45rem 0 0.4rem;
  font-size: 1.45rem;
  color: #fff7ed;
  letter-spacing: -0.01em;
}

.dd-step9-subtitle {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #d6d3d1;
  max-width: 50rem;
}

.dd-step9-subtitle strong {
  color: #fde68a;
  font-weight: 600;
}

.dd-step9-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.dd-step9-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: none;
  border-radius: 1rem;
  padding: 0.95rem 1.6rem;
  font-weight: 700;
  font-size: 1.02rem;
  cursor: pointer;
  color: #2a0833;
  background: linear-gradient(95deg, #d946ef 0%, #c026d3 50%, #f472b6 100%);
  box-shadow:
    0 12px 28px rgba(217, 70, 239, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, filter 0.18s ease;
  white-space: nowrap;
}

.dd-step9-cta svg {
  width: 1.15rem;
  height: 1.15rem;
}

.dd-step9-cta:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow:
    0 18px 36px rgba(217, 70, 239, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.dd-step9-cta:focus-visible {
  outline: 2px solid #fde68a;
  outline-offset: 3px;
}

.dd-step9-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: grayscale(0.2);
}

.dd-step9-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin: 1rem 0 0.65rem;
}

.dd-step9-table-scroller {
  margin-top: 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(217, 70, 239, 0.22);
  background: rgba(10, 3, 0, 0.55);
  /* Vertical scroll only — the table must always fit the panel width.
     Long cells (Validity, Permits, Issuing Authority) wrap to multiple
     lines instead of forcing a horizontal scrollbar. */
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 36rem;
}

.dd-step9-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
  color: #fef3c7;
  /* Without table-layout:fixed the intrinsic min-content width of long
     cells (e.g. multi-word Validity notes) would push the table past the
     scroller. Fixed layout distributes widths per the <col> definitions
     and lets cell content wrap inside each column. */
  table-layout: fixed;
}

.dd-step9-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(28, 8, 0, 0.92);
  color: #fde68a;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid rgba(217, 70, 239, 0.32);
}

.dd-step9-table tbody td {
  padding: 0.7rem 0.85rem;
  vertical-align: top;
  border-bottom: 1px solid rgba(217, 70, 239, 0.12);
}

.dd-step9-row:last-child td {
  border-bottom: none;
}

.dd-step9-empty-row td {
  text-align: center;
  color: #a8a29e;
  font-style: italic;
  padding: 1.4rem 1rem;
}

.dd-step9-chapter-row td {
  background: linear-gradient(
    90deg,
    rgba(217, 70, 239, 0.22) 0%,
    rgba(249, 115, 22, 0.18) 100%
  );
  color: #fef3c7;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid rgba(217, 70, 239, 0.4);
}

.dd-step9-col-item {
  width: 5%;
  font-family: "Fira Code", monospace;
  color: #fde68a;
  font-weight: 600;
  white-space: nowrap;
}

.dd-step9-col-permits {
  width: 34%;
}

.dd-step9-col-date {
  font-family: "Fira Code", monospace;
  font-size: 0.84rem;
  white-space: nowrap;
  width: 11%;
}

/* Validity may carry long notes (e.g. "Prezentul Aviz tehnic AMP are
   valabilitate până la recepția la terminarea lucrărilor…"). Allow it
   to wrap onto multiple lines so it never forces a horizontal scroll. */
.dd-step9-col-val {
  font-family: "Fira Code", monospace;
  font-size: 0.84rem;
  width: 18%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.dd-step9-col-emitent {
  width: 32%;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.dd-step9-permit-tip {
  font-weight: 600;
  color: #fef3c7;
  line-height: 1.35;
  word-break: break-word;
}

.dd-step9-permit-nr {
  margin-top: 0.25rem;
  font-family: "Fira Code", monospace;
  font-size: 0.8rem;
  color: #fde68a;
  word-break: break-word;
}

.dd-step9-permit-nr-label {
  color: rgba(253, 230, 138, 0.7);
  font-weight: 600;
  margin-right: 0.2rem;
}

.dd-step9-permit-nr--missing {
  color: rgba(168, 162, 158, 0.85);
  font-style: italic;
}

.dd-step9-permit-file {
  margin-top: 0.25rem;
  font-family: "Fira Code", monospace;
  font-size: 0.7rem;
  color: rgba(168, 162, 158, 0.8);
  word-break: break-all;
}

/* Marker appended at the end of an existing Permits cell when a document
   has mentions classified at Step 7. The "[N] below" pattern is the
   report's convention for cross-referencing the references list under
   the table. The marker is rendered as its own row inside the cell so it
   sits visually beneath the existing tip / Nr. / file lines. */
.dd-step9-permit-ref {
  margin-top: 0.4rem;
}

.dd-step9-ref-marker {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: rgba(217, 70, 239, 0.2);
  color: #f5d0fe;
  border: 1px solid rgba(217, 70, 239, 0.55);
  font-size: 0.74rem;
  font-weight: 700;
  font-family: "Fira Code", monospace;
  letter-spacing: 0.02em;
  white-space: nowrap;
  vertical-align: baseline;
}

.dd-step9-row--with-ref .dd-step9-permit-tip {
  /* Slightly emphasise rows that carry a reference so the eye lands on
     them when scanning between the table and the references list. */
  color: #fff;
}

/* References block printed below the table — one item per "Document cu
   mentiuni", numbered in table order ([1], [2], …). The body holds the
   text extracted at Step 8 (/ExtragereMentiuni). */
.dd-step9-references {
  margin: 1.1rem 0 0.25rem;
  padding: 1rem 1.2rem 1.1rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(217, 70, 239, 0.28);
  background: rgba(8, 3, 12, 0.6);
  animation: dd-fade-in 0.25s ease;
}

.dd-step9-references-title {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fde68a;
}

.dd-step9-references-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.dd-step9-reference {
  border-radius: 0.7rem;
  border: 1px solid rgba(217, 70, 239, 0.18);
  background: rgba(28, 8, 0, 0.45);
  padding: 0.8rem 0.95rem 0.85rem;
}

.dd-step9-reference-head {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.dd-step9-reference-marker {
  font-family: "Fira Code", monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: #f5d0fe;
  background: rgba(217, 70, 239, 0.22);
  border: 1px solid rgba(217, 70, 239, 0.55);
  border-radius: 0.4rem;
  padding: 0.05rem 0.45rem;
  letter-spacing: 0.02em;
}

.dd-step9-reference-file {
  font-size: 0.85rem;
  color: rgba(254, 243, 199, 0.85);
  word-break: break-word;
}

.dd-step9-reference-body {
  margin: 0;
  padding: 0.7rem 0.85rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(217, 70, 239, 0.16);
  background: rgba(2, 6, 12, 0.7);
  color: #fef3c7;
  font-family: "Fira Code", monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 22rem;
  overflow: auto;
}

.dd-step9-reference-body--empty,
.dd-step9-reference-body--pending {
  color: rgba(168, 162, 158, 0.85);
  font-style: italic;
  font-family: "Fira Sans", sans-serif;
  white-space: normal;
}

.dd-step9-reference-body--error {
  color: #fecaca;
  font-family: "Fira Sans", sans-serif;
  white-space: normal;
}
