/* ============================================================
   ops.css — Phase 9.1D: Cash Flow, Bills & Commitments, Customers, Activity.
   Same warm workspace as the Overview: soft white cards, hairlines, quiet
   chips. Everything wraps; nothing scrolls sideways at 375px.
   ============================================================ */
.op-head{display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:6px 16px; margin:2px 0 16px}
.op-lead{margin:0; max-width:68ch; font-size:14.5px; line-height:1.55; color:var(--ink-muted)}
.op-fresh{font-size:12px; color:var(--ink-faint); white-space:nowrap}
.op-kpis{display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:12px; margin-bottom:18px}
.op-kpi{display:flex; flex-direction:column; gap:3px; min-width:0; padding:16px 18px; border-radius:16px; background:rgba(255,255,255,.86); border:1px solid rgba(44,36,28,.07); box-shadow:var(--sh-card, 0 1px 2px rgba(31,27,22,.05))}
.op-kpi span{font-size:12px; font-weight:600; color:var(--ink-muted)}
.op-kpi b{font-size:22px; font-weight:650; letter-spacing:-.02em; color:var(--ink); overflow-wrap:anywhere}
.op-kpi small{font-size:12px; color:var(--ink-faint); overflow-wrap:anywhere}
.op-kpi.is-risk b{color:var(--risk, #B23A30)}
.op-kpi.is-warn b{color:var(--attention, #9A5B12)}
.op-group, .op-gaps, .op-day, .op-note{margin-bottom:14px; padding:6px 20px 8px; border-radius:18px; background:rgba(255,255,255,.86); border:1px solid rgba(44,36,28,.07); box-shadow:var(--sh-card, 0 1px 2px rgba(31,27,22,.05))}
.op-group.is-muted{background:rgba(255,255,255,.55); box-shadow:none}
.op-group-h{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0 6px}
.op-group-h h3, .op-day h3, .op-gaps h3{margin:0; font-size:13px; font-weight:650; letter-spacing:.01em; color:var(--ink)}
.op-group-h > span{font-size:14px; font-weight:650; color:var(--ink)}
.op-group.is-risk .op-group-h h3{color:var(--risk, #B23A30)}
.op-group.is-warn .op-group-h h3{color:var(--attention, #9A5B12)}
.op-list{list-style:none; margin:0; padding:0}
.op-row, .op-cust summary{display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 0; border-top:1px solid var(--line-soft, #EFEAE1)}
.op-list > li:first-child .op-row, .op-list > .op-row:first-child, .op-custs > li:first-child summary{border-top:none}
.op-row-main{display:flex; flex-direction:column; gap:3px; min-width:0}
.op-row-main b{font-size:14px; font-weight:600; color:var(--ink); overflow-wrap:anywhere}
.op-row-main > span{font-size:12.5px; color:var(--ink-muted); overflow-wrap:anywhere}
.op-row-side{display:flex; flex-direction:column; align-items:flex-end; gap:4px; flex-shrink:0; text-align:right}
.op-row-side b{font-size:14.5px; font-weight:650; color:var(--ink)}
.op-row-side b.is-risk{color:var(--risk, #B23A30)}
.op-row-side small{font-size:11.5px; color:var(--ink-faint)}
.op-chip{display:inline-flex; align-items:center; min-height:20px; padding:0 8px; border-radius:999px; font-size:11px; font-weight:600; white-space:nowrap; background:rgba(44,36,28,.06); color:var(--ink-muted)}
.op-chip.is-good{background:rgba(29,122,78,.1); color:#1D7A4E}
.op-chip.is-warn{background:rgba(154,91,18,.1); color:#8A5212}
.op-chip.is-risk{background:rgba(178,58,48,.1); color:#A3352C}
.op-chip.is-info{background:rgba(47,95,143,.1); color:#2F5F8F}
.op-chip.is-manual{background:rgba(120,100,70,.12); color:#6F5A3B}
.op-chip.is-muted{background:rgba(44,36,28,.05); color:var(--ink-faint)}
.op-flags{display:flex; flex-wrap:wrap; gap:5px; margin-top:3px}
.op-note{display:flex; flex-direction:column; gap:4px; padding:16px 20px}
.op-note b{font-size:14px; color:var(--ink)} .op-note span{font-size:13px; color:var(--ink-muted); line-height:1.5}
.op-foot{margin:6px 2px 14px; font-size:12.5px; line-height:1.55; color:var(--ink-faint); max-width:80ch}
.op-ari{display:inline-flex; align-items:center; gap:8px; min-height:36px; margin:2px 0 8px; padding:0 14px 0 6px; border-radius:999px; border:1px solid rgba(44,36,28,.1); background:rgba(255,255,255,.8); font:inherit; font-size:13px; font-weight:600; color:var(--ink); cursor:pointer}
.op-ari img{border-radius:50%}
.op-ari:hover{background:#FFFFFF; border-color:rgba(44,36,28,.16)}
.op-ari:focus-visible{outline:none; box-shadow:var(--focus-ring)}
/* cash flow weeks */
.op-legend{display:flex; gap:16px; margin:0 2px 8px; font-size:12px; color:var(--ink-muted)}
.op-legend i{display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:6px; vertical-align:-1px}
.op-legend i.is-in, .op-bar.is-in{background:linear-gradient(90deg, #5E9C7E, #3E7F60)}
.op-legend i.is-out, .op-bar.is-out{background:linear-gradient(90deg, #C79A6B, #A9774A)}
.op-weeks{list-style:none; margin:0 0 14px; padding:6px 20px; border-radius:18px; background:rgba(255,255,255,.86); border:1px solid rgba(44,36,28,.07); box-shadow:var(--sh-card, 0 1px 2px rgba(31,27,22,.05))}
.op-week{display:grid; grid-template-columns:120px minmax(0, 1fr) auto; align-items:center; gap:14px; padding:12px 0; border-top:1px solid var(--line-soft, #EFEAE1)}
.op-week:first-child{border-top:none}
.op-week-d{display:flex; flex-direction:column}
.op-week-d b{font-size:13.5px; color:var(--ink)} .op-week-d span{font-size:12px; color:var(--ink-faint)}
.op-week-bars{display:flex; flex-direction:column; gap:6px; min-width:0}
.op-week-bars > div{display:flex; align-items:center; gap:10px; min-width:0}
.op-week-bars .tnum{font-size:12.5px; color:var(--ink-muted); white-space:nowrap}
.op-bar{display:block; height:8px; border-radius:4px; flex:0 0 auto; max-width:70%}
.op-week.is-pressure{background:linear-gradient(90deg, rgba(199,154,107,.07), transparent 60%)}
.op-gaps{padding:14px 20px}
.op-gaps ul{margin:8px 0 6px; padding-left:18px; font-size:13px; line-height:1.6; color:var(--ink-muted)}
.op-gaps p{margin:0; font-size:12.5px; color:var(--ink-faint)}
/* customers */
.op-cust details > summary{list-style:none; cursor:pointer}
.op-cust details > summary::-webkit-details-marker{display:none}
.op-cust details[open] > summary{padding-bottom:6px}
.op-cust-d{padding:0 0 14px}
.op-cust-d dl{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px 16px; margin:0}
.op-cust-d dt{font-size:11.5px; color:var(--ink-faint)} .op-cust-d dd{margin:2px 0 0; font-size:13px; color:var(--ink)}
.op-inv{list-style:none; margin:10px 0 0; padding:0}
.op-inv li{display:flex; justify-content:space-between; gap:12px; padding:6px 0; border-top:1px dashed var(--line-soft, #EFEAE1); font-size:12.5px; color:var(--ink-muted)}
/* activity */
.op-day{padding:12px 20px 6px}
.op-events{list-style:none; margin:6px 0 0; padding:0}
.op-event{display:grid; grid-template-columns:28px minmax(0, 1fr) auto; align-items:center; gap:12px; padding:10px 0; border-top:1px solid var(--line-soft, #EFEAE1)}
.op-event:first-child{border-top:none}
.op-ev-ic{width:28px; height:28px; border-radius:9px; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; background:rgba(47,95,143,.08); color:#2F5F8F}
.op-event.is-safe .op-ev-ic{background:rgba(29,122,78,.1); color:#1D7A4E}
.op-event.is-risk .op-ev-ic{background:rgba(178,58,48,.1); color:#A3352C}
.op-event.is-warn .op-ev-ic{background:rgba(154,91,18,.1); color:#8A5212}
.op-event.is-k-sync.is-info .op-ev-ic{background:rgba(120,120,120,.08); color:var(--ink-muted, #6B6B6B)}
.op-event b{display:block; font-size:13.5px; font-weight:600; color:var(--ink); overflow-wrap:anywhere}
.op-event div > span{display:block; font-size:12.5px; color:var(--ink-muted); overflow-wrap:anywhere}
.op-ev-side{display:flex; flex-direction:column; align-items:flex-end; gap:2px}
.op-ev-side b{font-size:13.5px} .op-ev-side small{font-size:11.5px; color:var(--ink-faint); white-space:nowrap}
/* empty / loading / error */
.op-empty{max-width:560px; margin:18px auto; padding:34px 28px; border-radius:20px; text-align:center; background:rgba(255,255,255,.86); border:1px solid rgba(44,36,28,.07); box-shadow:var(--sh-card, 0 1px 2px rgba(31,27,22,.05))}
.op-empty h2{margin:0 0 8px; font-size:19px; font-weight:650; color:var(--ink)}
.op-empty p{margin:0 auto 16px; max-width:46ch; font-size:14px; line-height:1.55; color:var(--ink-muted)}
.op-empty .btn{width:auto; margin:0 auto}
.op-loading{display:flex; flex-direction:column; gap:12px}
.op-skel{height:78px; border-radius:16px; background:linear-gradient(90deg, rgba(255,255,255,.6), rgba(255,255,255,.9), rgba(255,255,255,.6)); background-size:200% 100%; animation:opshim 1.4s ease-in-out infinite}
.op-skel.is-short{height:46px; width:60%}
@keyframes opshim{to{background-position:-200% 0}}
.op-error{display:flex; flex-direction:column; align-items:flex-start; gap:8px; padding:18px 20px; border-radius:16px; background:rgba(178,58,48,.05); border:1px solid rgba(178,58,48,.15)}
.op-error b{color:var(--ink)} .op-error span{font-size:13px; color:var(--ink-muted)} .op-error .btn{width:auto; margin:4px 0 0}
@media (prefers-reduced-motion: reduce){ .op-skel{animation:none} }
/* tablet / phone */
@media (max-width:1100px){ .op-kpis{grid-template-columns:repeat(2, minmax(0, 1fr))} }
@media (max-width:719px){
  .op-kpis{gap:10px}
  .op-kpi{padding:13px 14px} .op-kpi b{font-size:19px}
  .op-group, .op-gaps, .op-day, .op-weeks{padding-left:16px; padding-right:16px}
  .op-week{grid-template-columns:minmax(0, 1fr); gap:8px}
  .op-week .op-chip{justify-self:start}
  .op-cust-d dl{grid-template-columns:minmax(0, 1fr)}
  .op-row, .op-cust summary{align-items:flex-start}
}
.op-custs{margin-bottom:14px; padding:2px 20px; border-radius:18px; background:rgba(255,255,255,.86); border:1px solid rgba(44,36,28,.07); box-shadow:var(--sh-card, 0 1px 2px rgba(31,27,22,.05))}
@media (max-width:719px){ .op-custs{padding:2px 16px} }
/* ---- Expandable Bills & Commitments (groups and items) ---- */
.op-xgroup > summary{list-style:none; cursor:pointer}
.op-xgroup > summary::-webkit-details-marker, .op-xrow summary::-webkit-details-marker, .mp-more > summary::-webkit-details-marker{display:none}
.op-xgroup > summary h3 small{font-weight:500; color:var(--ink-faint)}
.op-chev{flex-shrink:0; color:var(--ink-faint); transition:transform .18s ease}
details[open] > summary > .op-chev, details[open] > summary .mp-chev{transform:rotate(180deg)}
.op-xgroup > summary .op-chev{margin-left:6px}
.op-xrow{list-style:none}
.op-xrow summary{list-style:none; cursor:pointer}
.op-list > li.op-xrow:first-child .op-row{border-top:none}
.op-xrow summary:focus-visible, .op-xgroup > summary:focus-visible{outline:2px solid var(--focus, #2F5F8F); outline-offset:2px; border-radius:10px}
.op-detail{padding:2px 0 14px}
.op-detail dl{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px 18px; margin:0 0 10px}
.op-dl{min-width:0} .op-dl dt{font-size:11.5px; font-weight:600; color:var(--ink-faint)} .op-dl dd{margin:2px 0 0; font-size:13px; color:var(--ink); overflow-wrap:anywhere}
.op-dl dd small{color:var(--ink-faint)}
.op-xlink{display:inline-flex; align-items:center; min-height:32px; padding:0 12px; border-radius:999px; border:1px solid var(--line); background:transparent; font:inherit; font-size:12.5px; font-weight:600; color:var(--ink); text-decoration:none; cursor:pointer}
@media (prefers-reduced-motion: reduce){ .op-chev, .mp-chev{transition:none} }
/* ---- Overview: scope line and the Next 30 days card (money-plan-html.js) ---- */
.mp-scope{display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; margin:2px 0 16px; font-size:12.5px; color:var(--ink-muted)}
.mp-scope b{color:var(--ink); font-weight:650} .mp-scope.is-stale{color:var(--attention, #9A5B12)}
.mp-head{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 12px}
.mp-lead, .mp-note{margin:6px 0 14px; font-size:13px; line-height:1.55; color:var(--ink-muted); max-width:80ch}
.mp-kpis{margin-bottom:12px}
.mp-alert{margin:0 0 12px; padding:12px 14px; border-radius:12px; background:rgba(44,36,28,.04); font-size:13px; line-height:1.5; color:var(--ink)}
.mp-alert.is-risk{background:rgba(178,58,48,.07); color:var(--ink)} .mp-alert.is-risk b{color:var(--risk, #B23A30)}
.mp-weeks{display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:8px; margin:0 0 6px}
.mp-week{display:flex; flex-direction:column; gap:2px; padding:9px 10px; border-radius:12px; background:rgba(44,36,28,.035); font-size:12px; color:var(--ink-muted); min-width:0}
.mp-week b{font-size:13px; font-weight:650; color:var(--ink)} .mp-in{color:#1D7A4E !important}
.mp-rows .op-row-side small.mp-neg{color:var(--risk, #B23A30)}
.mp-more{margin:4px 0 8px} .mp-more > summary{display:flex; align-items:center; gap:6px; list-style:none; cursor:pointer; font-size:12.5px; font-weight:600; color:var(--ink-muted); padding:6px 0}
.mp-sub{margin-top:16px; padding-top:14px; border-top:1px solid var(--line)}
.mp-sub h3{margin:0 0 6px; font-size:13px; font-weight:650; color:var(--ink)} .mp-sub h3 + .mp-bullets + h3{margin-top:12px}
.mp-bullets{margin:0 0 4px; padding-left:18px; font-size:12.5px; line-height:1.6; color:var(--ink-muted)} .mp-bullets li.is-risk{color:var(--risk, #B23A30)}
.mp-bullets b{color:var(--ink); font-weight:650}
@media (max-width:719px){
  .op-detail dl{grid-template-columns:minmax(0, 1fr)}
  .mp-weeks{grid-template-columns:repeat(2, minmax(0, 1fr))}
  .mp-weeks .mp-week:last-child{grid-column:1 / -1}
}
.mp-week b small{font-size:11px; font-weight:600; color:var(--ink-faint); margin-right:2px}
.op-xrow summary, .op-xgroup > summary{font-weight:inherit; font-size:inherit; color:inherit}
.op-xrow summary .op-row-main > span{font-weight:400}
.op-xgroup > summary, .op-xrow summary.op-row{justify-content:flex-start}
.op-xgroup > summary > span.tnum, .op-xgroup > summary > .op-chip{margin-left:auto}
.op-xrow summary .op-row-side{margin-left:auto}
.op-xrow summary .op-chev{align-self:center}

/* ---------- Phase 9.3 — Overview hierarchy (js/forecast-html.js): revenue · next 30 days · next payment · today ---------- */
.fp-card{margin-top:18px}
.ov-top.fp-solo{display:block}
.fp-rev{display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px}
.fp-rev .fp-k{flex-basis:100%; font-size:12px; font-weight:650; letter-spacing:.04em; text-transform:uppercase; color:var(--ink-faint)}
.fp-rev > b{font-size:24px; font-weight:650; letter-spacing:-.02em; color:var(--ink)}
.fp-rev > small{flex-basis:100%; font-size:12.5px; color:var(--ink-muted)}
.fp-rev.is-na > b{font-size:17px; color:var(--ink-muted)}
.fp-more{margin-top:8px} .fp-more > summary{display:inline-flex; align-items:center; gap:6px; min-height:44px; list-style:none; cursor:pointer; font-size:12.5px; font-weight:600; color:var(--ink-muted)}
.fp-more > summary::-webkit-details-marker, .fp-fig > summary::-webkit-details-marker{display:none}
.fp-figs{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px; align-items:start}
.fp-fig{min-width:0; border-radius:16px; background:rgba(255,255,255,.86); border:1px solid rgba(44,36,28,.07); box-shadow:var(--sh-card, 0 1px 2px rgba(31,27,22,.05))}
.fp-fig > summary{display:flex; flex-direction:column; gap:4px; padding:16px 18px 12px; list-style:none; cursor:pointer; border-radius:16px}
.fp-fig > summary:focus-visible{outline:2px solid var(--accent, #2C5C86); outline-offset:2px}
.fp-fig .fp-l{font-size:12.5px; font-weight:650; color:var(--ink-muted)}
.fp-fig > summary > b{font-size:28px; font-weight:680; letter-spacing:-.025em; color:var(--ink); overflow-wrap:anywhere}
.fp-fig > summary > small{font-size:12.5px; line-height:1.4; color:var(--ink-faint)}
.fp-fig .fp-open{display:inline-flex; align-items:center; gap:4px; min-height:32px; margin-top:4px; font-size:12px; font-weight:600; color:var(--ink-muted)}
.fp-fig.is-keep > summary > b{color:#2E5478}
.fp-fig.is-safe > summary > b{color:var(--good, #2F7A4F)}
.fp-fig.is-risk > summary > b{color:var(--risk, #B23A30)}
.fp-fig.is-warn > summary > b{color:var(--attention, #9A5B12); font-size:22px}
.fp-fig .fp-body{padding:0 18px 14px; border-top:1px solid var(--line, rgba(44,36,28,.07))}
.fp-fig .fp-body .op-list{margin:6px 0}
.fp-timing{margin-bottom:14px} .fp-timing .brf-act{margin-left:6px}
.fp-next{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:6px 0 2px}
.fp-next > div{display:flex; flex-direction:column; gap:2px; min-width:0} .fp-next > div b{font-size:15px; overflow-wrap:anywhere} .fp-next > div span{font-size:12.5px; color:var(--ink-muted)}
.fp-next > b{font-size:20px; font-weight:650; white-space:nowrap}
.op-row.fp-left .op-row-main b, .op-row.fp-left .op-row-side b{font-weight:700}
.fp-today{grid-template-columns:repeat(3, minmax(0, 1fr)); margin-bottom:6px}
.fp-full-body{margin-top:6px}
@media (max-width:719px){
  .fp-figs, .fp-today{grid-template-columns:minmax(0, 1fr)}
  .fp-fig > summary > b{font-size:26px}
  .fp-fig > summary{display:grid; grid-template-columns:minmax(0, 1fr) auto; column-gap:10px}
  .fp-fig > summary > .fp-l, .fp-fig > summary > small{grid-column:1 / -1}
  .fp-fig > summary > b{grid-column:1} .fp-fig .fp-open{grid-column:2; grid-row:2; align-self:center; margin-top:0}
}
.ov-card.fp-rev-card{padding-top:14px; padding-bottom:6px}
.fp-rev-card .fp-more{margin-top:0}
.fp-rev{column-gap:10px} .fp-rev > b{font-size:22px}
@media (min-width:720px){ .fp-rev .fp-k{flex-basis:auto} .fp-rev > small{flex-basis:auto} }
#ovRevenue.ov-card{padding-top:14px; padding-bottom:4px}
@media (max-width:719px){
  .fp-today{gap:8px}
  .fp-today .op-kpi{display:grid; grid-template-columns:minmax(0, 1fr) auto; align-items:baseline; column-gap:10px; row-gap:0; padding:10px 14px}
  .fp-today .op-kpi b{font-size:18px; text-align:right} .fp-today .op-kpi small{grid-column:1 / -1}
}
.fp-fig > summary{text-align:left; align-items:flex-start}
.mp-alert.is-warn{background:rgba(176,122,24,.08); color:var(--ink)} .mp-alert.is-warn .mp-bullets{margin:6px 0 0}
.dec-safe .ov-safe-reasons{margin:6px 0 0; padding-left:18px; font-size:13px; line-height:1.5; color:var(--ink-2, #4a4f5a)} .dec-safe .ov-safe-reasons li{margin:0 0 4px}
