/* Cresco Mascotes V2 — regra única final
   Carregado por último para neutralizar regras antigas sem apagar os arquivos.
   Pontuação permanece isolada. */

/* A área útil deve aproveitar o desktop inteiro. */
@media (min-width: 821px){
  body.session-active .main{max-width:none!important;width:100%!important;}
  body.session-active .home-shell,
  body.session-active .cleaning-shell,
  body.session-active .schedule-shell,
  body.session-active .ops-shell{max-width:none!important;width:100%!important;margin-left:0!important;margin-right:0!important;}
}

/* Estrutura comum dos hero cards com mascote. */
.page:not(#page-pontuacao) .cresco-mascot-card,
.page:not(#page-pontuacao) .home-message-card,
.page:not(#page-pontuacao) .schedule-today-card{
  position:relative!important;
  width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
}

/* Neutraliza todas as variações antigas de moldura. */
.page:not(#page-pontuacao) .mascot-frame{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:center!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  overflow:visible!important;
  margin:0!important;
  padding:0!important;
  transform:none!important;
  flex-shrink:0!important;
}

/* Qualquer mascote que seja IMG segue exatamente a mesma regra. */
.page:not(#page-pontuacao) .mascot-frame img,
.page:not(#page-pontuacao) img.mascot-sprite{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center bottom!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  -webkit-mask-image:none!important;
  mask-image:none!important;
  transform:none!important;
  filter:drop-shadow(0 12px 18px rgba(0,0,0,.26))!important;
}

/* Hero: um tamanho único, próximo ao exemplo aprovado da Limpeza. */
@media (min-width: 821px){
  .page:not(#page-pontuacao) .cleaning-hero-mascot,
  .page:not(#page-pontuacao) .production-mascot,
  .page:not(#page-pontuacao) .waste-guidance-mascot,
  .page:not(#page-pontuacao) .cancel-mascot,
  .page:not(#page-pontuacao) .ops-mascot,
  .page:not(#page-pontuacao) .schedule-today-mascot{
    width:clamp(170px,11vw,205px)!important;
    height:clamp(170px,11vw,205px)!important;
    min-width:clamp(170px,11vw,205px)!important;
    min-height:clamp(170px,11vw,205px)!important;
    flex:0 0 clamp(170px,11vw,205px)!important;
    align-self:end!important;
    justify-self:end!important;
  }

  /* Home: sempre horizontal no desktop. */
  #page-inicio .home-message-card{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 190px!important;
    align-items:center!important;
    gap:24px!important;
    min-height:190px!important;
    padding:24px 28px!important;
  }
  #page-inicio .home-message-copy{min-width:0!important;align-self:center!important;}
  #page-inicio .home-message-mascot{
    width:190px!important;
    height:180px!important;
    min-width:190px!important;
    min-height:180px!important;
    margin:0!important;
    align-self:end!important;
    justify-self:end!important;
  }

  /* Minha Escala: mantém o card largo e dá presença ao mascote. */
  #page-escala .schedule-today-card{padding:24px 28px!important;min-height:230px!important;}
  #page-escala .schedule-today-layout{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 210px!important;
    gap:26px!important;
    align-items:center!important;
  }
  #page-escala .schedule-today-mascot{
    width:205px!important;
    height:205px!important;
    min-width:205px!important;
    min-height:205px!important;
  }

  /* Limpeza: referência visual aprovada. */
  #page-limpeza .cleaning-hero{
    min-height:220px!important;
    padding:26px 28px!important;
    align-items:center!important;
  }
  #page-limpeza .cleaning-hero h2{font-size:clamp(26px,2vw,34px)!important;}
  #page-limpeza .cleaning-hero-mascot{
    width:200px!important;height:190px!important;min-width:200px!important;min-height:190px!important;flex-basis:200px!important;
  }

  /* Manutenção / Compras: não ficar espremido no centro da tela. */
  #page-manutencao .ops-shell,
  #page-compras .ops-shell{max-width:none!important;width:100%!important;}
  #page-manutencao .ops-hero,
  #page-compras .ops-hero{
    width:100%!important;
    min-height:215px!important;
    padding:24px 28px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 200px auto!important;
    align-items:center!important;
    gap:24px!important;
  }
  #page-manutencao .ops-mascot,
  #page-compras .ops-mascot{
    width:195px!important;height:190px!important;min-width:195px!important;min-height:190px!important;flex-basis:195px!important;
  }

  /* Cancelamento / Desperdício / Produção: mesma escala visual dos demais hero cards. */
  #page-cancelamentos .cancel-hero,
  #page-desperdicios .waste-hero{
    min-height:220px!important;
    padding:26px 30px!important;
  }
  #page-cancelamentos .cancel-mascot,
  #page-desperdicios .waste-guidance-mascot,
  #page-producao .production-mascot{
    width:200px!important;height:195px!important;min-width:200px!important;min-height:195px!important;flex-basis:200px!important;
  }
}

