/*
 * YatraMatrix Finance Visual V2
 *
 * Presentation and navigation layer only. Canonical values, RBAC,
 * books-readiness, maker-checker and provider safety remain owned by the
 * existing Accounting runtime.
 */

:root {
  --fv2-navy: #071f52;
  --fv2-navy-2: #0a357b;
  --fv2-blue: #1261ee;
  --fv2-blue-soft: #eaf2ff;
  --fv2-orange: #ff6b1a;
  --fv2-orange-soft: #fff1e7;
  --fv2-green: #119b5b;
  --fv2-green-soft: #e8f8ef;
  --fv2-red: #df243c;
  --fv2-red-soft: #ffedf0;
  --fv2-purple: #7544dc;
  --fv2-purple-soft: #f2ecff;
  --fv2-cyan: #0496b7;
  --fv2-ink: #0d1f46;
  --fv2-muted: #65718b;
  --fv2-border: #dfe6f1;
  --fv2-canvas: #f6f8fc;
  --fv2-surface: #ffffff;
  --fv2-shadow: 0 12px 32px rgba(14, 37, 82, 0.08);
  --fv2-shadow-soft: 0 5px 18px rgba(14, 37, 82, 0.055);
}

body.finance-v2-active {
  background: var(--fv2-canvas);
}

body.finance-v2-active::before {
  display: none;
}

body.finance-v2-active .shell {
  grid-template-columns: 220px minmax(0, 1fr);
  background: var(--fv2-canvas);
}

