/* FOOD OS 84.76.0 — category access, branded login, reports cleanup and responsive canvas */

/* ---------- Login brand ---------- */
.pc-login-brand{
  position:relative;
  height:106px;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  overflow:hidden;
  margin:0 0 18px!important;
}
.pc-login-brand__logo{
  width:220px;
  height:220px;
  max-width:none;
  display:block;
  flex:0 0 auto;
  transform:translateY(-52px);
  object-fit:contain;
  user-select:none;
}

/* ---------- Product and category management ---------- */
.pc-pm-category-access,
.pc-pm-back-products{
  min-height:42px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  padding:0 13px!important;
  border:1px solid #bae6fd!important;
  border-radius:13px!important;
  background:#f0f9ff!important;
  color:#0369a1!important;
  font:inherit!important;
  font-size:10px!important;
  font-weight:950!important;
  box-shadow:none!important;
}
.pc-pm-category-access:hover,
.pc-pm-back-products:hover{border-color:#7dd3fc!important;background:#e0f2fe!important}
.pc-pm-category-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:0 0 auto;flex-wrap:wrap}
.pc-pm-back-products{border-color:#e2e8f0!important;background:#fff!important;color:#475569!important}
.pc-pm-section-tabs{position:relative;z-index:2;width:100%;min-width:0}
.pc-pm-section-tab{min-width:0}

/* ---------- Full-width settings save action ---------- */
.pc-settings-save-row.pc-settings-save-row--full{
  width:100%;
  min-width:0;
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  margin-top:14px;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
}
.pc-settings-save-row--full .pc-settings-save-hint{display:block;text-align:center}
body.pc-settings-active .pc-settings-save-row--full .pc-settings-save-button--minimal{
  width:100%!important;
  min-width:0!important;
  min-height:50px!important;
  align-self:stretch!important;
  margin:0!important;
  border-radius:14px!important;
}

/* ---------- Reports: clean hierarchy and reliable grid ---------- */
body.pc-reports-active main#app-container>.pc-report-suite{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0 0 34px!important;
}
body.pc-reports-active .pc-report-suite .repPro-area{
  width:100%!important;
  min-width:0!important;
  display:block!important;
  padding:14px 0 0!important;
}
.repPro-toolbar,.repPro-kpiGrid,.repPro-insights-grid,.repPro-transactions-card{width:100%;min-width:0}
.repPro-kpiGrid{grid-template-columns:repeat(4,minmax(0,1fr))!important}

/* ---------- Full responsive application canvas ---------- */
:root{
  --pc-responsive-gutter:clamp(12px,1.8vw,30px);
  --pc-responsive-gap:clamp(10px,1.15vw,16px);
}
html,body{width:100%;max-width:100%;overflow-x:hidden}
body[data-foodos-route] main#app-container,
body.pc-settings-active main#app-container,
body.pc-terminal-active main#app-container,
body.pc-reports-active main#app-container,
body.pc-online-menu-settings-active main#app-container{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0!important;
  padding:var(--pc-responsive-gutter) var(--pc-responsive-gutter) calc(94px + env(safe-area-inset-bottom,0px))!important;
  overflow-x:hidden!important;
  box-sizing:border-box!important;
}
body[data-foodos-route] main#app-container>*{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin-inline:0!important;
  box-sizing:border-box!important;
}
body[data-foodos-route] main#app-container>:is(
  .pc-subpage-shell,
  .pc-settings-page,
  .inv-page,
  .repPro-page,
  .tcA-shell,
  .pc-recipes-page,
  .pc-persons-page,
  .pc-om-page,
  .cc-shell,
  .pc-accounts-page,
  .page
){
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0!important;
  padding-inline:0!important;
}
body[data-foodos-route] :is(.pc-module-topbar,.pc-acc-topbar,.pc-unified-head){
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin-inline:0!important;
  box-sizing:border-box!important;
}
body[data-foodos-route] :is(.pc-module-top-title,.pc-module-top-title>*,.pc-page-toolbar,.pc-page-toolbar-actions){min-width:0}
body[data-foodos-route] :is(.table-wrap,.inv-table-wrap,.pc-transaction-table-wrap,#server-reports-box){width:100%;max-width:100%;min-width:0;overflow-x:auto}
body[data-foodos-route] img{max-width:100%}

/* Desktop column counts keep cards proportional instead of turning a small set into giant tiles. */
@media (min-width:900px){
  body[data-foodos-route="pos"] .product-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:var(--pc-responsive-gap)!important}
  body[data-foodos-route="orders"] .orders-list-container,
  body[data-foodos-route="products"] .pm-products,
  body[data-foodos-route="inventory"] :is(.ing-grid,.inv-grid),
  body[data-foodos-route="recipes"] .pc-recipes-list,
  body[data-foodos-route="persons"] :is(.pc-person-list,.pc-transaction-list),
  body[data-foodos-route="accounts"] :is(.pc-acc-carousel,.pc-acc-list){
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:var(--pc-responsive-gap)!important;
    align-items:start!important;
  }
  body[data-foodos-route="terminal"] .tcA-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:var(--pc-responsive-gap)!important}
  .pc-pm-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.pc-reports-active .repPro-kpiGrid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}

