/* Fluxo de Loja v6.10.23 — limpeza global do cabeçalho no celular */
@media (max-width:767px){
  /* Um único título no topo: sem eyebrow repetido e sem quebra em duas linhas. */
  body.mobile-clean-chrome #top-eyebrow{display:none!important}
  body.mobile-clean-chrome .top-title{flex:1;min-width:0;margin-right:6px}
  body.mobile-clean-chrome #top-title{
    min-width:0;
    max-width:100%;
    margin:0;
    font-size:0!important;
    line-height:1.1;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  body.mobile-clean-chrome #top-title::after{
    content:attr(data-mobile-title);
    display:block;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:18px;
    line-height:1.1;
    font-weight:900;
    letter-spacing:-.02em;
    color:inherit;
  }
  body.mobile-clean-chrome .top-actions{flex:0 0 auto;gap:7px}
  body.mobile-clean-chrome .top-actions .avatar{display:none!important}

  /* Quando a tela possui seu próprio seletor de loja, o seletor global não aparece. */
  body.mobile-clean-chrome.mobile-has-local-store #store-picker-wrap{display:none!important}

  /* Se o primeiro cabeçalho do conteúdo repete exatamente o título do topo, retire a duplicação. */
  body.mobile-clean-chrome #main-content>.section-head.mobile-duplicate-page-heading:not(.mobile-heading-has-actions){display:none!important}
  body.mobile-clean-chrome #main-content>.section-head.mobile-duplicate-page-heading.mobile-heading-has-actions{
    margin:0 0 10px!important;
    min-height:0!important;
    display:flex!important;
    justify-content:flex-end!important;
    align-items:center!important;
  }
  body.mobile-clean-chrome #main-content>.section-head.mobile-duplicate-page-heading.mobile-heading-has-actions>div:first-child{display:none!important}
  body.mobile-clean-chrome #main-content>.section-head.mobile-duplicate-page-heading.mobile-heading-has-actions>.toolbar{width:auto!important;margin-left:auto}

  /* Comparativo possui seleção própria de loja; o conteúdo começa direto nos filtros. */
  body.mobile-clean-chrome.mobile-has-local-store #main-content>.comparison-title{display:none!important}
}

/* v6.10.23 — Dashboard mobile: remover resumo textual redundante de períodos */
@media (max-width:767px){
  body.mobile-clean-chrome .dashboard-title .mobile-dashboard-period-copy{
    display:none!important;
  }
}

/* v6.10.23 — Fila e Clientes: remover o rótulo/cabeçalho redundante somente no celular.
   Botões, abas e demais controles do cabeçalho permanecem visíveis. */
