/* EcomSmart DS · componentes (D5). Usa só os tokens de tokens.css.
   Ordem: base · casca da aplicação (menu, topo, barra de baixo) · página · cartão · números · tabela · filtros ·
   botão · campo · selo · aviso · estado vazio · modal · abas · peças de apoio. */

/* ============================================================ base */
/* Figtree vem do Google Fonts, pelo <link> de cada página (pesos 400 a 800). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--ds-fundo); color: var(--ds-texto); font: var(--ds-peso-normal) var(--ds-fs-14)/var(--ds-lh) var(--ds-fonte);
  -webkit-font-smoothing: antialiased; }
@media (max-width: 767px) { body { font-size: 0.9375rem; } }
h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
h1, h2, h3, h4 { color: var(--ds-tinta); font-weight: var(--ds-peso-forte); line-height: var(--ds-lh-justa); }
a { color: var(--ds-marca-forte); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--ds-anel-foco); border-radius: var(--ds-raio-2); }
.num { font-variant-numeric: tabular-nums; }
.so-leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico-p { width: 16px; height: 16px; }
.texto-2 { color: var(--ds-texto-2); } .texto-3 { color: var(--ds-texto-3); }
.peq { font-size: var(--ds-fs-12); } .medio { font-size: var(--ds-fs-13); }
.forte { color: var(--ds-tinta); font-weight: var(--ds-peso-forte); }
.pular { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 8px 12px; background: var(--ds-tinta); color: #fff; border-radius: var(--ds-raio-2); }
.pular:focus { top: 8px; }

/* ============================================================ casca da aplicação
   Um nível de navegação por vez: o menu lateral leva às seções; dentro da seção, no máximo uma fileira de abas.
   No celular o menu vira barra de baixo (até 5 destinos) + gaveta com o resto. */
.app { display: grid; grid-template-columns: var(--ds-menu-larg) minmax(0, 1fr); min-height: 100vh; }
.menu { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 8px; overflow-y: auto;
  border-right: 1px solid var(--ds-borda); background: var(--ds-superficie); }
.menu-marca { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px; margin-bottom: 4px; color: var(--ds-tinta);
  font-size: var(--ds-fs-14); font-weight: var(--ds-peso-pesado); }
.menu-marca img { width: 24px; height: 24px; }
.menu-marca span b { color: var(--ds-marca); font-weight: var(--ds-peso-pesado); }
.menu-trocar { margin: 0 0 8px; }
.menu-secao { margin: 12px 8px 4px; color: var(--ds-texto-3); font-size: var(--ds-fs-12); font-weight: var(--ds-peso-medio); }
.menu ul { margin: 0; padding: 0; list-style: none; }
.menu-item { display: flex; align-items: center; gap: 10px; min-height: var(--ds-item-menu); padding: 0 8px; border-radius: var(--ds-raio-2);
  color: var(--ds-texto); font-size: var(--ds-fs-13); font-weight: var(--ds-peso-medio); }
.menu-item:hover { background: var(--ds-superficie-3); text-decoration: none; }
.menu-item .ico { width: 18px; height: 18px; color: var(--ds-texto-2); }
.menu-item[aria-current="page"] { background: var(--ds-marca-suave); color: var(--ds-marca-forte); font-weight: var(--ds-peso-forte); }
.menu-item[aria-current="page"] .ico { color: var(--ds-marca); }
.menu-item .contador { margin-left: auto; }
.menu-sub { margin: 2px 0 4px 28px !important; padding-left: 8px !important; border-left: 1px solid var(--ds-borda); }
.menu-sub .menu-item { font-weight: var(--ds-peso-normal); }
.menu-rodape { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--ds-borda); }

.principal { min-width: 0; }
.topo { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: var(--ds-topo-alt); padding: 0 20px;
  border-bottom: 1px solid var(--ds-borda); background: rgb(255 255 255 / .92); backdrop-filter: saturate(1.4) blur(8px); }
.topo-busca { flex: 1; max-width: 480px; }
.topo-acoes { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.topo .bt-menu, .topo-marca { display: none; }
.topo-marca { align-items: center; gap: 6px; color: var(--ds-tinta); font-size: var(--ds-fs-14); font-weight: var(--ds-peso-pesado); }
.topo-marca img { width: 20px; height: 20px; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ds-marca-suave);
  color: var(--ds-marca-forte); font-size: var(--ds-fs-12); font-weight: var(--ds-peso-pesado); }

