/* PROTOTYPE ONLY — fidelity layer for the current Journey Financials surface. */
.current-proposal-header {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.current-cover {
  min-height: 58px;
  display: flex;
  align-items: end;
  padding: 9px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(3, 36, 42, 0.2), rgba(3, 36, 42, 0.72)), linear-gradient(135deg, #51d6bb, #092b38 70%);
  color: white;
}

.current-cover span { font-size: 9px; font-weight: 800; }
.current-proposal-identity strong,
.current-proposal-identity > span { display: block; }
.current-proposal-identity strong { font-size: 15px; letter-spacing: -0.02em; }
.current-proposal-identity > span:last-child { margin-top: 3px; color: var(--muted-foreground); font-size: 9px; }
.current-proposal-state { align-self: start; padding-top: 5px; }

.current-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 18px;
  background: #f1edf8;
}

.current-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 18px;
  background: var(--surface);
}

.current-tabs button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: #68617c;
  font-size: 9px;
}

.current-tabs button.active { background: var(--primary); color: white; }
.current-refresh {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #d6caee;
  border-radius: 50%;
  background: #ece5fc;
  color: #6845ef;
}

.financial-nav {
  overflow: hidden;
  border: 1px solid #ece7f3;
  border-radius: 20px;
  background: var(--surface);
}

.financial-summary-row {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 11px 0;
}

.margin-health,
.costed-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 8px; }
.margin-health i { width: 6px; height: 6px; border-radius: 50%; background: #0ca877; }
.margin-health strong { color: #07865f; font-size: 10px; }
.margin-health span { color: var(--muted-foreground); }
.costed-chip { padding: 4px 7px; border: 1px solid #f0bd5a; border-radius: 999px; color: #b66a06; background: #fff7e6; }
.financial-nav .metric-nav { padding: 4px; border-radius: 0; }
.financial-nav .metric-card { min-height: 52px; border: 0; border-radius: 17px; }
.financial-nav .metric-card.active { box-shadow: inset 0 0 0 2px #d2a500; }
.metric-revenue { background: #a8efd0; }
.metric-cost { background: #fff0b7; }
.metric-ta { background: #e4defe; }
.metric-journey-margin { background: #cfe0fb; }
.metric-total-earnings { background: #c4f3ea; }
.metric-invoices { background: #e4e8ef; }

.financial-ledger-wrap { overflow-x: auto; }
.financial-ledger-grid {
  min-width: 1100px;
  display: grid;
  grid-template-columns: 24px 54px minmax(190px, 1.4fr) repeat(6, minmax(82px, 0.72fr)) 50px;
  gap: 8px;
  align-items: center;
  padding: 9px 12px;
}

.financial-ledger-grid.header { border-bottom: 1px solid var(--border); color: var(--muted-foreground); font-size: 7px; text-align: right; }
.financial-ledger-grid.header > span:nth-child(-n + 3) { text-align: left; }
.financial-ledger-row { min-height: 54px; border-bottom: 1px solid #eeeaf4; }
.financial-ledger-row:last-child { border-bottom: 0; }
.ledger-check i { width: 10px; height: 10px; display: block; border-radius: 3px; background: #ddd1ef; }

.invoice-review-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
  gap: 10px;
  align-items: start;
}

.pending-review-rail {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.pending-review-head {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.pending-review-head > span:first-child { display: flex; align-items: center; gap: 6px; font-size: 9px; }
.pending-pdf {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  background: #e3dfe9;
  color: var(--muted-foreground);
  font-size: 8px;
}

.pending-pdf .pdf-sheet { width: 100%; min-height: 72px; margin: 0; padding: 8px; }
.pending-review-rail .review-card { border: 0; border-radius: 0; box-shadow: none; }
.pending-review-rail .review-data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pending-review-rail .review-line { grid-template-columns: minmax(0, 1fr) auto; }
.pending-review-rail .review-line .status-pill { display: none; }

.ingestion-recovery {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.recovery-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.recovery-list button {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px;
  border: 0;
  border-right: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
}

.recovery-list button:last-child { border-right: 0; }
.recovery-list strong,
.recovery-list small { display: block; }
.recovery-list strong { font-size: 9px; }
.recovery-list small { margin-top: 3px; color: var(--muted-foreground); font-size: 7px; }
.recovery-list em { color: var(--accent); font-size: 8px; font-style: normal; font-weight: 800; white-space: nowrap; }

.final-record-panel,
.final-evidence-panel { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.final-record-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.final-record-facts > span { padding: 9px; border-radius: 14px; background: var(--surface-soft); }
.final-record-facts label,
.final-record-facts strong { display: block; }
.final-record-facts label { color: var(--muted-foreground); font-size: 7px; }
.final-record-facts strong { margin-top: 3px; font-size: 10px; }
.final-evidence-panel { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.final-evidence-panel h4 { font-size: 10px; }
.final-evidence-panel p { margin-top: 3px; color: var(--muted-foreground); font-size: 8px; }
.evidence-chips { display: flex; flex-wrap: wrap; justify-content: end; gap: 5px; }

.header-correction-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.header-correction-grid label,
.audit-note-label { display: block; color: var(--muted-foreground); font-size: 8px; font-weight: 750; }
.header-correction-grid input { width: 100%; min-height: 36px; margin-top: 5px; padding: 0 10px; border: 1px solid var(--border); border-radius: 12px; font-size: 10px; }
.audit-note-label { margin: 11px 0 5px; }
textarea.reason-input { min-height: 72px; padding-top: 10px; resize: vertical; }

@media (max-width: 1120px) {
  .current-tabs button { padding: 0 8px; }
  .invoice-review-workspace { grid-template-columns: minmax(0, 1fr); }
  .recovery-list { grid-template-columns: minmax(0, 1fr); }
  .recovery-list button { border-right: 0; border-bottom: 1px solid var(--border); }
  .recovery-list button:last-child { border-bottom: 0; }
}

@media (max-width: 760px) {
  .current-proposal-header { grid-template-columns: 90px minmax(0, 1fr); }
  .current-proposal-state { display: none; }
  .current-tabs { overflow-x: auto; }
  .current-tabs button { flex: 0 0 auto; }
  .financial-nav .metric-nav { overflow-x: auto; }
  .financial-nav .metric-card { min-width: 120px; }
  .final-record-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .final-evidence-panel { align-items: flex-start; flex-direction: column; }
  .evidence-chips { justify-content: start; }
}
