/*
 * New look (John, 2026-10-15): the redesign's look over the SAME live page.
 *
 * Dormant until finance-skin.js / finance-newlook.js put `finance-newlook`
 * on <body>, which only happens for the people /api/ui/new-look allows
 * (management) and only after they switch it on. Everyone else never matches
 * a rule in this file except the switch's own (.nl-*), which is not drawn for
 * them.
 *
 * It is a look, not a second page: same DOM, same ids, same buttons, same
 * rules. Nothing here may hide a node - no display:none, no height:0, no
 * visibility. The overlay that hid #prior-runs-banner taught that one.
 *
 * Specificity: Command 2.0 rules are `body.finance-command2 .x` and many carry
 * !important, so every rule here is `body.finance-newlook.finance-command2 .x`
 * (one class more) and repeats !important where it has to win.
 */

/* ------------------------------------------------------------ the switch
   Drawn for allowed people only, in both looks, so it is never scoped. */
.nl-toggle {
  position: fixed; left: 16px; bottom: 16px; z-index: 9000;
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 10px;
  border: 1px solid #cdd6de; border-radius: 999px; background: #fff; color: #46586a;
  font: 600 12px/1 "Inter", "Segoe UI", Arial, sans-serif; cursor: pointer;
  box-shadow: 0 2px 8px rgba(26, 40, 53, 0.10);
}
.nl-toggle:hover { color: #1a2835; border-color: #b7c3cd; }
.nl-toggle:focus-visible { outline: 2px solid #0b7a9e; outline-offset: 2px; }
.nl-toggle .nl-knob {
  position: relative; width: 26px; height: 16px; border-radius: 999px; background: #cdd6de; flex: none;
  transition: background-color 140ms ease-out;
}
.nl-toggle .nl-knob::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 140ms ease-out;
}
.nl-toggle[aria-pressed="true"] { color: #1a2835; }
.nl-toggle[aria-pressed="true"] .nl-knob { background: #0b7a9e; }
.nl-toggle[aria-pressed="true"] .nl-knob::after { transform: translateX(10px); }
/* The switch sits where the sticky Submit bar's summary starts; nudge the
   summary over so the two never overlap (only drawn for allowed people). */
body.nl-has-toggle .actions-sticky .actions-summary { padding-left: 104px; }
@media (prefers-reduced-motion: reduce) {
  .nl-toggle .nl-knob, .nl-toggle .nl-knob::after { transition: none; }
}

/* ------------------------------------------------------------ tokens */
body.finance-newlook {
  --nl-page: #f4f7fa;
  --nl-card: #ffffff;
  --nl-line: #e8edf2;
  --nl-line-soft: #eef1f4;
  --nl-line-strong: #cdd6de;
  --nl-ink: #1a2835;
  --nl-muted: #5c6f7e;
  --nl-primary: #0b7a9e;
  --nl-primary-hover: #09678a;
  --nl-subtle: #f9fbfc;
  --nl-ring: 0 0 0 2px rgba(11, 122, 158, 0.25);
  --nl-r-field: 8px;
  --nl-r-box: 12px;
  --nl-r-chip: 16px;
  --nl-font: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  /* The page's own tokens follow, so inline styles that read them move too. */
  --text: #1a2835;
  --muted: #5c6f7e;
  --border: #cdd6de;
  --border-soft: #e8edf2;
  --bg: #f4f7fa;
}
body.finance-newlook.finance-command2 {
  background: var(--nl-page) !important;
  color: var(--nl-ink) !important;
  font-family: var(--nl-font) !important;
  -webkit-font-smoothing: antialiased;
}
body.finance-newlook.finance-command2 button,
body.finance-newlook.finance-command2 input,
body.finance-newlook.finance-command2 select,
body.finance-newlook.finance-command2 textarea { font-family: inherit !important; }

/* ------------------------------------------------------------ shell */
body.finance-newlook.finance-command2 .topbar {
  background: #fff !important; border-bottom: 1px solid var(--nl-line) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
}
body.finance-newlook.finance-command2 .topbar-tool { color: var(--nl-muted) !important; font-weight: 500 !important; }
body.finance-newlook.finance-command2 .signout-btn {
  background: #fff !important; color: var(--nl-ink) !important; border: 1px solid var(--nl-line-strong) !important;
  border-radius: var(--nl-r-field) !important; font-weight: 600 !important;
}
body.finance-newlook.finance-command2 .command-context {
  background: var(--nl-page) !important; border-bottom: 0 !important;
}
body.finance-newlook.finance-command2 .command-client-name { font-size: 18px !important; font-weight: 600 !important; color: var(--nl-ink) !important; letter-spacing: -0.01em; }
body.finance-newlook.finance-command2 .command-case-number { color: var(--nl-muted) !important; font-variant-numeric: tabular-nums; }
body.finance-newlook.finance-command2 .command-case-search input {
  border: 1px solid var(--nl-line-strong) !important; border-radius: var(--nl-r-field) !important; background: #fff !important;
}
body.finance-newlook.finance-command2 .command-case-search input:focus { box-shadow: var(--nl-ring) !important; border-color: var(--nl-primary) !important; }
body.finance-newlook.finance-command2 .command-tabs {
  background: var(--nl-page) !important; border-bottom: 1px solid var(--nl-line) !important;
}
body.finance-newlook.finance-command2 .command-tab {
  color: var(--nl-muted) !important; font-weight: 500 !important; background: transparent !important;
  border-bottom: 2px solid transparent !important;
}
body.finance-newlook.finance-command2 .command-tab:hover { color: var(--nl-ink) !important; }
body.finance-newlook.finance-command2 .command-tab.active {
  color: var(--nl-ink) !important; font-weight: 600 !important; border-bottom-color: var(--nl-primary) !important;
}
body.finance-newlook.finance-command2 .command-tab-count {
  background: var(--nl-line) !important; color: var(--nl-ink) !important; border-radius: var(--nl-r-chip) !important;
  font-variant-numeric: tabular-nums;
}
body.finance-newlook.finance-command2 .command-tab.active .command-tab-count { background: var(--nl-primary) !important; color: #fff !important; }

/* ------------------------------------------------------------ cards */
body.finance-newlook.finance-command2 .card {
  background: var(--nl-card) !important; border: 1px solid var(--nl-line) !important;
  border-radius: var(--nl-r-box) !important; box-shadow: none !important;
}
body.finance-newlook.finance-command2 .card-title { font-size: 15px !important; font-weight: 600 !important; color: var(--nl-ink) !important; }
body.finance-newlook.finance-command2 .card-subtitle,
body.finance-newlook.finance-command2 .hint { color: var(--nl-muted) !important; }
body.finance-newlook.finance-command2 .section-title {
  text-transform: none !important; letter-spacing: 0 !important; font-size: 13px !important;
  font-weight: 600 !important; color: var(--nl-ink) !important;
}
body.finance-newlook.finance-command2 .command-amount-panel,
body.finance-newlook.finance-command2 .credit-box {
  background: var(--nl-card) !important; border: 1px solid var(--nl-line) !important;
  border-radius: var(--nl-r-box) !important; box-shadow: none !important;
}
body.finance-newlook.finance-command2 .command-panel-heading strong,
body.finance-newlook.finance-command2 .credit-title {
  font-size: 13.5px !important; font-weight: 600 !important; color: var(--nl-ink) !important;
  text-transform: none !important; letter-spacing: 0 !important;
}

/* ------------------------------------------------------------ fields */
body.finance-newlook.finance-command2 label { color: var(--nl-ink); }
body.finance-newlook.finance-command2 input[type="text"],
body.finance-newlook.finance-command2 input[type="number"],
body.finance-newlook.finance-command2 input[type="email"],
body.finance-newlook.finance-command2 input[type="tel"],
body.finance-newlook.finance-command2 input[type="date"],
body.finance-newlook.finance-command2 select,
body.finance-newlook.finance-command2 textarea {
  border: 1px solid var(--nl-line-strong) !important; border-radius: var(--nl-r-field) !important;
  background-color: #fff !important; color: var(--nl-ink) !important;
}
body.finance-newlook.finance-command2 input:focus,
body.finance-newlook.finance-command2 select:focus,
body.finance-newlook.finance-command2 textarea:focus {
  outline: none !important; border-color: var(--nl-primary) !important; box-shadow: var(--nl-ring) !important;
}
body.finance-newlook.finance-command2 input[type="checkbox"],
body.finance-newlook.finance-command2 input[type="radio"] { accent-color: var(--nl-primary); }

/* ------------------------------------------------------------ buttons
   Teal on white measured 2.21:1; the darker teal reads at 4.9:1. */
body.finance-newlook.finance-command2 button.primary,
body.finance-newlook.finance-command2 .pull-btn {
  background: var(--nl-primary) !important; border: 1px solid var(--nl-primary) !important; color: #fff !important;
  border-radius: var(--nl-r-field) !important; font-weight: 600 !important; box-shadow: none !important;
}
body.finance-newlook.finance-command2 button.primary:hover:not([disabled]),
body.finance-newlook.finance-command2 .pull-btn:hover:not([disabled]) {
  background: var(--nl-primary-hover) !important; border-color: var(--nl-primary-hover) !important;
}
body.finance-newlook.finance-command2 button.primary[disabled],
body.finance-newlook.finance-command2 .pull-btn[disabled] {
  background: #eef1f4 !important; border-color: #eef1f4 !important; color: #6b7c8a !important;
}
body.finance-newlook.finance-command2 button.secondary,
body.finance-newlook.finance-command2 .btn-preview-row,
body.finance-newlook.finance-command2 .command-review-button {
  background: #fff !important; color: var(--nl-ink) !important; border: 1px solid var(--nl-line-strong) !important;
  border-radius: var(--nl-r-field) !important; font-weight: 600 !important; box-shadow: none !important;
}
body.finance-newlook.finance-command2 button.secondary:hover:not([disabled]),
body.finance-newlook.finance-command2 .btn-preview-row:hover { background: var(--nl-subtle) !important; border-color: #b7c3cd !important; }
body.finance-newlook.finance-command2 button:focus-visible { outline: none !important; box-shadow: var(--nl-ring) !important; }

/* ------------------------------------------------------------ chips */
body.finance-newlook.finance-command2 .badge {
  border-radius: var(--nl-r-chip) !important; text-transform: capitalize !important; letter-spacing: 0 !important;
  font-size: 12px !important; font-weight: 600 !important; padding: 2px 9px !important;
}

/* ------------------------------------------------------------ credit
   TransUnion only (John, 10-15): the bureau's score on one line, then three
   equal tiles. finance-newlook.js swaps the table for this markup; the data
   and the report button are the page's own. */
body.finance-newlook.finance-command2 .nl-credit { display: grid; gap: 10px; }
body.finance-newlook.finance-command2 .nl-credit-score { display: flex; align-items: baseline; gap: 10px; }
body.finance-newlook.finance-command2 .nl-credit-score .k { font-size: 12.5px; font-weight: 600; color: var(--nl-muted); }
body.finance-newlook.finance-command2 .nl-credit-score .v { font-size: 24px; font-weight: 700; color: var(--nl-ink); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
body.finance-newlook.finance-command2 .nl-credit-score .v.low { color: #b42318; }
body.finance-newlook.finance-command2 .nl-credit-score .rep-btn { margin-left: auto; }
body.finance-newlook.finance-command2 .nl-credit-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
body.finance-newlook.finance-command2 .nl-credit-tile {
  display: grid; gap: 2px; min-width: 0; padding: 10px 12px;
  border: 1px solid var(--nl-line); border-radius: var(--nl-r-field); background: var(--nl-subtle);
}
body.finance-newlook.finance-command2 .nl-credit-tile .k { font-size: 12px; font-weight: 500; color: var(--nl-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.finance-newlook.finance-command2 .nl-credit-tile .v { font-size: 16px; font-weight: 600; color: var(--nl-ink); font-variant-numeric: tabular-nums; }
body.finance-newlook.finance-command2 .nl-credit-tile .v.na { color: var(--nl-muted); font-weight: 500; }
body.finance-newlook.finance-command2 .credit-date { color: var(--nl-muted) !important; }
body.finance-newlook.finance-command2 .suggest-box { border-top: 1px solid var(--nl-line) !important; }

/* ------------------------------------------------------------ lenders
   One lender per row, one list, like the redesign. Same rows, same controls. */
body.finance-newlook.finance-command2 .lender-toolbar {
  background: transparent !important; border: 0 !important; padding: 0 2px !important;
}
body.finance-newlook.finance-command2 .tier-label {
  text-transform: none !important; letter-spacing: 0 !important; font-size: 12px !important;
  font-weight: 600 !important; color: var(--nl-muted) !important;
}
body.finance-newlook.finance-command2 .lender-grid-inner {
  grid-template-columns: minmax(0, 1fr) !important; gap: 0 !important;
  border: 1px solid var(--nl-line) !important; border-radius: var(--nl-r-box) !important;
  overflow: hidden; background: var(--nl-card) !important;
}
body.finance-newlook.finance-command2 .lender-grid-inner > .lender-row {
  grid-column: auto !important; border: 0 !important; border-bottom: 1px solid var(--nl-line-soft) !important;
  border-radius: 0 !important; background: var(--nl-card) !important; box-shadow: none !important;
  min-height: 52px; padding-top: 8px !important; padding-bottom: 8px !important;
}
body.finance-newlook.finance-command2 .lender-grid-inner > .lender-row:last-child { border-bottom: 0 !important; }
body.finance-newlook.finance-command2 .lender-grid-inner > .lender-row:hover { background: var(--nl-subtle) !important; }
body.finance-newlook.finance-command2 .lender-row .lender-name { font-size: 13.5px !important; font-weight: 600 !important; color: var(--nl-ink) !important; }
body.finance-newlook.finance-command2 .lender-row .lender-meta { color: var(--nl-muted) !important; }
body.finance-newlook.finance-command2 .lender-row.unavailable .lender-name { color: var(--nl-muted) !important; }
body.finance-newlook.finance-command2 .run-mode-select { height: 30px !important; font-size: 12.5px !important; }

body.finance-newlook.finance-command2 .actions-sticky {
  background: rgba(255, 255, 255, 0.96) !important; border: 1px solid var(--nl-line) !important;
  border-radius: var(--nl-r-box) !important; box-shadow: 0 -2px 12px rgba(26, 40, 53, 0.06) !important;
}

/* ------------------------------------------------------------ results */
body.finance-newlook.finance-command2 .result-card {
  background: var(--nl-card) !important; border: 1px solid var(--nl-line) !important;
  border-radius: var(--nl-r-box) !important; box-shadow: none !important;
}
/* The coloured edge stays: it is the state at a glance. Thinner, same colours. */
body.finance-newlook.finance-command2 .result-card.submitted,
body.finance-newlook.finance-command2 .result-card.approved { border-left: 3px solid #16a34a !important; }
body.finance-newlook.finance-command2 .result-card.error,
body.finance-newlook.finance-command2 .result-card.declined { border-left: 3px solid #dc2626 !important; }
body.finance-newlook.finance-command2 .result-card.pending { border-left: 3px solid #b45309 !important; }
body.finance-newlook.finance-command2 .result-card.second_look { border-left: 3px solid #d97316 !important; }
body.finance-newlook.finance-command2 .result-card.warn,
body.finance-newlook.finance-command2 .result-card.review { border-left: 3px solid #2563eb !important; }
body.finance-newlook.finance-command2 .result-card-title,
body.finance-newlook.finance-command2 .result-card .head .name { font-weight: 600 !important; color: var(--nl-ink) !important; }
body.finance-newlook.finance-command2 .banner { border-radius: 10px !important; }

/* ------------------------------------------------------------ dialogs and Finalize */
body.finance-newlook.finance-command2 .modal-card {
  border-radius: 14px !important; border: 1px solid var(--nl-line) !important;
  box-shadow: 0 12px 32px rgba(26, 40, 53, 0.18) !important;
}
body.finance-newlook.finance-command2 #wizard-banner .card,
body.finance-newlook.finance-command2 .wiz-card { border-radius: var(--nl-r-box) !important; }
body.finance-newlook.finance-command2 #wizard-steps-nav button { border-radius: var(--nl-r-field) !important; }

/* ------------------------------------------------------------ disclosure */
body.finance-newlook.finance-command2 .disc-send {
  background: var(--nl-primary) !important; border-radius: var(--nl-r-field) !important;
}
body.finance-newlook.finance-command2 .disc-send:hover:not([disabled]) { background: var(--nl-primary-hover) !important; }
body.finance-newlook.finance-command2 .disc-seg { border-color: var(--nl-line-strong) !important; border-radius: var(--nl-r-field) !important; }
body.finance-newlook.finance-command2 .disc-seg button.active { background: var(--nl-primary) !important; color: #fff !important; }
body.finance-newlook.finance-command2 .disc-seg button:not(.active):hover { background: var(--nl-subtle) !important; }