.barra-baixo { display: none; }
.veu { display: none; }

@media (max-width: 1023px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .menu { position: fixed; inset: 0 auto 0 0; z-index: 60; width: min(86vw, 320px); transform: translateX(-102%);
    transition: transform var(--ds-dur-2) var(--ds-curva); box-shadow: var(--ds-sombra-modal); }
  .menu.aberto { transform: none; }
  .veu.aberto { display: block; position: fixed; inset: 0; z-index: 50; background: rgb(11 16 51 / .40); }
  .topo { padding: 0 12px; }
  .topo .bt-menu, .topo-marca { display: inline-flex; }
}
@media (max-width: 767px) {
  .topo-busca { display: none; }
  .barra-baixo { position: fixed; inset: auto 0 0 0; z-index: 40; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    height: calc(var(--ds-barra-baixo) + env(safe-area-inset-bottom)); padding: 4px 4px env(safe-area-inset-bottom);
    border-top: 1px solid var(--ds-borda); background: var(--ds-superficie); }
  .barra-baixo a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px;
    border-radius: var(--ds-raio-3); color: var(--ds-texto-2); font-size: var(--ds-fs-12); font-weight: var(--ds-peso-medio); }
  .barra-baixo a:hover { text-decoration: none; }
  .barra-baixo a .ico { width: 22px; height: 22px; }
  .barra-baixo a[aria-current="page"] { color: var(--ds-marca-forte); }
  .barra-baixo a[aria-current="page"] .ico-fundo { background: var(--ds-marca-suave); }
  .barra-baixo .ico-fundo { display: grid; place-items: center; width: 52px; height: 28px; border-radius: var(--ds-raio-pilula); }
}

/* ============================================================ página */
.pagina { max-width: var(--ds-pagina-max); margin: 0 auto; padding: var(--ds-pagina-pad); display: flex; flex-direction: column; gap: var(--ds-secao-gap); }
.pagina.estreita { max-width: var(--ds-pagina-estreita); }
.cab-pagina { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 36px; }
.cab-pagina .voltar { margin-right: -4px; }
.cab-titulo { display: flex; flex-direction: column; min-width: 0; flex: 1 1 240px; }
.cab-titulo h1 { font-size: var(--ds-fs-20); font-weight: var(--ds-peso-pesado); }
.cab-titulo .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--ds-texto-3); font-size: var(--ds-fs-12); }
.cab-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 767px) {
  .cab-titulo h1 { font-size: 1.125rem; }
  .cab-acoes { width: 100%; }
  .cab-acoes .bt { flex: 1; }
  .cab-acoes .bt-icone { flex: none; }
}

.grade { display: grid; gap: var(--ds-grade-gap); grid-template-columns: repeat(12, minmax(0, 1fr)); }
.c-12 { grid-column: span 12; } .c-8 { grid-column: span 8; } .c-6 { grid-column: span 6; } .c-4 { grid-column: span 4; } .c-3 { grid-column: span 3; }
@media (max-width: 1199px) { .c-3 { grid-column: span 6; } .c-4 { grid-column: span 6; } .c-8 { grid-column: span 12; } }
@media (max-width: 767px) { .grade > * { grid-column: span 12; } }

/* ============================================================ cartão */
.cartao { min-width: 0; border-radius: var(--ds-raio-3); background: var(--ds-superficie); box-shadow: var(--ds-sombra-cartao); }
.cartao-cab { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; }
.cartao-cab h2 { font-size: var(--ds-fs-14); }
.cartao-cab .sub { color: var(--ds-texto-3); font-size: var(--ds-fs-12); }
.cartao-cab .acoes { display: flex; gap: 4px; margin-left: auto; }
.cartao-corpo { padding: var(--ds-cartao-pad); }
.cartao-cab + .cartao-corpo { padding-top: 0; }
.cartao-rodape { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--ds-borda); color: var(--ds-texto-3); font-size: var(--ds-fs-12); }
.cartao > .tabela-caixa { border-radius: 0 0 var(--ds-raio-3) var(--ds-raio-3); }