@media (max-width:767px){
  body.mobile-clean-chrome #main-content>.section-head.mobile-duplicate-page-heading.mobile-heading-has-actions>.client-tabs{
    width:100%!important;
    margin:0!important;
    justify-content:flex-start!important;
  }
}
\n\n/* v6.10.24 — seletor de loja abaixo do cabeçalho, exclusivamente no celular */
@media (max-width:767px){
  body.mobile-clean-chrome .mobile-view-store{
    display:block!important;
    margin:0 0 12px!important;
    padding:12px 14px!important;
    border-radius:14px!important;
  }
  body.mobile-clean-chrome .mobile-view-store .field{margin:0!important}
  body.mobile-clean-chrome.mobile-has-local-store #store-picker-wrap{display:none!important}

  /* Detalhamento: preserva a tipografia atual e impede quebra de Período 1/2. */
  #comparison-workspace .comparison-responsive-table tr{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    column-gap:8px!important;
  }
  #comparison-workspace .comparison-responsive-table td[data-label="Período 1"]::before,
  #comparison-workspace .comparison-responsive-table td[data-label="Período 2"]::before{
    white-space:nowrap!important;
    overflow-wrap:normal!important;
    word-break:keep-all!important;
  }
  #comparison-workspace .comparison-responsive-table td[data-label="Período 1"],
  #comparison-workspace .comparison-responsive-table td[data-label="Período 2"]{
    min-width:0!important;
  }
}
\n\n/* v6.10.25 — ajustes exclusivamente mobile */
.external-period-presets{display:contents}
@media (max-width:767px){
  /* Informações Diárias: De/Até na mesma linha, Consultar em linha própria e atalhos em uma linha. */
  body.mobile-clean-chrome .external-period-filter .external-period-date-grid,
  body.mobile-clean-chrome .external-period-filter .external-period-date-grid:has(#external-supervisor-entry-date){
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    column-gap:8px!important;
    row-gap:8px!important;
  }
  body.mobile-clean-chrome .external-period-filter .external-period-date-grid .field{max-width:none!important;min-width:0!important}
  body.mobile-clean-chrome .external-period-filter .external-entry-date-field{grid-column:1/-1!important}
  body.mobile-clean-chrome .external-period-filter .external-period-actions{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    width:100%!important;
    gap:8px!important;
    margin-top:10px!important;
  }
  body.mobile-clean-chrome .external-period-filter #external-period-apply{width:100%!important}
  body.mobile-clean-chrome .external-period-filter .external-period-presets{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:6px!important;
    width:100%!important;
  }
  body.mobile-clean-chrome .external-period-filter .external-period-presets .mini-btn{
    width:100%!important;
    min-width:0!important;
    padding-left:4px!important;
    padding-right:4px!important;
  }

  /* Detalhamento: Período 1 e Período 2 sempre inteiros, sem alterar a fonte. */
  #comparison-workspace .comparison-responsive-table tr{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    column-gap:8px!important;
  }
  #comparison-workspace .comparison-responsive-table td[data-label="Período 1"]::before,
  #comparison-workspace .comparison-responsive-table td[data-label="Período 2"]::before{
    display:block!important;
    width:max-content!important;
    max-width:none!important;
    white-space:nowrap!important;
    overflow-wrap:normal!important;
    word-break:keep-all!important;
  }
  #comparison-workspace .comparison-responsive-table td[data-label="Período 1"],
  #comparison-workspace .comparison-responsive-table td[data-label="Período 2"]{
    overflow:visible!important;
  }
}


/* v6.10.27 — refinamentos mobile aprovados */
.dashboard-period-presets,.network-period-presets{display:contents}
.mobile-period-only{display:none!important}
@media (max-width:767px){
  /* Dashboard: o topo já concentra título, imprimir e atualizar. */
  body.dashboard-mobile-page .dashboard-title{display:none!important}
  body.dashboard-mobile-page #mobile-top-print{
    color:#fff!important;
    background:rgba(255,255,255,.12)!important;
    border-color:rgba(255,255,255,.16)!important;
  }

  /* Dashboard: De/Até lado a lado e atalhos agrupados na ordem definida. */
  body.dashboard-mobile-page .dashboard-filter .filter-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    column-gap:8px!important;
    row-gap:8px!important;
  }
  body.dashboard-mobile-page .dashboard-filter .dashboard-date-field{grid-column:auto!important;min-width:0!important}
  body.dashboard-mobile-page .dashboard-filter .filter-grid>.field:not(.dashboard-date-field){grid-column:1/-1!important;min-width:0!important}
  body.dashboard-mobile-page .dashboard-filter-actions{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:8px!important;
    width:100%!important;
  }
  body.dashboard-mobile-page .dashboard-period-presets{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:6px!important;
    width:100%!important;
  }
  body.dashboard-mobile-page .dashboard-period-presets .mini-btn{width:100%!important;min-width:0!important;padding-left:4px!important;padding-right:4px!important}
  body.dashboard-mobile-page .dashboard-period-presets .mobile-period-only{display:inline-flex!important}
  body.dashboard-mobile-page .dashboard-period-presets .desktop-period-30{display:none!important}
  body.dashboard-mobile-page #apply-dashboard{width:100%!important}

  /* Detalhamento: o background cobre o bloco completo (rótulo + valor) de cada período. */
  #comparison-workspace .comparison-responsive-table td[data-label="Período 1"],
  #comparison-workspace .comparison-responsive-table td[data-label="Período 2"]{
    box-sizing:border-box!important;
    padding:8px 10px!important;
    border-radius:10px!important;
    overflow:hidden!important;
  }
  #comparison-workspace .comparison-responsive-table td[data-label="Período 1"]{
    background:#eef4ff!important;
    border:1px solid #d6e2ff!important;
  }
  #comparison-workspace .comparison-responsive-table td[data-label="Período 2"]{
    background:#fff0f3!important;
    border:1px solid #f4d3da!important;
  }
  #comparison-workspace .comparison-responsive-table td[data-label="Período 1"]::before,
  #comparison-workspace .comparison-responsive-table td[data-label="Período 2"]::before{
    width:auto!important;
    max-width:100%!important;
    margin-bottom:3px!important;
    background:transparent!important;
  }
  #comparison-workspace .comparison-responsive-table td[data-label="Período 1"]::before{color:#315bd6!important}
  #comparison-workspace .comparison-responsive-table td[data-label="Período 2"]::before{color:#bf3655!important}
}


