/* hero-lab — faithful static mock of the Orcha customer app (AP), scoped under .om.
   Values mirror orcha/resources/app/public/css/design-system.css + style.css. */
@font-face { font-family: "OM Sans"; src: url("/css/fonts/source-sans-3.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "OM Mono"; src: url("/css/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

.om {
  --om-fg: #1c1813; --om-fg-muted: #57524b; --om-fg-subtle: #79736b; --om-fg-faint: #a6a097;
  --om-border: #e3ded5; --om-border-strong: #d2ccc0; --om-border-subtle: #ece8e1;
  --om-bg-muted: #ece8e1; --om-bg-subtle: #faf9f6; --om-canvas: #f9f7f3; --om-surface: #fff;
  --om-brand: #0a6dbd; --om-brand-strong: #0053a6; --om-tint: #eef4f8; --om-tint-hover: #f3f8fc;
  --om-az-100: #d8e6f0; --om-az-200: #aecbe0;
  --om-ok: #1a7f37; --om-ok-s: #116329; --om-ok-t: #e6f4ea; --om-ok-b: #b7e0c2;
  --om-warn: #9a6700; --om-warn-s: #7d4e00; --om-warn-t: #fbf1d3; --om-warn-b: #ecd592;
  --om-bad: #cf222e; --om-bad-s: #a40e26; --om-bad-t: #fdeceb; --om-bad-b: #f4b9b5;
  --om-vio: #8250df; --om-vio-t: #f1ebfd;
  --om-shadow-card: 0 1px 3px rgba(28,24,19,.08), 0 1px 2px rgba(28,24,19,.04);
  --om-shadow-sm: 0 1px 2px rgba(28,24,19,.06), 0 1px 1px rgba(28,24,19,.04);
  --om-shadow-pop: 0 12px 32px rgba(28,24,19,.16);
  font-family: "OM Sans", "Source Sans 3", system-ui, sans-serif;
  font-size: 14px; line-height: 1.5; color: var(--om-fg);
  -webkit-font-smoothing: antialiased; text-align: left; letter-spacing: 0;
}
.om *, .om *::before, .om *::after { box-sizing: border-box; }
.om .om-ic { width: 16px; height: 16px; flex: none; display: inline-block; vertical-align: middle; }
.om .mono { font-family: "OM Mono", ui-monospace, monospace; }

/* ── Window chrome ── */
.om-window {
  background: var(--om-surface); border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(28,24,19,.10);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 30px 80px -20px rgba(28,24,19,.25), 0 12px 24px -12px rgba(28,24,19,.12);
}
.om-titlebar { height: 34px; display: flex; align-items: center; padding: 0 12px; gap: 7px; background: #f6f4ef; border-bottom: 1px solid var(--om-border); position: relative; }
.om-titlebar span.dot { width: 11px; height: 11px; border-radius: 50%; background: #e1ddd5; }
.om-titlebar span.dot:nth-child(1) { background: #ff5f57; } .om-titlebar span.dot:nth-child(2) { background: #febc2e; } .om-titlebar span.dot:nth-child(3) { background: #28c840; }
.om-titlebar .url { position: absolute; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--om-fg-subtle); background: #fff; border: 1px solid var(--om-border); border-radius: 6px; padding: 1px 40px; }

/* ── App shell ── */
.om-app { display: flex; background: var(--om-canvas); min-height: 0; }
.om-side { width: 212px; flex: none; background: var(--om-surface); border-right: 1px solid var(--om-border); box-shadow: 2px 0 6px rgba(28,24,19,.05); display: flex; flex-direction: column; }
.om-side.rail { width: 56px; }
.om-logo { height: 51px; display: flex; align-items: center; padding: 0 18px; border-bottom: 1px solid var(--om-border); }
.om-logo img { width: 92px; height: auto; display: block; }
.om-side.rail .om-logo { padding: 0; justify-content: center; }
.om-side.rail .om-logo img { width: 22px; }
.om-tenant { padding: 8px 12px; border-bottom: 1px solid var(--om-border); }
.om-tenant button { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 10px; border: 1px solid var(--om-border-strong); border-radius: 5px; color: var(--om-fg); }
.om-tenant button .om-ic:last-child { margin-left: auto; width: 12px; height: 12px; color: var(--om-fg-subtle); }
.om-pipe { margin: 12px 14px 8px; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--om-border); border-radius: 6px; box-shadow: var(--om-shadow-sm); font-size: 13px; color: var(--om-fg-muted); }
.om-pipe .chip { width: 24px; height: 24px; padding: 0; border-radius: 5px; background: var(--om-tint); color: var(--om-brand); display: grid; place-items: center; }
.om-pipe .chip .om-ic { width: 14px; height: 14px; }
.om-pipe b { color: var(--om-fg); font-weight: 600; margin-left: auto; font-variant-numeric: tabular-nums; }
.om-nav { list-style: none; margin: 4px 0 0; padding: 0; }
.om-nav li { display: flex; align-items: center; gap: 11px; padding: 8px 18px; font-size: 14px; color: var(--om-fg); white-space: nowrap; }
.om-nav li .om-ic { width: 18px; height: 18px; color: var(--om-fg-muted); }
.om-nav li.active { background: var(--om-tint); border-left: 2px solid var(--om-brand); padding-left: 16px; color: var(--om-brand-strong); }
.om-nav li.active .om-ic { color: var(--om-brand-strong); }
.om-side.rail .om-nav li { justify-content: center; padding: 10px 0; }
.om-side.rail .om-nav li.active { padding-left: 0; }
.om-side.rail .om-nav li span { display: none; }
.om-user { margin-top: auto; border-top: 1px solid var(--om-border); padding: 12px; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.om-user .av { width: 28px; height: 28px; border-radius: 50%; background: var(--om-brand); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; }

.om-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.om-toolbar { min-height: 51px; padding: 6px 14px; background: var(--om-surface); border-bottom: 1px solid var(--om-border); display: flex; align-items: center; gap: 8px; }
.om-seg { display: inline-flex; background: #ece8e1; border-radius: 5px; padding: 2px; }
.om-seg span { padding: 4px 12px; font-size: 13px; font-weight: 500; color: #57524b; border-radius: 4px; white-space: nowrap; }
.om-seg span.on { background: #fff; color: var(--om-brand-strong); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.om-search { position: relative; width: 200px; height: 32px; border: 1px solid var(--om-border-strong); border-radius: 5px; display: flex; align-items: center; padding-left: 34px; font-size: 14px; color: var(--om-fg-faint); background: #fff; }
.om-search { white-space: nowrap; overflow: hidden; flex: none; }
.om-search .om-ic { position: absolute; left: 11px; color: var(--om-fg-subtle); }
.om-filter { height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--om-border-strong); border-radius: 5px; font-size: 13px; color: var(--om-fg); background: #fff; white-space: nowrap; }
.om-filter .om-ic { width: 12px; height: 12px; color: var(--om-fg-subtle); }
.om-btn { height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 6px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.om-btn.primary { background: var(--om-brand); color: #fff; }
.om-btn.secondary { border: 1px solid var(--om-border); color: var(--om-fg); background: #fff; }
.om-btn.sm { height: 28px; padding: 0 11px; font-size: 13px; border-radius: 5px; }
.om-grow { flex: 1; }

/* ── AP table ── */
.om-tablewrap { background: var(--om-surface); flex: 1; padding-left: 14px; overflow: hidden; }
.om-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.om-table th { position: sticky; top: 0; background: #fff; text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .5px; color: var(--om-fg-muted); border-bottom: 1px solid var(--om-border); white-space: nowrap; }
.om-table td { padding: 9px 12px; border-bottom: 1px solid var(--om-border-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.om-table td.muted { color: var(--om-fg-muted); }
.om-table td.num, .om-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.om-table tr.hl td { background: var(--om-tint-hover); }
.om-table td, .om-table th { padding-left: 8px; padding-right: 8px; }
.om-table td:first-child, .om-table th:first-child { padding-left: 4px; padding-right: 0; text-overflow: clip; }
.om-table .om-pill { min-width: 132px; }
.om-cb { width: 14px; height: 14px; border: 1px solid var(--om-border-strong); border-radius: 3px; display: inline-block; vertical-align: middle; background: #fff; }

.om-mb { display: inline-block; font-family: "OM Mono", ui-monospace, monospace; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; text-align: center; padding: 1px 5px; border-radius: 3px; margin-right: 3px; border: 1px solid; line-height: 1.5; }
.om-mb.ok { background: var(--om-ok-t); color: var(--om-ok-s); border-color: var(--om-ok-b); }
.om-mb.part { background: var(--om-warn-t); color: var(--om-warn-s); border-color: var(--om-warn-b); }
.om-mb.none { background: var(--om-bg-muted); color: var(--om-fg-faint); border-color: var(--om-border); }

.om-pill { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 22px; min-width: 128px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid; white-space: nowrap; }
.om-pill .om-ic { width: 12px; height: 12px; }
.om-pill.ok { background: var(--om-ok-t); color: var(--om-ok-s); border-color: var(--om-ok-b); }
.om-pill.warn { background: var(--om-warn-t); color: var(--om-warn-s); border-color: var(--om-warn-b); }
.om-pill.bad { background: var(--om-bad-t); color: var(--om-bad-s); border-color: var(--om-bad-b); }
.om-pill.info { background: var(--om-tint); color: var(--om-brand-strong); border-color: var(--om-az-200); }
.om-pill.auto { min-width: 0; }

/* ── Cards (detail view, floating panels) ── */
.om-card { background: #fff; border: 1px solid var(--om-border); border-radius: 6px; box-shadow: var(--om-shadow-card); padding: 10px 14px 12px; }
.om-card-h { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; padding-bottom: 8px; margin-bottom: 6px; border-bottom: 1px solid var(--om-border-subtle); }
.om-card-h .om-ic { color: var(--om-fg-muted); }
.om-card-h .badge-ok { margin-left: auto; width: 18px; height: 18px; border-radius: 50%; background: var(--om-ok); color: #fff; display: grid; place-items: center; }
.om-card-h .badge-ok .om-ic { width: 11px; height: 11px; color: #fff; stroke-width: 3; }
.om-float { box-shadow: var(--om-shadow-pop), 0 2px 6px rgba(28,24,19,.06); border-radius: 10px; }

.om-check { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 13px; }
.om-check .l { color: var(--om-fg-muted); }
.om-check .r { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--om-ok); }
.om-check .r .om-ic { width: 14px; height: 14px; }
.om-check .r.warn { color: var(--om-warn); }
.om-check .r.pending { color: var(--om-fg-faint); font-weight: 500; }

.om-match { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--om-border-subtle); }
.om-match:last-child { border-bottom: 0; }
.om-tile { width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; flex: none; }
.om-tile.ctr { background: var(--om-ok-t); color: var(--om-ok-s); }
.om-tile.po { background: var(--om-vio-t); color: var(--om-vio); }
.om-tile.grn { background: var(--om-warn-t); color: var(--om-warn-s); }
.om-tile.inv { background: var(--om-tint); color: var(--om-brand); }
.om-match .t { font-size: 13px; font-weight: 600; line-height: 1.25; }
.om-match .s { font-family: "OM Mono", ui-monospace, monospace; font-size: 11px; color: var(--om-fg-muted); }
.om-conf { margin-left: auto; font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 4px; background: var(--om-ok-t); color: var(--om-ok-s); white-space: nowrap; }

.om-acct { display: inline-block; font-family: "OM Mono", ui-monospace, monospace; font-size: 10.5px; padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
.om-acct.debit { background: var(--om-tint); color: var(--om-brand-strong); }
.om-acct.credit { background: var(--om-ok-t); color: var(--om-ok-s); }
.om-acct.cc { background: var(--om-vio-t); color: var(--om-vio); }

.om-approver { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--om-border-subtle); }
.om-approver:last-child { border-bottom: 0; }
.om-approver .av { width: 28px; height: 28px; border-radius: 50%; background: var(--om-tint); color: var(--om-brand); border: 1px solid var(--om-az-200); display: grid; place-items: center; font-size: 11px; font-weight: 600; flex: none; }
.om-approver .n { font-size: 13px; font-weight: 600; line-height: 1.2; }
.om-approver .m { font-size: 11px; color: var(--om-fg-faint); }
.om-state { margin-left: auto; font-size: 11px; padding: 2px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.om-state.ok { background: var(--om-ok-t); color: var(--om-ok-s); border-color: var(--om-ok-b); }
.om-state.pend { background: var(--om-bg-muted); color: var(--om-fg-muted); border-color: var(--om-border); }

.om-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .5px; color: var(--om-fg-subtle); }
.om-reason { margin-top: 8px; padding: 8px 10px; background: var(--om-bg-subtle); border: 1px solid var(--om-border-subtle); border-radius: 5px; font-size: 12.5px; line-height: 1.45; color: var(--om-fg-muted); }

.om-spin { animation: om-spin 1s linear infinite; transform-origin: 50% 50%; }
@keyframes om-spin { to { transform: rotate(360deg); } }
