/*
 * Finance Command Center
 *
 * Dormant until finance-command.js adds the finance-command class, so the
 * production UI at finance.clearstarttax.com stays exactly as it is. Command
 * keeps its own layout (context bar, tabs, full width) and takes Classic's
 * colours, type and shapes from the tokens index.html already defines.
 */

body.finance-command {
  --command-ink: var(--text);
  --command-muted: var(--muted);
  --command-line: var(--border);
  --command-line-soft: var(--border-soft);
  --command-surface: #ffffff;
  --command-sub: #fafbfc;
  --command-tint: #f5fbfd;
  --command-cyan: var(--teal);
  --command-cyan-dark: var(--teal-dark);
  min-width: 320px;
  zoom: 0.9;
}

body.finance-command .topbar {
  position: sticky;
  top: 0;
  z-index: 90;
}

body.finance-command .welcome {
  max-width: 290px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.finance-command .signout-btn {
  white-space: nowrap;
}

body.finance-command .container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 16px 24px 30px;
}

/* Case context bar */
.command-context {
  display: none;
  align-items: center;
  min-height: 60px;
  gap: 18px;
  padding: 8px 24px;
  background: var(--command-surface);
  border-bottom: 1px solid var(--command-line-soft);
}

body.finance-command.command-has-case .command-context {
  display: flex;
}

.command-identity {
  min-width: 190px;
}

.command-client-name {
  color: var(--command-ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.command-case-number {
  margin-top: 2px;
  color: var(--command-muted);
  font-size: 12px;
}

.command-case-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--skip);
  background: var(--skip-bg);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
  max-width: min(320px, 28vw);
  overflow: hidden;
  text-overflow: ellipsis;
}

.command-case-status.ready {
  color: var(--pass);
  background: var(--pass-bg);
}

.command-case-stat {
  min-width: 96px;
  padding-left: 16px;
  border-left: 1px solid var(--command-line-soft);
}

.command-case-stat span {
  display: block;
  color: var(--command-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.command-case-stat strong {
  display: block;
  margin-top: 2px;
  color: var(--command-ink);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.command-context-spacer {
  flex: 1;
}

.command-switch-case {
  padding: 7px 16px !important;
}

/* Tabs */
.command-tabs {
  display: none;
  gap: 4px;
  padding: 0 24px;
  background: var(--command-surface);
  border-bottom: 1px solid var(--command-line);
}

body.finance-command.command-has-case .command-tabs {
  display: flex;
  position: sticky;
  top: 52px;
  z-index: 80;
}

.command-tab {
  position: relative;
  min-width: 96px;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--command-muted);
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.command-tab:hover,
.command-tab:focus-visible {
  color: var(--command-ink);
  outline: none;
}

.command-tab.active {
  color: var(--command-cyan-dark);
  border-bottom-color: var(--command-cyan);
  font-weight: 700;
}

.command-tab-count {
  display: none;
  min-width: 18px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--command-muted);
  background: var(--command-line-soft);
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
}

.command-tab.active .command-tab-count {
  color: #fff;
  background: var(--command-cyan);
}

.command-tab-count.has-value {
  display: inline-block;
}

/* Lookup card and the guard strip */
body.finance-command:not(.command-has-case) .container > .card:first-child,
body.finance-command.command-switching-case .container > .card:first-child {
  width: min(760px, 100%);
  margin: 42px auto;
  padding: 18px 20px;
}

/* Once a case is loaded the lookup FORM has done its job, but the card it
   sits in also holds #lookup-result -- and that is where every pre-submit
   guard lands. Hide the form column only; keep the guards on screen. */
body.finance-command.command-has-case:not(.command-switching-case) .container > .card:first-child {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

body.finance-command.command-has-case:not(.command-switching-case)
  .split-lookup > div:first-child {
  display: none;
}

body.finance-command .split-lookup {
  grid-template-columns: 1fr;
  gap: 14px;
}

body.finance-command #lookup-result:empty {
  display: none;
}

body.finance-command #lookup-result > .summary-grid,
body.finance-command #lookup-result > .banner.pass {
  display: none;
}

body.finance-command #lookup-result .banner {
  margin: 0 0 6px;
}

