/*
  Beyond the Line — UI Foundation v1
  BUILD-20260825-010

  HARD BOUNDARY
  ----------------
  This is the one visual system for every Beyond the Line page.
  Module styles may control module-specific layout and data visualisation only.
  They must not redefine brand typography, page headers, cards, controls,
  buttons, navigation language, shell spacing or base colours.
*/

:root{
  --btl-display:"Cormorant Garamond",Georgia,"Times New Roman",serif;
  --btl-ui:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --btl-figure:var(--btl-ui);

  --btl-ink:#26372f;
  --btl-ink-strong:#173126;
  --btl-muted:#68736c;
  --btl-muted-2:#7d8780;

  --btl-workspace:#edf1ec;
  --btl-paper:#faf9f6;
  --btl-card:#fffefb;
  --btl-card-soft:#f4f6f2;
  --btl-line:#d7ded4;
  --btl-line-strong:#bbc8b8;

  --btl-kitchen:#94a28e;
  --btl-kitchen-deep:#30473a;
  --btl-kitchen-soft:#eaf0e9;
  --btl-bar:#61786a;
  --btl-bar-deep:#253c31;
  --btl-bar-soft:#e8efea;
  --btl-floor:#5d7886;

  --btl-red:#8e1f2f;
  --btl-red-soft:#fff2f2;
  --btl-amber:#a86712;
  --btl-amber-soft:#fff8ed;
  --btl-green:#356b48;
  --btl-green-soft:#edf7ee;

  --btl-radius:16px;
  --btl-radius-sm:10px;
  --btl-radius-pill:999px;
  --btl-control-h:46px;
  --btl-shadow:0 5px 16px rgba(38,55,47,.05);
  --btl-shadow-shell:0 18px 50px rgba(38,55,47,.10);
  --btl-sidebar:244px;
  --btl-page-max:1500px;
}

