/* Melhorias Claude 22 · site mais leve e fluido, com cara de app (PC e celular) */

/* barra de carregamento no topo */
.em-bar{position:fixed;left:0;right:0;top:env(safe-area-inset-top,0px);height:3px;z-index:3000;pointer-events:none;overflow:hidden;opacity:0;transition:opacity .2s}
.em-bar i{position:absolute;top:0;bottom:0;left:-40%;width:40%;border-radius:3px;background:linear-gradient(90deg,transparent,#5fe3ab,#c9fff0,#5fe3ab,transparent);box-shadow:0 0 12px rgba(95,227,171,.7)}
html.pz-root .em-bar i{background:linear-gradient(90deg,transparent,#9a8cff,#e7e2ff,#9a8cff,transparent);box-shadow:0 0 12px rgba(150,135,255,.7)}
html.em-busy .em-bar{opacity:1}
html.em-busy .em-bar i{animation:emBar 1s cubic-bezier(.5,.1,.4,.9) infinite}
@keyframes emBar{to{transform:translateX(350%)}}

/* brilho de carregamento nos números da página inicial (não mostra R$ 0,00 nem o mês errado enquanto carrega) */
html.em-fin-loading #visao-geral :is(.metric-card strong,.metric-card small,.metric-card .trend,.owner-welcome strong,#ownerEarningsLabel),
html.em-fin-loading #ownerPortal .filters select,html.em-fin-loading #ownerPortal .v2-period-name{color:transparent!important;-webkit-text-fill-color:transparent!important;-webkit-background-clip:border-box!important;background-clip:border-box!important;border-radius:9px;background-image:linear-gradient(90deg,rgba(255,255,255,.05) 25%,rgba(255,255,255,.16) 45%,rgba(255,255,255,.05) 65%)!important;background-size:300% 100%!important;animation:emShimmer 1.3s linear infinite!important}
html.em-fin-loading #visao-geral :is(.mini-progress,.spark-bars,.spark-line,.coverage){opacity:.25;transition:opacity .3s}
@keyframes emShimmer{from{background-position:100% 0}to{background-position:-200% 0}}

/* Lançamentos: esqueleto enquanto o Excel carrega e lista que não "reanima" a cada atualização */
.cx-skel{display:grid;gap:9px;padding:4px 0}
.cx-skel i{display:block;height:44px;border-radius:14px;background:linear-gradient(90deg,rgba(255,255,255,.04) 25%,rgba(255,255,255,.11) 45%,rgba(255,255,255,.04) 65%) 0 0/300% 100%;animation:emShimmer 1.3s linear infinite}
.cx-skel i:first-child{height:22px;width:38%}
.cx-skel i:nth-child(3){width:86%}
html body #ownerPortal .cx-xl-again .cx-xl-row{animation:none!important}

/* troca Empresarial ⇄ Pessoal mais rápida e sem travar os cliques durante a animação */
/* Keep the glass stationary while navigating: moving an entire backdrop-heavy
   view makes every nested panel resample its background on every frame. */
html body #ownerPortal .view{animation:none}
@media(prefers-reduced-motion:reduce){html body #ownerPortal .view{animation:none}}
::view-transition{pointer-events:none}
::view-transition-new(root),::view-transition-old(root),html.pz-vt-out::view-transition-new(root),html.pz-vt-out::view-transition-old(root){animation-duration:.46s!important}


/* Release completed entrance transforms: retained animation layers become backdrop
   roots in Chromium and can leave horizontal seams when nested glass repaints.
   Backwards keeps the staggered entrance, then restores each element's normal
   transform (including the selected day and task hover), without disabling glass. */
html body #ownerPortal.v2-enter>*,
html body #ownerPortal #rotina #calendarGrid:is(.rt-slide-l,.rt-slide-r)>*,
html body #ownerPortal #rotina #taskList.v2-swap>*{
 animation-fill-mode:backwards!important;
}

/* cara de app: toque sem atraso, sem destaque azul, sem selecionar texto sem querer em menus e botões */
html{-webkit-tap-highlight-color:transparent}
#ownerPortal :is(button,.nav-item,[role=tab],.v2-dock,.pz-dock,.hz-sheet,.v2-sheet-panel){touch-action:manipulation}
#ownerPortal :is(.nav-item,.v2-dock,.pz-dock,.hz-sheet-grid,.routine-tabs,.finance-scope){-webkit-user-select:none;user-select:none}
html.em-app,html.em-app body{overscroll-behavior-y:none}

@media(prefers-reduced-motion:reduce){html.em-busy .em-bar i,.cx-skel i,html.em-fin-loading #visao-geral *{animation:none!important}}