/* The pre-submit checks, tighter than Classic so the application fits one
   screen at 90%. !important beats the inline spacing the markup carries. */
body.finance-command #lookup-result > .banner.warn,
body.finance-command #lookup-result > .banner.fail {
  padding: 7px 12px !important;
  margin-bottom: 6px !important;
}

body.finance-command #lookup-result > .banner > div:first-child {
  margin-bottom: 2px !important;
}

body.finance-command #lookup-result > .banner ul {
  margin-top: 2px !important;
}

body.finance-command #lookup-result > .banner li {
  margin-bottom: 1px !important;
}

/* Application */
body.finance-command #submit-card {
  width: 100%;
}

body.finance-command #submit-card .section-title {
  margin: 12px 0 8px;
}

body.finance-command .command-application-overview {
  display: grid;
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 12px;
}

body.finance-command .command-application-overview.has-disclosure {
  grid-template-columns: minmax(210px, 250px) minmax(360px, 1fr) minmax(310px, 390px);
}

body.finance-command .command-amount-panel,
body.finance-command .command-disclosure-panel:not(.hidden) {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--command-line-soft);
  border-radius: 10px;
  background: #fbfdfe;
}

body.finance-command .command-amount-panel .field {
  margin-bottom: 0;
}

body.finance-command .command-panel-heading {
  margin-bottom: 10px;
}

body.finance-command .command-panel-heading strong {
  display: block;
  color: var(--command-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.finance-command .command-disclosure-panel:not(.hidden) {
  display: block;
  margin: 0;
}

body.finance-command #credit-panel {
  margin: 0;
  min-width: 0;
}

body.finance-command .credit-box {
  height: 100%;
  padding: 12px 14px;
}

body.finance-command .credit-head {
  min-height: 30px;
}

body.finance-command .credit-table-wrap {
  margin-top: 8px;
}

body.finance-command .credit-table {
  table-layout: fixed;
}

body.finance-command .credit-table th,
body.finance-command .credit-table td {
  padding: 6px 10px;
}

body.finance-command .credit-date,
body.finance-command .suggest-box {
  margin-top: 8px;
}

/* Lender selection */
body.finance-command .lender-grid-inner {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}

body.finance-command .lender-row {
  min-height: 46px;
  padding-top: 5px;
  padding-bottom: 5px;
}

body.finance-command .lender-row.available:has(input[type="checkbox"]:checked) {
  border-color: var(--command-cyan);
  background: var(--command-tint);
}

body.finance-command .lender-grid-inner > .lender-row.unavailable:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  min-height: 42px;
}

body.finance-command .lender-row .run-mode-select {
  width: min(132px, 24%);
  max-width: 132px;
}

body.finance-command .lender-row .command-review-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

body.finance-command .lender-row .command-review-button svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Results */
body.finance-command #results-collapse-bar {
  display: none !important;
}

body.finance-command #submit-result {
  margin-top: 0 !important;
}

body.finance-command #submit-result > .banner:first-child {
  margin-bottom: 8px;
  padding: 9px 14px;
}

body.finance-command .results-grid.single {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

/* A lender card is two lines: who (name, ID, tier, status) and what (amount,
   terms, actions). Notes and warnings follow at full width underneath. */
body.finance-command .result-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 16px;
  row-gap: 4px;
  padding: 10px 16px 11px;
}

body.finance-command .result-card > .head,
body.finance-command .result-card > .body {
  display: contents;
}

body.finance-command .result-card > *,
body.finance-command .result-card > .head > *,
body.finance-command .result-card > .body > * {
  flex: 1 1 100%;
  min-width: 0;
  order: 20;
}

body.finance-command .result-card > .head > .name,
body.finance-command .result-card > .result-card-head {
  order: 1;
}

body.finance-command .result-card > .head > .name {
  flex: 0 1 auto;
}

body.finance-command .result-card > .body > .lc-id {
  order: 2;
  flex: 0 0 auto;
}

