/* Gestão Linha C — legibilidade do layout e espaçamento visual | HML 2026-10-28
   Alterações exclusivamente de apresentação: não alteram planta, dados ou permissões. */

/* Planta original: leitura no tamanho nativo, com rolagem independente e controles claros. */
#screenMapa .layout-linha-real{
  width:100%;
  min-width:0;
  padding:12px!important;
  background:#eef3f7;
}
#screenMapa .layout-zoom-toolbar{
  padding:11px 15px!important;
  gap:12px;
  margin-bottom:10px!important;
  align-items:center;
}
#screenMapa .layout-zoom-title{
  font-size:13px!important;
  line-height:1.4;
  letter-spacing:.02em;
}
#screenMapa .layout-zoom-buttons{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}
#screenMapa .layout-zoom-button{
  min-height:38px;
  min-width:40px;
  padding:7px 11px;
  line-height:1.25;
  font-size:16px;
  white-space:normal;
}
#screenMapa .layout-zoom-fit{
  font-size:11px!important;
  font-weight:800;
  letter-spacing:.015em;
}
#screenMapa .layout-zoom-label{
  min-width:106px;
  font-size:12px!important;
  line-height:1.35;
  font-weight:800;
  color:#204f6f;
  font-variant-numeric:tabular-nums;
}
#screenMapa .layout-linha-viewport{
  width:100%;
  max-width:100%;
  height:calc(100vh - 176px);
  height:calc(100dvh - 176px);
  min-height:380px;
  overflow:auto!important;
  scrollbar-color:#89a9bd #e9f2f7;
  scrollbar-gutter:stable;
  overscroll-behavior:contain;
  border-radius:8px!important;
}
#screenMapa .layout-linha-viewport #layoutLinhaReal{
  min-width:0!important;
  max-width:none!important;
  max-height:none!important;
  image-rendering:auto;
  object-fit:contain;
}
/* A tela cheia mantém o painel de leitura independente da barra de comandos. */
#screenMapa .layout-linha-real:fullscreen .layout-linha-viewport,
#screenMapa .layout-linha-real.layout-linha-expanded .layout-linha-viewport{
  height:calc(100vh - 100px)!important;
  height:calc(100dvh - 100px)!important;
  min-height:0!important;
}
@media(max-width:700px){
  #screenMapa .layout-linha-real{padding:7px!important}
  #screenMapa .layout-zoom-toolbar{padding:10px!important}
  #screenMapa .layout-zoom-buttons{justify-content:flex-start}
  #screenMapa .layout-zoom-label{min-width:90px}
  #screenMapa .layout-linha-viewport{
    height:calc(100vh - 214px);
    height:calc(100dvh - 214px);
    min-height:300px;
  }
  #screenMapa .layout-linha-real:fullscreen .layout-linha-viewport,
  #screenMapa .layout-linha-real.layout-linha-expanded .layout-linha-viewport{
    height:calc(100vh - 165px)!important;
    height:calc(100dvh - 165px)!important;
  }
}

/* Organograma: cartões mais largos para nomes longos e botões, sem reduzir a fonte. */
#screenHierarquia .hct-all-teams{gap:16px!important}
#screenHierarquia .hct-position{width:254px!important;flex:0 0 254px!important}
#screenHierarquia .hct-position .hct-team{padding:9px!important}
#screenHierarquia .hct-workers{gap:9px!important}
#screenHierarquia .hct-person{
  gap:7px!important;
  padding:9px 7px!important;
  min-width:0;
}
#screenHierarquia .hct-person strong{
  font-size:11px!important;
  line-height:1.4!important;
  overflow-wrap:anywhere;
  white-space:normal;
}
#screenHierarquia .hct-worker{
  gap:6px!important;
  padding:9px 6px!important;
}
#screenHierarquia .hct-worker strong{
  font-size:10px!important;
  line-height:1.4!important;
  min-height:42px;
}
#screenHierarquia .hct-worker .hct-reg{
  font-size:9px!important;
  line-height:1.3;
}
#screenHierarquia .hct-worker .hct-station{
  font-size:9px!important;
  line-height:1.4;
  min-height:24px;
}
#screenHierarquia .hct-worker-cell,
#screenHierarquia .hct-position .hct-worker-cell{min-height:235px!important}
#screenHierarquia .hct-person .hx-photo-btn,
#screenHierarquia .hct-person .hct-edit-btn,
#screenHierarquia .hct-person .hct-profile-btn{
  min-height:28px;
  max-width:100%;
  padding:6px 8px!important;
  line-height:1.25!important;
  font-size:9px!important;
  white-space:normal;
  overflow-wrap:anywhere;
}
#screenHierarquia .hct-team-title{min-height:190px}
#screenHierarquia .hct-viewbar{gap:14px!important}
#screenHierarquia .hct-controls{gap:9px!important}

/* Resumo diário: evita 5 indicadores excessivamente estreitos na coluna esquerda. */
#screenResumo .summary-source-daily .cards.summary-editable-grid{
  grid-template-columns:repeat(auto-fit,minmax(128px,1fr))!important;
  gap:8px!important;
}
#screenResumo .summary-source-monthly .cards.summary-editable-grid{
  grid-template-columns:repeat(auto-fit,minmax(128px,1fr))!important;
  gap:8px!important;
}
#screenResumo .summary-source-group .summary-kpi-card{
  min-height:99px!important;
  height:auto!important;
  padding:11px 22px 10px 9px!important;
}
#screenResumo .summary-source-group .summary-kpi-card .label{
  font-size:10px!important;
  line-height:1.4!important;
  overflow-wrap:normal;
  word-break:normal;
  min-height:0;
}
#screenResumo .summary-source-group .summary-kpi-card .num{
  font-size:21px!important;
  line-height:1.2!important;
}
@media(max-width:520px){
  #screenResumo .summary-source-daily .cards.summary-editable-grid,
  #screenResumo .summary-source-monthly .cards.summary-editable-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
