/*
 * Dra. Stefânia v0.99.42 — sistema unificado de linhas e grupos de ações.
 * Apenas apresentação. Não interfere em formulários, validação, prontuários ou permissões.
 * Carregado APÓS todos os estilos antigos, também na demonstração pública.
 */
#stef-demo-runtime.stef16-app{
  --stef42-action-height:42px;
  --stef42-action-gap:9px;
}
/* Contrato único: um grupo horizontal. Formulários são peças do grupo,
   não colunas de largura total. Botões só quebram linha quando necessário. */
#stef-demo-runtime.stef16-app :is(
  .stef27-user-actions,.demo-item-actions,.stef24-appointment-actions,
  .stef32-card-actions,.stef38-history-actions,.stef39-archive-actions,
  .stef25-consult-header-actions,.stef37-patient-actions,
  .stef24-filter-actions,.demo-form-actions,.stef42-action-group,
  .stef17-document-actions,.clinical-doc-actions,.vax-actions,.demo-case-actions
){
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-end!important;
  align-content:center!important;
  flex-wrap:wrap!important;
  gap:var(--stef42-action-gap)!important;
  min-width:0!important;
  max-width:100%!important;
  margin-block:0!important;
  text-align:left!important;
}
#stef-demo-runtime.stef16-app :is(
  .stef27-user-actions,.demo-item-actions,.stef24-appointment-actions,
  .stef32-card-actions,.stef38-history-actions,.stef39-archive-actions,
  .stef25-consult-header-actions,.stef37-patient-actions,.stef42-action-group,
  .stef17-document-actions,.clinical-doc-actions,.vax-actions,.demo-case-actions
) > :is(form,a,button,details){
  box-sizing:border-box!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
  align-self:center!important;
}
#stef-demo-runtime.stef16-app :is(
  .stef27-user-actions,.demo-item-actions,.stef24-appointment-actions,
  .stef32-card-actions,.stef38-history-actions,.stef39-archive-actions,
  .stef25-consult-header-actions,.stef37-patient-actions,.stef42-action-group,
  .stef17-document-actions,.clinical-doc-actions,.vax-actions,.demo-case-actions
) > form{
  display:inline-flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:center!important;
}
#stef-demo-runtime.stef16-app :is(
  .stef27-user-actions,.demo-item-actions,.stef24-appointment-actions,
  .stef32-card-actions,.stef38-history-actions,.stef39-archive-actions,
  .stef25-consult-header-actions,.stef37-patient-actions,.stef42-action-group,
  .stef17-document-actions,.clinical-doc-actions,.vax-actions,.demo-case-actions
) :is(a.demo-btn,button.demo-btn,button.stef27-delete-btn,button.stef37-trash){
  box-sizing:border-box!important;
  display:inline-flex!important;
  flex:0 0 auto!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:var(--stef42-action-height)!important;
  height:var(--stef42-action-height)!important;
  width:auto!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
  padding:9px 14px!important;
  line-height:1.2!important;
  white-space:nowrap!important;
  text-align:center!important;
}
#stef-demo-runtime.stef16-app :is(.stef24-appointment-actions,.stef42-action-group) .stef37-reschedule > summary{
  box-sizing:border-box!important;
  display:inline-flex!important;
  min-height:var(--stef42-action-height)!important;
  height:var(--stef42-action-height)!important;
  align-items:center!important;
  justify-content:center!important;
  padding:9px 12px!important;
  white-space:nowrap!important;
  margin:0!important;
}
/* Usuários: nome e observações podem crescer, mas Gerenciar e Excluir
   ficam sempre na mesma faixa à direita, independentemente da nota longa. */
