/* =============================================================================
   OS Automática por Perda de Rendimento — Nova Canabrava Bioenergia
   Mesma identidade visual do Portal do Fornecedor / Gestão de Identidade (tokens da landing + acessibilidade AA).
   Tema CLARO apenas. Poppins auto-hospedada. Sem CDN.
   ========================================================================== */

@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/poppins-700.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/poppins-800.woff2") format("woff2"); }

:root {
  --blue-primary: #3B5998;
  --blue-dark: #2A4070;
  --blue-darker: #1E2D4F;
  --blue-light: #5A7BBF;
  --orange: #F5A623;
  --orange-hover: #E09010;
  --orange-texto: #B45309;
  --gray-bg: #F5F6F8;
  --gray-text: #2B2B2B;
  --gray-muted: #5B6472;
  --gray-borda: #D9DDE3;
  --borda-controle: #7E8795;
  --sucesso-texto: #15803D;
  --sucesso-fundo: #DCFCE7;
  --perigo-texto: #B91C1C;
  --perigo-fundo: #FEE2E2;
  --aviso-fundo: #FFF4E0;
  --info-fundo: #E8EDF7;
  --neutro-fundo: #EEF0F3;
  --radius-card: 0.75rem;
  --radius-btn: 0.5rem;
  --shadow-card: 0 4px 24px rgba(43, 43, 43, 0.08);
  --font: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-font-smoothing: antialiased; color-scheme: light; }
body { margin: 0; min-height: 100vh; font-family: var(--font); font-size: 1rem; line-height: 1.5; color: var(--gray-text); background: var(--gray-bg); }
:focus-visible { outline: 3px solid var(--blue-primary); outline-offset: 2px; }
input, select, textarea, button { font: inherit; }
a { color: var(--blue-primary); }
h1, h2, h3, p { margin: 0; }
.numeros, td.num, th.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--gray-muted); }
.pequeno { font-size: 0.875rem; }
.minusculo { font-size: 0.75rem; }
.negrito { font-weight: 700; }
.direita { text-align: right; }
.centro { text-align: center; }

/* ---------- Estrutura ---------- */
.app { display: flex; min-height: 100vh; }
.lateral { position: sticky; top: 0; align-self: flex-start; height: 100vh; width: 18rem; flex-shrink: 0; display: flex; flex-direction: column;
  background: var(--blue-darker); color: #fff; overflow-x: hidden; overflow-y: auto; isolation: isolate; transition: width .2s; }
.lateral::before { content: ""; position: absolute; top: -5rem; right: -4rem; width: 14rem; height: 14rem; border-radius: 50%;
  background: rgba(245, 166, 35, 0.10); filter: blur(48px); z-index: -1; pointer-events: none; }
.lateral .marca { padding: 1.5rem 1.5rem 1.25rem; }
.lateral .marca img { height: 2.5rem; display: block; }
.lateral .marca .simbolo { display: none; height: 2.5rem; }
.lateral .produto { margin-top: 1rem; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--orange); }
.lateral nav { flex: 1; padding: 0 .75rem; }
.lateral nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.lateral nav a { display: flex; align-items: center; gap: .75rem; min-height: 3rem; padding: 0 .75rem; border-radius: var(--radius-btn);
  color: rgba(255,255,255,.75); text-decoration: none; font-weight: 500; transition: background .15s, color .15s; }
