:root {
  --grafite: #292b2e;
  --amarelo-breda: #f7cb36;
  --amarelo-hover: #edba1c;
  --cinza-fundo: #f2f2f1;
  --cinza-linha: #d9d9d7;
  --cinza-texto: #555658;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--grafite);
  background: var(--cinza-fundo);
}
* { box-sizing: border-box; }
body { margin: 0; }
header { background: var(--grafite); color: white; border-bottom: 4px solid var(--amarelo-breda); }
.barra, main { width: min(1320px, 100% - 36px); margin: auto; }
.barra, .titulo, .acoes { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.barra { min-height: 64px; }
.barra strong { letter-spacing: .09em; }
.barra span { color: var(--amarelo-breda); font-size: .85rem; }
.barra-acoes { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.barra-acoes span { overflow-wrap: anywhere; color: #ecf2f6; }
.login { max-width: 440px; padding-top: clamp(24px, 8vw, 80px); }
.login form { display: grid; gap: 14px; padding: clamp(18px, 4vw, 28px); }
.login h1 { font-size: 1.85rem; }
.login p:empty { display: none; }
main { padding: 30px 0; }
.titulo { margin-bottom: 22px; }
h1 { margin: 3px 0; font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -.045em; }
h2 { margin: 0 0 16px; font-size: 1.25rem; }
p { margin: 6px 0; }
.marca { color: var(--cinza-texto); font-size: .85rem; font-weight: 750; letter-spacing: .07em; }
button { cursor: pointer; padding: 10px 15px; min-height: 42px; border: 1px solid transparent; border-radius: 8px; background: var(--amarelo-breda); color: var(--grafite); font: inherit; font-weight: 650; }
button:focus-visible, a:focus-visible { outline: 2px solid #966b00; outline-offset: 3px; }
button:disabled { opacity: .65; cursor: wait; }
.secundario { background: white; color: var(--grafite); border-color: var(--cinza-linha); }
.indicadores, .filtros, .campos { display: grid; gap: 12px; }
.indicadores { grid-template-columns: repeat(5, 1fr); margin-bottom: 18px; }
.cartao, .painel { background: white; border: 1px solid var(--cinza-linha); border-radius: 12px; padding: 17px; }
.cartao { color: var(--grafite); text-align: left; font-weight: 650; }
.cartao span { color: var(--cinza-texto); font-size: .875rem; }
.cartao strong { display: block; margin-top: 5px; font-size: 2rem; font-variant-numeric: tabular-nums; }
.cartao-alerta { border-top: 3px solid #b64850; }
.cartao-alerta strong { color: #8e2932; }
button.cartao:hover { border-color: #8196a8; }
.filtros { grid-template-columns: 1.3fr repeat(4, 1fr); }
label { display: grid; gap: 5px; font-size: .9rem; font-weight: 650; }
input, select, textarea { width: 100%; min-height: 42px; padding: 8px; border: 1px solid #b7c9d5; border-radius: 7px; background: white; color: #172838; font: inherit; }
#resultado { color: #516679; margin: 15px 0 8px; }
.tabela { overflow: auto; }
.rolagem-superior {
  position: sticky;
  top: 0;
  z-index: 3;
  overflow-x: scroll;
  overflow-y: hidden;
  background: #edf3f7;
  scrollbar-color: #637586 #edf3f7;
}
.rolagem-superior > div { height: 1px; }
.rolagem-superior:focus-visible { outline: 2px solid #18577a; outline-offset: 2px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
th { background: #eeede9; }
th, td { padding: 10px; border-bottom: 1px solid #e1e8ed; }
.ac { background: transparent; color: #5f4608; text-align: left; padding: 2px; text-decoration: underline; }
.status { display: inline-block; border-radius: 6px; background: #edf3f7; padding: 4px 7px; }
.atrasada { background: #fbe0df; color: #8e2932; }
.breve { background: #fff0cf; color: #735015; }
dialog { width: min(760px, 100% - 24px); max-height: 92vh; border: 1px solid #b7c9d5; border-radius: 12px; padding: 20px; color: inherit; }
dialog::backdrop { background: #112b47a6; }
.campos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feriados-campos { grid-template-columns: 7rem minmax(0, 1fr); margin: 12px 0; }
.largo { grid-column: 1 / -1; }
.acoes { margin-top: 14px; justify-content: flex-end; }
[role="alert"] { color: #8e2932; }
.visualizacoes { justify-content: flex-start; flex-wrap: wrap; margin: 16px 0 10px; }
.vista { display: inline-flex; align-items: center; min-height: 42px; padding: 10px 15px; border: 1px solid var(--cinza-linha); border-radius: 8px; background: var(--amarelo-breda); color: var(--grafite); font-weight: 650; text-decoration: none; }
.vista.secundario { background: white; color: var(--grafite); }
.paineis-dashboard { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; margin-bottom: 18px; }
.paineis-dashboard h2 { margin-bottom: 4px; }
.apoio-dashboard { color: #516679; margin-bottom: 13px; font-size: .9rem; }
#resumo-etapas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#resumo-etapas section { background: #f6f8fa; border: 1px solid #e1e8ed; border-radius: 9px; padding: 9px; min-width: 0; }
#resumo-etapas h3 { display: grid; gap: 3px; margin: 4px 5px 8px; font-size: 1rem; }
#resumo-etapas h3 small { font-size: .84rem; font-weight: 500; color: #516679; }
.contagem-status { display: grid; grid-template-columns: minmax(0, 1fr) 2.5rem 2ch; gap: 6px; align-items: center; width: 100%; padding: 4px 5px; min-height: 38px; font-size: .875rem; text-align: left; background: transparent; color: #26465c; }
.contagem-status:hover { background: #e8eff5; }
.contagem-status[aria-pressed="true"] { background: #fff3c5; border-color: #bf951a; }
#consulta { scroll-margin-top: 14px; }
.consulta-selecao:not([hidden]) { display: table; margin: -4px 0 14px; padding: 5px 9px; border-radius: 6px; background: #e8eff5; color: #23435b; font-weight: 650; }
.trilho-status { overflow: hidden; height: 7px; border-radius: 6px; background: #dde6ee; }
.trilho-status > span { display: block; height: 100%; background: var(--cor-status); border-radius: inherit; }
.cabecalho-graficos { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.tipos-grafico { display: inline-flex; gap: 3px; border: 1px solid #dbe4eb; padding: 3px; border-radius: 8px; background: #edf3f7; }
.tipos-grafico button { min-height: 32px; padding: 3px 10px; background: transparent; color: #23435b; font-size: .875rem; }
.tipos-grafico button[aria-pressed="true"] { background: var(--amarelo-breda); color: var(--grafite); }
.pizza-status { aspect-ratio: 1; width: min(73%, 158px); margin: 12px auto; border-radius: 50%; background: #dbe4eb; }
.percentual-status { font-size: .78rem; text-align: right; color: #516679; }
#resumo-etapas[data-grafico="pizza"] .trilho-status, #resumo-etapas[data-grafico="barras"] :is(.pizza-status, .percentual-status) { display: none; }
#resumo-etapas[data-grafico="pizza"] .contagem-status { grid-template-columns: minmax(0, 1fr) 3rem 2ch; }
.contagem-status > span:first-child { display: flex; align-items: baseline; gap: 6px; }
.contagem-status > span:first-child::before { content: ""; flex: 0 0 8px; height: 8px; border-radius: 2px; background: var(--cor-status); }
#prioridades { list-style: none; margin: 0; padding: 0; }
#prioridades li { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #e1e8ed; padding: 7px 0; font-size: .875rem; }
#prioridades li > div { display: grid; gap: 3px; }
#prioridades .ac { min-height: 32px; padding: 2px 0; justify-self: start; }
.prioridade-prazo { text-align: right; justify-items: end; }
.visao-executiva .titulo {
  padding: clamp(18px, 3vw, 30px);
  border-radius: 14px;
  background: var(--grafite);
  color: #fff;
}
.visao-executiva .titulo .marca { color: var(--amarelo-breda); }
.visao-executiva #referencia { color: #e3e3e1; font-size: .9rem; }
.visao-executiva #novo:hover, .login button:hover { background: var(--amarelo-hover); }
.visao-executiva .cartao { padding: 16px; box-shadow: 0 2px 5px #142b400a; }
.visao-executiva .cartao span { display: block; line-height: 1.3; }
.visao-executiva .cartao strong { font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.1; }
.visao-executiva .paineis-dashboard > .painel { padding: clamp(14px, 2vw, 22px); }
.visao-executiva #resumo-etapas h3 { padding-bottom: 9px; border-bottom: 1px solid #dce5ec; }
.visao-executiva #prioridades .status { font-size: .82rem; }
#dashboard + .painel { scroll-margin-top: 12px; }
.calculado { display: grid; gap: 4px; }
#calculados:not(:empty) { margin-top: 16px; padding-top: 12px; border-top: 1px solid #dbe4eb; }
.tabela th { min-width: 105px; }
@media (min-width: 621px) {
  .controle-completo tr > :first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    box-shadow: 1px 0 #dbe4eb;
  }
  .controle-completo td:first-child { background: white; }
}
#filtros-colunas { margin-top: 14px; }
#filtros-colunas summary { cursor: pointer; font-weight: 650; }
#valores-colunas { margin: 10px 0; }
@media (max-width: 840px) { .indicadores, .filtros { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1020px) { .paineis-dashboard { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
  main { padding-top: 18px; }
  .titulo { align-items: flex-start; flex-direction: column; }
  .cartao, .painel { padding: 12px; }
  .campos { grid-template-columns: 1fr; }
  #resumo-etapas { grid-template-columns: 1fr; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table, tbody, tr { display: block; }
  tbody tr { border-top: 1px solid #dbe4eb; padding: 8px 0; }
  td { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 0; padding: 3px 0; text-align: right; }
  td::before { content: attr(data-label); font-weight: 650; text-align: left; }
}