/* ---------- Base ---------- */
*,*::before,*::after{box-sizing:border-box}
html{min-height:100%;background:var(--btl-workspace);font-family:var(--btl-ui);color:var(--btl-ink);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
body{min-height:100vh;margin:0;background:var(--btl-workspace);color:var(--btl-ink);font-family:var(--btl-ui);line-height:1.45}
button,input,select,textarea,a{font-family:var(--btl-ui)}
button,input,select,textarea{font:inherit}
a{color:inherit}

/* Brand/display typography has one job everywhere. */
:is(
  .topbar h1,
  .topbar h2,
  .btl-kiss-head h1,
  .btl-kiss-head h2,
  .btl-kiss-card span strong,
  .admin-status-card h2,
  .maintenance-topbar h1,
  .maintenance-topbar h2,
  .pest-topbar h1,
  .pest-topbar h2,
  .btl-stock-topbar h1,
  .btl-stock-topbar h2,
  .btl-sm-top h1,
  .btl-sm-top h2,
  .btl-po-top h1,
  .btl-po-top h2,
  .btl-rx-top h1,
  .btl-rx-top h2,
  .btl-prep-card>header b,
  .btl-inv-title,
  .btl-inv-head h1,
  .btl-inv-head h2,
  .lead-brand-line>span,
  .lead-brand-line h1,
  .lead-section-head h2,
  .lead-operation-card h3,
  .lead-nav-brand strong,
  .foh-brand-line>span,
  .foh-brand-line h1,
  .foh-intro h2,
  .foh-section-head h2,
  .foh-card strong,
  .foh-nav-brand strong,
  .bar-brand-line>span,
  .bar-brand-line h1,
  .bar-location-head h2,
  .bar-nav-brand strong,
  .schedule-brand-line>span,
  .schedule-brand-line h1,
  .schedule-week-title h2,
  .schedule-card-head h3,
  .schedule-nav-brand strong,
  .wf-brand-line>span,
  .wf-brand-line h1,
  .wf-page-head h2,
  .wf-card-head h3,
  .wf-nav-brand strong,
  .shared-kitchen-brand strong,
  body.btl-message-centre h1,
  body.btl-message-centre h2,
  body.btl-message-centre h3,
  .auth-card h1,
  .desktop-brand strong
){font-family:var(--btl-display)!important;font-weight:700!important;letter-spacing:-.015em}

:is(.lead-brand-line>span,.foh-brand-line>span,.bar-brand-line>span,.schedule-brand-line>span,.wf-brand-line>span,.lead-nav-brand strong,.foh-nav-brand strong,.bar-nav-brand strong,.schedule-nav-brand strong,.wf-nav-brand strong,.shared-kitchen-brand strong,.desktop-brand strong){letter-spacing:.14em!important}

/* Small operational copy always stays clean and sans-serif. */
:is(label,small,.eyebrow,.subhead,.meta,.btl-kiss-kicker,.btl-kiss-group-label,.lead-section-head span,.lead-panel-head span,.foh-kicker,.foh-section-head span,.bar-kicker,.schedule-week-title span,.wf-card-head span){font-family:var(--btl-ui)!important}


/* ---------- Figure/data typography hard boundary ----------
   Figures are operational data, never display typography.
   Dollars, percentages, counts, temperatures, quantities, rates, hours,
   costs, GP and totals use Inter with lining/tabular numerals everywhere. */
:is(
  .lead-money-grid strong,
  .lead-panel .lead-value,
  .btl-owner-kpis article strong,
  .btl-owner-bar-row strong,
  .btl-head-cost-kpi strong,
  #btl-food-sales-card .btl-sales-stat strong,
  #btl-food-sales-card .btl-sales-input-wrap b,
  #btl-food-sales-card input,
  .btl-inv-metrics strong,
  .btl-inv-clean-count,
  .btl-prep-stats b,
  .btl-prep-numbers b,
  .btl-prep-qty,
  .btl-rx-stat strong,.btl-rx-stat b,
  .btl-rx-cost-preview strong,.btl-rx-cost-preview b,
  .btl-stock-count,.btl-stock-price,
  .schedule-stat strong,.schedule-personal-total,.schedule-roster-total,.schedule-shift-cost,
  .wf-stat strong,.wf-guide strong,.wf-award-rates b,
  .bar-stat strong,.bar-value,
  .management-report-hero strong,
  .management-metric-grid article strong,
  .management-attention-grid article strong,
  .management-exception-list article strong,
  .management-staff-total>b,.management-staff-breakdown b,
  .btl-mr-summary strong,.btl-mr-waste-costs strong,
  .waste-report-hero strong,.waste-report-metrics strong,
  .waste-breakdown-list article>b,.daily-waste-list article>b,
  .mini-metrics b,
  .metric-card strong,
  .summary-value,.holding-value,.total-value,.product-total .number,
  .number,.currency,.money-input,.money-input input,
  [data-btl-figure]
){
  font-family:var(--btl-figure)!important;
  font-variant-numeric:lining-nums tabular-nums!important;
  font-feature-settings:"lnum" 1,"tnum" 1!important;
  letter-spacing:0!important;
}

/* ---------- One page canvas ---------- */
:is(
  .app-shell,
  .maintenance-shell,
  .pest-shell,
  .btl-stock-shell,
  .btl-sm-shell,
  .btl-po-shell,
  .btl-rx-shell,
  .btl-inv-page,
  .btl-prep-card,
  .shared-kitchen-shell,
  .lead-shell,
  .foh-shell,
  .bar-shell,
  .schedule-shell,
  .wf-shell
){background:var(--btl-paper)!important;color:var(--btl-ink)!important}

:is(.maintenance-overlay,.pest-overlay,#btl-stock-management-overlay,#btl-stocktake-overlay,#btl-purchasing-overlay,#btl-recipe-overlay,#btl-invoice-root,#btl-prep-overlay,#btl-kiss-admin){background:var(--btl-workspace)!important;color:var(--btl-ink)!important}

/* ---------- One header language ---------- */
:is(
  .topbar,
  body.btl-kiss-home .topbar,
  .maintenance-topbar,
  .pest-topbar,
  .btl-stock-topbar,
  .btl-sm-top,
  .btl-po-top,
  .btl-rx-top,
  .btl-prep-card>header,
  .lead-top,
  .schedule-top,
  .wf-top
){background:var(--btl-kitchen)!important;color:var(--btl-ink-strong)!important;border:0!important;box-shadow:none!important}

/* Bar/FOH gets the same header, only a different department colour. */
:is(body.btl-foh-bar-page .foh-top,body.btl-bar-cleaning-page .bar-top){background:var(--btl-bar)!important;color:#fff!important}

:is(
  .topbar,
  body.btl-kiss-home .topbar,
  .maintenance-topbar,
  .pest-topbar,
  .btl-stock-topbar,
  .btl-sm-top,
  .btl-po-top,
  .btl-rx-top,
  .btl-prep-card>header
){padding-top:20px!important;padding-bottom:18px!important}

:is(
  .topbar h1,
  .maintenance-topbar h1,
  .pest-topbar h1,
  .btl-stock-topbar h1,
  .btl-sm-top h1,
  .btl-po-top h1,
  .btl-rx-top h1,
  .lead-brand-line h1,
  .foh-brand-line h1,
  .bar-brand-line h1,
  .schedule-brand-line h1,
  .wf-brand-line h1
){font-size:34px!important;line-height:1!important;margin-top:7px!important;margin-bottom:2px!important;color:inherit!important}

:is(
  .topbar .eyebrow,
  .topbar .subhead,
  .maintenance-topbar p,
  .pest-topbar p,
  .btl-stock-topbar p,
  .btl-sm-top p,
  .btl-po-top p,
  .btl-rx-top p,
  .lead-brand-line>small,
  .foh-brand-line>small,
  .bar-brand-line>small,
  .schedule-brand-line>small,
  .wf-brand-line>small
){color:inherit!important;opacity:.78!important}

/* White text only on the darker Bar/FOH header. */
:is(body.btl-foh-bar-page .foh-top,body.btl-bar-cleaning-page .bar-top) :is(h1,h2,h3,p,span,small,strong,b){color:#fff!important}

/* Every brand header gets the same red rule. */
:is(.lead-brand-line>i,.foh-brand-line>i,.bar-brand-line>i,.schedule-brand-line>i,.wf-brand-line>i){width:156px!important;height:2px!important;margin:8px 0!important;background:var(--btl-red)!important}

/* ---------- One dashboard / role-home language ---------- */
body.btl-kiss-home{background:var(--btl-workspace)!important}
body.btl-kiss-home .app-shell{background:var(--btl-paper)!important}
.btl-kiss-head{margin-bottom:14px!important;padding-bottom:14px!important;border-bottom:1px solid var(--btl-line)!important}
.btl-kiss-head h1,.btl-kiss-head h2{font-size:32px!important;line-height:1.02!important;margin:0!important;color:var(--btl-ink-strong)!important}
.btl-kiss-head p{margin-top:5px!important;color:var(--btl-muted)!important}

.btl-kiss-role-switch,.home-view-picker nav,.round-picker,.record-tab-picker,.food-mode-picker{gap:5px!important;padding:4px!important;border:1px solid var(--btl-line)!important;border-radius:12px!important;background:#eef1ec!important}
.btl-kiss-role-switch button,.home-view-picker nav button,.round-picker button,.record-tab-picker button,.food-mode-picker button{min-height:38px!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#5e6a63!important;font-size:10px!important;font-weight:800!important;box-shadow:none!important}
.btl-kiss-role-switch button.active,.home-view-picker nav button.active,.round-picker button.active,.record-tab-picker button.active,.food-mode-picker button.active{background:#fff!important;color:var(--btl-kitchen-deep)!important;box-shadow:0 3px 10px rgba(35,52,41,.08)!important}

.btl-kiss-grid{gap:10px!important}
.btl-kiss-card{min-height:112px!important;padding:14px!important;border:1px solid var(--btl-line)!important;border-radius:var(--btl-radius)!important;background:var(--btl-card)!important;color:var(--btl-ink)!important;box-shadow:var(--btl-shadow)!important}
.btl-kiss-card>i{width:36px!important;height:36px!important;margin-bottom:9px!important;border-radius:10px!important;background:var(--btl-kitchen-soft)!important;color:var(--btl-kitchen-deep)!important}
.btl-kiss-card span strong{font-size:20px!important;line-height:1.05!important;color:var(--btl-kitchen-deep)!important;text-transform:none!important}
.btl-kiss-card span small{margin-top:4px!important;color:var(--btl-muted)!important;font-size:10px!important;line-height:1.35!important}
.btl-kiss-card>b{margin-top:auto!important;padding-top:9px!important;color:var(--btl-kitchen-deep)!important;font-size:9px!important;letter-spacing:.07em!important}
.btl-kiss-card.wide{min-height:90px!important;display:grid!important;grid-template-columns:36px 1fr auto!important;align-items:center!important;gap:12px!important;background:var(--btl-card)!important;color:var(--btl-ink)!important;border-color:var(--btl-line)!important}
.btl-kiss-card.wide>i{margin:0!important}
.btl-kiss-card.wide span small,.btl-kiss-card.wide>b{color:var(--btl-muted)!important}

.btl-kiss-attention{border:1px solid #e3c38e!important;border-radius:var(--btl-radius)!important;background:var(--btl-amber-soft)!important;box-shadow:none!important}
.btl-kiss-attention.clear{border-color:#bdd4c3!important;background:var(--btl-green-soft)!important}
.btl-kiss-attention>div button{border-radius:var(--btl-radius-sm)!important;border-color:rgba(38,55,47,.08)!important}

/* Admin is not a separate purple product. */
#btl-kiss-admin .btl-kiss-admin-shell{background:var(--btl-paper)!important;color:var(--btl-ink)!important}
.admin-status-card,.admin-status-card.danger{background:var(--btl-kitchen)!important;color:var(--btl-ink-strong)!important;border:0!important;border-radius:var(--btl-radius)!important;box-shadow:none!important}
.admin-status-card :is(h2,p,span,strong,small){color:inherit!important}
.admin-health-grid article{border:1px solid var(--btl-line)!important;border-radius:var(--btl-radius)!important;background:var(--btl-card)!important;box-shadow:var(--btl-shadow)!important}

/* ---------- Cards / panels ---------- */
:is(
  .form-card,.tool-card,.metric-card,.dashboard-card,.status-card,.section-card,.summary-card,.weekly-card,.handover-card,.record-card,.sales-card,.head-chef-card,.owner-status-card,.management-waste-card,.spreadsheet-export-card,
  .maintenance-form,.maintenance-status,.maintenance-record,.maintenance-photo-card,
  .pest-form,.pest-status,.pest-record,.pest-photo-card,
  .btl-sm-card,.btl-sm-chart-card,.btl-sm-movers,.btl-sm-live-head,.btl-sm-table-wrap,.btl-sm-row,
  .btl-stock-status,.btl-stock-export,.btl-stock-new-item,.btl-stock-card,.btl-stock-row,.btl-stock-start,.btl-stock-final,
  .btl-po-card,.btl-po-supplier,.btl-po-section,.btl-po-add-supplier,
  .btl-rx-summary,.btl-rx-row,.btl-rx-cost-preview,.btl-rx-editor,.btl-rx-card,
  .btl-inv-card,.btl-inv-summary-box,.btl-inv-match-box,.btl-inv-review-strip,.btl-invoice-card,.btl-invoice-intelligence-card,
  .btl-prep-group,.btl-prep-add,.btl-prep-card article,
  #btl-food-sales-card,.btl-mr-summary,.btl-mr-waste-costs,
  .lead-money-grid article,.lead-panel,.lead-operation-card,
  .foh-card,.foh-vm-card,
  .bar-stat,.bar-banner,.bar-location,.bar-card,
  .schedule-loading,.schedule-error,.schedule-status-line,.schedule-stat,.schedule-day,.schedule-section-card,.schedule-my-card,.schedule-roster-board,.allocation-section,
  .wf-loading,.wf-error,.wf-stat,.wf-card,.wf-action,.wf-select-person,.wf-task,.wf-table-wrap,.wf-award-state,
  body.btl-message-centre main
){border:1px solid var(--btl-line)!important;border-radius:var(--btl-radius)!important;background:var(--btl-card)!important;color:var(--btl-ink)!important;box-shadow:var(--btl-shadow)!important}

:is(.tool-card,.btl-kiss-card,.lead-operation-card,.foh-card) strong{color:var(--btl-kitchen-deep)}
body.btl-foh-bar-page .foh-card strong,body.btl-bar-cleaning-page :is(.bar-card,.bar-location) strong{color:var(--btl-bar-deep)!important}

/* ---------- Inputs ---------- */
:is(
  .app-shell,.maintenance-shell,.pest-shell,.btl-stock-shell,.btl-sm-shell,.btl-po-shell,.btl-rx-shell,.btl-inv-page,.btl-prep-card,.shared-kitchen-shell,.schedule-shell,.wf-shell,.bar-shell,body.btl-message-centre main
) :is(input,select,textarea){min-height:var(--btl-control-h)!important;border:1px solid #c8d0cb!important;border-radius:var(--btl-radius-sm)!important;background:#fff!important;color:var(--btl-ink)!important;box-shadow:none!important;font-size:15px!important}

:is(
  .app-shell,.maintenance-shell,.pest-shell,.btl-stock-shell,.btl-sm-shell,.btl-po-shell,.btl-rx-shell,.btl-inv-page,.btl-prep-card,.shared-kitchen-shell,.schedule-shell,.wf-shell,.bar-shell,body.btl-message-centre main
) :is(input,select,textarea):focus{outline:0!important;border-color:var(--btl-kitchen-deep)!important;box-shadow:0 0 0 3px rgba(48,71,58,.12)!important}

textarea{resize:vertical}

/* ---------- Buttons ---------- */
:is(
  .primary-button,.maintenance-submit,.maintenance-followup-button,.pest-submit,.btl-sm-primary,.btl-stock-actions .primary,.btl-stock-start button,.btl-stock-final button,.btl-po-btn:not(.secondary),.btl-po-add button,.btl-rx-primary,.btl-rx-actions .primary,.btl-prep-save,.btl-prep-submit,.shared-primary,#btl-message-ack,.btl-mr-actions button,
  .schedule-action-buttons button.primary,.schedule-workforce-link>a,.allocation-unallocated article button,.wf-submit,.wf-button:not(.secondary):not(.warning):not(.danger),body.btl-message-centre .primary
){min-height:var(--btl-control-h)!important;border:1px solid var(--btl-kitchen-deep)!important;border-radius:var(--btl-radius-sm)!important;background:var(--btl-kitchen-deep)!important;color:#fff!important;font-size:10px!important;font-weight:800!important;letter-spacing:.04em!important;box-shadow:none!important}

:is(.secondary-button,.maintenance-cancel,.btl-po-btn.secondary,.btl-rx-secondary,.wf-button.secondary,body.btl-message-centre .secondary){min-height:var(--btl-control-h)!important;border:1px solid var(--btl-line-strong)!important;border-radius:var(--btl-radius-sm)!important;background:#fff!important;color:var(--btl-kitchen-deep)!important;font-size:10px!important;font-weight:800!important;box-shadow:none!important}

/* Bar action buttons use the Bar colour, same component. */
body.btl-bar-cleaning-page :is(.bar-primary,.bar-filter.active,.bar-area-tab.active){background:var(--btl-bar-deep)!important;border-color:var(--btl-bar-deep)!important;color:#fff!important}

/* Back navigation is a first-class shared component. Every module opts into the same
   markup class instead of inheriting a page-specific arrow treatment. */
.btl-back-nav{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:10px!important;
  min-height:54px!important;min-width:150px!important;padding:0 20px!important;
  border:1px solid rgba(38,55,47,.22)!important;border-radius:12px!important;
  background:rgba(255,255,255,.92)!important;color:var(--btl-kitchen-deep)!important;
  font-family:var(--btl-ui)!important;font-size:12px!important;font-weight:850!important;letter-spacing:.035em!important;
  line-height:1!important;text-decoration:none!important;box-shadow:0 2px 8px rgba(35,52,41,.06)!important;
  cursor:pointer!important;touch-action:manipulation!important;-webkit-tap-highlight-color:transparent!important;
  white-space:nowrap!important;width:auto!important;height:auto!important
}
.btl-back-nav:hover{background:#fff!important;border-color:rgba(38,55,47,.34)!important}
.btl-back-nav:focus-visible{outline:3px solid rgba(142,31,47,.22)!important;outline-offset:2px!important}
body.btl-foh-bar-page .btl-back-nav,body.btl-bar-cleaning-page .btl-back-nav{
  background:rgba(255,255,255,.92)!important;color:var(--btl-bar-deep)!important;border-color:rgba(255,255,255,.55)!important
}
@media(max-width:520px){.btl-back-nav{min-height:56px!important;min-width:0!important;padding:0 18px!important;font-size:12px!important}}

/* ---------- Tabs / segmented switches ---------- */
:is(
  .btl-po-tabs,.btl-inv-tabs,.btl-inv-review-tabs,.btl-line-review-tabs,.btl-waste-tabs,.btl-sm-range,.bar-tabs,
  .schedule-tabs,.schedule-group-switch,.schedule-period-switch,.schedule-range-switch,.schedule-roster-view-switch,.wf-tabs
){display:flex!important;gap:5px!important;padding:4px!important;border:1px solid var(--btl-line)!important;border-radius:12px!important;background:#edf1ec!important;box-shadow:none!important}

:is(
  .btl-po-tabs,.btl-inv-tabs,.btl-inv-review-tabs,.btl-line-review-tabs,.btl-waste-tabs,.btl-sm-range,.bar-tabs,
  .schedule-tabs,.schedule-group-switch,.schedule-period-switch,.schedule-range-switch,.schedule-roster-view-switch,.wf-tabs
) button{min-height:38px!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#5f6f64!important;font-size:10px!important;font-weight:800!important;box-shadow:none!important}

:is(
  .btl-po-tabs,.btl-inv-tabs,.btl-inv-review-tabs,.btl-line-review-tabs,.btl-waste-tabs,.btl-sm-range,.bar-tabs,
  .schedule-tabs,.schedule-group-switch,.schedule-period-switch,.schedule-range-switch,.schedule-roster-view-switch,.wf-tabs
) button.active{background:#fff!important;color:var(--btl-ink)!important;box-shadow:0 3px 10px rgba(35,52,41,.08)!important}

/* ---------- Leadership main dashboard ---------- */
.lead-shell{padding-bottom:30px!important}
.lead-top{color:var(--btl-ink-strong)!important}
.lead-person{min-width:210px!important;padding:11px 13px!important;border:1px solid rgba(38,55,47,.18)!important;border-radius:var(--btl-radius-sm)!important;background:rgba(255,255,255,.32)!important}
.lead-section{padding-top:20px!important}
.lead-section-head{margin-bottom:9px!important}
.lead-section-head h2{font-size:27px!important;line-height:1!important}
.lead-operation-grid{gap:10px!important}
.lead-operation-card{min-height:108px!important;padding:15px!important}
.lead-operation-card h3{margin:4px 0 0!important;font-size:23px!important;line-height:1.02!important}
.lead-operation-card b{padding-top:10px!important}
.lead-operation-card.kitchen{border-left:4px solid var(--btl-kitchen)!important}
.lead-operation-card.foh{border-left:4px solid var(--btl-bar)!important}
.lead-money-grid{gap:10px!important}
.lead-money-grid article{padding:14px!important}
.lead-money-grid strong{font-size:27px!important;margin:4px 0 2px!important}
.lead-finance-lower{gap:10px!important;margin-top:10px!important}
.lead-panel{padding:14px!important}

/* ---------- FOH / Bar ---------- */
body.btl-foh-bar-page,body.btl-bar-cleaning-page{--btl-dept:var(--btl-bar);--btl-dept-deep:var(--btl-bar-deep);--btl-dept-soft:var(--btl-bar-soft)}
.foh-intro{padding-top:16px!important}
.foh-section{margin-top:18px!important}
.foh-section-head h2{font-size:25px!important;line-height:1!important;color:var(--btl-bar-deep)!important}
.foh-grid{gap:10px!important}
.foh-card{min-height:112px!important;padding:14px!important}
.foh-card .foh-icon{width:36px!important;height:36px!important;margin-bottom:9px!important;border-radius:10px!important;background:var(--btl-bar-soft)!important;color:var(--btl-bar-deep)!important}
.foh-card strong{font-size:20px!important;line-height:1.05!important;text-transform:none!important}
.foh-card>b{color:var(--btl-bar-deep)!important}

/* ---------- Standalone Scheduling / Workforce ---------- */
.schedule-shell,.wf-shell{background:var(--btl-paper)!important}
.schedule-brand-line h1,.wf-brand-line h1{font-size:34px!important}
.schedule-week-title h2,.wf-page-head h2{font-size:27px!important;line-height:1.02!important}
.schedule-tabs,.wf-tabs{margin-bottom:14px!important}
.schedule-stat,.wf-stat{padding:13px!important}
.schedule-day,.schedule-section-card,.schedule-roster-board,.wf-card{box-shadow:var(--btl-shadow)!important}
.schedule-day-head{background:var(--btl-card-soft)!important}
.schedule-action-buttons button,.schedule-area-filter button,.schedule-week-nav button,.wf-week-nav button,.wf-table-actions button{border-radius:var(--btl-radius-sm)!important}

/* ---------- Message Centre ---------- */
body.btl-message-centre{padding:18px;background:var(--btl-workspace)!important}
body.btl-message-centre main{max-width:900px!important;min-height:calc(100vh - 36px)!important;margin:0 auto!important;padding:20px!important}
body.btl-message-centre h1{font-size:34px!important;line-height:1!important;margin:16px 0 18px!important;color:var(--btl-ink-strong)!important}
body.btl-message-centre .row{border-top:1px solid var(--btl-line)!important}
body.btl-message-centre .checks{border-color:var(--btl-line)!important;border-radius:var(--btl-radius-sm)!important}

/* ---------- Shared Kitchen iPad ---------- */
.shared-kitchen-shell{max-width:980px!important;margin:0 auto!important}
.shared-kitchen-brand{background:var(--btl-kitchen)!important;color:var(--btl-ink-strong)!important;border-radius:0!important}
.shared-kitchen-brand i{background:#fff!important;color:var(--btl-kitchen-deep)!important}
.shared-kitchen-brand strong{color:var(--btl-ink-strong)!important;font-size:22px!important}

/* ---------- Desktop sidebars use one geometry ---------- */
@media(min-width:900px){
  :is(.lead-desktop-nav,.foh-desktop-nav,.bar-desktop-nav,.schedule-desktop-nav,.wf-desktop-nav,#btl-desktop-nav){width:var(--btl-sidebar)!important;background:#aab9aa!important;color:var(--btl-ink)!important;box-shadow:6px 0 22px rgba(38,55,47,.07)!important}
  :is(.lead-desktop-nav,.foh-desktop-nav,.bar-desktop-nav,.schedule-desktop-nav,.wf-desktop-nav) nav a{min-height:36px!important;border-radius:9px!important;color:var(--btl-kitchen-deep)!important;font-size:10px!important;font-weight:750!important}
  :is(.lead-desktop-nav,.foh-desktop-nav,.bar-desktop-nav,.schedule-desktop-nav,.wf-desktop-nav) nav a.active{background:rgba(38,55,47,.09)!important;box-shadow:inset 3px 0 0 var(--btl-red)!important}
  :is(.lead-nav-brand,.foh-nav-brand,.bar-nav-brand,.schedule-nav-brand,.wf-nav-brand) strong{font-size:18px!important}
  :is(.lead-shell,.foh-shell,.bar-shell,.schedule-shell,.wf-shell){width:auto!important;max-width:var(--btl-page-max)!important;min-height:calc(100vh - 40px)!important;margin:20px 20px 20px 264px!important;border-radius:24px!important;overflow:hidden!important;box-shadow:var(--btl-shadow-shell)!important}
}

/* ---------- Mobile ---------- */
@media(max-width:700px){
  :is(.lead-top,.foh-top,.bar-top,.schedule-top,.wf-top){flex-direction:column!important;gap:14px!important}
  :is(.lead-person,.foh-top-actions,.schedule-top-actions,.wf-top-actions){width:100%!important}
  :is(.schedule-top-actions,.wf-top-actions){justify-content:stretch!important}
  :is(.schedule-top-actions a,.wf-top-actions a){flex:1!important}
  :is(.topbar h1,.maintenance-topbar h1,.pest-topbar h1,.btl-stock-topbar h1,.btl-sm-top h1,.btl-po-top h1,.btl-rx-top h1,.lead-brand-line h1,.foh-brand-line h1,.bar-brand-line h1,.schedule-brand-line h1,.wf-brand-line h1){font-size:30px!important}
  .lead-money-grid{grid-template-columns:1fr!important}
  .lead-operation-grid{grid-template-columns:1fr!important}
  body.btl-message-centre{padding:0!important}
  body.btl-message-centre main{min-height:100vh!important;border-radius:0!important}
}

@media(max-width:520px){
  .foh-grid{grid-template-columns:1fr!important}
  .btl-kiss-card span strong,.foh-card strong{font-size:19px!important}
}

/* ---------- Print / audit PDFs should not manufacture blank pages ---------- */
@media print{
  html,body{background:#fff!important}
  :is(.app-shell,.lead-shell,.foh-shell,.bar-shell,.schedule-shell,.wf-shell,.shared-kitchen-shell,.btl-prep-card){min-height:auto!important;box-shadow:none!important;margin:0!important;border-radius:0!important}
  :is(.lead-desktop-nav,.foh-desktop-nav,.bar-desktop-nav,.schedule-desktop-nav,.wf-desktop-nav,#btl-desktop-nav){display:none!important}
  :is(.lead-shell,.foh-shell,.bar-shell,.schedule-shell,.wf-shell){max-width:none!important;width:100%!important}
}

/* ---------- Foundation hardening: every screen obeys the same hierarchy ---------- */
:is(
  .app-shell,
  .maintenance-shell,
  .pest-shell,
  .btl-stock-shell,
  .btl-sm-shell,
  .btl-po-shell,
  .btl-rx-shell,
  .btl-inv-page,
  .btl-prep-card,
  .shared-kitchen-shell,
  .lead-shell,
  .foh-shell,
  .bar-shell,
  .schedule-shell,
  .wf-shell,
  body.btl-message-centre main
) :is(h1,h2,h3){font-family:var(--btl-display)!important;font-weight:700!important;letter-spacing:-.015em!important;color:var(--btl-ink-strong)}

/* Operational labels/data stay in the interface face. */
:is(
  .app-shell,
  .maintenance-shell,
  .pest-shell,
  .btl-stock-shell,
  .btl-sm-shell,
  .btl-po-shell,
  .btl-rx-shell,
  .btl-inv-page,
  .btl-prep-card,
  .shared-kitchen-shell,
  .lead-shell,
  .foh-shell,
  .bar-shell,
  .schedule-shell,
  .wf-shell,
  body.btl-message-centre main
) :is(button,input,select,textarea,label,small,table,th,td){font-family:var(--btl-ui)!important}

/* Common legacy card titles which are rendered as strong/b rather than headings. */
:is(
  .tool-card,.form-card,.section-card,.summary-card,.weekly-card,.handover-card,.record-card,.sales-card,
  .maintenance-form,.maintenance-status,.maintenance-record,.pest-form,.pest-status,.pest-record,
  .btl-stock-card,.btl-stock-row,.btl-sm-card,.btl-sm-row,.btl-po-card,.btl-po-supplier,.btl-rx-card,.btl-rx-row,
  .btl-inv-card,.btl-invoice-card,.btl-prep-group,.btl-prep-card article,
  .schedule-day,.schedule-section-card,.schedule-my-card,.schedule-roster-board,
  .wf-card,.wf-action,.wf-task,.bar-card,.bar-location,.foh-card,.lead-operation-card
) > :is(strong,b),
:is(
  .tool-card,.form-card,.section-card,.summary-card,.weekly-card,.handover-card,.record-card,.sales-card,
  .maintenance-form,.maintenance-status,.maintenance-record,.pest-form,.pest-status,.pest-record,
  .btl-stock-card,.btl-stock-row,.btl-sm-card,.btl-sm-row,.btl-po-card,.btl-po-supplier,.btl-rx-card,.btl-rx-row,
  .btl-inv-card,.btl-invoice-card,.btl-prep-group,.btl-prep-card article,
  .schedule-day,.schedule-section-card,.schedule-my-card,.schedule-roster-board,
  .wf-card,.wf-action,.wf-task,.bar-card,.bar-location,.foh-card,.lead-operation-card
) :is(.title,.card-title,.section-title){font-family:var(--btl-display)!important;font-weight:700!important}

/* Functional scroll ownership preserved from the production baseline. */
html.btl-page-scroll-locked,body.btl-page-scroll-locked{overflow:hidden!important;overscroll-behavior:none}
#btl-invoice-root.btl-parent-scroll-locked,#btl-stock-management-overlay.btl-parent-scroll-locked,.pest-overlay.btl-parent-scroll-locked,.maintenance-overlay.btl-parent-scroll-locked{overflow:hidden!important}
@media(min-width:1200px){#btl-desktop-nav nav{-ms-overflow-style:none;scrollbar-width:none}#btl-desktop-nav nav::-webkit-scrollbar{width:0;height:0;display:none}}

/* Toasts and transient feedback use the same status language. */
:is(.maintenance-toast,.pest-toast,.btl-po-toast,.btl-sm-toast,.btl-stock-toast,#btl-inv-toast){border:1px solid rgba(38,55,47,.14)!important;border-radius:var(--btl-radius-sm)!important;background:var(--btl-kitchen-deep)!important;color:#fff!important;box-shadow:0 8px 24px rgba(38,55,47,.16)!important}
:is(.maintenance-toast,.pest-toast,.btl-po-toast,.btl-sm-toast,.btl-stock-toast,#btl-inv-toast).error{background:#6f1d28!important;color:#fff!important}

/* Shared device and auth remain part of the same product, not separate skins. */
.auth-shell{background:var(--btl-workspace)!important}
.auth-card{border:1px solid var(--btl-line)!important;border-radius:24px!important;background:var(--btl-card)!important;color:var(--btl-ink)!important;box-shadow:var(--btl-shadow-shell)!important}
#btl-shared-toolbar{background:var(--btl-kitchen)!important;color:var(--btl-ink-strong)!important}
#btl-shared-toolbar button{border-radius:var(--btl-radius-sm)!important;background:#fff!important;color:var(--btl-kitchen-deep)!important}

/* Prevent module content from manufacturing a sideways 'different app' canvas. */
:is(.app-shell,.lead-shell,.foh-shell,.bar-shell,.schedule-shell,.wf-shell,.maintenance-shell,.pest-shell,.btl-stock-shell,.btl-sm-shell,.btl-po-shell,.btl-rx-shell,.btl-inv-page,.btl-prep-card,.shared-kitchen-shell){max-width:100%;overflow-wrap:anywhere}
:is(.app-shell,.lead-shell,.foh-shell,.bar-shell,.schedule-shell,.wf-shell,.maintenance-shell,.pest-shell,.btl-stock-shell,.btl-sm-shell,.btl-po-shell,.btl-rx-shell,.btl-inv-page,.btl-prep-card,.shared-kitchen-shell) :is(img,svg,canvas,table){max-width:100%}