/* v6.10.28 — refinamentos mobile: períodos, datas e Detalhamento */
@media (max-width:767px){
  /* Todos os atalhos de período ficam visualmente centralizados. */
  body.mobile-clean-chrome .dashboard-period-presets .mini-btn,
  body.mobile-clean-chrome .network-period-presets .mini-btn,
  body.mobile-clean-chrome .external-period-presets .mini-btn,
  body.mobile-clean-chrome #comparison-workspace .comparison-presets .mini-btn{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
  }

  /* Dashboard: De/Até lado a lado, com respiro suficiente e sem colisão. */
  body.dashboard-mobile-page .dashboard-filter .filter-grid{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    column-gap:12px!important;
  }
  body.dashboard-mobile-page .dashboard-filter .dashboard-date-field{
    width:100%!important;
    min-width:0!important;
  }
  body.dashboard-mobile-page .dashboard-filter .dashboard-date-field input[type="date"]{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }

  /* Comparativo: De/Até permanecem na mesma linha no celular, sem sobreposição. */
  #comparison-workspace .comparison-period-fields{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    column-gap:12px!important;
    row-gap:8px!important;
  }
  #comparison-workspace .comparison-period-fields>.field{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  #comparison-workspace .comparison-period-fields>.field input[type="date"]{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  #comparison-workspace .comparison-presets{
    grid-column:1/-1!important;
    min-width:0!important;
    width:100%!important;
    margin-left:0!important;
  }

  /* Detalhamento: cada registro usa duas colunas reais de mesma largura. */
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table tbody tr{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    column-gap:12px!important;
    row-gap:10px!important;
    align-items:stretch!important;
  }
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table tbody td{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    justify-self:stretch!important;
    box-sizing:border-box!important;
    text-align:left!important;
  }
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table tbody td:first-child{
    grid-column:1/-1!important;
    width:100%!important;
  }

  /* P1/P2: fundo cobre integralmente rótulo + valor e os dois blocos ocupam metade do card. */
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Período 1"],
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Período 2"]{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    padding:8px 10px!important;
    border-radius:10px!important;
    overflow:hidden!important;
    text-align:left!important;
  }
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Período 1"]{
    background:#eef4ff!important;
    border:1px solid #d6e2ff!important;
  }
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Período 2"]{
    background:#fff0f3!important;
    border:1px solid #f4d3da!important;
  }
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Período 1"]::before,
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Período 2"]::before{
    display:block!important;
    width:auto!important;
    max-width:100%!important;
    margin:0 0 4px!important;
    white-space:nowrap!important;
    overflow:visible!important;
    text-overflow:clip!important;
    overflow-wrap:normal!important;
    word-break:keep-all!important;
    background:transparent!important;
  }
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Período 1"]::before{color:#315bd6!important}
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Período 2"]::before{color:#bf3655!important}

  /* Diferença e Variação seguem a mesma grade, sem espaço morto entre colunas. */
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Diferença"],
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Variação"],
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Variação %"]{
    width:100%!important;
    min-width:0!important;
    text-align:left!important;
  }
}