.lateral nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.lateral nav a[aria-current="page"] { background: rgba(255,255,255,.10); color: #fff; }
.lateral nav .icone { display: flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; flex-shrink: 0; border-radius: .5rem; background: rgba(255,255,255,.05); }
.lateral nav a[aria-current="page"] .icone { background: var(--orange); color: var(--blue-darker); }
.lateral nav .icone svg { width: 1.25rem; height: 1.25rem; }
.lateral .grupo-menu { margin: 1rem .75rem .25rem; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.45); }
.lateral .rodape { border-top: 1px solid rgba(255,255,255,.10); padding: 1rem; }
.lateral .rodape .nome { font-weight: 600; font-size: .875rem; padding: 0 .5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lateral .rodape .perfil { font-size: .75rem; color: rgba(255,255,255,.6); padding: 0 .5rem; }
.lateral .rodape button, .lateral .rodape .botao-lateral { display: flex; width: 100%; align-items: center; gap: .5rem; min-height: 2.75rem; margin-top: .5rem; padding: 0 .5rem;
  border: 0; border-radius: var(--radius-btn); background: transparent; color: rgba(255,255,255,.8); cursor: pointer; font-weight: 500; }
.lateral .rodape button:hover { background: rgba(255,255,255,.05); color: #fff; }
.lateral .rodape svg { width: 1.25rem; height: 1.25rem; }
.lateral .versao { padding: .25rem .5rem 0; font-size: .7rem; color: rgba(255,255,255,.4); }
body.recolhida .lateral { width: 4.75rem; }
body.recolhida .lateral .marca { padding-left: .85rem; }
body.recolhida .lateral .marca img.horizontal, body.recolhida .lateral .produto, body.recolhida .lateral .rotulo,
body.recolhida .lateral .grupo-menu, body.recolhida .lateral .rodape .nome, body.recolhida .lateral .rodape .perfil,
body.recolhida .lateral .versao, body.recolhida .lateral .rodape .texto { display: none; }
body.recolhida .lateral .marca .simbolo { display: block; }
body.recolhida .lateral nav a { justify-content: center; padding: 0; }

.principal { min-width: 0; flex: 1; padding: 2rem; }
.conteudo { max-width: 76rem; margin: 0 auto; display: grid; gap: 1.5rem; }

/* ---------- Faixa de homologação ---------- */
.faixa-homologacao { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-radius: var(--radius-btn);
  background: var(--aviso-fundo); border: 1px solid #F5C77A; color: var(--orange-texto); font-size: .875rem; }
.faixa-homologacao strong { font-weight: 700; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius-card); padding: 1.5rem 1.75rem;
  color: #fff; background: linear-gradient(135deg, var(--blue-darker), var(--blue-dark) 50%, var(--blue-primary)); box-shadow: var(--shadow-card); }
.hero::before { content: ""; position: absolute; top: -4rem; right: -3rem; width: 13rem; height: 13rem; border-radius: 50%; background: rgba(245,166,35,.15); filter: blur(48px); z-index: -1; }
.hero::after { content: ""; position: absolute; bottom: -5rem; left: -3rem; width: 15rem; height: 15rem; border-radius: 50%; background: rgba(90,123,191,.20); filter: blur(48px); z-index: -1; }
.hero .eyebrow { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--orange); }
.hero h1 { margin-top: .25rem; font-size: 1.75rem; font-weight: 800; line-height: 1.2; }
.hero h1 .destaque { color: var(--orange); }
.hero p { margin-top: .5rem; color: rgba(255,255,255,.82); }
.hero .selo-hero { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1rem; padding: .25rem .75rem; border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px; background: rgba(255,255,255,.1); font-size: .875rem; font-weight: 500; }
.hero .selo-hero i { width: .5rem; height: .5rem; border-radius: 50%; background: var(--orange); animation: pulsar 2s infinite; }
@keyframes pulsar { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.85); } }
.hero .barra { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }

/* ---------- Cartões, grades ---------- */
.cartao { background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 1.25rem; }
.cartao > .cab { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: .75rem; }
.cartao > .cab .tile { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 2.75rem; height: 2.75rem; border-radius: .75rem;
  background: rgba(245,166,35,.10); color: var(--orange-texto); }