#stef-demo-runtime.stef16-app .stef21-list > article.demo-item{
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) max-content!important;
  align-items:center!important;
  justify-content:stretch!important;
  column-gap:clamp(12px,2vw,24px)!important;
  row-gap:10px!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  padding:17px 3px!important;
  text-align:left!important;
}
#stef-demo-runtime.stef16-app .stef21-list > article.demo-item > .demo-item-body{
  min-width:0!important;
  width:auto!important;
  max-width:100%!important;
  flex:initial!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  text-align:left!important;
  gap:5px!important;
}
#stef-demo-runtime.stef16-app .stef21-list > article.demo-item > .demo-item-body :is(strong,small,span){
  width:auto!important;
  max-width:100%!important;
  min-width:0!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
  text-align:left!important;
  line-height:1.45!important;
}
#stef-demo-runtime.stef16-app .stef21-list > article.demo-item > .stef27-user-actions{
  grid-column:2!important;
  align-self:center!important;
  width:max-content!important;
  max-width:100%!important;
  flex-wrap:nowrap!important;
  justify-self:end!important;
}
#stef-demo-runtime.stef16-app .stef21-list .stef27-user-actions > :is(a,button,form){
  flex:0 0 auto!important;
  width:auto!important;
  min-width:0!important;
  margin:0!important;
}
#stef-demo-runtime.stef16-app .stef21-list .stef27-user-actions > form :is(button.demo-btn,.stef27-delete-btn){
  display:inline-flex!important;
  width:auto!important;
  margin:0!important;
  min-height:var(--stef42-action-height)!important;
}
#stef-demo-runtime.stef16-app .stef21-list > article.demo-item > .stef25-protected-user{
  grid-column:2!important;justify-self:end!important;
}
/* Agenda e histórico: espaço reservado às informações, ações sempre agrupadas. */
#stef-demo-runtime.stef16-app .stef24-day .stef24-appointment{
  grid-template-columns:76px minmax(0,1fr) max-content!important;
  align-items:center!important;
}
#stef-demo-runtime.stef16-app .stef24-day .stef24-appointment-actions{
  grid-column:3!important;
  width:max-content!important;
  justify-self:end!important;
  flex-wrap:nowrap!important;
}
#stef-demo-runtime.stef16-app :is(.stef32-consult-card,.stef38-history-row,.stef38-archive-row,.stef38-family-row){
  min-width:0!important;
  align-items:center!important;
}
#stef-demo-runtime.stef16-app :is(.stef32-consult-card,.stef38-history-row,.stef38-archive-row,.stef38-family-row) :is(.demo-item-body,.stef38-archive-info){
  min-width:0!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
}
#stef-demo-runtime.stef16-app :is(.stef38-history-row,.stef38-archive-row,.stef32-consult-card) :is(.stef38-history-actions,.stef39-archive-actions,.stef32-card-actions){
  flex-wrap:nowrap!important;
  justify-self:end!important;
  width:max-content!important;
}
/* Ações de formulário: apenas a faixa final, sem alterar os campos de dados. */
#stef-demo-runtime.stef16-app .demo-form-actions,
#stef-demo-runtime.stef16-app .stef24-filter-actions{justify-content:flex-start!important;}
#stef-demo-runtime.stef16-app .stef25-filterbar .stef24-filter-actions{
  justify-content:flex-end!important;align-self:flex-end!important;
}
/* O reagendamento aberto expande em uma linha separada, sem estreitar os outros botões. */
#stef-demo-runtime.stef16-app .stef24-appointment-actions .stef37-reschedule[open]{
  position:relative!important;
  flex:1 0 100%!important;
  width:100%!important;
  max-width:100%!important;
}
#stef-demo-runtime.stef16-app .stef24-appointment-actions .stef37-reschedule[open] > form{
  max-width:390px!important;
}
/* Notebook compacto: as ações continuam agrupadas, passando abaixo somente
   quando a largura útil do cartão não comporta três colunas confortavelmente. */
@media(max-width:1120px){
  #stef-demo-runtime.stef16-app .stef24-day .stef24-appointment{
    grid-template-columns:72px minmax(0,1fr)!important;
  }
  #stef-demo-runtime.stef16-app .stef24-day .stef24-appointment-actions{
    grid-column:1/-1!important;width:100%!important;
    justify-self:start!important;justify-content:flex-start!important;flex-wrap:wrap!important;
  }
}
@media(max-width:720px){
  #stef-demo-runtime.stef16-app{--stef42-action-height:44px;--stef42-action-gap:8px;}
  #stef-demo-runtime.stef16-app .stef21-list > article.demo-item{
    grid-template-columns:minmax(0,1fr)!important;
    gap:12px!important;
  }
  #stef-demo-runtime.stef16-app .stef21-list > article.demo-item > :is(.stef27-user-actions,.stef25-protected-user){
    grid-column:1!important;justify-self:start!important;
  }
  #stef-demo-runtime.stef16-app .stef21-list > article.demo-item > .stef27-user-actions{
    width:100%!important;max-width:100%!important;
    flex-wrap:wrap!important;justify-content:flex-start!important;
  }
  #stef-demo-runtime.stef16-app :is(.stef32-consult-card,.stef38-history-row,.stef38-archive-row,.stef38-family-row) :is(.stef38-history-actions,.stef39-archive-actions,.stef32-card-actions){
    width:100%!important;justify-self:start!important;
    justify-content:flex-start!important;flex-wrap:wrap!important;
  }
  #stef-demo-runtime.stef16-app .stef24-day .stef24-appointment-actions{
    grid-column:1/-1!important;justify-content:flex-start!important;width:100%!important;
  }
  #stef-demo-runtime.stef16-app .stef25-consult-header-actions{
    width:100%!important;justify-content:flex-start!important;
  }
  #stef-demo-runtime.stef16-app .stef25-filterbar{align-items:flex-end!important;}
}
@media(max-width:375px){
  #stef-demo-runtime.stef16-app :is(.stef27-user-actions,.stef39-archive-actions,.stef24-appointment-actions) .demo-btn{
    padding-inline:10px!important;font-size:12px!important;
  }
}

/* Documento, vacina e casos fictícios: ações sobre uma linha no desktop,
   quebra em grupos com toque amplo apenas em larguras insuficientes. */
#stef-demo-runtime.stef16-app :is(.stef17-document-actions,.clinical-doc-actions,.vax-actions,.demo-case-actions){
  justify-content:flex-end!important;gap:8px!important;
}
@media(max-width:720px){
  #stef-demo-runtime.stef16-app :is(.stef17-document-actions,.clinical-doc-actions,.vax-actions,.demo-case-actions){
    justify-content:flex-start!important;flex-wrap:wrap!important;width:100%!important;
  }
  #stef-demo-runtime.stef16-app :is(.stef17-document-actions,.clinical-doc-actions,.vax-actions,.demo-case-actions) .demo-btn{
    width:auto!important;min-height:44px!important;flex:0 0 auto!important;
  }
}
