/* PART BURGER admin design system. Shared tokens and component rules, not customer CSS. */
@font-face{font-family:PBAdmin;src:url('./fonts/Tajawal-Regular.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:PBAdmin;src:url('./fonts/Tajawal-Medium.ttf') format('truetype');font-weight:500 600;font-display:swap}
@font-face{font-family:PBAdmin;src:url('./fonts/Tajawal-Bold.ttf') format('truetype');font-weight:700 900;font-display:swap}
:root{
 --space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-6:24px;--space-8:32px;--space-10:40px;--space-12:48px;
 --bg:#f7f3ed;--surface:#fffefa;--surface-soft:#f3f0ea;--surface-strong:#292724;
 --line:#e5dfd5;--line-strong:#cfc6b9;--yellow:#ffd338;--yellow-deep:#856500;
 --green:#187349;--green-soft:#eaf5ee;--red:#a52d40;--red-soft:#fbeef0;--orange:#916300;--orange-soft:#fff4d6;--blue:#265fa0;
 --text:#292622;--muted:#6e675e;--font:PBAdmin,'Segoe UI',Arial,sans-serif;
 --radius-sm:12px;--radius:16px;--radius-lg:24px;--shadow:0 2px 8px #36291605;
 --text-small:13px;--text-base:16px;--text-section:18px;--text-title:26px;--focus:0 0 0 3px #ffd33866;
 --nav-clearance:104px;--control-height:44px;
}
body{font:var(--text-base)/1.55 var(--font);letter-spacing:0}
button,input,select,textarea{font-family:var(--font)}
button{min-height:var(--control-height);padding:var(--space-2) var(--space-4);border-radius:var(--radius-sm);line-height:1.4;font-size:14px;font-weight:700;transition:background .16s ease,box-shadow .16s ease}
button:active{transform:none}button:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--text);outline-offset:3px}
input,select,textarea{min-height:var(--control-height);padding:var(--space-3);border-radius:var(--radius-sm);background:var(--surface);font-size:16px;border-color:var(--line-strong)}
input:focus,select:focus,textarea:focus{border-color:var(--yellow-deep);box-shadow:var(--focus)}
input[type=checkbox],input[type=radio]{width:20px;min-width:20px;min-height:20px;height:20px;accent-color:var(--yellow-deep);vertical-align:middle}
input[type=email],input[type=tel],input[type=url],input[type=date],input[type=time],input[type=number]{direction:ltr;text-align:start;unicode-bidi:plaintext}
input[aria-invalid=true],select[aria-invalid=true],textarea[aria-invalid=true]{border-color:var(--red)}
label{font-size:var(--text-small);line-height:1.5;gap:var(--space-2);color:var(--text);font-weight:500}
h1,h2,h3,h4{line-height:1.45;letter-spacing:0}h2,h3,h4{margin-block:0 var(--space-3)}
.card h2,.card h3{font-size:var(--text-section);margin-bottom:var(--space-4)}
.card,.menu-category-card,.inventory-category-card{padding:var(--space-4);border-radius:var(--radius);box-shadow:var(--shadow)}
.grid,.section.active,.performance-grid,.message-grid,.form-grid{gap:var(--space-4)}
.shell{width:min(1440px,100%);padding-bottom:var(--nav-clearance)}
.main{padding:0 var(--space-6) var(--space-8)}
.topbar{min-height:88px;margin-inline:calc(-1 * var(--space-6));margin-bottom:var(--space-6);padding:var(--space-4) var(--space-6);border-radius:0;background:var(--surface)}
.topbar h1{font-size:var(--text-title);line-height:1.4}.topbar-notification-button{width:44px;height:44px;bottom:20px;inset-inline-start:24px}
.overview-topbar-logo{max-height:48px}.topbar-notification-button span{font-size:11px;min-width:22px;height:22px}
.toolbar{gap:var(--space-3);margin-bottom:var(--space-4)}
.section-note,.pill{padding:var(--space-3);font-size:var(--text-small);line-height:1.65}
.metric,.metric-link{min-height:104px;text-align:start;gap:var(--space-2)}
.metric span{font-size:var(--text-small);line-height:1.4}.metric b{font-size:28px;text-align:start;line-height:1.2}
.metric-link:hover{border-color:var(--yellow-deep);box-shadow:var(--focus)}
.overview-scope{max-width:320px;margin-inline-start:auto}
#overview>.card:has(#posStatus){grid-column:1/-1}
.branch-status-card,.publish-card,.insight-card,.performance-risk{padding:var(--space-4);border-radius:var(--radius-sm)}
.branch-status-card,.performance-card{line-height:1.6}
.insight-label,.insight-card>small,.insight-ranking,.performance-head p,.analytics-title p,.analytics-summary span,.performance-stat-grid span{font-size:var(--text-small)}
.insight-card>b,.analytics-summary b{font-size:18px}.insight-card>b.insight-name{font-size:16px}
.insight-ranking>span{padding-block:var(--space-2);font-size:14px}
.overview-accordion,.settings-accordion{overflow:visible;border:1px solid var(--line);background:var(--surface);border-radius:var(--radius);padding:0}
.overview-accordion>summary,.settings-accordion>summary{padding:var(--space-4);font-size:17px;font-weight:700;min-height:56px;cursor:pointer}
.overview-accordion[open]>summary,.settings-accordion[open]>summary{border-bottom:1px solid var(--line);margin-bottom:var(--space-4)}
.overview-accordion>.card{border:0;box-shadow:none}.settings-accordion>div{padding:0 var(--space-4) var(--space-4)}
.analytics-head{gap:var(--space-4)}.analytics-head label{font-size:var(--text-small)}.analytics-head select{font-size:14px;min-height:44px}
.cash-forecast .forecast-metrics{gap:var(--space-3)}.cash-forecast .forecast-metrics>div{padding:var(--space-3);min-height:80px}.cash-forecast .forecast-metrics small{font-size:13px}.cash-forecast .forecast-metrics strong{font-size:23px}
.cash-forecast details{margin-block:var(--space-3)}.cash-forecast summary{padding-block:var(--space-3);cursor:pointer}
.table-wrap{max-width:100%;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface);scrollbar-width:thin}
th,td{padding:var(--space-3);height:48px;font-size:14px;line-height:1.5}
th{background:var(--surface-soft);color:var(--text);font-weight:700}
tbody tr:hover{background:#f7f3ed66}td input,td select{min-height:40px;font-size:14px}
.table-wrap button,td button{min-height:40px;font-size:13px;padding:var(--space-2) var(--space-3)}
.status-pill{font-size:13px;min-height:28px;padding:var(--space-1) var(--space-2);border-radius:8px}
.row-actions,.order-buttons{gap:var(--space-2)}.cost-empty{padding:var(--space-6);text-align:center;white-space:normal;color:var(--muted)}
.inventory-tool-list,.inventory-category-list{gap:var(--space-4)}.inventory-tool-details{padding:0}.inventory-tool-summary,.inventory-tool-launch{padding:var(--space-4);min-height:72px}
.inventory-tool-copy b{font-size:16px}.inventory-tool-copy small{font-size:13px;line-height:1.6}.inventory-tool-body{padding:var(--space-4);border-top:1px solid var(--line)}
.inventory-materials-head{gap:var(--space-4);margin-bottom:var(--space-4)}.inventory-materials-head p,.inventory-category-head small{font-size:13px;line-height:1.6}
.inventory-category-head{margin-bottom:var(--space-3)}.inventory-category-head h2{margin-bottom:var(--space-1)}
.inventory-material-button{font-size:15px!important;font-weight:700}.inventory-low{color:var(--red)}
.inventory-filters{display:grid;grid-template-columns:2fr 1fr 1fr;gap:var(--space-3);margin-bottom:var(--space-4)}
.inventory-results{font-size:13px;color:var(--muted);grid-column:1/-1;margin:0}
.inventory-category-actions{margin-bottom:var(--space-3);justify-content:flex-end}
.menu-section-list{gap:var(--space-4)}.menu-category-header{padding-bottom:var(--space-3);margin-bottom:var(--space-3);border-bottom:1px solid var(--line)}
.menu-category-header h3{font-size:18px}.menu-category-meta span{font-size:13px}.menu-category-meta button{min-width:44px;min-height:44px}
.menu-figma-toolbar{direction:inherit;gap:var(--space-3);margin-bottom:var(--space-4)}.menu-figma-toolbar button{direction:inherit}
.menu-figma-toolbar .menu-save-button,.menu-figma-toolbar .menu-toolbar-button{min-height:44px;font-size:14px;padding:var(--space-2) var(--space-4)}
.menu-category-table{width:100%;table-layout:fixed}.menu-figma-item td{padding:var(--space-2)}
.menu-figma-name input:not([type=hidden]),.menu-figma-price input{min-height:44px;font-size:16px;border:1px solid var(--line);background:var(--surface);padding:var(--space-2);border-radius:var(--radius-sm)}
.menu-figma-price{width:116px}.menu-figma-price input{width:80px}.menu-figma-price span{font-size:13px}
.menu-figma-color{width:56px}.menu-figma-color input[type=color]{width:40px!important;height:40px;min-height:40px;border:1px solid var(--line);padding:4px;border-radius:12px}
.menu-figma-controls{width:260px}.menu-controls-inner{gap:var(--space-2);justify-content:flex-end;flex-wrap:wrap}
.menu-figma-controls button{width:auto;min-width:44px;min-height:44px;height:auto;padding:var(--space-2);font-size:13px}.menu-figma-controls button svg{width:20px;height:20px}
.cost-accordion{gap:var(--space-4)}.cost-group{border-radius:var(--radius);overflow:hidden}.cost-group-head{padding:var(--space-4);min-height:72px}.cost-group-title b{font-size:17px}.cost-group-title small{font-size:13px}.cost-group-body{padding:var(--space-4)}
.cost-section-toolbar{gap:var(--space-3);margin-bottom:var(--space-4)}.cost-section-toolbar p,.costs-intro p,.barcode-launch-card p{font-size:14px;line-height:1.7}
.costs-intro p,.costs-intro small{color:#e1dad1}.costs-intro small{font-size:13px}
#branchManager{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-4)}#branchManager>form{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-4)}#branchManager>form h3,#branchManager>p{grid-column:1/-1}#branchManager article button{margin-inline-end:var(--space-2);margin-block-start:var(--space-2)}
#marketingForm{display:grid;gap:var(--space-4);max-width:800px}#marketingForm>p{margin:0;font-size:14px}
dialog{font-family:var(--font);color:var(--text);background:var(--surface);border-color:var(--line);overscroll-behavior:contain}
dialog::backdrop{background:#201c1859;backdrop-filter:blur(3px)}
.fleet-form-dialog,.owner-login-dialog{padding:var(--space-6);border:1px solid var(--line);border-radius:var(--radius-lg)}
.fleet-form-dialog header{gap:var(--space-4);margin-bottom:var(--space-6)}
.fleet-form-dialog [data-cancel],.offer-studio [data-close],.fleet-form-dialog [data-close],#customer-editor [data-ce=cancel]{background:var(--surface);color:var(--text);border:1px solid var(--line-strong)}
.fleet-fields,.fleet-content,.os-body,.os-form,.os-grid{gap:var(--space-4)}.fleet-content{padding:var(--space-6)}.fleet-tabs{gap:var(--space-2);margin-bottom:var(--space-2)}
.fleet-tabs button{background:var(--surface);color:var(--text);border-color:var(--line)}.fleet-tabs button.selected{background:var(--yellow);border-color:var(--yellow)}
.os-card,.os-component{border-radius:var(--radius);border-color:var(--line);padding:var(--space-4)}.os-head{gap:var(--space-3);padding:var(--space-4)}
.os-catalog button{min-width:0;font-size:14px}.os-catalog button img{border-radius:var(--radius-sm)}.os-choices{gap:var(--space-2);flex-wrap:wrap}.os-error{color:var(--red);font-size:14px}
.detail-header,.recipe-header,.inventory-count-header,.barcode-scanner-header{padding:var(--space-4);gap:var(--space-3);background:var(--surface)}
.detail-header h2,.recipe-header h2,.inventory-count-header h2,.barcode-scanner-header h2{font-size:20px}
.detail-body,.recipe-body,.inventory-count-body,.material-price-content{padding:var(--space-4)}
.detail-header p,.inventory-count-header p,.barcode-scanner-header small{font-size:13px}
.detail-panel,.recipe-panel,.inventory-count-panel,.material-price-panel{border-radius:var(--radius-lg)}
.owner-login-dialog{width:min(440px,calc(100vw - 32px));box-shadow:0 24px 80px #231c1826}
.owner-login-dialog h2{font-size:24px}.owner-login-dialog>p{font-size:15px}.owner-pin-wrap input{font-size:26px;letter-spacing:8px;direction:ltr;text-align:center}
.owner-lock{background:var(--orange-soft);color:var(--text)}#ownerPinError{color:var(--red)}
#customer-editor .customer-editor-toolbar{padding:var(--space-4);gap:var(--space-3);border-bottom:1px solid var(--line);background:var(--surface)}
#customer-editor .customer-editor-toolbar h2{font-size:18px;margin:0}
#customer-editor .customer-editor-panel{padding:var(--space-6);background:var(--surface)}
#ceForm{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-4);align-content:start}
#customer-editor #ceForm label{margin:0;gap:var(--space-2)}
#ceForm>h3,#ceForm>.ce-image,#ceForm>.ce-actions,#ceForm>.ce-muted,#ceForm>#ceLines,#ceForm>#ceTotal,#ceForm>label:has(input[type=file]){grid-column:1/-1}
.ce-image{width:100%;height:180px;object-fit:contain;background:var(--surface-soft);border-radius:var(--radius);padding:var(--space-3)}
.ce-image[src=""]{display:none}
.ce-actions{gap:var(--space-2);padding-block:var(--space-3)}.ce-actions button{min-height:44px}.ce-danger{background:var(--red-soft)!important;color:var(--red)!important}
.settings-save-bar{gap:var(--space-2);border-radius:var(--radius);padding:var(--space-2);background:var(--surface);box-shadow:0 8px 32px #241b1826}
.settings-save-bar button{min-height:48px}.settings-save{background:var(--green)!important}.settings-cancel{background:var(--red)!important}
.admin-notification-copy b{font-size:14px}.admin-notification-copy small{font-size:12px}.admin-notification-item{padding:var(--space-3);gap:var(--space-3)}
.mobile-bottom-nav{height:72px;border-radius:20px;background:var(--surface-strong);padding:var(--space-2)}.mobile-bottom-nav span{font-size:12px;line-height:1.3}.mobile-bottom-nav svg{width:22px;height:22px}.mobile-bottom-nav button{color:#d1c9bd}.mobile-bottom-nav button.active{color:var(--yellow)}
.nav button{font-size:16px;min-height:48px;border-radius:var(--radius-sm)}.side{gap:var(--space-4)}
.brand img{filter:none;width:180px;max-width:100%;background:var(--surface);padding:var(--space-2);border-radius:var(--radius-sm)}
.side-actions button{font-size:14px;min-height:44px}.side .brand strong{font-size:14px}
.ui-busy{cursor:progress!important}.ui-busy::after{content:'…';margin-inline-start:6px}
.ui-table-cards td:before{display:none}
@media(max-width:760px){
 .compact-page-head.inventory-materials-head{display:grid;grid-template-columns:1fr;align-items:start}.inventory-materials-head>div,.inventory-materials-head>label{width:100%;max-width:none;min-width:0}.inventory-materials-head p{margin-block:0 var(--space-3)}
 .main{padding-inline:var(--space-4)}.topbar{margin-inline:-16px;padding-inline:var(--space-4);margin-bottom:var(--space-4)}.topbar h1{font-size:22px}
 .form-grid,.message-grid,.analytics-head,.inventory-transfer-grid,.barcode-new-fields{grid-template-columns:1fr}
 .inventory-create-row{grid-template-columns:1fr!important}.inventory-filters{grid-template-columns:1fr 1fr}.inventory-filters>label:first-child{grid-column:1/-1}
 .metric,.metric-link{min-height:96px;padding:var(--space-3)}.metric b{font-size:25px}.metric span{font-size:13px}
 .two-charts,.performance-grid{grid-template-columns:1fr}.overview-scope{max-width:none;width:100%}
 .menu-category-table,.menu-category-table tbody{display:block;width:100%;min-width:0}
 .menu-figma-item{display:grid;grid-template-columns:minmax(0,1fr) 112px 48px;gap:var(--space-2);padding-block:var(--space-3);border-bottom:1px solid var(--line)}
 .menu-figma-item td{display:block;width:auto;padding:0;border:0;height:auto;min-width:0}.menu-figma-name{grid-column:1/-1}.menu-figma-controls{grid-column:1/-1}.menu-controls-inner{justify-content:flex-start}.menu-figma-price{grid-column:1/3}.menu-price-inner{justify-content:flex-start}.menu-figma-price input{width:100px}
 #branchManager,#branchManager>form{grid-template-columns:1fr}.fleet-content{padding:var(--space-4)}.fleet-form-dialog{padding:var(--space-4)}
 .fleet-fields{gap:var(--space-3)}.fleet-form-dialog header h3{font-size:18px}.os-component-controls{gap:var(--space-3);flex-wrap:wrap}
 .ui-table-cards,.ui-table-cards tbody{display:block;width:100%;min-width:0}.ui-table-cards thead{display:none}
 .ui-table-cards tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--space-3);padding:var(--space-4);border-bottom:1px solid var(--line)}
 .ui-table-cards tbody td{display:flex;flex-direction:column;gap:var(--space-1);min-width:0;white-space:normal;overflow-wrap:anywhere;padding:0;border:0;height:auto}
 .ui-table-cards tbody td:first-child,.ui-table-cards td:has(button),.ui-table-cards td[colspan]{grid-column:1/-1}
 .ui-table-cards td[data-label]:before{display:block;content:attr(data-label);font-size:12px;font-weight:500;color:var(--muted)}
 .ui-table-cards td input,.ui-table-cards td select{min-width:0;width:100%!important;font-size:16px;min-height:44px}
 .ui-table-cards .row-actions{flex-wrap:wrap}.inventory-category-actions button{min-height:44px}
 .ui-table-cards td[colspan]:before{display:none}.settings-security-actions button{font-size:14px;padding:var(--space-3)}
 #customer-editor .customer-editor-toolbar{padding:var(--space-3);gap:var(--space-2)}#customer-editor .customer-editor-toolbar h2{font-size:15px}
 #customer-editor .customer-editor-panel{padding:var(--space-4)}#ceForm{grid-template-columns:1fr}
 .fleet-totals{width:100%;min-width:0}.fleet-totals td,.fleet-totals th{font-size:12px;padding:8px 4px;white-space:normal}
 .fleet-record{flex-wrap:wrap}.settings-save-bar{max-width:calc(100vw - 24px)}
}
@media(max-width:380px){
 .main{padding-inline:var(--space-3)}.topbar{margin-inline:-12px}.card{padding:var(--space-3)}.cards,.grid{gap:var(--space-2)}
 .mobile-bottom-nav{width:calc(100% - 16px)}.mobile-bottom-nav span{font-size:11px}
 .fleet-fields,.os-recipe-grid,.settings-security-actions{grid-template-columns:1fr}.hr-debt-row{column-gap:4px}
 .owner-login-dialog{padding:var(--space-4)}.owner-pin-wrap input{letter-spacing:6px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

/* R8 reference: R6 navigation and workflows, warm compact cards and restrained type.
   Scoped to the admin document; the customer editor iframe keeps its own stylesheet. */
:root{
 --bg:#f8f5ef;--surface:#fffdfa;--surface-soft:#f4f0ea;--surface-strong:#292622;
 --text:#292a2d;--muted:#81807d;--line:#e9e4dc;--line-strong:#dcd5cd;
 --red:#a72243;--red-soft:#fcf0f1;--yellow-deep:#9e2443;
 --radius:14px;--radius-sm:10px;--radius-lg:20px;--shadow:0 2px 9px #42352a08;
 --text-base:15px;--text-small:12px;--text-section:17px;--text-title:24px;
 --space-3:10px;--space-4:14px;--space-6:20px;--space-8:28px;
 --focus:0 0 0 3px #a722431a;--nav-clearance:100px;
}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
body{background:var(--bg);font-size:15px;line-height:1.5}
.shell{width:min(1120px,100%);padding:0 0 var(--nav-clearance);margin-inline:auto}
.main{padding:0 20px 24px;min-width:0}
.topbar{position:relative;min-height:90px;margin:0 -20px 22px;padding:16px 20px;border:0;border-radius:0;background:var(--bg);box-shadow:0 5px 20px #46362d03}
.topbar-title{pointer-events:none}.topbar-heading{width:100%;display:flex;justify-content:center}
.overview-topbar-logo{width:200px;max-width:32vw;max-height:54px}
.topbar-notification-button{inset-inline-start:auto;inset-inline-end:auto;left:20px;top:50%;bottom:auto;transform:translateY(-50%);width:42px;height:42px;min-height:42px;background:transparent;border:0;border-radius:12px}
.topbar-notification-button svg{width:26px;height:26px;stroke-width:1.7}
.topbar-notification-button span{font-size:11px;min-width:20px;height:20px;top:0;inset-inline-end:0;border:0}
.overview-scope{position:absolute;right:20px;top:50%;transform:translateY(-50%);width:190px;max-width:29%;margin:0;display:flex;align-items:center;border:1px solid var(--line-strong);border-radius:12px;background:#fffefa66}
.overview-scope[hidden]{display:none}.overview-scope svg{width:21px;height:21px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;margin-inline:10px 0;stroke-linecap:round;stroke-linejoin:round}
.overview-scope select{width:100%;min-width:0;min-height:44px;font-size:14px;padding:8px;border:0;background:transparent;box-shadow:none}
.page-heading{margin-bottom:24px;text-align:start}.page-heading h1{font-size:28px;line-height:1.3;font-weight:800;margin:0 0 6px}.page-heading p{margin:0;color:var(--muted);font-size:15px}
body.customer-editor-open .page-heading{display:none}
.grid,.section.active{gap:14px}.card{background:var(--surface);border:1px solid var(--line);padding:18px;border-radius:var(--radius);box-shadow:var(--shadow)}
.card h2,.card h3{font-size:18px;margin-bottom:16px;font-weight:700}
#overview .cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;grid-column:1/-1}
#overview .metric{position:relative;min-height:106px;padding:18px 20px;display:grid;align-content:center;gap:12px;text-align:start;box-shadow:var(--shadow)}
#overview .metric>span:not(.reference-icon){font-size:16px;font-weight:500;color:var(--text);line-height:1.4;padding-inline-end:32px}
#overview .metric b{font-size:28px;text-align:right;line-height:1.1;unicode-bidi:plaintext;direction:ltr;font-weight:800}
html[dir=ltr] #overview .metric b{text-align:left}
.reference-icon{display:inline-grid;place-items:center;width:36px;height:36px;flex:none;border-radius:50%;background:var(--red-soft);color:#81364a;padding:8px;box-sizing:border-box}
.reference-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
#overview .metric>.reference-icon{position:absolute;inset-inline-end:14px;top:14px;color:#81364a}
#overview .metric[data-reference-metric=mSales]{border-color:#e8c5ce;background:#fcf1f2}
#overview .metric[data-reference-metric=mSales] b,#overview .metric[data-reference-metric=mSales]>span:not(.reference-icon),#mOnlineSales{color:var(--red)}
#overview .metric:last-child{grid-column:1/-1;min-height:88px}
#overview .metric:last-child>.reference-icon{inset-inline-start:16px;inset-inline-end:auto}
#overview .metric:last-child{padding-inline-start:64px}
#overview>.card:has(#branchConnectionStatus){grid-column:1/-1;margin:4px 0 0;padding:18px}
#overview>.card:has(#branchConnectionStatus)>h2{display:flex;align-items:center;gap:10px;margin-bottom:16px}
.branch-status-grid{gap:10px}
.branch-status-card{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1.1fr);align-items:center;gap:16px;padding:14px 16px;border-radius:12px;min-height:64px}
.branch-status-card.disconnected{background:#fcf0f1!important;border:1px solid #efdadf!important;color:var(--text)}
.branch-status-card.disconnected>b{color:var(--text)!important}
.branch-status-card.connected{background:#edf6ef;border:1px solid #d4e6d9;color:var(--text)}
.branch-status-card>b{font-size:16px;line-height:1.4}.branch-status-card .status-pill{font-size:12px;min-height:24px;line-height:1.3;padding:4px 12px;white-space:nowrap;border-radius:20px}
.branch-status-card .status-pill.disconnected{background:var(--red)!important;color:white!important;border:0}.branch-status-card .status-pill.connected{background:var(--green);color:white;border:0}
.branch-status-card .pill{color:var(--muted);background:none;border:0;border-inline-start:1px solid #e7d8d9;border-radius:0;padding:0 12px;font-size:12px;line-height:1.7;overflow-wrap:anywhere}
.overview-accordion,.settings-accordion{margin:0;border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow);border:1px solid var(--line)}
.overview-accordion>summary,.settings-accordion>summary{display:flex;align-items:center;justify-content:flex-start;gap:12px;list-style:none;padding:10px 16px;min-height:58px;font-size:16px;line-height:1.5;color:var(--text)}
.overview-accordion>summary::after,.settings-accordion>summary::after{content:''!important;width:7px;height:7px;flex:none;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);margin-inline-start:auto;margin-inline-end:6px;transition:transform .18s ease}
.overview-accordion[open]>summary::after,.settings-accordion[open]>summary::after{transform:rotate(225deg)}
.overview-accordion[open]>summary,.settings-accordion[open]>summary{margin-bottom:0;border-bottom:1px solid var(--line)}
.overview-accordion>.card{padding:18px}.settings-accordion>div{padding:18px}.settings-accordion summary::-webkit-details-marker{display:none}
.cost-accordion,.inventory-tool-list{gap:12px}.cost-group,.inventory-tool-details,.inventory-tool-launch{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}
.cost-group-head,.inventory-tool-summary,.inventory-tool-launch{min-height:66px;padding:13px 16px;background:var(--surface);gap:12px}
.cost-group-title b,.inventory-tool-copy b{font-size:16px}.cost-group-title small,.inventory-tool-copy small{font-size:12px;line-height:1.5;color:var(--muted)}
.cost-icon,.inventory-tool-icon{background:var(--red-soft);color:#81364a;border-radius:50%;width:36px;height:36px;min-width:36px}
.cost-group-body,.inventory-tool-body{padding:16px;border-top:1px solid var(--line)}
.costs-intro{background:var(--surface)!important;color:var(--text)!important;border:1px solid var(--line)}.costs-intro p,.costs-intro small{color:var(--muted)}
.costs-intro h2{color:var(--text)}.menu-category-header,.inventory-category-head{background:transparent;padding:4px 0 12px;border-bottom:1px solid var(--line)}
.costs-intro>div:last-child b{color:var(--red);font-size:23px}
.cash-forecast details>summary,.barcode-admin-material>summary{display:flex;align-items:center;gap:10px;list-style:none;min-height:44px;font-size:14px;padding:10px 2px}
.cash-forecast details>summary::-webkit-details-marker,.barcode-admin-material>summary::-webkit-details-marker{display:none}
.cash-forecast details>summary::after,.barcode-admin-material>summary::after{content:'';width:7px;height:7px;flex:none;margin-inline-start:auto;margin-inline-end:6px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}
.cash-forecast details[open]>summary::after,.barcode-admin-material[open]>summary::after{transform:rotate(225deg)}
.section-chevron svg{stroke-width:1.7}.recipe-row label,.recipe-row small,.recipe-base-summary small{font-size:12px}
.menu-category-header h3,.inventory-category-head h2{font-size:17px}.inventory-tool-copy small{max-width:54ch}
input,select,textarea{background:var(--surface);border:1px solid var(--line-strong);border-radius:10px;min-height:44px;padding:10px 12px;font-size:15px;line-height:1.4}
label{font-size:13px;color:#625e59;gap:6px}button{font-size:14px;border-radius:10px;min-height:44px;padding:9px 14px}
input:focus,select:focus,textarea:focus{border-color:#a72243;box-shadow:var(--focus)}
th,td{font-size:13px;padding:10px 12px;height:44px}th{background:#f5f1eb;font-weight:600;color:#625e59}td button{font-size:12px}
.table-wrap{border-radius:12px;border-color:var(--line)}.toolbar{gap:10px;margin-bottom:14px}.section-note,.pill{font-size:12px}
.form-grid,.message-grid,.fleet-fields,.os-grid,.os-body{gap:14px}
.detail-panel,.recipe-panel,.inventory-count-panel,.material-price-panel,dialog{background:var(--bg);border:1px solid var(--line);border-radius:20px;color:var(--text)}
.detail-header,.recipe-header,.inventory-count-header,.barcode-scanner-header,.os-head{background:var(--surface);padding:16px 20px;border-bottom:1px solid var(--line);gap:12px}
.detail-header h2,.recipe-header h2,.inventory-count-header h2,.barcode-scanner-header h2,.os-head h2{font-size:20px;line-height:1.4;margin:0}
.detail-body,.recipe-body,.inventory-count-body,.material-price-content,.fleet-content,.archive-content{padding:20px}
.fleet-form-dialog,.owner-login-dialog{padding:24px;background:var(--surface)}.fleet-form-dialog header{margin-bottom:20px}.fleet-form-dialog h3{font-size:20px}
.fleet-tabs{gap:10px;margin:0 0 16px}.fleet-tabs button:not(.selected){background:var(--surface);border:1px solid var(--line)}
.os-card,.os-component{background:var(--surface);padding:16px;border-radius:14px}.os-catalog button{border-radius:12px}.os-catalog button img{border-radius:8px}
.owner-login-dialog h2{font-size:23px}.owner-login-dialog>p{font-size:13px;margin-bottom:20px}.owner-lock{width:54px;height:54px;border-radius:50%;background:var(--red-soft);color:var(--red);margin-bottom:16px}.owner-lock svg{width:26px;height:26px}
.owner-pin-wrap input{font-size:24px;border-radius:12px;background:var(--bg)}
.settings-security-actions{margin:6px 0;gap:12px}.settings-security-actions button{font-size:14px;padding:14px 10px}
.cash-forecast .forecast-metrics>div{min-height:72px;padding:12px;border:1px solid var(--line);background:var(--surface)}.cash-forecast .forecast-metrics strong{font-size:22px}.cash-forecast .forecast-metrics small{font-size:12px}
.mobile-bottom-nav{direction:ltr;display:grid;bottom:0;width:min(1120px,100%);height:78px;padding:8px 14px max(8px,env(safe-area-inset-bottom));border-radius:24px 24px 0 0;background:#292622;box-shadow:0 -2px 12px #33271d0a}
html[dir=ltr] .mobile-bottom-nav{direction:rtl}
.mobile-bottom-nav button{color:#c2bfb9;min-height:52px;gap:4px}.mobile-bottom-nav button.active{color:#c32e52;background:transparent}.mobile-bottom-nav svg{width:23px;height:23px;stroke-width:1.6}.mobile-bottom-nav span{font-size:12px}
.side{background:var(--surface);color:var(--text)}.side .nav button{color:var(--text);background:transparent;font-size:15px}.side .nav button.active{background:var(--red-soft);color:var(--red)}
.side .brand strong{color:var(--text)}.side .side-actions button{background:var(--surface-soft);color:var(--text)}
@media(max-width:760px){
 .main{padding-inline:14px}.topbar{margin-inline:-14px;min-height:70px;padding:12px 14px;margin-bottom:20px}.overview-topbar-logo{width:132px;max-width:31vw;max-height:42px}
 .topbar-notification-button{left:14px;width:36px;height:36px;min-height:36px}.topbar-notification-button svg{width:24px;height:24px}.topbar-notification-button span{font-size:10px;min-width:17px;height:17px}
 .overview-scope{right:14px;max-width:29%;border-radius:9px}.overview-scope select{font-size:12px;padding:7px 4px;min-height:38px}.overview-scope svg{width:17px;height:17px;margin-inline:7px 0}
 .page-heading{margin-bottom:20px}.page-heading h1{font-size:23px;margin-bottom:5px}.page-heading p{font-size:13px}
 .grid,.section.active{gap:10px}.card{padding:14px}.card h2,.card h3{font-size:17px;margin-bottom:12px}
 #overview .cards{gap:10px}#overview .metric{min-height:72px;padding:12px;gap:10px;border-radius:12px}
 #overview .metric>span:not(.reference-icon){font-size:13px;padding-inline-end:24px}#overview .metric b{font-size:22px}
 .reference-icon{width:28px;height:28px;padding:6px}#overview .metric>.reference-icon{top:10px;inset-inline-end:10px}#overview .metric:last-child{min-height:70px;padding-inline-start:52px}#overview .metric:last-child>.reference-icon{inset-inline-start:12px}
 #overview>.card:has(#branchConnectionStatus){padding:14px;margin-top:3px}#overview>.card:has(#branchConnectionStatus)>h2{font-size:17px;gap:8px;margin-bottom:12px}
 .branch-status-card{min-height:60px;padding:11px 10px;gap:8px;grid-template-columns:minmax(0,1fr) auto minmax(0,1.05fr)}.branch-status-card>b{font-size:13px}.branch-status-card .status-pill{font-size:10px;padding:4px 8px;min-height:22px}.branch-status-card .pill{font-size:10px;padding:0 6px;line-height:1.5}
 .overview-accordion>summary,.settings-accordion>summary{min-height:50px;padding:9px 12px;font-size:14px;gap:10px}.overview-accordion>.card,.settings-accordion>div{padding:14px}
 .cost-group-head,.inventory-tool-summary,.inventory-tool-launch{padding:12px;min-height:62px}.cost-group-title b,.inventory-tool-copy b{font-size:15px}.cost-group-title small,.inventory-tool-copy small{font-size:12px}
 .detail-header,.recipe-header,.inventory-count-header,.barcode-scanner-header,.os-head{padding:14px}.detail-header h2,.recipe-header h2,.inventory-count-header h2,.os-head h2{font-size:18px}
 .detail-body,.recipe-body,.inventory-count-body,.material-price-content,.fleet-content,.archive-content{padding:14px}.fleet-form-dialog{padding:18px}
 .ui-table-cards tbody tr{gap:10px;padding:14px}.ui-table-cards td[data-label]:before{font-size:12px}.ui-table-cards td input,.ui-table-cards td select{font-size:15px}
 .settings-security-actions button{font-size:13px}.cash-forecast .forecast-metrics strong{font-size:20px}.cash-forecast .forecast-metrics small{font-size:11px}
 .mobile-bottom-nav{height:68px;padding:6px 8px max(6px,env(safe-area-inset-bottom));border-radius:20px 20px 0 0;width:100%}.mobile-bottom-nav svg{width:21px;height:21px}.mobile-bottom-nav span{font-size:11px}
}
@media(max-width:360px){
 .main{padding-inline:12px}.topbar{margin-inline:-12px}.overview-scope{right:12px;max-width:31%}.overview-scope svg{display:none}.overview-scope select{font-size:11px}.overview-topbar-logo{max-width:32vw}
 #overview .metric>span:not(.reference-icon){font-size:12px}#overview .metric b{font-size:20px}.branch-status-card{gap:5px}.branch-status-card>b{font-size:12px}.branch-status-card .status-pill{padding-inline:5px}
 .settings-security-actions{grid-template-columns:1fr 1fr}.settings-security-actions button{font-size:12px}.overview-accordion>summary{font-size:13px}
}

/* R9: switches have a fixed track, independent of generic form dimensions. */
.offer-studio .os-toggle{display:flex!important;align-items:center;justify-content:space-between;gap:12px;width:fit-content;max-width:100%;min-height:44px;margin:8px 0;cursor:pointer}
.offer-studio .os-toggle>span{font-size:14px;line-height:1.4;color:var(--text)}
.offer-studio .os-toggle>input[type=checkbox]{appearance:none;-webkit-appearance:none;display:block;position:relative;flex:0 0 46px;width:46px!important;min-width:46px;max-width:46px;height:28px;min-height:28px;max-height:28px;padding:0!important;margin:0;border:0!important;border-radius:999px;background:#c8c7c2!important;box-shadow:none;direction:ltr;cursor:pointer}
.offer-studio .os-toggle>input[type=checkbox]::after{content:'';position:absolute;left:3px;top:3px;width:22px;height:22px;background:#fff;border-radius:50%;box-shadow:0 1px 3px #0002;transform:translateX(0);transition:transform .18s ease}
.offer-studio .os-toggle>input[type=checkbox]:checked{background:var(--yellow)!important}
.offer-studio .os-toggle>input[type=checkbox]:checked::after{transform:translateX(18px)}
.offer-studio .os-toggle>input:focus-visible{outline:2px solid var(--text);outline-offset:3px}
.offer-studio .os-component-controls{flex-wrap:wrap;gap:12px 24px;align-items:center}
.offer-studio .os-recipe-grid{margin-top:8px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--bg)}
.offer-studio .os-recipe-status{grid-column:1/-1;margin:0;font-size:13px;color:var(--muted)}
.offer-studio .os-recipe-grid>label{min-width:0;margin:0}.offer-studio .os-recipe-grid input{min-width:0;width:100%}
/* More follows its button: left in Arabic, right in English. */
html[dir=rtl] .side{right:auto;left:0;transform:translateX(-105%);box-shadow:12px 0 36px #0002}
html[dir=ltr] .side{left:auto;right:0;transform:translateX(105%);box-shadow:-12px 0 36px #0002}
html[dir] .side.open{transform:translateX(0)}
.side .drawer-close-button{background:var(--surface-soft)!important;color:var(--text)!important;border:1px solid var(--line)!important}
/* Expanded reports may scroll their own tables; they never size the page. */
#overview>.overview-accordion{min-width:0;width:100%;max-width:100%;overflow:hidden;overflow-anchor:none}
.overview-accordion>.card{min-width:0;width:100%;max-width:100%}
.overview-accordion .table-wrap{min-width:0;max-width:100%;overflow-x:auto}
.performance-head>div,.performance-head>label,.performance-grid,.performance-grid>.performance-card,.performance-branch-head,.performance-stat-grid>div,.performance-risk-grid{min-width:0;max-width:100%}
#branchPerformanceBoard>.performance-card{grid-column:auto}
.performance-branch-head{flex-wrap:wrap}.performance-score{white-space:normal;overflow-wrap:anywhere}
.performance-note,.performance-risk{overflow-wrap:anywhere}
.analytics-summary{grid-template-columns:repeat(4,minmax(0,1fr))}.analytics-summary>div{min-width:0}
@media(max-width:600px){
 .performance-head{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.performance-head>label{width:100%}
 .analytics-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
 .overview-accordion .sales-bar-row{grid-template-columns:minmax(60px,90px) minmax(0,1fr) auto}
 .offer-studio .os-recipe-grid{grid-template-columns:minmax(0,1fr)}
}