body.finance-v2-active .sidebar {
  z-index: 100;
  gap: 8px;
  padding: 18px 12px 14px;
  color: #fff;
  border: 0;
  background:
    radial-gradient(circle at 20% 0, rgba(46, 117, 255, 0.5), transparent 23rem),
    linear-gradient(180deg, #073782 0%, #062c69 46%, #041c4b 100%);
  box-shadow: 10px 0 30px rgba(7, 31, 82, 0.14);
}

body.finance-v2-active .sidebar-brand {
  padding: 0 4px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  background: transparent;
}

body.finance-v2-active .sidebar-brand > p,
body.finance-v2-active .workspace-rail button > small,
body.finance-v2-active .nav-group-label > small {
  display: none;
}

body.finance-v2-active .sidebar .brand-logo-mark {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

body.finance-v2-active .sidebar h1,
body.finance-v2-active .sidebar .brand-copy h1,
body.finance-v2-active .sidebar .sidebar-eyebrow,
body.finance-v2-active .sidebar .nav-title,
body.finance-v2-active .sidebar .workspace-rail-label strong {
  color: #fff;
}

body.finance-v2-active .sidebar .brand-copy small,
body.finance-v2-active .sidebar > p,
body.finance-v2-active .sidebar .nav-copy,
body.finance-v2-active .sidebar .workspace-rail button small,
body.finance-v2-active .sidebar .sidebar-workspace-note p,
body.finance-v2-active .sidebar .nav-group-label small {
  color: rgba(231, 240, 255, 0.68);
}

body.finance-v2-active .sidebar .sidebar-eyebrow {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
}

body.finance-v2-active .workspace-switcher {
  min-height: 0;
}

body.finance-v2-active .workspace-rail {
  gap: 4px;
}

body.finance-v2-active .finance-lite-advanced-menu {
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 8px;
}

body.finance-v2-active .finance-lite-advanced-menu > summary {
  cursor: pointer;
  list-style: none;
  padding: 10px;
  color: rgba(231, 240, 255, 0.82);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

body.finance-v2-active .finance-lite-advanced-menu > summary::after {
  content: "+";
  float: right;
}

body.finance-v2-active .finance-lite-advanced-menu[open] > summary::after {
  content: "−";
}

body.finance-v2-active .workspace-rail-advanced {
  display: grid;
  gap: 3px;
}

body.finance-v2-active .workspace-rail-advanced button {
  min-height: 38px;
  opacity: .88;
}

body.finance-v2-active .workspace-rail button,
body.finance-v2-active .nav button {
  min-height: 44px;
  padding: 9px 10px;
  color: rgba(242, 247, 255, 0.86);
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
}

body.finance-v2-active .workspace-rail button:hover,
body.finance-v2-active .workspace-rail button:focus-visible,
body.finance-v2-active .nav button:hover,
body.finance-v2-active .nav button:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
}

body.finance-v2-active .workspace-rail button.active,
body.finance-v2-active .nav button.active {
  color: #fff;
  border-color: rgba(89, 151, 255, 0.7);
  background: linear-gradient(135deg, #1768ed, #1557cc);
  box-shadow: 0 7px 18px rgba(0, 34, 108, 0.28);
}

body.finance-v2-active .workspace-rail-badge,
body.finance-v2-active .nav-badge,
body.finance-v2-active .workspace-rail button.active .workspace-rail-badge,
body.finance-v2-active .nav button.active .nav-badge {
  color: #dce9ff;
  background: rgba(255, 255, 255, 0.14);
}

body.finance-v2-active .sidebar-summary-card,
body.finance-v2-active .sidebar-workspace-note,
body.finance-v2-active .sidebar-tip {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

body.finance-v2-active .sidebar-summary-card,
body.finance-v2-active .sidebar > p,
body.finance-v2-active .sidebar-tip,
body.finance-v2-active .sidebar-workspace-note,
body.finance-v2-active .nav {
  display: none;
}

body.finance-v2-active .main {
  min-width: 0;
  padding: 0 18px 96px;
}

body.finance-v2-active .finance-visual-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  grid-template-columns: minmax(220px, 0.8fr) minmax(240px, 1.25fr) max-content;
  min-height: 70px;
  margin: 0 -18px 16px;
  padding: 10px 18px;
  border: 0;
  border-bottom: 1px solid var(--fv2-border);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 20px rgba(13, 31, 70, 0.04);
}

body.finance-v2-active .finance-visual-user > div {
  max-width: 112px;
}

body.finance-v2-active .finance-visual-user strong,
body.finance-v2-active .finance-visual-user small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.finance-v2-active .finance-visual-topbar__mark {
  display: none;
}

body.finance-v2-active .finance-visual-topbar__identity strong {
  color: var(--fv2-ink);
  font-size: 22px;
}

body.finance-v2-active .finance-visual-topbar__identity small {
  color: var(--fv2-muted);
}

body.finance-v2-active .finance-visual-search {
  height: 42px;
  border-color: var(--fv2-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(13, 31, 70, 0.02);
}

body.finance-v2-active .finance-visual-date,
body.finance-v2-active .finance-visual-books-status {
  border-color: var(--fv2-border);
  border-radius: 10px;
  box-shadow: none;
}

body.finance-v2-active:not(.finance-v2-detail-open) .hero,
body.finance-v2-active:not(.finance-v2-detail-open) #financeWorkspaceOverview,
body.finance-v2-active:not(.finance-v2-detail-open) #financeOperatorDeck {
  display: none !important;
}

body.finance-v2-active .workspace-toast {
  top: 82px;
  right: 18px;
  bottom: auto;
  max-width: 320px;
}

body.finance-v2-active:not(.finance-v2-detail-open) .workspace-toast {
  display: none !important;
}

.finance-v2-mobile-nav {
  display: none;
}

.finance-v2-stage {
  display: grid;
  gap: 14px;
  width: 100%;
  min-width: 0;
  color: var(--fv2-ink);
  scroll-margin-top: 82px;
}

.finance-v2-stage[hidden] {
  display: none !important;
}

.finance-v2-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.finance-v2-page-head__copy {
  min-width: 0;
}

.finance-v2-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--fv2-blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.finance-v2-page-head h2 {
  margin: 0;
  color: var(--fv2-ink);
  font-size: clamp(26px, 2.4vw, 36px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.finance-v2-page-head p {
  max-width: 780px;
  margin: 7px 0 0;
  color: var(--fv2-muted);
  font-size: 14px;
  line-height: 1.55;
}

.finance-v2-head-actions,
.finance-v2-tabs,
.finance-v2-filter-row,
.finance-v2-button-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.finance-v2-head-actions button,
.finance-v2-tabs button,
.finance-v2-filter-row button,
.finance-v2-button-row button,
.finance-v2-stage button {
  min-height: 38px;
  padding: 9px 14px;
  color: var(--fv2-ink);
  border: 1px solid #cfd9e8;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.finance-v2-stage button:hover:not(:disabled),
.finance-v2-stage button:focus-visible:not(:disabled) {
  color: var(--fv2-blue);
  border-color: #8fb3ff;
  background: #f5f8ff;
}

.finance-v2-stage button.is-primary,
.finance-v2-stage button[aria-selected="true"] {
  color: #fff;
  border-color: var(--fv2-blue);
  background: linear-gradient(135deg, #1769ee, #0b50d8);
  box-shadow: 0 8px 20px rgba(18, 97, 238, 0.18);
}

.finance-v2-stage button.is-orange {
  color: #fff;
  border-color: var(--fv2-orange);
  background: linear-gradient(135deg, #ff7b2d, #f3530c);
}

.finance-v2-stage button.is-danger {
  color: var(--fv2-red);
  border-color: #ffafb9;
  background: #fff;
}

.finance-v2-stage button:disabled,
.finance-v2-stage [aria-disabled="true"] {
  cursor: not-allowed;
  color: #8993a7;
  border-color: #dde2eb;
  background: #eef1f5;
  opacity: 0.78;
}

.finance-v2-tabs {
  padding: 4px;
  border: 1px solid var(--fv2-border);
  border-radius: 10px;
  background: #fff;
}

.finance-v2-tabs button {
  min-height: 34px;
  padding: 7px 12px;
  border-color: transparent;
}

.finance-v2-safety-banner,
.finance-v2-info-banner,
.finance-v2-warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid #c9dafd;
  border-radius: 9px;
  color: #17428d;
  background: #eff5ff;
  font-size: 12px;
  line-height: 1.45;
}

.finance-v2-warning-banner {
  color: #ad4c0f;
  border-color: #ffd0ad;
  background: #fff6ef;
}

.finance-v2-safety-banner::before,
.finance-v2-info-banner::before,
.finance-v2-warning-banner::before {
  content: "i";
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: #fff;
  border-radius: 50%;
  background: var(--fv2-blue);
  font-weight: 900;
}

.finance-v2-warning-banner::before {
  content: "!";
  background: var(--fv2-orange);
}

.finance-v2-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.finance-v2-kpis.is-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.finance-v2-kpis.is-six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.finance-v2-kpi,
.finance-v2-panel,
.finance-v2-list-card,
.finance-v2-document-card,
.finance-v2-form-card,
.finance-v2-preview-card {
  min-width: 0;
  border: 1px solid var(--fv2-border);
  border-radius: 12px;
  background: var(--fv2-surface);
  box-shadow: var(--fv2-shadow-soft);
}

.finance-v2-kpi {
  position: relative;
  overflow: hidden;
  min-height: 116px;
  padding: 16px;
}

.finance-v2-kpi::after {
  content: "";
  position: absolute;
  right: -25px;
  bottom: -34px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--fv2-blue-soft);
  opacity: 0.65;
}

.finance-v2-kpi.is-green::after { background: var(--fv2-green-soft); }
.finance-v2-kpi.is-orange::after { background: var(--fv2-orange-soft); }
.finance-v2-kpi.is-red::after { background: var(--fv2-red-soft); }
.finance-v2-kpi.is-purple::after { background: var(--fv2-purple-soft); }

.finance-v2-kpi__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.finance-v2-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  color: var(--fv2-blue);
  border-radius: 50%;
  background: var(--fv2-blue-soft);
  font-size: 17px;
  font-weight: 900;
}

.finance-v2-icon.is-green { color: var(--fv2-green); background: var(--fv2-green-soft); }
.finance-v2-icon.is-orange { color: var(--fv2-orange); background: var(--fv2-orange-soft); }
.finance-v2-icon.is-red { color: var(--fv2-red); background: var(--fv2-red-soft); }
.finance-v2-icon.is-purple { color: var(--fv2-purple); background: var(--fv2-purple-soft); }

.finance-v2-kpi span,
.finance-v2-mini-label {
  color: var(--fv2-muted);
  font-size: 11px;
  font-weight: 700;
}

.finance-v2-kpi strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 9px;
  color: var(--fv2-ink);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.finance-v2-kpi small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 5px;
  color: var(--fv2-muted);
  font-size: 11px;
}

.finance-v2-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 12px;
  min-width: 0;
}

.finance-v2-grid.is-even {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-v2-grid.is-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-v2-panel {
  overflow: hidden;
}

.finance-v2-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--fv2-border);
}

.finance-v2-panel__head h3,
.finance-v2-panel__head h4 {
  margin: 0;
  color: var(--fv2-ink);
  font-size: 15px;
}

.finance-v2-panel__body {
  padding: 14px;
}

.finance-v2-table-shell {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.finance-v2-table {
  width: 100%;
  min-width: 690px;
  border-collapse: collapse;
  color: var(--fv2-ink);
  font-size: 12px;
}

.finance-v2-table.is-compact {
  min-width: 560px;
}

.finance-v2-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  color: #4b5874;
  border-bottom: 1px solid var(--fv2-border);
  background: #f7f9fd;
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.finance-v2-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf0f5;
  vertical-align: top;
}

.finance-v2-empty-row td {
  height: 118px;
  color: var(--fv2-muted);
  text-align: center;
}

.finance-v2-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #2d5ac5;
  background: var(--fv2-blue-soft);
  font-size: 10px;
  font-weight: 800;
}

.finance-v2-status.is-green { color: #087b43; background: var(--fv2-green-soft); }
.finance-v2-status.is-orange { color: #b6530d; background: var(--fv2-orange-soft); }
.finance-v2-status.is-red { color: #bc1d31; background: var(--fv2-red-soft); }
.finance-v2-status.is-purple { color: #6033bf; background: var(--fv2-purple-soft); }

.finance-v2-list {
  display: grid;
  gap: 0;
}

.finance-v2-list-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 2px;
  border-bottom: 1px solid #edf0f5;
}

.finance-v2-list-item:last-child {
  border-bottom: 0;
}

.finance-v2-list-item strong,
.finance-v2-list-item small {
  display: block;
}

.finance-v2-list-item strong {
  font-size: 12px;
}

.finance-v2-list-item small {
  margin-top: 3px;
  color: var(--fv2-muted);
  font-size: 10px;
}

.finance-v2-lifecycle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 18px 12px;
}

.finance-v2-life-step {
  position: relative;
  display: grid;
  justify-items: center;
  min-width: 66px;
  color: var(--fv2-muted);
  font-size: 10px;
  text-align: center;
}

.finance-v2-life-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 18px;
  left: calc(50% + 28px);
  width: calc(100% - 38px);
  height: 1px;
  background: #cdd7e7;
}

.finance-v2-life-step .finance-v2-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 7px;
  border: 1px solid #cbd9f4;
  background: #fff;
}

.finance-v2-timeline {
  display: grid;
  gap: 0;
  padding: 3px 0;
}

.finance-v2-timeline-step {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(130px, 0.65fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 61px;
  padding: 8px 4px;
  border-bottom: 1px solid #edf0f5;
}

.finance-v2-timeline-step__num {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: var(--fv2-blue);
  border: 1px solid #8eb2ff;
  border-radius: 50%;
  background: #fff;
  font-size: 10px;
  font-weight: 900;
}

.finance-v2-timeline-step strong,
.finance-v2-timeline-step small {
  display: block;
}

.finance-v2-timeline-step small {
  margin-top: 3px;
  color: var(--fv2-muted);
  font-size: 10px;
}

.finance-v2-match-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

.finance-v2-match-card {
  position: relative;
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--fv2-border);
  border-radius: 12px;
  background: #fff;
}

.finance-v2-match-card:not(:last-child)::after {
  content: "Matched";
  position: absolute;
  z-index: 2;
  top: 47px;
  right: -42px;
  padding: 3px 7px;
  color: #087b43;
  border: 1px solid #88d4ae;
  border-radius: 999px;
  background: #f1fbf6;
  font-size: 9px;
  font-weight: 900;
}

.finance-v2-match-card h4 {
  margin: 0 0 9px;
  font-size: 14px;
}

.finance-v2-match-card p {
  margin: 4px 0;
  color: var(--fv2-muted);
  font-size: 11px;
}

.finance-v2-form {
  display: grid;
  gap: 11px;
}

.finance-v2-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.finance-v2-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.finance-v2-field label,
.finance-v2-field > span {
  color: #39496a;
  font-size: 10px;
  font-weight: 800;
}

.finance-v2-field input,
.finance-v2-field select,
.finance-v2-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 41px;
  padding: 9px 11px;
  color: var(--fv2-ink);
  border: 1px solid #d4dce9;
  border-radius: 8px;
  background: #fff;
  font: inherit;
}

