@import url("aria/colors_and_type.css");

/* =========================================================================
   Canopy ERP — generic vertical ERP.
   Aria only visible inside the financing modal (subtle attribution).
   Styled per Refactoring UI: depth via layered bg + soft shadows,
   hierarchy via size/weight, minimal borders, generous whitespace.
   ========================================================================= */

:root {
  /* Host neutrals */
  --ink:       #0f172a;
  --ink-soft:  #1e293b;
  --text:      #334155;
  --muted:     #64748b;
  --dim:       #94a3b8;
  --line:      #e2e8f0;
  --line-soft: #f1f5f9;

  --bg:        #f8fafc;   /* page bg */
  --surface:   #ffffff;   /* cards */
  --surface-2: #f8fafc;   /* nested surfaces */

  --accent:     #4f46e5;
  --accent-ink: #3730a3;
  --accent-bg:  #eef2ff;

  --pos:       #15803d;
  --pos-bg:    #f0fdf4;
  --pos-line:  #bbf7d0;
  --warn:      #b45309;
  --warn-bg:   #fffbeb;
  --neg:       #b91c1c;
  --neg-bg:    #fef2f2;
  --neu:       #475569;
  --neu-bg:    #f1f5f9;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px -8px rgba(15, 23, 42, 0.18), 0 8px 16px -4px rgba(15, 23, 42, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.003em;
}

/* --------- App shell --------- */
.app { display: grid; grid-template-columns: 224px 1fr; min-height: 100vh; }

/* --------- Sidebar — minimal, monochrome --------- */
.side {
  background: var(--bg);
  display: flex; flex-direction: column;
  padding: 18px 12px 14px;
  gap: 20px;
  border-right: 1px solid var(--line);
}
.side-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 2px 8px 0;
}
.side-logo {
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--ink);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px;
  letter-spacing: -0.02em;
}
.side-brand-name { font-size: 14.5px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }

.side-nav { display: flex; flex-direction: column; gap: 1px; }
.side-nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 7px 9px; border-radius: 6px;
  font-size: 13.5px; color: var(--muted); font-weight: 500;
  cursor: pointer; transition: color 80ms, background 80ms;
}
.side-nav-item i { width: 16px; height: 16px; stroke-width: 1.75; color: var(--dim); }
.side-nav-item:hover { color: var(--ink); background: var(--line-soft); }
.side-nav-item:hover i { color: var(--muted); }
.side-nav-item.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  font-weight: 600;
}
.side-nav-item.active i { color: var(--ink); }

.side-spacer { flex: 1; }