/* ============================================================ números (Metrics card do Polaris, em faixa)
   Uma faixa única, cada número numa célula de 64 px: rótulo, valor e variação. Nada de cartão de 140 px por número. */
.numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-radius: var(--ds-raio-3);
  background: var(--ds-superficie); box-shadow: var(--ds-sombra-cartao); overflow: hidden; }
.numero { position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 16px; border-left: 1px solid var(--ds-borda); }
.numero:first-child { border-left: 0; }
a.numero { color: inherit; }
a.numero:hover { background: var(--ds-superficie-2); text-decoration: none; }
.numero-rotulo { display: flex; align-items: center; gap: 6px; color: var(--ds-texto-3); font-size: var(--ds-fs-12); font-weight: var(--ds-peso-medio); white-space: nowrap; }
.numero-valor { color: var(--ds-tinta); font-size: var(--ds-fs-20); font-weight: var(--ds-peso-pesado); line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.numero-rodape { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--ds-texto-3); font-size: var(--ds-fs-12); }
.numero.tom-critico { box-shadow: inset 3px 0 0 var(--ds-critico-ico); }
.numero.tom-atencao { box-shadow: inset 3px 0 0 var(--ds-atencao-ico); }
.numero.tom-ok { box-shadow: inset 3px 0 0 var(--ds-ok-ico); }
@media (max-width: 767px) {
  .numeros { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .numero { border-left: 0; border-top: 1px solid var(--ds-borda); padding: 10px 12px; }
  .numero:nth-child(-n+2) { border-top: 0; }
  .numero:nth-child(even) { border-left: 1px solid var(--ds-borda); }
  .numero-valor { font-size: 1.125rem; }
}
.variacao { display: inline-flex; align-items: center; gap: 2px; padding: 0 4px; border-radius: var(--ds-raio-1); font-size: var(--ds-fs-12);
  font-weight: var(--ds-peso-forte); font-variant-numeric: tabular-nums; }
.variacao .ico { width: 14px; height: 14px; }
.variacao.bom { background: var(--ds-ok-fundo); color: var(--ds-ok); }
.variacao.ruim { background: var(--ds-critico-fundo); color: var(--ds-critico); }
.variacao.igual { background: var(--ds-neutro-fundo); color: var(--ds-neutro); }

.barra { position: relative; height: 6px; border-radius: var(--ds-raio-pilula); background: var(--ds-superficie-3); overflow: hidden; }
.barra > i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--ds-marca); }
.barra.tom-atencao > i { background: var(--ds-atencao-ico); } .barra.tom-critico > i { background: var(--ds-critico-ico); } .barra.tom-ok > i { background: var(--ds-ok-ico); }
.barra .marco { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ds-tinta); }
.spark { display: block; width: 100%; height: 28px; overflow: visible; }
.spark path { fill: none; stroke: var(--ds-serie-1); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.spark .area { fill: var(--ds-marca-suave); stroke: none; }

/* ============================================================ tabela (IndexTable do Polaris)
   Linha de 40 px (compacta) ou 48 px (confortável). Número alinhado à direita com algarismos tabulares.
   No celular vira lista de duas linhas: o principal à esquerda, o número que importa à direita, o resto embaixo. */
.tabela-caixa { overflow-x: auto; border-radius: var(--ds-raio-3); }
.tabela { width: 100%; border-collapse: collapse; font-size: var(--ds-fs-13); }
.tabela th { height: 36px; padding: 0 12px; border-bottom: 1px solid var(--ds-borda); background: var(--ds-superficie-2); color: var(--ds-texto-2);
  font-size: var(--ds-fs-12); font-weight: var(--ds-peso-forte); text-align: left; white-space: nowrap; }
.tabela th[aria-sort] { color: var(--ds-tinta); }
.tabela th button { display: inline-flex; align-items: center; gap: 2px; padding: 0; border: 0; background: none; font-weight: inherit; cursor: pointer; }
.tabela td { height: var(--ds-linha-tabela); padding: var(--ds-cel-pad-x); border-bottom: 1px solid var(--ds-borda); vertical-align: middle; }
.tabela tbody tr:last-child td { border-bottom: 0; }
.tabela tbody tr:hover td { background: var(--ds-superficie-2); }
.tabela tbody tr[data-href] { cursor: pointer; }
.tabela .dir { text-align: right; }
.tabela .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabela .t-principal { color: var(--ds-tinta); font-weight: var(--ds-peso-forte); }
.tabela .t-principal a { color: inherit; }
.tabela .sub { display: block; color: var(--ds-texto-3); font-size: var(--ds-fs-12); font-weight: var(--ds-peso-normal); }
.tabela .t-acao { width: 1%; white-space: nowrap; text-align: right; }
.tabela .linha-alerta td:first-child { box-shadow: inset 3px 0 0 var(--ds-critico-ico); }
.tabela .linha-atencao td:first-child { box-shadow: inset 3px 0 0 var(--ds-atencao-ico); }
.tabela tfoot td { height: 36px; background: var(--ds-superficie-2); color: var(--ds-tinta); font-weight: var(--ds-peso-forte); border-top: 1px solid var(--ds-borda); }
@media (max-width: 767px) {
  .tabela.lista-celular thead, .tabela.lista-celular tfoot { display: none; }
  .tabela.lista-celular tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px;
    padding: 10px 12px; min-height: 60px; border-bottom: 1px solid var(--ds-borda); }
  .tabela.lista-celular tbody tr:last-child { border-bottom: 0; }
  .tabela.lista-celular td { display: none; height: auto; padding: 0; border: 0; background: none !important; }
  .tabela.lista-celular td.t-principal { display: block; grid-column: 1; grid-row: 1 / span 2; }
  .tabela.lista-celular td.t-destaque { display: block; grid-column: 2; grid-row: 1; text-align: right; font-size: var(--ds-fs-14); font-weight: var(--ds-peso-forte); color: var(--ds-tinta); }
  .tabela.lista-celular td.t-destaque-2 { display: block; grid-column: 2; grid-row: 2; text-align: right; color: var(--ds-texto-3); font-size: var(--ds-fs-12); }
  .tabela.lista-celular .linha-alerta, .tabela.lista-celular .linha-atencao { box-shadow: none; }
  .tabela.lista-celular .linha-alerta { box-shadow: inset 3px 0 0 var(--ds-critico-ico); }
  .tabela.lista-celular .linha-atencao { box-shadow: inset 3px 0 0 var(--ds-atencao-ico); }
  .tabela.lista-celular .linha-alerta td:first-child, .tabela.lista-celular .linha-atencao td:first-child { box-shadow: none; }
}

