/* Lector de facturas: sobre consola.css y valoracion.css */

.fx-flow {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
  margin: 8px 0 14px;
  counter-reset: fx;
}

@media (min-width: 760px) {
  .fx-flow {
    grid-template-columns: 0.8fr 1.2fr 1.6fr 1.2fr;
    align-items: start;
  }
}

.fx-group {
  padding: 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
  min-width: 0;
}

.fx-group-name {
  margin: 2px 4px 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
}

.fx-nodes {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fx-step {
  position: relative;
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 12px 12px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  counter-increment: fx;
  transition: border-color 0.15s, background-color 0.15s;
}

.fx-step::before {
  content: counter(fx);
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 600;
}

.fx-step.is-active {
  border-color: var(--accent);
  background: var(--accent-tint);
}

.fx-step.is-active::before {
  background: var(--accent);
  color: #fff;
}

.fx-shot {
  margin: 18px 0 0;
}

.fx-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.fx-shot figcaption {
  margin-top: 8px;
}

.fx-node {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.9375rem;
}

.fx-node-sub {
  font-size: 0.8125rem;
  color: var(--ink-3);
  line-height: 1.4;
}

.fx-sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fx-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.fx-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--tint);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
}

.fx-count-n {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  color: var(--ink);
}

.fx-count.is-ok .fx-count-n {
  color: var(--accent);
}

.fx-count.is-review .fx-count-n {
  color: #b7791f;
}

.fx-count.is-duplicate .fx-count-n {
  color: var(--warn);
}

.fx-sheet-wrap {
  border: 1px solid var(--rule);
  border-radius: 6px;
}

.fx-table {
  font-size: 0.875rem;
}

.fx-table th,
.fx-table td {
  white-space: nowrap;
}

.fx-table td.fx-reason {
  white-space: normal;
  min-width: 240px;
  text-align: left;
  color: var(--ink-2);
}

.fx-table .fx-rn {
  width: 32px;
  color: var(--ink-3);
  background: var(--tint);
  text-align: center;
}

.fx-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.fx-status.is-ok {
  background: var(--accent-tint);
  color: var(--accent-strong);
}

.fx-status.is-review {
  background: #fdf0d5;
  color: #8a5a12;
}

.fx-status.is-duplicate {
  background: var(--warn-tint);
  color: #9b3324;
}

.fx-warn {
  color: #b7791f;
}

.fx-alerts {
  display: grid;
  gap: 12px;
}

.fx-mail {
  border: 1px solid var(--rule);
  border-left: 4px solid #d69e2e;
  border-radius: var(--radius);
  padding: 12px 16px;
  background: var(--surface);
  min-width: 0;
}

.fx-mail-subj {
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--ink);
}

.fx-mail pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-2);
}

@media (prefers-reduced-motion: reduce) {
  .fx-step {
    transition: none;
  }
}

#fx-out > .cd-panel {
  display: block;
}

.fx-table thead th.fx-rn,
.fx-table td.fx-rn {
  min-width: 0;
  width: 36px;
  padding-left: 6px;
  padding-right: 6px;
}

.fx-table th[scope="row"] {
  min-width: 13rem;
}

.fx-table td.fx-ts {
  color: var(--ink-3);
  font-size: 0.8125rem;
}

.fx-mail-meta {
  margin: 0 0 2px;
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.fx-group:nth-child(2) .fx-step:nth-child(2)::after {
  content: "+ OpenAI Chat Model";
  justify-self: start;
  margin-top: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--tint);
  font-size: 0.75rem;
  color: var(--ink-2);
}