/* Tablet/celular: reduz sem cortar e sem transformar hero em coluna gigante. */
@media (max-width: 820px){
  .page:not(#page-pontuacao) .cleaning-hero-mascot,
  .page:not(#page-pontuacao) .production-mascot,
  .page:not(#page-pontuacao) .waste-guidance-mascot,
  .page:not(#page-pontuacao) .cancel-mascot,
  .page:not(#page-pontuacao) .ops-mascot,
  .page:not(#page-pontuacao) .schedule-today-mascot,
  .page:not(#page-pontuacao) .home-message-mascot{
    width:118px!important;
    height:132px!important;
    min-width:118px!important;
    min-height:132px!important;
    flex:0 0 118px!important;
    margin:0!important;
  }

  #page-inicio .home-message-card{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 118px!important;
    gap:10px!important;
    min-height:160px!important;
    padding:18px 15px!important;
  }
  #page-escala .schedule-today-layout{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 118px!important;
    gap:10px!important;
    align-items:center!important;
  }
  #page-manutencao .ops-hero,
  #page-compras .ops-hero,
  #page-cancelamentos .cancel-hero,
  #page-desperdicios .waste-hero{
    min-width:0!important;
  }
}

/* Telefones estreitos: preserva texto e mascote lado a lado quando couber. */
@media (max-width: 420px){
  #page-inicio .home-message-card,
  #page-escala .schedule-today-layout{
    grid-template-columns:minmax(0,1fr) 92px!important;
  }
  .page:not(#page-pontuacao) .home-message-mascot,
  .page:not(#page-pontuacao) .schedule-today-mascot{
    width:92px!important;height:116px!important;min-width:92px!important;min-height:116px!important;flex-basis:92px!important;
  }
}

/* A tela de Pontuação não herda nenhuma regra deste arquivo. */
#page-pontuacao .score-stage,
#page-pontuacao .score-stage *{
  -webkit-mask-image:none!important;
  mask-image:none!important;
}

/* ===== Ajustes finais solicitados para o painel da Maria — mobile e desktop ===== */

/* Página inicial da Maria: Pensamento do Dia é o primeiro card. */
body.manager-mode #page-inicio .home-shell{
  display:flex!important;
  flex-direction:column!important;
}
body.manager-mode #page-inicio .home-top{order:0!important}
body.manager-mode #page-inicio .home-message-card{order:1!important}
body.manager-mode #page-inicio #boHomeNotices,
body.manager-mode #page-inicio .home-info-grid{order:2!important}
body.manager-mode #page-inicio #managerOverview{order:3!important}
body.manager-mode #page-inicio #managerEvaluationHome{order:4!important}
/* O relatório finalizado deixa a Home da gerente; o histórico ficará na área própria de Relatórios. */
body.manager-mode #page-inicio .home-last-report{display:none!important}

/* Central de Pendências: mantém bordas coloridas, mas dá mais destaque ao que exige atenção. */
body.manager-mode #managerOverview .bo-kpis{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:10px!important;
  align-items:stretch!important;
}
body.manager-mode #managerOverview .bo-kpi{
  flex:1 1 180px!important;
  min-width:150px!important;
  min-height:86px!important;
  padding:14px 15px!important;
  border-width:1.5px!important;
  border-radius:16px!important;
  transition:transform .16s ease,box-shadow .16s ease,opacity .16s ease!important;
}
body.manager-mode #managerOverview .bo-kpi:hover{transform:translateY(-1px)!important}
body.manager-mode #managerOverview .bo-kpi.problem{
  order:0!important;
  border-color:#d45d5d!important;
  background:linear-gradient(145deg,rgba(212,93,93,.12),var(--card))!important;
  box-shadow:0 10px 24px rgba(212,93,93,.08)!important;
}
body.manager-mode #managerOverview .bo-kpi.attention{
  order:0!important;
  border-color:#c99d2e!important;
  background:linear-gradient(145deg,rgba(201,157,46,.12),var(--card))!important;
  box-shadow:0 10px 24px rgba(201,157,46,.07)!important;
}
body.manager-mode #managerOverview .bo-kpi.ok{
  order:1!important;
  min-height:74px!important;
  border-color:#398b65!important;
  background:linear-gradient(145deg,rgba(57,139,101,.08),var(--card))!important;
  opacity:.9!important;
}
body.manager-mode #managerOverview .bo-kpi b{font-size:25px!important;line-height:1!important}
body.manager-mode #managerOverview .bo-kpi span{display:block!important;margin-top:7px!important;line-height:1.28!important}
body.manager-mode #managerOverview>.bo-head{margin-bottom:14px!important}
body.manager-mode #managerOverview>.bo-head h2{font-size:22px!important}
body.manager-mode #managerOverview>.bo-head .secondary{min-height:40px!important}