/* ============================================================ filtros (Filters + Tabs de visões salvas) */
.filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; border-bottom: 1px solid var(--ds-borda); }
.filtros .campo-busca { flex: 1 1 220px; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: var(--ds-controle-p); padding: 0 10px; border: 1px dashed var(--ds-borda-forte);
  border-radius: var(--ds-raio-pilula); background: var(--ds-superficie); color: var(--ds-texto); font-size: var(--ds-fs-13); font-weight: var(--ds-peso-medio); cursor: pointer; }
.chip:hover { background: var(--ds-superficie-2); }
.chip.ativo { border-style: solid; border-color: var(--ds-tinta); background: var(--ds-superficie-2); color: var(--ds-tinta); }
.chip .ico { width: 14px; height: 14px; }
.visoes { display: flex; gap: 2px; padding: 6px 8px 0; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--ds-borda); }
.visoes::-webkit-scrollbar { display: none; }
.visao { display: inline-flex; align-items: center; gap: 6px; height: var(--ds-controle); padding: 0 12px; margin-bottom: 6px; border: 0; border-radius: var(--ds-raio-2);
  background: none; color: var(--ds-texto-2); font-size: var(--ds-fs-13); font-weight: var(--ds-peso-medio); white-space: nowrap; cursor: pointer; }
.visao:hover { background: var(--ds-superficie-3); color: var(--ds-tinta); text-decoration: none; }
.visao[aria-selected="true"], .visao[aria-current="page"] { background: var(--ds-superficie-3); color: var(--ds-tinta); font-weight: var(--ds-peso-forte); }

