/* v7.37: screen-only layout corrections shared by admin and customer pages. */
@media screen {
html{ -webkit-text-size-adjust:100%;text-size-adjust:100% }
:where(.screen,.module,.invoice-register,.invoice-register-heading,.estimate-register-controls,.invoice-table-wrap,.customer-head,.project-heading,.project-identity,.project-overview-grid,.dashboard-grid,.customer-review-layout,.contract-signing-layout,.portal-intro,.request-heading,.request-form-grid,.file)>*{min-width:0}
:where(.screen,.module,.invoice-register,.invoice-table-wrap,.customer-review-layout,.contract-signing-layout){max-width:100%}
.invoice-table-wrap{width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
:where(.tabs,.project-tabs,.invoice-filters,.status-filters,.ledger-view-tabs){max-width:100%;min-width:0;overscroll-behavior-x:contain}
:where(.tabs,.project-tabs,.invoice-filters,.status-filters,.ledger-view-tabs)>button{flex-shrink:0}
:where(.page-head,.customer-actions,.project-head-actions,.invoice-heading,.invoice-actions,.delivery-status-actions){flex-wrap:wrap}
:where(.screen,.portal-header,.portal-intro,.portal-facts,.requests-module,.question,.file) :where(h1,h2,h3,p,strong,a,small){overflow-wrap:anywhere}
:where(.drawer,.ops-sheet,.project-activation-panel,.revision-note-panel,.profile-panel,.delivery-panel,.contract-panel){max-height:100dvh}
:where(.drawer,.ops-sheet,.project-activation-panel,.revision-note-panel,.profile-panel,.delivery-panel,.contract-panel)>:is(form,section,div){min-height:0}
:where(.drawer,.ops-sheet,.project-activation-panel,.revision-note-panel,.profile-panel,.delivery-panel,.contract-panel)>footer{flex-shrink:0;padding-bottom:max(14px,env(safe-area-inset-bottom))}
:where(.public-contract,.public-review){margin-left:0!important;width:100%;max-width:100%}
:where(.public-contract,.public-review) :where(.contract-document,.estimate-document){min-width:0;max-width:100%;overflow-wrap:anywhere}
}
@media screen and (max-width:900px){
.estimate-register-controls{flex-wrap:wrap;width:100%}.estimate-register-controls .invoice-search{width:100%;flex:1 1 180px;min-width:0}.estimate-sort{min-width:0}
:where(.invoice-register-heading,.estimate-period-bar){gap:12px;flex-wrap:wrap}
.customer-actions{max-width:100%;flex-wrap:wrap}
}
@media screen and (max-width:700px){
.operations-page .screen{padding:20px 14px 32px;min-width:0}
.operations-page .topbar{padding-inline:12px;gap:10px}.topbar .crumb{min-width:0}.topbar .crumb strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:where(.screen,.drawer,.ops-sheet,.project-activation-panel,.revision-note-panel,.profile-panel,.public-review,.public-contract,.requests-module,.ask-question,.login-card) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){font-size:16px;min-width:0;max-width:100%}
:where(.screen,.drawer,.ops-sheet,.requests-module) .button{white-space:normal;height:auto;min-height:42px;padding-block:9px;line-height:1.3;max-width:100%}
:where(.page-head,.customer-head,.project-heading,.invoice-heading,.estimate-page-head,.contract-page-head){gap:12px}
:where(.page-head,.project-heading,.invoice-heading,.estimate-page-head,.contract-page-head){align-items:flex-start;flex-direction:column}
.page-head>div:last-child,.customer-actions,.project-head-actions{width:100%;flex-wrap:wrap}.customer-actions .button,.project-head-actions .button{flex:1 1 140px}
.customer-head{grid-template-columns:44px minmax(0,1fr)}.customer-head .monogram{width:44px;height:44px}.customer-head .customer-actions{grid-column:1/-1}
:where(.page-head,.customer-head,.project-identity,.invoice-heading) h1{font-size:24px}
:where(.invoice-heading-actions,.invoice-detail-actions,.estimate-toolbar-actions,.contract-toolbar-actions){display:flex;flex-wrap:wrap;gap:8px;max-width:100%}
:where(.delivery-status-card,.customer-review-layout,.contract-signing-layout){width:100%;grid-template-columns:minmax(0,1fr);gap:14px}
:where(.public-contract,.public-review){padding:14px!important}
:where(.public-contract,.public-review) :where(.signature-card,.signature-complete,.customer-decision-card,.customer-change-card,.customer-accepted-card){position:static;max-width:100%}
:where(.public-contract,.public-review) :where(.contract-document,.estimate-document){padding:18px 14px!important}
:where(.contract-parties,.contract-signature-block,.estimate-parties){grid-template-columns:minmax(0,1fr)!important;gap:16px}
:where(.drawer,.ops-sheet,.project-activation-panel,.revision-note-panel,.profile-panel,.delivery-panel,.contract-panel)>header{padding:18px 16px;gap:10px}
:where(.ops-sheet-body,.drawer-body,.project-activation-body,.revision-note-body){padding:16px;overflow-y:auto;overscroll-behavior:contain}
:where(.ops-sheet,.drawer,.project-activation-panel,.revision-note-panel)>footer{padding-inline:16px;flex-wrap:wrap;gap:8px}
dialog{max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px);box-sizing:border-box;overflow:auto}
.signature-pad{max-width:100%;touch-action:none}
.portal-header{padding:18px 16px;gap:14px;align-items:center}.portal-header img{width:min(155px,42vw);flex-shrink:0}.portal-header>div{min-width:0}.portal-header span{font-size:9px}.portal-header strong{font-size:12px}
body:has(.portal-header)>main{padding:0 14px 28px}.portal-intro{grid-template-columns:minmax(0,1fr) auto;gap:14px;padding:24px 18px}.portal-intro h1{font-size:25px}.portal-facts{gap:8px}.portal-facts>div{padding:12px}.portal-facts strong{font-size:13px}
body:has(.portal-header) section:not(.portal-intro){padding:18px 16px;margin-bottom:16px}
body:has(.portal-header) nav{gap:14px;padding:16px 0;font-size:13px}.question{padding:16px}.question-head span{white-space:normal}.file{gap:12px}.file>span{font-size:12px;overflow-wrap:anywhere;max-width:35%}.file-download{flex-shrink:0}
}
@media screen and (max-width:420px){
.portal-intro{grid-template-columns:minmax(0,1fr)}.portal-progress{justify-self:start}.portal-facts{grid-template-columns:minmax(0,1fr)}.portal-header>div span{display:none}
:where(.activation-fields,.ops-fields,.form-grid,.daily-log-meta){grid-template-columns:minmax(0,1fr)}
.invoice-register-heading{padding:16px 12px}.invoice-filters{padding-inline:12px;gap:16px}.invoice-pagination{flex-wrap:wrap;gap:10px}
}
@media screen {
/* Closed off-canvas forms must not enlarge the root scrollable viewport. */
:is(.drawer,.ops-sheet,.project-activation-panel,.revision-note-panel,.profile-panel,.delivery-panel,.contract-panel):not(.open){display:none}
}
@media screen{.invoice-table-wrap{contain:layout paint;position:relative}}