/* Atividade recente: somente as três mais recentes ficam abertas por padrão. */
body.manager-mode #mgrActivity .manager-row:nth-child(n+4),
body.manager-mode #managerOverview .manager-two-col .bo-card:nth-child(2)>p:nth-of-type(n+4){
  display:none!important;
}
body.manager-mode #mgrActivity:has(.manager-row:nth-child(4))::after,
body.manager-mode #managerOverview .manager-two-col .bo-card:nth-child(2):has(>p:nth-of-type(4))::after{
  content:'Mostrando as 3 atividades mais recentes';
  display:block;
  margin-top:10px;
  color:var(--muted);
  font-size:10px;
  text-align:center;
}

/* Pontuação: o mascote fica preso dentro do próprio card, sem flutuar sobre a página. */
#page-pontuacao .score-overview,
#page-pontuacao .score-team-card{
  position:relative!important;
  overflow:hidden!important;
}
#page-pontuacao .score-stage,
#page-pontuacao .score-team-mascot{
  position:relative!important;
  min-width:0!important;
  overflow:hidden!important;
  contain:layout paint!important;
}
#page-pontuacao .score-stage .score-actor,
#page-pontuacao .score-team-mascot .score-actor{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  overflow:hidden!important;
  display:grid!important;
  place-items:center!important;
  transform:none!important;
}
#page-pontuacao .score-stage .score-rig,
#page-pontuacao .score-stage img,
#page-pontuacao .score-team-mascot .score-rig,
#page-pontuacao .score-team-mascot img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center bottom!important;
  transform:none!important;
}

