.sidebar .brand{display:flex;flex-direction:column;align-items:center;padding:0 0 18px;gap:8px}.sidebar .brand>.brand-logo{width:76px;height:76px;border-radius:0;background:transparent;object-fit:contain}.sidebar .brand>strong{margin:0;font-size:19px;letter-spacing:0;text-align:center}.sidebar .brand small{font-size:12px;letter-spacing:0;font-weight:400;margin-top:4px}.topbar .store{min-width:0;gap:8px;justify-content:flex-end}.topbar #current-store{display:block!important;min-width:0;max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:transparent;color:inherit}.topbar #today{display:inline-flex!important;flex:none;white-space:nowrap}.topbar #today:before{content:'·';margin-right:8px}#preview-role{white-space:nowrap;flex:none}#preview-role:after{content:' ▾';font-size:11px}#account-menu{position:fixed;z-index:1500;width:210px;max-width:calc(100vw - 16px);padding:8px 0;background:#fff;color:#203249;border:1px solid #e0e6ed;border-radius:9px;box-shadow:0 7px 24px #15293e22;font-size:14px}#account-menu[hidden]{display:none}#account-name{display:block;padding:7px 14px 2px;font-size:15px;line-height:22px;overflow-wrap:anywhere}#account-role{display:block;padding:0 14px 9px;color:#758296;font-size:13px;line-height:20px}#account-logout{display:block;width:100%;height:42px;border:0;border-top:1px solid #edf0f4;background:transparent;color:#c03936;text-align:left;padding:0 14px;font-size:14px}#account-exit-confirm{position:fixed;inset:0;margin:auto;width:min(340px,calc(100vw - 32px));height:auto;min-height:0;max-height:calc(100dvh - 32px);padding:20px;border:1px solid #e0e6ed;border-radius:12px;background:white;color:#203249}#account-exit-confirm::backdrop{background:#14263c55}#account-exit-confirm h2{margin:0;font-size:17px;font-weight:600;line-height:1.5}#account-exit-confirm footer{display:flex;gap:10px;justify-content:flex-end;margin-top:18px}#account-exit-confirm button{height:40px;padding:0 17px;border-radius:6px;font-size:14px}#account-exit-cancel{background:#edf1f5;color:#34485e}#account-exit-yes{background:#c43835;color:#fff}#account-exit-error{margin:6px 0 0;color:#bd3434;font-size:12px}#account-exit-error:empty{display:none}@media(max-width:950px){.sidebar .brand{flex-direction:row;padding:0;gap:8px;min-width:0}.sidebar .brand>.brand-logo{width:36px;height:36px;margin:0}.sidebar .brand>strong{font-size:17px;text-align:left;white-space:nowrap}.sidebar .brand small{display:none}}@media(max-width:650px){.topbar{gap:6px;padding-left:12px;padding-right:12px}.topbar>div:first-child{min-width:0;flex:0 1 auto}.topbar #page-title{font-size:15px;white-space:nowrap}.topbar .store{flex:1;gap:4px;overflow:visible;font-size:12px}.topbar #current-store{flex:1;max-width:140px;padding:4px 0;font-size:12px}.topbar #today{font-size:12px}.topbar #today:before{margin-right:4px}#preview-role{max-width:82px;overflow:hidden;text-overflow:ellipsis;padding:7px 5px;font-size:12px}.topbar #page-sub{display:none}}

@media(max-width:950px){.sidebar .brand>.brand-logo{width:36px!important;height:36px!important;max-width:36px!important}.sidebar .brand{padding:0!important}.sidebar .brand>strong{margin:0!important}}

#account-exit-confirm[open]{display:block!important;position:fixed!important;inset:50% auto auto 50%!important;transform:translate(-50%,-50%)!important;margin:0!important;width:min(340px,calc(100vw - 32px))!important;height:fit-content!important;min-height:0!important;max-height:calc(100dvh - 32px)!important;padding:20px!important;flex:none!important}

