/* Korre · sistema visual */
:root {
  --fundo: #f5f3ef; --papel: #fff; --tinta: #14161a; --texto: #23262c; --sutil: #64748b; --linha: #ebe7e0; --linha-forte: #dad4ca;
  --azul: #ff5a1f; --azul-claro: #ffeadf; --ciano: #ff5a1f; --laranja: #14161a; --ambar: #f59e0b; --verde: #15803d; --verde-claro: #e7f6ec;
  --vermelho: #dc2626; --vermelho-claro: #fdecec; --cinza-graf: #cbd5e1;
  --lateral: #14161a; --lateral-texto: #9aa6b8; --lateral-ativo: rgba(255,255,255,.08);
  --raio: 12px; --raio-p: 8px; --sombra: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --sombra-alta: 0 12px 32px -8px rgba(15,23,42,.22), 0 2px 6px rgba(15,23,42,.08);
  --l: 256px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14.5px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--texto); background: var(--fundo); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
a { color: var(--azul); text-underline-offset: 3px; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0; letter-spacing: -.025em; color: var(--tinta); font-weight: 700; }
h2 { font-size: 1rem; margin: 0; letter-spacing: -.01em; color: var(--tinta); font-weight: 600; }
h3 { font-size: .82rem; margin: 1.4rem 0 .6rem; color: var(--sutil); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
.pular { position: absolute; left: -999px; top: 8px; z-index: 3000; background: var(--tinta); color: #fff; padding: .5rem .9rem; border-radius: var(--raio-p); }
.pular:focus { left: 8px; }

/* ---------- Lateral ---------- */
.lateral { position: fixed; inset: 0 auto 0 0; width: var(--l); background: var(--lateral); color: var(--lateral-texto); display: flex; flex-direction: column; padding: 1.1rem .85rem; z-index: 1200; gap: 1rem; }
.marca { display: flex; align-items: center; gap: .6rem; color: #fff; font-weight: 700; font-size: 1.05rem; text-decoration: none; letter-spacing: -.01em; padding: 0 .35rem; }
.marca-icone { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #24272d; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.marca-icone .simbolo { width: 26px; height: 26px; }
.marca > span:last-child { font-family: Archivo, Inter, sans-serif; font-style: italic; font-weight: 900; font-stretch: 115%; letter-spacing: -.03em; font-size: 1.45rem; }
h1, h2, .kpi-valor, .tempo-medio strong { font-family: Archivo, Inter, sans-serif; font-stretch: 108%; font-weight: 800; }
.login-marca { display: flex; align-items: center; gap: .6rem; margin-bottom: .2rem; }
.login-marca .marca-icone { background: var(--tinta); width: 42px; height: 42px; }
.login-marca .marca-icone .simbolo { width: 32px; height: 32px; }
.login-marca > span:last-child { font-family: Archivo, Inter, sans-serif; font-style: italic; font-weight: 900; font-stretch: 115%; font-size: 2.3rem; letter-spacing: -.03em; color: var(--tinta); }

.empresa { display: flex; align-items: center; gap: .65rem; padding: .6rem .65rem; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.06); }
.empresa-sigla { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #1e293b; color: #e2e8f0; font-size: .72rem; font-weight: 700; flex: none; }
.empresa small { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: #64748b; }
.empresa strong { display: block; color: #e2e8f0; font-weight: 600; font-size: .88rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.botao.nova { display: flex; align-items: center; justify-content: center; gap: .45rem; background: var(--azul); width: 100%; padding: .62rem; }
.botao.nova:hover { background: #e94a12; }
.menu { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.menu-titulo { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #536079; padding: .9rem .7rem .35rem; font-weight: 600; }
.menu a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: var(--raio-p); color: var(--lateral-texto); text-decoration: none; font-weight: 500; position: relative; transition: background .15s, color .15s; }
.menu a:hover { background: rgba(255,255,255,.05); color: #e2e8f0; }
.menu a[aria-current] { background: var(--lateral-ativo); color: #fff; }
.menu a[aria-current]::before { content: ""; position: absolute; left: -.85rem; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ciano); }
.menu a[aria-current] svg.i { color: var(--ciano); }
.ao-vivo { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; margin-left: auto; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulso 2.4s infinite; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.usuario { display: flex; align-items: center; gap: .6rem; padding: .7rem .5rem 0; border-top: 1px solid rgba(255,255,255,.07); }
.usuario-nome { flex: 1; min-width: 0; }
.usuario-nome strong { display: block; color: #e2e8f0; font-size: .86rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usuario-nome small { color: #64748b; font-size: .75rem; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #334155; color: #e2e8f0; font-size: .74rem; font-weight: 700; flex: none; }
.avatar.pequeno { width: 26px; height: 26px; font-size: .65rem; background: var(--azul-claro); color: var(--azul); }
.icone-botao { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--raio-p); border: 0; background: transparent; color: inherit; cursor: pointer; transition: background .15s; }
.icone-botao:hover { background: rgba(255,255,255,.08); }
.barra-movel { display: none; }
.veu { position: fixed; inset: 0; background: rgba(11,18,32,.5); z-index: 1100; }
.com-lateral main { margin-left: var(--l); padding: 1.75rem 2rem 2.5rem; }

/* ---------- Topo (motoboy) ---------- */
.topo { display: flex; align-items: center; gap: 1rem; padding: .55rem 1rem; background: var(--lateral); color: #fff; position: sticky; top: 0; z-index: 1000; }
.topo nav { display: flex; gap: .25rem; flex: 1; }
.topo nav a { color: var(--lateral-texto); text-decoration: none; padding: .5rem .75rem; border-radius: var(--raio-p); font-weight: 500; }
.topo nav a[aria-current] { color: #fff; background: var(--lateral-ativo); }
.topo .marca span:last-child { display: none; }
main.estreito { max-width: 560px; margin: 0 auto; padding: 1rem; }

/* ---------- Cabeçalho de página ---------- */
.cabeca { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.cabeca .sutil { margin: .2rem 0 0; }

/* ---------- Período ---------- */
.periodo { position: relative; }
.periodo-botao { display: flex; align-items: center; gap: .55rem; font: inherit; background: var(--papel); border: 1px solid var(--linha-forte); border-radius: 10px; padding: .55rem .8rem; cursor: pointer; color: var(--texto); box-shadow: var(--sombra); transition: border-color .15s, box-shadow .15s; }
.periodo-botao:hover { border-color: #b4bfcd; }
.periodo-botao[aria-expanded="true"] { border-color: var(--azul); box-shadow: 0 0 0 3px var(--azul-claro); }
.periodo-botao > svg.i:first-child { color: var(--azul); }
.periodo-rotulo { font-weight: 600; }
.periodo-datas { color: var(--sutil); padding-left: .55rem; border-left: 1px solid var(--linha); }
.periodo-botao > svg.i:last-child { width: 15px; height: 15px; color: var(--sutil); }
.periodo-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 1500; display: flex; background: var(--papel); border: 1px solid var(--linha); border-radius: 14px; box-shadow: var(--sombra-alta); overflow: hidden; }
.periodo-pop[hidden] { display: none; }
.atalhos { list-style: none; margin: 0; padding: .6rem; border-right: 1px solid var(--linha); background: #fafbfc; min-width: 170px; }
.atalhos a { display: block; padding: .5rem .7rem; border-radius: var(--raio-p); color: var(--texto); text-decoration: none; font-size: .88rem; white-space: nowrap; }
.atalhos a:hover { background: #eef2f6; }
.atalhos a[aria-current] { background: var(--azul-claro); color: var(--azul); font-weight: 600; }
.cal { padding: 1rem 1.1rem .9rem; }
.cal-meses { display: flex; gap: 1.6rem; }
.cal-mes { width: 252px; }
.cal-titulo { display: flex; align-items: center; justify-content: center; position: relative; height: 32px; margin-bottom: .4rem; font-weight: 600; color: var(--tinta); }
.cal-nav { position: absolute; top: 0; width: 32px; height: 32px; border: 1px solid var(--linha); background: var(--papel); border-radius: var(--raio-p); cursor: pointer; font-size: 1.15rem; line-height: 1; color: var(--texto); }
.cal-nav:hover { background: #f1f5f9; }
.cal-titulo .cal-nav:first-child { left: 0; }
.cal-titulo .cal-nav:last-child { right: 0; }
.cal-grade { display: grid; grid-template-columns: repeat(7, 36px); row-gap: 2px; }
.cal-dsem { text-align: center; font-size: .72rem; font-weight: 600; color: #94a3b8; padding: .3rem 0; }
.cal-dia { height: 36px; border: 0; background: transparent; font: inherit; font-size: .86rem; color: var(--texto); cursor: pointer; border-radius: var(--raio-p); position: relative; font-variant-numeric: tabular-nums; }
.cal-dia:hover:not(:disabled) { background: #eef2f6; }
.cal-dia:disabled { color: #cbd5e1; cursor: not-allowed; }
.cal-dia.hoje { font-weight: 700; color: var(--azul); }
.cal-dia.hoje::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.cal-dia.entre { background: var(--azul-claro); border-radius: 0; color: #9a3412; }
.cal-dia.ini, .cal-dia.fim { background: var(--azul); color: #fff; font-weight: 600; }
.cal-dia.faixa.ini { border-radius: var(--raio-p) 0 0 var(--raio-p); }
.cal-dia.faixa.fim { border-radius: 0 var(--raio-p) var(--raio-p) 0; }
.cal-dia.ini.fim { border-radius: var(--raio-p); }
.cal-dia.ini.hoje::after, .cal-dia.fim.hoje::after { background: #fff; }
.cal-pe { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid var(--linha); margin-top: .8rem; padding-top: .8rem; }
.cal-sel { color: var(--sutil); font-size: .85rem; }
.cal-acoes { display: flex; gap: .5rem; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .3rem; box-shadow: var(--sombra); min-width: 0; }
.kpi.destaque { background: linear-gradient(160deg, #2a2e35, #14161a); border-color: #14161a; color: #cbd5e1; box-shadow: inset 4px 0 0 #ff5a1f; }
.kpi.destaque .kpi-rotulo, .kpi.destaque small { color: #94a3b8; }
.kpi.destaque .kpi-valor { color: #fff; }
.kpi-rotulo { color: var(--sutil); font-size: .8rem; font-weight: 500; }
.kpi-valor { font-size: 1.75rem; font-weight: 700; letter-spacing: -.03em; color: var(--tinta); font-variant-numeric: tabular-nums; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-pe { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.kpi-pe small { color: var(--sutil); font-size: .76rem; }
.delta { display: inline-flex; align-items: center; font-size: .74rem; font-weight: 600; padding: .1rem .45rem; border-radius: 99px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.delta.bom { background: var(--verde-claro); color: var(--verde); }
.delta.ruim { background: var(--vermelho-claro); color: var(--vermelho); }
.delta.neutro { background: #eef2f6; color: #475569; }
.kpi.destaque .delta.bom { background: rgba(34,197,94,.15); color: #4ade80; }
.kpi.destaque .delta.ruim { background: rgba(248,113,113,.15); color: #fca5a5; }
.kpi.destaque .delta.neutro { background: rgba(255,255,255,.08); color: #cbd5e1; }

/* ---------- Blocos e grades ---------- */
.bloco, .cartao { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 1.2rem 1.3rem; margin-bottom: 1rem; box-shadow: var(--sombra); min-width: 0; }
.bloco-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.bloco-cab .sutil { margin: .15rem 0 0; font-size: .8rem; }
.mais { font-size: .84rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.mais:hover { text-decoration: underline; }
.grade-2-1, .grade-1-1, .duas { display: grid; gap: 1rem; margin-bottom: 1rem; align-items: stretch; }
.grade-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grade-1-1, .duas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.duas { align-items: start; }
.grade-2-1 > .bloco, .grade-1-1 > .bloco, .duas > .bloco { margin-bottom: 0; }
.grafico { position: relative; height: 280px; }
.grafico.alto { height: 340px; }

/* Onde o tempo vai */
.tempo-medio { margin: 0 0 .7rem; }
.tempo-medio strong { font-size: 1.5rem; letter-spacing: -.02em; color: var(--tinta); margin-right: .3rem; }
.fases { display: flex; height: 14px; border-radius: 99px; overflow: hidden; gap: 3px; background: #eef2f6; }
.fases span { display: block; min-width: 4px; }
.f-espera { background: #b8b1a6; } .f-coleta { background: #2a2e35; } .f-desloc { background: var(--azul); }
.fases-legenda { list-style: none; margin: .9rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.fases-legenda li { display: flex; align-items: center; gap: .55rem; font-size: .88rem; }
.fases-legenda strong { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--tinta); }
.fases-legenda .sutil { width: 3ch; text-align: right; font-variant-numeric: tabular-nums; }
.ponto { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.barras { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.barras li { display: grid; grid-template-columns: 105px 1fr 64px; align-items: center; gap: .7rem; font-size: .85rem; }
.barras-rot { color: var(--sutil); white-space: nowrap; }
.barras-trilho { height: 10px; background: #eef2f6; border-radius: 99px; overflow: hidden; }
.barras-trilho span { display: block; height: 100%; background: linear-gradient(90deg, #ff9a6b, var(--azul)); border-radius: 99px; }
.barras-val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--tinta); }
.barras-val small { color: var(--sutil); font-weight: 500; margin-left: .2rem; }

/* ---------- Tabelas ---------- */
.rolagem { overflow-x: auto; margin: 0 -.3rem; padding: 0 .3rem; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th { text-align: left; color: var(--sutil); font-weight: 500; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--linha); padding: .5rem .6rem; white-space: nowrap; }
td { border-bottom: 1px solid var(--linha); padding: .62rem .6rem; vertical-align: middle; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: #f8fafc; }
tr:last-child td { border-bottom: 0; }
.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th.n { text-align: right; }
.corta { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
tr.alerta td { background: #fff8f6; }
tr.inativo td { color: var(--sutil); }
.pessoa { display: inline-flex; align-items: center; gap: .55rem; font-weight: 500; white-space: nowrap; }
.col-barra { min-width: 120px; white-space: nowrap; }
.col-barra strong { font-variant-numeric: tabular-nums; margin-left: .5rem; }
.mini-barra { display: inline-block; width: 64px; height: 6px; background: #eef2f6; border-radius: 99px; overflow: hidden; vertical-align: middle; }
.mini-barra span { display: block; height: 100%; background: var(--azul); border-radius: 99px; }

/* ---------- Selos ---------- */
.selo { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem; border-radius: 99px; font-size: .76rem; font-weight: 600; background: #eef2f6; color: #334155; white-space: nowrap; vertical-align: middle; }
.selo::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.s-pendente.selo { background: #fef6e4; color: #a15c07; }
.s-a_caminho_coleta.selo { background: var(--azul-claro); color: #1d4ed8; }
.s-em_rota.selo { background: #e6f4f7; color: #0e7490; }
.s-entregue.selo { background: var(--verde-claro); color: var(--verde); }
.s-cancelada.selo { background: var(--vermelho-claro); color: #b91c1c; }

/* ---------- Abas ---------- */
.abas { display: flex; gap: 2px; background: #e9edf2; border-radius: 10px; padding: 3px; width: fit-content; margin-bottom: 1rem; }
.abas a { padding: .38rem .85rem; border-radius: 8px; text-decoration: none; color: #475569; font-size: .86rem; font-weight: 500; }
.abas a:hover { color: var(--tinta); }
.abas a[aria-current] { background: var(--papel); color: var(--tinta); box-shadow: var(--sombra); }

/* ---------- Formulários e botões ---------- */
.form { display: flex; flex-direction: column; gap: .85rem; }
.form label { display: flex; flex-direction: column; gap: .35rem; font-size: .85rem; font-weight: 500; color: var(--texto); }
.linha { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
input, select, textarea { font: inherit; padding: .58rem .75rem; border: 1px solid var(--linha-forte); border-radius: var(--raio-p); background: #fff; color: var(--tinta); width: 100%; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: #b4bfcd; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px var(--azul-claro); }
.linha-form { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin: .5rem 0; }
.linha-form select, .linha-form input { width: auto; min-width: 120px; padding: .38rem .55rem; }
.botao { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 600; background: var(--tinta); color: #fff; border: 0; border-radius: var(--raio-p); padding: .6rem 1.05rem; cursor: pointer; text-decoration: none; transition: background .15s, transform .08s, box-shadow .15s; }
.botao:hover { background: #1e293b; box-shadow: 0 2px 6px rgba(15,23,42,.15); }
.botao:active { transform: translateY(1px); }
.botao:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.botao.sec { background: #eef2f6; color: var(--tinta); }
.botao.sec:hover { background: #e2e8f0; box-shadow: none; }
.botao.perigo { background: transparent; color: var(--vermelho); border: 1px solid #fecaca; margin-top: .5rem; }
.botao.perigo:hover { background: var(--vermelho-claro); }
.botao.grande { width: 100%; padding: 1rem; font-size: 1.08rem; margin-top: .6rem; border-radius: 12px; }
.botao.verde { background: var(--verde); }
.botao.verde:hover { background: #166534; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--azul); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Mensagens ---------- */
.aviso, .erro { padding: .75rem 1rem; border-radius: 10px; margin: 0 0 1rem; font-weight: 500; }
.aviso { background: var(--verde-claro); color: var(--verde); }
.erro { background: var(--vermelho-claro); color: #b91c1c; }
.sutil { color: var(--sutil); font-size: .88em; font-weight: 400; }
.nota { color: var(--sutil); font-size: .8rem; margin: .8rem 0 0; }
.vazio { color: var(--sutil); text-align: center; padding: 2rem 1rem; background: #fafbfc; border: 1px dashed var(--linha-forte); border-radius: 10px; margin: 0; }

/* ---------- Telas específicas ---------- */
.sem-lateral .login { max-width: 400px; margin: 14vh auto 0; padding: 2rem; }
.login h1 { font-size: 1.5rem; }
.ficha { display: grid; grid-template-columns: 110px 1fr; gap: .5rem 1rem; margin: 0 0 1rem; }
.ficha dt { color: var(--sutil); }
.ficha dd { margin: 0; }
.tempo { list-style: none; padding: 0; margin: 0 0 1rem .3rem; border-left: 2px solid var(--linha); }
.tempo li { padding: .25rem 0 .7rem 1.1rem; position: relative; color: var(--sutil); }
.tempo li::before { content: ""; position: absolute; left: -7px; top: .5rem; width: 12px; height: 12px; border-radius: 50%; background: var(--papel); border: 2px solid var(--linha-forte); }
.tempo li.feito { color: var(--texto); }
.tempo li.feito::before { background: var(--verde); border-color: var(--verde); }
.tempo li.cancelado::before { background: var(--vermelho); border-color: var(--vermelho); }
.mapa { height: calc(100vh - 210px); min-height: 400px; border-radius: var(--raio); border: 1px solid var(--linha); box-shadow: var(--sombra); }
.mapa.pequeno { height: 300px; min-height: 0; }

/* Motoboy */
.entrega header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .6rem; font-size: 1.05rem; }
.entrega p { margin: .4rem 0; }
.entrega .rot { display: block; font-size: .72rem; color: var(--sutil); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.entrega.s-em_rota { border-color: #a5d8e3; }
.entrega.s-a_caminho_coleta { border-color: #bcd0fb; }
.obs { background: #f8fafc; padding: .55rem .75rem; border-radius: var(--raio-p); font-size: .9rem; }
.rastreio { background: var(--azul-claro); color: #9a3412; padding: .65rem .9rem; border-radius: 10px; font-weight: 500; }
.rastreio.falha { background: var(--vermelho-claro); color: #991b1b; }
.feita { margin: .35rem 0; }
.sem-lateral h1 { margin-bottom: .9rem; font-size: 1.4rem; }

/* ---------- Responsivo ---------- */
@media (max-width: 1500px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1180px) {
  .grade-2-1, .grade-1-1, .duas { grid-template-columns: 1fr; }
  .kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .lateral { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--sombra-alta); }
  .menu-aberto .lateral { transform: none; }
  .barra-movel { display: flex; align-items: center; gap: .6rem; position: sticky; top: 0; z-index: 1000; background: var(--lateral); color: #fff; padding: .5rem .75rem; }
  .com-lateral main { margin-left: 0; padding: 1.25rem 1rem 2rem; }
}
@media (max-width: 759px) {
  .periodo { width: 100%; }
  .periodo-botao { width: 100%; }
  .periodo-datas { margin-left: auto; }
  .periodo-pop { position: fixed; left: .5rem; right: .5rem; top: 4rem; flex-direction: column; max-height: calc(100vh - 5rem); overflow-y: auto; }
  .atalhos { display: flex; flex-wrap: wrap; gap: .25rem; border-right: 0; border-bottom: 1px solid var(--linha); min-width: 0; }
  .cal-mes { width: 100%; }
  .cal-grade { grid-template-columns: repeat(7, 1fr); }
  .cal-pe { flex-direction: column; align-items: stretch; }
  .cal-acoes .botao { flex: 1; }
}
@media (max-width: 640px) {
  .kpis, .kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .kpi { padding: .85rem; }
  .kpi-valor { font-size: 1.35rem; }
  .linha { grid-template-columns: 1fr; }
  .barras li { grid-template-columns: 90px 1fr 56px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.veiculo { white-space: nowrap; } .veiculo strong { display: block; } .veiculo .sutil { font-size: .78rem; }

/* ---------- Lateral recolhível (desktop) ---------- */
.lateral-topo { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.lateral-topo .marca { min-width: 0; }
.fixar { color: var(--lateral-texto); flex: none; }
.fixar[aria-pressed="true"] { color: #fff; }
@media (min-width: 1024px) {
  .lateral { overflow-x: hidden; transition: width .18s ease, box-shadow .18s ease; }
  .lateral * { white-space: nowrap; }
  .com-lateral main { transition: margin-left .18s ease; }
  .lateral-mini { --l-mini: 72px; }
  .lateral-mini main { margin-left: var(--l-mini) !important; }
  .lateral-mini .lateral { width: var(--l-mini); }
  /* passa o mouse (ou navega pelo teclado): abre por cima do conteúdo */
  .lateral-mini .lateral:hover, .lateral-mini .lateral:focus-within { width: var(--l); box-shadow: 12px 0 32px -12px rgba(0,0,0,.45); transition-delay: .08s; }
  .lateral-mini .lateral .menu a > span, .lateral-mini .lateral .menu-titulo, .lateral-mini .lateral .usuario-nome,
  .lateral-mini .lateral .empresa > div, .lateral-mini .lateral .rotulo, .lateral-mini .lateral .marca > span:last-child,
  .lateral-mini .lateral .fixar, .lateral-mini .lateral .usuario form { opacity: 0; transition: opacity .12s ease; }
  .lateral-mini .lateral:hover .menu a > span, .lateral-mini .lateral:hover .menu-titulo, .lateral-mini .lateral:hover .usuario-nome,
  .lateral-mini .lateral:hover .empresa > div, .lateral-mini .lateral:hover .rotulo, .lateral-mini .lateral:hover .marca > span:last-child,
  .lateral-mini .lateral:hover .fixar, .lateral-mini .lateral:hover .usuario form,
  .lateral-mini .lateral:focus-within .menu a > span, .lateral-mini .lateral:focus-within .menu-titulo, .lateral-mini .lateral:focus-within .usuario-nome,
  .lateral-mini .lateral:focus-within .empresa > div, .lateral-mini .lateral:focus-within .rotulo, .lateral-mini .lateral:focus-within .marca > span:last-child,
  .lateral-mini .lateral:focus-within .fixar, .lateral-mini .lateral:focus-within .usuario form { opacity: 1; transition-delay: .1s; }
  .lateral-mini .lateral .botao.nova { justify-content: flex-start; padding-left: 13px; }
  .lateral-mini .lateral .empresa { padding-left: .4rem; }
  .lateral-mini .lateral .usuario { padding-left: .3rem; }
}

/* Símbolo sem caixa, maior */
.marca-icone { background: transparent !important; box-shadow: none !important; width: 40px; height: 40px; border-radius: 0; }
.marca-icone .simbolo { width: 38px; height: 38px; }
.login-marca .marca-icone { width: 52px; height: 52px; }
.login-marca .marca-icone .simbolo { width: 50px; height: 50px; }
.login-marca .simbolo circle { fill: var(--tinta); }
.topo .marca-icone .simbolo { width: 32px; height: 32px; }

/* Menu: só rola na vertical, com barra discreta */
.menu { overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #3a3e46 transparent; }
.menu::-webkit-scrollbar { width: 6px; height: 0; }
.menu::-webkit-scrollbar-thumb { background: #3a3e46; border-radius: 99px; }
.menu::-webkit-scrollbar-button { display: none; }
.lateral { overflow-y: hidden; }
.lateral { gap: .75rem; padding-top: 1rem; padding-bottom: .85rem; }
.menu-titulo { padding: .7rem .7rem .3rem; }
.menu a { padding: .5rem .7rem; }