.finance-v2-field textarea {
  min-height: 82px;
  resize: vertical;
}

.finance-v2-field input:disabled,
.finance-v2-field select:disabled,
.finance-v2-field textarea:disabled {
  color: #7d879b;
  background: #f3f5f8;
}

.finance-v2-upload {
  display: grid;
  place-items: center;
  min-height: 138px;
  padding: 18px;
  color: var(--fv2-blue);
  border: 2px dashed #7ca6ff;
  border-radius: 12px;
  background: #f7faff;
  text-align: center;
}

.finance-v2-upload strong,
.finance-v2-upload small {
  display: block;
}

.finance-v2-upload small {
  margin-top: 6px;
  color: var(--fv2-muted);
}

.finance-v2-doc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.finance-v2-document-card {
  padding: 11px;
}

.finance-v2-document-paper,
.finance-v2-ledger-paper {
  position: relative;
  min-height: 160px;
  padding: 13px;
  color: #1d2d4f;
  border: 1px solid #d8dee8;
  background:
    linear-gradient(#fff, #fff) padding-box,
    repeating-linear-gradient(180deg, transparent 0 18px, #e8ecf3 18px 19px);
  box-shadow: 0 4px 14px rgba(13, 31, 70, 0.07);
}

.finance-v2-document-paper::after {
  content: "PREVIEW";
  position: absolute;
  right: 10px;
  bottom: 10px;
  color: rgba(17, 155, 91, 0.65);
  border: 2px solid rgba(17, 155, 91, 0.45);
  transform: rotate(-8deg);
  font-size: 12px;
  font-weight: 900;
}

.finance-v2-document-card h4 {
  margin: 10px 0 2px;
  font-size: 12px;
}

.finance-v2-document-card p {
  margin: 0;
  color: var(--fv2-muted);
  font-size: 10px;
}

.finance-v2-filter-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 12px;
}

.finance-v2-filter-drawer {
  align-self: stretch;
}

.finance-v2-filter-group {
  display: grid;
  gap: 8px;
  margin-bottom: 9px;
  padding: 11px;
  border: 1px solid #e1e6ef;
  border-radius: 8px;
  background: #fff;
}

.finance-v2-filter-group strong {
  font-size: 11px;
}

.finance-v2-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 14px;
  min-height: 190px;
  padding: 24px 16px 12px;
  border-bottom: 1px solid #dfe5ef;
}