.desktop-legacy-logo{display:none}
@media(min-width:951px){.sidebar .brand>.brand-logo,.sidebar .brand-short-name{display:none}.sidebar .desktop-legacy-logo{display:block;width:126px;height:auto;border-radius:6px}.sidebar .brand small{margin:0;font-size:12px}.sidebar .brand{gap:12px}}
@media(max-width:950px){
html body .app>.sidebar{display:none!important}
html body .app{grid-template-rows:minmax(0,1fr)!important;padding-top:0!important}
html body .app>.workspace{grid-row:1!important;margin-top:0!important;padding-top:0!important}
html body .topbar .store{flex:0 1 auto!important;justify-content:flex-end!important;gap:4px!important;margin-left:auto;min-width:0;max-width:calc(100% - 76px)}
html body .topbar #current-store{flex:0 1 auto!important;width:auto;max-width:140px;padding:4px 0!important}
html body .topbar #today:before{margin-right:3px}
html body #preview-role{padding:7px 4px!important}
.mobile-bottom-nav{background:#172b43!important;border-top:1px solid #34485d!important;color:#c2cede!important}
.mobile-bottom-nav button{position:relative;background:transparent!important;color:#c2cede!important}
.mobile-bottom-nav button[aria-current="page"]{background:#30455c!important;color:#fff!important}
.mobile-bottom-nav button[aria-current="page"]:before{content:"";position:absolute;left:35%;right:35%;top:auto;bottom:2px;width:auto;height:3px;border-radius:2px;background:#f78955}
.mobile-bottom-nav .nav-symbol,.mobile-bottom-nav svg,.mobile-bottom-nav span{color:inherit!important}
}

@media(max-width:950px){html body .topbar .store{display:flex!important;flex-wrap:nowrap!important;align-items:center!important}html body #current-store,html body #today,html body #preview-role{align-self:center!important;margin-top:0!important;margin-bottom:0!important}}

/* Shared small-screen header: secondary pages follow the same spacing rules. */
@media(max-width:950px){
 html body .topbar{flex-wrap:nowrap!important;min-height:58px;height:auto;padding:8px 12px!important;gap:6px!important}
 html body .topbar>div:first-child{min-width:0;flex:0 1 auto;flex-wrap:nowrap!important;gap:4px!important}
 html body .topbar #page-title{font-size:15px;white-space:nowrap}
 html body .topbar #page-sub,html body .topbar #nzip-breadcrumb{display:none}
 html body .topbar .store{font-size:12px;max-width:calc(100% - 100px)}
 html body .topbar #current-store{font-size:12px;min-width:0;overflow:hidden;text-overflow:ellipsis}
 html body .topbar #today{font-size:12px;white-space:nowrap}
 html body .topbar #preview-role{font-size:12px;max-width:82px;min-width:0;overflow:hidden;text-overflow:ellipsis}
 html body .mobile-bottom-nav{bottom:0!important;margin-bottom:0!important;transform:none}
 body[data-mobile-page=reports] #main{padding-top:10px!important}
 body[data-mobile-page=reports] #main>.section-heading{margin:0 0 10px;gap:8px}
 body[data-mobile-page=reports] #main .report-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:8px 10px;gap:5px;margin:0}
 body[data-mobile-page=reports] #main .report-filters :is(select,button){height:36px!important;min-height:36px!important;font-size:13px!important;line-height:20px!important;padding-top:4px!important;padding-bottom:4px!important}
 body[data-mobile-page=reports] #main .report-filters .report-period{margin:0;line-height:18px;font-size:12px}
 body[data-mobile-page=reports] #main .report-scope{margin:8px 0;line-height:1.45;font-size:12px}
 body[data-mobile-page=reports] #main .report-event-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px;align-items:start;grid-auto-rows:auto;align-content:start}
 body[data-mobile-page=reports] #main .report-event-stats>.stat{height:auto;min-height:0;max-height:none;padding:12px;justify-content:flex-start;gap:0}
 body[data-mobile-page=reports] #main .report-event-stats>.stat strong{margin-top:4px;font-size:24px;line-height:30px}
 body[data-mobile-page=reports] #main .report-event-stats>.stat small{margin-top:4px;line-height:17px}
 body[data-mobile-page=reports] #main .report-event-stats>.stat .stat-drill{margin-top:6px;padding-top:0;line-height:18px}
 body[data-mobile-page=reports] #main .report-grid{gap:12px}
}
/* Match the average card to its business-summary neighbour without fixing row height. */
@media(max-width:950px){
 body[data-mobile-page=reports] #main .report-event-stats>.stat-link[onclick="openReportDetail('average')"]{align-self:stretch}
}
@media(max-width:950px){
 body[data-mobile-page=reports] #main .report-event-stats>.stat-link[onclick="openReportDetail('average')"] .stat-drill{margin-top:auto;padding-top:6px}
}

/* Business summary shares the other cards' pointer and keyboard feedback. */
.report-business-card[role=button]{cursor:pointer}
#main .report-event-stats>.report-business-card[role=button]:hover{background:#f8fafc;border-color:#a5b7cb;box-shadow:0 5px 15px #172b4314}
.report-business-card[role=button]:focus-visible{outline:3px solid #75a9ec;outline-offset:3px}
/* Shared compact drilldowns. Desktop geometry stays untouched. */
@media(max-width:950px){
 html body #dialog[open]:has(.report-detail){position:fixed!important;inset:50% auto auto 50%!important;transform:translate(-50%,-50%)!important;margin:0!important;width:calc(100vw - 24px)!important;max-width:calc(100vw - 24px)!important;height:auto!important;min-height:0!important;max-height:calc(100dvh - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))!important;padding:0!important;overflow:hidden;display:flex!important;flex-direction:column;justify-content:flex-start}
 html body #dialog:has(.report-detail) .modal-head{padding:10px 12px!important;min-height:0;flex:none}
 html body #dialog:has(.report-detail) #dialog-title{font-size:17px;line-height:24px;white-space:normal;overflow:visible;text-overflow:clip;min-width:0}
 html body #dialog:has(.report-detail) #dialog-body{padding:8px 12px!important;min-height:0;height:auto;flex:0 1 auto;overflow-y:auto;overflow-x:hidden}
 html body #dialog .report-detail{min-width:0;max-width:100%;font-size:13px;line-height:1.45}
 html body #dialog .report-detail .secondary{font-size:12px;line-height:17px;margin:0 0 6px;white-space:normal;overflow-wrap:break-word}
 html body #dialog .report-detail .detail-summary{display:block;padding:8px;margin:0 0 8px;min-width:0;max-width:100%;height:auto;max-height:none;font-size:14px;line-height:21px;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:break-word;word-break:normal}
 html body #dialog .report-detail .detail-summary p{margin:0 0 4px;white-space:normal;overflow:visible;word-break:normal}
 html body #dialog .report-detail .detail-summary p:last-child{margin-bottom:0}
 html body #dialog .report-detail h3{font-size:14px;line-height:20px;margin:8px 0 5px}
 html body #dialog .report-detail .business-views{gap:6px;margin:6px 0}
 html body #dialog .report-detail .business-views button{height:40px;min-height:40px;padding:6px 12px;font-size:13px;line-height:20px}
 html body #dialog .report-detail .table-scroll{margin:0 0 6px;min-height:0;max-width:100%;overflow-x:auto}
 html body #dialog .report-detail table{width:max-content;min-width:100%;table-layout:auto;white-space:normal}
 html body #dialog .report-detail :is(th,td){padding:7px 8px;height:auto;min-width:68px;max-width:180px;font-size:12px;line-height:18px;white-space:normal!important;word-break:normal;overflow-wrap:anywhere;overflow:visible;text-overflow:clip}
 html body #dialog .report-detail table:has(td[colspan]){width:100%;min-width:0}
 html body #dialog .report-detail td[colspan]{height:auto;min-height:0;padding:14px 8px;text-align:center}
 html body #dialog .report-detail .empty{height:auto;min-height:0;padding:14px 8px}
 html body #dialog .report-detail :is(.business-missing,.average-empty-note){margin:6px 0;font-size:12px;line-height:18px}
 html body #dialog:has(.report-detail) #dialog-error:empty{display:none}
 html body #dialog:has(.report-detail) #dialog-footer{flex:none;padding:8px 12px!important;margin:0;min-height:0;gap:8px}
 html body #dialog:has(.report-detail) #dialog-footer button{height:40px;min-height:40px;padding:6px 12px;font-size:13px;line-height:20px}
}
@media(max-width:950px){
 html body #dialog .report-detail table:has(td[colspan]) tbody{display:block;position:sticky;left:0;width:calc(100vw - 50px)}
 html body #dialog .report-detail table:has(td[colspan]) tbody tr{display:block}
 html body #dialog .report-detail td[colspan]{display:block;box-sizing:border-box;width:100%;max-width:none}
}
@media(max-width:950px){
 #dialog .report-detail .report-formula-term{display:inline-block;max-width:100%;vertical-align:top}
 #dialog .report-detail .report-formula-label{white-space:nowrap}
}
#account-refresh{display:block;width:100%;height:42px;border:0;border-top:1px solid #edf0f4;background:transparent;color:#526c89;text-align:left;padding:0 14px;font-size:14px}
#nzip-action-confirm[open]{display:block!important;position:fixed!important;inset:50% auto auto 50%!important;transform:translate(-50%,-50%)!important;margin:0!important;width:min(380px,calc(100vw - 24px))!important;height:auto!important;min-height:0!important;max-height:calc(100dvh - 24px)!important;padding:18px!important;border-radius:12px;overflow:auto}
#nzip-action-confirm h2{font-size:17px;margin:0 0 10px}#nzip-action-confirm p{font-size:14px;line-height:1.5;white-space:pre-wrap;margin:0}#nzip-action-confirm footer{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}#nzip-action-confirm button{height:40px;padding:6px 14px}
.catalog-correction-tools{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
@media(max-width:950px){
 html body #dialog[data-sheet=inventory][open]{position:fixed!important;inset:auto 0 0!important;margin:0!important;transform:none!important;width:100%!important;max-width:100%!important;min-height:0!important;height:auto!important;max-height:85dvh!important;border-radius:16px 16px 0 0!important;overflow:hidden}
 html body #dialog[data-sheet=inventory] #dialog-footer{padding-bottom:max(10px,env(safe-area-inset-bottom,0px))!important}
 html body #dialog[data-sheet=inventory] .stock-range-fields{display:grid!important;grid-template-columns:minmax(0,1fr) 16px minmax(0,1fr)!important;gap:6px!important;align-items:center}
 html body #dialog[data-sheet=inventory] .stock-range-fields>label[hidden]{display:none!important}
 html body #dialog[data-sheet=inventory] .stock-range-fields>label{grid-column:auto!important;grid-row:auto!important;min-width:0}
 html body #dialog[data-sheet=inventory] #stock-range-error{grid-column:1/-1}
 html body #dialog[data-sheet=inventory] .stock-range-to{text-align:center}
 .compact-field-heading{font-size:14px;font-weight:400;margin:6px 0}
 html body #dialog:has(.employee-editor)[open]{height:auto!important;min-height:0!important;max-height:calc(100dvh - 24px)!important}
 html body #dialog:has(.employee-editor) .modal-head{padding:10px 14px;min-height:0}
 html body #dialog:has(.employee-editor) #dialog-body{padding:8px 14px;min-height:0}
 html body #dialog .employee-editor .field{gap:3px;margin-bottom:8px}
 html body #dialog .employee-editor .form-grid{gap:8px 10px;grid-template-columns:repeat(2,minmax(0,1fr))}
 html body #dialog .employee-editor :is(input:not([type=checkbox]),select){height:40px;min-height:40px;padding:6px 8px}
 html body #dialog .employee-editor :is(.store-assignment,fieldset){margin:8px 0;padding:8px 0}
 html body #dialog .employee-editor fieldset label{display:inline-flex;align-items:center;margin:3px 8px 3px 0;gap:4px}
 html body #dialog:has(.employee-editor) #dialog-footer{padding:8px 14px max(8px,env(safe-area-inset-bottom,0px))}
 body[data-mobile-page=stores] #main .mobile-store-list{overflow:visible;padding:0;background:transparent;border:0}
 .mobile-store-list table,.mobile-store-list tbody{display:block;width:100%;min-width:0}
 .mobile-store-list thead{display:none}
 .mobile-store-list tbody tr{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 8px;border:1px solid var(--line);border-radius:10px;background:white;padding:14px;margin-bottom:10px}
 .mobile-store-list tbody td{display:block;min-width:0;border:0;padding:0;white-space:normal;overflow-wrap:anywhere;font-size:13px}
 .mobile-store-list tbody td:first-child{grid-column:1;grid-row:1;padding-right:6px;font-weight:600}
 .mobile-store-list tbody td:nth-child(5){grid-column:2;grid-row:1}
 .mobile-store-list tbody td:nth-child(2),.mobile-store-list tbody td:nth-child(3),.mobile-store-list tbody td:nth-child(4){grid-column:1/-1;display:grid;grid-template-columns:70px minmax(0,1fr)}
 .mobile-store-list tbody td:nth-child(2):before,.mobile-store-list tbody td:nth-child(3):before,.mobile-store-list tbody td:nth-child(4):before{content:attr(data-label);color:var(--muted);font-weight:400}
 .mobile-store-list tbody td:last-child{grid-column:1/-1;justify-self:end}
 body[data-mobile-page=stores] #main>.section-heading{margin-bottom:8px}
 body[data-mobile-page=stores] #main .secondary{margin:6px 0}
}
@layer nzip-components{@media(max-width:950px){
 html body #dialog[data-sheet=inventory] :is(input,select,button){height:40px!important;min-height:40px!important;padding:6px 9px!important;font-size:14px!important;line-height:20px!important}
}}
@media(max-width:950px){
 html body #dialog[data-sheet=inventory] .stock-range-fields>label:nth-child(2){grid-column:1!important;grid-row:1!important}
 html body #dialog[data-sheet=inventory] .stock-range-fields>label:has(#stock-max){grid-column:3!important;grid-row:1!important}
 html body #dialog[data-sheet=inventory] .stock-range-to{display:block!important;grid-column:2!important;grid-row:1!important;color:var(--ink);font-size:13px}
 html body #dialog[data-sheet=inventory] .inventory-sort-fields{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
 body[data-mobile-page=stores] .mobile-store-list :is(td,tr){min-height:0;height:auto}
 body[data-mobile-page=stores] #main .heading-actions button{width:auto;min-width:0}
}
@media(max-width:950px){
 html body #dialog:has(.employee-editor)[open]{position:fixed!important;inset:50% auto auto 50%!important;transform:translate(-50%,-50%)!important;margin:0!important}
 html body .mobile-record-list{overflow:visible;min-width:0}
 html body .mobile-record-list table,html body .mobile-record-list tbody{display:block;width:100%;min-width:0;table-layout:auto}
 html body .mobile-record-list thead{display:none}
 html body .mobile-record-list tbody tr{display:block;min-height:0;height:auto;padding:12px;border:1px solid var(--line);border-radius:8px;margin:0 0 10px;background:#fff}
 html body .mobile-record-list tbody td{display:grid;grid-template-columns:88px minmax(0,1fr);gap:8px;min-width:0;height:auto;min-height:0;max-width:none;padding:4px 0;border:0;white-space:normal;overflow-wrap:anywhere}
 html body .mobile-record-list tbody td:before{content:attr(data-label);color:var(--muted);font-size:12px}
 html body .mobile-record-list td[colspan]{display:block;text-align:center}
 html body .mobile-record-list td[colspan]:before{content:none}
}

.product-cost-field{grid-column:1/-1}

@layer nzip-components{@media(max-width:950px){
 html body #dialog[data-sheet=inventory] #dialog-body :is(#stock-min,#stock-max,#stock-sort,#stock-sort-dir,select),html body #dialog[data-sheet=inventory] #dialog-footer button{height:40px!important;min-height:40px!important;padding:6px 9px!important;line-height:20px!important}
 html body #dialog:has(.employee-editor) #dialog-body .employee-editor :is(input:not([type=checkbox]),select){height:40px!important;min-height:40px!important;line-height:20px!important;padding:6px 8px!important}
 html body #dialog:has(.employee-editor) #dialog-body .editor-tabs button{height:40px!important;min-height:40px!important;padding:6px 12px!important}
 html body #dialog:has(.employee-editor) #dialog-footer button{height:40px!important;min-height:40px!important}
}}
@media(max-width:950px){
 html body #dialog:has(.employee-editor) #dialog-error:empty{display:none}
 html body #dialog .employee-editor .editor-tabs{margin:0 0 8px;padding:0 0 8px;gap:6px}
 html body #dialog .employee-editor .field{display:flex;flex-direction:column;gap:3px;margin:0;font-size:14px;line-height:20px}
 html body #dialog .employee-editor .form-grid{row-gap:8px}
 html body #dialog .employee-editor .secondary{font-size:12px;line-height:17px;margin:3px 0}
 html body #dialog .employee-editor .store-assignment{margin:8px 0 0;padding:8px 0 0}
 html body #dialog .employee-editor .store-assignment fieldset{display:flex;flex-wrap:wrap;gap:4px 8px;padding:4px 8px;margin:8px 0;min-height:0;height:auto}
 html body #dialog .employee-editor .store-assignment fieldset label{display:flex;align-items:center;min-height:32px;height:auto;margin:0;gap:4px}
 html body #dialog .employee-editor .store-assignment>label:not(.field){display:flex;align-items:flex-start;gap:5px;font-size:13px;line-height:18px;margin:6px 0;min-height:0}
 html body #dialog .employee-editor input[type=checkbox]{flex:none;margin-top:2px}
}
