.f2-tools{display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin:18px 0}.f2-tools .field{min-width:170px;flex:1}.f2-tools button{margin-bottom:2px}.f2-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px;margin:18px 0}.f2-totals>div{display:grid;gap:4px;border:1px solid #c9e5e5;background:linear-gradient(120deg,#effaf8,#f8f4ff);padding:18px;border-radius:12px}.f2-totals strong{font-size:25px;color:#126b78}.f2-totals small,.f2-totals span{color:#546d7a;font-size:12px}.f2-follow-list{display:grid;gap:12px}.f2-follow-patient{display:grid;grid-template-columns:1.4fr 1fr;padding:18px;gap:20px}.f2-follow-patient h3{margin:0 0 5px}.f2-follow-patient small{display:block;margin:5px 0}.f2-reason{display:inline-block;border:1px solid #d3e1e8;background:#f4f7fc;padding:4px 7px;border-radius:5px;margin:3px;font-size:12px}.f2-health-list{display:grid;grid-template-columns:1fr 1fr;gap:12px}.f2-health-list dt{font-size:12px;color:#526778}.f2-health-list dd{margin:5px 0;font-weight:600}.pending-payment-tools select{min-height:36px}.pending-patient>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;padding:12px;background:#f2f8fb}.pending-patient[open]>summary{border-bottom:1px solid #d8e6eb}.pending-patient h3{margin:0}.pending-review-label{color:#745a17;background:#fff8e0;border:1px dashed #b69b4b;padding:6px 9px;border-radius:7px}.word-inventory-details{margin:10px 0}.word-inventory-details summary{cursor:pointer;font-weight:600}.word-inventory-details ul{max-height:230px;overflow:auto;padding-left:18px}.f2-birthday-wa{margin-left:8px}
/* Selection connects the source row to its open detail; red/green remain payment states. */
.cp-attention,.oq-row>td:last-child>[data-oq-state]{position:relative}.cp-row.cp-selected .cp-attention::after,.oq-row.oq-selected>td:last-child>[data-oq-state]::after{content:'';position:absolute;right:-11px;top:20px;width:0;height:0;border-top:10px solid transparent;border-bottom:10px solid transparent;border-left:12px solid #6851a6;z-index:4;pointer-events:none}.cp-row.cp-selected .cp-side,.oq-row.oq-selected .oq-side{border-left:4px solid #6851a6!important}.cp-row.cp-selected .cp-side-heading,.oq-row.oq-selected .oq-side-heading{background:linear-gradient(100deg,#f0ebfa,#edfafa)}.cp-row.cp-selected .cp-attention,.oq-row.oq-selected>th{border-left:4px solid #6851a6}.cp-ledger .cp-status.payment-status-dot[data-state=review],.oq-finance .oq-state.payment-status-dot[data-state=review]{--status-fill:#ffecb8;border:2px dashed #927021}
@media(max-width:800px){.f2-follow-patient,.f2-health-list{grid-template-columns:1fr}.cp-row.cp-selected .cp-attention::after,.oq-row.oq-selected>td:last-child>[data-oq-state]::after{right:12px;top:auto;bottom:-12px;transform:rotate(90deg)}}
@media print{.f2-tools{display:none}.insight-card{break-inside:avoid}}

/* Keep the sidebar anchored to oq-workspace: its table cell must stay static. */
.oq-row.oq-selected>td:last-child>[data-oq-state]::after{right:-18px;top:8px}
@media(max-width:1050px){.oq-row.oq-selected>td:last-child>[data-oq-state]::after{display:none}}
