/* ext_lead_financials.css — tabs + the Financials overview/history pane */

/* ── tab bar ─────────────────────────────────────────────────────────────── */
.lf-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 14px;
  padding: 0;
  position: sticky;
  top: 0;
  background: var(--bg-1, #141a22);
  z-index: 5;
}
.lf-tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-3, #768390);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .12s, border-color .12s;
}
.lf-tab:hover { color: var(--text-1, #dfe6ee); }
.lf-tab.active {
  color: var(--accent, #6fb7ff);
  border-bottom-color: var(--accent, #6fb7ff);
}

.lf-panes { min-height: 0; }
.lf-pane { display: none; }
.lf-pane.active { display: block; }
.lf-emptypane { padding: 22px 4px; }

/* ── overview figures ────────────────────────────────────────────────────── */
.lf-wrap { display: block; }
.lf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}
.lf-fig {
  background: var(--bg-2, #1b2230);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 11px;
  min-width: 0;
}
.lf-k {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-3, #768390);
  font-weight: 600;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-height: 15px;   /* level the card heights whether or not a provenance
                         badge is present, so the grid stays even */
}
.lf-v {
  font-size: 17px;
  font-weight: 700;
  font-family: var(--mono, monospace);
  color: var(--text-1, #dfe6ee);
  overflow: hidden;
  text-overflow: ellipsis;
}
.lf-fig.lf-pos .lf-v { color: #3ec28f; }
.lf-fig.lf-neg .lf-v { color: #ef4444; }

/* provenance chip — a computed figure must never look broker-reported */
.lf-src {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .3px;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}
.lf-src-acc  { background: rgba(62,194,143,.18); color: #3ec28f; }
.lf-src-hist { background: rgba(245,158,11,.18); color: #fbbf24; }

.lf-note {
  font-size: 11.5px;
  color: var(--text-2, #adbac7);
  background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.28);
  border-radius: 8px;
  padding: 9px 11px;
  margin-bottom: 14px;
  line-height: 1.5;
}
.lf-note b { color: #fbbf24; }

/* ── blocks ──────────────────────────────────────────────────────────────── */
.lf-block { margin-bottom: 16px; }
.lf-blockttl {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .55px;
  color: var(--text-3, #768390);
  margin-bottom: 7px;
}

/* ── tables ──────────────────────────────────────────────────────────────── */
.lf-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; }
table.lf-hist, table.lf-brandtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
table.lf-brandtable { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
table.lf-hist th, table.lf-brandtable th {
  text-align: left;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-3, #768390);
  font-weight: 700;
  padding: 7px 10px;
  background: var(--bg-2, #1b2230);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.lf-hist td, table.lf-brandtable td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  color: var(--text-2, #adbac7);
  white-space: nowrap;
}
table.lf-hist tbody tr:last-child td,
table.lf-brandtable tbody tr:last-child td { border-bottom: 0; }
table.lf-hist tbody tr:hover { background: rgba(255,255,255,.025); }

.lf-num { text-align: right; font-family: var(--mono, monospace); }
.lf-num.pos { color: #3ec28f; }
.lf-num.neg { color: #ef4444; }
.lf-num.mute { color: var(--text-3, #768390); }
.lf-when { color: var(--text-3, #768390); font-family: var(--mono, monospace); font-size: 11px; }
.lf-method, .lf-sale { color: var(--text-2, #adbac7); }
.lf-agent { color: var(--text-3, #768390); }

.lf-brand {
  display: inline-block;
  font-weight: 700;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(111,183,255,.14);
  color: #6fb7ff;
}
.lf-kind {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 1px 5px;
  border-radius: 4px;
}
.lf-kind.k-new      { background: rgba(59,130,246,.18); color: #6ba4ff; }
.lf-kind.k-relation { background: rgba(168,85,247,.18); color: #c084fc; }
.lf-kind.k-transfer { background: rgba(245,158,11,.18); color: #fbbf24; }

.lf-empty, .lf-loading {
  color: var(--text-3, #768390);
  font-size: 12px;
  font-style: italic;
  padding: 16px 10px;
  text-align: center;
}
.lf-error {
  color: #ef4444;
  font-size: 12px;
  padding: 14px;
  border: 1px solid rgba(239,68,68,.3);
  border-radius: 9px;
  background: rgba(239,68,68,.06);
}
.lf-retry {
  margin-left: 8px;
  background: var(--bg-2, #1b2230);
  border: 1px solid var(--line);
  color: var(--text-1, #dfe6ee);
  border-radius: 5px;
  padding: 2px 8px;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
}
.lf-retry:hover { border-color: var(--accent, #6fb7ff); color: var(--accent, #6fb7ff); }