body.finance-command .result-card > .body > .lc-tier,
body.finance-command .result-card > .body > .lc-reason {
  order: 3;
  flex: 0 1 auto;
  margin: 0 !important;
  color: var(--command-muted);
  font-size: 12px !important;
}

body.finance-command .result-card > .head > .badge {
  order: 4;
  flex: 0 0 auto;
}

body.finance-command .result-card > .head > .name + .badge {
  margin-left: auto;
}

body.finance-command .result-card > .body > .lc-foot {
  order: 5;
  flex: 0 0 auto;
  margin: 0 !important;
  gap: 10px !important;
}

body.finance-command .result-card:has(.lc-amt, .lc-terms)::before {
  content: "";
  order: 6;
  flex: 0 0 100%;
  height: 0;
}

body.finance-command .result-card > .body > .lc-amt {
  order: 7;
  flex: 0 0 360px;
  align-self: flex-end;
  width: 360px;
  min-width: 0;
  margin: 0 !important;
}

body.finance-command .result-card > .body > .lc-terms {
  order: 8;
  flex: 0 1 auto;
  width: auto !important;
  margin: 0 !important;
}

body.finance-command .result-card:has(.lc-terms tbody tr + tr) > .body > .lc-amt {
  align-self: center;
}

body.finance-command .result-card > .body > .lc-copy {
  order: 21;
  flex: 0 0 auto;
}

body.finance-command .result-card:has(.lc-amt, .lc-terms) > .body > .lc-foot {
  order: 9;
  margin-left: auto !important;
}

body.finance-command .result-card > .body > a.offer-link {
  order: 9;
  flex: 0 0 auto;
}

body.finance-command .result-card > .body > details {
  flex: 0 0 auto;
  margin: 0 !important;
}

body.finance-command .result-card > .body > details.lc-raw {
  order: 21;
}

body.finance-command .result-card > .body > details[open],
body.finance-command .lc-foot > details[open] {
  flex: 1 1 100%;
  order: 30;
}

body.finance-command .lc-foot:has(> details[open]) {
  flex: 1 1 100% !important;
  flex-wrap: wrap;
}

body.finance-command .result-card > .body > .banner {
  margin: 2px 0 0 !important;
}

body.finance-command .result-card > .body > .lc-verify,
body.finance-command .result-card > .body > .lc-note,
body.finance-command .result-card > .body > .lc-hint {
  margin: 0 !important;
}

body.finance-command .lc-terms thead {
  font-size: 10px !important;
}

body.finance-command .lc-terms tr {
  border-bottom: 0 !important;
}

body.finance-command .lc-terms th {
  min-width: 90px;
  padding: 0 30px 2px 0 !important;
  font-weight: 700;
  white-space: nowrap;
}

body.finance-command .lc-terms th:empty {
  min-width: 0;
}

body.finance-command .lc-terms td {
  padding: 1px 30px 1px 0 !important;
  white-space: nowrap;
}

body.finance-command .lc-terms th[class*="lc-c-"],
body.finance-command .lc-terms td[class*="lc-c-"] {
  box-sizing: border-box;
  padding-right: 18px !important;
}

body.finance-command .lc-terms .lc-c-pick { width: 40px; min-width: 40px; }
body.finance-command .lc-terms .lc-c-pick input[type="radio"] { margin: 0; }

/* One offer or several, the columns start at the same x: a single-offer card
   keeps a blank pick column. Wide screens only - narrow ones stack. */
@media (min-width: 981px) {
  body.finance-command .lc-terms .lc-c-pick-none { display: table-cell; }
}
body.finance-command .lc-terms .lc-c-term { width: 92px; min-width: 92px; }
body.finance-command .lc-terms .lc-c-apr { width: 100px; min-width: 100px; }
body.finance-command .lc-terms .lc-c-dp { width: 120px; min-width: 120px; }
body.finance-command .lc-terms .lc-c-mo { width: 118px; min-width: 118px; }
body.finance-command .lc-terms .lc-c-pay { width: 96px; min-width: 96px; }
body.finance-command .lc-terms .lc-c-due { width: 150px; min-width: 150px; }