.finance-v2-bar-group {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  min-width: 44px;
}

.finance-v2-bar {
  width: 12px;
  min-height: 16px;
  border-radius: 3px 3px 0 0;
  background: var(--fv2-blue);
}

.finance-v2-bar.is-light { background: #8db8ff; }
.finance-v2-bar.is-green { background: #4dbd82; }

.finance-v2-checklist {
  display: grid;
  gap: 0;
}

.finance-v2-check {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 49px;
  padding: 8px 2px;
  border-bottom: 1px solid #edf0f5;
  font-size: 11px;
}

.finance-v2-check::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #fff;
  border-radius: 50%;
  background: var(--fv2-green);
  font-weight: 900;
}

.finance-v2-check.is-blocked::before {
  content: "!";
  background: var(--fv2-red);
}

.finance-v2-check.is-pending::before {
  content: "•";
  background: var(--fv2-orange);
}

.finance-v2-mobile-card {
  max-width: 520px;
  margin: 0 auto;
}

.finance-v2-mobile-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.finance-v2-mobile-action {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 12px 7px;
  color: var(--fv2-ink);
  border: 1px solid var(--fv2-border);
  border-radius: 12px;
  background: #fff;
  font-size: 10px;
  text-align: center;
}

.finance-v2-delivery-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.finance-v2-delivery-option {
  padding: 14px;
  border: 1px solid #d5ddea;
  border-radius: 10px;
  background: #fff;
}

.finance-v2-workflow-bar {
  position: sticky;
  top: 80px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 10px 12px;
  color: var(--fv2-ink);
  border: 1px solid #cbd9f4;
  border-radius: 10px;
  background: rgba(244, 248, 255, 0.96);
  box-shadow: var(--fv2-shadow-soft);
  backdrop-filter: blur(12px);
}

.finance-v2-workflow-bar[hidden] {
  display: none !important;
}

.finance-v2-workflow-bar span,
.finance-v2-workflow-bar strong {
  display: block;
}

.finance-v2-workflow-bar span {
  color: var(--fv2-blue);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.finance-v2-workflow-bar strong {
  margin-top: 2px;
  font-size: 13px;
}

body.finance-v2-active:not(.finance-v2-detail-open) > .shell > .main > .grid {
  display: none !important;
}

body.finance-v2-active.finance-v2-detail-open > .shell > .main > .grid {
  display: grid;
}

body.finance-v2-active.finance-v2-detail-open .grid > .workspace-section:not(.workspace-module-hidden),
body.finance-v2-active.finance-v2-detail-open .grid > section:not([hidden]) {
  border-color: var(--fv2-border);
  border-radius: 12px;
  box-shadow: var(--fv2-shadow-soft);
}

@media (max-width: 1280px) {
  body.finance-v2-active .shell {
    grid-template-columns: 205px minmax(0, 1fr);
  }

  body.finance-v2-active .finance-visual-topbar {
    grid-template-columns: minmax(230px, auto) minmax(220px, 1fr) auto;
  }

  .finance-v2-kpis.is-six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .finance-v2-doc-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  body.finance-v2-active .shell {
    grid-template-columns: 1fr;
  }

  body.finance-v2-active .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(320px, calc(100vw - 42px));
    max-height: none;
    transform: translateX(-104%);
    visibility: hidden;
    transition: transform 180ms ease, visibility 180ms ease;
  }

  body.finance-v2-active.finance-mobile-workspace-open .sidebar {
    transform: translateX(0);
    visibility: visible;
  }

  body.finance-v2-active.finance-mobile-workspace-open .finance-v2-mobile-nav {
    visibility: hidden;
    pointer-events: none;
  }

  body.finance-v2-active .finance-visual-workspace-backdrop:not([hidden]) {
    z-index: 90;
  }

  body.finance-v2-active .sidebar-body {
    max-height: calc(100vh - 98px);
    overflow-y: auto;
  }

  body.finance-v2-active .finance-visual-menu-button {
    display: inline-flex;
    color: var(--fv2-ink);
    border-color: var(--fv2-border);
    background: #fff;
  }

  body.finance-v2-active .finance-visual-topbar {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 0.8fr) auto;
  }
}