@media(max-width:820px){
  /* Card Avaliação da Loja: texto e mascote lado a lado; botões embaixo. */
  body.manager-mode #managerEvaluationHome{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 112px!important;
    grid-template-rows:auto auto auto auto!important;
    gap:5px 10px!important;
    align-items:start!important;
    min-height:0!important;
    padding:18px 15px!important;
    overflow:hidden!important;
  }
  body.manager-mode #managerEvaluationHome .manager-evaluation-copy{display:contents!important}
  body.manager-mode #managerEvaluationHome .manager-kicker{grid-column:1!important;grid-row:1!important;align-self:end!important}
  body.manager-mode #managerEvaluationHome h2{grid-column:1!important;grid-row:2!important;margin:3px 0 5px!important;font-size:26px!important;line-height:1.08!important}
  body.manager-mode #managerEvaluationHome p{grid-column:1!important;grid-row:3!important;font-size:11.5px!important;line-height:1.42!important}
  body.manager-mode #managerEvaluationHome .manager-evaluation-mascot{
    grid-column:2!important;
    grid-row:1/4!important;
    width:112px!important;
    height:148px!important;
    min-width:112px!important;
    align-self:center!important;
    justify-self:end!important;
    overflow:hidden!important;
  }
  body.manager-mode #managerEvaluationHome .manager-evaluation-mascot img{
    width:100%!important;
    height:100%!important;
    object-fit:contain!important;
    object-position:center bottom!important;
  }
  body.manager-mode #managerEvaluationHome .manager-evaluation-actions{
    grid-column:1/-1!important;
    grid-row:4!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    width:100%!important;
    margin-top:12px!important;
  }
  body.manager-mode #managerEvaluationHome .manager-evaluation-actions button{
    width:100%!important;
    min-height:48px!important;
    margin:0!important;
  }

  body.manager-mode #managerOverview .bo-kpi{
    flex-basis:calc(50% - 5px)!important;
    min-width:0!important;
  }
  body.manager-mode #managerOverview .bo-kpi.problem,
  body.manager-mode #managerOverview .bo-kpi.attention{min-height:96px!important}
  body.manager-mode #managerOverview .bo-kpi.ok{min-height:72px!important;padding:11px 12px!important}

  #page-pontuacao .score-team-card{
    grid-template-columns:86px minmax(0,1fr)!important;
    gap:12px!important;
    padding:14px!important;
  }
  #page-pontuacao .score-team-mascot{
    width:86px!important;
    height:112px!important;
    min-width:86px!important;
    max-width:86px!important;
    align-self:center!important;
  }
  #page-pontuacao .score-overview{
    grid-template-columns:minmax(100px,.86fr) minmax(0,1.14fr)!important;
    min-height:286px!important;
    padding:15px 14px 15px 8px!important;
  }
  #page-pontuacao .score-overview .score-stage{
    width:100%!important;
    height:250px!important;
    max-height:250px!important;
  }
}

@media(max-width:390px){
  body.manager-mode #managerEvaluationHome{grid-template-columns:minmax(0,1fr) 96px!important}
  body.manager-mode #managerEvaluationHome .manager-evaluation-mascot{width:96px!important;min-width:96px!important;height:136px!important}
  body.manager-mode #managerEvaluationHome .manager-evaluation-actions{grid-template-columns:1fr!important}
  body.manager-mode #managerOverview .bo-kpi{flex-basis:calc(50% - 5px)!important}
  #page-pontuacao .score-team-card{grid-template-columns:78px minmax(0,1fr)!important}
  #page-pontuacao .score-team-mascot{width:78px!important;min-width:78px!important;max-width:78px!important;height:104px!important}
}

/* Limpeza Semanal: aumento de 10% somente na imagem, mantendo o card. */
#page-limpeza.page .cleaning-hero-mascot.mascot-frame{overflow:visible!important;}
#page-limpeza.page .cleaning-hero-mascot.mascot-frame img.mascot-sprite{transform:scale(1.1)!important;}

/* Limpeza Semanal: badges amarelos e identificação da gerente à direita. */
#page-limpeza #cleaningToDoBadge,
#page-limpeza .admin-cleaning-history-head > .section-badge{
  border:1px solid rgba(242,201,76,.25);
  background:rgba(242,201,76,.09);
  color:var(--yellow);
}
#page-limpeza .manager-inline-card > .manager-inline-head{
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:center;
}
#page-limpeza .manager-inline-card > .manager-inline-head > div{
  flex:1;
  min-width:0;
}
#page-limpeza .manager-inline-head > .manager-badge{
  flex:0 0 auto;
  margin-left:auto;
}

/* Produção: recolhe o cabeçalho vazio e acomoda o mascote da balança inteiro. */
body:has(#page-producao.active) .topbar{
  min-height:0!important;
  margin-bottom:12px!important;
}
body:has(#page-producao.active) .topbar>div:first-child{display:none!important;}
body:has(#page-producao.active) #page-producao .production-hero{
  display:grid!important;
  grid-template-rows:auto!important;
  grid-template-columns:minmax(0,1fr) 180px!important;
  margin-top:0!important;
  align-items:center!important;
}
body:has(#page-producao.active) #page-producao .production-mascot{
  grid-column:2!important;
  grid-row:1!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:230px!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
  align-self:center!important;
}
body:has(#page-producao.active) #page-producao .production-mascot img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  transform:none!important;
}
@media(max-width:720px){
  body:has(#page-producao.active) .topbar{display:none!important;}
  body:has(#page-producao.active) #page-producao .production-hero{
    grid-template-columns:minmax(0,1fr) 38%!important;
    gap:10px!important;
  }
  body:has(#page-producao.active) #page-producao .production-mascot{height:200px!important;}
}

/* Avaliação da Loja: mascote maior, sem a sombra preta e sem cortes. */
#managerEvaluationHero .manager-evaluation-mascot{
  width:100%!important;
  height:250px!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
  align-self:center!important;
  justify-self:center!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  filter:none!important;
}
#managerEvaluationHero .manager-evaluation-mascot::before,
#managerEvaluationHero .manager-evaluation-mascot::after{content:none!important;display:none!important;}
#managerEvaluationHero .manager-evaluation-mascot img{
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:contain!important;
  object-position:center!important;
  transform:none!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  filter:none!important;
}
@media(max-width:720px){
  #managerEvaluationHero .manager-evaluation-mascot{
    width:calc(100% + 32px)!important;
    height:210px!important;
  }
}

