a.nav-item { text-decoration: none; }
.nav-item[aria-current="page"] { background: var(--sidebar-active); color: #fff; }
.mobile-only { display: none; }
.badge-warn { background: #fff4e0; color: #8a5013; border-color: #f2dcb2; }
.badge-warn > span { background: #d58a1d; }
.finance-main { overflow: hidden; }
.heading-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.heading-actions a.button { text-decoration: none; }
.finance-metrics { display: grid; flex: none; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.finance-metrics .metric { grid-template-columns: auto minmax(0, 1fr); cursor: default; }
.attention { display: flex; flex: none; gap: 10px; align-items: flex-start; padding: 10px 13px; border: 1px solid #f2dcb2; background: #fff8ec; border-radius: 10px; color: #6d4910; font-size: 12px; }
.attention > .icon { color: #b46a12; margin-top: 1px; }
.attention p { margin-top: 3px; line-height: 1.6; }
.link-button { border: 0; background: none; padding: 0; color: var(--brand-dark); font-weight: 650; text-decoration: underline; font-size: inherit; }
.board-controls { display: flex; flex: none; gap: 10px; align-items: center; flex-wrap: wrap; }
.board-controls .search-box { margin: 0; flex: 1 1 260px; max-width: 420px; }
.board-controls label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 650; color: var(--muted); }
.board-controls select { border: 1px solid #dfe5ef; border-radius: 6px; padding: 6px 7px; font-size: 12px; background: #fff; color: var(--ink); }
.mobile-kind { display: none !important; }
.board { flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(226px, 1fr); gap: 10px; overflow: auto; padding-bottom: 6px; position: relative; }
.column { display: flex; flex-direction: column; min-height: 0; background: #eef1f7; border: 1px solid var(--line); border-radius: 12px; }
.column.drop-target { border-color: var(--brand-ring); background: var(--brand-light); }
.column header { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 10px 11px 8px; }
.column h2 { font-size: 12px; font-weight: 750; letter-spacing: -.01em; }
.column-body { display: flex; flex-direction: column; gap: 7px; padding: 0 8px 10px; overflow: auto; min-height: 60px; }
.column-empty { color: #7a889f; font-size: 11px; text-align: center; padding: 14px 0; }
.app-card { background: #fff; border: 1px solid #e0e6f0; border-radius: 9px; box-shadow: 0 1px 2px #15213a0a; }
.app-card[aria-current="true"] { border-color: var(--blue); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 20%, transparent); }
.app-card.needs-attention { border-left: 3px solid #d58a1d; }
.card-open { display: flex; flex-direction: column; gap: 5px; width: 100%; text-align: left; padding: 9px 10px; border: 0; background: transparent; color: var(--ink); }
.card-top { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.card-top strong { font-size: 12.5px; }
.card-line { font-size: 11px; color: #445775; }
.card-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; color: var(--muted); font-size: 10px; }
.card-meta span { display: inline-flex; align-items: center; gap: 3px; }
.card-meta .icon { width: 11px; height: 11px; }
.warn { color: #9c450e; font-weight: 650; }
.kind { display: inline-block; align-self: flex-start; font-size: 10px; font-weight: 700; border-radius: 4px; padding: 1px 5px; }
.kind-vehicle { color: var(--brand-deep); background: var(--brand-soft); }
.kind-finance_only { color: #6d3fa6; background: #f0e8fc; }
.chip { display: inline-block; white-space: nowrap; font-size: 10px; font-weight: 650; border-radius: 10px; padding: 2px 7px; background: #edf1f7; color: #4f5f7a; }
.chip-under_review, .chip-submitted { background: var(--brand-light); color: var(--brand-dark); }
.chip-approved, .chip-doc-verified { background: #e3f6ee; color: #11694f; }
.chip-declined, .chip-doc-rejected { background: #fdebe7; color: #a3361d; }
.chip-doc-requested { background: #fff2e0; color: #8a5013; }
.chip-doc-received { background: var(--brand-light); color: var(--brand-dark); }
.board-empty { position: absolute; inset: 40px 0 auto; margin: auto; max-width: 420px; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; z-index: 1; }
.drawer { position: fixed; z-index: 3; inset: 0 0 0 auto; width: min(560px, 100%); background: #fff; border-left: 1px solid var(--line); box-shadow: -14px 0 36px #15213a24; overflow: auto; overscroll-behavior: contain; }
.drawer-backdrop { position: fixed; z-index: 2; inset: 0; background: #111c3040; }
.drawer-body { padding: 16px 18px 28px; }
.drawer-heading { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.drawer-heading h2 { font-size: 20px; letter-spacing: -.02em; }
.drawer-heading p { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--muted); font-size: 11px; }
.drawer-section { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.drawer-section label { display: block; font-size: 11px; font-weight: 650; color: #485c77; }
.drawer-section select, .drawer-section input:not([type="checkbox"]):not([type="file"]), .drawer-section textarea { display: block; width: 100%; min-width: 0; color: var(--ink); background: #fff; border: 1px solid #dfe5ef; border-radius: 6px; padding: 6px 7px; margin-top: 3px; font-size: 12px; }
.stage-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stage-controls .wide { grid-column: 1 / -1; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.section-heading .detail-label { margin: 0; }
.button.small { min-height: 28px; padding: 4px 8px; font-size: 11px; }
.button.danger { color: #a3361d; border-color: #f0c9bf; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 14px; margin: 0; }
.facts div { min-width: 0; }
.facts dt { font-size: 10px; color: var(--muted); font-weight: 650; }
.facts dd { margin: 1px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.notice { font-size: 11px; color: var(--muted); background: #f5f7fb; border-radius: 7px; padding: 7px 9px; margin: 6px 0; line-height: 1.45; }
.notice.warn { background: #fff4e6; }
.muted { color: var(--muted); font-size: 11px; }
.doc-list, .lender-list, .lead-list, .activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.doc-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; }
.doc-name { display: flex; gap: 7px; align-items: flex-start; min-width: 0; }
.doc-name > .icon { color: #5a71b8; margin-top: 1px; }
.doc-name strong { display: block; font-size: 12px; }
.doc-name small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; overflow-wrap: anywhere; }
.doc-actions { display: flex; gap: 4px; }
.doc-actions a.icon-button { text-decoration: none; }
.upload { position: relative; overflow: hidden; cursor: pointer; }
.upload input, .upload-any input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-any { position: relative; overflow: hidden; }
.request-docs { margin-top: 8px; font-size: 12px; }
.request-docs summary { cursor: pointer; color: var(--brand-dark); font-weight: 650; font-size: 11px; }
.doc-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; margin: 8px 0; }
.doc-choices label { display: flex; gap: 5px; align-items: center; font-weight: 550; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.row-actions select { width: auto !important; margin: 0 !important; }
.row-actions a.button { text-decoration: none; }
.draft-message { margin-top: 10px; background: #f5f7fb; border-radius: 8px; padding: 8px; }
.draft-message textarea { margin-top: 6px; font-size: 11px !important; resize: vertical; }
.lender-list li { border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; }
.lender-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; }
.lender-update, .add-lender { display: grid; grid-template-columns: 1.2fr 1fr .7fr 1.3fr auto; gap: 5px; margin-top: 6px; align-items: end; }
.lender-update > *, .add-lender > * { margin-top: 0 !important; }
.add-lender { grid-template-columns: 1fr 1fr auto; margin-top: 8px; }
.lead-list li { display: flex; gap: 6px; align-items: center; font-size: 12px; flex-wrap: wrap; }
.lead-list .icon { width: 14px; height: 14px; color: #5a71b8; }
.note-form { display: grid; gap: 5px; justify-items: end; margin-bottom: 8px; }
.activity li { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: #3f5170; border-bottom: 1px solid #f0f2f7; padding-bottom: 5px; }
.activity li time { color: var(--muted); white-space: nowrap; font-size: 10px; }
.activity-note span { background: #fff7e6; border-radius: 5px; padding: 2px 5px; }

@media (max-width: 1130px) {
  .finance-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  .mobile-only { display: inline-flex; }
  .mobile-kind { display: flex !important; }
  .finance-main { overflow: auto; }
  .finance-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .heading-actions { width: 100%; }
  .page-heading { flex-wrap: wrap; }
  .board { grid-auto-columns: 86%; scroll-snap-type: x mandatory; min-height: 420px; }
  .column { scroll-snap-align: start; }
  .stage-controls, .facts, .doc-choices { grid-template-columns: minmax(0, 1fr); }
  .lender-update { grid-template-columns: 1fr 1fr; }
  .add-lender { grid-template-columns: 1fr; }
  .drawer-body { padding: 12px 12px 24px; }
}
.app-card .sample-badge, .drawer-heading .sample-badge { font-size: 10px; }