body.finance-command .lc-terms tbody tr + tr > td {
  padding-top: 4px !important;
  border-top: 1px solid var(--command-line-soft);
}

body.finance-command .lc-copy > button.primary {
  padding: 6px 14px;
  font-size: 12px;
}

body.finance-command .result-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
}

body.finance-command .result-card-title {
  margin-right: auto;
  font-size: 15px;
  font-weight: 700;
}

/* A joint deal draws one Blue card per application, in slots named
   settlement-handoff, settlement-handoff-1, and so on. Matching the id
   exactly styled only the first, so the second card sat flush against it. */
body.finance-command [id^="settlement-handoff"] > .result-card {
  margin-top: 8px !important;
}

body.finance-command .results-grid > [id^="settlement-handoff"] > .result-card {
  margin-top: 0 !important;
}

.command-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 32px;
  min-height: 30px;
  padding: 5px 8px !important;
}

.command-icon-button svg,
.command-save-all svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.command-save-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.command-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body.finance-command .command-build-stamp {
  display: none !important;
}

body.finance-command #wizard-banner,
body.finance-command #case-history {
  margin-top: 0 !important;
}

body.finance-command #wizard-banner > .card,
body.finance-command #case-history > .card {
  padding: 10px 16px !important;
}

.command-empty {
  display: grid;
  place-items: center;
  min-height: 200px;
  padding: 28px;
  color: var(--command-muted);
  background: var(--command-surface);
  border: 1px solid var(--command-line-soft);
  border-radius: 12px;
  text-align: center;
}

.command-empty strong {
  display: block;
  margin-bottom: 3px;
  color: var(--command-ink);
  font-size: 14px;
}

/* Tab visibility. Existing nodes remain in place so all legacy selectors,
   mutation observers, polling loops, and click handlers keep their targets. */
body.finance-command.command-view-application .command-results-only,
body.finance-command.command-view-application .command-history-only,
body.finance-command.command-view-results .command-application-only,
body.finance-command.command-view-results .command-history-only,
body.finance-command.command-view-history .command-application-only,
body.finance-command.command-view-history .command-results-only {
  display: none !important;
}

body.finance-command.command-view-application .command-results-only.command-inline-error {
  display: block !important;
}

body.finance-command.command-view-history #submit-card {
  display: none !important;
}

body.finance-command.command-view-history #case-history.hidden:not(:empty) {
  display: block !important;
}

body.finance-command.command-view-history #case-history-body.hidden {
  display: block !important;
}

body.finance-command.command-view-history #case-history > .card > button.secondary {
  display: none;
}

body.finance-command.command-view-history #case-history-body {
  margin-top: 0 !important;
}

body.finance-command :focus-visible {
  outline: 2px solid var(--command-cyan-dark);
  outline-offset: 2px;
}

/* Finalization wizard */
body.finance-command #wizard-modal > .modal-card {
  width: min(1180px, calc((100vw - 48px) / 0.9)) !important;
  max-width: none !important;
  max-height: calc((100vh - 48px) / 0.9) !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(15, 25, 36, 0.25);
}

body.finance-command #wizard-modal > .modal-card > div:first-child {
  gap: 12px !important;
  margin: 0 !important;
  padding: 16px 22px 14px;
}

body.finance-command #wizard-modal > .modal-card > div:first-child > button.secondary {
  padding: 6px 14px !important;
}

body.finance-command #wizard-lender-chip {
  padding: 3px 10px !important;
}

body.finance-command #wizard-steps-nav {
  flex-wrap: nowrap !important;
  gap: 2px !important;
  margin: 0 !important;
  padding: 0 22px;
  border-bottom: 1px solid var(--command-line);
  overflow-x: auto;
}

body.finance-command #wizard-steps-nav > button {
  flex: 0 0 auto;
  padding: 9px 14px 8px !important;
  border: 0 !important;
  border-bottom: 3px solid transparent !important;
  border-radius: 0 !important;
  color: var(--command-muted) !important;
  background: transparent !important;
  font-family: inherit;
  font-size: 13px !important;
  font-weight: 600;
  letter-spacing: 0;
  opacity: 1 !important;
}