/* Sem sombras nos mascotes; preserva os arquivos de imagem e os cards. */
.page:not(#page-pontuacao) .mascot-frame,
.page:not(#page-pontuacao) .mascot-frame .mascot-sprite,
.page:not(#page-pontuacao) .mascot-frame img,
.page:not(#page-pontuacao) img.mascot-sprite,
.manager-evaluation-mascot,
.manager-evaluation-mascot img,
#page-pontuacao .score-static-img,
#page-pontuacao .score-static-svg{
  filter:none!important;
  box-shadow:none!important;
}

/* Logo oficial transparente no topo e visível no menu aberto do celular. */
.mobile-appbar img,
.sidebar .logo.brand-logo-shell,
.sidebar .logo.brand-logo-shell .brand-logo-img{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  filter:none!important;
  padding:0!important;
}
.mobile-appbar img,
.sidebar .logo.brand-logo-shell .brand-logo-img{
  object-fit:cover!important;
  object-position:50% 51%!important;
}
.desktop-group-logo{
  height:auto!important;
  aspect-ratio:340 / 129;
  object-fit:cover!important;
  object-position:50% 51%!important;
  background:transparent!important;
}
@media(max-width:720px){
  #app .sidebar .logo.brand-logo-shell{width:160px!important;height:61px!important;}
  #app .sidebar .brand-logo-img{display:block!important;width:100%!important;height:100%!important;}
  #app .sidebar .brand-compact{display:none!important;}
}

/* Desperdício: enquadramento do novo mascote inteiro, sem alterar o card. */
body #page-desperdicios .waste-guidance-mascot.mascot-frame{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:250px!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
  align-self:center!important;
  justify-self:end!important;
  background:transparent!important;
  transform:none!important;
  filter:none!important;
}
body #page-desperdicios .waste-guidance-mascot.mascot-frame img.mascot-sprite{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  transform:none!important;
  filter:none!important;
}
@media(max-width:720px){
  body #page-desperdicios .waste-guidance-mascot.mascot-frame{height:190px!important;}
}


/* Apenas o cabeçalho vazio da página de Desperdício. */
body:has(#page-desperdicios.active) .topbar{min-height:0!important;margin-bottom:12px!important;}
body:has(#page-desperdicios.active) .topbar>div:first-child{display:none!important;}
@media(max-width:720px){body:has(#page-desperdicios.active) .topbar{display:none!important;}}

/* Relatório final: cabeçalho com mascote maior e corpo inteiro. */
#panel-relatorio .report-final-head{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) clamp(96px,25%,150px)!important;
  align-items:center!important;
  gap:16px!important;
  margin-bottom:18px!important;
}
#panel-relatorio .report-final-head>div:first-child{min-width:0;}
#panel-relatorio .report-final-head .report-mascot.mascot-frame{
  width:100%!important;
  height:185px!important;
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  align-self:center!important;
  overflow:visible!important;
  background:transparent!important;
  box-shadow:none!important;
  filter:none!important;
}
#panel-relatorio .report-final-head .report-mascot img.mascot-sprite{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  transform:none!important;
  background:transparent!important;
  box-shadow:none!important;
  filter:none!important;
}
@media(max-width:420px){
  #panel-relatorio .report-final-head{grid-template-columns:minmax(0,1fr) clamp(90px,27%,110px)!important;gap:10px!important;}
  #panel-relatorio .report-final-head .report-mascot.mascot-frame{height:158px!important;}
}
