/* Marketing > Finance Lender Code (Testing) -- financed volume by lender x plan
   code (js/views/finance_lender.js). Token-driven: every color / size / radius
   comes from css/tokens.css; the only literals are the soft row tints that
   already exist as bare greys elsewhere in the system (table.css). */

#financeLenderView { font-family: var(--font-stack); color: var(--navy); }
.fl-empty { padding: 28px; color: #6b7280; font-size: var(--text-body); }

/* --- Basis banner (informational, NOT the amber provisional treatment:
       these numbers tie to the Daily Report) ------------------------------ */
.fl-banner {
  background: var(--icy-blue);
  border: 1px solid var(--primary-blue);
  border-left: 5px solid var(--navy);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--navy);
}
.fl-banner .fl-banner-title {
  font-weight: 800; font-size: var(--text-eyebrow); letter-spacing: .05em;
  text-transform: uppercase; color: var(--transition-blue); margin-bottom: 5px;
}
.fl-banner p { margin: 0 0 6px; }
.fl-banner p:last-child { margin-bottom: 0; }
.fl-banner a { color: var(--primary-blue); font-weight: 600; }

/* --- Controls (inside the content, like Traffic) ---------------------- */
.fl-controls {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--table-border); border-radius: var(--radius);
  padding: 10px 14px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.fl-cgroup { display: flex; align-items: center; gap: 7px; }
.fl-cright { margin-left: auto; }
.fl-clabel {
  font-size: var(--fs-label); font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: #6b7280;
}
.fl-select {
  font-size: var(--fs-body); font-family: inherit; font-weight: 600; color: var(--navy);
  background: var(--light-bg); border: 1px solid var(--table-border);
  border-radius: 6px; padding: 6px 10px; cursor: pointer;
}
.fl-pills {
  display: flex; gap: 3px; background: var(--light-bg);
  border: 1px solid var(--table-border); border-radius: 6px; padding: 3px;
}
.fl-pill {
  border: none; background: transparent; padding: 6px 12px; font-size: var(--fs-body);
  font-weight: 600; color: #6b7280; border-radius: 4px; cursor: pointer; font-family: inherit;
}
.fl-pill:hover { color: var(--navy); background: var(--icy-blue); }
.fl-pill.on { background: var(--navy); color: #fff; }
.fl-stamp { font-size: var(--text-caption); color: #6b7280; font-weight: 600; }
.fl-btn {
  border: 1px solid var(--table-border); background: #fff; border-radius: 6px;
  padding: 5px 11px; font-size: var(--text-caption); font-weight: 700; color: var(--navy);
  cursor: pointer; font-family: inherit; text-transform: uppercase; letter-spacing: .04em;
}
.fl-btn:hover { border-color: var(--primary-blue); background: var(--icy-blue); }

/* --- KPI row: the shared navy tiles (kpi-card.css), 5 across ----------- */
.fl-kpi-row { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1200px) { .fl-kpi-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .fl-kpi-row { grid-template-columns: repeat(2, 1fr); } }
.fl-kpi-row .kpi-value { color: #fff; font-size: var(--text-kpi); font-weight: 700; }
.fl-kpi-row .fl-kpi-sub { color: rgba(255,255,255,0.78); font-size: var(--text-caption); }

/* --- Panels ------------------------------------------------------------ */
.fl-grid2 { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
@media (max-width: 1100px) { .fl-grid2 { grid-template-columns: 1fr; } }
.fl-panel {
  background: #fff; border: 1px solid var(--table-border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow); min-width: 0;
}
.fl-grid2 .fl-panel { margin-bottom: 0; }
.fl-panel-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.fl-panel h3 {
  margin: 0; font-size: var(--fs-body); color: var(--navy); text-transform: uppercase;
  letter-spacing: .04em; font-weight: 700;
}
.fl-note-inline { font-size: var(--text-caption); color: #6b7280; }

/* --- Tables: the shared .data-table (sticky thead under the chrome) ---- */
.fl-table-wrap { overflow-x: auto; }
.fl-table { font-size: var(--fs-body); }
.fl-table th, .fl-table td { padding: 7px 10px; white-space: nowrap; }
/* These grids sit inside panels and horizontal scroll wraps, where the
   shared sticky thead (.data-table th, top: var(--chrome-h)) has no page
   scrollport to pin to and just displaces the header cells into the body --
   so they are deliberately NOT sticky here (short tables; the page scrolls). */
.fl-table th, .fl-table th:first-child, .fl-table td:first-child { position: static; }
.fl-table td:first-child { background: transparent; }
.fl-num { text-align: right; font-variant-numeric: tabular-nums; }
.fl-table th.fl-num { text-align: right; }
.fl-strong { font-weight: 700; }
.fl-code { font-weight: 700; font-family: Consolas, Menlo, monospace; font-size: 12px; }
.fl-name { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-notecell { color: #6b7280; font-size: var(--text-caption); white-space: normal; min-width: 180px; max-width: 360px; }
.fl-mtd { font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--primary-blue); margin-left: 4px; }
.fl-row-flag td { background: #FFFBEB; }
.fl-row-flag:hover td { background: #FEF3C7 !important; }
.fl-total td {
  background: var(--row-region-bg) !important; font-weight: 700; color: var(--navy);
  border-top: 2px solid var(--table-border);
}
.fl-sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 7px; vertical-align: -1px; }
.fl-bar-col { width: 90px; min-width: 90px; }
.fl-bar { display: inline-block; height: 10px; border-radius: 3px; opacity: .85; vertical-align: middle; }

/* --- Chart -------------------------------------------------------------- */
.fl-chart { height: 300px; position: relative; }
.fl-legend { display: flex; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.fl-legend .fl-li { display: flex; align-items: center; font-size: var(--text-caption); color: #6b7280; }

/* --- Notes / foot ------------------------------------------------------- */
.fl-notesbody { font-size: var(--fs-body); line-height: 1.6; color: var(--navy); }
.fl-notesbody p { margin: 0 0 10px; }
.fl-notesbody code { font-size: 12px; background: var(--light-bg); padding: 1px 4px; border-radius: 3px; }
.fl-notes-table { width: 100%; border-collapse: collapse; margin: 0 0 12px; }
.fl-notes-table td { padding: 6px 8px; border-bottom: 1px solid var(--table-border); vertical-align: top; font-size: var(--text-caption); }
.fl-notes-table td:first-child { white-space: nowrap; font-weight: 700; width: 220px; }
.fl-foot { font-size: var(--text-caption); color: #6b7280; line-height: 1.6; padding: 4px 2px 12px; }