body.finance-command #wizard-steps-nav > button:hover {
  color: var(--command-ink) !important;
}

body.finance-command #wizard-steps-nav > button[style*="opacity"] {
  color: var(--pass) !important;
}

body.finance-command #wizard-steps-nav > button.primary {
  color: var(--command-cyan-dark) !important;
  border-bottom-color: var(--command-cyan) !important;
  font-weight: 700;
}

body.finance-command #wizard-body {
  padding: 18px 22px 20px !important;
}

body.finance-command #wizard-body h4 {
  margin: 0 0 12px !important;
  color: var(--command-ink);
  font-size: 15px;
  font-weight: 700;
}

body.finance-command #wizard-footer {
  margin: 0 !important;
  padding: 12px 22px !important;
  border-top: 1px solid var(--command-line-soft) !important;
  background: var(--command-sub);
}

body.finance-command #wizard-body input[type="checkbox"],
body.finance-command #wizard-body input[type="radio"] {
  accent-color: var(--command-cyan-dark);
}

/* Every step: what you do on the left, what you read out on the right */
body.finance-command .wiz-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px 28px;
  align-items: start;
}

body.finance-command .wiz-cols:has(> .wiz-side:empty) {
  grid-template-columns: minmax(0, 1fr);
}

body.finance-command .wiz-side:empty {
  display: none;
}

body.finance-command .wiz-main > :first-child {
  margin-top: 0 !important;
}

body.finance-command #wiz-terms-save {
  margin: 12px 0 0 !important;
}

/* Read-aloud script sections */
body.finance-command .wiz-script {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 10px;
  align-items: start;
  margin: 14px 0 0;
}

body.finance-command .wiz-side > .wiz-script {
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
}

body.finance-command .wiz-script > div {
  margin: 0 !important;
  padding: 12px 14px !important;
  border: 1px solid var(--command-line-soft);
  border-radius: 10px !important;
  background: #f6f8fa !important;
}

body.finance-command .wiz-script > div > b {
  display: block;
  color: var(--command-muted);
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.finance-command .wiz-script > div > p {
  margin: 6px 0 0 !important;
  font-size: 13.5px !important;
  line-height: 1.6 !important;
}

/* Step 2: send controls, contract terms as one strip, the send form */
body.finance-command .wiz-actions {
  gap: 8px !important;
  margin: 12px 0 14px !important;
}

body.finance-command .wiz-actions > button.primary,
body.finance-command .wiz-actions > button.secondary,
body.finance-command .wiz-actions > a.secondary {
  padding: 8px 16px !important;
  font-size: 13px !important;
}

body.finance-command .wiz-actions > a.secondary {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--command-line);
  border-radius: 7px;
  color: var(--command-muted);
  font-weight: 600;
}

body.finance-command .wiz-actions > a.secondary:hover {
  color: var(--command-ink);
  border-color: var(--command-cyan);
}