@media (min-width:1100px){
  .pc-settings-layout{grid-template-columns:minmax(0,1fr) minmax(300px,360px)!important;gap:var(--pc-responsive-gap)!important}
  .pc-settings-side-column{position:sticky!important;top:74px!important;display:grid!important;grid-template-columns:1fr!important}
}

@media (min-width:1200px){
  body[data-foodos-route="pos"] .product-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}
  body[data-foodos-route="orders"] .orders-list-container,
  body[data-foodos-route="products"] .pm-products,
  body[data-foodos-route="inventory"] :is(.ing-grid,.inv-grid),
  body[data-foodos-route="recipes"] .pc-recipes-list,
  body[data-foodos-route="persons"] :is(.pc-person-list,.pc-transaction-list){grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body[data-foodos-route="terminal"] .tcA-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .pc-pm-category-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body[data-foodos-route="online-menu"] :is(.pc-om-grid,.pc-om-category-image-grid){grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media (min-width:1600px){
  body[data-foodos-route="pos"] .product-grid{grid-template-columns:repeat(6,minmax(0,1fr))!important}
  body[data-foodos-route="orders"] .orders-list-container,
  body[data-foodos-route="products"] .pm-products,
  body[data-foodos-route="inventory"] :is(.ing-grid,.inv-grid),
  body[data-foodos-route="recipes"] .pc-recipes-list,
  body[data-foodos-route="persons"] :is(.pc-person-list,.pc-transaction-list),
  body[data-foodos-route="terminal"] .tcA-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .pc-pm-category-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}

@media (max-width:1099px){
  .pc-settings-layout{grid-template-columns:1fr!important}
  .pc-settings-side-column{position:static!important;display:grid!important;grid-template-columns:1fr!important}
}

@media (max-width:899px){
  body[data-foodos-route] main#app-container,
  body.pc-settings-active main#app-container,
  body.pc-terminal-active main#app-container,
  body.pc-reports-active main#app-container,
  body.pc-online-menu-settings-active main#app-container{
    padding:12px 12px calc(88px + env(safe-area-inset-bottom,0px))!important;
  }
  .repPro-kpiGrid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .repPro-insights-grid{grid-template-columns:1fr!important}
  .pc-pm-category-grid{grid-template-columns:1fr!important}
}

@media (max-width:640px){
  body[data-foodos-route] main#app-container>:is(.pc-subpage-shell,.pc-settings-page,.inv-page,.repPro-page,.tcA-shell,.pc-recipes-page,.pc-persons-page,.pc-om-page)>.pc-module-topbar,
  body.pc-settings-active main#app-container>.pc-settings-page>.pc-settings-topbar{
    width:calc(100% + 24px)!important;
    margin-inline:-12px!important;
    padding-inline:12px!important;
    border-radius:0 0 18px 18px!important;
  }
  .pc-pm-product-toolbar{align-items:stretch!important}
  .pc-pm-product-toolbar .pc-page-toolbar-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important}
  .pc-pm-product-toolbar .pc-pm-category-access{grid-column:1/-1}
  .pc-pm-category-header-actions{display:grid;width:100%;grid-template-columns:1fr 1fr}
  .pc-pm-category-header-actions>*{width:100%!important;min-width:0!important}
  .repPro-toolbar{align-items:stretch!important;flex-direction:column!important}
  .repPro-periods{width:100%;overflow-x:auto;scrollbar-width:none}
  .repPro-export-actions{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%}
  .repPro-export-btn{width:100%!important;min-width:0!important}
  .repPro-kpiGrid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .repPro-kpiCard{min-height:116px!important;padding:11px!important;gap:8px!important}
  .repPro-kpiVal{font-size:13px!important}
}

@media (max-width:380px){
  .pc-login-brand{height:96px}
  .pc-login-brand__logo{width:200px;height:200px;transform:translateY(-47px)}
  .pc-pm-section-tab{gap:5px!important;padding-inline:6px!important;font-size:9.5px!important}
  .pc-pm-section-tab .pc-svg-icon{display:none}
  .pc-pm-category-header-actions{grid-template-columns:1fr}
  .repPro-kpiGrid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  .repPro-kpiCard{min-height:112px!important;grid-template-columns:30px minmax(0,1fr)!important;padding:9px!important;gap:7px!important;border-radius:15px!important}
  .repPro-kpiIcon{width:30px!important;height:30px!important;border-radius:10px!important}
  .repPro-kpiLbl{font-size:7.6px!important}
  .repPro-kpiVal{font-size:11px!important;margin-top:5px!important}
  .repPro-kpiCount{font-size:7.5px!important;padding-top:7px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}

/* ---------- Dark mode ---------- */
html.pc-dark-mode .pc-pm-category-access,
body.pc-dark-mode .pc-pm-category-access{border-color:#164e63!important;background:#0c2b3a!important;color:#7dd3fc!important}
html.pc-dark-mode .pc-pm-back-products,
body.pc-dark-mode .pc-pm-back-products{border-color:#334155!important;background:#111827!important;color:#cbd5e1!important}

@media (prefers-reduced-motion:reduce){
  .pc-pm-category-access,.pc-pm-back-products{transition:none!important}
}
