/* FOOD OS 84.80.0 — exact shared tabs, fast inventory DOM and layout repairs. */

/* Every page header reaches both viewport edges, including desktop layouts whose
   older responsive layer centered or padded the main scroll container. */
html body main#app-container{
  width:100%!important;
  max-width:none!important;
  margin-inline:0!important;
  padding-left:0!important;
  padding-right:0!important;
  box-sizing:border-box!important;
}

html body > header.glass{
  width:100%!important;
  max-width:none!important;
  margin-inline:0!important;
  box-sizing:border-box!important;
}

html body main#app-container :is(
  .pc-module-topbar,.pc-settings-topbar,.pc-acc-topbar,.pc-unified-head,
  .cc-topbar-premium,.inv-header,.topbar
){
  width:100vw!important;
  max-width:none!important;
  margin-left:calc(50% - 50vw)!important;
  margin-right:calc(50% - 50vw)!important;
  box-sizing:border-box!important;
}

/* Semantic section headers must not inherit the global 60px application-header geometry. */
html body header.pc-settings-section-head,
html body header.pc-pm-category-header,
html body header.pc-inv-view-head{
  height:auto!important;
  min-height:0!important;
  justify-content:flex-start!important;
  box-sizing:border-box!important;
}

html body header.pc-settings-section-head{
  gap:8px!important;
  padding:0!important;
}

html body header.pc-settings-section-head > div{
  margin:0!important;
  padding:0!important;
}

/* Report amounts: larger but bounded so all four KPI cards remain stable. */
body.pc-reports-active .repPro-kpiVal{
  margin-top:7px!important;
  font-size:clamp(22px,2.05vw,29px)!important;
  line-height:1.22!important;
  letter-spacing:-.45px!important;
}

/* Inventory stock cards are emitted in their final state; no observer repair pass is needed. */
.inv-page .ing-card[data-ing-card]{
  overflow:hidden!important;
  cursor:pointer!important;
  transition:border-color .18s ease,box-shadow .18s ease,padding .18s ease!important;
}

.inv-page .ing-card[data-ing-card]:not(.pc-ing-expanded){
  padding:11px 13px!important;
  border-radius:18px!important;
  box-shadow:0 8px 22px rgba(15,23,42,.045)!important;
}

.inv-page .ing-card[data-ing-card] .pc-ing-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  margin-bottom:0!important;
}