body.finance-command .wiz-contract {
  display: grid;
  /* Three fixed tracks, the same for every lender (John, 2026-09-28):
       Amount financed | Monthly payment | Term
       APR             | First payment   | Email
       Offer           | (anything else fills the gaps)
     auto-fit let the column count float, and the two-track email then
     no longer fit beside First payment and dropped to a row of its own. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr);
  grid-auto-flow: row dense;
  gap: 10px 24px;
  margin: 0 0 14px;
  padding: 12px 16px !important;
  border: 1px solid var(--command-line-soft) !important;
  border-radius: 10px !important;
  background: var(--command-sub) !important;
}

body.finance-command .wiz-contract > .wiz-contract-h {
  grid-column: 1 / -1;
  margin: 0 !important;
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: 0.08em !important;
}

body.finance-command .wiz-contract > .wiz-kv {
  flex-direction: column;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 3px !important;
  min-width: 0;
  padding: 0 !important;
}

body.finance-command .wiz-contract > .wiz-kv > .wiz-kv-l {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.finance-command .wiz-contract > .wiz-kv > .wiz-kv-v {
  flex-wrap: wrap;
  gap: 2px 6px;
}

body.finance-command .wiz-contract > .wiz-kv > .wiz-kv-v > b {
  font-size: 15px;
}

body.finance-command .wiz-contract > .wiz-kv > .wiz-kv-v > .wiz-kv-sub {
  order: 5;
  flex-basis: 100%;
  font-size: 11.5px;
}

/* Fixed places for the figures John placed; the rest flow into the gaps.
   A long email breaks rather than running off the card. */
body.finance-command .wiz-contract > .wiz-kv[data-wiz-k="amount"] { grid-row: 2; grid-column: 1; }
body.finance-command .wiz-contract > .wiz-kv[data-wiz-k="monthly"] { grid-row: 2; grid-column: 2; }
body.finance-command .wiz-contract > .wiz-kv[data-wiz-k="term"] { grid-row: 2; grid-column: 3; }
body.finance-command .wiz-contract > .wiz-kv[data-wiz-k="apr"] { grid-row: 3; grid-column: 1; }
body.finance-command .wiz-contract > .wiz-kv[data-wiz-k="first_payment_date"] { grid-row: 3; grid-column: 2; }
body.finance-command .wiz-contract > .wiz-kv[data-wiz-k="email"] { grid-row: 3; grid-column: 3; }
body.finance-command .wiz-contract > .wiz-kv[data-wiz-k="offer"] { grid-row: 4; grid-column: 1; }

body.finance-command .wiz-contract > .wiz-kv[data-wiz-k="email"] > .wiz-kv-v {
  flex-wrap: nowrap;
  max-width: 100%;
}

body.finance-command .wiz-contract > .wiz-kv[data-wiz-k="email"] > .wiz-kv-v > b {
  font-size: 13px;
  min-width: 0;
  overflow-wrap: anywhere;
}

body.finance-command .wiz-contract .wiz-kv-note {
  text-align: left;
}

body.finance-command .wiz-contract > div:not(.wiz-kv):not(.wiz-contract-h) {
  grid-column: 1 / -1;
  margin: 0 !important;
}

body.finance-command .wiz-prep {
  margin: 0 0 14px !important;
  padding: 2px 16px !important;
  border: 1px solid var(--command-line-soft) !important;
  border-radius: 10px !important;
}

body.finance-command .wiz-prep > div[style*="flex-wrap"] {
  display: grid !important;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 4px 16px !important;
  align-items: center !important;
  padding: 10px 0 !important;
  border-bottom: 1px solid var(--command-line-soft);
}

body.finance-command .wiz-prep > div[style*="flex-wrap"]:last-child {
  border-bottom: 0;
}

body.finance-command .wiz-prep > div[style*="flex-wrap"] > div:first-child {
  min-width: 0 !important;
  color: #3d4f5e;
  font-size: 13px !important;
  font-weight: 600;
}

body.finance-command .wiz-prep > div[style*="flex-wrap"] > div:last-child {
  justify-self: start;
}

body.finance-command .wiz-prep select,
body.finance-command .wiz-prep input[type="text"],
body.finance-command .wiz-prep input[type="number"],
body.finance-command .wiz-prep input[type="date"] {
  padding: 7px 10px !important;
  font-size: 13px !important;
}

body.finance-command .wiz-prep select,
body.finance-command .wiz-prep input[type="date"],
body.finance-command .wiz-prep input[type="text"]:not([style*="width:120px"]),
body.finance-command .wiz-prep input[type="number"]:not([style*="width:120px"]) {
  width: auto !important;
}

body.finance-command #wiz-contract-email {
  padding: 7px 10px !important;
  border: 1.5px solid var(--command-line) !important;
  border-radius: 7px !important;
}

body.finance-command #wiz-contract-email:focus {
  border-color: var(--command-cyan) !important;
}

/* Documents, verification, review */
body.finance-command #wiz-drop {
  padding: 22px !important;
  border: 2px dashed var(--command-line) !important;
  border-radius: 12px !important;
  background: var(--command-sub) !important;
}