@media (max-width: 860px) {
  body.finance-v2-active .finance-visual-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body.finance-v2-active .finance-visual-search {
    display: none;
  }

  .finance-v2-kpis,
  .finance-v2-kpis.is-five,
  .finance-v2-kpis.is-six {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-v2-grid,
  .finance-v2-grid.is-even,
  .finance-v2-grid.is-three,
  .finance-v2-filter-layout {
    grid-template-columns: 1fr;
  }

  .finance-v2-doc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  body.finance-v2-active {
    background: #fff;
  }

  body.finance-v2-active .main {
    width: 100%;
    max-width: 100%;
    padding: 0 10px calc(92px + env(safe-area-inset-bottom));
    overflow-x: clip;
  }

  body.finance-v2-active .finance-visual-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "identity status"
      "search search";
    gap: 8px;
    top: 0;
    min-height: 68px;
    margin: 0 -10px 12px;
    padding: 8px 10px;
    border-radius: 0 0 18px 18px;
    background: linear-gradient(135deg, #08265d, #0b4ea8);
    box-shadow: 0 10px 24px rgba(7, 31, 82, 0.18);
  }

  body.finance-v2-active .finance-visual-search {
    display: flex;
    grid-area: search;
    width: 100%;
    min-width: 0;
    color: var(--fv2-ink);
    background: #fff;
  }

  body.finance-v2-active .finance-visual-menu-button {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
  }

  body.finance-v2-active .finance-visual-topbar__identity {
    grid-area: identity;
    min-width: 0;
  }

  body.finance-v2-active .finance-visual-topbar__identity > div:last-child {
    min-width: 0;
  }

  body.finance-v2-active .finance-visual-topbar__identity strong,
  body.finance-v2-active .finance-visual-topbar__identity small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.finance-v2-active .finance-visual-topbar__status {
    grid-area: status;
  }

  body.finance-v2-active .finance-visual-topbar__identity strong,
  body.finance-v2-active .finance-visual-topbar__identity small {
    color: #fff;
  }

  body.finance-v2-active .finance-visual-topbar__identity strong {
    font-size: 16px;
  }

  body.finance-v2-active .finance-visual-topbar__identity small {
    color: rgba(231, 240, 255, 0.74);
    font-size: 9px;
  }

  body.finance-v2-active .finance-visual-topbar__mark {
    display: grid;
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8a42, #ff3e36);
  }

  body.finance-v2-active .finance-visual-topbar__mark img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
  }

  body.finance-v2-active .finance-visual-topbar__mark > span {
    color: #fff;
    font-size: 11px;
    font-weight: 900;
  }

  body.finance-v2-active .finance-visual-topbar__status {
    gap: 5px;
  }

  body.finance-v2-active .finance-visual-date,
  body.finance-v2-active .finance-visual-user,
  body.finance-v2-active .finance-visual-user > span {
    display: none;
  }

  body.finance-v2-active .finance-visual-books-status {
    max-width: 88px;
    min-height: 34px;
    padding: 7px 8px;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.11);
    font-size: 8px;
  }

  .finance-v2-stage {
    gap: 11px;
  }

  .finance-v2-page-head {
    display: grid;
    gap: 10px;
  }

  .finance-v2-page-head h2 {
    font-size: 26px;
  }

  .finance-v2-page-head p {
    font-size: 12px;
  }

  .finance-v2-head-actions {
    width: 100%;
  }

  .finance-v2-head-actions button {
    flex: 1 1 auto;
  }

  .finance-v2-tabs {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .finance-v2-tabs::-webkit-scrollbar {
    display: none;
  }

  .finance-v2-tabs button {
    flex: 0 0 auto;
  }

  .finance-v2-kpis,
  .finance-v2-kpis.is-five,
  .finance-v2-kpis.is-six {
    gap: 9px;
  }

  .finance-v2-kpi {
    min-height: 124px;
    padding: 13px;
  }

  .finance-v2-kpi strong {
    font-size: 19px;
  }

  .finance-v2-panel__head,
  .finance-v2-panel__body {
    padding: 11px;
  }

  .finance-v2-lifecycle {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .finance-v2-life-step {
    flex: 0 0 70px;
  }

  .finance-v2-match-flow,
  .finance-v2-field-grid,
  .finance-v2-delivery-options {
    grid-template-columns: 1fr;
  }

  .finance-v2-match-card:not(:last-child)::after {
    display: none;
  }

  .finance-v2-timeline-step {
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }

  .finance-v2-timeline-step > div:nth-child(3) {
    display: none;
  }

  .finance-v2-doc-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .finance-v2-document-card {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }

  .finance-v2-mobile-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-v2-bars {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .finance-v2-bar-group {
    flex: 0 0 44px;
  }

  .finance-v2-workflow-bar {
    top: 78px;
    align-items: stretch;
    flex-direction: column;
  }

  .finance-v2-workflow-bar button {
    width: 100%;
  }

  .finance-v2-mobile-nav {
    position: fixed;
    z-index: 75;
    right: 8px;
    bottom: calc(7px + env(safe-area-inset-bottom));
    left: 8px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    min-height: 61px;
    padding: 6px;
    border: 1px solid rgba(213, 222, 236, 0.95);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 34px rgba(7, 31, 82, 0.2);
    backdrop-filter: blur(16px);
  }

  .finance-v2-mobile-nav button {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 2px;
    min-width: 0;
    min-height: 47px;
    padding: 4px 2px;
    color: #66728a;
    border: 0;
    border-radius: 12px;
    background: transparent;
    font-size: 8px;
    font-weight: 800;
  }

  .finance-v2-mobile-nav button::before {
    content: attr(data-finance-v2-mobile-icon);
    display: block;
    color: currentColor;
    font-size: 16px;
  }

  .finance-v2-mobile-nav button[aria-current="page"] {
    color: var(--fv2-blue);
    background: var(--fv2-blue-soft);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.finance-v2-active .sidebar,
  .finance-v2-stage * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Approved consolidated Today screen. All panels use the live Finance snapshot. */
.finance-today-console { display:grid; gap:18px; min-width:0; color:#14284b; }
.finance-today-header { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.finance-today-header h2 { margin:4px 0 0; font-size:25px; letter-spacing:-.6px; }
.finance-today-header-actions, .finance-today-tools, .finance-today-footer-actions { display:flex; gap:7px; align-items:center; flex-wrap:wrap; }
.finance-today-console button, .finance-today-console a { cursor:pointer; }
.finance-today-console button:disabled { cursor:default; opacity:.45; }
.finance-today-console button:focus-visible, .finance-today-console a:focus-visible, .finance-today-console select:focus-visible { outline:3px solid #6f9bff; outline-offset:2px; }
.finance-today-console .finance-today-auto { border:1px solid #d3dbe9; background:#f8fafc; color:#72510e; }
.finance-today-console .finance-today-auto.is-on { color:#097934; border-color:#bee1c7; background:#f5fcf7; }
.finance-today-columns { display:grid; grid-template-columns:minmax(0,1.22fr) minmax(0,1fr); gap:22px; align-items:start; }
.finance-today-main, .finance-today-context { display:grid; grid-template-columns:minmax(0,1fr); min-width:0; gap:20px; }
.finance-today-main > *, .finance-today-context > * { min-width:0; }
.finance-today-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.finance-today-kpis > button { padding:0; border:0; background:transparent; text-align:left; box-shadow:none; min-width:0; }
.finance-today-kpis .finance-v2-kpi { height:100%; min-height:136px; padding:17px 13px; border:1px solid #e2e7ef; border-radius:10px; background:white; box-shadow:0 3px 9px #102b5510; }
.finance-today-kpis .finance-v2-kpi__head { gap:8px; font-size:11px; line-height:1.4; font-weight:600; }
.finance-today-kpis .finance-v2-kpi strong { margin:10px 0 4px; font-size:34px; line-height:1; font-weight:650; }
.finance-today-kpis .finance-v2-kpi small { font-size:10px; line-height:1.4; color:#66768d; font-weight:400; }
.finance-today-kpis .finance-v2-icon { width:30px; height:35px; font-size:21px; border-radius:50%; flex-shrink:0; }
.finance-today-work { display:grid; grid-template-columns:minmax(0,3.1fr) minmax(150px,1fr); gap:14px; align-items:stretch; }
.finance-today-console .finance-v2-panel { min-width:0; border:1px solid #e3e8f0; border-radius:11px; box-shadow:0 3px 12px #102b5509; background:#fff; overflow:hidden; }
.finance-today-console .finance-v2-panel__head { padding:18px 18px 14px; align-items:center; flex-wrap:wrap; gap:10px; border-bottom:1px solid #f0f2f6; }
.finance-today-console .finance-v2-panel__head h3 { color:#102852; font-size:18px; font-weight:650; letter-spacing:-.3px; margin:0; }
.finance-today-console .finance-v2-panel__body { padding:16px 18px; }
.finance-today-table-wrap { overflow-x:auto; max-width:100%; }
.finance-today-console table { width:100%; border-collapse:collapse; font-size:11px; line-height:1.5; }
.finance-today-console th { color:#576781; text-align:left; font-size:10px; font-weight:600; padding:12px 8px; white-space:normal; }
.finance-today-console td { padding:15px 8px; border-top:1px solid #edf0f6; vertical-align:middle; overflow-wrap:anywhere; }
.finance-today-console td small, .finance-today-document small { display:block; color:#6e7a91; font-size:10px; margin-top:5px; font-weight:400; }
.finance-today-console td strong { font-weight:550; }
.finance-today-review-table { min-width:505px; }
.finance-today-review-table td:first-child { width:75px; }
.finance-today-type { display:inline-grid; place-items:center; width:28px; height:28px; margin:0 5px 5px 0; color:#2265df; background:#edf3ff; border-radius:50%; }
.finance-today-console .finance-today-reference { color:#1b55c9; background:none; border:0; padding:0; border-radius:0; font-size:11px; font-weight:600; text-align:left; }
.finance-today-amount { white-space:nowrap; font-variant-numeric:tabular-nums; }
.finance-today-console .finance-today-action { display:inline-flex; white-space:nowrap; padding:7px 10px; margin-top:4px; border:0; border-radius:7px; background:linear-gradient(135deg,#ff9431,#fa6417); color:#fff; text-decoration:none; font-size:10px; font-weight:650; line-height:1.3; }
.finance-today-priority footer { display:flex; flex-wrap:wrap; gap:8px; padding:13px; border-top:1px solid #edf0f6; }
.finance-today-console .finance-v2-status { font-size:9px; padding:4px 7px; border-radius:6px; font-weight:550; }
.finance-today-activity { list-style:none; padding:0 0 0 18px; margin:0; }
.finance-today-activity li { position:relative; padding:0 0 22px 12px; border-left:1px solid #d8e1ec; font-size:11px; overflow-wrap:anywhere; }
.finance-today-activity li:last-child { border-color:transparent; }
.finance-today-activity strong { font-weight:600; }
.finance-today-activity p { margin:5px 0; color:#5d6b83; font-size:10px; }
.finance-today-activity time { display:block; font-size:10px; color:#6e7a91; }
.finance-today-activity a { display:block; margin-top:7px; color:#1c59d0; font-size:10px; }
.finance-today-activity-dot { position:absolute; left:-8px; top:0; width:15px; height:15px; border:3px solid #eff4ff; border-radius:50%; background:#3577ec; }
.finance-today-activity-dot.is-completed { background:#27994f; border-color:#e4f5e9; }
.finance-today-activity-dot.is-failed, .finance-today-activity-dot.is-review_needed { background:#e99524; border-color:#fff4df; }
.finance-today-automation-note { display:flex; gap:17px; align-items:center; padding:25px; background:linear-gradient(110deg,#eff8f2,#f7fbf8); border-radius:12px; color:#13633c; }
.finance-today-automation-note > span { display:grid; place-items:center; width:46px; height:54px; flex-shrink:0; background:#238b50; clip-path:polygon(50% 0,95% 18%,85% 73%,50% 100%,15% 73%,5% 18%); color:white; font-size:23px; }
.finance-today-automation-note h3 { margin:0 0 9px; font-size:17px; }
.finance-today-automation-note p { margin:0; font-size:12px; line-height:1.8; color:#435b51; }
.finance-today-customer-head { display:grid; grid-template-columns:38px minmax(0,1fr) auto; align-items:start; gap:10px; }
.finance-today-symbol { display:grid; place-items:center; border:1px solid #cadef8; border-radius:10px; color:#245ab6; background:#eff5ff; width:36px; height:45px; font-size:29px; }
.finance-today-customer-picker { display:grid; font-size:10px; gap:4px; color:#64758d; }
.finance-today-customer-picker select { font-family:inherit; font-size:12px; color:#14284b; width:100%; min-width:0; padding:5px; border:1px solid #dee6f0; border-radius:5px; background:#fff; }
.finance-today-customer-head small { display:block; margin-top:7px; font-size:9px; color:#738095; overflow-wrap:anywhere; }
.finance-today-customer-balance { border:1px solid #e0e9e1; padding:8px; border-radius:7px; font-size:10px; }
.finance-today-progress { padding:25px 0 8px; margin:0; display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:0; list-style:none; }
.finance-today-progress li { display:flex; flex-direction:column; align-items:center; text-align:center; min-width:0; position:relative; }
.finance-today-step-icon { width:35px; height:39px; display:grid; place-items:center; background:#f5f7fa; border:1px solid #e1e5ec; border-radius:8px; font-size:25px; color:#7a889d; }
.finance-today-step-dot { position:relative; z-index:1; display:grid; place-items:center; margin:10px 0; width:14px; height:14px; background:#dee4ed; color:white; border-radius:50%; font-size:9px; }
.finance-today-progress li:not(:last-child)::after { content:""; position:absolute; left:50%; width:100%; top:55px; height:2px; background:#e0e7ef; }
.finance-today-progress li.is-complete .finance-today-step-icon { color:#24853e; background:#eff8f0; border-color:#cfe3d1; }
.finance-today-progress li.is-complete .finance-today-step-dot, .finance-today-progress li.is-complete::after { background:#29924e; }
.finance-today-progress li.is-attention .finance-today-step-icon { color:#b87a12; background:#fff9e8; border-color:#f1dfb3; }
.finance-today-progress strong { font-size:10px; line-height:1.5; font-weight:600; padding:0 3px; }
.finance-today-progress small { font-size:9px; margin-top:10px; color:#7b8597; line-height:1.5; }
.finance-today-next { color:#815d1f; padding:9px 11px; background:#fff9ed; border-radius:6px; font-size:11px; }
.finance-today-documents { border:1px solid #dce4ef; border-radius:9px; padding:13px; margin-top:16px; }
.finance-today-documents h4 { margin:0 0 10px; font-size:13px; }
.finance-today-document { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:8px 0; font-size:11px; }
.finance-today-document > div { flex:1 1 130px; }
.finance-today-console .finance-today-outline { padding:8px 10px; border:1px solid #adc6f2; border-radius:6px; background:white; color:#1b59cf; font-size:10px; text-decoration:none; }
.finance-today-muted { color:#6d7c91; font-size:11px; line-height:1.7; }
.finance-today-error { color:#a2322e; background:#fff0ed; padding:10px; font-size:11px; border-radius:6px; }
.finance-today-footnote { background:#f0f5ff; color:#4c6490; font-size:10px; line-height:1.7; padding:10px 12px; border-radius:7px; margin:13px 0 0; }
.finance-today-bank-table { min-width:440px; }
.finance-today-bank-table td:nth-child(2) { max-width:155px; }
.finance-today-bank-footer { display:flex; flex-wrap:wrap; justify-content:space-between; gap:9px; align-items:center; margin-top:10px; }
.finance-today-bank-footer small { font-size:10px; color:#7a8798; }
.finance-today-bank-footer button, .finance-today-tools button { font-size:10px; padding:7px 9px; }
.finance-today-bank-footer > div { display:flex; gap:5px; }
.finance-today-footer-actions { margin-top:12px; justify-content:space-between; }
.finance-today-policy { padding:18px; border:1px solid #ceddf5; border-radius:10px; background:#f4f8ff; }
.finance-today-policy h3 { margin:0 0 8px; }
.finance-today-policy p { font-size:13px; line-height:1.6; }
.finance-today-policy button { margin-right:8px; }
#financeTodayShareStatus { margin-top:10px; font-size:11px; overflow-wrap:anywhere; }
#financeTodayShareStatus input { width:100%; box-sizing:border-box; font-size:11px; padding:8px; margin-bottom:7px; }
@media(max-width:1690px) {
  .finance-today-work { grid-template-columns:minmax(0,1fr); }
  .finance-today-activity { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
  .finance-today-activity li { padding-bottom:9px; }
  .finance-today-kpis { gap:8px; }
  .finance-today-kpis .finance-v2-kpi { padding:13px 9px; }
  .finance-today-kpis .finance-v2-kpi__head { flex-wrap:wrap; }
}
@media(max-width:1050px) {
  .finance-today-columns { grid-template-columns:minmax(0,1fr); }
  .finance-today-kpis .finance-v2-kpi__head { flex-wrap:nowrap; }
}
@media(max-width:600px) {
  .finance-today-header { align-items:flex-start; flex-direction:column; }
  .finance-today-header h2 { font-size:24px; }
  .finance-today-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .finance-today-kpis .finance-v2-kpi { min-height:120px; }
  .finance-today-activity { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .finance-today-console .finance-v2-panel__body { padding:12px; }
  .finance-today-customer-head { grid-template-columns:32px minmax(0,1fr); }
  .finance-today-customer-balance { grid-column:2; }
  .finance-today-progress strong { font-size:9px; }
  .finance-today-step-icon { width:29px; font-size:20px; }
  .finance-today-automation-note { padding:18px; }
}