.inv-page .ing-card[data-ing-card] .pc-ing-title{min-width:0!important;flex:1 1 auto!important}
.inv-page .ing-card[data-ing-card] .pc-ing-name{max-width:none!important;width:100%!important;font-size:15.5px!important}
.inv-page .ing-card[data-ing-card] .pc-ing-badge{flex:0 0 auto!important;height:32px!important;padding:0 12px!important;font-size:11.5px!important}
.inv-page .ing-card[data-ing-card] .pc-ing-badge:not(.low):not(.zero){background:#ecfdf3!important;border-color:#bbf7d0!important;color:#15803d!important}
.inv-page .ing-card[data-ing-card] .pc-ing-badge:not(.low):not(.zero)::before{background:#22c55e!important;box-shadow:0 0 0 4px rgba(34,197,94,.14)!important}

.inv-page .ing-card[data-ing-card]:not(.pc-ing-expanded) :is(.pc-ing-unit,.pc-ing-metrics,.pc-inv-card-actions){display:none!important}
.inv-page .ing-card[data-ing-card].pc-ing-expanded{padding:14px!important;border-radius:24px!important;box-shadow:0 14px 36px rgba(15,23,42,.06)!important}
.inv-page .ing-card[data-ing-card].pc-ing-expanded .pc-ing-head{align-items:flex-start!important;margin-bottom:9px!important}
.inv-page .ing-card[data-ing-card].pc-ing-expanded .pc-ing-unit{display:block!important;margin-top:4px!important;text-align:right!important;direction:rtl!important}
.inv-page .ing-card[data-ing-card].pc-ing-expanded .pc-ing-metrics{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;margin-top:10px!important}
.inv-page .ing-card[data-ing-card].pc-ing-expanded .pc-ing-metric{min-height:68px!important;padding:9px!important;border-radius:16px!important;gap:8px!important}
.inv-page .ing-card[data-ing-card].pc-ing-expanded .pc-ing-metric-icon{width:34px!important;height:34px!important;min-width:34px!important;border-radius:12px!important}
.inv-page .ing-card[data-ing-card].pc-ing-expanded .pc-inv-card-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:9px!important;margin-top:11px!important}
.inv-page .ing-card[data-ing-card].pc-ing-expanded .pc-inv-card-actions .btn{height:44px!important;min-height:44px!important;border-radius:15px!important;font-size:14px!important}

.inv-page .pc-ing-accordion-chevron{
  width:26px!important;
  height:26px!important;
  min-width:26px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 26px!important;
  border:1px solid #e7edf4!important;
  border-radius:10px!important;
  background:#f8fafc!important;
  color:#64748b!important;
  pointer-events:none!important;
  transition:transform .18s ease,background .18s ease,color .18s ease!important;
}
.inv-page .pc-ing-accordion-chevron svg{width:16px!important;height:16px!important;fill:none!important;stroke:currentColor!important;stroke-width:2.4!important;stroke-linecap:round!important;stroke-linejoin:round!important}
.inv-page .ing-card.pc-ing-expanded .pc-ing-accordion-chevron{transform:rotate(180deg)!important;background:#eff6ff!important;border-color:#dbeafe!important;color:#168dff!important}
.inv-page [data-ing-card][hidden]{display:none!important}
.inv-page .pc-inv-search-empty{width:100%;min-height:76px;align-items:center;justify-content:center;border:1px dashed #cbd5e1;border-radius:18px;background:#f8fafc;color:#667085;font-size:12px;font-weight:850}
.inv-page .pc-inv-search-empty:not([hidden]){display:flex}

/* Consumption header and summary: natural height plus explicit overflow containment. */
html body header.pc-inv-view-head{
  min-width:0!important;
  overflow:visible!important;
}
.pc-consumption-summary{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.pc-consumption-summary > div{min-width:0!important;grid-template-columns:34px minmax(0,1fr)!important;overflow:hidden!important}
.pc-consumption-summary > div > *{min-width:0!important;max-width:100%!important}
.pc-consumption-card-head,.pc-consumption-card-head > *{min-width:0!important}
.pc-consumption-amount{max-width:48%!important;overflow:hidden!important;text-overflow:ellipsis!important}

html.pc-dark-mode body .inv-page .pc-ing-accordion-chevron,
body.pc-dark-mode .inv-page .pc-ing-accordion-chevron{background:#111827!important;border-color:#334155!important;color:#cbd5e1!important}

@media(max-width:760px){
  .pc-consumption-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .pc-consumption-summary > div:last-child{grid-column:1/-1!important}
}

@media(max-width:520px){
  body.pc-reports-active .repPro-kpiVal{font-size:20px!important}
  .inv-page .ing-card[data-ing-card]:not(.pc-ing-expanded){padding:10px 12px!important;border-radius:17px!important}
  .inv-page .ing-card[data-ing-card].pc-ing-expanded{padding:13px!important;border-radius:22px!important}
  .inv-page .pc-ing-accordion-chevron{width:24px!important;height:24px!important;min-width:24px!important;flex-basis:24px!important}
}

@media(max-width:430px){
  .pc-consumption-summary{grid-template-columns:1fr!important}
  .pc-consumption-summary > div:last-child{grid-column:auto!important}
  .pc-consumption-amount{max-width:44%!important}
}

@media(max-width:380px){
  body.pc-reports-active .repPro-kpiVal{font-size:18px!important}
  .pc-consumption-card-head{flex-direction:column!important;align-items:stretch!important}
  .pc-consumption-amount{max-width:100%!important;align-self:flex-start!important}
}

@media(prefers-reduced-motion:reduce){
  .inv-page .ing-card[data-ing-card],.inv-page .pc-ing-accordion-chevron{transition:none!important}
}