body.finance-command #wiz-drop label {
  display: inline;
  margin: 0;
  color: var(--command-cyan-dark) !important;
  font-weight: 600;
}

body.finance-command .wiz-checklist {
  margin: 0 0 14px;
  padding: 2px 16px;
  border: 1px solid var(--command-line-soft);
  border-radius: 10px;
}

body.finance-command .wiz-checklist:empty {
  display: none;
}

body.finance-command .wiz-checklist > div {
  gap: 10px !important;
  padding: 9px 0 !important;
  border-bottom: 1px solid var(--command-line-soft);
}

body.finance-command .wiz-checklist > div:last-child {
  border-bottom: 0;
}

body.finance-command .wiz-checklist i {
  font-size: 12.5px;
  font-style: normal;
}

body.finance-command .wiz-callcard {
  margin: 14px 0 0 !important;
  padding: 12px 16px !important;
  border: 1px solid var(--command-line-soft) !important;
  border-radius: 10px !important;
}

body.finance-command .wiz-callcard td {
  padding-top: 3px !important;
  padding-bottom: 3px !important;
}

@media (max-width: 980px) {
  .command-context {
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .command-context-spacer {
    display: none;
  }

  .command-switch-case {
    margin-left: auto;
  }

  body.finance-command .command-application-overview.has-disclosure {
    grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  }

  body.finance-command .command-application-overview.has-disclosure .command-disclosure-panel {
    grid-column: 1 / -1;
  }

  body.finance-command .results-grid.single {
    grid-template-columns: 1fr;
  }

  body.finance-command .result-card > .body > .lc-amt {
    min-width: 0;
  }

  body.finance-command .wiz-cols {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  body.finance-command .topbar-divider,
  body.finance-command .topbar-tool,
  body.finance-command .welcome {
    display: none;
  }

  body.finance-command .container {
    padding: 9px;
  }

  .command-context {
    padding: 8px 12px;
  }

  .command-identity {
    width: calc(100% - 118px);
    min-width: 0;
    order: 1;
  }

  .command-case-status {
    order: 4;
    width: 100%;
    max-width: 100%;
  }

  .command-case-stat {
    min-width: calc(33.333% - 10px);
    padding-left: 10px;
    order: 3;
  }

  .command-switch-case {
    order: 2;
  }

  .command-tabs {
    padding: 0 6px;
    overflow-x: auto;
  }

  .command-tab {
    min-width: 88px;
    padding: 7px 9px;
    white-space: nowrap;
  }

  body.finance-command:not(.command-has-case) .container > .card:first-child,
  body.finance-command.command-switching-case .container > .card:first-child {
    margin: 18px auto;
  }

  body.finance-command .lender-grid-inner {
    grid-template-columns: 1fr;
  }

  body.finance-command .lender-grid-inner > .lender-row.unavailable:last-child:nth-child(odd) {
    grid-column: auto;
  }

  body.finance-command .lender-row.available {
    flex-wrap: wrap;
  }

  body.finance-command .lender-row.available > label {
    flex: 1 1 calc(100% - 30px);
  }

  body.finance-command .lender-row .run-mode-select {
    flex: 1 1 130px;
    width: auto;
    max-width: none;
    margin-left: 26px;
    font-size: 11px;
  }

  body.finance-command .lender-row .command-review-button {
    flex: 0 0 82px;
    min-width: 82px;
  }

  body.finance-command .command-application-overview,
  body.finance-command .command-application-overview.has-disclosure {
    grid-template-columns: 1fr;
  }

  body.finance-command .command-application-overview.has-disclosure .command-disclosure-panel {
    grid-column: auto;
  }

  body.finance-command .actions-sticky {
    position: static;
  }

  body.finance-command .credit-table {
    min-width: 540px;
  }

  body.finance-command #wizard-modal > .modal-card {
    width: calc((100vw - 14px) / 0.9) !important;
    max-height: calc((100vh - 14px) / 0.9) !important;
  }

  body.finance-command .wiz-prep > div[style*="flex-wrap"] {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.finance-command *,
  body.finance-command *::before,
  body.finance-command *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