.cartao > .cab .tile.azul { background: rgba(59,89,152,.10); color: var(--blue-primary); }
.cartao > .cab .tile svg { width: 1.5rem; height: 1.5rem; }
.cartao .eyebrow { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--orange-texto); }
.cartao h2 { font-size: 1.125rem; font-weight: 700; line-height: 1.3; color: var(--blue-dark); }
.cartao .cab .extra { margin-left: auto; flex-shrink: 0; }
.grade { display: grid; gap: 1.25rem; }
.grade.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grade.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grade.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 1rem 1.25rem; border-top: 4px solid var(--blue-primary); }
.kpi.laranja { border-top-color: var(--orange); }
.kpi.verde { border-top-color: #2E9E5B; }
.kpi.vermelho { border-top-color: #C0392B; }
.kpi .rotulo { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-muted); }
.kpi .valor { margin-top: .25rem; font-size: 1.6rem; font-weight: 800; color: var(--blue-darker); line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi .valor small { font-size: .85rem; font-weight: 600; color: var(--gray-muted); }
.kpi .nota { margin-top: .25rem; font-size: .8rem; color: var(--gray-muted); }

/* ---------- Selos ---------- */
.selo { display: inline-flex; align-items: center; gap: .375rem; max-width: 100%; padding: .125rem .625rem; border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1.5; background: var(--neutro-fundo); color: var(--gray-text); white-space: nowrap; }
.selo.sucesso { background: var(--sucesso-fundo); color: var(--sucesso-texto); }
.selo.aviso { background: var(--aviso-fundo); color: var(--orange-texto); }
.selo.info { background: var(--info-fundo); color: var(--blue-dark); }
.selo.perigo { background: var(--perigo-fundo); color: var(--perigo-texto); }

/* ---------- Botões e formulários ---------- */
.botao { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem; padding: .5rem 1.25rem; border: 2px solid transparent; border-radius: var(--radius-btn);
  font-weight: 600; text-align: center; text-decoration: none; cursor: pointer; transition: background .2s; line-height: 1.2; }
.botao.primario { background: var(--orange); color: var(--blue-darker); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.botao.primario:hover { background: var(--orange-hover); }
.botao.secundario { background: var(--blue-primary); color: #fff; }
.botao.secundario:hover { background: var(--blue-dark); }
.botao.contorno { background: #fff; border-color: var(--blue-primary); color: var(--blue-primary); }
.botao.contorno:hover { background: rgba(59,89,152,.06); }
.botao.perigo { background: var(--perigo-texto); color: #fff; }
.botao.claro { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); color: #fff; }
.botao.claro:hover { background: rgba(255,255,255,.2); }
.botao.pequeno { min-height: 2.25rem; padding: .25rem .875rem; font-size: .875rem; }
.botao[disabled], .botao.desativado { opacity: .55; cursor: not-allowed; }
.campo { display: grid; gap: .375rem; }
.campo label { font-weight: 600; }
.campo .dica { font-size: .875rem; color: var(--gray-muted); }
.entrada, select.entrada, textarea.entrada { width: 100%; min-height: 3rem; padding: .5rem .875rem; border: 2px solid var(--borda-controle); border-radius: var(--radius-btn); background: #fff; color: var(--gray-text); }
textarea.entrada { min-height: 6rem; resize: vertical; }
.entrada:focus { border-color: var(--blue-primary); box-shadow: 0 0 0 3px rgba(59,89,152,.25); outline: none; }
.erro-campo { display: flex; gap: .375rem; font-size: .875rem; font-weight: 500; color: var(--perigo-texto); }
.aviso-erro { padding: .75rem 1rem; border-radius: var(--radius-btn); background: var(--perigo-fundo); color: var(--perigo-texto); font-weight: 500; }
.aviso-ok { padding: .75rem 1rem; border-radius: var(--radius-btn); background: var(--sucesso-fundo); color: var(--sucesso-texto); font-weight: 500; }
.aviso-info { padding: .75rem 1rem; border-radius: var(--radius-btn); background: var(--info-fundo); color: var(--blue-dark); }
.filtros { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.filtros .campo { min-width: 10rem; }

/* ---------- Tabelas ---------- */
.tabela-wrap { overflow-x: auto; border: 1px solid var(--gray-borda); border-radius: var(--radius-btn); }
table.tabela { width: 100%; border-collapse: collapse; font-size: .9rem; background: #fff; }
.tabela th { padding: .625rem .75rem; text-align: left; background: var(--info-fundo); color: var(--blue-dark); font-weight: 700; font-size: .8rem; white-space: nowrap; border-bottom: 1px solid var(--gray-borda); }
.tabela td { padding: .55rem .75rem; border-bottom: 1px solid var(--gray-borda); vertical-align: top; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela .num { text-align: right; white-space: nowrap; }
.tabela tr.secao td { background: var(--gray-bg); font-weight: 700; color: var(--blue-dark); text-transform: uppercase; font-size: .75rem; letter-spacing: .05em; }
.tabela tr.destaque td { background: #FFFBF2; }
.tabela tbody tr:hover td { background: #FAFBFD; }
.pos { color: var(--sucesso-texto); font-weight: 600; }
.neg { color: var(--perigo-texto); font-weight: 600; }

/* ---------- Detalhe da solicitação ---------- */
.campos-erp { display: grid; grid-template-columns: 15rem 1fr; gap: 0; border: 1px solid var(--gray-borda); border-radius: var(--radius-btn); overflow: hidden; }
.campos-erp dt, .campos-erp dd { margin: 0; padding: .55rem .75rem; border-bottom: 1px solid var(--gray-borda); }
.campos-erp dt { background: var(--info-fundo); font-weight: 600; font-size: .85rem; color: var(--blue-dark); }
.campos-erp dd { background: #fff; word-break: break-word; }
.campos-erp dd.vazio { color: var(--perigo-texto); font-style: italic; }
.campos-erp dt:last-of-type, .campos-erp dd:last-of-type { border-bottom: 0; }
pre.json { margin: 0; padding: 1rem; border-radius: var(--radius-btn); background: #0F172A; color: #E2E8F0; font-size: .78rem; overflow-x: auto; }
.lista-pend { margin: 0; padding-left: 1.25rem; }
.lista-pend li { margin: .25rem 0; }
.grafico { width: 100%; overflow-x: auto; }
.grafico svg { max-width: 100%; height: auto; }

/* ---------- Entrar ---------- */
.entrar-pagina { min-height: 100vh; background: var(--gray-bg); }
.entrar-pagina .hero { border-radius: 0; padding: 1.5rem 1.5rem 4rem; }
.entrar-pagina .hero img { height: 2.75rem; margin-bottom: 1.25rem; display: block; }
.entrar-caixa { position: relative; max-width: 28rem; margin: -2.5rem auto 2rem; padding: 0 1rem; }

@media (max-width: 1000px) {
  .grade.c3, .grade.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campos-erp { grid-template-columns: 1fr; }
  .campos-erp dt { border-bottom: 0; }
}
@media (max-width: 760px) {
  .app { flex-direction: column; }
  .lateral { position: static; width: 100%; height: auto; }
  body.recolhida .lateral { width: 100%; }
  .grade.c2, .grade.c3, .grade.c4 { grid-template-columns: 1fr; }
  .principal { padding: 1rem; }
}
@media print { .lateral, .faixa-homologacao, .botao { display: none !important; } .principal { padding: 0; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---- Motor de análises (unificação) ---- */
.abas { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.abas a { padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--gray-borda); color: var(--blue-dark); font-weight: 600; font-size: .875rem; text-decoration: none; background: #fff; }
.abas a[aria-current="page"] { background: var(--blue-primary); border-color: var(--blue-primary); color: #fff; }
.boletim-wpp { white-space: pre-wrap; font-family: inherit; font-size: .9rem; line-height: 1.5; background: #F3F7F0; border: 1px solid #DCE8D3; border-radius: var(--radius-btn); padding: 1rem; max-height: 32rem; overflow: auto; }
.hora { white-space: nowrap; font-variant-numeric: tabular-nums; }
.lista-rodadas { display: flex; flex-wrap: wrap; gap: .5rem; }
.lista-rodadas a { display: inline-flex; flex-direction: column; padding: .4rem .75rem; border: 1px solid var(--gray-borda); border-radius: var(--radius-btn); text-decoration: none; color: var(--blue-dark); background: #fff; font-size: .8rem; }
.lista-rodadas a strong { font-size: .95rem; }
.lista-rodadas a[aria-current="page"] { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(245,166,35,.35); }
.texto-longo { max-width: 34rem; }
.condicoes { display: grid; gap: .5rem; }
.condicoes .linha { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(12rem, 2fr) minmax(8rem, 1fr); gap: .5rem; }
@media (max-width: 720px) { .condicoes .linha { grid-template-columns: 1fr; } }

/* ---- Dashboard por área e caixa de edição ---- */
.subtitulo { font-size: .9rem; font-weight: 700; color: var(--blue-dark); margin: 0 0 .4rem; }
.insights { margin: .75rem 0 0; padding-left: 1.1rem; display: grid; gap: .2rem; }
.insights li { color: var(--gray-text); }
.cards-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.card-area { border: 1px solid var(--gray-borda); border-top: 4px solid var(--blue-primary); border-radius: var(--radius-card); padding: .9rem 1rem; background: #fff; display: grid; gap: .6rem; align-content: start; }
.card-area header { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.card-area h3 { font-size: 1.05rem; color: var(--blue-darker); }
.pilha { display: flex; height: 1.5rem; border-radius: 999px; overflow: hidden; background: var(--gray-bg); }
.pilha i { display: flex; align-items: center; justify-content: center; font-style: normal; font-size: .72rem; font-weight: 700; color: #fff; min-width: 1.3rem; }
.pilha .n-CRITICO { background: #C0392B; } .pilha .n-ALTO { background: #F48300; } .pilha .n-MEDIO { background: #3B5998; } .pilha .n-BAIXO { background: #B8C4E5; color: #1E2D4F; }
.card-area .chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.card-area .vars { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.card-area .vars li { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "v1 v3" "v2 v3" "v4 v4"; gap: .1rem .75rem; padding-bottom: .5rem; border-bottom: 1px dashed var(--gray-borda); }
.card-area .vars li:last-child { border-bottom: 0; }
.v1 { grid-area: v1; } .v2 { grid-area: v2; display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; } .v3 { grid-area: v3; align-self: center; } .v4 { grid-area: v4; display: flex; gap: .5rem; align-items: center; }
.valor-faixa { font-weight: 700; font-variant-numeric: tabular-nums; }
dialog.caixa { border: 0; border-radius: var(--radius-card); padding: 0; width: min(42rem, 94vw); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog.caixa::backdrop { background: rgba(30,45,79,.55); }
dialog.caixa form { display: grid; gap: .9rem; padding: 1.25rem 1.5rem 1.5rem; }
dialog.caixa h2 { font-size: 1.15rem; color: var(--blue-darker); }
dialog.caixa .rodape-caixa { display: flex; gap: .75rem; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Rastreamento: menu oculto (gaveta), mapa em destaque e linhas em faixa na base ---------- */
.titulo-lista { font-size: 1.1rem; font-weight: 700; color: var(--blue-darker); margin-bottom: .75rem; }
.tabela input.entrada, .tabela select.entrada { min-height: 2.25rem; padding: .25rem .5rem; }
.tabela form { display: contents; }
.acoes-linha { white-space: nowrap; }
.acoes-linha .botao + .botao { margin-left: .25rem; }
[hidden] { display: none !important; }
.leaflet-container { max-width: 100%; font-family: var(--font); }

.app { display: block; min-height: 100vh; }
.lateral, body.recolhida .lateral { position: fixed; top: 0; bottom: 0; left: 0; width: min(18rem, 86vw); height: auto; z-index: 3000; padding-top: env(safe-area-inset-top);
  transform: translateX(-105%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
.lateral.aberto { transform: none; visibility: visible; transition: transform .2s ease; box-shadow: 4px 0 24px rgba(0,0,0,.35); }
.lateral .marca img.horizontal, body.recolhida .lateral .marca img.horizontal { display: block; }
.lateral .marca .simbolo { display: none; }
.lateral .rotulo, .lateral .grupo-menu, .lateral .rodape .nome, .lateral .rodape .perfil, .lateral .versao, .lateral .rodape .texto, .lateral .produto { display: block; }
.lateral .espaco-menu { flex: 1; }
.fundo-menu { display: none; position: fixed; inset: 0; z-index: 2900; background: rgba(15, 23, 42, .45); }
.fundo-menu.aberto { display: block; }
.principal { padding: calc(.5rem + env(safe-area-inset-top)) calc(1.25rem + env(safe-area-inset-right)) calc(.75rem + env(safe-area-inset-bottom)) calc(1.25rem + env(safe-area-inset-left)); }
.barra-topo { display: flex; align-items: center; gap: .75rem; max-width: 76rem; margin: 0 auto .5rem; }
.pagina-painel .barra-topo, .pagina-painel .conteudo { max-width: none; }
.botao-menu { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; padding: 0; border: 1px solid var(--gray-borda); border-radius: var(--radius-btn);
  background: #fff; color: var(--blue-darker); cursor: pointer; box-shadow: 0 1px 3px rgba(43,43,43,.08); }
.botao-menu svg { width: 1.4rem; height: 1.4rem; }
.titulo-topo { font-size: .85rem; font-weight: 600; color: var(--gray-muted); }
body.mapa-cheia-ativa { overflow: hidden; }
body.mapa-cheia-ativa .botao-menu { visibility: hidden; }

.mapa-cartao { padding: .5rem; min-width: 0; }
.mapa-wrap { position: relative; }
.mapa { height: calc(100dvh - 10.5rem); min-height: 18rem; border-radius: var(--radius-btn); z-index: 0; }
.mapa-botao { position: absolute; top: .5rem; right: .5rem; z-index: 500; background: #fff; }
.mapa-cartao.cheia { position: fixed; inset: 0; z-index: 2000; padding: 0; border-radius: 0; }
.mapa-cartao.cheia .mapa-wrap, .mapa-cartao.cheia .mapa { height: 100%; border-radius: 0; }
.mapa-cartao.cheia .mapa-botao { top: calc(.5rem + env(safe-area-inset-top)); right: .5rem; }
.rotulo-onibus { font-weight: 700; font-size: .75rem; padding: .05rem .4rem; border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.3); }

/* cartão de detalhe da linha selecionada: sutil, sobre o mapa */
.mapa-detalhe { position: absolute; left: .5rem; bottom: 1.75rem; z-index: 600; width: min(21rem, calc(100% - 1rem)); display: grid; gap: .125rem; padding: .5rem .75rem;
  background: rgba(255,255,255,.96); border-radius: var(--radius-btn); box-shadow: 0 2px 10px rgba(0,0,0,.25); font-size: .8rem; color: var(--gray-muted); }
.mapa-cartao.cheia .mapa-detalhe { bottom: calc(1.75rem + env(safe-area-inset-bottom)); }
.mapa-detalhe .detalhe-topo { display: flex; justify-content: space-between; align-items: center; gap: .5rem; color: var(--blue-darker); font-size: .85rem; }
.mapa-detalhe .detalhe-fechar { border: 0; background: transparent; font-size: 1.25rem; line-height: 1; cursor: pointer; color: var(--gray-muted); padding: 0 .25rem; }
.mapa-detalhe .sit { font-weight: 600; color: var(--gray-text); }
.aviso-linha { color: var(--orange-texto); }

/* linhas: faixa única na base da tela */
.painel-lista { min-width: 0; margin-top: .5rem; }
.lista-linhas { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; scroll-snap-type: x proximity; }
.linha-item { flex: 0 0 auto; display: grid; width: auto; min-width: 11rem; max-width: 85vw; text-align: left; padding: .4rem .75rem; border: 1px solid var(--gray-borda);
  border-radius: var(--radius-btn); background: #fff; cursor: pointer; box-shadow: 0 1px 3px rgba(43,43,43,.06); scroll-snap-align: start; }
.linha-item:hover { border-color: var(--blue-primary); }
.linha-item.aberta { border-color: var(--blue-primary); background: var(--info-fundo); }
.linha-topo { display: flex; align-items: center; gap: .5rem; min-width: 0; font-size: .85rem; }
.linha-topo .cod { color: var(--blue-darker); }
.linha-topo .nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gray-text); }
.linha-topo .tempo { font-size: .75rem; color: var(--gray-muted); white-space: nowrap; }
.ponto { width: .65rem; height: .65rem; border-radius: 50%; flex-shrink: 0; background: #5B6472; }
.ponto.sucesso { background: #2E9E5B; } .ponto.aviso { background: #F48300; } .ponto.perigo { background: #C0392B; } .ponto.info { background: #3B5998; }
.rodape-painel { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: 0 .25rem; margin-top: .25rem; font-size: .7rem; color: var(--gray-muted); }
.faixa-bio { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; justify-content: space-between; }
.faixa-bio .acoes { display: inline-flex; gap: .5rem; }

@media (max-width: 900px) {
  .principal { padding: calc(.5rem + env(safe-area-inset-top)) calc(.5rem + env(safe-area-inset-right)) calc(.5rem + env(safe-area-inset-bottom)) calc(.5rem + env(safe-area-inset-left)); }
  .conteudo { gap: .75rem; }
  .grade.c2, .grade.c3, .grade.c4 { grid-template-columns: 1fr; }
  .hero { padding: 1rem; } .hero h1 { font-size: 1.4rem; }
  .mapa { height: calc(100dvh - 11rem); }
  .linha-item { min-width: 10rem; }
  .entrar-pagina .hero { padding-top: calc(1.5rem + env(safe-area-inset-top)); }
}
@media (display-mode: standalone) { body { overscroll-behavior-y: contain; } }