.side-org {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.side-org:hover { background: var(--line-soft); }
.side-org-avatar {
  width: 28px; height: 28px; border-radius: 999px;
  background: #dbeafe; color: #1e40af;
  font-size: 11px; font-weight: 600;
  display: grid; place-items: center;
}
.side-org-name { font-size: 13px; font-weight: 600; line-height: 1.2; color: var(--ink); }
.side-org-sub  { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

/* --------- Top bar --------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 28px; height: 60px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.topbar-search {
  display: flex; align-items: center; gap: 8px;
  width: 340px; height: 34px; padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted); font-size: 13px;
}
.topbar-search i { width: 15px; height: 15px; color: var(--dim); }
.topbar-search kbd {
  margin-left: auto; background: var(--line-soft);
  border-radius: 4px; padding: 1px 6px; font: inherit; font-size: 10.5px;
  color: var(--muted); font-family: inherit;
}
.topbar-right { display: flex; align-items: center; gap: 4px; }
.topbar-icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 6px; color: var(--muted); cursor: pointer;
  background: transparent; border: 0;
}
.topbar-icon-btn:hover { background: var(--line-soft); color: var(--ink); }
.topbar-icon-btn i { width: 17px; height: 17px; stroke-width: 1.75; }
.topbar-avatar {
  width: 30px; height: 30px; border-radius: 999px;
  background: #fef3c7; color: #92400e; font-size: 12px; font-weight: 600;
  display: grid; place-items: center;
  margin-left: 4px;
}

/* --------- Main content --------- */
.main { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.page {
  padding: 32px 40px 48px;
  display: flex; flex-direction: column; gap: 28px;
  max-width: 1320px;
  width: 100%;
}
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.page-title { font-size: 26px; font-weight: 600; letter-spacing: -0.022em; color: var(--ink); margin: 0; }
.page-sub   { font-size: 14px; color: var(--muted); margin-top: 6px; max-width: 560px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* --------- KPI strip — minimal, no borders, layered --------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis > .kpi { border-top: 1px solid var(--line); }
  .kpis > .kpi:nth-child(-n+2) { border-top: 0; }
}
.kpi {
  background: var(--surface);
  padding: 18px 20px 20px;
  display: flex; flex-direction: column;
  position: relative;
  min-width: 0;
}
.kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi-row { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.kpi-val {
  font-size: 26px; font-weight: 600; letter-spacing: -0.025em; color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.kpi-delta {
  font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.kpi-delta.pos  { color: var(--pos);  background: var(--pos-bg);  }
.kpi-delta.neu  { color: var(--neu);  background: var(--neu-bg);  }
.kpi-delta.warn { color: var(--warn); background: var(--warn-bg); }
.kpi-sub { font-size: 12px; color: var(--dim); margin-top: 6px; }

.kpi.financing { background: var(--surface); }
.kpi.financing .kpi-attr {
  position: absolute; top: 14px; right: 16px;
  font-size: 10.5px; color: var(--muted);
  display: flex; align-items: center; gap: 5px;
  letter-spacing: 0.02em; font-weight: 500;
}
.kpi.financing .kpi-attr-dot { width: 6px; height: 6px; border-radius: 999px; background: #10b981; }

/* --------- Buttons --------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 14px; border-radius: 7px;
  font: inherit; font-size: 13.5px; font-weight: 500;
  cursor: pointer; border: 1px solid transparent; transition: all 100ms ease;
  line-height: 1; white-space: nowrap;
}
.btn i { width: 15px; height: 15px; stroke-width: 2; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-soft); }
.btn-primary:disabled { background: var(--dim); cursor: not-allowed; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { background: var(--line-soft); }
.btn-secondary:disabled { color: var(--dim); cursor: not-allowed; }
.btn-tertiary { background: transparent; color: var(--text); }
.btn-tertiary:hover { background: var(--line-soft); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 6px; }

/* The one green moment — row-level finance pill */
.btn-finance {
  background: var(--surface); color: var(--pos);
  border: 1px solid var(--pos-line);
  font-weight: 600; padding: 7px 10px 7px 9px;
  border-radius: 6px; font-size: 12.5px;
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 100ms;
  line-height: 1.2;
}
.btn-finance i { width: 13px; height: 13px; color: #10b981; stroke-width: 2.25; }
.btn-finance:hover { background: var(--pos-bg); border-color: #86efac; }
.btn-finance.bulk {
  background: #14532d; color: #fff; border-color: #14532d;
  padding: 10px 16px; font-size: 13.5px; border-radius: 7px;
  box-shadow: var(--shadow-sm);
}
.btn-finance.bulk i { color: #6ee7b7; width: 14px; height: 14px; }
.btn-finance.bulk:hover { background: #052e16; border-color: #052e16; }

/* --------- Card / panel --------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.card-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 20px 0;
  gap: 16px;
  flex-wrap: nowrap;
}
.card-toolbar-right { display: flex; align-items: center; gap: 8px; }
.card-toolbar-search {
  display: flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 10px; min-width: 240px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 7px;
  box-shadow: var(--shadow-xs);
}
.card-toolbar-search i { width: 14px; height: 14px; color: var(--dim); }
.card-toolbar-search input {
  border: 0; outline: 0; font: inherit; font-size: 13px; flex: 1; color: var(--ink);
  background: transparent;
}
.card-toolbar-search input::placeholder { color: var(--dim); }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 11px; border-radius: 7px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; color: var(--text); cursor: pointer;
  box-shadow: var(--shadow-xs);
  font-weight: 500;
}
.filter-chip i { width: 13px; height: 13px; color: var(--muted); }
.filter-chip:hover { background: var(--line-soft); }

/* --------- Tabs --------- */
.tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--line);
  margin-top: 12px;
  padding: 0 20px;
}
.tab {
  background: none; border: 0; padding: 10px 14px;
  font: inherit; font-size: 13.5px; color: var(--muted); font-weight: 500;
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  display: flex; align-items: center; gap: 7px;
  transition: color 100ms;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.tab-count {
  background: var(--line-soft); color: var(--muted);
  padding: 1px 6px; font-size: 11px; border-radius: 4px;
  font-variant-numeric: tabular-nums; font-weight: 500;
}
.tab.active .tab-count { background: var(--ink); color: #fff; }

/* --------- Table --------- */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tbl thead th {
  text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--muted);
  padding: 12px 16px; background: var(--surface);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl thead th.num { text-align: right; }
.tbl tbody td {
  padding: 14px 16px; border-bottom: 1px solid var(--line-soft);
  color: var(--ink); vertical-align: middle;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background 60ms; }
.tbl tbody tr:hover { background: var(--line-soft); }
.tbl tbody tr.selected { background: #eef2ff; }
.tbl tbody tr.selected:hover { background: #e0e7ff; }
.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.tbl td.due { color: var(--muted); white-space: nowrap; font-size: 13px; }
.tbl .checkbox-cell { width: 40px; padding-right: 0; }
.tbl .action-cell { width: 170px; text-align: right; }
.tbl .invoice-id { font-weight: 500; color: var(--ink); font-size: 13.5px; }
.tbl .invoice-id-sub { font-size: 12px; color: var(--dim); margin-top: 2px; }
.tbl .buyer-name { font-weight: 500; }
.tbl .buyer-sub  { font-size: 12px; color: var(--dim); margin-top: 2px; }

/* --------- Badges --------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px; font-size: 11.5px; font-weight: 500;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.badge-dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.badge.pos  { background: var(--pos-bg);  color: var(--pos);  }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.neg  { background: var(--neg-bg);  color: var(--neg);  }
.badge.neu  { background: var(--neu-bg);  color: var(--neu);  }
.badge.info { background: var(--accent-bg); color: var(--accent-ink); }
.badge.financed { background: var(--pos-bg); color: var(--pos); font-weight: 500; }
.badge.financed i { width: 11px; height: 11px; margin-right: -2px; stroke-width: 2.5; }

/* --------- Checkbox --------- */
.cb {
  appearance: none; width: 16px; height: 16px;
  border: 1.5px solid #cbd5e1; border-radius: 4px;
  background: var(--surface); cursor: pointer; position: relative;
  transition: all 100ms;
}
.cb:hover { border-color: var(--muted); }
.cb:checked {
  background: var(--ink); border-color: var(--ink);
}
.cb:checked::after {
  content: ""; position: absolute; left: 4px; top: 1px;
  width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.cb:indeterminate {
  background: var(--ink); border-color: var(--ink);
}
.cb:indeterminate::after {
  content: ""; position: absolute; left: 2px; top: 6px;
  width: 10px; height: 2px; background: #fff;
}
.cb:disabled { background: var(--line-soft); border-color: var(--line); cursor: not-allowed; }

/* --------- Bulk action bar --------- */
.bulkbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px;
  background: var(--ink);
  color: #e2e8f0;
  font-size: 13px;
}
.bulkbar-count { font-weight: 600; color: #fff; }
.bulkbar-amount { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.bulkbar-sep { color: #475569; }
.bulkbar-spacer { flex: 1; }
.bulkbar .link { color: #94a3b8; cursor: pointer; font-weight: 500; }
.bulkbar .link:hover { color: #fff; }

/* --------- Tooltip (fee preview) --------- */
.tt-wrap { position: relative; display: inline-block; }
.tt {
  position: absolute; bottom: calc(100% + 8px); right: 0;
  background: var(--ink); color: #fff;
  padding: 11px 13px; border-radius: 8px; font-size: 12px;
  white-space: nowrap; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity 120ms, transform 120ms;
  transform: translateY(4px); z-index: 10;
  line-height: 1.5; min-width: 220px;
}
.tt-wrap:hover .tt { opacity: 1; transform: translateY(0); }
.tt-row { display: flex; justify-content: space-between; gap: 18px; color: #cbd5e1; }
.tt-row b { color: #fff; font-variant-numeric: tabular-nums; font-weight: 600; margin-left: 8px;}
.tt-sep { height: 1px; background: rgba(255,255,255,0.1); margin: 7px 0; }
.tt-foot { font-size: 10.5px; color: #94a3b8; display: flex; align-items: center; gap: 5px; margin-top: 8px; padding-top: 7px; border-top: 1px solid rgba(255,255,255,0.08); }
.tt-foot-dot { width: 5px; height: 5px; border-radius: 999px; background: #2DFFCC; }

/* =========================================================================
   ADDED VIEWS: Onboarding, Invoice Detail, Financing Dashboard
   ========================================================================= */

/* Onboarding */
.ob { position:fixed; inset:0; background:#0f172a; display:grid; place-items:center; z-index:200; padding:24px; }
.ob-card { width:560px; max-width:100%; background:#fff; border-radius:16px; box-shadow:0 30px 60px rgba(0,0,0,0.3); overflow:hidden; display:flex; flex-direction:column; }
.ob-head { display:flex; justify-content:space-between; align-items:center; padding:18px 24px; border-bottom:1px solid var(--line); }
.ob-brand { display:flex; align-items:center; gap:10px; font-size:13px; color:var(--muted); font-weight:500; }
.ob-brand img { height:18px; }
.ob-skip { background:none; border:0; color:var(--muted); font:inherit; font-size:12.5px; cursor:pointer; }
.ob-skip:hover { color:var(--ink); }
.ob-body { padding:32px 36px 20px; text-align:center; }
.ob-icon { width:54px; height:54px; margin:0 auto 16px; border-radius:14px; background:#ecfdf5; color:#059669; display:grid; place-items:center; }
.ob-icon i { width:26px; height:26px; stroke-width:2; }
.ob-step-label { font-size:11px; font-weight:600; letter-spacing:0.06em; text-transform:uppercase; color:#059669; }
.ob-title { font-size:22px; font-weight:600; letter-spacing:-0.01em; margin:6px 0 6px; color:var(--ink); }
.ob-sub { color:var(--muted); font-size:13.5px; line-height:1.5; margin:0 0 18px; }
.ob-api, .ob-kyb, .ob-tos, .ob-final { background:#fafbfc; border:1px solid var(--line); border-radius:10px; padding:16px; text-align:left; font-size:13px; }
.ob-api-row, .ob-kyb-row { display:flex; align-items:center; gap:8px; padding:6px 0; }
.ob-api-row i { width:14px; height:14px; color:#059669; }
.ob-api-row b { font-weight:600; color:var(--ink); }
.ob-api-foot { font-size:11.5px; color:var(--muted); margin-top:8px; padding-top:10px; border-top:1px solid var(--line); }
.ob-kyb-row { justify-content:space-between; font-size:13px; }
.ob-kyb-row span { color:var(--muted); }
.ob-kyb-row b { font-weight:600; color:var(--ink); }
.ob-tos-title { font-size:13.5px; font-weight:600; margin-bottom:6px; color:var(--ink); }
.ob-tos-body { font-size:12.5px; color:var(--muted); line-height:1.55; }
.ob-tos-check { display:flex; gap:8px; margin-top:12px; font-size:12.5px; color:var(--ink); cursor:pointer; }
.ob-final { text-align:center; padding:24px; background:linear-gradient(180deg,#ecfdf5,#fff); border-color:#a7f3d0; }
.ob-final-num { font-family:"Space Grotesk",Inter,sans-serif; font-size:36px; font-weight:600; color:#065f46; letter-spacing:-0.02em; }
.ob-final-sub { font-size:12.5px; color:#047857; margin-top:2px; }
.ob-foot { display:flex; justify-content:space-between; align-items:center; padding:14px 24px; border-top:1px solid var(--line); background:#fafbfc; }
.ob-dots { display:flex; gap:6px; }
.ob-dot { width:7px; height:7px; border-radius:999px; background:var(--line); }
.ob-dot.active { background:var(--ink); width:18px; border-radius:999px; }
.ob-dot.done { background:#059669; }

/* Invoice detail drawer */
.detail { background:#fff; width:520px; max-width:100vw; height:100vh; overflow-y:auto; box-shadow:-24px 0 48px rgba(0,0,0,0.1); animation:slideIn 240ms cubic-bezier(0.2,0.9,0.3,1); display:flex; flex-direction:column; padding:0; }
.detail-head { display:flex; justify-content:space-between; padding:20px 24px 16px; border-bottom:1px solid var(--line); }
.detail-crumbs { font-size:11.5px; color:var(--muted); margin-bottom:4px; }
.detail-crumbs b { color:var(--ink); font-weight:500; }
.detail-title { font-size:19px; font-weight:600; margin:0; letter-spacing:-0.01em; }
.detail-sub { font-size:12.5px; color:var(--muted); margin-top:2px; }
.detail-amount-row { display:flex; justify-content:space-between; align-items:flex-end; padding:20px 24px 12px; }
.detail-amount-label { font-size:11px; font-weight:600; letter-spacing:0.04em; text-transform:uppercase; color:var(--muted); margin-bottom:4px; }
.detail-amount { font-family:"Space Grotesk",Inter,sans-serif; font-size:30px; font-weight:600; letter-spacing:-0.02em; color:var(--ink); font-variant-numeric:tabular-nums; }
.detail-amount .cur { font-size:16px; color:var(--muted); font-weight:500; margin-right:2px; }
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px 24px; padding:0 24px 20px; border-bottom:1px solid var(--line); }
.detail-k { font-size:11px; color:var(--muted); font-weight:500; text-transform:uppercase; letter-spacing:0.04em; margin-bottom:3px; }
.detail-v { font-size:13px; font-weight:500; color:var(--ink); }
.detail-section-label { font-size:11px; font-weight:600; letter-spacing:0.04em; text-transform:uppercase; color:var(--muted); padding:16px 24px 8px; }
.detail-docs { padding:0 24px 16px; display:flex; flex-direction:column; gap:6px; }
.detail-doc { display:flex; align-items:center; gap:12px; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.detail-doc i { width:18px; height:18px; stroke-width:1.75; }
.detail-doc-name { font-size:13px; font-weight:500; color:var(--ink); }
.detail-doc-sub { font-size:11.5px; color:var(--muted); margin-top:1px; }
.detail-doc-open { margin-left:auto; color:var(--muted); width:14px; height:14px; }
.detail-doc-drop { border:1px dashed var(--line); border-radius:8px; padding:14px; display:flex; align-items:center; gap:10px; font-size:12.5px; color:var(--muted); background:#fafbfc; }
.detail-doc-drop i { width:16px; height:16px; }
.detail-cta { margin:auto 24px 24px; padding:16px; background:linear-gradient(180deg,#ecfdf5,#fff); border:1px solid #a7f3d0; border-radius:10px; display:flex; align-items:center; justify-content:space-between; gap:14px; }
.detail-cta.awaiting { background:#fffbeb; border-color:#fde68a; }
.detail-cta-label { font-size:11px; font-weight:600; letter-spacing:0.04em; text-transform:uppercase; color:#065f46; margin-bottom:2px; }
.detail-cta-amount { font-family:"Space Grotesk",Inter,sans-serif; font-size:20px; font-weight:600; color:var(--ink); font-variant-numeric:tabular-nums; }
.detail-cta-amount span { font-size:11.5px; color:var(--muted); font-weight:500; margin-left:4px; }

/* Financing dashboard */
.fin-credit { background:linear-gradient(180deg,#ecfdf5 0%,#fff 80%); border:1px solid #a7f3d0; border-radius:12px; padding:20px 24px; }
.fin-credit-head { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:14px; }
.fin-credit-label { font-size:11px; font-weight:600; letter-spacing:0.06em; text-transform:uppercase; color:#047857; margin-bottom:6px; }
.fin-credit-num { font-family:"Space Grotesk",Inter,sans-serif; font-size:34px; font-weight:600; color:var(--ink); letter-spacing:-0.02em; font-variant-numeric:tabular-nums; }
.fin-credit-num .cur { color:var(--muted); font-size:18px; font-weight:500; margin-right:2px; }
.fin-credit-num .slash, .fin-credit-num .total { color:var(--muted); font-weight:500; font-size:22px; }
.fin-credit-avail { font-family:"Space Grotesk",Inter,sans-serif; font-size:22px; font-weight:600; color:#047857; font-variant-numeric:tabular-nums; }
.fin-credit-avail-sub { font-size:11px; color:#065f46; text-transform:uppercase; letter-spacing:0.04em; font-weight:600; }
.fin-credit-bar { height:6px; background:rgba(6,95,70,0.12); border-radius:999px; overflow:hidden; }
.fin-credit-bar-fill { height:100%; background:linear-gradient(90deg,#059669,#10b981); border-radius:999px; transition:width 300ms; }
.fin-credit-foot { display:flex; justify-content:space-between; margin-top:8px; font-size:11.5px; color:#047857; }

.aria-attr-pill { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border:1px solid var(--line); border-radius:999px; font-size:11.5px; color:var(--muted); background:#fff; }
.aria-attr-pill .dot { width:7px; height:7px; border-radius:999px; background:#008068; }
.aria-attr-pill img { height:12px; }

.fin-flow { background:#fff; border:1px solid var(--line); border-radius:12px; padding:20px 24px; }
.fin-flow-title { font-size:14px; font-weight:600; color:var(--ink); margin-bottom:16px; }
.fin-flow-steps { display:grid; grid-template-columns:1fr auto 1fr auto 1fr auto 1fr; gap:12px; align-items:center; }
.fin-flow-step { display:flex; gap:10px; align-items:flex-start; }
.fin-flow-num { width:24px; height:24px; border-radius:999px; background:var(--accent-bg); color:var(--accent-ink); font-size:12px; font-weight:700; display:grid; place-items:center; flex-shrink:0; }
.fin-flow-step b { font-size:13px; font-weight:600; color:var(--ink); display:block; }
.fin-flow-step span { font-size:11.5px; color:var(--muted); margin-top:1px; display:block; }
.fin-flow-arrow { color:var(--dim); font-size:18px; } — where Aria identity appears (subtle)
   ========================================================================= */

.scrim {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 23, 42, 0.5);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 180ms ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.97) translateY(6px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: translateX(0); } }

.modal {
  background: var(--surface);
  border-radius: 14px;
  width: 520px; max-height: 92vh; overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  animation: scaleIn 200ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

.modal-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 22px 26px 0;
}
.modal-head-title {
  font-size: 19px; font-weight: 600; color: var(--ink); letter-spacing: -0.015em;
  margin: 0;
}
.modal-head-sub {
  font-size: 13.5px; color: var(--muted); margin-top: 5px;
}
.modal-close {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 6px; background: transparent; border: 0; cursor: pointer;
  color: var(--muted);
}
.modal-close:hover { background: var(--line-soft); color: var(--ink); }
.modal-close i { width: 16px; height: 16px; }

.modal-stepper {
  display: flex; align-items: center; gap: 8px;
  padding: 18px 26px 4px;
  font-size: 12px; color: var(--muted);
}
.stepper-step { display: flex; align-items: center; gap: 7px; color: var(--dim); }
.stepper-step.active { color: var(--ink); font-weight: 600; }
.stepper-step.done { color: var(--pos); }
.stepper-dot {
  width: 18px; height: 18px; border-radius: 999px;
  background: var(--line-soft); color: var(--muted);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
  border: 1px solid var(--line);
}
.stepper-step.active .stepper-dot {
  background: var(--ink); color: #fff; border-color: var(--ink);
}
.stepper-step.done .stepper-dot {
  background: var(--pos-bg); color: var(--pos); border-color: var(--pos-line);
}
.stepper-step.done .stepper-dot i { width: 11px; height: 11px; stroke-width: 2.5; }
.stepper-line { flex: 1; height: 1px; background: var(--line); }
.stepper-line.done { background: var(--pos-line); }

.modal-body {
  padding: 18px 26px 8px;
  overflow-y: auto;
  flex: 1;
}

/* Review step */
.review-section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
  margin: 14px 0 8px;
}
.review-section-label:first-child { margin-top: 4px; }
.review-invoices {
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface);
  max-height: 180px; overflow-y: auto;
}
.review-inv-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}
.review-inv-row:last-child { border-bottom: 0; }
.review-inv-id { font-weight: 500; color: var(--ink); }
.review-inv-buyer { color: var(--muted); font-size: 12px; margin-top: 2px; }
.review-inv-amt { font-variant-numeric: tabular-nums; font-weight: 500; }

.breakdown {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 14px 16px;
}
.breakdown-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; font-size: 13.5px;
}
.breakdown-row .label { color: var(--text); display: flex; align-items: center; gap: 5px; }
.breakdown-row .label .hint { color: var(--dim); width: 12px; height: 12px; cursor: help; }
.breakdown-row .val { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }
.breakdown-row.advance-rate .val { color: var(--muted); font-weight: 400; }
.breakdown-row.minus .val { color: var(--muted); }
.breakdown-sep { height: 1px; background: var(--line); margin: 10px -16px; }
.breakdown-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 6px;
}
.breakdown-total .label { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.breakdown-total .val {
  font-family: "Space Grotesk", Inter, sans-serif; font-variant-numeric: tabular-nums;
  font-size: 24px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em;
}
.breakdown-total .val .cur { font-size: 15px; color: var(--muted); font-weight: 500; margin-right: 2px; }

.settle-note {
  margin-top: 14px;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; background: var(--pos-bg); border-radius: 8px;
  font-size: 12.5px; color: var(--pos);
}
.settle-note i { width: 15px; height: 15px; color: #10b981; stroke-width: 2; flex-shrink: 0; }
.settle-note b { font-weight: 600; }

/* Confirm step */
.bank-card {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface);
  margin-bottom: 4px;
}
.bank-logo {
  width: 36px; height: 36px; border-radius: 7px;
  background: #0f172a;
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 12px; letter-spacing: 0.04em;
}
.bank-name { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.bank-iban { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 3px; font-family: "JetBrains Mono", Menlo, monospace; }
.bank-change { margin-left: auto; font-size: 12.5px; color: var(--accent); cursor: pointer; font-weight: 500; }
.bank-change:hover { text-decoration: underline; }

.terms {
  font-size: 12.5px; color: var(--muted); line-height: 1.55;
  padding: 12px 14px; background: var(--surface-2); border-radius: 8px;
  margin: 14px 0 4px;
}
.terms b { color: var(--ink); font-weight: 600; }
.terms a { color: var(--accent); text-decoration: none; font-weight: 500; }
.terms a:hover { text-decoration: underline; }

.confirm-check {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 14px; border: 1px solid var(--line);
  border-radius: 8px; cursor: pointer;
  margin-top: 12px;
  transition: background 100ms, border-color 100ms;
}
.confirm-check:hover { background: var(--line-soft); }
.confirm-check input { margin-top: 2px; flex-shrink: 0; }
.confirm-check-label { font-size: 13px; color: var(--ink); line-height: 1.45; font-weight: 500; }
.confirm-check-label span { color: var(--muted); font-size: 12px; display: block; margin-top: 3px; font-weight: 400; }

/* Success step */
.success-hero {
  text-align: center; padding: 14px 8px 0;
}
.success-check {
  width: 56px; height: 56px; margin: 0 auto 16px;
  border-radius: 999px; background: var(--pos-bg);
  display: grid; place-items: center; color: var(--pos);
  animation: popIn 420ms cubic-bezier(0.2, 1.5, 0.4, 1);
}
@keyframes popIn {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.success-check i { width: 26px; height: 26px; stroke-width: 2.5; }
.success-title {
  font-size: 20px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink);
  margin: 0 0 6px;
}
.success-sub { font-size: 13.5px; color: var(--muted); }
.success-amount {
  margin: 20px auto 4px;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 42px; font-weight: 600; letter-spacing: -0.025em;
  color: var(--ink); font-variant-numeric: tabular-nums;
  text-align: center; line-height: 1.1;
}
.success-amount .cur { font-size: 22px; color: var(--muted); font-weight: 500; margin-right: 4px; }

.success-details {
  background: var(--surface-2);
  border-radius: 10px; padding: 16px 18px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 20px;
}
.success-detail-label { font-size: 11px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.success-detail-val { font-size: 13.5px; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.success-detail-val .mono { font-family: "JetBrains Mono", Menlo, monospace; font-size: 12px; font-weight: 500; }

/* Modal footer */
.modal-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 26px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.modal-foot-left {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--dim);
}
.modal-foot-left img { height: 13px; opacity: 0.85; }
.modal-foot-right { display: flex; gap: 8px; }

/* Toast */
.toast-stack {
  position: fixed; bottom: 20px; right: 20px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--ink); color: #fff; padding: 12px 16px;
  border-radius: 8px; font-size: 13px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  animation: slideIn 220ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
.toast i { width: 16px; height: 16px; color: #2DFFCC; }
.toast b { font-weight: 600; }
.toast .muted { color: #94a3b8; margin-left: auto; font-size: 12.5px; font-variant-numeric: tabular-nums; }

.ineligible-reason { font-size: 12px; color: var(--muted); font-style: italic; }

.paid-out-note { font-size: 12.5px; color: var(--pos); font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.paid-out-note i { width: 13px; height: 13px; stroke-width: 2.25; }


/* ========== RESTORED: modal, stepper, success, toasts, tweaks ========== */
.scrim { position:fixed; inset:0; z-index:100; background:rgba(15,23,42,0.55); backdrop-filter:blur(2px); display:flex; align-items:center; justify-content:center; animation:fadeIn 180ms ease-out; }
.scrim.drawer { justify-content:flex-end; align-items:stretch; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes scaleIn { from{opacity:0; transform:scale(0.96) translateY(8px)} to{opacity:1; transform:scale(1) translateY(0)} }
@keyframes slideIn { from{opacity:0; transform:translateX(24px)} to{opacity:1; transform:translateX(0)} }
@keyframes popIn { from{transform:scale(0.5); opacity:0} to{transform:scale(1); opacity:1} }

.modal { background:#fff; border-radius:14px; width:520px; max-height:90vh; overflow:hidden; box-shadow:0 24px 64px rgba(15,23,42,0.18); display:flex; flex-direction:column; animation:scaleIn 220ms cubic-bezier(0.2,0.9,0.3,1); }
.modal-head { display:flex; justify-content:space-between; align-items:flex-start; padding:20px 24px 0; }
.modal-head-title { font-size:18px; font-weight:600; color:var(--ink); letter-spacing:-0.01em; margin:0; }
.modal-head-sub { font-size:13px; color:var(--muted); margin-top:4px; }
.modal-close { width:32px; height:32px; display:grid; place-items:center; border-radius:6px; background:transparent; border:0; cursor:pointer; color:var(--muted); }
.modal-close:hover { background:var(--line-soft); color:var(--ink); }
.modal-close i { width:16px; height:16px; }

.modal-stepper { display:flex; align-items:center; gap:8px; padding:14px 24px 18px; font-size:11.5px; color:var(--muted); }
.stepper-step { display:flex; align-items:center; gap:6px; color:var(--dim); }
.stepper-step.active { color:var(--ink); font-weight:600; }
.stepper-step.done { color:#059669; }
.stepper-dot { width:20px; height:20px; border-radius:999px; background:var(--line-soft); color:var(--muted); display:grid; place-items:center; font-size:11px; font-weight:600; border:1px solid var(--line); }
.stepper-step.active .stepper-dot { background:var(--ink); color:#fff; border-color:var(--ink); }
.stepper-step.done .stepper-dot { background:#ecfdf5; color:#059669; border-color:#a7f3d0; }
.stepper-step.done .stepper-dot i { width:11px; height:11px; stroke-width:2.5; }
.stepper-line { flex:1; height:1px; background:var(--line); }
.stepper-line.done { background:#a7f3d0; }

.modal-body { padding:0 24px 8px; overflow-y:auto; flex:1; }
.review-invoices { border:1px solid var(--line); border-radius:10px; background:#fafbfc; max-height:180px; overflow-y:auto; }
.review-inv-row { display:flex; justify-content:space-between; align-items:center; padding:10px 14px; border-bottom:1px solid var(--line-soft); font-size:13px; }
.review-inv-row:last-child { border-bottom:0; }
.review-inv-id { font-weight:500; color:var(--ink); }
.review-inv-buyer { color:var(--muted); font-size:12px; margin-top:1px; }
.review-inv-amt { font-variant-numeric:tabular-nums; font-weight:500; }
.review-section-label { font-size:11px; font-weight:600; letter-spacing:0.04em; text-transform:uppercase; color:var(--muted); margin:18px 0 8px; }

.breakdown { background:#fafbfc; border:1px solid var(--line); border-radius:10px; padding:14px 16px; }
.breakdown-row { display:flex; justify-content:space-between; align-items:center; padding:5px 0; font-size:13px; }
.breakdown-row .label { color:var(--text); display:flex; align-items:center; gap:5px; }
.breakdown-row .label .hint { color:var(--dim); width:12px; height:12px; }
.breakdown-row .val { font-variant-numeric:tabular-nums; color:var(--ink); font-weight:500; }
.breakdown-row.minus .val { color:#b42318; }
.breakdown-row.advance-rate .val { color:var(--muted); font-weight:400; }
.breakdown-sep { height:1px; background:var(--line); margin:10px -16px; }
.breakdown-total { display:flex; justify-content:space-between; align-items:baseline; padding-top:4px; }
.breakdown-total .label { font-weight:600; font-size:13px; color:var(--ink); }
.breakdown-total .val { font-family:"Space Grotesk",Inter,sans-serif; font-variant-numeric:tabular-nums; font-size:24px; font-weight:600; color:var(--ink); letter-spacing:-0.01em; }
.breakdown-total .val .cur { font-size:15px; color:var(--muted); font-weight:500; margin-right:2px; }

.settle-note { margin-top:12px; display:flex; align-items:center; gap:8px; padding:10px 12px; background:#ecfdf5; border-radius:8px; font-size:12px; color:#065f46; border:1px solid #a7f3d0; }
.settle-note i { width:14px; height:14px; color:#059669; }

.bank-card { display:flex; align-items:center; gap:12px; padding:12px 14px; border:1px solid var(--line); border-radius:8px; background:#fff; margin-bottom:16px; }
.bank-logo { width:36px; height:36px; border-radius:6px; background:linear-gradient(135deg,#1e40af,#3b82f6); color:#fff; display:grid; place-items:center; font-weight:700; font-size:12px; }
.bank-name { font-size:13.5px; font-weight:600; color:var(--ink); line-height:1.3; }
.bank-iban { font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums; margin-top:2px; }
.bank-change { margin-left:auto; font-size:12px; color:var(--accent); cursor:pointer; font-weight:500; }

.terms { font-size:12px; color:var(--muted); line-height:1.55; padding:12px; background:var(--line-soft); border-radius:8px; margin-bottom:16px; }
.terms a { color:var(--accent); text-decoration:none; font-weight:500; }

.confirm-check { display:flex; align-items:flex-start; gap:10px; padding:12px 14px; border:1px solid var(--line); border-radius:8px; cursor:pointer; margin-bottom:4px; }
.confirm-check input { margin-top:2px; flex-shrink:0; }
.confirm-check-label { font-size:13px; color:var(--ink); line-height:1.45; }
.confirm-check-label span { color:var(--muted); font-size:12px; display:block; margin-top:2px; }

.success-hero { text-align:center; padding:14px 8px 4px; }
.success-check { width:64px; height:64px; margin:0 auto 14px; border-radius:999px; background:#ecfdf5; border:1px solid #a7f3d0; display:grid; place-items:center; color:#059669; animation:popIn 400ms cubic-bezier(0.2,1.5,0.4,1); }
.success-check i { width:30px; height:30px; stroke-width:2.5; }
.success-title { font-size:20px; font-weight:600; letter-spacing:-0.01em; color:var(--ink); margin:0 0 4px; }
.success-sub { font-size:13.5px; color:var(--muted); }
.success-amount { margin:18px auto 12px; font-family:"Space Grotesk",Inter,sans-serif; font-size:40px; font-weight:600; letter-spacing:-0.02em; color:var(--ink); font-variant-numeric:tabular-nums; text-align:center; }
.success-amount .cur { font-size:20px; color:var(--muted); font-weight:500; margin-right:4px; }
.success-details { background:#fafbfc; border:1px solid var(--line); border-radius:10px; padding:14px 16px; display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:18px; }
.success-detail-label { font-size:11px; color:var(--muted); font-weight:500; text-transform:uppercase; letter-spacing:0.04em; margin-bottom:3px; }
.success-detail-val { font-size:13px; color:var(--ink); font-weight:500; font-variant-numeric:tabular-nums; }
.success-detail-val .mono { font-family:"JetBrains Mono",Menlo,monospace; font-size:12px; }

.modal-foot { display:flex; justify-content:space-between; align-items:center; padding:16px 24px; border-top:1px solid var(--line); background:#fff; }
.modal-foot-left { display:flex; align-items:center; gap:8px; font-size:11px; color:var(--dim); }
.modal-foot-left img { height:14px; opacity:0.85; }
.modal-foot-right { display:flex; gap:8px; }

.toast-stack { position:fixed; bottom:20px; right:20px; z-index:200; display:flex; flex-direction:column; gap:8px; }
.toast { background:#0f172a; color:#fff; padding:12px 16px; border-radius:8px; font-size:13px; display:flex; align-items:center; gap:10px; box-shadow:0 8px 16px rgba(0,0,0,0.15); min-width:280px; animation:slideIn 220ms cubic-bezier(0.2,0.9,0.3,1); }
.toast i { width:16px; height:16px; color:#2DFFCC; }
.toast b { font-weight:600; }
.toast .muted { color:#94a3b8; margin-left:auto; font-size:12px; }

.bulkbar { display:flex; align-items:center; gap:10px; padding:10px 16px 10px 20px; background:#eef2ff; border-bottom:1px solid #c7d2fe; font-size:13px; color:var(--accent-ink); }
.bulkbar-count { font-weight:600; }
.bulkbar-sep { color:var(--dim); }
.bulkbar-amount { color:var(--ink); font-weight:600; font-variant-numeric:tabular-nums; }
.bulkbar-spacer { flex:1; }
.bulkbar .link { color:var(--accent); cursor:pointer; font-weight:500; }

.paid-out-note { font-size:12px; color:#065f46; font-weight:500; display:inline-flex; align-items:center; gap:5px; }
.paid-out-note i { width:13px; height:13px; }

.buyer-name { font-weight:500; }
.buyer-sub { font-size:11.5px; color:var(--muted); margin-top:2px; }

.card-toolbar-right { display:flex; gap:8px; align-items:center; margin-left:auto; }


/* ======================================================================
   ONBOARDING
   ====================================================================== */
.ob {
  min-height: 100vh;
  background: linear-gradient(180deg, #f7f8fa 0%, #eef2ff 100%);
  display: grid; place-items: center; padding: 40px 20px;
}
.ob-card {
  width: 520px; max-width: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 24px 64px rgba(7,41,41,0.10), 0 0 0 1px rgba(0,0,0,0.02);
  display: flex; flex-direction: column; overflow: hidden;
}
.ob-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px; border-bottom: 1px solid var(--line-soft);
}
.ob-brand { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); font-weight: 500; }
.ob-brand img { height: 16px; }
.ob-skip { background: none; border: 0; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.ob-skip:hover { color: var(--ink); }

.ob-body { padding: 32px 32px 24px; text-align: center; }
.ob-icon {
  width: 52px; height: 52px; margin: 0 auto 16px;
  border-radius: 14px; background: #ecfdf5; color: #059669;
  display: grid; place-items: center; border: 1px solid #a7f3d0;
}
.ob-icon i { width: 24px; height: 24px; stroke-width: 1.75; }
.ob-step-label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ob-title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 6px; }
.ob-sub { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin: 0 0 20px; max-width: 380px; margin-left: auto; margin-right: auto; }

.ob-api, .ob-kyb, .ob-tos, .ob-final {
  text-align: left; background: #fafbfc; border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 16px; margin-top: 12px;
}
.ob-api-row, .ob-kyb-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; font-size: 13px; color: var(--text);
}
.ob-kyb-row { justify-content: space-between; border-bottom: 1px solid var(--line-soft); padding: 8px 0; }
.ob-kyb-row:last-child { border-bottom: 0; }
.ob-kyb-row b { color: var(--ink); font-weight: 500; }
.ob-kyb-row span:first-child { color: var(--muted); }
.ob-api-row i { width: 14px; height: 14px; color: #059669; stroke-width: 2.5; }
.ob-api-row b { color: var(--ink); font-weight: 500; }
.ob-api-foot { font-size: 11.5px; color: var(--muted); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.ob-tos-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.ob-tos-body { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-bottom: 12px; }
.ob-tos-body b { color: var(--ink); font-weight: 600; }
.ob-tos-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink); cursor: pointer; }
.ob-final { text-align: center; padding: 20px; background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%); border-color: #a7f3d0; }
.ob-final-num { font-family: "Space Grotesk", Inter, sans-serif; font-size: 36px; font-weight: 600; letter-spacing: -0.02em; color: #065f46; font-variant-numeric: tabular-nums; }
.ob-final-sub { font-size: 12.5px; color: #047857; margin-top: 4px; }

.ob-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px; border-top: 1px solid var(--line-soft); background: #fafbfc;
}
.ob-dots { display: flex; gap: 6px; }
.ob-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--line); }
.ob-dot.done { background: #059669; }
.ob-dot.active { background: var(--ink); width: 22px; border-radius: 999px; }

/* ======================================================================
   INVOICE DETAIL DRAWER
   ====================================================================== */
.detail {
  width: 460px; height: 100vh;
  background: #fff; border-left: 1px solid var(--line);
  padding: 0; overflow-y: auto;
  animation: slideIn 240ms cubic-bezier(0.2,0.9,0.3,1);
  display: flex; flex-direction: column;
}
.detail-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 20px 24px 14px; border-bottom: 1px solid var(--line-soft);
}
.detail-crumbs { font-size: 11.5px; color: var(--muted); }
.detail-crumbs b { color: var(--ink); font-weight: 500; }
.detail-title { font-size: 18px; font-weight: 600; color: var(--ink); margin: 4px 0 2px; letter-spacing: -0.01em; }
.detail-sub { font-size: 12.5px; color: var(--muted); }

.detail-amount-row {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 20px 24px 16px;
}
.detail-amount-label { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.detail-amount { font-family: "Space Grotesk", Inter, sans-serif; font-size: 30px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.detail-amount .cur { font-size: 18px; color: var(--muted); font-weight: 500; margin-right: 2px; }

.detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  padding: 0 24px 16px; border-bottom: 1px solid var(--line-soft);
}
.detail-k { font-size: 11px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.detail-v { font-size: 13px; color: var(--ink); font-weight: 500; }

.detail-section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted);
  padding: 18px 24px 10px;
}
.detail-docs { padding: 0 24px 16px; display: flex; flex-direction: column; gap: 8px; }
.detail-doc {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; background: #fafbfc; border: 1px solid var(--line);
  border-radius: 8px; cursor: pointer;
}
.detail-doc:hover { background: #f2f4f7; }
.detail-doc i:first-child { width: 18px; height: 18px; flex-shrink: 0; }
.detail-doc > div { flex: 1; min-width: 0; }
.detail-doc-name { font-size: 13px; font-weight: 500; color: var(--ink); }
.detail-doc-sub  { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.detail-doc-open { width: 14px; height: 14px; color: var(--muted); }
.detail-doc-drop {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  padding: 14px; border: 1px dashed var(--line); border-radius: 8px;
  color: var(--muted); font-size: 12.5px; cursor: pointer;
  background: repeating-linear-gradient(45deg, #fff 0 8px, #fafbfc 8px 16px);
}
.detail-doc-drop:hover { border-color: var(--accent); color: var(--accent); }
.detail-doc-drop i { width: 16px; height: 16px; }

.detail-cta {
  margin: auto 24px 24px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-radius: 10px;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border: 1px solid #a7f3d0;
}
.detail-cta-label { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #047857; margin-bottom: 3px; }
.detail-cta-amount { font-family: "Space Grotesk", Inter, sans-serif; font-size: 18px; font-weight: 600; color: #065f46; font-variant-numeric: tabular-nums; }
.detail-cta-amount span { font-size: 11.5px; color: #059669; font-weight: 500; margin-left: 4px; font-family: Inter, sans-serif; }
.detail-cta.awaiting { background: #fffbeb; border-color: #fedf89; gap: 12px; justify-content: flex-start; }
.detail-cta.awaiting i { width: 18px; height: 18px; flex-shrink: 0; }

/* ======================================================================
   FINANCING DASHBOARD
   ====================================================================== */
.fin-credit {
  background: linear-gradient(135deg, #072929 0%, #0c3a3f 100%);
  color: #fff; border-radius: 12px; padding: 22px 24px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.fin-credit-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.fin-credit-label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #6ee7b7; margin-bottom: 6px; }
.fin-credit-num { font-family: "Space Grotesk", Inter, sans-serif; font-size: 36px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; color: #fff; }
.fin-credit-num .cur { font-size: 20px; color: #2DFFCC; margin-right: 2px; }
.fin-credit-num .slash { color: rgba(255,255,255,0.3); font-weight: 300; }
.fin-credit-num .total { color: rgba(255,255,255,0.5); font-size: 20px; font-weight: 500; }
.fin-credit-right { text-align: right; }
.fin-credit-avail { font-family: "Space Grotesk", Inter, sans-serif; font-size: 22px; font-weight: 600; color: #2DFFCC; font-variant-numeric: tabular-nums; }
.fin-credit-avail-sub { font-size: 11.5px; color: rgba(255,255,255,0.6); margin-top: 2px; }
.fin-credit-bar { height: 6px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.fin-credit-bar-fill { height: 100%; background: linear-gradient(90deg, #2DFFCC, #059669); border-radius: 999px; }
.fin-credit-foot { display: flex; justify-content: space-between; font-size: 11.5px; color: rgba(255,255,255,0.6); }

.fin-flow {
  background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 20px 24px;
}
.fin-flow-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 16px; }
.fin-flow-steps { display: flex; align-items: center; gap: 8px; }
.fin-flow-step { flex: 1; display: flex; align-items: flex-start; gap: 10px; padding: 12px; background: #fafbfc; border: 1px solid var(--line-soft); border-radius: 8px; }
.fin-flow-step b { font-size: 12.5px; font-weight: 600; color: var(--ink); display: block; margin-bottom: 2px; }
.fin-flow-step span { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.fin-flow-num { width: 22px; height: 22px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.fin-flow-arrow { color: var(--dim); font-size: 14px; flex-shrink: 0; }

/* Aria attribution pill used on dashboard header */
.aria-attr-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--muted); font-weight: 500;
  padding: 6px 10px; background: #fafbfc; border: 1px solid var(--line); border-radius: 999px;
}
.aria-attr-pill .dot { width: 6px; height: 6px; border-radius: 999px; background: #008068; }
.aria-attr-pill img { height: 12px; }

.buyer-name { font-weight: 500; }
.buyer-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.paid-out-note { font-size: 12px; color: #065f46; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.paid-out-note i { width: 13px; height: 13px; }
.bulkbar-sep { color: var(--dim); }
.card-toolbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* -------------------- DEMO BOTTOMBAR -------------------- */
.demo-bottombar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 44px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: #072929;
  color: #fbffeb;
  font-size: 13px;
  z-index: 1000;
  box-shadow: 0 -1px 0 rgba(0,0,0,.12);
}
.demo-bottombar-left {
  display: flex; align-items: center; gap: 10px; min-width: 0;
}
.demo-bottombar-left i { width: 16px; height: 16px; color: #2dffcc; }
.demo-bottombar-title { font-weight: 600; letter-spacing: 0.01em; }
.demo-bottombar-sub {
  color: rgba(251,255,235,0.6); font-size: 12.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.demo-bottombar-actions { display: flex; align-items: center; gap: 8px; }
.demo-bottombar-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: transparent; color: rgba(251,255,235,0.7);
  border: 1px solid rgba(251,255,235,0.2);
  font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.demo-bottombar-btn:hover { background: rgba(251,255,235,0.08); color: #fbffeb; }
.demo-bottombar-btn i { width: 14px; height: 14px; }
.demo-bottombar-reset {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(45,255,204,0.12); color: #2dffcc;
  border: 1px solid rgba(45,255,204,0.35);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background .15s ease;
}
.demo-bottombar-reset:hover { background: rgba(45,255,204,0.22); }
.demo-bottombar-reset i { width: 14px; height: 14px; }
body { padding-bottom: 44px; }