/* ============================================================ botão */
.bt { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--ds-controle); padding: 0 12px; border: 1px solid var(--ds-borda-forte);
  border-radius: var(--ds-raio-2); background: var(--ds-superficie); box-shadow: var(--ds-sombra-botao); color: var(--ds-tinta);
  font-size: var(--ds-fs-13); font-weight: var(--ds-peso-forte); white-space: nowrap; cursor: pointer;
  transition: background var(--ds-dur-1), border-color var(--ds-dur-1), transform var(--ds-dur-1); }
.bt:hover { background: var(--ds-superficie-2); text-decoration: none; }
.bt:active { transform: translateY(1px); box-shadow: none; }
.bt .ico { width: 16px; height: 16px; }
.bt-primario { border-color: var(--ds-marca); background: var(--ds-marca); color: var(--ds-sobre-marca); box-shadow: inset 0 -1px 0 rgb(0 0 0 / .18); }
.bt-primario:hover { border-color: var(--ds-marca-hover); background: var(--ds-marca-hover); }
.bt-critico { border-color: var(--ds-critico-ico); background: var(--ds-critico-ico); color: #fff; }
.bt-critico:hover { background: var(--ds-critico); }
.bt-plano { border-color: transparent; background: none; box-shadow: none; color: var(--ds-texto); }
.bt-plano:hover { background: var(--ds-superficie-3); }
.bt-link { height: auto; padding: 0; border: 0; background: none; box-shadow: none; color: var(--ds-marca-forte); font-weight: var(--ds-peso-medio); }
.bt-link:hover { background: none; text-decoration: underline; }
.bt-p { height: var(--ds-controle-p); padding: 0 10px; font-size: var(--ds-fs-12); }
.bt-g { height: 44px; padding: 0 20px; font-size: var(--ds-fs-14); }
.bt-icone { width: var(--ds-controle); padding: 0; }
.bt-icone.bt-p { width: var(--ds-controle-p); }
.bt[disabled], .bt[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.grupo-bt { display: inline-flex; }
.grupo-bt .bt { border-radius: 0; margin-left: -1px; }
.grupo-bt .bt:first-child { border-radius: var(--ds-raio-2) 0 0 var(--ds-raio-2); margin-left: 0; }
.grupo-bt .bt:last-child { border-radius: 0 var(--ds-raio-2) var(--ds-raio-2) 0; }
/* celular: o botão principal ocupa a largura e tem 48 px; a ação flutuante fica acima da barra de baixo */
@media (pointer: coarse), (max-width: 767px) { .bt-primario { height: 48px; font-size: var(--ds-fs-14); } .bt-p { font-size: var(--ds-fs-13); } }
.bt-flutuante { display: none; }
@media (max-width: 767px) {
  .bt-flutuante { position: fixed; right: 16px; bottom: calc(var(--ds-barra-baixo) + 16px + env(safe-area-inset-bottom)); z-index: 30; display: inline-flex;
    height: 56px; padding: 0 20px; border-radius: var(--ds-raio-4); box-shadow: var(--ds-sombra-flutuante); }
}

/* segmentado (período) */
.segmentado { display: inline-flex; padding: 2px; border-radius: var(--ds-raio-2); background: var(--ds-superficie-3); }
.segmentado button { height: calc(var(--ds-controle) - 4px); padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--ds-texto-2);
  font-size: var(--ds-fs-13); font-weight: var(--ds-peso-medio); white-space: nowrap; cursor: pointer; }
.segmentado button[aria-pressed="true"] { background: var(--ds-superficie); color: var(--ds-tinta); font-weight: var(--ds-peso-forte); box-shadow: var(--ds-sombra-cartao); }
@media (max-width: 767px) { .segmentado { display: flex; width: 100%; overflow-x: auto; } .segmentado button { flex: 1; } }

/* ============================================================ campo */
.campo { display: flex; flex-direction: column; gap: 4px; }
.campo label, .rotulo { color: var(--ds-tinta); font-size: var(--ds-fs-13); font-weight: var(--ds-peso-medio); }
.campo .ajuda { color: var(--ds-texto-3); font-size: var(--ds-fs-12); }
.campo .erro-campo { display: flex; gap: 4px; color: var(--ds-critico); font-size: var(--ds-fs-12); }
.entrada, .selecao { width: 100%; height: var(--ds-controle); padding: 0 10px; border: 1px solid var(--ds-borda-campo); border-radius: var(--ds-raio-2);
  background: var(--ds-superficie); color: var(--ds-tinta); font-size: var(--ds-fs-13); }
textarea.entrada { height: auto; min-height: 80px; padding: 8px 10px; }
.entrada::placeholder { color: var(--ds-texto-3); }
.entrada:focus, .selecao:focus { border-color: var(--ds-foco); box-shadow: 0 0 0 1px var(--ds-foco); outline: none; }
.entrada[aria-invalid="true"] { border-color: var(--ds-critico-ico); background: var(--ds-critico-fundo); }
@media (pointer: coarse) { .entrada, .selecao { font-size: 1rem; } } /* sem zoom do iOS */
.campo-busca { position: relative; }
.campo-busca .ico { position: absolute; left: 10px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--ds-texto-3); pointer-events: none; }
.campo-busca .entrada { padding-left: 32px; background: var(--ds-superficie-2); border-color: var(--ds-borda); }
.campo-busca .entrada:focus { background: var(--ds-superficie); }
.marcar { display: inline-flex; align-items: center; gap: 8px; min-height: var(--ds-controle-p); font-size: var(--ds-fs-13); cursor: pointer; }
.marcar input { width: 16px; height: 16px; accent-color: var(--ds-marca); }