/* v6.10.29 — atalhos mobile e centralização do Detalhamento */
@media (max-width:767px){
  /* Dashboard e Rede: quatro atalhos agrupados, sem 30 dias. */
  body.dashboard-mobile-page .dashboard-period-presets,
  body.network-mobile-page .network-period-presets{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:6px!important;
    width:100%!important;
    align-items:stretch!important;
  }
  body.dashboard-mobile-page .dashboard-period-presets .desktop-period-30,
  body.network-mobile-page .network-period-presets .desktop-period-30{
    display:none!important;
  }
  body.dashboard-mobile-page .dashboard-period-presets .mobile-period-only,
  body.network-mobile-page .network-period-presets .mobile-period-only{
    display:inline-flex!important;
  }
  body.dashboard-mobile-page .dashboard-period-presets .mini-btn,
  body.network-mobile-page .network-period-presets .mini-btn{
    width:100%!important;
    min-width:0!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    white-space:nowrap!important;
  }

  /* Detalhamento: centralizar Diferença/Variação e seus valores. */
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Diferença"],
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Variação"],
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Variação %"]{
    text-align:center!important;
  }
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Diferença"]::before,
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Variação"]::before,
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Variação %"]::before{
    text-align:center!important;
    width:100%!important;
  }
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Diferença"] .comparison-delta,
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Variação"] .comparison-delta,
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Variação %"] .comparison-delta{
    display:inline-block!important;
    text-align:center!important;
  }
}


/* v6.10.30 — remoção estrutural do atalho 30 dias no mobile e alinhamento P1/P2 */
@media (max-width:767px){
  /* Fallback: se a tela for redimensionada após renderização desktop, 30 dias continua oculto. */
  body.dashboard-mobile-page .dashboard-period-presets .desktop-period-30,
  body.network-mobile-page .network-period-presets .desktop-period-30{
    display:none!important;
  }

  /* Detalhamento: centralizar Período 1/2, inclusive seus valores. */
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Período 1"],
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Período 2"]{
    text-align:center!important;
  }
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Período 1"]::before,
  #comparison-workspace .comparison-diff-table-card .comparison-responsive-table td[data-label="Período 2"]::before{
    width:100%!important;
    text-align:center!important;
  }
}


/* v6.10.54 — cabeçalho responsivo das novas consultas */
@media (max-width:767px){
  /* As telas de Agendamentos e Receitas usam o título compacto da barra superior.
     O cabeçalho textual duplicado do conteúdo é ocultado pelo mobile-clean-chrome. */
  body.mobile-clean-chrome #main-content>.section-head.mobile-duplicate-page-heading{
    margin:0!important;
  }
  /* Quando a própria consulta possui seletor de loja, ele é a referência da tela
     e o seletor global do topo permanece oculto. */
  body.mobile-clean-chrome #appt-report-store,
  body.mobile-clean-chrome #rx-report-store{
    width:100%!important;
    min-width:0!important;
  }
  /* Mantém os filtros das duas consultas dentro da largura útil do celular. */
  body.mobile-clean-chrome #main-content .card .form-grid{
    min-width:0!important;
  }
  body.mobile-clean-chrome #main-content .card .form-grid>.field{
    min-width:0!important;
    max-width:100%!important;
  }
  body.mobile-clean-chrome #main-content .card .form-grid input,
  body.mobile-clean-chrome #main-content .card .form-grid select{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
}
