.op-wrap{display:grid;gap:18px;color:var(--text,var(--text-1));font-family:inherit}
.op-heading,.op-deal>header{display:flex;align-items:start;justify-content:space-between;gap:20px}
.op-heading h1{margin:0;font-size:28px;text-wrap:balance}
.op-heading p,.op-deal p{max-width:76ch;line-height:1.5}
.op-heading button,.op-deal button{min-height:44px;flex-shrink:0}
.op-deals{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:20px}
.op-deal{min-width:0;padding:24px;border:1px solid var(--border,var(--hairline));border-radius:16px;background:var(--card,var(--surface-1))}
.op-deal h2{font-size:18px;margin:0}
.op-deal code{font-size:11px;overflow-wrap:anywhere}
.op-status{font-size:13px;border:1px solid var(--border,var(--hairline));border-radius:20px;padding:5px 10px;white-space:nowrap}
.op-line{display:flex;justify-content:space-between;gap:20px;padding:8px 0;border-bottom:1px solid var(--border,var(--hairline))}
.op-line dt{min-width:0;overflow-wrap:anywhere}
.op-line dd{margin:0;text-align:right;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.op-muted{color:var(--text-dim,var(--text-2));font-size:13px}
.op-totals{font-weight:600;font-size:17px}
.op-deal summary{cursor:pointer;min-height:40px;line-height:40px}
.op-deal footer{margin-top:18px}
.op-flag{font-weight:600}
.op-flag[data-reconciliation=match]{color:var(--success,var(--primary))}
.op-flag[data-reconciliation=mismatch]{color:var(--warning,var(--warning))}
.op-wrap button:focus-visible,.op-wrap summary:focus-visible{outline:2px solid var(--aqua,var(--primary));outline-offset:3px}
@media(max-width:600px){.op-heading{flex-wrap:wrap}.op-deal{padding:16px}.op-deal>header{flex-wrap:wrap}}
.op-empty{display:grid;justify-items:center;gap:10px;padding:48px 24px;text-align:center;border:1px dashed var(--border,var(--hairline));border-radius:16px;background:var(--card,var(--surface-1))}
.op-empty h2{margin:0;font-size:18px}
.op-empty p{margin:0;max-width:52ch;line-height:1.5;color:var(--text-dim,var(--text-2))}
.op-empty-mark{width:40px;height:40px;border-radius:50%;border:2px solid var(--aqua,var(--primary));opacity:.7}
/* Office shell (glass theme): the Payouts tab of Money & funding reads the shared tokens; app/index.html keeps the rules above. */
[data-shell] .op-wrap{gap:14px;color:var(--c-text-1,var(--text-1))}
[data-shell] .op-heading{align-items:center}
[data-shell] .op-heading h1{font:600 20px/1.2 var(--font-display,var(--font-ui));letter-spacing:-.01em}
[data-shell] .op-heading p{margin:4px 0 0;color:var(--c-text-2,var(--text-2));font-size:14px}
[data-shell] .op-heading button,[data-shell] .op-wrap [data-payout-more]{min-height:36px;padding:0 16px;border-radius:10px;background:var(--og-field)!important;border:1px solid var(--c-hairline-strong)!important;color:var(--c-text-1)!important;box-shadow:inset 0 1px 0 var(--og-hi)!important;font:500 13.5px var(--font-ui);cursor:pointer}
[data-shell] .op-heading button:hover:not(:disabled),[data-shell] .op-wrap [data-payout-more]:hover:not(:disabled){background:var(--og-field-hover)!important}
[data-shell] .op-wrap [data-payout-more]{justify-self:center}
[data-shell] .op-wrap>p[role=status]{margin:0;color:var(--c-text-2,var(--text-2));font-size:13px}
[data-shell] .op-wrap>p[role=status]:empty{display:none}
[data-shell] .op-deal,[data-shell] .op-empty{background:var(--og-panel)!important;border:1px solid var(--c-glass-border)!important;border-radius:var(--og-radius,14px)!important;box-shadow:var(--og-shadow)!important;-webkit-backdrop-filter:var(--og-blur-panel);backdrop-filter:var(--og-blur-panel)}
[data-shell] .op-deal{padding:18px 20px}
[data-shell] .op-deal>header p:has(>code){display:none}
[data-shell] .op-status{border-color:var(--c-hairline-strong);background:var(--og-field);color:var(--c-text-2);font-size:12.5px}
[data-shell] .op-line{border-bottom-color:var(--c-hairline)}
[data-shell] .op-flag[data-reconciliation=match]{color:var(--c-success-ink,var(--success))}
[data-shell] .op-flag[data-reconciliation=mismatch]{color:var(--c-warning-ink,var(--warning))}
[data-shell] .op-empty{display:grid;grid-template-columns:30px minmax(0,1fr);align-items:center;justify-items:start;gap:2px 14px;padding:16px 20px;text-align:left}
[data-shell] .op-empty-mark{grid-row:span 2;width:30px;height:30px;border:1.5px solid var(--c-primary);opacity:.8}
[data-shell] .op-empty h2{font:600 15px/1.3 var(--font-ui)}
[data-shell] .op-empty p{max-width:none;color:var(--c-text-2);font-size:13px}
/* Owner 06:13 (O9): every card leads with the payee rep (initials avatar + name); the contract line sits under it. */
.op-deal>header{align-items:center;justify-content:flex-start}
.op-deal>header>div{flex:1 1 auto;min-width:0}
.op-deal>header h2{overflow-wrap:break-word}
.op-deal>header p{margin:2px 0 0;color:var(--c-text-2,inherit);font-size:13px}
.op-deal>header .op-status{flex:none;margin-left:auto}
.op-avatar{flex:none;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;font-size:13px;font-weight:800;letter-spacing:.02em;color:var(--c-text-1,inherit);background:linear-gradient(135deg,rgba(255,255,255,.14),rgba(255,255,255,.03));border:1px solid var(--c-hairline-strong,rgba(255,255,255,.2))}

/* Fit kit (../office-fit.css): the commission cards are whole rows that fill the content area; "+N más" opens the rest in place.
   Money's Office board (app/office-next/money.js, .mf-payment-detail) re-homes these same .op-deal cards into its own
   two-column board layout (money.css) instead of office-payouts.js's native single-column list. The two stylesheets' grid
   rules raced on the moved cards (office-payouts.css's 4-column "head flag totals foot" area beat money.css's own grid on
   specificity), crushing the header's name column to a sliver that broke every word onto its own line. Excluding cards
   inside .mf-payment-detail leaves the native office-payouts.js list (and the rep dashboard) on this layout unchanged. */
@media (min-width: 1024px) and (min-height: 600px) {
  [data-shell] .op-wrap[data-fit]:not(:has(.mf-payment-board)) { display: flex; flex-direction: column; }
  [data-shell] .op-wrap[data-fit]:not(:has(.mf-payment-board)) > .op-heading, [data-shell] .op-wrap[data-fit]:not(:has(.mf-payment-board)) > p[role="status"] { flex: none; }
  /* One commission per row: payee | reconciliation | net totals | actions, with the calculation and audit disclosures under it. */
  html:not(#fit-a):not(#fit-b) body [data-shell] .op-wrap[data-fit] .op-deals { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--fit-row-gap); align-content: start; }
  [data-shell] .op-wrap[data-fit] .op-deal:not(.mf-payment-detail .op-deal) {
    display: grid; align-items: center; align-content: space-evenly; column-gap: 20px; row-gap: 0; padding: 10px 16px;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, .6fr) minmax(0, 1fr) auto;
    grid-template-areas: "head flag totals foot" "d1 d1 d2 d2";
  }
  [data-shell] .op-wrap[data-fit] .op-deal:not(.mf-payment-detail .op-deal) > header { grid-area: head; }
  [data-shell] .op-wrap[data-fit] .op-deal:not(.mf-payment-detail .op-deal) > .op-flag { grid-area: flag; margin: 0; }
  [data-shell] .op-wrap[data-fit] .op-deal:not(.mf-payment-detail .op-deal) > .op-totals { grid-area: totals; margin: 0; display: flex; gap: 20px; font-size: 14px; }
  [data-shell] .op-wrap[data-fit] .op-deal:not(.mf-payment-detail .op-deal) > .op-totals .op-line { display: grid; gap: 0; padding: 0; border: 0; min-width: 0; }
  [data-shell] .op-wrap[data-fit] .op-deal:not(.mf-payment-detail .op-deal) > .op-totals .op-line dd { text-align: start; white-space: nowrap; }
  [data-shell] .op-wrap[data-fit] .op-deal:not(.mf-payment-detail .op-deal) > footer { grid-area: foot; margin: 0; display: flex; gap: 8px; }
  [data-shell] .op-wrap[data-fit] .op-deal:not(.mf-payment-detail .op-deal) > details:nth-of-type(1) { grid-area: d1; }
  [data-shell] .op-wrap[data-fit] .op-deal:not(.mf-payment-detail .op-deal) > details:nth-of-type(2) { grid-area: d2; }
  [data-shell] .op-wrap[data-fit] .op-deal:not(.mf-payment-detail .op-deal) > p:not(.op-flag) { grid-column: 1 / -1; margin: 4px 0; }
  [data-shell] .op-wrap[data-fit] .op-deal:not(.mf-payment-detail .op-deal) summary { min-height: 32px; line-height: 32px; }
}
