/* Homestead Shambani 2.2 shared UI corrections */
.collapsible-section{position:relative}
.collapse-toggle{float:right;border:1px solid #d8ded8;background:#fff;color:#294b32;border-radius:999px;padding:.32rem .68rem;font:500 .76rem/1 system-ui;cursor:pointer}
.collapsible-section.is-collapsed>:not(.section-heading):not(h2):not(h3):not(summary):not(.collapse-toggle){display:none!important}
.collapsible-section.is-collapsed>.section-heading>:not(:first-child){display:none!important}
.collapse-summary-heading{grid-column:1/-1}

/* One horizontal scroller per table. Panels themselves never create a second bar. */
.app-shell section.panel.scroll,.app-shell .panel>.scroll{overflow:visible!important}
.table-scroll-top,.r4-scroll-top{display:none!important}
.table-scroll-only{display:block;max-width:100%;overflow-x:auto;overflow-y:visible;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable}
.table-scroll-only>.table-scroll-only{overflow:visible}
.table-scroll-only table{min-width:max-content;width:100%}

.import-batch-table{white-space:nowrap}
.import-batch-table td,.import-batch-table th{padding-block:.4rem;line-height:1.15}
.import-batch-table .truncate{display:block;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Financial and management figures use colour and spacing, not heavy type. */
.app-shell .card .value,.app-shell .period-card .value,.app-shell .period-card strong,.app-shell .r5-kpis strong,.app-shell .mini-stat strong,.app-shell .r5-calc-results strong{font-size:1rem!important;font-weight:500!important;line-height:1.22;font-variant-numeric:tabular-nums}
.app-shell td strong,.app-shell td b,.app-shell .panel strong{font-weight:500!important}
.app-shell table{font-size:.86rem}
.app-shell h1{font-size:clamp(1.3rem,2vw,1.7rem)!important;font-weight:600!important}
.app-shell h2{font-size:1.03rem!important;font-weight:600!important}
.app-shell h3{font-size:.94rem!important;font-weight:600!important}
body[data-page="cashflow-dashboard.php"] .positive,body[data-page="budget-planner.php"] .positive{color:#18753a}
body[data-page="cashflow-dashboard.php"] .negative,body[data-page="budget-planner.php"] .negative{color:#b42318}
body[data-page="cashflow-dashboard.php"] .card:nth-child(3n+1){border-top:3px solid #2d7d46}
body[data-page="cashflow-dashboard.php"] .card:nth-child(3n+2){border-top:3px solid #c77818}
body[data-page="cashflow-dashboard.php"] .card:nth-child(3n){border-top:3px solid #3867a8}
body[data-page="budget-planner.php"] .projection-value,body[data-page="farm-dashboard.php"] .value{font-weight:500!important}

/* Live Team: online bubble sits above chat, both are clear of mobile navigation. */
.online-chat-bubble{position:fixed;right:18px;bottom:178px;z-index:1901;background:#fff;border:1px solid #d8ded8;box-shadow:0 5px 18px #1d352333;border-radius:999px;padding:.42rem 2rem .42rem .7rem;font-size:.78rem;color:#26452d}
.online-chat-bubble .online-dot{margin-right:.3rem}
.online-bubble-close{position:absolute;right:.35rem;top:50%;transform:translateY(-50%);border:0;background:transparent;color:#637168;font-size:1rem;line-height:1;cursor:pointer}
.live-team-fab{bottom:110px!important;right:18px!important}
.live-team-fab-close{position:fixed;right:12px;bottom:158px;z-index:1902;width:22px;height:22px;border:1px solid #d8ded8;border-radius:50%;background:#fff;color:#52645a;cursor:pointer;line-height:18px}

.casual-common-work{grid-column:1/-1}.casual-common-work textarea{min-height:96px;width:100%}
.casual-work-field{grid-column:span 2}.casual-work-field textarea{min-height:78px}
.cashier-guide,.cashier-sales,.sale-help,.sale-builder{grid-column:1/-1!important;width:100%}
.sales-workspace{grid-template-columns:1fr!important}
.sale-help,.cashier-guide{order:1}
.sale-builder,.cashier-sales{order:2}

.receipt-scan{border:1px solid #dce4dc;border-radius:12px;padding:.8rem;background:#f8fbf8}
.receipt-scan summary{cursor:pointer;font-weight:550;color:#294b32}
.receipt-scan-status{display:block;margin-top:.45rem;color:#52645a}
.receipt-scan-preview{white-space:pre-wrap;max-height:150px;overflow:auto;font-size:.78rem;background:#fff;border:1px solid #e4e8e4;border-radius:8px;padding:.55rem;margin-top:.5rem}
.staff-history-modal .r5-modal-card{max-width:1000px}

@media(max-width:700px){
 .casual-work-field{grid-column:1/-1}
 .online-chat-bubble{right:12px;bottom:174px}
 .live-team-fab{right:12px!important;bottom:106px!important}
 .live-team-fab-close{right:7px;bottom:154px}
 .app-shell table{font-size:.8rem}
}
