/* Korre · componentes das funções de saídas, alertas, financeiro e comprovante */
.contador { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--azul); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.lateral-mini .lateral:not(:hover):not(:focus-within) .contador { position: absolute; left: 21px; top: 1px; margin: 0; min-width: 16px; height: 16px; padding: 0 4px; font-size: .62rem; box-shadow: 0 0 0 2px var(--lateral); }
.acoes-cabeca { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.acoes-cabeca form { margin: 0; }
.acoes-cabeca .botao.perigo { margin: 0; }
.botao svg.i { width: 16px; height: 16px; }
.form-largo { max-width: 860px; }
.check { flex-direction: row !important; align-items: flex-start; gap: .6rem !important; font-weight: 500; }
.check input { width: auto; margin-top: .2rem; accent-color: var(--azul); }
.texto-bom { color: var(--verde); font-weight: 600; }
.texto-ruim { color: var(--vermelho); font-weight: 600; }
.salvar-bloco { display: flex; align-items: center; }

/* Faixa "agora" do painel */
.agora { display: flex; align-items: center; gap: .4rem 1.4rem; flex-wrap: wrap; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: .75rem 1.1rem; margin-bottom: 1rem; box-shadow: var(--sombra); }
.agora a { color: var(--texto); text-decoration: none; }
.agora a:hover { color: var(--azul); }
.agora a strong { font-family: Archivo, Inter, sans-serif; font-size: 1.15rem; margin-right: .2rem; }
.agora a.ruim, .agora a.ruim strong { color: var(--vermelho); }
.agora-rotulo { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; text-transform: uppercase; font-size: .75rem; letter-spacing: .08em; color: var(--sutil); }
.agora-rotulo .ao-vivo { margin: 0; }
.agora-fim { margin-left: auto; color: var(--sutil); }
.agora-fim strong { color: var(--verde); font-family: Archivo, Inter, sans-serif; }

/* Histórico e comprovante */
.historico { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; font-size: .9rem; }
.historico li { border-bottom: 1px solid var(--linha); padding-bottom: .45rem; }
.historico li:last-child { border-bottom: 0; }
.comprovante { display: flex; gap: .75rem; flex-wrap: wrap; }
.comprovante img { height: 140px; max-width: 240px; object-fit: cover; border-radius: var(--raio-p); border: 1px solid var(--linha); background: #fff; }
.comprovante .assinatura img { object-fit: contain; padding: .3rem; }

/* Saídas */
.selo.s-saida-planejada { background: #fef6e4; color: #a15c07; }
.selo.s-saida-em_andamento { background: var(--azul-claro); color: #c2410c; }
.selo.s-saida-concluida { background: var(--verde-claro); color: var(--verde); }
.selo.s-saida-cancelada { background: var(--vermelho-claro); color: #b91c1c; }
.paradas, .paradas-previa { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.paradas li { display: grid; grid-template-columns: 32px 1fr auto; gap: .7rem; align-items: start; padding: .55rem .6rem; border: 1px solid var(--linha); border-radius: var(--raio-p); }
.paradas li.feita { background: #fafaf8; color: var(--sutil); }
.parada-ordem { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tinta); color: #fff; font-weight: 700; font-size: .82rem; flex: none; }
.paradas li.feita .parada-ordem, .parada-m.feita .parada-ordem { background: var(--verde); }
.parada-hora { font-variant-numeric: tabular-nums; color: var(--sutil); }
.paradas-previa { counter-reset: p; margin-bottom: 1rem; }
.paradas-previa li { counter-increment: p; padding-left: 2.2rem; position: relative; }
.paradas-previa li::before { content: counter(p); position: absolute; left: 0; top: .1rem; width: 26px; height: 26px; border-radius: 50%; background: var(--tinta); color: #fff; display: grid; place-items: center; font-size: .78rem; font-weight: 700; }
.lista-escolha { border: 1px solid var(--linha); border-radius: var(--raio-p); padding: .4rem .6rem; margin: 0; display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; }
.lista-escolha legend { font-weight: 600; font-size: .85rem; padding: 0 .3rem; }
.check-linha { flex-direction: row !important; gap: .6rem !important; align-items: flex-start; padding: .55rem .2rem; border-bottom: 1px solid var(--linha); font-weight: 400 !important; cursor: pointer; }
.check-linha:last-child { border-bottom: 0; }
.check-linha input { width: auto; margin-top: .25rem; accent-color: var(--azul); }
.pino-num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font: 700 12px Inter, sans-serif; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }

/* Alertas */
.alertas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.alerta-item { display: grid; grid-template-columns: 170px 1fr auto; gap: .8rem; align-items: start; padding: .7rem .9rem; border: 1px solid var(--linha); border-radius: var(--raio-p); }
.alerta-item.novo { border-color: #fdba74; background: #fff8f4; box-shadow: inset 3px 0 0 var(--azul); }
.alerta-tipo { font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--sutil); }
.alerta-item.a-atraso .alerta-tipo, .alerta-item.a-sem_sinal .alerta-tipo { color: var(--vermelho); }
.alerta-item.a-combustivel .alerta-tipo { color: #a15c07; }
.alerta-corpo p { margin: 0 0 .15rem; }
.alerta-acoes { display: flex; gap: .8rem; }
.alertas.resolvidos .alerta-item { opacity: .7; grid-template-columns: 170px 1fr; }

/* Financeiro */
.dre td { font-size: .95rem; }
.dre tr.total td { font-weight: 700; font-size: 1.05rem; border-top: 2px solid var(--tinta); }
.acoes-linha { display: flex; gap: .8rem; justify-content: flex-end; }
.acoes-linha form { margin: 0; }
.pagamento-form input { width: 74px !important; min-width: 0 !important; }

/* Motoboy */
.m-cabeca { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin: .8rem 0 .6rem; }
.m-cabeca h1, .m-cabeca h2 { margin: 0; }
.grande-sec { width: 100%; margin-bottom: .8rem; padding: .8rem; }
.parada-m header { display: flex; gap: .7rem; align-items: center; margin-bottom: .3rem; }
.parada-m header > div { flex: 1; display: flex; flex-direction: column; }
.parada-m .rot { font-size: .72rem; color: var(--sutil); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.parada-m.proxima { border-color: var(--azul); box-shadow: 0 0 0 3px var(--azul-claro); }
.parada-m.feita { opacity: .6; padding-top: .7rem; padding-bottom: .7rem; }
.parada-m .botao.sec.grande { background: #eceae5; color: var(--tinta); }
.paradas-lista { margin: .4rem 0 .6rem; padding-left: 1.2rem; }
.comprovante-form { border: 1px dashed var(--linha-forte); border-radius: var(--raio-p); padding: .6rem .8rem; margin: .6rem 0 .2rem; }
.comprovante-form summary { cursor: pointer; font-weight: 600; }
.comprovante-form label { display: flex; flex-direction: column; gap: .3rem; margin-top: .6rem; font-size: .88rem; font-weight: 500; }
.assinatura-campo { margin-top: .6rem; display: flex; flex-direction: column; gap: .3rem; }
.assinatura-tela { width: 100%; height: 150px; border: 1px solid var(--linha-forte); border-radius: var(--raio-p); background: #fff; touch-action: none; }
.entrega-escolha { display: grid; grid-template-columns: 28px 1fr; gap: .4rem; cursor: pointer; }
.entrega-escolha input { width: 22px; height: 22px; margin-top: .15rem; accent-color: var(--azul); }
.entrega-escolha .rot { display: block; font-size: .72rem; color: var(--sutil); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; margin-top: .4rem; }
.entrega-escolha .obs { display: block; margin-top: .4rem; }
.entrega-escolha.atrasada { border-color: #fecaca; }
.entrega-escolha:has(input:checked) { border-color: var(--azul); box-shadow: 0 0 0 3px var(--azul-claro); }

/* Públicas */
.login-links { margin: 1rem 0 0; font-size: .9rem; }
.rodape-publico { text-align: center; color: var(--sutil); font-size: .85rem; margin-top: 1.2rem; }
.rodape-publico a { color: var(--sutil); }
.texto-legal { max-width: 760px; margin: 2rem auto; }
.texto-legal h2 { margin: 1.4rem 0 .4rem; }
.texto-legal li { margin-bottom: .3rem; }
@media (max-width: 640px) {
  .alerta-item, .alertas.resolvidos .alerta-item { grid-template-columns: 1fr; gap: .3rem; }
  .agora-fim { margin-left: 0; }
}

/* Sidebar recolhida que estava aberta pelo mouse ao trocar de tela: continua aberta até o mouse sair */
@media (min-width: 1024px) {
  .lateral-mini.lateral-hover .lateral { width: var(--l); box-shadow: 12px 0 32px -12px rgba(0,0,0,.45); transition: none; }
  .lateral-mini.lateral-hover .lateral .menu a > span, .lateral-mini.lateral-hover .lateral .menu-titulo, .lateral-mini.lateral-hover .lateral .usuario-nome,
  .lateral-mini.lateral-hover .lateral .empresa > div, .lateral-mini.lateral-hover .lateral .rotulo, .lateral-mini.lateral-hover .lateral .marca > span:last-child,
  .lateral-mini.lateral-hover .lateral .fixar, .lateral-mini.lateral-hover .lateral .usuario form { opacity: 1; transition: none; }
  .lateral-mini.lateral-hover .lateral .contador { position: static; margin-left: auto; min-width: 20px; height: 20px; font-size: .72rem; box-shadow: none; }
  .lateral-mini.lateral-hover .lateral .botao.nova { justify-content: center; padding-left: .62rem; }
}
