/* Approved BizTwig interface palette. Original artwork stays unchanged. */
:root{--brand-forest:#09372d;--brand-leaf:#368d35;--brand-gold:#f4c700;--brand-canvas:#f5f8f4;--brand-ink:#203c35;--brand-muted:#5b6c64;--brand-border:#dbe5dc;--brand-soft:#eaf0e9;--brand-input-warm:#f8faf5;--brand-input-warm-border:#dbe5dc}
:root{font-family:Inter,ui-sans-serif,system-ui,sans-serif;color:var(--brand-ink);background:var(--brand-canvas);font-size:16px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a{touch-action:manipulation}button{background:var(--brand-forest);color:#fff;border:0;border-radius:7px;padding:.65rem 1rem;cursor:pointer}button:hover{background:#22594a}button.secondary{background:var(--brand-soft);color:var(--brand-ink)}button.danger{background:#a23333}button:disabled{opacity:.5;cursor:default}input,select,textarea{display:block;width:100%;padding:.65rem;border:1px solid #b6c8bc;border-radius:6px;background:#fff;color:var(--brand-ink)}textarea{min-height:90px}label{display:grid;gap:.35rem;font-size:.875rem;font-weight:600}form{display:grid;gap:1rem}h1{font-size:var(--text-page,1.5rem);letter-spacing:-.04em;margin:0 0 1rem}h2{font-size:var(--text-section,1.125rem);margin:0 0 1rem}p{line-height:1.5}.muted{color:var(--brand-muted)}.shell{display:grid;grid-template-columns:230px 1fr;min-height:100vh}aside{background:var(--brand-forest);color:#f5f8f4;padding:1.5rem 1rem}aside h2{font-size:1.5rem;color:var(--brand-gold)}aside button{width:100%;text-align:left;background:transparent;margin:.15rem 0;color:#f5f8f4}aside button.selected{background:#22594a;color:white}aside select{margin:1rem 0;background:#22594a;color:white;border-color:#72958a;font-size:.875rem}main{min-width:0;padding:2rem;max-width:1500px;width:100%;margin:0 auto}header{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1.5rem}.badge{font-size:.875rem;background:#daf1e9;padding:.3rem .7rem;border-radius:20px;color:#16624c}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1.1rem}.card{background:#fff;padding:1.4rem;border:1px solid var(--brand-border);border-radius:10px;margin-bottom:1.1rem;box-shadow:0 2px 5px #09372d04}.stat{font-size:2rem;font-weight:650;letter-spacing:-.04em}.split{display:grid;grid-template-columns:minmax(270px,1fr) minmax(350px,2fr);gap:1.2rem;align-items:start}.tablewrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:.875rem}th,td{text-align:left;padding:.8rem .5rem;border-bottom:1px solid var(--brand-border);vertical-align:top}th{color:var(--brand-muted);font-weight:600}td button{padding:.4rem .6rem;font-size:.875rem;margin:.2rem}.empty{padding:1rem 0;color:var(--brand-muted)}.auth{max-width:460px;padding:1rem;margin:6vh auto}.auth .brand{font-size:2rem;font-weight:700;color:var(--brand-forest)}.auth .brand span{color:#008f71}.actions{display:flex;gap:.5rem;flex-wrap:wrap;margin:1rem 0}.auth nav{display:flex;gap:.5rem;margin:1.3rem 0}.checklist{list-style:none;padding:0}.checklist li{display:flex;justify-content:space-between;padding:.7rem 0;border-bottom:1px solid var(--brand-border)}.checklist .done{color:#087f61}#notice{position:fixed;bottom:1rem;left:50%;transform:translateX(-50%);max-width:90vw;background:var(--brand-forest);color:white;padding:1rem;border-radius:8px;display:none;z-index:5}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit;line-height:1.5;font-size:var(--text-body,1rem)}.small{font-size:var(--text-note,.875rem)}a{color:var(--brand-forest)}@media(max-width:800px){.shell{grid-template-columns:1fr}aside{padding:1rem}aside nav{display:flex;overflow-x:auto}aside button{width:auto;white-space:nowrap}aside select{max-width:100%}main{padding:1rem}.split{grid-template-columns:1fr}header{flex-wrap:wrap}}:focus-visible{outline:3px solid #0b9978;outline-offset:3px}

input[type="date"]{min-width:0;min-height:2.75rem;-webkit-appearance:none;appearance:none}input[type="date"]::-webkit-date-and-time-value{text-align:left;min-height:1.2em}

.dashboard-intro{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1.1rem}.dashboard-intro h2{font-size:1.4rem;margin-bottom:.35rem}.dashboard-intro p{margin:0}.dashboard-setup{padding:0;overflow:hidden}.dashboard-setup summary{cursor:pointer;padding:1.1rem 1.4rem;display:flex;align-items:center;justify-content:space-between;gap:1rem;list-style:none}.dashboard-setup summary::-webkit-details-marker{display:none}.dashboard-setup summary>span:first-child{display:grid;gap:.35rem}.setup-hint{font-size:.8rem;color:var(--brand-muted)}.setup-hint::before{content:'+';font-size:var(--text-section);margin-right:0}.dashboard-setup[open] .setup-hint::before{content:'−'}.setup-body{padding:0 1.4rem 1.4rem;border-top:1px solid var(--brand-border)}.dashboard-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:1rem}.dashboard-metric{display:grid;align-content:start;gap:.45rem;padding:.85rem;background:var(--brand-canvas);border-radius:8px;min-width:0}.dashboard-metric strong{font-size:1.8rem;letter-spacing:-.035em;overflow-wrap:anywhere}.dashboard-metric.positive strong{color:#087f61}.dashboard-metric.negative strong{color:#a23333}.dashboard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.1rem;align-items:start}.dashboard-grid>.card{margin-bottom:0}.dashboard-progress{width:100%;height:.65rem;border:0;border-radius:1rem;overflow:hidden;margin-top:1.25rem;accent-color:#078568}.dashboard-progress::-webkit-progress-bar{background:var(--brand-soft)}.dashboard-progress::-webkit-progress-value{background:#078568}.dashboard-progress::-moz-progress-bar{background:#078568}.chart-key{display:flex;gap:1.1rem;font-size:.85rem;margin-bottom:1rem}.chart-key span{display:flex;align-items:center;gap:.45rem}.chart-key i{width:.65rem;height:.65rem;border-radius:2px}.income-swatch,.income-bar{background:#078568}.expense-swatch,.expense-bar{background:#6675c1}.financial-chart{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem 1.5rem}.chart-month{min-width:0;border-left:1px solid var(--brand-border);padding-left:.8rem}.chart-bars{display:grid;gap:.35rem;margin:.65rem 0;background:var(--brand-canvas)}.chart-bar{height:.55rem;border-radius:2px}.chart-values{display:grid;gap:.25rem;font-size:.75rem;color:var(--brand-muted);overflow-wrap:anywhere}.growth-comparison{display:grid;gap:.4rem;margin-top:1rem;padding:1rem;border:1px solid var(--brand-border);border-radius:8px}.growth-comparison strong{font-size:1.25rem}.dashboard-todos,.stock-alerts{list-style:none;padding:0;margin:0 0 1rem}.dashboard-todos li{display:flex;align-items:center;justify-content:space-between;gap:.8rem;padding:.9rem 0;border-bottom:1px solid var(--brand-border)}.dashboard-todos li>div{display:grid;gap:.35rem;overflow-wrap:anywhere;min-width:0}.dashboard-todos strong,.stock-alerts strong{font-size:.9rem}.dashboard-todos button{flex-shrink:0;font-size:.8rem}.stock-alerts li{display:grid;grid-template-columns:1fr auto;gap:.4rem;padding:.9rem 0;border-bottom:1px solid var(--brand-border)}.stock-alerts li>.muted{grid-column:1/-1}.stock-badge{background:#fff0d6;color:#835600;font-size:.8rem;padding:.2rem .5rem;border-radius:1rem}@media(max-width:1000px){.dashboard-grid{grid-template-columns:1fr}}@media(max-width:600px){.dashboard-intro{align-items:start;flex-direction:column}.dashboard-setup summary{padding:1rem}.setup-body{padding:0 1rem 1rem}.setup-hint{font-size:0}.setup-hint::before{font-size:var(--text-section)}.financial-chart{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-metric strong{font-size:1.55rem}}

.order-workspace{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.2rem;align-items:start}.order-workspace>.card{min-width:0}.order-draft-table{margin-top:1rem}.order-draft-table caption{text-align:left;padding:.5rem 0}.order-draft-table th,.order-draft-table td{padding:.65rem .35rem}.order-draft-table td:first-child{overflow-wrap:anywhere;max-width:180px}.order-draft-table tfoot th,.order-draft-table tfoot td{padding-top:1rem;border-top:2px solid #b6c8bc;border-bottom:0}.order-draft-table tfoot strong{white-space:nowrap}.order-row-actions{display:grid;grid-template-columns:repeat(3,44px);gap:.3rem}.order-row-actions button{margin:0;min-height:36px;padding:.25rem;display:flex;align-items:center;justify-content:center;font-size:1.1rem}.order-row-actions .order-trash{grid-column:auto;color:#a23333}.order-item-entry{margin:1rem 0 1.25rem;padding:1rem;border:1px solid var(--brand-border);border-radius:8px;background:var(--brand-canvas)}.order-item-entry h3{font-size:1rem;margin:0 0 1rem}.order-item-entry form{grid-template-columns:minmax(0,2fr) minmax(85px,1fr);gap:.8rem}.order-item-entry form>p,.order-item-entry form>button{grid-column:1/-1}.order-item-entry p{margin:0}@media(max-width:1100px){.order-workspace{grid-template-columns:1fr}}@media(max-width:400px){.order-workspace>.card{padding:1rem}.order-draft-table{font-size:.8rem}.order-draft-table td:first-child{max-width:85px}.order-action-heading{font-size:.75rem}.order-item-entry form{grid-template-columns:1fr}.order-row-actions{grid-template-columns:repeat(3,44px)}}

.receipt-dialog{width:min(720px,calc(100% - 2rem));max-height:90vh;overflow:auto;border:1px solid var(--brand-border);border-radius:12px;padding:1.5rem;color:var(--brand-ink);background:white}.receipt-dialog::backdrop{background:#09372d80}.receipt-heading{display:flex;justify-content:space-between;align-items:start;gap:1rem}.receipt-heading h3{font-size:1.05rem;margin:0 0 1rem}.receipt-controls{display:flex;gap:.5rem;flex-wrap:wrap}.receipt-meta{font-size:.875rem}.receipt-meta>div{display:grid;grid-template-columns:90px minmax(0,1fr);gap:.5rem;margin:.6rem 0}.receipt-meta dt{color:var(--brand-muted)}.receipt-meta dd{margin:0;overflow-wrap:anywhere}.receipt-table tfoot th,.receipt-table tfoot td{border-top:2px solid #b6c8bc;border-bottom:0}.receipt-table td:first-child{overflow-wrap:anywhere}@media(max-width:600px){.receipt-heading{flex-direction:column}.receipt-dialog{padding:1rem}.receipt-table{font-size:.8rem}.receipt-table th,.receipt-table td{padding:.6rem .25rem}}@media print{body:has(.receipt-dialog[open]){background:white;color:black}body:has(.receipt-dialog[open]) .shell{display:block;min-height:0}body:has(.receipt-dialog[open]) aside,body:has(.receipt-dialog[open]) main>header,body:has(.receipt-dialog[open]) #content>*:not(.receipt-dialog),body:has(.receipt-dialog[open]) #notice{display:none!important}body:has(.receipt-dialog[open]) main{padding:0;max-width:none;margin:0}dialog.receipt-dialog[open]{display:block;position:static;width:100%;max-width:none;max-height:none;overflow:visible;border:0;border-radius:0;margin:0;padding:0}dialog.receipt-dialog[open]::backdrop{display:none}.receipt-controls{display:none!important}.receipt-dialog .tablewrap{overflow:visible}.receipt-table tr{break-inside:avoid}}

.business-brand{display:flex;align-items:center;gap:1rem;min-width:0}.business-brand h3{font-size:1.5rem;margin:0 0 .4rem;overflow-wrap:anywhere}.business-logo{display:block;max-width:110px;max-height:75px;object-fit:contain;flex-shrink:0}.business-contact{font-size:.875rem;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.profile-logo-section{padding:1rem;border:1px solid var(--brand-border);border-radius:8px}.profile-logo-section h3{margin-top:0}.profile-logo-preview{max-width:180px;max-height:110px;margin-bottom:1rem}.receipt-dialog .business-brand{align-items:flex-start;margin-bottom:1rem}.receipt-dialog .business-brand h3{font-size:1.2rem}.receipt-dialog .business-logo{max-width:120px;max-height:90px}@media(max-width:450px){.business-logo{max-width:75px;max-height:60px}.business-brand{gap:.6rem}.business-brand h3{font-size:1.25rem}}@media print{.business-logo{max-width:120px;max-height:80px}.business-brand{break-inside:avoid}}

.help-trigger{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:0;margin-left:.35rem;border-radius:50%;background:radial-gradient(circle,var(--brand-soft) 11px,transparent 12px);color:var(--brand-ink);font-size:1rem;font-weight:700;vertical-align:middle;flex-shrink:0}.help-trigger:hover{background:radial-gradient(circle,#dbe5dc 11px,transparent 12px)}.help-label-title{display:flex;align-items:center;gap:.25rem}.field-help-dialog{width:min(520px,calc(100% - 2rem));max-height:85dvh;overflow:auto;border:1px solid var(--brand-border);border-radius:12px;padding:1.4rem;color:var(--brand-ink);background:#fff}.field-help-dialog::backdrop{background:#09372d80}.field-help-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem}.field-help-heading h2{margin:0}.field-help-dialog button{min-height:44px}.help-article{padding:1rem 0;border-bottom:1px solid var(--brand-border)}.help-article[hidden]{display:none}.help-article summary{cursor:pointer;font-weight:600;min-height:44px;align-content:center}.help-article li,.help-job-steps li{line-height:1.6;margin:.65rem 0}.help-article ol,.help-job-steps{padding-left:1.5rem}.help-article button{min-height:44px}.help-guides h3{margin-top:1.5rem}@media(max-width:600px){.field-help-dialog{position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:none;max-height:80dvh;border-radius:14px 14px 0 0;padding:1.25rem}.field-help-heading{align-items:flex-start}.field-help-heading h2{font-size:1.1rem}}@media print{.help-trigger,.field-help-dialog{display:none!important}}

[hidden]{display:none!important}.financial-line-chart{display:block;width:100%;min-width:680px}.reporting-period-field{max-width:260px;margin-bottom:1rem}.preparation-field{display:flex;align-items:center;gap:.5rem}.preparation-field input{width:auto}

#notice.is-visible{display:flex;align-items:center;gap:1rem}#notice.notice-error{background:#9b2929}#notice .notice-close{background:transparent;color:white;border:0;margin:0;padding:.25rem .5rem;min-width:36px;min-height:36px;font-size:1.25rem;flex-shrink:0}

.dashboard-metric>.muted:first-child{position:relative;line-height:1.25rem;min-height:1.25rem}.dashboard-metric>.muted:first-child:has(.help-trigger){padding-right:1.75rem}.dashboard-metric>.muted:first-child>.help-trigger{position:absolute;right:-.65rem;top:50%;transform:translateY(-50%);margin:0}

.irs-change{white-space:pre-wrap;overflow-wrap:anywhere;max-height:24rem;overflow:auto;font-size:.8rem;padding:1rem;background:var(--brand-canvas)}.irs-review-item{border-bottom:1px solid var(--brand-border);padding-bottom:1rem;margin-bottom:1rem}

.approval-history table{min-width:760px}
.approval-history td{vertical-align:top}
.approval-history .actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.approval-history .actions button{min-height:44px}
.earlier-approvals{margin-top:16px}
.earlier-approvals summary{cursor:pointer;min-height:44px;align-content:center;font-weight:600}

/* Keep each task and its controls aligned on the same row. */
.task-list th,.task-list td{vertical-align:middle}
.task-list td:first-child{min-width:180px;max-width:420px;overflow-wrap:anywhere}
.task-row-actions{display:flex;align-items:center;gap:.5rem;flex-wrap:nowrap;margin:0}
.task-row-actions button{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;min-height:44px;margin:0;white-space:nowrap;flex-shrink:0}
.task-row-actions svg{display:block;flex-shrink:0}
.task-row-actions .task-icon{width:44px;height:44px;padding:0;flex:0 0 44px}

.financial-settings-fields{display:grid;gap:1rem}
.financial-settings-fields h3,.financial-settings-fields p{margin:0}
#expenseEditor details summary{cursor:pointer;min-height:44px;align-content:center}

.card:has(> #businessProfileForm)>h2,.profile-retention>h3{font-size:1.17rem}

.preparation-settings{display:grid;gap:1rem}.preparation-settings h3,.preparation-settings p{margin:0}

#businessProfileForm label:has(> select[name="reporting_year_type"]){font-size:1.17rem;font-weight:700}#businessProfileForm select[name="reporting_year_type"]{font-size:.875rem;font-weight:400}


/* Shared reading scale for every workspace, form, help panel, and report. */
:root{
 --text-body:1rem;
 --text-label:.9375rem;
 --text-note:.875rem;
 --text-section:1.125rem;
 --text-page:1.5rem;
 --text-metric:1.75rem;
 line-height:1.55;
}
body{font-size:var(--text-body)}
h1{font-size:var(--text-page);line-height:1.3;letter-spacing:-.025em}
h2,h3,.dashboard-intro h2,.order-item-entry h3,.receipt-heading h3,.field-help-heading h2,
.card:has(> #businessProfileForm)>h2,.profile-retention>h3{font-size:var(--text-section);line-height:1.4;letter-spacing:normal}
h3{margin:0 0 1rem}
label,#businessProfileForm label:has(> select[name="reporting_year_type"]){font-size:var(--text-label);font-weight:600;line-height:1.45}
input,select,textarea,#businessProfileForm select[name="reporting_year_type"],aside select{font-size:var(--text-body);font-weight:400;line-height:1.5;min-height:44px}
input[type="checkbox"]{min-height:auto}
p,li{line-height:1.6}
.muted,.empty,.small,.setup-hint,.chart-key,.chart-values,.stock-badge,.badge,.business-contact,.receipt-meta,.irs-change{font-size:var(--text-note);line-height:1.55}
table,.order-draft-table,.receipt-table,.order-action-heading{font-size:var(--text-label);line-height:1.5}
button,td button,.dashboard-todos button{font-size:var(--text-label);font-weight:600;min-height:44px;line-height:1.4}
.help-trigger{font-size:var(--text-body)}
.dashboard-todos strong,.stock-alerts strong{font-size:var(--text-body)}
.stat,.dashboard-metric strong{font-size:var(--text-metric);line-height:1.25}
.growth-comparison strong{font-size:var(--text-section)}
.business-brand h3,.receipt-dialog .business-brand h3{font-size:var(--text-page);line-height:1.3}
aside .app-brand{font-size:var(--text-page);margin-bottom:0}
.dashboard-setup summary>span>strong,#financeRetention summary,.workspace-details>summary{font-size:var(--text-section);font-weight:650}
.primary-nav button{display:flex;align-items:center;gap:.65rem;min-height:48px}
.primary-nav svg{flex-shrink:0}
.settings-menu{border-top:1px solid #72958a;margin-top:1.2rem;padding-top:.65rem}
.settings-menu summary{cursor:pointer;padding:.7rem .5rem;min-height:44px;font-size:var(--text-label);font-weight:600}
.settings-menu nav{display:grid;gap:.15rem;padding-top:.3rem}
.settings-menu button{margin:0;min-height:44px}
.workspace-heading{margin-bottom:1.25rem}
.workspace-heading h1{margin-bottom:.75rem}
.section-nav{display:flex;gap:.5rem;flex-wrap:wrap}
.section-nav button{background:var(--brand-soft);color:var(--brand-ink)}
.section-nav button.selected{background:var(--brand-forest);color:white}
.workspace-details{background:white;border:1px solid var(--brand-border);border-radius:10px;padding:0 1.4rem;margin-bottom:1.1rem}
.workspace-details>summary{padding:1rem 0;cursor:pointer;min-height:48px}
.workspace-details>.split{padding-top:.25rem}
.workspace-details .card{box-shadow:none}
@media(max-width:800px){
 aside .primary-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.25rem;overflow:visible;margin-top:.5rem}
 aside .primary-nav button{display:flex;flex-direction:column;justify-content:center;gap:.25rem;padding:.6rem .15rem;white-space:normal;text-align:center;width:100%;font-size:var(--text-note);min-width:0}
 aside .settings-menu nav{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));overflow:visible;gap:.25rem}
 aside .settings-menu button{width:100%;white-space:normal}
 .settings-menu{margin-top:.65rem}
 .workspace-details{padding:0 1rem}
 header{align-items:start}
 #askBizTwig{flex-shrink:0}
}
@media print{.workspace-heading,#askBizTwig{display:none!important}}

header>div{min-width:0}
.primary-nav button span{overflow-wrap:anywhere}
.reports-workspace{display:grid;gap:var(--space-lg)}

/* Keep the Home overview aligned and compact on wide screens. */
.home-overview{display:grid;gap:1rem}
.home-overview .dashboard-intro,.home-overview .card{margin-bottom:0}
.dashboard-financial-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem;align-items:stretch}
.dashboard-financial-grid>.card{min-width:0}
.home-overview .dashboard-grid{gap:1rem;align-items:stretch}
.home-overview .dashboard-grid>.card{min-width:0;display:flex;flex-direction:column}
.home-overview .dashboard-grid>.card>button{align-self:flex-start;margin-top:auto}
.dashboard-ai>.card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.3rem 1rem;align-items:center}
.dashboard-ai h2,.dashboard-ai p{margin:0}
.dashboard-ai button{grid-column:2;grid-row:1 / span 2}
@media(min-width:1200px){
 .dashboard-financial-grid{grid-template-columns:minmax(330px,.9fr) minmax(0,1.4fr)}
 .dashboard-financial-grid.single-panel{grid-template-columns:1fr}
 .home-overview .card:not(.dashboard-setup){padding:1.1rem}
 .dashboard-financial-grid .dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 .dashboard-financial-grid .financial-line-chart{min-width:680px}
 .home-overview .dashboard-metric{padding:.75rem;gap:.35rem}
}
@media(max-width:600px){
 .dashboard-ai>.card{display:flex;flex-direction:column;align-items:flex-start;gap:.75rem}
}

.chart-key .income-swatch,.chart-key .expense-swatch{display:inline-block;width:1.75rem;height:0;border-radius:0;background:none;flex-shrink:0}
.chart-key .income-swatch{border-top:3px solid #078568}
.chart-key .expense-swatch{border-top:3px dashed #3b6fd1}

#orderQueue{scroll-margin-top:1rem}
#orderQueue:focus{outline:3px solid #0b9978;outline-offset:3px}

.catalog-filter-actions{align-items:center;justify-content:space-between;gap:.5rem 1rem}
.catalog-filter-actions #catalogFilterCount{margin:0}

.expense-year,.audit-year{margin-top:.75rem;border-top:1px solid var(--border,#dce5eb);padding-top:.5rem}
.expense-year summary,.audit-year summary{cursor:pointer;padding:.5rem 0;font-weight:600}

/* Shared spacing keeps every workspace compact and predictable. */
:root{--space-xs:.25rem;--space-sm:.5rem;--space-md:.75rem;--space-lg:1rem;--space-xl:1.5rem;--space-2xl:2rem}
@media screen{
 main{padding:var(--space-xl)}
 header{gap:var(--space-lg);margin-bottom:var(--space-xl)}
 .workspace-heading{margin-bottom:var(--space-lg)}
 .workspace-heading h1{margin-bottom:var(--space-md)}
 h1,h2,h3{margin-top:0;margin-bottom:var(--space-lg)}
 p{margin:0 0 var(--space-lg)}
 p:last-child{margin-bottom:0}
 form,.financial-settings-fields,.preparation-settings{gap:var(--space-lg)}
 form>p,form>.small,form>.muted{margin:0}
 label{gap:var(--space-sm)}
 .grid,.split,.order-workspace,.dashboard-grid,.home-overview,.dashboard-financial-grid{gap:var(--space-lg)}
 .card,.home-overview .card:not(.dashboard-setup){padding:var(--space-lg);margin-bottom:var(--space-lg)}
 .grid>.card,.split>.card,.order-workspace>.card,#expenseEditor>.card,.home-overview .card{margin-bottom:0}
 .actions,.auth nav{gap:var(--space-sm);margin:var(--space-lg) 0}
 .task-row-actions{margin:0;gap:var(--space-sm)}
 .section-nav,.receipt-controls,.preparation-field{gap:var(--space-sm)}
 .catalog-filter-actions{gap:var(--space-sm) var(--space-lg)}
 .catalog-filter-actions #catalogFilterCount{margin:0}
 .tablewrap+details,.tablewrap+p,.tablewrap+button{margin-top:var(--space-lg)}
 th,td,.order-draft-table th,.order-draft-table td{padding:var(--space-md) var(--space-sm)}
 td button{margin:var(--space-xs)}
 .task-row-actions button,.order-row-actions button{margin:0}
 .empty{padding:var(--space-lg) 0;margin:0}
 .dashboard-setup{padding:0}
 .dashboard-setup summary{padding:var(--space-lg);gap:var(--space-lg)}
 .setup-body{padding:var(--space-lg)}
 .dashboard-metric,.profile-logo-section,.order-item-entry,.growth-comparison{padding:var(--space-lg)}
 .dashboard-metric,.dashboard-todos li>div,.stock-alerts li,.chart-key span{gap:var(--space-sm)}
 .dashboard-todos li,.stock-alerts li,.checklist li{padding:var(--space-md) 0}
 .order-item-entry,.growth-comparison{margin-top:var(--space-lg);margin-bottom:var(--space-lg)}
 .order-item-entry form{gap:var(--space-lg)}
 .workspace-details{padding:0 var(--space-lg);margin-bottom:var(--space-lg)}
 .workspace-details>.split{padding-top:var(--space-lg);padding-bottom:var(--space-lg)}
 .expense-year,.audit-year,.earlier-approvals{margin-top:var(--space-lg);padding-top:var(--space-sm)}
 .expense-year summary,.audit-year summary{padding:var(--space-sm) 0;min-height:44px;align-content:center}
 .expense-year[open]>.tablewrap,.audit-year[open]>.tablewrap,.earlier-approvals[open]>.tablewrap{margin-top:var(--space-sm)}
 .receipt-dialog,.field-help-dialog{padding:var(--space-xl)}
 .receipt-heading,.field-help-heading,.business-brand{gap:var(--space-lg)}
 .field-help-heading{margin-bottom:var(--space-lg)}
 .business-brand h3{margin-bottom:var(--space-sm)}
 .help-article{padding:var(--space-lg) 0}
 .help-article li,.help-job-steps li{margin:var(--space-sm) 0}
 .help-guides h3{margin-top:var(--space-xl)}
 .approval-history .actions{gap:var(--space-sm);margin:var(--space-sm) 0}
 .dashboard-ai>.card{gap:var(--space-sm) var(--space-lg)}
 .dashboard-ai h2,.dashboard-ai p,.dashboard-intro p{margin:0}
}
@media screen and (max-width:800px){main,.receipt-dialog,.field-help-dialog{padding:var(--space-lg)}}

/* Compact phone layout with readable inputs and comfortable touch targets. */
@media screen and (max-width:600px){
 :root{--text-body:.9375rem;--text-label:.875rem;--text-note:.875rem;--text-section:1rem;--text-page:1.375rem;--text-metric:1.5rem;--space-lg:.75rem;--space-xl:1rem}
 body{line-height:1.45}
 aside{padding:.75rem}
 aside .app-brand{font-size:1.25rem}
 aside select{margin:.5rem 0}
 aside .primary-nav{margin-top:0}
 aside .primary-nav button{min-height:44px;padding:.35rem .15rem;gap:.125rem}
 .settings-menu{margin-top:.5rem;padding-top:.25rem}
 .settings-menu summary{padding:.35rem .5rem}
 main{margin:0;padding:.75rem}
 header{gap:.5rem;margin-bottom:.75rem}
 header>.business-brand,header>div{flex:1;min-width:0}
 .business-brand{gap:.5rem}
 .business-logo{max-width:60px;max-height:44px}
 .business-brand h3{font-size:var(--text-page);margin-bottom:.25rem}
 .business-meta{line-height:1.4}
 #askBizTwig{padding:.5rem .65rem}
 .workspace-heading h1{margin-bottom:.5rem}
 .dashboard-intro{gap:.5rem}
 .dashboard-intro h2{margin-bottom:.25rem}
 .dashboard-intro button{align-self:flex-start}
 .dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}
 .dashboard-metric{padding:.625rem;gap:.25rem}
 .dashboard-metric strong{font-size:var(--text-metric)}
 .dashboard-todos li,.stock-alerts li,.checklist li{padding:.5rem 0}
 .dashboard-todos li{gap:.5rem}
 .dashboard-progress{margin-top:.75rem}
 .chart-key{gap:.75rem;margin-bottom:.75rem}
 .dashboard-ai>.card{gap:.5rem}
 .grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,140px),1fr))}
 input,select,textarea,aside select,#businessProfileForm select[name="reporting_year_type"]{font-size:1rem;min-height:44px}
 input[type="checkbox"]{min-height:auto}
 button,td button,.dashboard-todos button{min-height:44px}
}

#business .business-actions{margin:0;gap:var(--space-sm);align-items:center}

/* Smaller phone typography; keep form entry at 16px and touch targets at 44px. */
@media screen and (max-width:600px){
 :root{--text-body:.875rem;--text-label:.8125rem;--text-note:.8125rem;--text-section:.9375rem;--text-page:1.125rem;--text-metric:1.375rem}
 aside .app-brand{font-size:1.125rem}
 header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.25rem .5rem}
 header>div{display:contents}
 header .business-brand{grid-column:1;grid-row:1;min-width:0}
 header .business-meta{grid-column:1/-1;grid-row:2;font-size:.75rem;line-height:1.4}
 header #askBizTwig{grid-column:2;grid-row:1;align-self:start}
 input,select,textarea,aside select,#businessProfileForm select[name="reporting_year_type"]{font-size:1rem}
}

/* Keep team member actions together, with full-size icon touch targets. */
.team-member-actions{display:inline-flex;flex-wrap:nowrap;align-items:center;gap:4px;margin:0}
.team-member-actions button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;margin:0;padding:0}
.team-member-actions [data-remove-member]{color:#a23333}
#teamMemberList table{table-layout:fixed}
#teamMemberList th:nth-child(2){width:5rem}
#teamMemberList th:last-child{width:108px}
#teamMemberList td:first-child{overflow-wrap:anywhere}

/* Losses retain their minus signs as well as a consistent red treatment. */
.negative-result,.dashboard-metric.negative strong{color:#a23333}
@media print{.negative-result,.dashboard-metric.negative strong{color:#a23333!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}}

/* Shared containment and spacing for compact screens and help dialogs. */
.card,.split>div,.grid>*,.receipt-heading>div,.field-help-heading h2{min-width:0}
.card h2,.card h3,.field-help-heading h2,.help-label-title{overflow-wrap:anywhere}
.tablewrap{max-width:100%;min-width:0;overscroll-behavior-x:contain}
form button:not(.help-trigger){max-width:100%}
.help-label-title{min-width:0;justify-content:space-between}
.help-label-title .help-trigger{margin-left:0}
.card h2:has(>.help-trigger),.card h3:has(>.help-trigger),.dashboard-intro h2:has(>.help-trigger){display:flex;align-items:center;justify-content:space-between;gap:.5rem}
.card h2>.help-trigger,.card h3>.help-trigger,.dashboard-intro h2>.help-trigger{margin-left:0}
.dashboard-metric>.muted:first-child:has(.help-trigger){min-height:44px;padding-right:44px;display:flex;align-items:center}
.dashboard-metric>.muted:first-child>.help-trigger{right:0;top:0;transform:none}
.category-help{display:inline-flex;flex-shrink:0}
.single-list>#customerEditor:empty{display:none}
.financial-line-chart.compact-trend{min-width:0;width:100%;max-width:520px;margin:0 auto}
.trend-dialog{width:min(1100px,calc(100% - 1.5rem))}
.trend-dialog .receipt-heading{margin-bottom:var(--space-lg)}
.queue-order-status{display:none}
.order-queue-actions{display:flex;flex-wrap:nowrap;gap:4px;align-items:center}
.order-queue-actions button[data-order]{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;padding:0;margin:0;flex:0 0 44px}
.order-queue-actions .order-cancel{color:#a23333}
.order-queue-actions button[data-receipt]{margin:0;white-space:nowrap}
.receipt-number-controls{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:0;margin-left:.5rem;vertical-align:middle}
#receiptNumberEditor{margin-bottom:var(--space-lg);padding:var(--space-lg);border:1px solid var(--brand-border);border-radius:8px}
@media print{.receipt-number-controls,#receiptNumberEditor{display:none!important}}
.automation-controls{padding-bottom:var(--space-lg)}
.recipeRow{display:grid;gap:var(--space-lg);padding:var(--space-lg);margin-bottom:var(--space-lg);border:1px solid var(--brand-border);border-radius:8px}
.recipeRow>button{justify-self:start}
#teamMemberEditor p{overflow-wrap:anywhere}
#notice{overflow-wrap:anywhere;bottom:max(1rem,env(safe-area-inset-bottom))}
#notice>span{min-width:0}
@media(max-width:600px){
  #notice{width:calc(100vw - 2rem);max-width:36rem;align-items:flex-start}
  #notice .notice-close{min-width:44px;min-height:44px}
  #savedSaleReview table,#savedSaleReview tbody{display:block;width:100%;min-width:0}
  #savedSaleReview thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  #savedSaleReview tbody tr{display:block;padding:.5rem 0;border-bottom:1px solid var(--brand-border)}
  #savedSaleReview td{display:grid;grid-template-columns:5.5rem minmax(0,1fr);gap:.5rem;padding:.4rem 0;border:0;overflow-wrap:anywhere}
  #savedSaleReview td::before{font-weight:600;color:var(--brand-muted)}
  #savedSaleReview td:nth-child(1)::before{content:'Product'}
  #savedSaleReview td:nth-child(2)::before{content:'Quantity'}
  #savedSaleReview td:nth-child(3)::before{content:'Unit Price'}
  #savedSaleReview td:nth-child(4)::before{content:'Amount'}
}
@media screen and (max-width:600px){
 .order-queue-table,.order-queue-table tbody{display:block;width:100%;min-width:0}
 .order-queue-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .order-queue-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:.5rem;padding:.75rem 0;border-bottom:1px solid var(--brand-border)}
 .order-queue-table td{border:0;padding:0;min-width:0;overflow-wrap:anywhere}
 .order-queue-table td:nth-child(2){white-space:nowrap}
 .order-queue-table td:nth-child(3){display:none}
 .queue-order-id,.queue-order-status{display:block}
 .queue-order-status{font-size:var(--text-note);color:var(--brand-muted)}
 .task-row-actions{flex-wrap:wrap;gap:.5rem}
 .task-row-actions button{white-space:normal;max-width:100%}
 .task-mobile-table,.approval-history table.task-mobile-table{display:block;width:100%;min-width:0;table-layout:fixed}
 .task-mobile-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .task-mobile-table tbody{display:grid;gap:.75rem}
 .task-mobile-table tr{display:grid;grid-template-columns:minmax(0,1fr);gap:.5rem;padding:.75rem;border:1px solid var(--brand-border);border-radius:8px}
 .task-mobile-table td,.task-list .task-mobile-table td:first-child{display:block;min-width:0;max-width:none;padding:0;border:0;overflow-wrap:anywhere}
 .task-mobile-table td::before{content:attr(data-label);display:block;color:var(--brand-muted);font-size:var(--text-note);font-weight:600;margin-bottom:.125rem}
 .task-mobile-table td[data-label="Task"],.task-mobile-table td[data-label="Template"]{font-weight:600}
 .task-mobile-table td[data-label="Task"]::before,.task-mobile-table td[data-label="Template"]::before,.task-mobile-table td[data-label="Actions"]::before,.task-mobile-table td[data-label="Action"]:last-child::before{display:none}
 .task-mobile-table .actions{margin:.5rem 0 0;flex-wrap:wrap}
 .order-row-actions{grid-template-columns:repeat(3,44px)}
 .order-row-actions button{width:44px;min-width:44px;min-height:44px}
 .order-row-actions .order-trash{width:44px}
 .order-draft-table{display:block;table-layout:fixed}
 .order-draft-table caption{display:block}
 .order-draft-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .order-draft-table tbody{display:block}
 .order-draft-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;padding:.75rem 0;border-bottom:1px solid var(--brand-border)}
 .order-draft-table tbody td{display:block;padding:0;border:0;min-width:0;max-width:none}
 .order-draft-table tbody td:first-child,.order-draft-table tbody td:last-child{grid-column:1/-1}
 .order-draft-table tbody td:first-child{font-weight:600}
 .order-draft-table tbody td.empty{grid-column:1/-1;max-width:none;width:auto;font-weight:400;white-space:nowrap}
 .order-draft-table tbody td:nth-child(2)::before{content:'Quantity: ';color:var(--brand-muted)}
 .order-draft-table tbody td:nth-child(3)::before{content:'Unit Price: ';color:var(--brand-muted)}
 .order-draft-table tfoot{display:block}
 .order-draft-table tfoot tr{display:flex;justify-content:space-between;gap:.5rem}
 .order-draft-table tfoot th,.order-draft-table tfoot td{border:0;padding:.75rem 0 0;min-width:0}
 .receipt-controls{width:100%}
 .receipt-controls button{flex:1 1 auto}
 .field-help-dialog{padding-bottom:max(var(--space-lg),env(safe-area-inset-bottom))}
 #teamMemberList table,#teamMemberList tbody{display:block}
 #teamMemberList thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 #teamMemberList tr{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.25rem .5rem;padding:.75rem 0;border-bottom:1px solid var(--brand-border)}
 #teamMemberList td{border:0;padding:0;min-width:0}
 #teamMemberList td:first-child{grid-column:1/-1}
 #teamMemberList td:nth-child(2){color:var(--brand-muted)}
 #teamMemberList td:nth-child(2)::before{content:'Role: ';font-weight:600}
 #teamMemberList td:last-child:not(:nth-child(2)){justify-self:end}
}

.inventory-group{margin-top:1.5rem;padding-top:1rem;border-top:1px solid #dce5dd}
.inventory-menu-item{padding:1rem 0;border-bottom:1px solid #dce5dd;min-width:0}
.inventory-menu-heading{display:flex;align-items:center;flex-wrap:wrap;gap:.75rem;margin-bottom:.5rem}
.inventory-menu-heading h4{margin:0;flex:1 1 160px;overflow-wrap:anywhere}
.inventory-menu-item summary{cursor:pointer;font-weight:600}
.inventory-menu-item details>div{margin-top:.75rem;min-width:0}
.inline-recipe-editor .recipeRow{display:flex;flex-wrap:wrap;align-items:end;gap:.75rem;margin-bottom:.75rem}
.inline-recipe-editor .recipeRow label{flex:1 1 160px;min-width:0}
.inline-recipe-editor select,.inline-recipe-editor input{width:100%;min-width:0;box-sizing:border-box}
.inline-recipe-editor>.actions{margin-top:.75rem;flex-wrap:wrap}

/* Keep menu availability in three columns and recipe actions beside ingredients. */
.inventory-menu-table{width:100%;table-layout:fixed}
.inventory-menu-table>thead>tr>th:first-child{width:50%}
.inventory-menu-table>tbody>tr>td{vertical-align:top}
.inventory-menu-table>tbody>tr>td:nth-child(2){white-space:nowrap}
.inventory-menu-table .inventory-menu-item{padding:0;border:0}
.inventory-menu-item h4{margin:0 0 .5rem;overflow-wrap:anywhere}
.inventory-menu-item details[open]{min-width:0}
.recipe-ingredient-heading{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
.recipe-ingredient-heading>span{min-width:0;overflow-wrap:anywhere}
.recipe-ingredient-heading .recipe-edit-button{flex-shrink:0;margin:0;white-space:nowrap}
.inventory-menu-table .stock-badge{white-space:normal}
.inventory-menu-table .tablewrap{overflow-x:auto}
@media(max-width:600px){
 .inventory-menu-table>thead>tr>th:first-child{width:46%}
 .inventory-menu-table>thead>tr>th,.inventory-menu-table>tbody>tr>td{padding:.5rem .25rem}

}

.inventory-menu-table>tbody>.inventory-recipe-row>td{padding-top:0}
.inventory-menu-table>tbody>tr:has(+.inventory-recipe-row)>td{border-bottom:0}

/* Center the compact recipe action within its final column. */
.recipe-summary-table{width:100%}
.recipe-summary-table th,.recipe-summary-table td{vertical-align:middle}
.recipe-summary-table th:last-child:empty{width:44px}
.recipe-summary-table td:last-child:has(.recipe-edit-button){text-align:right}
.recipe-edit-button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:0;vertical-align:middle}
.recipe-edit-button svg{display:block;flex-shrink:0}

.menu-name-actions{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
.menu-name-actions strong{min-width:0;overflow-wrap:anywhere}
.menu-recipe-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;margin:0;padding:0}
.menu-recipe-toggle[aria-expanded="true"]{background:#dcebe7}
.inventory-recipe-row[hidden]{display:none}
.inventory-menu-item details>summary[hidden]{display:none}
.inventory-menu-item details>summary[hidden]+div{margin-top:0}

/* Recipe action stays at the far right of each menu row. */
.inventory-menu-table>thead>tr>th:first-child{width:40%}
.inventory-menu-table .menu-recipe-column{width:44px;text-align:right;vertical-align:middle;padding-left:.25rem;padding-right:.25rem}
.inventory-menu-table .menu-recipe-toggle{margin:0;vertical-align:middle}
.recipe-column-label{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:600px){.inventory-menu-table>thead>tr>th:first-child{width:36%}}

/* Align all menu row values with the recipe action. */
.inventory-menu-table>tbody>tr:not(.inventory-recipe-row)>td{vertical-align:middle}

/* Recipe details share the menu table's column widths and cell insets. */
.inventory-menu-table>tbody>.inventory-recipe-row>td{padding:0}
.inventory-menu-table .recipe-summary-table{table-layout:fixed;width:100%}
.inventory-menu-table .recipe-summary-table>thead>tr>th:first-child{width:40%}
.inventory-menu-table .recipe-summary-table>thead>tr>th:last-child{width:44px}
.inventory-menu-table .recipe-summary-table>thead>tr>th:last-child,.inventory-menu-table .recipe-summary-table>tbody>tr>td:last-child{padding-left:.25rem;padding-right:.25rem;text-align:right}
.inventory-menu-table .recipe-summary-table th,.inventory-menu-table .recipe-summary-table td{overflow-wrap:anywhere}
.inventory-menu-table .inline-recipe-editor,.inventory-menu-table .recipe-ingredient-heading{padding:var(--space-lg)}
@media(max-width:600px){
 .inventory-menu-table .recipe-summary-table>thead>tr>th:first-child{width:36%}
 .inventory-menu-table .recipe-summary-table th,.inventory-menu-table .recipe-summary-table td{padding:.5rem .25rem}
}

.ingredient-threshold-editor{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;margin:0}
.ingredient-threshold-editor input{width:6rem;min-width:0;max-width:100%;margin:0}
.ingredient-threshold-editor button{margin:0;min-height:44px}

/* All inventory tables use one column grid with a final icon column. */
.inventory-group{--inventory-name-width:40%;--inventory-action-width:52px}
.inventory-menu-table,.inventory-stock-table,.inventory-menu-table .recipe-summary-table{width:100%;table-layout:fixed}
.inventory-menu-table>thead>tr>th,.inventory-stock-table>thead>tr>th,.inventory-menu-table .recipe-summary-table>thead>tr>th{box-sizing:border-box}
.inventory-menu-table>thead>tr>th:first-child,.inventory-stock-table>thead>tr>th:first-child,.inventory-menu-table .recipe-summary-table>thead>tr>th:first-child{width:var(--inventory-name-width)}
.inventory-menu-table>thead>tr>th:nth-child(2),.inventory-menu-table>thead>tr>th:nth-child(3),.inventory-stock-table>thead>tr>th:nth-child(2),.inventory-stock-table>thead>tr>th:nth-child(3),.inventory-menu-table .recipe-summary-table>thead>tr>th:nth-child(2),.inventory-menu-table .recipe-summary-table>thead>tr>th:nth-child(3){width:calc((100% - var(--inventory-name-width) - var(--inventory-action-width))/2)}
.inventory-menu-table>thead>tr>th:last-child,.inventory-stock-table>thead>tr>th:last-child,.inventory-menu-table .recipe-summary-table>thead>tr>th:last-child{width:var(--inventory-action-width)}
.inventory-stock-table th,.inventory-stock-table td{vertical-align:middle;overflow-wrap:anywhere}
.inventory-menu-table>tbody>tr:not(.inventory-recipe-row)>td:nth-child(4),.inventory-menu-table>thead>tr>th:nth-child(4),.inventory-stock-table th:nth-child(4),.inventory-stock-table td:nth-child(4),.inventory-menu-table .recipe-summary-table th:nth-child(4),.inventory-menu-table .recipe-summary-table td:nth-child(4){padding-left:4px;padding-right:4px;text-align:right}
.inventory-stock-table .ingredient-threshold-editor{display:block;padding:0;margin:0}
.inventory-stock-table .ingredient-threshold-editor input{width:100%;min-width:0;box-sizing:border-box;margin:0}
.threshold-save-icon{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:0;margin:0;vertical-align:middle}
.threshold-save-icon svg{display:block}
@media(min-width:451px){
 .inventory-stock-table [data-edit-item]{width:44px;min-height:44px;padding:4px;font-size:12px;line-height:1.2;overflow-wrap:normal;word-break:normal}
}
@media(max-width:600px){
 .inventory-group{--inventory-name-width:36%}
 .inventory-stock-table th,.inventory-stock-table td{padding:.5rem .25rem}
}

/* Equal label height keeps Net Margin level with the other metric values. */
.dashboard-metric>.muted:first-child{min-height:44px;display:flex;align-items:center}
.home-overview .dashboard-grid>.card>button[data-dashboard-target="orderQueue"]{margin-top:var(--space-lg)}

/* Separate the YTD report and keep the Expense Date label gap consistent. */
#content>.card:has(>#categoryReport){margin-top:var(--space-lg)}
#expenseEditor label:has(>input[name="occurred_on"]){gap:var(--space-sm)}
#expenseEditor label:has(>input[name="occurred_on"])>.help-label-title{position:relative;display:block;padding-right:44px}
#expenseEditor label:has(>input[name="occurred_on"])>.help-label-title>.help-trigger{position:absolute;right:0;top:50%;transform:translateY(-50%);margin:0}

/* Use one standard gap between expense headings and empty messages. */
#expenseResults .empty{padding-top:0;margin-top:0}

/* Dashboard section titles share one height and one gap to their content. */
.home-overview .card>h2{display:flex;align-items:center;justify-content:space-between;gap:var(--space-sm);min-height:44px;margin:0 0 var(--space-lg)}
.home-overview .card>h2+*{margin-top:0}
.home-overview .dashboard-todos>li:first-child,.home-overview .stock-alerts>li:first-child{padding-top:0}

/* Compact order lines: keep product, quantity and price on one row on mobile. */
@media screen and (max-width:800px){
 .order-draft-table tbody tr{grid-template-columns:minmax(0,1.7fr) minmax(0,.65fr) minmax(0,1fr);gap:.25rem .45rem;align-items:center;padding:.55rem 0}
 .order-draft-table tbody td:first-child{grid-column:1;max-width:none;overflow-wrap:anywhere}
 .order-draft-table tbody td:nth-child(2){grid-column:2;text-align:center;font-variant-numeric:tabular-nums}
 .order-draft-table tbody td:nth-child(3){grid-column:3;text-align:right;font-variant-numeric:tabular-nums}
 .order-draft-table tbody td:nth-child(2)::before,.order-draft-table tbody td:nth-child(3)::before{content:none}
 .order-draft-table tbody td:last-child{grid-column:1/-1;justify-self:end}
 .order-draft-table tbody td.empty{grid-column:1/-1;text-align:left}
 .order-draft-table tbody td:first-child{max-width:none}
 .order-draft-table .order-row-actions{display:flex;gap:.35rem}
}
/* Separate the financial result cards from the reporting-period caption. */
.finance-reporting-period + .grid{margin-top:1.25rem}

/* Net outcomes only: gains green, losses red, zero neutral. */
.positive-result{color:#087f61}
.neutral-result{color:inherit}
@media print{.positive-result{color:#087f61!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}}


/* Income History reuses the responsive table pattern in Expense History. */
.income-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-md)}
.income-filters label{min-width:0}.income-actions{display:flex;flex-wrap:wrap;gap:.5rem}
#incomeHistory{margin-bottom:var(--space-lg)}
@media(max-width:700px){.income-filters{grid-template-columns:1fr}.income-table thead{display:none}.income-table,.income-table tbody,.income-table tr,.income-table td{display:block;width:100%}.income-table tr{padding:.65rem 0;border-bottom:1px solid var(--brand-border)}.income-table td{display:grid;grid-template-columns:7rem minmax(0,1fr);gap:.5rem;overflow-wrap:anywhere;white-space:normal}.income-table td:before{content:attr(data-label);font-weight:600}}


/* Keep long income memos from pushing desktop actions out of view. */
@media(min-width:701px){.income-table{table-layout:fixed;min-width:900px}.income-table th,.income-table td{overflow-wrap:anywhere}.income-table th{overflow-wrap:normal}.income-table th:nth-child(6){width:8rem}.income-table th:nth-child(8){width:20%}.income-table th:nth-child(9){width:7rem}.income-table button{white-space:nowrap;overflow-wrap:normal}}

/* Official artwork is displayed intact. No cropping, filters, or redraws. */
.brand .official-brand-cover{display:block;width:100%;max-width:100%;height:auto;object-fit:contain}
.app-brand .official-brand-profile{display:block;width:100%;max-width:112px;height:auto;object-fit:contain;margin:0 auto}
@media(max-width:700px){.app-brand .official-brand-profile{max-width:76px}}


/* Full original logo belongs to the white header, not a sidebar tile. */
.shell{grid-template-rows:auto 1fr}
.workspace-brand-header{grid-column:1/-1;display:flex;align-items:center;gap:1rem;padding:.75rem 2rem;background:white;border-bottom:1px solid var(--brand-border);min-width:0}
.workspace-brand-header .app-brand{margin:0;flex:0 0 80px}
.workspace-brand-header .official-brand-profile{display:block;width:80px;height:auto;max-width:100%;object-fit:contain;margin:0}
.workspace-brand-title{font-size:var(--text-page);font-weight:650;line-height:1.3;color:var(--brand-forest);overflow-wrap:anywhere}
.shell>aside{grid-column:1;grid-row:2}
.shell>main{grid-column:2;grid-row:2}
.auth .brand{background:white;padding:1rem;border-radius:10px;border:1px solid var(--brand-border)}
.auth .brand .official-brand-profile{display:block;width:160px;max-width:100%;height:auto;object-fit:contain;margin:auto}
.auth>.muted{text-align:center}
@media(max-width:800px){
 .shell{grid-template-rows:auto auto 1fr}
 .workspace-brand-header{padding:.5rem 1rem;gap:.75rem}
 .workspace-brand-header .app-brand{flex-basis:64px}
 .workspace-brand-header .official-brand-profile{width:64px}
 .workspace-brand-title{font-size:1.125rem}
 .shell>aside{grid-column:1;grid-row:2}
 .shell>main{grid-column:1;grid-row:3}
 .auth{margin:1rem auto}
}
@media print{.workspace-brand-header{display:none!important}}

/* Keep phone navigation labels together at the narrowest supported width. */
@media(max-width:360px){aside .primary-nav button{font-size:.75rem}aside .primary-nav button span{white-space:nowrap;overflow-wrap:normal}}

/* Dashboard review: consistent spacing, logo frames and help placement. */
/* Second review: direct assistant access, aligned context and input panels. */
.assistant-nav{margin-top:.5rem}
.workspace-business-heading{display:flex;align-items:center;gap:1.25rem;flex:1;min-width:0}
.workspace-business-heading .business-brand{min-width:0}
.workspace-business-heading .business-brand h3{margin:0;overflow-wrap:anywhere}
.workspace-business-heading .business-meta{margin:0;line-height:1.5}
.workspace-header-actions{flex:0 0 auto}
#refreshDashboard{width:156px;min-height:44px}
.home-overview .dashboard-setup summary{justify-content:space-between}

form:has(input:not([type="hidden"]),select,textarea),.input-section{padding:var(--space-lg);background:var(--brand-canvas);border:1px solid var(--brand-border);border-radius:8px}
.order-item-entry form{padding:0;border:0;background:transparent}
.order-customer-entry{margin-bottom:1.25rem}
#fulfillmentSection{margin-top:1.25rem;margin-bottom:1.5rem}
#orderDraft{padding:1rem;border:2px solid var(--brand-border);border-radius:8px;background:#fff}
.order-draft-table caption{font-size:var(--text-section);font-weight:650;color:var(--brand-ink);padding:0 0 1rem}
.chart-key{flex-wrap:wrap}
.chart-key .net-savings-swatch{display:inline-block;width:1rem;height:0;border:0;border-top:3px solid #947000;border-radius:0}
@media(max-width:1000px){.workspace-business-heading{flex-wrap:wrap;gap:.75rem}}
@media(max-width:600px){
 .workspace-business-heading{flex-basis:100%}
 .workspace-header-actions{margin-left:auto}
 .order-workspace .input-section{padding:1rem}
 form:has(input:not([type="hidden"]),select,textarea){padding:1rem}
 #orderDraft{padding:.75rem}
}
.business-logo-frame{display:flex;align-items:center;justify-content:center;width:88px;height:72px;padding:6px;border:1px solid var(--brand-border);border-radius:10px;background:#fff;flex-shrink:0}
.business-logo-frame .business-logo{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}
.business-logo-placeholder{font-size:var(--text-note);color:var(--brand-muted)}
.card>h2,.card>h3{margin:0 0 var(--space-lg);line-height:1.35}
.card>p{margin:0 0 var(--space-lg)}
.card>.dashboard-metrics{margin-bottom:var(--space-lg)}
.home-overview .dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-md)}
.home-overview .dashboard-metric{min-height:156px;padding:var(--space-md);align-content:start}
.home-overview .dashboard-metric>.muted:first-child{min-height:44px;display:flex;align-items:center;gap:0;padding-right:0}
.home-overview .dashboard-metric>.muted:first-child>.help-trigger{position:static;transform:none;margin-left:0}
.help-label-title{justify-content:flex-start;gap:0}
.field-help-heading{justify-content:flex-end;margin-bottom:var(--space-sm)}
.field-help-dialog>p{margin:0 0 var(--space-lg)}
.dashboard-setup summary{justify-content:flex-start}
.dashboard-setup summary>.setup-hint{margin-left:1rem;display:inline-flex;width:44px;height:44px;align-items:center;justify-content:center;border:1px solid var(--brand-border);border-radius:8px}
.setup-hint::before{font-size:1.65rem;line-height:1;font-weight:600}
.dashboard-setup summary>.setup-hint{flex:0 0 44px;min-width:44px}
.dashboard-intro{justify-content:flex-end}
.report-results-title{margin-top:2rem;margin-bottom:.75rem}
@media(max-width:450px){.business-logo-frame{width:64px;height:60px}.home-overview .dashboard-metric{min-height:176px}}
@media print{.business-logo-frame{break-inside:avoid}.report-results-title{margin-top:1.5rem}}
#expenseEditor label:has(>input[name="occurred_on"])>.help-label-title{display:flex;padding-right:0}
#expenseEditor label:has(>input[name="occurred_on"])>.help-label-title>.help-trigger{position:static;transform:none}
@media(max-width:600px){
 aside .primary-nav{grid-template-columns:repeat(3,minmax(0,1fr));gap:.375rem}
 aside .primary-nav button{font-size:.875rem;padding:.5rem .25rem}
 aside .primary-nav button span{white-space:nowrap;overflow-wrap:normal}
}
@media(max-width:450px){
 .home-overview .dashboard-metrics{grid-template-columns:minmax(0,1fr)}
 .home-overview .dashboard-metric{min-height:156px}
}
.chart-key .income-swatch,.chart-key .expense-swatch{width:.75rem;height:.75rem;border-radius:3px;border:0}
.chart-key .income-swatch{background:#09684e}
.chart-key .expense-swatch{background:#536caf}
@media(min-width:1001px){.dashboard-financial-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-financial-grid.single-panel{grid-template-columns:1fr}}





/* Third review: input emphasis and compact desktop forms. */
.workspace-business-heading{display:block}
.workspace-business-heading .business-meta{margin:.35rem 0 0 calc(88px + 1rem)}
#refreshDashboard{width:auto;min-width:156px;white-space:nowrap}
form:has(input:not([type="hidden"]),select,textarea),.input-section,.order-item-entry{background:var(--brand-input-warm);border-color:var(--brand-input-warm-border)}
#businessProfileForm,#teamMemberForm,.subscription-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.1rem}
#businessProfileForm>button[type="submit"],#teamMemberForm>button[type="submit"]{grid-column:1/-1}
#businessProfileForm .profile-logo-section{background:var(--brand-input-warm)}
.preparation-choice{border:0;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:.75rem}
.preparation-choice legend{font-size:.875rem;font-weight:400;margin-bottom:.75rem}
.preparation-choice label{display:flex;align-items:center;gap:.5rem;padding:.65rem 1rem;border:1px solid var(--brand-border);border-radius:7px;background:#fff}
.preparation-choice input{width:auto;margin:0;accent-color:var(--brand-forest)}
.preparation-choice label:has(input:checked){background:var(--brand-soft);border-color:var(--brand-forest)}
.settings-menu nav button{font-size:.8125rem;padding-left:1.5rem}
.plan-comparison{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
.plan-comparison>section{border:1px solid var(--brand-border);border-radius:8px;padding:1rem}
.plan-comparison ul{padding-left:1.25rem;line-height:1.65}
.plan-price{font-size:1.3rem;font-weight:650}
.split:has(#manualIncomeEditor){grid-template-columns:repeat(2,minmax(0,1fr))}
.split:has(#manualIncomeEditor)>.card{grid-column:1/-1}
#manualIncomeEditor .card,#expenseEditor .card{height:100%}
#content>.dashboard-setup summary>.setup-hint{margin-left:auto;margin-right:0}
#content>.dashboard-setup summary{justify-content:space-between}
/* Unified card action alignment: avoid fixed-width refresh-button offsets. */
.home-overview .dashboard-setup summary>.setup-hint{margin-left:auto;margin-right:0;flex-shrink:0}

/* Keep the Tasks checklist toggle aligned with the To-Do List help button.
   Both cards use the same content inset at each viewport width. */
#content>.dashboard-setup{padding:0}
#content>.dashboard-setup summary{padding:var(--workspace-card-pad,1.25rem)}
#content>.dashboard-setup summary>.setup-hint{margin-left:auto;margin-right:0}
@media(max-width:600px){
  #content>.dashboard-setup summary{padding:var(--workspace-card-pad,1rem)}
}
.order-draft-table .order-row-actions{grid-template-columns:repeat(3,32px);gap:.2rem;margin-top:.35rem}
.order-row-actions button{min-width:32px;min-height:36px}
.order-draft-table td:first-child{min-width:110px}
.older-orders{margin-top:1.25rem}
.older-orders summary{cursor:pointer;font-weight:600;margin-bottom:.75rem}
@media(max-width:800px){
 #businessProfileForm,#teamMemberForm,.subscription-columns,.plan-comparison,.split:has(#manualIncomeEditor){grid-template-columns:1fr}
 .workspace-business-heading .business-meta{margin-left:calc(88px + .5rem)}
}
@media(max-width:450px){.workspace-business-heading .business-meta{margin-left:calc(64px + .6rem)}.order-draft-table{min-width:0}}

.workspace-business-heading{--workspace-logo-size:88px;--workspace-logo-gap:1rem}
.workspace-business-heading .business-brand{gap:var(--workspace-logo-gap)}
.workspace-business-heading .business-meta{margin-left:calc(var(--workspace-logo-size) + var(--workspace-logo-gap))}
.workspace-business-heading .business-meta{margin-top:0}
.workspace-business-heading .business-brand h3{margin-bottom:0}
.workspace-business-heading{display:grid;grid-template-columns:var(--workspace-logo-size) minmax(0,1fr);column-gap:var(--workspace-logo-gap);row-gap:0}
.workspace-business-heading .business-brand{display:contents}
.workspace-business-heading .business-logo-frame{grid-column:1;grid-row:1/3}
.workspace-business-heading .business-brand>div{grid-column:2;grid-row:1;align-self:end}
.workspace-business-heading .business-meta{grid-column:2;grid-row:2;align-self:start;margin:0}
/* Fourth review: align profile controls and keep histories compact. */
#businessProfileForm{align-items:start;row-gap:1rem}
#businessProfileForm>label{grid-template-rows:28px auto;align-content:start}
#businessProfileForm>label>input,#businessProfileForm>label>select{height:44px}
#businessProfileForm textarea[name="business_address"]{min-height:44px;height:44px;resize:vertical}
#businessProfileForm .receipt-numbering-settings{grid-column:1/-1}
#businessProfileForm #fiscalStartField[hidden]{display:none}
#businessProfileForm .receipt-numbering-settings h3{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem}
#businessProfileForm .receipt-numbering-settings p{margin-bottom:.5rem}
#businessProfileForm .preparation-choice label{padding:.35rem .65rem;min-width:70px;min-height:44px;align-content:center}
#businessProfileForm .preparation-choice input{width:18px;height:18px;min-height:0}
#receiptSequenceForm{display:none}
#newReceiptSequence{max-width:440px;margin-top:1rem}
#businessProfileForm .reporting-year-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;grid-column:1/-1}
#businessProfileForm .reporting-year-settings label{grid-template-rows:28px auto}
#businessProfileForm .reporting-year-settings select{height:44px}
@media(max-width:800px){#businessProfileForm .reporting-year-settings{grid-template-columns:1fr}}
.workspace-details>summary:has([data-help-topic]){display:flex;align-items:center;gap:.75rem}
.workspace-details>summary>[data-help-topic]{margin-left:auto}
.history-details>summary{cursor:pointer;font-weight:650;font-size:var(--text-section);line-height:1.5}
.history-details[open]>.history-body{margin-top:1rem}
#auditCsv,#ordersCsv{margin-top:1rem}
.customer-contact{margin-top:.25rem;font-size:.875rem;overflow-wrap:anywhere}
.workspace-utilities{display:contents}
@media screen and (max-width:600px){
 aside .primary-nav{grid-template-columns:repeat(3,minmax(0,1fr));gap:.125rem}
 aside .primary-nav button{font-size:clamp(.6875rem,3vw,.8125rem);padding:.25rem 0;gap:.125rem;min-height:44px}
 aside .primary-nav button svg{width:18px;height:18px}
 aside .primary-nav button span{white-space:nowrap;overflow-wrap:normal}
 .workspace-utilities{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin-top:.35rem;border-top:1px solid #72958a}
 .workspace-utilities .settings-menu{grid-column:1/-1;grid-row:1;margin:0;padding:0;border:0}
 .workspace-utilities .settings-menu>summary{width:50%;min-height:44px;padding:.5rem}
 .workspace-utilities .assistant-nav{grid-column:2;grid-row:1;align-self:start;z-index:1;margin:0;min-width:0;overflow:visible}
 .workspace-utilities .assistant-nav button{width:100%;min-height:44px;margin:0;padding:.5rem;text-align:center;font-size:.8125rem}
 header .workspace-header-actions{display:block;grid-column:2;grid-row:1;margin:0;align-self:start}
 header #refreshDashboard{width:78px;min-width:78px;padding:.45rem .6rem;font-size:.8125rem;min-height:44px}
 
 .refresh-desktop-label{display:none}
 .home-overview .dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}
 .home-overview .dashboard-metric{min-height:128px;padding:.5rem;gap:.25rem}
 .home-overview .dashboard-metric>.muted:first-child{min-height:36px;font-size:.75rem;line-height:1.25}
 .home-overview .dashboard-metric strong{font-size:clamp(1rem,4.5vw,1.375rem);line-height:1.25;letter-spacing:-.025em}
 .workspace-details>summary:has([data-help-topic]){justify-content:space-between;padding-right:0}
 .workspace-details>summary>[data-help-topic]{margin:0 0 0 auto;flex-shrink:0}
}
#refreshDashboard{width:176px;min-width:176px;white-space:nowrap}

@media(max-width:450px){.workspace-business-heading{--workspace-logo-size:64px;--workspace-logo-gap:.6rem}}

@media(max-width:600px){
 .order-draft-table{width:100%;min-width:0}
 .order-draft-table tbody tr{grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}
 .order-draft-table tbody td:first-child{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.35rem;min-width:0;text-align:left}
 .order-draft-table tbody td:first-child::before{content:'Quantity';flex-basis:100%;color:var(--brand-muted);font-weight:400}
 .order-draft-table tbody td:nth-child(2){grid-column:1/-1;text-align:left}
 .order-draft-table tbody td:nth-child(2)::before{content:'Product: ';color:var(--brand-muted)}
 .order-draft-table tbody td:nth-child(3){grid-column:1;text-align:left}
 .order-draft-table tbody td:nth-child(3)::before{content:'Unit Price: ';color:var(--brand-muted)}
 .order-draft-table tbody td:last-child{grid-column:2;justify-self:stretch;text-align:right}
 .order-draft-table tbody td:last-child::before{content:'Amount: ';color:var(--brand-muted)}
 .order-draft-table tbody td.empty{display:block;grid-column:1/-1;text-align:left}
 .order-draft-table tbody td.empty::before{content:none}
 .order-draft-table .order-row-actions{display:flex;gap:.25rem;margin:0}
 .order-draft-table .order-row-actions button{width:44px;min-width:44px;min-height:44px}
}



/* Keep input stock controls readable on narrow phones. */
@media screen and (max-width:450px){
 .inventory-stock-table,.inventory-stock-table tbody{display:block;width:100%}
 .inventory-stock-table thead{display:none}
 .inventory-stock-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:.5rem .75rem;padding:.75rem 0;border-bottom:1px solid var(--brand-border)}
 .inventory-stock-table tbody td{display:block;width:auto;padding:0;border:0;text-align:left;overflow-wrap:normal;min-width:0}
 .inventory-stock-table tbody td:first-child{grid-column:1/-1;font-weight:600;overflow-wrap:anywhere}
 .inventory-stock-table tbody td:nth-child(2)::before,.inventory-stock-table tbody td:nth-child(3)::before{content:attr(data-label);display:block;font-weight:600;margin-bottom:.35rem;overflow-wrap:normal}
 .inventory-stock-table tbody td:last-child{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:.5rem;padding:0}
 .inventory-stock-table tbody td:last-child button{min-width:44px;min-height:44px;white-space:nowrap;margin:0;overflow-wrap:normal}
 .inventory-stock-table .ingredient-threshold-editor input{min-width:64px;max-width:100%}
}

.inventory-warning{display:block;color:#8a3b10;font-size:.85rem;font-weight:600;margin:.2rem 0;overflow-wrap:anywhere}

.home-overview .card{padding:1rem}
.home-overview .dashboard-metric{padding:.65rem;gap:.3rem}
.home-overview .dashboard-metric>.muted:first-child{min-height:2.5rem;display:flex;align-items:center}
.home-overview .dashboard-financial-grid .dashboard-metrics{align-items:stretch}
.home-overview .dashboard-twelve-month{width:100%;min-width:0;height:auto}
.home-overview .dashboard-todos li,.home-overview .stock-alerts li{padding:.6rem 0}
.statement-blockers{padding:.8rem;border-left:3px solid #b16b19;background:#fff7e8;overflow-wrap:anywhere}
.statement-blockers ul{padding-left:1.2rem}
@media(max-width:600px){.home-overview .chart-key{gap:.6rem;flex-wrap:wrap}}

.home-overview .dashboard-financial-grid .dashboard-metric{display:flex;flex-direction:column}
.home-overview .dashboard-financial-grid .dashboard-metric strong{margin-top:auto}

.home-overview .dashboard-financial-grid .dashboard-metrics{grid-auto-rows:1fr}

/* Financial KPI values: keep short statuses readable on narrow phones. */
.home-overview .dashboard-financial-grid .dashboard-metric strong{white-space:nowrap;overflow-wrap:normal;font-size:clamp(.875rem,2.2vw,1.5rem);letter-spacing:-.025em}
@media(max-width:600px){.home-overview .dashboard-financial-grid .dashboard-metric strong{font-size:clamp(.875rem,3.4vw,1.125rem)}.home-overview .dashboard-financial-grid .dashboard-metric{min-width:0}}

/* Dashboard financial help: compact, consistently positioned and touch-friendly. */
.dashboard-financial-metric{position:relative;padding:1rem 2.5rem 1rem 1rem;gap:.6rem;align-content:start}
.dashboard-financial-label{display:block;min-height:2.5em;line-height:1.35}
.dashboard-explain-trigger{position:absolute;top:.65rem;right:.65rem;display:grid;place-items:center;width:26px;height:26px;min-width:26px;min-height:26px;padding:0;border:1px solid var(--brand-border);border-radius:50%;background:white;color:var(--brand-forest);font-size:.875rem;font-weight:700;line-height:1;cursor:pointer;z-index:1}
.dashboard-explain-trigger:hover,.dashboard-explain-trigger:focus-visible{border-color:var(--brand-forest);outline-offset:2px}
.dashboard-financial-explanation{grid-column:1/-1;display:block;line-height:1.45;overflow-wrap:break-word}
.dashboard-financial-explanation[hidden]{display:none!important}
/* Keep every financial report amount in a fixed, right-aligned column. */
.financial-report-table{width:100%;table-layout:fixed}
.financial-report-table th:first-child,.financial-report-table td:first-child{width:60%;text-align:left;overflow-wrap:anywhere}
.financial-report-table th:not(:first-child),.financial-report-table td:not(:first-child){text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.financial-report-table th,.financial-report-table td{padding:.7rem .45rem}
@media(max-width:600px){.financial-report-table{font-size:.78rem}.financial-report-table th,.financial-report-table td{padding:.6rem .2rem}.financial-report-table th:first-child,.financial-report-table td:first-child{width:48%}.financial-report-table th:not(:first-child),.financial-report-table td:not(:first-child){font-size:.76rem}}
@media print{.financial-report-table{width:100%;table-layout:fixed}.financial-report-table th:not(:first-child),.financial-report-table td:not(:first-child){text-align:right!important;font-variant-numeric:tabular-nums;white-space:nowrap}.financial-report-table tr{break-inside:avoid}}

/* Financial help: compact heading and separated dialog explanations */
.financial-report-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.financial-report-heading h2{margin:0}
.financial-help-lines p{margin:0;padding:10px 0;border-bottom:1px solid var(--border,#e2e8e5)}
.financial-help-lines p:last-child{border-bottom:0}
.financial-help-lines strong,.financial-help-lines span{display:block}
.financial-help-lines span{margin-top:4px;line-height:1.45}


/* Beta mobile polish: consistent, compact surfaces across workspace tabs.
   Presentation-only rules; no changes to inventory, orders, or finance logic. */
#content .card{border-radius:14px;min-width:0}
#content .card h2,#content .card h3{overflow-wrap:anywhere}
#content button,#content input,#content select,#content textarea{max-width:100%}
#content input,#content select,#content textarea{min-width:0}
#content .dashboard-metrics,#content .dashboard-grid{min-width:0}
#content .dashboard-metric{min-width:0;border-radius:12px}
#content .dashboard-metric strong{max-width:100%;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
#content table{max-width:100%}
#content td,#content th{vertical-align:middle}
#content :is(button,a,input,select,textarea):focus-visible{outline:2px solid var(--brand-leaf);outline-offset:2px}
@media(max-width:600px){
  #content .dashboard-financial-grid .dashboard-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}
  #content .dashboard-financial-grid .dashboard-metric{padding:.7rem;min-width:0}
  #content .dashboard-financial-grid .dashboard-metric strong{font-size:clamp(.875rem,3.3vw,1.125rem);line-height:1.3;white-space:normal;overflow-wrap:anywhere}
  #content .card{padding:clamp(.75rem,3vw,1rem)}
  #content h1{overflow-wrap:anywhere}
}

/* Inventory category tabs: compact, touch-friendly, and consistent with BizTwig branding. */
#catalogResults .inventory-tabs{display:flex;gap:.5rem;flex-wrap:wrap;margin:.9rem 0 1rem}
#catalogResults .inventory-tabs button{flex:0 0 auto;min-height:44px;border-radius:999px;padding:.55rem 1rem;font-size:.875rem}
#catalogResults .inventory-tabs button.selected{background:var(--brand-forest);color:#fff}
#catalogResults .inventory-tabs button.secondary{background:var(--brand-soft);color:var(--brand-ink);border:1px solid var(--brand-border)}
#catalogResults .inventory-group{min-width:0}
#catalogResults .inventory-availability-note{margin:.65rem .25rem .2rem;line-height:1.4}
@media(max-width:600px){#catalogResults .inventory-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.4rem}#catalogResults .inventory-tabs button{min-width:0;padding:.6rem .35rem}}

/* Shared workspace layout primitives — coordinated beta design pass.
   One responsive spacing system for cards, headings, actions and forms. */
#content{--workspace-card-gap:1rem;--workspace-card-pad:1.25rem;--workspace-action-gap:.5rem}
#content :is(.card,.dashboard-setup){min-width:0}
#content .card{padding:var(--workspace-card-pad)}
#content :is(.card h2,.card h3,.financial-report-heading,.dashboard-intro h2){min-width:0}
#content :is(.card h2,.card h3){line-height:1.3}
#content :is(.card h2,.card h3):has(>.help-trigger){display:flex;align-items:center;justify-content:space-between;gap:var(--workspace-action-gap)}
#content :is(.card h2,.card h3)>.help-trigger{flex:0 0 auto}
#content :is(.tablewrap,.inventory-group,.dashboard-grid,.dashboard-metrics){min-width:0}
#content :is(input,select,textarea){max-width:100%;min-width:0}
#content :is(.card,.dashboard-metric) :is(p,small,strong){overflow-wrap:anywhere}
@media(max-width:600px){
  #content{--workspace-card-gap:.75rem;--workspace-card-pad:clamp(.75rem,3vw,1rem)}
  #content .card{padding:var(--workspace-card-pad)}
  #content :is(.card h2,.card h3){line-height:1.35}
}

/* Beta cross-tab typography consistency */
#content .card :is(h2,h3){letter-spacing:-.012em;overflow-wrap:anywhere}
#content .card :is(p,label,small){line-height:1.45}
#content :is(input,select,textarea){border-radius:9px}
#content :is(.card,.dashboard-metric) :is(strong,.negative-result,.positive-result){font-variant-numeric:tabular-nums}
@media(max-width:600px){#content .card :is(h2,h3){font-size:clamp(1rem,4vw,1.2rem)}}


/* Cohesive beta visual pass — common surfaces, controls and mobile hierarchy.
   Uses existing brand tokens and preserves all application behavior. */
#content{
  --beta-surface-radius:16px;
  --beta-control-radius:10px;
  --beta-layout-gap:1rem;
}
#content .card{
  border-radius:var(--beta-surface-radius);
  border:1px solid var(--brand-border);
  box-shadow:0 2px 12px rgba(19,62,45,.045);
}
#content .card :is(h2,h3){
  margin-top:0;
  letter-spacing:-.02em;
  line-height:1.3;
}
#content :is(.dashboard-metric,.card){
  min-width:0;
  box-sizing:border-box;
}
#content :is(input,select,textarea){
  border-radius:var(--beta-control-radius);
  box-sizing:border-box;
}
#content :is(.tablewrap,.inventory-group,.financial-report-table){
  max-width:100%;
}
#content :is(.dashboard-metric strong,.financial-report-table td){
  font-variant-numeric:tabular-nums;
}
#content :is(.card,.dashboard-metric) :is(button,a):focus-visible{
  outline:2px solid var(--brand-leaf);
  outline-offset:3px;
}
#content :is(.card,.dashboard-metric) :is(p,small,label){
  line-height:1.45;
}
@media(max-width:600px){
  #content{--beta-layout-gap:.75rem}
  #content .card{border-radius:14px}
  #content :is(.card h2,.card h3){overflow-wrap:anywhere}
  #content :is(.dashboard-metric,.card){max-width:100%}
  #content :is(.inventory-tabs,.dashboard-metrics){min-width:0}
}


/* Beta page-level visual hierarchy: dashboard, finance, orders and inventory */
.home-overview .dashboard-metrics{gap:.75rem}
.home-overview .dashboard-metric{
  border:1px solid var(--brand-border);
  border-radius:14px;
  padding:1rem;
  min-height:116px;
}
.home-overview .dashboard-metric>.muted:first-child{
  font-size:.8125rem;
  line-height:1.35;
}
.home-overview .dashboard-metric strong{
  font-variant-numeric:tabular-nums;
  line-height:1.2;
  letter-spacing:-.025em;
}
#content .financial-report-table{border-collapse:separate;border-spacing:0}
#content .financial-report-table :is(th,td){border-bottom:1px solid var(--brand-border)}
#content .financial-report-table th{font-weight:650}
#content .order-draft-table :is(th,td){vertical-align:middle}
#content .order-draft-table tfoot :is(th,td){font-weight:700}
#catalogResults .inventory-group{margin-top:.5rem}
#catalogResults .inventory-tabs button{font-weight:600}
@media(max-width:600px){
  .home-overview .dashboard-metrics{gap:.6rem}
  .home-overview .dashboard-metric{padding:.75rem;min-height:108px}
  #content .order-draft-table{max-width:100%}
  #catalogResults .inventory-tabs button{font-size:.8125rem}
}


/* Beta remaining-pages polish: Tasks, Reports, Settings and help surfaces */
#content .workspace-details{
  border-radius:14px;
  min-width:0;
}
#content .workspace-details>summary{
  min-height:44px;
  line-height:1.4;
  cursor:pointer;
}
#content .financial-report-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:.65rem;
}
#content .report-results-title{
  overflow-wrap:anywhere;
  line-height:1.3;
}
#content .financial-settings-fields{
  min-width:0;
  max-width:100%;
}
#content :is(.card,.workspace-details) :is(button,summary){
  touch-action:manipulation;
}
#content :is(.card,.workspace-details) :is(button,summary):focus-visible{
  outline:2px solid var(--brand-leaf);
  outline-offset:3px;
}
@media(max-width:600px){
  #content .financial-report-heading{align-items:flex-start}
  #content .financial-report-heading h2{flex:1 1 12rem}
  #content .workspace-details>summary{padding-block:.65rem}
  #content .financial-settings-fields :is(input,select){max-width:100%}
}


.stock-alert-task{grid-column:1/-1;justify-self:start;max-width:100%;white-space:normal}
.stock-alerts li>strong{min-width:0;overflow-wrap:anywhere}

/* Inline costing follows item details, with optional pricing help tucked away. */
.item-pricing{display:grid;gap:1rem;min-width:0;margin:1rem 0}
.item-pricing fieldset{min-width:0;margin:0;padding:1rem;border:1px solid var(--brand-border);border-radius:8px}
.item-pricing legend{font-weight:600;padding:0 .35rem}
.item-pricing details{min-width:0;margin:.75rem 0}
.item-pricing summary{cursor:pointer;font-weight:600;padding:.5rem 0}
.item-pricing [data-pricing-cost]{font-weight:600;margin:.75rem 0}
.item-pricing [data-pricing-error]:empty{display:none}
.item-pricing label,.item-pricing input,.item-pricing select{min-width:0;max-width:100%;box-sizing:border-box}
@media(max-width:480px){.item-pricing fieldset{padding:.75rem}.item-pricing .recipeRow{padding:.75rem;gap:.75rem}}

.receipt-correction{margin-top:1.5rem;border-top:1px solid var(--brand-border);padding-top:1rem}
.receipt-correction summary{cursor:pointer;font-weight:600}
.receipt-reversal{border:1px solid var(--brand-border);padding:.75rem}
@media print{.receipt-correction{display:none!important}}

/* October 22 acceptance: shared compact summary tiles and readable controls. */
.workspace-utilities .settings-menu>summary,.workspace-utilities .assistant-nav button{box-sizing:border-box;min-height:44px;line-height:24px;display:flex;align-items:center}
.workspace-utilities .settings-menu>summary{gap:.5rem}
.dashboard-period-toolbar{display:flex;align-items:end;justify-content:space-between;gap:1rem;margin:0 0 1rem;flex-wrap:wrap}
.dashboard-period-toolbar label{margin:0;max-width:22rem;flex:1}
.business-glance{margin-bottom:1.25rem}
.business-glance h2{margin-bottom:.35rem}
.summary-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
.summary-tile{display:grid;grid-template-columns:minmax(0,1fr) 24px;align-content:start;gap:.65rem;padding:1.1rem;border-radius:20px;background:var(--surface-muted,#eaf1ec);border:1px solid var(--brand-border,#d5e1d8);min-width:0}
.summary-tile>svg{width:22px;height:22px;color:var(--brand-green,#315d49)}
.summary-tile-label{color:var(--text-muted,#536b60);font-size:.95rem;overflow-wrap:anywhere}
.summary-tile strong{grid-column:1/-1;font-size:clamp(1.3rem,4vw,2rem);line-height:1.2;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.profile-receipt-preparation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.25rem}
#businessProfileForm h3{font-size:1.1rem}
#incomeHistory,#expenseHistory{margin-top:1.25rem}
#inventoryHistory h2,#manualIncomeEditor h2,.inventory-group h3{display:flex;justify-content:space-between;align-items:center;gap:.5rem}
#refreshInventoryHistory{margin-top:1rem}
#inventoryHistoryRows td:first-child,#inventoryHistoryRows th:first-child{white-space:nowrap}
.inventory-menu-table>thead>tr>th:nth-child(3),.inventory-menu-table>tbody>tr:not(.inventory-recipe-row)>td:nth-child(3){text-align:center}
.inventory-stock-table{display:table;min-width:480px;width:100%}
.inventory-stock-table tbody{display:table-row-group}
.inventory-stock-table thead{display:table-header-group}
.inventory-stock-table tbody tr{display:table-row}
.inventory-stock-table tbody td{display:table-cell;padding:.5rem;vertical-align:middle}
.inventory-stock-table tbody td::before{display:none!important}
.inventory-stock-table tbody td:last-child{display:table-cell}
.inventory-stock-table th:first-child{width:28%}
.inventory-stock-table th:nth-child(2),.inventory-stock-table th:nth-child(3){width:20%}
@media(max-width:380px){.summary-card-grid{gap:.5rem}.summary-tile{padding:.75rem;gap:.5rem;border-radius:16px}.summary-tile-label{font-size:.8125rem}.profile-receipt-preparation{grid-template-columns:1fr}}

#saleSearchContainer,#orderSearchContainer{margin-bottom:1rem}

@media(max-width:600px){.dashboard-period-toolbar #refreshDashboard{width:78px;min-width:78px;padding:.45rem .6rem;font-size:.8125rem;min-height:44px}}

/* October 24 acceptance: one visual language, compact forms, readable mobile tables. */
main{max-width:1220px}
#content{--section-title:1.12rem;--field-title:.875rem}
#content h2,.sales-section-heading{font-size:var(--section-title);font-weight:700;line-height:1.4}
#content h3{font-size:1rem;line-height:1.4}
.workspace-utilities .settings-menu>summary,.workspace-utilities .assistant-nav>button{display:flex;align-items:center;gap:.65rem;padding:.7rem 1rem;min-height:44px;margin:0;width:100%;text-align:left;font-size:.875rem;font-weight:600}
.workspace-utilities svg{width:20px;height:20px;flex-shrink:0}
.workspace-utilities .settings-menu>summary{list-style:none}
.workspace-utilities .settings-menu>summary::-webkit-details-marker{display:none}
.dashboard-period-toolbar>label{font-size:1.12rem;font-weight:700;max-width:23rem}
.business-glance.card{background:white;padding:1.15rem}
.summary-tile-label{font-size:.875rem;font-weight:600;line-height:1.4}
.financial-help-list{padding-left:1.25rem;line-height:1.6}
.financial-help-list li+li{margin-top:.8rem}
.income-swatch,.expense-swatch,.net-swatch{height:0!important;width:22px!important;border-radius:0!important;border-top:3px solid currentColor;background:transparent!important}
.income-swatch{color:#09684e}.expense-swatch{color:#536caf}.net-swatch{color:#947400}
#saleEditAddress{margin-top:.65rem}
.sales-type-tabs{display:flex!important;gap:.65rem!important;margin:1.15rem 0!important;padding:.5rem 0!important}
.sales-type-tabs button{flex:1;min-height:44px;min-width:0;border-radius:8px;padding:.65rem .5rem;font-weight:600;background:var(--brand-soft);color:var(--brand-ink)}
.sales-type-tabs button[aria-pressed=true]{background:var(--brand-forest);color:white}
#saleReady>.input-section:first-of-type{margin-bottom:1.15rem}
#saleAvailableProducts{margin:.65rem 0 1.15rem}
.sale-picker-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}
.sale-picker-row{display:flex;align-items:center;justify-content:space-between;gap:.65rem;padding:.7rem;border:1px solid var(--brand-border);border-radius:9px;background:var(--brand-canvas);min-width:0}
.sale-picker-row>div{min-width:0;overflow-wrap:anywhere}.sale-picker-row strong{font-size:.875rem}
.sale-picker-row>button{width:44px;min-width:44px;height:44px;padding:0;font-size:1.25rem;margin:0}
.shared-order-items{table-layout:fixed;width:100%;font-size:.875rem}
.shared-order-items th,.shared-order-items td{padding:.65rem .35rem;vertical-align:middle;overflow-wrap:anywhere}
.shared-order-items th:first-child{width:42%}.shared-order-items th:nth-child(2){width:20%}.shared-order-items th:nth-child(3){width:24%}.shared-order-items th:last-child{width:14%}
.shared-order-items input[data-sale-edit]{width:100%;min-width:0;text-align:center;padding:.6rem .2rem}
.shared-order-items td:nth-child(2),.shared-order-items th:nth-child(2){text-align:center}
.shared-order-items td:nth-child(3){white-space:nowrap}
.shared-order-items .icon-button{display:flex;align-items:center;justify-content:center;width:40px;height:44px;min-width:0;padding:0;margin:0}
#salesOrderQueue,#salesHistory{margin-top:1.35rem;padding-top:1rem;border-top:1px solid var(--brand-border)}
#salesHistory>summary{padding:.25rem 0;min-height:44px;align-content:center}
#historicalSalesOptions,#savedSales{margin-top:1.25rem;padding:.85rem;background:var(--brand-canvas);border-radius:8px}
.inventory-entry{max-width:880px}.inventory-entry>.card,.inventory-entry .card{box-shadow:none;border:0;padding:1rem 0 0;margin:0}
.inventory-entry>label{max-width:32rem}.inventory-entry #stock{max-width:36rem}
.item-pricing fieldset{background:#f0f6ef;border:1px solid #c7d9c9;border-radius:10px;padding:1rem;min-width:0}
.inline-cost-breakdown{background:#fff;padding:.75rem;border-radius:8px;margin:.65rem 0}
.recipeRow{display:grid!important;grid-template-columns:minmax(0,1fr) 7rem 44px!important;align-items:end;gap:.5rem!important}
.recipeRow input{text-align:center;min-width:0}.recipeRow button{width:44px;height:44px;padding:0;margin:0;font-size:1.25rem}
#item,.catalog-edit-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem}
#item>*,.catalog-edit-form>*{grid-column:1/-1}
#item>.item-pricing,.catalog-edit-form>.item-pricing{display:contents}
.item-pricing>fieldset{grid-column:1/-1}
.inventory-price-row{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem;align-items:end}
.inventory-price-row label{font-size:.75rem;min-width:0;overflow-wrap:normal}
.inventory-price-row input{min-width:0;padding:.6rem .3rem}
.inventory-price-row .help-label-title{gap:.25rem}
.inventory-price-row:has([data-pricing-guide][hidden]){grid-template-columns:minmax(0,1fr);max-width:14rem}
#item>label:has([name=price]),.catalog-edit-form>label:has([name=price]){grid-column:2}
#item>label:has([name=reorder_point]),.catalog-edit-form>label:has([name=reorder_point]){grid-column:3}
#item label:has([name=price]),#item label:has([name=reorder_point]),#item [data-pricing-guide] label,.catalog-edit-form label{min-width:0}
.inventory-stock-table td:nth-child(2),.inventory-stock-table th:nth-child(2),.inventory-menu-table td:nth-child(3),.inventory-menu-table th:nth-child(3){text-align:center}
.inventory-stock-table td:last-child{white-space:nowrap}
.inventory-stock-table [data-edit-item],.inventory-stock-table [data-save-threshold]{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;width:40px;height:44px;min-width:0;padding:0;margin:0 .1rem;font-size:1.1rem}
.profile-receipt-preparation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:1rem}
.profile-receipt-preparation fieldset{min-width:0}.profile-receipt-preparation .preparation-field{display:flex;align-items:center;gap:.6rem}
.reporting-year-settings{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
.reporting-year-settings>h3{grid-column:1/-1;margin:0}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:600px){
 main{padding:1rem}.card{padding:1rem}.split{gap:.8rem}
 .workspace-utilities{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.25rem}
 .workspace-utilities .settings-menu{grid-column:1;grid-row:1}
 .workspace-utilities .assistant-nav{grid-column:2/4;grid-row:1}
 .workspace-utilities .settings-menu>summary,.workspace-utilities .assistant-nav>button{padding:.55rem .35rem;justify-content:center;font-size:.8125rem;gap:.35rem;white-space:nowrap}
 .workspace-utilities svg{width:18px;height:18px}
 .dashboard-period-toolbar>label{font-size:1.12rem;max-width:none}
 .summary-tile-label,.dashboard-financial-label{font-size:.75rem!important;font-weight:600}
 .sale-picker-list{grid-template-columns:minmax(0,1fr)}
 .shared-order-items{font-size:.8125rem}.shared-order-items td,.shared-order-items th{padding:.6rem .2rem}
 .shared-order-items thead th{font-size:.75rem;white-space:nowrap;overflow-wrap:normal}
 .shared-order-items .icon-button{width:32px;min-height:44px}
 .recipeRow{grid-template-columns:minmax(0,1fr) 44px!important}.recipeRow>label:first-child{grid-column:1/-1}.recipeRow>label:nth-child(2){max-width:8rem}.recipeRow>button{justify-self:start}
 .profile-receipt-preparation{grid-template-columns:minmax(0,1fr)}
 .reporting-year-settings{grid-template-columns:minmax(0,1fr)}
}

.chart-key .net-savings-swatch{height:0!important;width:22px!important;border-radius:0!important;border-top:3px solid #947400;background:transparent!important}
#businessProfileForm .preparation-choice{display:grid;grid-template-columns:repeat(2,max-content);justify-content:start;gap:.5rem}
#businessProfileForm .preparation-choice legend{max-width:100%;margin-bottom:.5rem}
#item:has([name=item_type] option[value=ingredient]:checked)>label:has([name=reorder_point]),#item:has([name=item_type] option[value=supply]:checked)>label:has([name=reorder_point]){grid-column:1/-1;max-width:12rem}

@media(max-width:600px){.workspace-utilities .assistant-nav{grid-column:2;grid-row:1}.workspace-utilities .settings-menu>summary,.workspace-utilities .assistant-nav>button{flex-direction:column;justify-content:center;align-items:center;min-height:58px;padding:.5rem .15rem;gap:.25rem;font-size:.75rem}}

/* October 25 review: a shared scale and a lighter, warmer rhythm. */
#content{--result-size:clamp(.875rem,2.2vw,1.5rem)}
#content .summary-tile strong,#content .dashboard-financial-metrics .dashboard-metric strong{font-size:var(--result-size);line-height:1.3;letter-spacing:-.025em}
.chart-key .income-swatch{border-top:3px solid #09684e!important;background:transparent!important}
.chart-key .expense-swatch{border-top:3px solid #536caf!important;background:transparent!important}
.chart-key i{flex:0 0 22px}
.sales-type-tabs button{border-radius:999px;padding:.55rem 1rem;min-height:44px;font-size:.875rem;font-weight:600}
.sales-type-tabs button.secondary{border:1px solid var(--brand-border)}
#saleFinalize{margin-top:1rem}
.inventory-movement-table :is(th,td):nth-child(2),.inventory-movement-table :is(th,td):nth-child(3){text-align:center}
#content .financial-report-table{max-width:760px;margin-right:auto}
.financial-report-table :is(th,td):first-child{padding-left:1rem}
.workspace-note{display:flex;align-items:center;gap:.65rem;color:#426750;font-size:.875rem;margin:0 0 1rem;padding:.6rem .85rem;border-radius:18px 4px 18px 4px;background:linear-gradient(110deg,#e7f1df,#fff6dc);width:fit-content;max-width:100%}
.workspace-note svg{flex:0 0 28px;color:#4d8552}
.costing-panel{grid-column:1/-1;border:1px solid #c7d9c9;border-radius:12px;background:#f2f7ee;overflow:hidden}
.costing-panel>summary{padding:.85rem 1rem;cursor:pointer;font-weight:600;min-height:44px}
.costing-panel>p{padding:0 1rem;margin:.25rem 0 .75rem}
.item-pricing .costing-panel fieldset{border:0;border-radius:0;padding:1rem;margin:0;background:transparent}
.costing-panel .inline-cost-breakdown{margin:.75rem 0}
@media(max-width:600px){#content{--result-size:clamp(.875rem,3.3vw,1.125rem)}.sales-type-tabs button{font-size:.8125rem}.workspace-note{font-size:.8125rem}.financial-report-table :is(th,td):first-child{padding-left:.5rem}}

/* October 25.2: use one result and heading scale. */
#content .home-overview .dashboard-metric strong{font-size:var(--result-size);line-height:1.3;letter-spacing:-.025em}
#content #historicalSalesOptions>summary,#content #salesHistory>summary{font-size:var(--sales-title-size,var(--section-title));font-weight:700;line-height:1.4}
.costing-panel fieldset>label:has([name=pricing_method]){margin-bottom:.85rem}

#content .home-overview .growth-comparison>strong{font-size:var(--result-size);line-height:1.3}

@media(max-width:600px){#content{--sales-title-size:clamp(1rem,4vw,1.2rem)}}

/* October 25.3: every dashboard metric uses the same label typography. */
#content .home-overview .dashboard-metric>span:first-child,
#content .home-overview .summary-tile-label,
#content .home-overview .growth-comparison>span:first-child{font-size:.875rem;font-weight:600;line-height:1.4}
@media(max-width:600px){
 #content .home-overview .dashboard-metric>span:first-child,
 #content .home-overview .summary-tile-label,
 #content .home-overview .growth-comparison>span:first-child{font-size:.75rem}
}


/* Platform subscriber overview: readable business cards on phones. */
@media(max-width:700px){.subscriber-table thead{display:none}.subscriber-table,.subscriber-table tbody,.subscriber-table tr,.subscriber-table td{display:block;width:100%}.subscriber-table tr{padding:.75rem 0;border-bottom:1px solid var(--brand-border)}.subscriber-table td{display:grid;grid-template-columns:7rem minmax(0,1fr);gap:.5rem;white-space:normal;overflow-wrap:anywhere}.subscriber-table td::before{content:attr(data-label);font-weight:600}#subscriberOverview .actions{flex-wrap:wrap}}

/* Dedicated platform-admin workspace, independent of customer templates. */
.admin-workspace-label{padding:.5rem 1rem;color:inherit;font-weight:600}.admin-workspace .workspace-utilities{display:grid;gap:.5rem}.admin-workspace header h1{margin:0}.admin-business-selector{display:block;max-width:36rem;margin:0 0 1rem}.admin-business-count{font-size:1.2rem}.admin-business-count strong{font-size:2rem}
@media(max-width:600px){.admin-workspace .primary-nav{grid-template-columns:repeat(4,minmax(0,1fr))}.admin-workspace-label{display:none}.admin-workspace .workspace-utilities{display:flex;flex-wrap:wrap}.admin-workspace .workspace-utilities button{flex:1}.admin-workspace header h1{font-size:1.5rem}}

/* BizTwig platform performance dashboard. */
.platform-dashboard-heading{display:flex;justify-content:space-between;gap:1rem;align-items:start;flex-wrap:wrap}.platform-dashboard-heading h2{margin-top:0}.platform-dashboard-heading p{color:#52675c;font-size:.875rem}.platform-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;margin:1rem 0}.platform-metric{display:flex;flex-direction:column;gap:.6rem;padding:1.1rem;border:1px solid var(--brand-border);border-radius:12px;background:#f3f8f0}.platform-metric>span{font-weight:600}.platform-metric strong{font-size:1.65rem}.platform-metric small{color:#52675c}.platform-health-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.platform-health-grid .card{min-width:0}.platform-facts{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.85rem .75rem}.platform-facts dt{font-size:.875rem}.platform-facts dd{margin:0;text-align:right;font-weight:600;font-size:.875rem}.platform-chart-empty{position:relative;min-height:200px;padding:2.5rem 1rem;text-align:center;background:#f8faf7;border-radius:12px;overflow:hidden}.platform-chart-empty svg{position:absolute;inset:0;width:100%;height:100%;color:#dbe5da;opacity:.55;pointer-events:none}.platform-chart-empty strong,.platform-chart-empty p{position:relative}.platform-action-list{list-style:none;padding:0;margin:0}.platform-action-list li{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem 0;border-bottom:1px solid var(--brand-border)}.platform-action-list li>div{display:grid;gap:.5rem}.platform-priority{color:#845220;font-size:.75rem;font-weight:700;text-transform:uppercase}
@media(max-width:1000px){.platform-health-grid{grid-template-columns:1fr}.platform-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:480px){.platform-metrics{gap:.5rem}.platform-metric{padding:.75rem}.platform-metric>span{font-size:.8rem}.platform-action-list li{align-items:start;flex-direction:column}.platform-facts{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}

@media(max-width:600px){.admin-workspace .primary-nav{grid-template-columns:repeat(3,minmax(0,1fr))}#platformFinancePeriod{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}#platformFinancePeriod>*{min-width:0}#platformFinancePeriod input{width:100%}}

.admin-workspace main>header>div{display:block;width:100%}.admin-workspace main>header h1{display:block}.admin-workspace main>header p{margin-top:.35rem}


/* Keep business and owner full width; pair subscriber profile details on phones. */
@media(max-width:700px){
 #subscriberOverview .subscriber-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem .75rem}
 #subscriberOverview .subscriber-table td:nth-child(-n+2){grid-column:1/-1}
 #subscriberOverview .subscriber-table td:nth-child(n+3){display:flex;flex-direction:column;gap:.15rem;min-width:0;padding:.35rem}
}

.platform-revenue-bars>div{display:grid;grid-template-columns:5rem minmax(1rem,1fr) auto;align-items:center;gap:.75rem;margin:.8rem 0}
.platform-revenue-track{background:#edf2ee;border-radius:.25rem;overflow:hidden}

.platform-revenue-track svg{display:block;width:100%;height:1rem}

.subscriber-history-dialog{width:min(58rem,calc(100vw - 2rem));max-width:calc(100vw - 2rem)}
.subscriber-history-dialog .field-help-heading{align-items:center;justify-content:space-between}
.subscriber-history-dialog .actions{flex-wrap:wrap}

/* Business calendar: labels remain visible alongside category colors. */
.calendar-toolbar{display:flex;align-items:end;justify-content:space-between;gap:16px;flex-wrap:wrap}
.calendar-toolbar label{max-width:220px}.calendar-month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;margin:16px 0}
.calendar-weekday{font-weight:600;text-align:center;padding:8px}.calendar-day{min-height:100px;border:1px solid var(--border,#dce4df);border-radius:8px;padding:7px;overflow-wrap:anywhere}.calendar-today{outline:2px solid #2b7758;outline-offset:-2px}
.calendar-cell-entry{display:block;width:100%;text-align:left;font-size:.78rem;margin-top:6px;padding:5px;white-space:normal;color:#163d32;background:#edf5ef;border-left:4px solid #257a54}
.calendar-event{border-left-color:#8963ad!important}.calendar-order{border-left-color:#b87518!important}.calendar-task{border-left-color:#257a54!important}
.calendar-entry-list{list-style:none;padding:0;margin:12px 0;display:grid;gap:9px}.calendar-entry{border-left:4px solid;border-radius:6px;background:var(--surface-muted,#f4f7f5)}
.calendar-entry-button{display:flex;flex-direction:column;gap:4px;width:100%;text-align:left;background:transparent;color:inherit;padding:12px;white-space:normal;overflow-wrap:anywhere}.calendar-kind{font-size:.78rem;font-weight:700;text-transform:uppercase}.calendar-overdue{color:#a22c20;font-weight:700}.calendar-notes{white-space:pre-wrap;overflow-wrap:anywhere}.calendar-dialog{width:min(560px,92vw);max-height:88vh;overflow:auto;border-radius:16px;border:1px solid #cedad1;padding:24px}.calendar-dialog button{margin:5px}.calendar-phone-list{display:none}
@media(max-width:700px){.calendar-month-grid{display:none}.calendar-phone-list{display:block}.calendar-toolbar{align-items:start}.calendar-dialog{padding:16px}}

/* Selection is persistent; hover is a separate pointer-only cue. */
aside button:not(.selected):hover{background:transparent}
@media(hover:hover) and (pointer:fine){
 aside button:not(.selected):hover{background:#174f40}
}

.order-queue-actions{flex-wrap:wrap}
.order-queue-actions button[data-order]{width:auto;flex:0 1 auto;gap:5px;padding:0 .55rem}
.order-queue-actions button[data-order] svg{flex-shrink:0}
#salesOrderQueue .tablewrap{overflow-x:auto;max-width:100%;scrollbar-width:thin}
#salesOrderQueue table{width:max-content;min-width:100%}
#salesOrderQueue th,#salesOrderQueue td{white-space:nowrap;vertical-align:middle}
#salesOrderQueue td:last-child button{white-space:nowrap;margin-right:.25rem}
@media(max-width:700px){
 #salesOrderQueue th,#salesOrderQueue td{font-size:.79rem;padding:.55rem .35rem}
 #salesOrderQueue td:last-child button{font-size:inherit;padding:.38rem .48rem}
}

/* Separate daily work from history without unmounting drafts. */
.workspace-section-tabs{display:flex;flex-wrap:wrap;gap:.5rem;margin:0 0 1rem;padding:.5rem;background:var(--brand-soft);border:1px solid var(--brand-border);border-radius:10px}
.workspace-section-tabs button{flex:1 1 auto;min-height:44px;margin:0;text-align:center;white-space:normal}
.workspace-section-tabs button[aria-selected="true"]{background:var(--brand-forest);color:#fff}
.workspace-section-tabs button:focus-visible{outline:3px solid var(--brand-gold);outline-offset:2px}
.workspace-section-panel[hidden]{display:none!important}
.workspace-section-panel{min-width:0}
#salesOrderQueue.card,#salesHistory.card{margin-top:0;padding:1.4rem}
@media(max-width:600px){
 .workspace-section-tabs{gap:.4rem;padding:.4rem}
 .workspace-section-tabs button{flex-basis:calc(50% - .4rem);padding:.65rem .5rem;font-size:.875rem}
 #salesHistory table,#salesHistory tbody{display:block;width:100%;min-width:0}
 #salesHistory thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 #salesHistory tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:.5rem;padding:.75rem 0;border-bottom:1px solid var(--brand-border)}
 #salesHistory td{display:block;min-width:0;padding:.25rem 0;border:0;overflow-wrap:anywhere}
 #salesHistory td::before{display:block;color:var(--brand-muted);font-weight:600;font-size:.75rem}
 #salesHistory td:nth-child(1)::before{content:'Date'}
 #salesHistory td:nth-child(2)::before{content:'Sale / Order #'}
 #salesHistory td:nth-child(3)::before{content:'Amount'}
 #salesHistory td:nth-child(4)::before{content:'Status'}
 #salesHistory td:nth-child(5)::before{content:'Receipt'}
 #salesHistory td:nth-child(6)::before{content:'Adjust'}
 #salesHistory td button{margin:0;max-width:100%;white-space:normal}
}

.dashboard-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin-bottom:1rem}
.dashboard-summary-grid>.card{margin:0}
.dashboard-summary-grid .dashboard-metrics{display:block}
.dashboard-summary-grid .dashboard-metric{padding:0;border:0;background:none}
.dashboard-summary-grid .dashboard-metric>span:first-child{display:none}
.dashboard-untracked{display:block;font-size:1.1rem;color:var(--brand-muted)}
.dashboard-daily-work{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}
.dashboard-quick-actions{display:flex;flex-wrap:wrap;gap:.75rem}
.dashboard-quick-actions button{display:flex;align-items:center;justify-content:center;gap:.5rem;min-height:44px;flex:1 1 180px;margin:0}
.dashboard-quick-actions svg{width:20px;height:20px;flex-shrink:0}
.dashboard-caught-up{padding:.5rem 0}
@media(max-width:900px){.dashboard-summary-grid,.dashboard-daily-work{grid-template-columns:minmax(0,1fr)}}
#content .home-overview .dashboard-summary-grid .dashboard-metric{min-height:0;padding:0}
#content .home-overview .dashboard-summary-grid .dashboard-metric>span:first-child{display:none}

/* Match Finance's two-column result tiles and keep shortcuts on one row. */
#content .home-overview .dashboard-summary-grid,
#content .home-overview .dashboard-daily-work{grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
#content .home-overview .dashboard-summary-grid>.card,
#content .home-overview .dashboard-daily-work>.card{padding:1.1rem;border-radius:20px;margin:0;min-width:0}
#content .home-overview .dashboard-summary-grid>.card{background:var(--surface-muted,#eaf1ec)}
#content .home-overview .dashboard-summary-grid h2,
#content .home-overview .dashboard-daily-work h2{font-size:.875rem;line-height:1.4;margin-bottom:.65rem}
#content .home-overview .dashboard-summary-grid p,
#content .home-overview .dashboard-daily-work p{font-size:.8125rem;line-height:1.4;margin:.5rem 0}
#content .home-overview .dashboard-untracked{font-size:var(--result-size);line-height:1.3}
#content .home-overview .dashboard-daily-work{margin-bottom:1rem}
#content .home-overview .dashboard-summary-grid button,
#content .home-overview .dashboard-daily-work button{white-space:normal;max-width:100%;min-width:0}
#content .home-overview .dashboard-quick-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem}
#content .home-overview .dashboard-quick-actions button{min-width:0;min-height:44px;padding:.6rem .35rem;gap:.3rem;white-space:normal;overflow-wrap:normal;font-size:.8125rem;line-height:1.3}
@media(max-width:600px){
 #content .home-overview .dashboard-quick-actions button{flex-direction:column;font-size:.75rem}
 #content .home-overview .dashboard-quick-actions svg{width:18px;height:18px}
}
@media(max-width:380px){
 #content .home-overview .dashboard-summary-grid,
 #content .home-overview .dashboard-daily-work{gap:.5rem}
 #content .home-overview .dashboard-summary-grid>.card,
 #content .home-overview .dashboard-daily-work>.card{padding:.75rem;border-radius:16px}
 #content .home-overview .dashboard-summary-grid h2,
 #content .home-overview .dashboard-daily-work h2{font-size:.8125rem}
}
#content .home-overview .dashboard-quick-actions button{overflow-wrap:anywhere}
.dashboard-result-note{margin-top:.5rem;font-size:.8125rem}
.dashboard-result-note summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:var(--brand-forest);font-weight:600}
.dashboard-result-note summary::before{content:'▸';margin-right:.35rem}
.dashboard-result-note[open] summary::before{content:'▾'}

/* Dashboard labels and results share Finance's typography. */
#content .home-overview .dashboard-summary-grid h2{font-size:.875rem;font-weight:600;line-height:1.4;letter-spacing:normal;color:var(--text-muted,#536b60)}
#content .home-overview .dashboard-summary-grid :is(.dashboard-untracked,.dashboard-metric strong){font-size:var(--result-size);font-weight:700;line-height:1.3;letter-spacing:-.025em}
#content .home-overview .dashboard-daily-work{grid-template-columns:minmax(0,1fr)}
#content .home-overview .dashboard-daily-work h2,
#content .home-overview .dashboard-cash-flow h2{font-size:var(--section-title);font-weight:700;line-height:1.4}
#content .home-overview .dashboard-period-toolbar{margin-bottom:1rem}
@media(max-width:600px){#content .home-overview .dashboard-summary-grid h2{font-size:.75rem!important}}
.dashboard-tile-result{display:grid;grid-template-columns:minmax(0,1fr) 22px;gap:.4rem;align-items:start}
.dashboard-tile-result>div{min-width:0}
.dashboard-tile-icon{color:var(--brand-green,#315d49);display:flex}
.dashboard-tile-icon svg{width:22px;height:22px}
.dashboard-tile-heading{display:grid;grid-template-columns:minmax(0,1fr) 22px;gap:.4rem;align-items:start;margin-bottom:.65rem}
#content .home-overview .dashboard-summary-grid .dashboard-tile-heading h2{margin:0}
.dashboard-chart-notes{margin-top:.75rem;padding-top:.5rem;border-top:1px solid var(--brand-border)}
.dashboard-chart-notes p{margin:.35rem 0}
#content .home-overview .dashboard-daily-work .help-trigger{width:44px;min-width:44px;height:44px;min-height:44px;flex:0 0 44px;padding:0}
#content .workspace-section-tabs:has([data-section-workspace="finance"]){display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
#content .workspace-section-tabs [data-section-workspace="finance"]{min-width:0;padding:.65rem .35rem}

.finance-tool-picker{display:flex;gap:.5rem;margin-bottom:1rem;flex-wrap:wrap}
#financeTools [hidden]{display:none!important}
.loan-payment{display:flex;flex-direction:column;gap:.35rem;padding:1rem;background:var(--surface-soft,#edf3ed);border-radius:12px}
.loan-payment strong{font-size:1.8rem}.loan-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem}.loan-summary dt{font-size:.85rem;color:#5c6d65}.loan-summary dd{margin:.3rem 0;font-weight:700;overflow-wrap:anywhere}
.loan-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-top:1.5rem}.loan-control{display:grid;grid-template-columns:1fr 8rem;gap:.5rem;align-items:center}.loan-control input[type=range]{grid-column:1/-1;width:100%;accent-color:#337354}.loan-control input{min-width:0;width:100%}.loan-savings{padding:.7rem;background:#edf3ed;border-radius:8px}
.loan-chart{height:170px;display:flex;align-items:flex-end;gap:4px;padding-top:10px}.loan-year{flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;min-width:0;position:relative;padding-bottom:20px}.loan-stack{width:90%;display:flex;flex-direction:column;min-height:1px}.loan-principal{background:#337354}.loan-interest{background:#c6982e}.loan-year>span{position:absolute;bottom:0;font-size:.65rem}.loan-key:before{content:'';display:inline-block;width:.65rem;height:.65rem;margin:0 .25rem 0 .5rem;background:#337354}.loan-key.interest:before{background:#c6982e}
.mileage-toolbar{display:flex;align-items:end;gap:1rem;flex-wrap:wrap}.mileage-trip{display:flex;justify-content:space-between;gap:1rem;border-top:1px solid #dce6df;padding:1rem 0;overflow-wrap:anywhere}.mileage-trip p{margin:.4rem 0}.mileage-trip>div:last-child{display:flex;align-items:start;gap:.4rem}.mileage-trip button{padding:.5rem}
@media(max-width:600px){.loan-inputs{grid-template-columns:1fr}.loan-summary{gap:.5rem}.loan-summary dd{font-size:.9rem}.mileage-trip{flex-direction:column}.finance-tool-picker button{flex:1;padding:.65rem .4rem}}

svg.loan-chart{display:block;width:100%;height:190px;padding:0}

/* Shared compact reporting controls and breathing room in Finance. */
#content .period-picker{display:flex;flex-wrap:wrap;align-items:flex-end;gap:1rem;margin:.75rem 0 1rem}
#content .period-picker>label{display:grid;gap:.5rem;flex:0 1 13rem;min-width:0;margin:0}
#content .period-picker :is(input,select){width:100%;min-width:0;min-height:44px;margin:0;box-sizing:border-box}
#content .mileage-toolbar #mileageCsv{margin:.25rem 0;padding:.75rem 1rem}
#mileageHistory{margin-top:1.75rem}
#mileageHistory>h3{margin-bottom:1rem}
.finance-business-results{margin-top:1.25rem}
.finance-business-results .dashboard-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:600px){.finance-business-results .dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Native iPhone month inputs need a constrained grid cell, not a flex basis. */
#content .mileage-toolbar.period-picker{display:grid;grid-template-columns:minmax(0,13rem);row-gap:1rem;align-items:start;margin:1rem 0 1.25rem}
#content .period-picker>.month-field{display:grid;gap:.5rem;width:13rem;max-width:100%;min-width:0;box-sizing:border-box}
#content .month-field input[type="month"]{display:block;width:100%;inline-size:100%;min-width:0;min-inline-size:0;max-width:100%;box-sizing:border-box;text-align:left}
#content .month-field input[type="month"]::-webkit-date-and-time-value{text-align:left;min-width:0}
#content .mileage-toolbar #mileageCsv{justify-self:start;margin:0 0 .5rem;padding:.75rem 1rem}
.report-history-note{margin:1rem 0}
@media(max-width:700px){
 #content .mileage-toolbar.period-picker,#content .report-history-fields.period-picker{display:grid;grid-template-columns:minmax(0,1fr);width:100%}
 #content .period-picker>.month-field{width:100%;max-width:100%}
}

/* The field shell owns its border, including when iOS expands native month content. */
#content .period-picker>.month-field{grid-template-columns:minmax(0,1fr)}
#content .month-input-shell{display:block;width:100%;max-width:100%;min-width:0;overflow:hidden;box-sizing:border-box;border:1px solid #b6c8bc;border-radius:6px;background:#fff}
#content .month-input-shell input[type="month"]{-webkit-appearance:none;appearance:none;display:block;width:100%;max-width:100%;min-width:0;margin:0;border:0;border-radius:0;box-shadow:none;background:transparent;box-sizing:border-box}
#content .month-input-shell:focus-within{outline:2px solid var(--brand-leaf);outline-offset:2px}

/* Short, scannable help explanations. */
.field-help-dialog .field-help-heading{margin-bottom:1rem;align-items:flex-start}
.field-help-dialog .field-help-heading h2{min-width:0;overflow-wrap:anywhere;font-size:1.15rem;line-height:1.35}
.field-help-dialog .field-help-heading button{flex-shrink:0}
.help-bullets{margin:0;padding-left:1.2rem}
.help-bullets li{padding-left:.2rem;margin:0 0 1rem;line-height:1.55}
.help-bullets li:last-child{margin-bottom:0}
.help-bullets strong,.help-bullets span{display:block}
.help-bullets span{margin-top:.25rem}

/* Let new visitors understand the workspace before creating an account. */
.auth-panel nav{display:flex;flex-wrap:wrap;gap:.5rem}
.auth-panel nav button{min-width:0;flex:1 1 auto}
.onboarding-features{padding-left:1.3rem;margin:1rem 0}
.onboarding-features li{margin:.65rem 0;line-height:1.45}
#businessPreviewFeatures h3{margin-top:1.25rem}
#continueToAccount{margin:.5rem 0;max-width:100%;white-space:normal}

/* Keep the optional plan comparison readable inside the narrow welcome panel. */
.onboarding-plan-details{margin:1rem 0;border:1px solid var(--brand-border);border-radius:8px;padding:1rem}
.onboarding-plan-details>summary{cursor:pointer;font-weight:700;line-height:1.5}
.auth-panel .plan-reference{padding:0;border:0;box-shadow:none;margin:1rem 0}
.auth-panel .plan-comparison{grid-template-columns:minmax(0,1fr)}
.auth-panel .plan-fit{line-height:1.5}
.auth-panel .plan-comparison section{min-width:0}


/* Customer history stays readable without a wide table on phones. */
#customerHistoryPanel{min-width:0;overflow-wrap:anywhere}
#customerHistorySearch{margin:1rem 0}
#customerHistorySearch button{justify-self:start}
@media(max-width:600px){
 #customerHistoryResults table,#customerHistoryResults tbody{display:block;width:100%;min-width:0}
 #customerHistoryResults thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 #customerHistoryResults tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;border-bottom:1px solid var(--brand-border);padding:.75rem 0}
 #customerHistoryResults td{display:block;min-width:0;padding:.25rem 0;border:0;overflow-wrap:anywhere}
 #customerHistoryResults td:nth-child(3){grid-column:1/-1}
 #customerHistoryResults td::before{display:block;font-size:.75rem;font-weight:600;color:var(--brand-muted)}
 #customerHistoryResults td:nth-child(1)::before{content:'Date'}
 #customerHistoryResults td:nth-child(2)::before{content:'Sale / Order #'}
 #customerHistoryResults td:nth-child(3)::before{content:'Items'}
 #customerHistoryResults td:nth-child(4)::before{content:'Amount'}
 #customerHistoryResults td:nth-child(5)::before{content:'Status'}
 #customerHistoryResults td:nth-child(6)::before{content:'Fulfillment'}
}

/* Keep Reports history controls inside their card on iPhone and align with Finance. */
#content .report-history-controls{min-width:0;max-width:100%;margin-top:1.25rem}
#content .report-history-fields.period-picker{display:grid;grid-template-columns:repeat(2,minmax(0,13rem));gap:1rem;align-items:end;max-width:100%;margin:1rem 0}
#content .report-history-fields.period-picker>label{width:100%;max-width:100%;min-width:0;flex:none}
#content .report-history-fields.period-picker :is(input,select){max-width:100%;min-width:0}
#content .report-history-controls #loadHistoricalReport{margin:.25rem 0 .5rem}
@media(max-width:700px){#content .report-history-fields.period-picker{grid-template-columns:minmax(0,1fr);width:100%}}

/* Clear mobile-friendly choices when leaving an unfinished reorder. */
.reorder-leave-dialog{width:min(92vw,440px);max-width:440px;max-height:calc(100dvh - 2rem);overflow:auto;border:1px solid var(--brand-border);border-radius:16px;padding:1.5rem;background:#fff;color:var(--brand-ink);box-shadow:0 16px 48px #0003}
.reorder-leave-dialog::backdrop{background:#071f19a8}
.reorder-leave-dialog h2{font-size:1.15rem;line-height:1.35;margin:0 0 .75rem}
.reorder-leave-dialog p{margin:0 0 1.25rem}
.reorder-leave-actions{display:flex;flex-wrap:wrap;gap:.75rem}
.reorder-leave-actions button{flex:1 1 150px;min-height:44px;white-space:normal}

/* Show the actual monthly calendar on phones instead of hiding the grid. */
@media(max-width:700px){
 .calendar-month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;width:100%;min-width:0;margin:12px 0}
 .calendar-weekday{font-size:.68rem;padding:6px 0;min-width:0}
 .calendar-day{min-height:54px;min-width:0;padding:5px 2px;text-align:center;font-size:.78rem;overflow:hidden}
 .calendar-day strong{display:block}
 .calendar-cell-entry{width:7px;height:7px;min-height:0;overflow:hidden;display:inline-block;vertical-align:middle;font-size:0;line-height:0;padding:0;margin:5px 1px 0;border:0;border-radius:50%;background:#257a54;color:transparent}
 .calendar-cell-entry.calendar-event{background:#8963ad}
 .calendar-cell-entry.calendar-order{background:#b87518}
 .calendar-cell-entry.calendar-task{background:#257a54}
 .calendar-phone-list{display:block}
}

/* Platform Admin Calendar: keep event details readable and actions together on phones. */
.admin-workspace .calendar-entry{padding:12px;display:flex;flex-direction:column;gap:10px;min-width:0}
.admin-workspace .calendar-entry-details{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;overflow-wrap:anywhere}
.admin-workspace .calendar-entry-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.admin-workspace .calendar-entry-actions button{margin:0;min-width:84px}

/* Compact financial reconciliation results in Reports */
.report-reconciliation-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:12px;margin:14px 0}
.report-reconciliation-metric{display:flex;flex-direction:column;gap:8px;padding:14px;border:1px solid var(--border,#dbe5df);border-radius:12px;background:var(--surface-soft,#f7faf8)}
.report-reconciliation-metric span{font-size:.88rem;line-height:1.4}
.report-reconciliation-metric strong{font-size:1.15rem;overflow-wrap:anywhere}

/* Inventory tab polish: tab labels replace repeated panel headings. */
#content .card:has(#catalogNameFilter) > h2:first-child,
#inventoryHistory > h2:first-child { display: none; }
#refreshInventoryHistory { margin: 0.75rem 0; }

/* On narrow screens the final dashboard summary tile fills the second row. */
@media(max-width:600px){
 #content .home-overview .dashboard-summary-grid>.card:last-child:nth-child(odd){grid-column:1 / -1}
}

/* Consistent, collapsible periodic report sections. */
.reports-workspace .report-details,#reportsRetention .report-details{min-width:0}
.reports-workspace .report-summary-row,#reportsRetention .report-summary-row{display:flex;align-items:center;gap:.75rem;justify-content:space-between}
.reports-workspace .report-summary,#reportsRetention .report-summary{font-weight:650;font-size:1.05rem;line-height:1.45;cursor:pointer;flex:1;min-width:0;padding:.2rem 0}
.reports-workspace .report-details[open]>.report-summary-row,#reportsRetention .report-details[open]>.report-summary-row{margin-bottom:1rem}
.reports-workspace .report-details[open]>summary,#reportsRetention .report-details[open]>summary{margin-bottom:1rem}
.reports-workspace .financial-report-heading,#reportsRetention .reports-section-heading{display:none}
.reports-workspace .report-history-title{font-size:1rem;font-weight:600;line-height:1.45;margin:0 0 .75rem}
.reports-workspace .report-history-controls{margin-top:1.25rem}
.reports-workspace .report-history-note{margin:.75rem 0 1rem}
.reports-workspace .report-category-balances{margin:1rem 0}
.reports-workspace .report-category-row{display:flex;justify-content:space-between;gap:1rem;border-bottom:1px solid var(--brand-border);padding:.6rem 0}
.reports-workspace .report-category-row strong{text-align:right}
.reports-workspace .report-category-balances h3{margin:1rem 0 .5rem}
.reports-workspace #categoryReport{margin-top:1rem}

/* Keep period selection visible; results form a separate collapsible section. */
.reports-financial-container>.report-history-controls{margin-bottom:1.25rem;border-bottom:0;padding-bottom:0}
.reports-financial-results{border-top:1px solid var(--brand-border);padding-top:1.25rem;margin-top:1rem}
.reports-financial-results .generated-financial-report{padding-top:.25rem}
.reports-financial-results .report-summary-row{margin-bottom:.75rem}

/* Semantic summary is a direct child of details; help remains an independent control. */
.reports-workspace .report-details,#reportsRetention .report-details{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:.75rem;align-items:start}
.reports-workspace .report-summary,#reportsRetention .report-summary{grid-column:1;grid-row:1}
.reports-workspace .report-summary-controls,#reportsRetention .report-summary-controls{grid-column:2;grid-row:1;display:flex;align-items:center;justify-content:flex-end}
.reports-workspace .report-details-body,#reportsRetention .report-details-body{grid-column:1 / -1;min-width:0}
.reports-workspace .report-details[open]>.report-details-body,#reportsRetention .report-details[open]>.report-details-body{margin-top:1rem}

/* Sales History: one scrollable details row and one action row per entry. */
#salesHistory .sales-history-entry{min-width:0;padding:.85rem 0!important;border-bottom:1px solid var(--brand-border)}
#salesHistory .sales-history-entry>.row:first-child{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:.75rem!important;overflow-x:auto;white-space:nowrap;min-width:0;max-width:100%;-webkit-overflow-scrolling:touch}
#salesHistory .sales-history-entry>.row:first-child>span,#salesHistory .sales-history-entry>.row:first-child>strong{display:inline-block;flex:0 0 auto;white-space:nowrap;overflow-wrap:normal!important}
#salesHistory .sales-history-entry>.row:nth-child(2){display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:.65rem!important;margin-top:.65rem!important}
#salesHistory .sales-history-entry>.row:nth-child(2)>button{margin:0!important;min-height:44px;min-width:0;padding:.55rem 1rem;flex:0 0 auto}

/* Keep customer addresses readable instead of compressing the table on phones. */
.customer-history-table-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.customer-history-table-scroll table{min-width:760px;width:100%;table-layout:auto}
.customer-history-table-scroll th:nth-child(4),.customer-history-table-scroll td:nth-child(4){min-width:195px;white-space:normal;overflow-wrap:normal;word-break:normal}
.customer-history-table-scroll td:nth-child(4) span{overflow-wrap:normal!important;word-break:normal}
/* Column headings use the same horizontal spacing as transaction details. */
#salesHistory .sales-history-headings{display:flex;flex-wrap:nowrap;gap:.75rem;white-space:nowrap;overflow-x:auto;font-weight:650;color:var(--muted,#536760);padding:.65rem 0;border-bottom:1px solid var(--brand-border)}
#salesHistory .sales-history-headings>span{flex:0 0 auto}
#salesHistory .sales-history-headings>span:nth-child(1){min-width:105px}
#salesHistory .sales-history-headings>span:nth-child(2){min-width:115px}
#salesHistory .sales-history-headings>span:nth-child(3){min-width:70px}
#salesHistory .sales-history-entry>.row:first-child{gap:.75rem!important}
#salesHistory .sales-history-entry>.row:first-child>span:first-child{min-width:105px}
#salesHistory .sales-history-entry>.row:first-child>strong{min-width:115px}
#salesHistory .sales-history-entry>.row:first-child>span:nth-child(3){min-width:70px}

/* Outside-sale checkbox: explicit two-column layout overrides global label grid. */
.sale-historical-check{display:grid;grid-template-columns:22px minmax(0,1fr);align-items:start;column-gap:.7rem;margin-top:.85rem}
.sale-historical-check input[type="checkbox"]{display:block;width:20px;height:20px;min-width:20px;margin:.18rem 0 0;padding:0;align-self:start}
.sale-historical-check label{display:block!important;min-width:0;margin:0;line-height:1.45;cursor:pointer}

/* Finance history: restore the original compact, horizontally scrollable table on phones. */
@media(max-width:700px){
 #incomeResults .tablewrap,#expenseResults .tablewrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
 #incomeResults .income-table,#expenseResults .finance-history-table{display:table;width:100%;min-width:660px;table-layout:auto}
 #incomeResults thead,#expenseResults thead{display:table-header-group}
 #incomeResults tbody,#expenseResults tbody{display:table-row-group}
 #incomeResults tr,#expenseResults tr{display:table-row}
 #incomeResults td,#expenseResults td{display:table-cell;width:auto;padding:.65rem .5rem;white-space:normal;vertical-align:middle;overflow-wrap:normal}
 #incomeResults td::before,#expenseResults td::before{content:none}
 #incomeResults td button,#expenseResults td button{min-height:38px;min-width:38px;margin:0}
}

/* Keep Reports disclosure titles and content in separate rows on narrow screens. */
#reportsRetention .report-details{display:block;min-width:0}
#reportsRetention .report-summary-row{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem;min-width:0}
#reportsRetention .report-summary{display:list-item;flex:1 1 auto;min-width:0;overflow-wrap:break-word;line-height:1.4;margin:0}
#reportsRetention .report-summary-controls{flex:0 0 auto;align-self:flex-start}
#reportsRetention .report-details-body{display:block;clear:both;min-width:0;padding-top:.75rem;overflow-wrap:anywhere}
#reportsRetention .retention-content{min-width:0}
#reportsRetention .retention-content p{margin:0 0 .8rem;line-height:1.55}
#reportsRetention .retention-content button{margin-top:.35rem;max-width:100%;white-space:normal}

/* Expanded report contents must occupy a separate grid row below the summary. */
.reports-workspace .report-details>.report-details-body{grid-column:1 / -1;grid-row:2;min-width:0;position:relative}
.reports-workspace .report-details>.report-summary{grid-row:1;align-self:start;overflow-wrap:break-word}
.reports-workspace .report-details>.report-summary-controls{grid-row:1;align-self:start}
.reports-workspace .report-details[open]>.report-details-body{margin-top:.85rem}
#reportsRetention .report-details[open]>.report-details-body{padding-top:0;margin-top:.85rem}

/* Reports disclosure layout: avoid grid min-content columns that vertically stack headings on iPhone. */
.reports-workspace .report-details{display:block!important;width:100%;min-width:0}
.reports-workspace .report-details>summary.report-summary{display:list-item!important;width:100%;max-width:100%;box-sizing:border-box;min-width:0;overflow-wrap:normal;word-break:normal;white-space:normal;line-height:1.45;margin:0;padding:.25rem 0}
.reports-workspace .report-details>.report-summary-controls{display:flex;justify-content:flex-end;margin:.35rem 0 0}
.reports-workspace .report-details>.report-details-body{display:block!important;width:100%;box-sizing:border-box;min-width:0;clear:both;position:static;margin:0!important;padding-top:0}
.reports-workspace .report-details[open]>.report-details-body{margin-top:1rem!important}
.reports-workspace .report-details:not([open])>.report-details-body{display:none!important}

/* Final Dashboard simplicity and spacing review */
#content .home-overview .dashboard-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#content .home-overview .dashboard-summary-grid .dashboard-tile-caption{margin:.55rem 0 0;font-size:.8125rem;line-height:1.4}
#content .home-overview .dashboard-daily-work .card:has(#todayAgenda)>h2{margin-bottom:.35rem}
#content .home-overview .dashboard-daily-work #todayAgenda>p:first-child{margin-top:0}
.field-help-dialog .field-help-heading:has(> [data-close-help]){justify-content:flex-end;margin-bottom:.5rem}
@media(max-width:600px){#content .home-overview .dashboard-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}#content .home-overview .dashboard-summary-grid>.card{padding:.85rem}}

#content .home-overview .dashboard-summary-grid>.dashboard-tile-group{min-width:0}
#content .home-overview .dashboard-summary-grid>.dashboard-tile-group>.card{margin:0;min-height:100%;background:var(--surface-muted,#eaf1ec);padding:1.1rem;border-radius:20px}
#content .home-overview .dashboard-summary-grid>.dashboard-tile-group>.dashboard-tile-caption{margin:.55rem .15rem 0}
@media(max-width:600px){#content .home-overview .dashboard-summary-grid>.dashboard-tile-group>.card{padding:.85rem}}

/* Dashboard and Reports: compact, accessible mobile acceptance layout */
#content .home-overview .dashboard-summary-grid>.dashboard-tile-group{display:flex;flex-direction:column;min-width:0}
#content .home-overview .dashboard-summary-grid>.dashboard-tile-group>.card{min-height:0;height:auto;padding:.85rem;border-radius:16px}
#content .home-overview .dashboard-summary-grid .dashboard-tile-heading{margin-bottom:.3rem;gap:.3rem}
#content .home-overview .dashboard-summary-grid .dashboard-metric strong{font-size:1.45rem}
#content .home-overview .dashboard-summary-grid>.dashboard-tile-group>.dashboard-tile-caption{margin:.45rem .15rem 0;line-height:1.35;overflow-wrap:break-word}
#content .home-overview .dashboard-summary-grid{align-items:start;margin-bottom:1.5rem}
.home-overview .chart-key{display:flex;flex-wrap:wrap;gap:.55rem 1rem;align-items:center}
.home-overview .chart-key span{display:inline-flex;align-items:center;gap:.4rem;white-space:nowrap}
.statement-information{background:var(--surface-soft,#f7faf8);border-left:3px solid var(--brand-border,#dbe5df);border-radius:8px}
.statement-information strong{font-weight:600}
.reports-financial-results .financial-report-heading{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.75rem}
.reports-financial-results .financial-report-heading h2{margin:0}
.reports-financial-results .report-cost-note{margin:1rem 0 .65rem}
.report-reconciliation-metrics{gap:.65rem}
.report-reconciliation-metric{padding:.7rem .8rem;gap:.35rem;border-radius:12px}
.report-reconciliation-metric span{line-height:1.3}
.audit-export-caption{margin:.65rem 0 0}
@media(max-width:600px){
 .report-reconciliation-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 .report-reconciliation-metric:last-child{grid-column:1/-1}
 .report-reconciliation-metric{min-width:0}
 .current-activity .tablewrap{overflow-x:auto}
 .current-activity table{min-width:610px}
 .current-activity td,.current-activity th{white-space:nowrap;vertical-align:middle}
 /* Keep navigation below the iPhone status bar, including standalone PWA mode. */
 .shell>aside{padding-top:max(1rem,env(safe-area-inset-top,0px))}
}

/* Reports visual acceptance follow-up: keep title, help and table close together. */
#content .reports-financial-results .financial-report-heading{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:.5rem!important;margin:0 0 .5rem!important;min-height:0}
#content .reports-financial-results .financial-report-heading h2{flex:none!important;min-width:0;margin:0!important}
#content .reports-financial-results .financial-report-help{display:flex;align-items:center;justify-content:flex-end}
#content .reports-financial-results .financial-report-help .help-trigger{position:static!important;transform:none!important;margin:0!important;min-width:44px;min-height:44px}
#content .reports-financial-results .generated-financial-report{padding-top:0!important;margin-top:0!important}
#content .reports-financial-results .generated-financial-report .tablewrap{margin-top:.4rem}
#content .reports-financial-results .statement-information{margin:.85rem 0 1rem;padding:.85rem 1rem}
#content .reports-financial-results .statement-information p{margin:.4rem 0 0;line-height:1.45}
#content .reports-financial-results #openFinancialReport{margin-top:.5rem}
#content .reports-financial-container>label{margin-bottom:.3rem}
#content .reports-financial-container>.muted.small{margin:.3rem 0 .85rem}
#content .reports-financial-container .report-history-controls{margin-top:.8rem}
#content .reports-financial-container .report-history-note{margin:.5rem 0 .8rem}
#content .reports-financial-results{margin-top:1rem;padding-top:1rem}
#content .reports-workspace .card{overflow-wrap:break-word}

/* Three compact COGS boxes, readable on narrow phones. */
#content [data-report-section="cogs"] .report-reconciliation-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.6rem;margin:.75rem 0 .25rem}
#content [data-report-section="cogs"] .report-reconciliation-metric{grid-column:auto;min-width:0;padding:.65rem;gap:.5rem;border-radius:10px}
#content [data-report-section="cogs"] .report-reconciliation-metric span{font-size:.78rem;line-height:1.3;overflow-wrap:break-word}
#content [data-report-section="cogs"] .report-reconciliation-metric strong{font-size:1rem;line-height:1.25;overflow-wrap:anywhere}
#reportsRetention .retention-content{display:grid;gap:.7rem}
#reportsRetention .retention-content p{margin:0;line-height:1.45}
#reportsRetention .retention-intro{font-size:1rem}
#reportsRetention .retention-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}
#reportsRetention .retention-details>div{display:flex;flex-direction:column;gap:.3rem;padding:.7rem;border:1px solid var(--brand-border);border-radius:10px;min-width:0}
#reportsRetention .retention-details span{font-size:.82rem;line-height:1.35}
#reportsRetention .retention-details strong{overflow-wrap:anywhere}
#reportsRetention #exportRetainedFinance{justify-self:start;margin-top:.35rem}
#content [data-report-section="categories"]{padding-top:1rem;padding-bottom:1rem}
@media(max-width:430px){
 #content [data-report-section="cogs"] .report-reconciliation-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 #content [data-report-section="cogs"] .report-reconciliation-metric:last-child{grid-column:1/-1}
}

/* Finance and Sales acceptance: align metric values and keep help text close to its figure. */
#content .business-glance{margin-top:1rem}
#content .business-glance .summary-card-grid{align-items:stretch;row-gap:.85rem}
#content .business-glance .summary-tile{grid-template-rows:minmax(3.1rem,auto) auto auto;align-content:start;align-items:start;gap:.4rem;min-height:0}
#content .business-glance .summary-tile-label{align-self:start}
#content .business-glance .summary-tile>svg{grid-row:1}
#content .business-glance .summary-tile strong{grid-row:2;margin:0;align-self:start}
#content .business-glance .summary-tile-note{grid-column:1/-1;grid-row:3;font-size:.78rem;line-height:1.35;color:var(--text-muted,#536b60)}
#content .finance-business-results .finance-efficiency-note{margin:.8rem 0 0;line-height:1.45}
#content .finance-business-results .dashboard-metrics{align-items:stretch}
#content .income-actions{margin-top:1.3rem!important;padding-top:.6rem}
#content #mileageHistory{margin-top:1.1rem}
#content #mileageHistory h3{margin-bottom:.4rem}
#content #mileageHistory #mileageTotal{margin:.3rem 0 1rem}
#content #loanResults .loan-chart{display:block;width:100%;height:auto;max-height:230px;margin:.5rem 0 0}
#content #loanResults .loan-chart + p{margin:.15rem 0 .65rem}
#content #loanResults .loan-chart + p + details{margin-top:0}
#salesHistory .sales-history-entry{overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}
#salesHistory .sales-history-single-row{display:flex;align-items:center;gap:.75rem;flex-wrap:nowrap;white-space:nowrap;width:max-content;min-width:100%;font-size:.9rem}
#salesHistory .sales-history-single-row>*{flex:0 0 auto}
#salesHistory .sales-history-single-row .sales-history-reference{max-width:none;white-space:nowrap;overflow:visible;overflow-wrap:normal}
#salesHistory .sales-history-single-row .sales-history-amount{font-variant-numeric:tabular-nums}
#salesHistory .sales-history-single-row button{min-height:36px;padding:.4rem .65rem;font-size:inherit}

/* Finance-only mobile acceptance: labels above values, not squeezed beside icons. */
#content .business-glance .summary-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
#content .business-glance .summary-tile{display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:flex-start!important;gap:.45rem!important;padding:.8rem!important;min-width:0!important;min-height:0!important;grid-template-columns:none!important;grid-template-rows:none!important}
#content .business-glance .summary-tile>svg{order:0;flex:0 0 auto;width:20px;height:20px}
#content .business-glance .summary-tile-label{order:1;display:block!important;width:100%;min-width:0;white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important;hyphens:none;line-height:1.3;font-size:clamp(.82rem,2.6vw,.95rem)}
#content .business-glance .summary-tile strong{order:2;display:block!important;align-self:flex-start!important;margin:.3rem 0 0!important;font-size:clamp(1.2rem,4vw,1.75rem)}
#content .business-glance .summary-tile-note{order:3;display:block!important;margin-top:.2rem}
#content .finance-business-results .dashboard-metrics{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:.5rem}
#content .finance-business-results .dashboard-metric{min-width:0;padding:.65rem .45rem}
#content .finance-business-results .dashboard-metric span{overflow-wrap:break-word;font-size:.8rem}
@media(max-width:380px){#content .finance-business-results .dashboard-metrics{grid-template-columns:repeat(3,minmax(0,1fr))!important}}

/* Finance + Sales acceptance: readable mobile transaction history. */
#salesHistory .sales-history-rows{max-width:100%;min-width:0}
#salesHistory .sales-history-entry{overflow-x:auto;overflow-y:hidden;width:100%;max-width:100%;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;scrollbar-width:thin;padding:.7rem 0;border-bottom:1px solid var(--line,#ddd)}
#salesHistory .sales-history-single-row{display:flex;flex-wrap:nowrap;align-items:center;gap:.85rem;min-width:max-content;width:max-content;font-size:inherit;line-height:1.45}
#salesHistory .sales-history-single-row>*{flex:0 0 auto;white-space:nowrap}
#salesHistory .sales-history-single-row .sales-history-reference{overflow:visible;max-width:none}
#salesHistory .sales-history-single-row .sales-history-amount{font-variant-numeric:tabular-nums}
#salesHistory .sales-history-scroll-hint{margin:.6rem 0 .35rem}

/* Final Sales acceptance: one aligned, horizontally scrolling table. */
#salesHistory .sales-history-table-scroll{--sales-cols: 104px minmax(205px,1fr) 100px 120px 180px;overflow-x:auto;overflow-y:hidden;max-width:100%;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
#salesHistory .sales-history-headings,
#salesHistory .sales-history-single-row{display:grid!important;grid-template-columns:var(--sales-cols)!important;column-gap:12px!important;align-items:center;min-width:785px;width:100%;box-sizing:border-box;font-size:inherit}
#salesHistory .sales-history-headings{overflow:visible!important;border-bottom:1px solid var(--brand-border);padding:.65rem 0;font-weight:650}
#salesHistory .sales-history-headings>span{min-width:0!important}
#salesHistory .sales-history-entry{overflow:visible!important;width:100%;max-width:none;padding:0!important}
#salesHistory .sales-history-single-row{padding:.75rem 0;min-width:785px;width:100%}
#salesHistory .sales-history-single-row>*{min-width:0;white-space:nowrap}
#salesHistory .sales-history-single-row .sales-history-reference{max-width:none;overflow:visible;white-space:nowrap}
#salesHistory .sales-history-single-row button{justify-self:start}
#salesHistory .sales-history-rows{min-width:785px}

#salesHistory .sales-history-actions{display:flex;align-items:center;gap:.4rem;white-space:nowrap}

/* Compact Sales History on phones: keep Date, Receipt # and Amount in view. */
@media(max-width:700px){
 #salesHistory .sales-history-table-scroll{--sales-cols:76px 138px 74px 92px 150px}
 #salesHistory .sales-history-headings,
 #salesHistory .sales-history-single-row{min-width:0;width:max-content;column-gap:7px!important;font-size:.79rem!important;line-height:1.35}
 #salesHistory .sales-history-headings{padding:.45rem 0}
 #salesHistory .sales-history-rows{min-width:0;width:max-content}
 #salesHistory .sales-history-entry{width:max-content;max-width:none}
 #salesHistory .sales-history-single-row{padding:.55rem 0}
 #salesHistory .sales-history-single-row .sales-history-reference{font-size:inherit!important}
 #salesHistory .sales-history-actions{gap:.25rem}
 #salesHistory .sales-history-actions button{font-size:.79rem!important;padding:.38rem .48rem!important}
}

/* Subscriber Inventory mobile: fit reorder threshold controls within viewport. */
@media(max-width:600px){
 .inventory-group:has(.inventory-stock-table){--inventory-name-width:37%;--inventory-action-width:38px}
 .inventory-stock-table{width:100%;min-width:0;table-layout:fixed}
 .inventory-stock-table th,.inventory-stock-table td{padding:.4rem .15rem;font-size:.82rem;overflow-wrap:anywhere}
 .inventory-stock-table .ingredient-threshold-editor input{width:100%;min-width:0;max-width:100%;padding:.35rem .2rem;font-size:.85rem}
 .inventory-stock-table [data-save-threshold],.inventory-stock-table [data-edit-item]{min-width:0;width:34px;max-width:100%;padding:0;margin:0}
 .inventory-menu-table .inventory-warning{font-size:.78rem;line-height:1.25}
}

/* Tasks calendar: compact full-month grid, including phones. */
#businessCalendar .calendar-month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
#businessCalendar .calendar-day{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:48px;padding:4px;cursor:pointer;background:var(--surface-muted,#f4f7f5);color:inherit;border:1px solid var(--border,#dce4df);font:inherit}
#businessCalendar .calendar-day strong{font-size:.9rem}
#businessCalendar .calendar-selected-day{background:#e3f2e8;border-color:#257a54}
#businessCalendar .calendar-event-dot{font-size:.8rem;color:#257a54;line-height:1}
#businessCalendar .calendar-navigation{display:flex;align-items:center;justify-content:space-between;gap:4px;flex-wrap:nowrap}
#businessCalendar .calendar-navigation button{min-width:32px;padding:6px 8px}
#businessCalendar .calendar-month-title{text-align:center;flex:1;font-size:1rem}
#businessCalendar input[type=time]{text-align:left}
@media(max-width:700px){#businessCalendar .calendar-month-grid{display:grid}#businessCalendar .calendar-weekday{padding:5px 0;font-size:.7rem}#businessCalendar .calendar-day{min-height:42px;padding:2px}#businessCalendar .calendar-navigation button{min-width:28px;padding:5px}}

/* Keep Add Event time entry aligned with other left-aligned form controls. */
#calendarNewEvent input[type="time"]{text-align:left;direction:ltr;justify-content:flex-start}
#calendarNewEvent input[type="time"]::-webkit-date-and-time-value{text-align:left}

/* Approved boxed Business Profile accordion. */
#businessProfileForm .profile-group{border:1px solid #dce4df;border-radius:14px;background:#fff;margin:0 0 12px;overflow:hidden}
#businessProfileForm .profile-group>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none;padding:18px 16px;min-height:72px}
#businessProfileForm .profile-group>summary::-webkit-details-marker{display:none}
#businessProfileForm .profile-group-heading{display:flex;flex-direction:column;gap:5px;min-width:0}
#businessProfileForm .profile-group-heading strong{font-size:1.2rem;font-weight:750;line-height:1.3;color:var(--brand-ink,#203c35)}
#businessProfileForm .profile-group-heading small{font-size:.86rem;line-height:1.4;color:var(--brand-muted,#5b6c64);font-weight:400}
#businessProfileForm .profile-group-chevron{flex:none;width:10px;height:10px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin-right:5px}
#businessProfileForm .profile-group[open] .profile-group-chevron{transform:rotate(225deg)}
#businessProfileForm .profile-group-body{padding:16px;border-top:1px solid #e5ebe7}
#businessProfileForm .profile-group-body>[data-help-topic="Reporting Year"]{display:inline-flex;margin:0 0 8px}
@media(max-width:700px){#businessProfileForm .profile-group-heading strong{font-size:1.13rem}#businessProfileForm .profile-group>summary{padding:16px 14px}}

/* Business Profile final typography consistency: preserve approved boxed layout. */
#businessProfileForm .profile-group-heading strong{font-size:1.2rem;font-weight:750;line-height:1.3}
#businessProfileForm .profile-group-heading small{font-size:.86rem;font-weight:400;line-height:1.4}
#businessProfileForm .profile-group-body h3{font-size:1.08rem;font-weight:700;line-height:1.35}
#businessProfileForm .profile-group-body label,#businessProfileForm .profile-group-body legend{font-size:1rem;line-height:1.4}
#businessProfileForm .profile-group-body input,#businessProfileForm .profile-group-body select,#businessProfileForm .profile-group-body textarea{font-size:1rem}
#businessProfileForm .profile-group-body p.muted,#businessProfileForm .profile-group-body .small{font-size:.9rem;line-height:1.45}
@media(max-width:700px){#businessProfileForm .profile-group-heading strong{font-size:1.2rem}}

/* Calm, consistent Business Profile type hierarchy (approved mobile review). */
#businessProfileForm .profile-group-heading strong{font-size:1.05rem;font-weight:700;line-height:1.35}
#businessProfileForm .profile-group-heading small{font-size:.82rem;font-weight:400;line-height:1.4}
#businessProfileForm .profile-group-body h3,#businessProfileForm .profile-group-body h4{font-size:.98rem;font-weight:700;line-height:1.4}
#businessProfileForm .profile-group-body label,#businessProfileForm .profile-group-body legend{font-size:.94rem;font-weight:650;line-height:1.4}
#businessProfileForm .profile-group-body input,#businessProfileForm .profile-group-body select,#businessProfileForm .profile-group-body textarea{font-size:.98rem;font-weight:400;line-height:1.4}
#businessProfileForm .profile-group-body p,#businessProfileForm .profile-group-body .muted,#businessProfileForm .profile-group-body .small{font-size:.88rem;line-height:1.45}
#businessProfileForm .profile-group-body button{font-size:.94rem;line-height:1.35}
@media(max-width:700px){#businessProfileForm .profile-group-heading strong{font-size:1.05rem}}

/* Settings accordion consistency: Account & Data, Subscription, Help Center. */
.settings-accordion{display:grid;gap:12px}
.settings-accordion .settings-panel,.subscription-cancellation.settings-panel{border:1px solid #dce4df;border-radius:14px;background:#fff;overflow:hidden;margin:0}
.settings-panel>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none;cursor:pointer;padding:16px}
.settings-panel>summary::-webkit-details-marker{display:none}
.settings-panel-heading{display:flex;flex-direction:column;gap:4px;min-width:0}
.settings-panel-heading strong{font-size:1.05rem;line-height:1.35;font-weight:700}
.settings-panel-heading small{font-size:.82rem;line-height:1.4;font-weight:400;color:var(--brand-muted)}
.settings-panel[open]>summary .profile-group-chevron{transform:rotate(225deg)}
.settings-panel-body{padding:16px;border-top:1px solid #e5ebe7}
.account-data-settings>section.settings-panel{padding:16px}
.account-data-settings #accountExport{margin-bottom:12px}
.account-data-settings .closure-acknowledgment{display:flex;flex-direction:row;align-items:flex-start;gap:10px;font-size:.9rem;line-height:1.45}
.account-data-settings .closure-acknowledgment input{width:18px;height:18px;flex:none;margin:2px 0 0}
.account-data-settings .settings-panel-body h4{font-size:1rem;margin:18px 0 6px}
.account-data-settings .settings-panel-body p{font-size:.93rem;line-height:1.5}
.plan-settings-panel .plan-price{font-size:1.12rem;font-weight:700}
.plan-settings-panel .plan-plus-label strong{font-weight:750}
.help-guides.settings-accordion .settings-panel{padding:12px}
.help-guides.settings-accordion .help-article{margin:8px 0;padding:0}
.help-guides.settings-accordion .help-article>summary{font-size:1rem;font-weight:700;padding:14px}
.help-guides.settings-accordion .help-article>ol,.help-guides.settings-accordion .help-article>p{padding:0 14px}
.sales-recovery-help{margin-top:20px}
.sales-recovery-help .settings-panel{border:1px solid #dce4df;border-radius:14px;background:#fff}

#content .business-glance .summary-cost-action {
  grid-column: 1 / -1;
  grid-row: 3;
  order: 3;
  justify-self: start;
  width: auto;
  max-width: 100%;
  padding: .35rem 0;
  background: transparent;
  border: 0;
  color: var(--brand-green, #315d49);
  min-height: 44px;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  text-decoration: underline;
}

#content .business-glance > h2 { font-size: 1.1rem; }
#content .business-glance .summary-tile-label { font-size: .82rem; }
#content .business-glance .summary-tile > strong { font-size: var(--result-size, 1.125rem); }

#businessProfileForm .profile-group:has([name="finance_cost_tracking"]) .profile-group-body label {
  font-size: .88rem;
}
#businessProfileForm .profile-group-body #productCostMethodNote,
#businessProfileForm .profile-group-body #productCostPeriodNote {
  font-size: .82rem;
}

.field-help-dialog[aria-labelledby="missingCostsTitle"] { font-size: .88rem; }
#missingCostsTitle { font-size: 1.1rem; }
.field-help-dialog [data-close-missing-costs] + p { margin-top: .75rem; }
.field-help-dialog[aria-labelledby="missingCostsTitle"] h3 { font-size: 1rem; }
.field-help-dialog[aria-labelledby="missingCostsTitle"] label,
.field-help-dialog[aria-labelledby="missingCostsTitle"] button { font-size: .88rem; }


/* Keep unusually long imported references within the Sales History receipt column. */
#salesHistory .sales-history-single-row .sales-history-reference{
 min-width:0;
 max-width:100%;
 overflow:hidden;
 text-overflow:ellipsis;
 white-space:nowrap;
}


/* Final polish: keep Inventory Movement History reasons readable via horizontal table scrolling. */
.inventory-movement-table th:last-child,
.inventory-movement-table td:last-child{white-space:nowrap}

/* Give the Business Profile Remove Logo action breathing room. */
#businessProfileForm #removeBusinessLogo{margin-top:var(--space-md, .75rem)}


/* iPhone review: keep numbered Help Center instructions and their markers inside the card. */
.help-article ol{box-sizing:border-box;max-width:100%;padding-left:2.25rem;margin-left:0;margin-right:0;list-style-position:outside}
.help-article ol li{padding-left:.25rem;overflow-wrap:break-word}
@media(max-width:600px){.help-article ol{padding-left:2rem}.help-article{min-width:0}}

/* Friendly empty-state copy should be visually distinct from labels and instructions. */
.dashboard-caught-up,.empty{font-style:italic}


/* Follow-up: place Help Center step numbers inside the content box, never in the clipped margin. */
#helpCenter .help-article ol,
.help-guides .help-article ol,
.help-article[data-help-article] ol{list-style-position:inside!important;padding:0!important;margin:1rem 0!important;width:100%;max-width:100%;box-sizing:border-box}
.help-article[data-help-article] ol>li{display:list-item;list-style-type:decimal;list-style-position:inside;padding:0!important;margin:.75rem 0!important;overflow-wrap:anywhere;white-space:normal}

/* The Order Preparation question is body copy, not a second bold heading. */
#businessProfileForm .preparation-settings fieldset.preparation-choice legend{font-weight:400!important}