/* ============================================================ selo (Badge) */
.selo { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: var(--ds-raio-pilula);
  background: var(--ds-neutro-fundo); color: var(--ds-neutro); font-size: var(--ds-fs-12); font-weight: var(--ds-peso-medio); white-space: nowrap; }
.selo::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.selo.sem-ponto::before { display: none; }
.selo.ok { background: var(--ds-ok-fundo); color: var(--ds-ok); }
.selo.atencao { background: var(--ds-atencao-fundo); color: var(--ds-atencao); }
.selo.critico { background: var(--ds-critico-fundo); color: var(--ds-critico); }
.selo.info { background: var(--ds-info-fundo); color: var(--ds-info); }
.selo.novo { background: var(--ds-novo-fundo); color: var(--ds-novo); }
.contador { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--ds-raio-pilula);
  background: var(--ds-superficie-3); color: var(--ds-tinta); font-size: var(--ds-fs-11); font-weight: var(--ds-peso-pesado); }
.contador.critico { background: var(--ds-critico-ico); color: #fff; }
.contador.atencao { background: var(--ds-atencao-fundo); color: var(--ds-atencao); }
.nota { display: inline-grid; place-items: center; min-width: 32px; height: 24px; padding: 0 6px; border-radius: var(--ds-raio-2);
  font-size: var(--ds-fs-13); font-weight: var(--ds-peso-pesado); font-variant-numeric: tabular-nums; }
.nota.ok { background: var(--ds-ok-fundo); color: var(--ds-ok); } .nota.atencao { background: var(--ds-atencao-fundo); color: var(--ds-atencao); }
.nota.critico { background: var(--ds-critico-fundo); color: var(--ds-critico); }
.ponto { display: inline-block; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--ds-borda-forte); }
.ponto.ok { background: var(--ds-ok-ico); } .ponto.atencao { background: var(--ds-atencao-ico); } .ponto.critico { background: var(--ds-critico-ico); }

/* ============================================================ aviso (Banner) — uma linha, a ação à direita */
.aviso { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; border: 1px solid var(--ds-info-borda); border-radius: var(--ds-raio-3);
  background: var(--ds-info-fundo); color: var(--ds-texto); font-size: var(--ds-fs-13); }