/* v7.37.1: the empty Today card is not a three-column schedule row. */
@media screen {
#dashboard .schedule-list > .directory-empty{grid-template-columns:minmax(0,1fr);justify-items:center;gap:8px;min-height:230px;padding:28px 18px}
#dashboard .schedule-list > .directory-empty > strong{max-width:100%;overflow-wrap:normal;word-break:normal}
#dashboard .schedule-list > .directory-empty > p{max-width:240px}
#invoiceWorkspaceScreen .invoice-detail-heading > .invoice-actions{display:flex;flex-direction:row;flex-wrap:wrap;gap:8px}
}

@media screen {
.portal-preview-banner{display:flex;align-items:center;flex-wrap:wrap;gap:8px 20px;padding:14px 24px;background:#eaf2fa;border-bottom:1px solid #c9d9eb;color:#183a59;font:14px/1.5 system-ui,sans-serif}
.portal-preview-banner span{flex:1 1 280px}.portal-preview-banner a{color:inherit;font-weight:600}
.portal-preview-fields{display:contents}.portal-preview-fields button:disabled{cursor:default;opacity:.65}
}
/* Text-only accounting totals have no icon column. Keep monetary values intact. */
@media screen {
#accountingOverview .ledger-overview > article{grid-template-columns:minmax(0,1fr)}
#accountingOverview .ledger-overview > article > div{min-width:0;width:100%}
#accountingOverview .ledger-overview strong{white-space:nowrap}
.accounting-list-row > span{min-width:0}
.accounting-list-row > strong{flex-shrink:0;white-space:nowrap}
}
@media screen and (max-width:650px){
#invoiceWorkspaceScreen .invoice-balance-card{grid-template-columns:minmax(0,1fr)}
#invoiceWorkspaceScreen .invoice-payment-progress{grid-column:1;grid-row:auto;margin-top:18px;padding-top:18px;border-top:1px solid #ffffff18}
#invoiceWorkspaceScreen .invoice-balance-amount{white-space:nowrap;font-size:clamp(24px,7vw,30px)}
}
/* v7.38: focused mobile controls, exclusive ledgers, and animated quick-entry drawers. */
@media screen {
#companyLedgerScreen[data-exclusive]:not([data-exclusive=""]) :is(#companyLedgerFilters,#ledgerViewTabs,#importBankCsv,#connectBank){display:none!important}
#companyLedgerScreen[data-exclusive="Income"] :is([data-ledger-entry="expense"],.category-report-panel){display:none!important}
#companyLedgerScreen[data-exclusive="Expense"] [data-ledger-entry="income"]{display:none!important}
#companyLedgerScreen[data-exclusive]:not([data-exclusive=""]) #companyLedgerOverview{grid-template-columns:repeat(2,minmax(0,1fr))}
.drawer.open,.ops-sheet.open{animation:cqc-panel-in .36s cubic-bezier(.2,.8,.2,1) both}
.drawer.is-closing:not(.open),.ops-sheet.is-closing:not(.open){display:flex;pointer-events:none;animation:cqc-panel-out .36s cubic-bezier(.4,0,.8,.2) both}
.drawer-shade.open,.ops-sheet-shade.open{animation:cqc-shade-in .36s ease both}
.drawer-shade.is-closing,.ops-sheet-shade.is-closing{display:block;pointer-events:none;animation:cqc-shade-out .36s ease both}
body:has(.drawer.open,.drawer.is-closing,.ops-sheet.open,.ops-sheet.is-closing){overflow-x:clip}
@keyframes cqc-panel-in{from{transform:translateX(105%)}to{transform:translateX(0)}}
@keyframes cqc-panel-out{from{transform:translateX(0)}to{transform:translateX(105%)}}
@keyframes cqc-shade-in{from{opacity:0}to{opacity:1}}
@keyframes cqc-shade-out{from{opacity:1}to{opacity:0}}
}
@media screen and (max-width:920px){
.topbar #notificationButton{display:grid;flex-shrink:0}
.operations-page .topbar{grid-template-columns:36px minmax(0,1fr) 36px auto;gap:8px;padding-inline:12px}
.topbar .mobile-menu,.topbar .search,.topbar .top-actions button{width:36px;height:40px;padding-inline:0;justify-content:center}
.topbar .top-actions{gap:8px}.topbar .crumb strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topbar .create span,.topbar .create .down{display:none}
}
@media screen and (max-width:720px){
#estimatePreviewScreen .preview-toolbar-actions,#contractPreviewScreen .preview-toolbar-actions{display:flex;flex-direction:column;align-items:stretch;width:100%;gap:8px}
#estimatePreviewScreen .preview-toolbar-actions>.button,#contractPreviewScreen .preview-toolbar-actions>.button{width:100%;flex:none;min-height:44px;margin:0;justify-content:center}
.portal-admin>.module{padding:16px!important;font-size:13px;line-height:1.55;min-width:0}
.portal-admin>.module h2{font-size:17px;line-height:1.3}.portal-admin>.module h3{font-size:15px;line-height:1.4}
.portal-admin>.module p,.portal-admin>.module label{font-size:13px;overflow-wrap:anywhere;word-break:normal}
.portal-admin>.module small{font-size:11px}
.portal-admin>.module>label:has([data-portal-file]){display:block;padding-left:24px;position:relative;min-width:0;max-width:100%;margin-block:12px}
.portal-admin [data-portal-file]{position:absolute;left:0;top:3px;width:16px;height:16px;margin:0}
#companyLedgerScreen[data-exclusive]:not([data-exclusive=""]) #companyLedgerOverview{grid-template-columns:minmax(0,1fr)}
}
@media screen and (prefers-reduced-motion:reduce){
.drawer.open,.drawer.is-closing,.ops-sheet.open,.ops-sheet.is-closing,.drawer-shade,.ops-sheet-shade{animation-duration:1ms!important;transition:none!important}
}
@media screen and (min-width:921px){
#estimatePreviewScreen .preview-toolbar,#contractPreviewScreen .preview-toolbar{grid-template-columns:minmax(0,1fr) auto}
}
@media screen and (max-width:920px){
#estimatePreviewScreen .preview-toolbar,#contractPreviewScreen .preview-toolbar{grid-template-columns:minmax(0,1fr)}
}
@media screen and (max-width:920px){
#estimatePreviewScreen,#contractPreviewScreen{padding:0 14px 35px!important}
#estimatePreviewScreen .preview-toolbar,#contractPreviewScreen .preview-toolbar{margin-inline:-14px;padding-inline:14px}
}
@media screen and (max-width:1280px){
#companyLedgerScreen .company-ledger-head{display:none}
#companyLedgerScreen .company-ledger-row{grid-template-columns:90px minmax(0,1fr) auto;padding:13px}
#companyLedgerScreen .company-ledger-row>*{min-width:0}
#companyLedgerScreen .company-ledger-row>span:nth-child(3){grid-column:1/-1}
#companyLedgerScreen .company-ledger-row>button[data-ledger-project],#companyLedgerScreen .company-ledger-row>span:nth-child(5){grid-column:1/3}
#companyLedgerScreen .company-ledger-row>strong{grid-column:3;grid-row:1/3;white-space:nowrap}
#companyLedgerScreen .company-ledger-row>button:last-child{grid-column:3}
}
@media screen{
#companyLedgerScreen[data-exclusive]:not([data-exclusive=""]) .company-ledger-toolbar{grid-template-columns:minmax(0,1fr)}
#companyLedgerScreen[data-exclusive]:not([data-exclusive=""]) .company-ledger-toolbar .directory-search{width:100%}
}

/* Action queue conversation destination. */
.portal-message-target{scroll-margin-top:100px;outline:2px solid #c77b35;outline-offset:5px;border-radius:10px;background-color:#fffaf2}

.project-phase-editor{margin-top:12px;max-width:440px}.project-phase-editor summary{cursor:pointer;width:fit-content}.project-phase-editor form{display:grid;gap:12px;padding-top:14px}.project-phase-editor label{display:grid;gap:6px}.project-phase-editor select{width:100%;min-height:44px;padding:10px;border:1px solid #cbd2db;border-radius:8px;background:white;color:#202a36}.project-phase-editor form p{font-size:12px;line-height:1.5}.project-phase-editor [role=status]{font-size:13px}.project-command-bar>div{min-width:0}

/* Portal-style question and response cards. */
.portal-admin .portal-chat{padding:20px}.portal-chat-heading{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}.portal-admin .portal-chat h2{font-size:17px;margin:0 0 6px}.portal-chat-heading p{font-size:12px;color:#657b8e;margin:0}.portal-chat-heading>span,.portal-chat-subject>span{font-size:11px;color:#657b8e}
.portal-admin .portal-chat-thread{display:block;border:1px solid #e0e8ee;padding:22px;margin:14px 0 0;border-radius:0}.portal-chat-subject{display:flex;justify-content:space-between;align-items:center;gap:14px}.portal-admin .portal-chat-subject h3{font-size:16px;margin:0;overflow-wrap:anywhere}.portal-chat-message{padding:14px 0 0;overflow-wrap:anywhere}.portal-chat-message small,.portal-chat-message time{font-size:10px;color:#657b8e}.portal-chat-message time{display:block;margin-top:12px}.portal-admin .portal-chat-message p{font-size:14px;line-height:1.6;margin:9px 0;white-space:pre-wrap}.portal-chat-message.is-team{padding:18px 20px;margin-top:18px;background:#f4f8fa;border-left:3px solid #6cabc9}.portal-chat-message.is-team small{font-size:14px;font-weight:700;color:#183047}.portal-chat-delivery{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px}.portal-chat-delivery small{font-size:11px;color:#657b8e}.portal-chat-delivery button{font-size:12px;padding:9px 12px}.portal-chat-compose{margin-top:16px}.portal-chat-label{display:block;font-size:12px;margin-bottom:6px}.portal-chat-compose textarea{width:100%;min-height:70px;padding:10px;border:1px solid #c4d1dc;font:inherit}.portal-chat-compose>div{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:8px}.portal-chat-compose small{font-size:11px;color:#657b8e}.portal-chat-compose button{flex-shrink:0}
.project-command-bar .project-phase-editor summary{color:#17344e!important;background:#fff!important;border:1px solid #c8d6e3;border-radius:7px;padding:10px 14px;font-size:13px;font-weight:600;list-style:none}.project-phase-editor form{background:#fff;color:#24364a;padding:16px;border-radius:8px;margin-top:10px}.project-command-bar .project-phase-editor form p{color:#62758a}.project-phase-editor form label{color:#24364a}.project-phase-editor form [role=status]{color:#334d67}
.project-invoice-modal{width:min(1180px,96vw);max-width:96vw;max-height:92vh;padding:0;border:1px solid #d6e0e9;border-radius:12px;background:#f4f7fa;color:#183047;overflow:auto}.project-invoice-modal::backdrop{background:rgba(10,25,42,.58)}.project-invoice-modal>header{display:flex;justify-content:space-between;align-items:center;padding:12px 20px;background:#fff;border-bottom:1px solid #d6e0e9;position:sticky;top:0;z-index:2}.project-invoice-modal .invoice-workspace{padding:20px}.project-invoice-modal .invoice-back,.project-invoice-modal [data-i-action="project"]{display:none}.draw-pdf[data-open-invoice]{border:0;background:transparent;cursor:pointer;text-align:left;font:inherit;color:#1677c8;padding:5px 0}
@media(max-width:600px){.portal-admin .portal-chat{padding:14px}.portal-admin .portal-chat-thread{padding:16px}.portal-chat-compose>div{align-items:flex-start}.portal-chat-compose small{max-width:55%}.project-invoice-modal .invoice-workspace{padding:12px}.project-invoice-modal{width:96vw}}

.project-phase-editor input{width:100%;min-height:44px;padding:10px;color:#24364a;background:#fff;border:1px solid #cbd2db;border-radius:8px}

.invoice-send{padding:18px;background:white;border:1px solid #dce4eb;border-radius:10px;display:grid;gap:12px}.invoice-send label{display:grid;gap:6px;font-size:13px}.invoice-send input,.invoice-send textarea{width:100%;padding:10px;border:1px solid #cbd5e1;border-radius:6px;font:inherit}.invoice-send p{font-size:12px;line-height:1.5}

.directory-panel{padding:20px}.directory-controls{display:flex;gap:14px;flex-wrap:wrap}.directory-controls label{display:grid;gap:5px;font-size:12px}.directory-controls label:first-child{flex:1}.directory-controls input,.directory-controls select{min-height:42px;padding:9px 12px;border:1px solid #ccd6df;border-radius:7px;width:100%;font:inherit}.directory-record{width:100%;display:grid;grid-template-columns:2fr 1fr 2fr 1fr 20px;text-align:left;gap:14px;align-items:center;padding:16px 10px;background:transparent;border:0;border-bottom:1px solid #e1e7ed;color:inherit;cursor:pointer;font:inherit}.directory-record>span{min-width:0;overflow-wrap:anywhere}.directory-record strong,.directory-record small{display:block}.directory-record small,.directory-status{font-size:11px;color:#687b8c}.directory-record:hover{background:#f1f6fa}.directory-drawer{position:fixed;inset:0 0 0 auto;margin:0;width:min(520px,100vw);max-width:100vw;height:100dvh;max-height:100dvh;padding:0;border:0;background:#fff;color:#21384c;animation:directory-slide .25s ease-out}.directory-drawer::backdrop{background:rgba(10,25,42,.5);animation:directory-fade .25s}.directory-drawer form{height:100%;display:flex;flex-direction:column}.directory-drawer header,.directory-drawer footer{padding:20px;display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid #e2e7ec}.directory-drawer header h2{font-size:21px;margin:5px 0}.directory-drawer header small{font-size:11px;color:#697e91}.directory-drawer header button{border:0;background:transparent;font-size:28px;color:inherit;cursor:pointer}.directory-fields{overflow:auto;flex:1;padding:20px}.directory-fields fieldset{border:0;padding:0;display:grid;gap:14px}.directory-fields label{display:grid;gap:6px;font-size:12px}.directory-fields input,.directory-fields select,.directory-fields textarea{font:inherit;min-height:42px;width:100%;padding:10px;border:1px solid #ccd6df;border-radius:7px;background:white;color:#21384c}.directory-help{font-size:11px;color:#697e91}.directory-drawer footer{border-top:1px solid #e2e7ec;border-bottom:0;justify-content:flex-end}.directory-drawer.closing{animation:directory-out .22s ease-in forwards}.directory-drawer.closing::backdrop{animation:directory-fade .22s reverse forwards}@keyframes directory-slide{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes directory-out{to{transform:translateX(100%)}}@keyframes directory-fade{from{opacity:0}to{opacity:1}}@media(max-width:700px){.directory-record{grid-template-columns:1fr 20px;gap:6px}.directory-record>span:not(:last-child){grid-column:1}.directory-record>span:last-child{grid-column:2;grid-row:1/5}.directory-panel{padding:14px}}@media(prefers-reduced-motion:reduce){.directory-drawer,.directory-drawer::backdrop{animation-duration:1ms!important}}

/* v7.44 company reports */
.business-report-screen{min-width:0}.br-actions,.br-filters,.br-pagination{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.br-filters,.br-card,.invoice-email-status{background:var(--surface,#fff);border:1px solid var(--border,#dfe5ed);border-radius:14px;padding:20px;margin-bottom:18px}.br-filters label{display:grid;gap:6px;font-size:12px;font-weight:600;flex:1;min-width:140px}.br-filters input,.br-filters select,.br-table-head input{width:100%;min-height:40px;border:1px solid #ccd6e0;border-radius:8px;background:transparent;color:inherit;padding:8px;font:inherit;box-sizing:border-box}.br-period{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:15px 0;font-size:14px;font-weight:600}.br-period small,.br-card p,.br-footnote,.br-metrics small,.invoice-email-status small{color:#64748b;font-size:12px;line-height:1.6}.br-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:18px 0}.br-metrics article{padding:20px;background:var(--surface,#fff);border:1px solid var(--border,#dfe5ed);border-radius:14px;display:grid;gap:8px;min-width:0}.br-metrics article>span{font-size:12px;color:#64748b}.br-metrics strong{font-size:clamp(20px,2vw,30px);letter-spacing:-.5px;overflow-wrap:anywhere}.br-charts{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);gap:18px}.br-card h2,.invoice-email-status h2{font-size:15px;margin:0 0 14px}.br-chart{width:100%;height:auto;display:block}.br-chart text{font-size:11px;fill:#64748b}.br-legend{display:flex;gap:18px;flex-wrap:wrap;font-size:12px}.br-legend span{display:flex;align-items:center;gap:6px}.br-legend i{width:10px;height:10px;border-radius:50%}.br-bar{margin:24px 0}.br-bar>div:first-child,.br-cost-total{display:flex;justify-content:space-between;gap:10px;font-size:12px}.br-track{height:9px;background:#e8edf3;border-radius:20px;margin-top:10px;overflow:hidden}.br-track i{display:block;height:100%;border-radius:20px}.br-cost-total{border-top:1px solid #e2e8f0;padding-top:15px}.br-card summary{cursor:pointer;font-weight:600;font-size:13px}.br-scroll{overflow-x:auto;max-width:100%}.br-scroll table{width:100%;border-collapse:collapse;font-size:12px;white-space:nowrap}.br-scroll th{text-align:left;background:#f4f7fa;color:#475569}.br-scroll td,.br-scroll th{padding:13px 10px;border-bottom:1px solid #e2e8f0}.br-scroll th button{background:none;border:0;font:inherit;color:inherit;padding:0;cursor:pointer}.br-scroll td small{display:block;color:#64748b;white-space:normal;max-width:240px}.br-table-head{display:flex;justify-content:space-between;align-items:start;gap:20px;margin-bottom:16px}.br-table-head label{font-size:12px;display:grid;gap:6px;min-width:220px}.br-table-head p{margin:0}.br-pagination{align-items:center;justify-content:flex-end;margin-top:15px;font-size:12px}.br-pagination span{margin-right:auto}.br-warning{background:#fff4dc;color:#795400;border:1px solid #efd297;border-radius:9px;padding:12px;font-size:12px;line-height:1.5}.br-status{overflow-wrap:anywhere}.invoice-email-status strong,.invoice-email-status p{font-size:13px;overflow-wrap:anywhere}.invoice-email-status h2{margin-bottom:10px}.invoice-email-status small{display:block}.invoice-email-status{margin-bottom:14px}.br-footnote{margin-bottom:24px}
@media(max-width:1000px){.br-charts{grid-template-columns:minmax(0,1fr)}.br-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.business-report-screen .page-head{display:block}.br-actions{margin-top:16px}.br-actions .button{flex:1;font-size:12px;min-width:120px}.br-filters{padding:14px;gap:12px}.br-filters label:first-child{flex-basis:100%}.br-filters label{min-width:100px}.br-filters .button{width:100%}.br-metrics{gap:9px}.br-metrics article{padding:14px}.br-metrics strong{font-size:21px}.br-card{padding:14px}.br-table-head{display:block}.br-table-head label{margin-top:14px;min-width:0}.br-scroll td,.br-scroll th{padding:11px 8px}.br-pagination{gap:8px}.br-pagination span{width:100%}.br-period small{font-weight:400}.invoice-email-status{padding:16px}}

.br-chart-scroll{overflow-x:auto;max-width:100%}.br-chart-scroll .br-chart{min-width:600px}.br-chart-scroll:focus{outline:2px solid #2563eb}

.br-project-link{border:0;background:none;padding:0;color:#2563eb;font:inherit;text-align:left;cursor:pointer}.br-project-link:hover{text-decoration:underline}

/* Ledger totals: full-width phone cards keep complete currency amounts readable. */
@media(max-width:700px){
  .invoice-workspace .invoice-metrics{grid-template-columns:minmax(0,1fr);gap:12px}
  .invoice-workspace .invoice-metrics article{padding:18px 20px}
  .invoice-workspace .invoice-metrics article>strong{white-space:nowrap;overflow-wrap:normal;word-break:normal;font-size:clamp(24px,6.5vw,30px);letter-spacing:-.6px}
}
