/* Supernova — sistema visual corporativo: neutros frios, azul de marca discreto, bordas finas, sombras mínimas,
   tipografia compacta e hierarquia clara. Sem estilos inline (CSP). */
:root {
  --bg: #f3f5f9; --surface: #ffffff; --surface-2: #f9fafb; --surface-hover: #f2f4f7;
  --line: #e4e7ec; --line-strong: #d0d5dd;
  --text: #101828; --text-2: #344054; --muted: #5b6678;
  --brand: #1d4ed8; --brand-hover: #1a43bd; --brand-soft: #eff4ff; --brand-line: #b2ccff;
  --go: #067647; --go-hover: #05603a; --go-soft: #ecfdf3; --go-line: #abefc6;
  --warn: #b54708; --warn-soft: #fffaeb; --warn-line: #fedf89;
  --err: #b42318; --err-soft: #fef3f2; --err-line: #fecdca;
  --info: #175cd3; --info-soft: #eff8ff;
  --neutral: #475467; --neutral-soft: #f2f4f7;
  --side: #0b1b33; --side-text: #b4c0d4; --side-line: #ffffff14;
  --ring: #1d4ed833; --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px #1018280f; --shadow-md: 0 4px 12px #10182814;
  /* nomes antigos usados por outras telas */
  --ok: #067647; --ok-bg: #ecfdf3; --ok-text: #067647; --accent: #1d4ed8; --accent-2: #1d4ed8; --header: #0b1b33;
}
@font-face { font-family: "Inter"; src: url("/assets/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 .25rem; font-weight: 650; letter-spacing: -.02em; }
h2 { font-size: 1.05rem; margin: 0 0 .4rem; font-weight: 650; display: flex; align-items: center; gap: .55rem; letter-spacing: -.01em; }
h3 { font-size: .95rem; margin: 0 0 .5rem; font-weight: 650; }
p { margin: .25rem 0 .8rem; }
.muted { color: var(--muted); }
a { color: var(--brand); font-weight: 600; text-underline-offset: 2px; }
strong { font-weight: 650; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.ico { width: 1.15em; height: 1.15em; flex: none; }

/* ── Estrutura: menu lateral + área de trabalho ──────────────────────────────── */
.app { --menu-w: 236px; min-height: 100vh; display: grid; grid-template-columns: var(--menu-w) minmax(0, 1fr); transition: grid-template-columns .18s ease; }
.app.recolhido { --menu-w: 68px; }
.menu { position: sticky; top: 0; height: 100vh; z-index: 6; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; gap: 1rem; padding: .9rem .7rem; }
.marca { display: flex; align-items: center; gap: .65rem; padding: .2rem .45rem; text-decoration: none; color: #fff; min-height: 40px; }
.marca-logo { width: 30px; height: 30px; border-radius: 8px; background: #fff; flex: none; }
.marca b { font-size: 1.02rem; font-weight: 650; letter-spacing: -.01em; }
.menu nav { display: grid; gap: .15rem; }
.item-menu, .conector-menu, .perfil summary {
  display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 40px; padding: .5rem .7rem; border: 0; border-radius: var(--radius-sm);
  background: transparent; box-shadow: none; color: var(--side-text); font-size: .9rem; font-weight: 550; text-decoration: none; text-align: left; justify-content: flex-start;
}
.item-menu:hover, .conector-menu:hover, .perfil summary:hover { background: #ffffff10; color: #fff; border: 0; }
.item-menu[aria-current="page"] { background: #ffffff1c; color: #fff; box-shadow: inset 3px 0 0 #6d97ff; }
.item-menu .ico { width: 1.2rem; height: 1.2rem; }
.menu-fim { margin-top: auto; display: grid; gap: .15rem; border-top: 1px solid var(--side-line); padding-top: .8rem; }
.conector-menu .ponto { width: .6rem; height: .6rem; margin: 0 .3rem; border-radius: 50%; background: #8391a8; flex: none; }
.conector-menu.tom-ok .ponto { background: #34d399; box-shadow: 0 0 0 3px #34d39933; }
.conector-menu.tom-aviso .ponto { background: #f59e0b; box-shadow: 0 0 0 3px #f59e0b33; }
.conector-menu.tom-erro .ponto { background: #f87171; box-shadow: 0 0 0 3px #f8717133; }
.conector-menu { background: transparent; border: 0; }
.perfil { position: relative; }
.perfil summary { list-style: none; cursor: pointer; }
.perfil summary::-webkit-details-marker { display: none; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: .74rem; font-weight: 700; flex: none; margin: 0 .1rem; }
.perfil-nome { display: grid; min-width: 0; line-height: 1.25; }
.perfil-nome b { color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perfil-nome small { color: #8391a8; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perfil-caixa { position: absolute; left: calc(100% + .5rem); bottom: 0; width: 260px; background: #fff; color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: .9rem; display: grid; gap: .3rem; z-index: 10; }
.perfil-caixa small { color: var(--muted); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; margin-top: .3rem; }
.perfil-caixa select { min-height: 36px; }
.conta-nome, .conta-email { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.perfil-caixa button { margin-top: .6rem; }
.recolhido .rotulo { display: none; }
.recolhido .item-menu, .recolhido .conector-menu, .recolhido .perfil summary { justify-content: center; padding-inline: 0; }
.recolhido .marca { justify-content: center; padding-inline: 0; }
.recolhido .recolher .ico { transform: rotate(180deg); }

.area { min-width: 0; height: 100vh; display: flex; flex-direction: column; }
.topo { flex: none; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.topo-titulo { display: flex; align-items: baseline; gap: .8rem; min-width: 0; }
.topo h1 { font-size: 1.1rem; margin: 0; white-space: nowrap; }
.topo-contexto { color: var(--muted); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topo-acoes { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
main#conteudo { flex: 1; min-height: 0; overflow: auto; }
.pagina { padding: 1.25rem 1.5rem 2rem; display: grid; gap: 1rem; align-content: start; }
.pagina.cheia { height: 100%; display: flex; flex-direction: column; padding-bottom: 1.25rem; gap: .85rem; }
.page { max-width: 1040px; margin: 0 auto; padding: 1.5rem 1.5rem 4rem; }
.page h1 { display: none; } /* o título já aparece na barra superior */
.pagehead { margin-bottom: 1.2rem; }
.pagehead p { font-size: .95rem; margin: 0; max-width: 70ch; }
.bloco-titulo { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; margin: 1.6rem 0 .7rem; }
.upload { display: inline-flex; }

/* ── Visão geral ─────────────────────────────────────────────────────────────── */
.indicadores, .resumo-filtros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.indicador { display: grid; gap: .1rem; justify-items: start; justify-content: stretch; align-content: start; text-align: left; padding: .85rem 1.1rem; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; color: var(--text); text-decoration: none; font-weight: 500; }
a.indicador:hover, button.indicador:hover { border-color: var(--brand-line); background: var(--surface); }
.indicador-valor { font-size: 1.65rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.indicador-rotulo { font-size: .8rem; color: var(--muted); font-weight: 550; }
.indicador.tom-ok .indicador-valor { color: var(--go); }
.indicador.tom-aviso .indicador-valor { color: var(--warn); }
.indicador.tom-erro .indicador-valor { color: var(--err); }
.indicador.tom-destaque .indicador-valor { color: var(--brand); }
.indicador[aria-selected="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.duas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.bloco { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.bloco h2 { font-size: .95rem; margin-bottom: .9rem; }
.progresso-texto { margin: .5rem 0 1rem; font-size: .9rem; }
progress { appearance: none; -webkit-appearance: none; width: 100%; height: 8px; border: 0; border-radius: 999px; background: #e8ecf3; overflow: hidden; display: block; }
progress::-webkit-progress-bar { background: #e8ecf3; border-radius: 999px; }
progress::-webkit-progress-value { background: var(--brand); border-radius: 999px; transition: width .3s ease; }
progress::-moz-progress-bar { background: var(--brand); border-radius: 999px; }
progress.grande { height: 10px; }
.conector-linha { display: flex; align-items: center; gap: .6rem; padding-top: .8rem; border-top: 1px solid var(--line); color: var(--text-2); text-decoration: none; font-size: .9rem; font-weight: 550; }
.conector-linha .ico { margin-left: auto; color: var(--muted); }
.conector-linha .ponto { width: .6rem; height: .6rem; border-radius: 50%; background: #98a2b3; }
.conector-linha.tom-ok .ponto { background: #12b76a; }
.conector-linha.tom-aviso .ponto { background: #f79009; }
.conector-linha.tom-erro .ponto { background: #f04438; }
.atencoes { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.atencao { display: flex; align-items: center; gap: .65rem; padding: .6rem .8rem; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 550; }
.atencao a { margin-left: auto; font-size: .84rem; white-space: nowrap; }
.atencao.tom-erro { background: var(--err-soft); color: var(--err); }
.atencao.tom-aviso { background: var(--warn-soft); color: var(--warn); }
.atencao.tom-info { background: var(--brand-soft); color: var(--brand); }
.aviso-pagina { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .55rem .9rem; border-radius: var(--radius-sm); background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn); font-size: .88rem; font-weight: 550; }
.aviso-pagina a, .aviso-pagina button { margin-left: auto; }
.aviso-pagina.erro { background: var(--err-soft); border-color: var(--err-line); color: var(--err); }

/* ── Consumo e administração ─────────────────────────────────────────────────── */
.indicadores.cinco { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.seletor-mes { width: auto; min-height: 36px; }
.tabela-caixa.solta { flex: none; border: 0; border-radius: 0; background: transparent; }
.bloco .tabela-caixa.solta table { font-size: .88rem; }
.bloco + .bloco { margin-top: 0; }
.preco-campo { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-weight: 600; }
.preco-campo input.preco { width: 6.2rem; min-height: 32px; padding: .2rem .5rem; box-shadow: none; }
.selo.sutil { margin-left: .5rem; }
tr.inativa td { opacity: .6; }
tr.extrato td { background: var(--surface-2); padding: .5rem 1.2rem 1rem; cursor: default; }
tr.extrato table { width: 100%; }
tr.extrato td td { border-bottom: 1px solid var(--line); padding: .4rem .6rem; }
.tabela-caixa tbody tr.extrato:hover { background: var(--surface-2); }

/* ── Listas: filtros, busca, tabela e painel de detalhes ─────────────────────── */
.lista { flex: 1; min-height: 0; display: flex; gap: .9rem; }
.lista-corpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .75rem; position: relative; }
.filtros { display: flex; gap: .25rem; flex-wrap: wrap; }
.filtro { min-height: 32px; padding: .25rem .8rem; border: 0; border-radius: 999px; background: transparent; box-shadow: none; color: var(--muted); font-size: .86rem; gap: .45rem; }
.filtro:hover { background: #e6eaf1; color: var(--text); border: 0; }
.filtro[aria-selected="true"] { background: var(--brand-soft); color: var(--brand); }
.filtro .n { font-size: .76rem; font-weight: 650; opacity: .8; }
.ferramentas { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.busca { position: relative; flex: 1 1 320px; max-width: 520px; }
.busca .ico { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.busca input[type=search] { padding-left: 2.4rem; min-height: 38px; box-shadow: none; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .3rem .15rem .75rem; border-radius: 999px; background: var(--brand-soft); border: 1px solid var(--brand-line); font-size: .82rem; font-weight: 600; color: var(--brand); }
.chip button { min-height: 22px; width: 22px; padding: 0; border-radius: 50%; border: 0; background: transparent; box-shadow: none; color: var(--brand); }
.tabela-caixa { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tabela-rolagem { flex: 1; min-height: 0; overflow: auto; }
.tabela-caixa table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tabela-caixa th, .tabela-caixa td { text-align: left; padding: .6rem .9rem; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.tabela-caixa th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }
.tabela-caixa tbody tr { transition: background .12s; cursor: pointer; }
.tabela-caixa tbody tr:hover { background: #f6f8fb; }
.tabela-caixa tr.marcada { background: var(--brand-soft); }
.tabela-caixa tr.aberta { background: #e9f0ff; }
.tabela-caixa td.nome { font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.tabela-caixa td.placa { font-weight: 650; letter-spacing: .04em; }
.tabela-caixa td.mono { font-variant-numeric: tabular-nums; color: var(--text-2); }
.tabela-caixa .num { text-align: right; font-variant-numeric: tabular-nums; }
.tabela-caixa .col-check { width: 2.6rem; text-align: center; }
.tabela-caixa .col-acoes { text-align: right; width: 1%; }
.tabela-caixa .col-acoes > * + * { margin-left: .4rem; }
.tabela-caixa input[type=checkbox] { width: 1.05rem; height: 1.05rem; accent-color: var(--brand); }
.tabela-caixa td.vazio { text-align: center; color: var(--muted); padding: 3rem 1rem; border: 0; cursor: default; }
.progresso-celula { display: flex; align-items: center; gap: .6rem; min-width: 170px; }
.progresso-celula progress { width: 110px; }
.tabela-rodape { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .5rem 1rem; border-top: 1px solid var(--line); background: var(--surface-2); }
.tabela-rodape .muted { margin-right: auto; font-size: .84rem; }
.grav { font-weight: 600; }
.grav.consta { color: var(--warn); }
.barra-selecao { position: absolute; left: 50%; bottom: 3.2rem; transform: translateX(-50%); z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .8rem; width: max-content; max-width: calc(100% - 1.5rem);
  background: var(--side); color: #fff; padding: .55rem .75rem .55rem 1rem; border-radius: 12px; box-shadow: 0 10px 28px #0b1b3366; animation: subir .16s ease; }
.barra-texto { margin-right: .6rem; font-size: .9rem; }
.barra-selecao button { min-height: 34px; }
.barra-selecao button:not(.primary) { background: transparent; color: #dbe4f4; border-color: #ffffff40; box-shadow: none; }
.barra-selecao button:not(.primary):hover { background: #ffffff1c; }
.barra-selecao button.ghost { border-color: transparent; }

.lista.com-detalhe .col-doc, .lista.com-detalhe .col-grav { display: none; }
.detalhe { flex: none; width: 340px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; animation: entrar .18s ease; align-self: stretch; }
.detalhe-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; margin-bottom: 1rem; }
.detalhe-topo h2 { font-size: 1.02rem; margin: 0 0 .4rem; display: block; overflow-wrap: anywhere; }
.detalhe-erro { background: var(--err-soft); color: var(--err); border: 1px solid var(--err-line); border-radius: var(--radius-sm); padding: .6rem .8rem; font-size: .88rem; margin: 0 0 1rem; }
.dados { margin: 0; display: grid; }
.dado { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.dado dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
.dado dd { margin: .1rem 0 0; display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-weight: 550; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.detalhe-acoes { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
button.icone-perigo { color: var(--err); border-color: var(--err-line); }
button.icone-perigo:hover { background: var(--err-soft); border-color: #f9a39b; }
button.icone { min-height: 28px; width: 28px; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--muted); border-radius: 6px; flex: none; }
button.icone:hover { background: var(--neutral-soft); color: var(--text); border: 0; }
@keyframes entrar { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@keyframes subir { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .detalhe, .barra-selecao, .app { animation: none; transition: none; } }

/* ── Cartões ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.35rem 1.5rem; box-shadow: var(--shadow); margin-bottom: 1rem;
}
.card.destaque { border-color: var(--brand-line); background: var(--brand-soft); }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.row.fim { align-items: end; }
.row > .grow { flex: 1 1 220px; }
.row.topo { margin-top: .9rem; }
.empty { text-align: center; padding: 2.6rem 1rem; color: var(--muted); }
.empty .ico { width: 2.4rem; height: 2.4rem; color: var(--brand); margin-bottom: .5rem; }
details.avancado { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 1rem; box-shadow: var(--shadow); }
details.avancado > summary { cursor: pointer; padding: .95rem 1.3rem; font-weight: 600; list-style: none; display: flex; align-items: center; gap: .6rem; color: var(--text-2); }
details.avancado > summary::-webkit-details-marker { display: none; }
details.avancado > summary::after { content: "Mostrar"; margin-left: auto; color: var(--brand); font-size: .85rem; font-weight: 600; }
details.avancado[open] > summary::after { content: "Ocultar"; }
details.avancado > .conteudo { padding: 0 1.3rem 1.2rem; }

/* ── Formulários e botões ──────────────────────────────────────────────────── */
label { display: block; font-size: .85rem; color: var(--text-2); margin-bottom: .3rem; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select {
  width: 100%; min-height: 42px; padding: .55rem .8rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); font: inherit; box-shadow: var(--shadow);
}
input::placeholder { color: #98a2b3; }
input:hover, select:hover { border-color: #b0b9c7; }
input:focus, select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px var(--ring); }
input:disabled { background: var(--surface-hover); color: var(--muted); }
button, .btn {
  font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; min-height: 36px; padding: .4rem .9rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: #fff; color: var(--text-2); text-decoration: none; box-shadow: var(--shadow);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; transition: background .12s, border-color .12s;
}
button:hover, .btn:hover { background: var(--surface-hover); border-color: #b0b9c7; }
button.primary, .btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
button.primary:hover, .btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
button.go, .btn.go { background: var(--brand); border-color: var(--brand); color: #fff; }
button.go:hover, .btn.go:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
button.big, .btn.big { min-height: 46px; font-size: 1rem; padding: .65rem 1.5rem; }
button.danger { color: var(--err); border-color: var(--err-line); background: #fff; }
button.danger:hover { background: var(--err-soft); border-color: #f9a39b; }
button.small, .btn.small { min-height: 30px; padding: .2rem .65rem; font-size: .82rem; }
button:disabled { opacity: .45; cursor: not-allowed; }
.field { margin-bottom: .95rem; }
.check { display: flex; gap: .6rem; align-items: center; font-weight: 550; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--brand); }

/* ── Selos e avisos ────────────────────────────────────────────────────────── */
.badge, .selo { display: inline-flex; align-items: center; gap: .4rem; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge::before, .selo::before { content: ""; width: .42rem; height: .42rem; border-radius: 50%; background: currentColor; }
.tone-ok { background: var(--go-soft); color: var(--go); border-color: var(--go-line); }
.tone-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.tone-err { background: var(--err-soft); color: var(--err); border-color: var(--err-line); }
.tone-info { background: var(--info-soft); color: var(--info); border-color: #b2ddff; }
.tone-neutral { background: var(--neutral-soft); color: var(--neutral); border-color: var(--line); }
.notice { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; padding: .85rem 1.1rem; border-radius: var(--radius); margin: 0 0 1rem; border: 1px solid transparent; font-weight: 550; }
.notice .ico { width: 1.25rem; height: 1.25rem; }
.notice.tone-warn { border-color: var(--warn-line); }
.notice.tone-info { border-color: #b2ddff; }
.notice.tone-err { border-color: var(--err-line); }
.notice a.btn { margin-left: auto; }
.notice::before { content: none; }
#toasts { position: fixed; right: 1.2rem; bottom: 1.2rem; display: grid; gap: .5rem; z-index: 10; max-width: min(400px, calc(100vw - 2rem)); }
.toast { padding: .85rem 1.1rem; border-radius: var(--radius-sm); box-shadow: var(--shadow-md); border: 1px solid var(--line); border-left: 4px solid var(--brand); background: #fff; font-weight: 550; }
.toast.err { border-left-color: var(--err); }
.toast.ok { border-left-color: var(--go); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Importar planilha ─────────────────────────────────────────────────────── */
.importar { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.importar > div:first-child { flex: 1 1 320px; }
.importar h2 { font-size: 1.15rem; }
.importar p { margin-bottom: 0; }

/* ── Meu computador (Conector) ────────────────────────────────────────────── */
.situacao { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.2rem; }
.situacao .luz { width: 2.8rem; height: 2.8rem; border-radius: 10px; display: grid; place-items: center; background: var(--neutral-soft); color: var(--neutral); border: 1px solid var(--line); }
.situacao .luz .ico { width: 1.4rem; height: 1.4rem; }
.situacao.ok .luz { background: var(--go-soft); color: var(--go); border-color: var(--go-line); }
.situacao.aviso .luz { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.situacao .texto { flex: 1 1 260px; }
.situacao .texto strong { font-size: 1.05rem; display: block; }
.codigo { font-size: 2rem; font-weight: 650; letter-spacing: .3em; text-align: center; padding: 1rem; margin: .8rem 0;
  border: 1px dashed var(--brand); border-radius: var(--radius-sm); color: var(--brand); user-select: all; background: var(--brand-soft); font-variant-numeric: tabular-nums; }
.lista-pcs { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .5rem; }
.lista-pcs li { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; padding: .7rem .95rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.passos { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 1rem; }
.passo { display: flex; gap: .95rem; align-items: flex-start; }
.passo-n { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--text); color: #fff; display: grid; place-items: center; font-weight: 650; font-size: .88rem; margin-top: .1rem; }
.passo > div { flex: 1; }
.passo h2 { font-size: 1.05rem; }
.duas-colunas { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin: 1rem 0; }
.duas-colunas > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem 1.1rem; }
.duas-colunas ul { margin: .4rem 0 0; padding-left: 1.2rem; }

/* ── Navegador remoto (gov.br) e termo ─────────────────────────────────────── */
.janela { max-width: 1280px; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow-md); }
.janela-barra { display: flex; align-items: center; gap: .6rem; background: var(--side); color: var(--side-text); padding: .5rem .9rem; font-size: .84rem; font-weight: 600; }
.janela-barra i { width: 9px; height: 9px; border-radius: 50%; background: #ffffff40; }
.janela-barra .ico { width: 1em; height: 1em; margin-left: .3rem; }
.tela-remota { width: 100%; aspect-ratio: 16 / 9; background: #000; touch-action: none; cursor: default; display: block; }
.entrada-remota { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; resize: none; }
.termo {
  white-space: pre-wrap; font: inherit; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .9rem 1.1rem; max-height: 320px; overflow: auto; margin: .7rem 0;
}

/* ── Login / primeiro acesso: dois painéis ────────────────────────────────── */
.entrada { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 5fr) minmax(380px, 6fr); background: var(--surface); }
.entrada-lado {
  background: radial-gradient(900px 500px at 10% 0%, #1d4ed855 0%, transparent 60%), var(--side);
  color: #fff; padding: 3.5rem clamp(2rem, 5vw, 4.5rem); display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
}
.entrada-marca { display: flex; align-items: center; gap: .8rem; }
.entrada-marca img { width: 40px; height: 40px; border-radius: 10px; background: #fff; }
.entrada-marca b { font-size: 1.15rem; font-weight: 650; }
.entrada-lado h2 { font-size: 2rem; line-height: 1.2; font-weight: 650; letter-spacing: -.02em; display: block; margin: 0 0 1rem; max-width: 18ch; }
.entrada-lado p { color: #a9b8d1; font-size: 1.02rem; max-width: 44ch; }
.entrada-passos { display: grid; gap: .9rem; margin: 1.6rem 0 0; padding: 0; list-style: none; }
.entrada-passos li { display: flex; gap: .8rem; align-items: center; color: #dbe4f4; font-weight: 500; }
.entrada-passos .ico { width: 2rem; height: 2rem; padding: .45rem; border-radius: 8px; background: #ffffff14; color: #9db8ff; }
.entrada-rodape { color: #6f82a3; font-size: .8rem; }
.entrada-form { display: grid; place-items: center; padding: 2.5rem 1.5rem; }
.entrada-caixa { width: min(100%, 400px); }
.entrada-caixa h1 { font-size: 1.6rem; margin-bottom: .3rem; }
.entrada-caixa > .muted { margin-bottom: 1.5rem; }
.entrada-caixa button[type=submit] { width: 100%; min-height: 46px; font-size: 1rem; }
.entrada-caixa .notice { margin-bottom: 1rem; }

/* ── Telas estreitas ───────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .entrada { grid-template-columns: 1fr; }
  .entrada-lado { padding: 1.6rem 1.4rem; gap: 1rem; }
  .entrada-lado h2, .entrada-passos, .entrada-lado p, .entrada-rodape { display: none; }
}
@media (max-width: 1200px) {
  .detalhe { position: fixed; z-index: 8; top: 0; right: 0; bottom: 0; width: min(380px, 100%); border-radius: 0; border-width: 0 0 0 1px; box-shadow: var(--shadow-md); }
}
@media (max-width: 860px) {
  .app { --menu-w: 68px; }
  .rotulo { display: none; }
  .item-menu, .conector-menu, .perfil summary, .marca { justify-content: center; padding-inline: 0; }
  .duas { grid-template-columns: 1fr; }
  .indicadores, .indicadores.cinco, .resumo-filtros { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topo { padding: .5rem 1rem; }
  .topo-contexto { display: none; }
  .pagina { padding: 1rem; }
  .perfil-caixa { left: .5rem; bottom: calc(100% + .4rem); }
}
@media (max-width: 560px) {
  .card { padding: 1.1rem 1rem; }
  .codigo { font-size: 1.5rem; }
  button.big, .btn.big { width: 100%; }
  .notice a.btn { margin-left: 0; width: 100%; }
}