.aviso > .ico { width: 18px; height: 18px; margin-top: 1px; color: var(--ds-info-ico); }
.aviso-texto { flex: 1; min-width: 0; }
.aviso-texto b { color: var(--ds-tinta); font-weight: var(--ds-peso-forte); }
.aviso-acoes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.aviso.critico { border-color: var(--ds-critico-borda); background: var(--ds-critico-fundo); } .aviso.critico > .ico { color: var(--ds-critico-ico); }
.aviso.atencao { border-color: var(--ds-atencao-borda); background: var(--ds-atencao-fundo); } .aviso.atencao > .ico { color: var(--ds-atencao-ico); }
.aviso.ok { border-color: var(--ds-ok-borda); background: var(--ds-ok-fundo); } .aviso.ok > .ico { color: var(--ds-ok-ico); }
@media (max-width: 767px) { .aviso { flex-wrap: wrap; } .aviso-acoes { width: 100%; padding-left: 28px; } }
.avisos { display: flex; flex-direction: column; gap: 6px; }
.avisos details summary { list-style: none; cursor: pointer; color: var(--ds-marca-forte); font-size: var(--ds-fs-13); font-weight: var(--ds-peso-medio); }
.avisos details summary::-webkit-details-marker { display: none; }
.avisos details[open] summary { margin-bottom: 6px; }

/* ============================================================ estado vazio */
.vazio { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 16px; text-align: center; }
.vazio .ico { width: 40px; height: 40px; color: var(--ds-texto-3); stroke-width: 1.5; }
.vazio h3 { font-size: var(--ds-fs-16); }
.vazio p { max-width: 44ch; color: var(--ds-texto-2); font-size: var(--ds-fs-13); }

/* ============================================================ modal (no celular, folha de baixo) */
.modal { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 0; border: 0; border-radius: var(--ds-raio-4);
  background: var(--ds-superficie); box-shadow: var(--ds-sombra-modal); color: var(--ds-texto); }
.modal::backdrop { background: rgb(11 16 51 / .45); }
.modal-cab { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--ds-borda); }
.modal-cab h2 { flex: 1; font-size: var(--ds-fs-16); }
.modal-corpo { display: flex; flex-direction: column; gap: 12px; padding: 16px; overflow-y: auto; }
.modal-rodape { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--ds-borda); }
@media (max-width: 767px) {
  .modal { width: 100vw; max-width: 100vw; max-height: 88vh; margin: auto 0 0; border-radius: var(--ds-raio-4) var(--ds-raio-4) 0 0; }
  .modal-rodape { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .modal-rodape .bt { flex: 1; }
}

/* ============================================================ abas (Tabs): no máximo UMA fileira por tela */
.abas { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--ds-borda); }
.abas::-webkit-scrollbar { display: none; }
.aba { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: var(--ds-texto-2); font-size: var(--ds-fs-13); font-weight: var(--ds-peso-medio); white-space: nowrap; }
.aba:hover { color: var(--ds-tinta); text-decoration: none; border-bottom-color: var(--ds-borda-forte); }
.aba[aria-current="page"], .aba[aria-selected="true"] { color: var(--ds-tinta); border-bottom-color: var(--ds-marca); font-weight: var(--ds-peso-forte); }
@media (pointer: coarse), (max-width: 767px) { .aba { height: 44px; } }

/* ============================================================ peças de apoio */
.lista-def { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: var(--ds-fs-13); }
.lista-def dt { color: var(--ds-texto-3); }
.lista-def dd { color: var(--ds-tinta); font-weight: var(--ds-peso-medio); min-width: 0; overflow-wrap: anywhere; }
.linha-tempo { position: relative; margin: 0; padding: 0; list-style: none; }
.linha-tempo li { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; padding: 6px 0; font-size: var(--ds-fs-13); }
.linha-tempo li::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: -6px; width: 2px; background: var(--ds-borda); }
.linha-tempo li:last-child::before { display: none; }
.linha-tempo .marca-tempo { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ds-superficie-3); color: var(--ds-texto-2); }
.linha-tempo .marca-tempo .ico { width: 14px; height: 14px; }
.linha-tempo .marca-tempo.ok { background: var(--ds-ok-fundo); color: var(--ds-ok); }
.linha-tempo .marca-tempo.info { background: var(--ds-info-fundo); color: var(--ds-info); }
.linha-tempo .marca-tempo.atencao { background: var(--ds-atencao-fundo); color: var(--ds-atencao); }
.linha-tempo .quando { color: var(--ds-texto-3); font-size: var(--ds-fs-12); white-space: nowrap; font-variant-numeric: tabular-nums; }
.linha-tempo .o-que b { color: var(--ds-tinta); }
.balao { max-width: 80%; padding: 8px 10px; border-radius: 12px 12px 12px 4px; background: var(--ds-superficie-3); font-size: var(--ds-fs-13); }
.balao.nosso { margin-left: auto; border-radius: 12px 12px 4px 12px; background: var(--ds-marca-suave); }
.balao .quando { display: block; margin-top: 2px; color: var(--ds-texto-3); font-size: var(--ds-fs-11); text-align: right; }
.paginacao { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--ds-borda);
  color: var(--ds-texto-3); font-size: var(--ds-fs-12); }
.dica-tecla { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border: 1px solid var(--ds-borda); border-bottom-width: 2px;
  border-radius: var(--ds-raio-1); color: var(--ds-texto-2); font-size: var(--ds-fs-11); font-weight: var(--ds-peso-forte); }
.pilha { display: flex; flex-direction: column; gap: var(--ds-secao-gap); }
.fileira { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.empurra { margin-left: auto; }
.esconde-celular { } @media (max-width: 767px) { .esconde-celular { display: none !important; } }
.so-celular { display: none !important; } @media (max-width: 767px) { .so-celular { display: revert !important; } }

/* ============================================================ acréscimos da revisão (faltaram nos protótipos do Rastreamento) */
/* legenda e eixo de gráfico: o texto fica fora do SVG, então o gráfico pode esticar sem deformar letra */
.legenda { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--ds-texto-2); font-size: var(--ds-fs-12); }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda i { width: 10px; height: 10px; border-radius: 2px; background: var(--ds-serie-1); }
.eixo { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; color: var(--ds-texto-3); font-size: var(--ds-fs-11); font-variant-numeric: tabular-nums; }
.grafico { display: block; width: 100%; height: 140px; }
/* linha de funil: rótulo, valor e barra */
.funil { display: flex; flex-direction: column; gap: 10px; }
.funil-linha { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; font-size: var(--ds-fs-13); }
.funil-linha > :first-child { color: var(--ds-tinta); font-weight: var(--ds-peso-forte); }
.funil-linha > :nth-child(2) { color: var(--ds-texto-2); font-variant-numeric: tabular-nums; }
.funil-linha .barra { grid-column: 1 / -1; }
/* fio de mensagens */
.fio { display: flex; flex-direction: column; gap: 6px; }
.fio .balao { align-self: flex-start; }
.fio .balao.nosso { align-self: flex-end; }
.fio-dia { align-self: center; margin: 6px 0; padding: 2px 10px; border-radius: var(--ds-raio-pilula); background: var(--ds-superficie-3); color: var(--ds-texto-2); font-size: var(--ds-fs-11); font-weight: var(--ds-peso-medio); }
.balao .autor { display: block; margin-bottom: 2px; color: var(--ds-texto-3); font-size: var(--ds-fs-11); font-weight: var(--ds-peso-forte); }
/* tons que faltavam */
.ponto.info { background: var(--ds-info-ico); } .ponto.novo { background: var(--ds-novo); } .ponto.neutro { background: var(--ds-texto-3); }
.nota.neutro { background: var(--ds-neutro-fundo); color: var(--ds-neutro); } .nota.info { background: var(--ds-info-fundo); color: var(--ds-info); }
/* número em destaque, fora da faixa */
.numero-destaque { color: var(--ds-tinta); font-size: var(--ds-fs-30); font-weight: var(--ds-peso-pesado); line-height: 1.1; font-variant-numeric: tabular-nums; }
/* ordem: o que vem primeiro no celular */
@media (max-width: 767px) { .primeiro-celular { order: -1; } }
/* texto longo numa linha */
.truncar { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.truncar { display: table-cell; max-width: 280px; }
/* celular: chip, segmentado, botão pequeno e link de ação também com 44 px */
@media (pointer: coarse), (max-width: 767px) {
  .chip, .bt-p, .bt-icone.bt-p { height: 44px; }
  .bt-icone.bt-p { width: 44px; }
  .segmentado button { height: 40px; min-height: 40px; }
  .segmentado { padding: 2px; }
  .bt-link { min-height: 44px; }
  .segmentado button { height: 44px; }
}
