/* MCQ Entregas · estilos compartilhados (coordenador, motorista, TV) */
:root {
  --navy: #0F2238;
  --navy-2: #1C3553;
  --laranja: #F59A1B;
  --laranja-esc: #E8590C;
  --link: #B4460A;
  --fundo: #EEF1F5;
  --borda: #D5DCE6;
  --cinza: #475569;
  --texto2: #334155;
  --verde: #2E8B57;
  --verde-claro: #DDF3E4;
  --verde-txt: #14532D;
  --vermelho: #B42318;
  --vermelho-claro: #FDE2E0;
  --vermelho-txt: #8A1C12;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--fundo); color: var(--navy); }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
:focus-visible { outline: 3px solid var(--laranja); outline-offset: 2px; }
a { color: var(--link); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- componentes */
.topo { background: var(--navy); color: #fff; padding: 14px 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.topo h1 { margin: 0; font-size: 20px; font-weight: 800; }
.topo .sub { font-size: 14px; color: #C9D3E0; }
.topo .acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { border: none; border-radius: 10px; padding: 10px 16px; min-height: 44px; font-weight: 700; font-size: 15px; }
.btn-laranja { background: var(--laranja); color: var(--navy); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy2 { background: var(--navy-2); color: #fff; }
.btn-verde { background: var(--verde); color: #fff; }
.btn-claro { background: #fff; color: var(--navy); border: 1px solid #94A3B8; }
.btn-perigo { background: #fff; color: var(--vermelho-txt); border: 2px solid #D9534A; }
.btn-link { background: none; border: none; color: var(--link); text-decoration: underline; font-weight: 600; min-height: 44px; padding: 0 6px; }
.btn-icone { width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid #94A3B8; background: #fff; }
.cartao { background: #fff; border: 1px solid var(--borda); border-radius: 14px; }
.campo { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.campo input, .campo select { font-weight: 500; font-size: 16px; padding: 10px 12px; border: 1px solid #94A3B8; border-radius: 8px; min-height: 44px; background: #fff; }
.erro { font-size: 14px; color: var(--vermelho-txt); background: var(--vermelho-claro); padding: 8px 10px; border-radius: 8px; }
.ok { font-size: 14px; color: var(--verde-txt); background: var(--verde-claro); padding: 8px 10px; border-radius: 8px; }
.nota { font-size: 13px; color: var(--cinza); margin: 0; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.st-separacao { background: #E2E8F0; color: var(--navy); }
.st-rota { background: var(--laranja); color: var(--navy); }
.st-problema { background: var(--vermelho); color: #fff; }
.st-entregue { background: var(--verde-claro); color: var(--verde-txt); }
.seq { width: 30px; height: 30px; border-radius: 15px; background: var(--navy); color: #fff; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.num { font-weight: 800; font-variant-numeric: tabular-nums; }
.reticencias { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alerta-txt { font-size: 13px; color: var(--vermelho-txt); font-weight: 600; }
.aviso-topo { background: #FFF4E3; color: var(--navy); border-bottom: 2px solid var(--laranja); padding: 8px 16px; font-size: 14px; font-weight: 600; text-align: center; }
.aviso-topo.ruim { background: var(--vermelho-claro); color: var(--vermelho-txt); border-color: #D9534A; }

/* ---------- login */
.centro { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login { width: 100%; max-width: 380px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.login h1 { margin: 0; font-size: 22px; }
.marca { display: flex; align-items: center; gap: 10px; }
.marca .logo { width: 44px; height: 44px; border-radius: 10px; background: var(--laranja); display: flex; align-items: center; justify-content: center; }

/* ---------- coordenador */
.coord { display: flex; flex-wrap: wrap; gap: 20px; padding: 20px 24px; align-items: flex-start; max-width: 1440px; margin: 0 auto; }
.lancar { flex: 1 1 300px; max-width: 380px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.lancar h2, .secao-titulo { margin: 0; font-size: 18px; font-weight: 800; }
.conteudo { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.abas { display: flex; flex-wrap: wrap; gap: 8px; }
.aba { border: 2px solid #CBD5E1; background: #fff; color: var(--navy); border-radius: 10px; padding: 6px 12px; min-height: 44px; display: flex; flex-direction: column; align-items: flex-start; font-size: 14px; font-weight: 600; text-align: left; }
.aba small { font-size: 12px; font-weight: 500; }
.aba[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.aba.em-rota small::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: var(--laranja); margin-right: 5px; }
.cab-rota { padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid #E2E8F0; }
.cab-rota .esq { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bloco-titulo { padding: 12px 18px 6px; display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.bloco-titulo strong { font-size: 15px; }
.rolagem { overflow-x: auto; }
.linha { display: grid; gap: 12px; padding: 8px 18px; align-items: center; border-top: 1px solid #EEF1F5; min-width: 660px; }
.linha-atual { grid-template-columns: 44px 110px minmax(0, 1fr) 130px 150px; }
.linha-prox { grid-template-columns: 44px 110px minmax(0, 1fr) 100px 170px 90px; }
.linha .cli { display: flex; flex-direction: column; min-width: 0; }
.linha .num { font-size: 17px; }
.linha select { font-size: 14px; font-weight: 600; padding: 6px 8px; min-height: 40px; border-radius: 8px; border: 1px solid #94A3B8; background: #fff; max-width: 100%; }
.setas { display: flex; gap: 6px; }
.vazio { padding: 14px 18px 18px; font-size: 15px; color: var(--cinza); }
.config { max-width: 980px; margin: 0 auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 18px; }
.config .cartao { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.mot-linha { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; border-top: 1px solid #EEF1F5; padding-top: 10px; }
.mot-linha .nome { font-weight: 700; }
.mot-linha .acoes { display: flex; gap: 6px; flex-wrap: wrap; }
.form-linha { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.form-linha .campo { flex: 1 1 160px; }
.caixa-link { background: #FFF4E3; border: 2px solid var(--laranja); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.caixa-link code { word-break: break-all; font-size: 14px; background: #fff; padding: 8px; border-radius: 6px; }

.grade-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; align-items: end; }
.grade-form .check, .grade-form .btn, .grade-form [role="alert"] { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; }
.botao-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; align-self: flex-start; }
.config p { margin: 0; }

/* ---------- página inicial */
.inicio-topo { background: var(--navy); color: #fff; }
.inicio-barra { max-width: 1120px; margin: 0 auto; padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.inicio-barra .marca { color: #fff; font-weight: 800; font-size: 18px; }
.inicio-hero { max-width: 1120px; margin: 0 auto; padding: 40px 24px 56px; display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.inicio-hero .texto { flex: 1 1 420px; display: flex; flex-direction: column; gap: 16px; }
.inicio-hero h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; margin: 0; letter-spacing: -0.5px; }
.inicio-hero .lead { font-size: 18px; color: #D6DEE8; margin: 0; max-width: 560px; }
.inicio-hero ul { margin: 0; padding-left: 20px; color: #D6DEE8; display: flex; flex-direction: column; gap: 6px; }
.preco { display: flex; align-items: baseline; gap: 8px; }
.preco b { font-size: 40px; color: var(--laranja); }
.preco span { color: #D6DEE8; }
.cadastro { flex: 1 1 340px; max-width: 420px; color: var(--navy); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.cadastro h2 { margin: 0; font-size: 20px; }
.isca { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.inicio-como { max-width: 1120px; margin: 0 auto; padding: 40px 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.inicio-como .cartao { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.inicio-como h3 { margin: 0; font-size: 17px; }
.inicio-como p { margin: 0; color: var(--texto2); font-size: 15px; }
.inicio-rodape { max-width: 1120px; margin: 0 auto; padding: 20px 24px 40px; font-size: 13px; color: var(--cinza); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.texto-legal { max-width: 820px; margin: 0 auto; padding: 32px 24px 60px; line-height: 1.6; }
.texto-legal h1 { font-size: 28px; }
.texto-legal h2 { font-size: 19px; margin-top: 28px; }

/* ---------- acompanhamento do cliente final */
.acomp { width: 100%; max-width: 420px; padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.acomp-empresa { font-size: 15px; font-weight: 700; color: var(--cinza); }
.acomp-num { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.acomp-status { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.acomp-status h1 { margin: 0; font-size: 22px; line-height: 1.25; }
.acomp-status p { margin: 0; color: var(--texto2); }
.acomp-icone { width: 76px; height: 76px; border-radius: 38px; display: flex; align-items: center; justify-content: center; }
.acomp-icone.sep { background: #E2E8F0; color: var(--navy); }
.acomp-icone.rota { background: var(--laranja); color: var(--navy); }
.acomp-icone.ent { background: var(--verde-claro); color: var(--verde-txt); }
.acomp-icone.canc { background: var(--vermelho-claro); color: var(--vermelho-txt); }
.acomp-etapas { list-style: none; margin: 6px 0 0; padding: 0; display: flex; gap: 6px; }
.acomp-etapas li { flex: 1; font-size: 12px; font-weight: 600; color: var(--cinza); padding-top: 10px; border-top: 5px solid #E2E8F0; }
.acomp-etapas li.feito { border-top-color: var(--verde); color: var(--verde-txt); }
.acomp-etapas li.atual { border-top-color: var(--laranja); color: var(--navy); font-weight: 800; }
.link-cliente { margin: 0 18px 14px; }

/* ---------- painel da MCQ */
.admin-grade { max-width: 1440px; margin: 0 auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.admin-resumo { display: flex; flex-wrap: wrap; gap: 12px; }
.admin-resumo .cartao { padding: 14px 18px; min-width: 160px; }
.admin-resumo b { display: block; font-size: 26px; }
.tabela { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 1000px; }
.tabela th, .tabela td { text-align: left; padding: 10px 12px; border-top: 1px solid #EEF1F5; vertical-align: top; }
.tabela th { background: #F6F8FB; font-size: 13px; color: var(--cinza); }
.tabela td .acoes { display: flex; flex-wrap: wrap; gap: 6px; }
.tabela .btn { min-height: 36px; padding: 6px 10px; font-size: 13px; }

/* ---------- motorista */
.mot { max-width: 520px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.mot-topo { background: var(--navy); color: #fff; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.mot-topo .linha1 { display: flex; justify-content: space-between; align-items: center; }
.mot-topo .contador { font-size: 26px; font-weight: 800; }
.mot-topo .sub-claro { font-size: 13px; color: #C9D3E0; }
.mot-topo .nome-grande { font-size: 22px; font-weight: 800; }
.dupla { align-items: center; justify-content: space-between; }
.rodape-fixo .dupla .btn { flex: 1; }
.rodape-fixo .dupla .btn:last-child { flex: 2; }
.barra { height: 8px; background: var(--navy-2); border-radius: 4px; overflow: hidden; }
.barra > div { height: 8px; background: var(--laranja); width: 0; }
.mot-lista { flex: 1; padding: 14px 16px 180px; display: flex; flex-direction: column; gap: 10px; }
.parada { background: #fff; border: 2px solid #CBD5E1; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.parada.rota { border-color: var(--laranja); }
.parada.problema { background: #FDF0EF; border-color: #D9534A; }
.parada.entregue { background: #EEF8F1; border-color: #B7DEC4; }
.parada .cab { display: flex; align-items: center; gap: 10px; }
.parada .info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.parada .num { font-size: 18px; }
.parada .cliente { font-size: 15px; color: var(--texto2); }
.parada .botoes { display: flex; gap: 8px; }
.parada .botoes .btn { min-height: 52px; font-size: 16px; }
.parada .botoes .grande { flex: 2; }
.parada .botoes .peq { flex: 1; }
.motivos { display: flex; flex-direction: column; gap: 6px; }
.motivos .btn { text-align: left; font-weight: 600; }
.rodape-fixo { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--borda); padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
.rodape-fixo .dentro { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.rodape-fixo .btn { width: 100%; min-height: 56px; font-size: 17px; font-weight: 800; }
.dupla { display: flex; gap: 8px; }
.dupla .btn { min-height: 52px; }
.resumo-verde { background: var(--verde-claro); color: var(--verde-txt); border-radius: 10px; padding: 10px 14px; font-size: 14px; font-weight: 600; }
.caixa-tracejada { background: #fff; border: 1px dashed #94A3B8; border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--texto2); }
.pin { font-size: 28px !important; letter-spacing: 12px; text-align: center; }

/* ---------- TV (visual da identidade oficial, medidas em vh para leitura à distância) */
body.tv { overflow: hidden; background: #e9eff6; }
.tv-tela { width: 100vw; height: 100vh; display: flex; flex-direction: column; }
.tv-topo { background: linear-gradient(115deg, #0e2135, #15314c); color: #fff; padding: 1.5vh 1.4vw; display: flex; align-items: center; justify-content: space-between; gap: 1.2vw; }
.tv-topo .titulo { font-size: 3vh; font-weight: 850; letter-spacing: -.03em; line-height: 1.12; }
.tv-topo .titulo .ponto { font-weight: 450; opacity: .65; }
.tv-topo .data { font-size: 1.5vh; color: #aec3d5; margin-top: .6vh; }
.tv-totais { display: flex; gap: .55vw; align-items: center; margin-left: auto; }
.tv-total { min-width: 7vw; border-radius: 1.4vh; padding: .9vh .8vw; text-align: center; box-shadow: 0 .8vh 1.8vh #02142626; }
.tv-total b { display: block; font-size: 3.4vh; line-height: 1.15; letter-spacing: -.04em; font-weight: 850; }
.tv-total span { display: block; font-weight: 750; font-size: 1.3vh; }
.tv-total.sep { background: #263f58; }
.tv-total.rota { background: #f6a12d; color: #112b40; }
.tv-total.ent { background: #dff5e8; color: #14663c; }
.tv-total.prob { background: #ffe1df; color: #962629; }
.tv-total.prob.alerta { animation: alertaTv 4.3s ease-in-out infinite; }
@keyframes alertaTv { 0%, 100% { box-shadow: 0 .8vh 1.8vh #02142626; } 50% { box-shadow: 0 0 0 .5vh #ff6b6b66; } }
.tv-relogio-box { border-left: 1px solid #5b7084; padding-left: 1.2vw; text-align: right; min-width: 7vw; }
.tv-relogio { font-size: 4.6vh; font-weight: 850; font-variant-numeric: tabular-nums; letter-spacing: -.05em; display: block; }
.tv-pagina { display: inline-block; font-weight: 700; background: #ffffff19; border: 1px solid #ffffff40; border-radius: 5vh; padding: .4vh .7vw; font-size: 1.2vh; }
.tv-colunas { flex: 1; min-height: 0; padding: 1.5vh 1vw 1vh; display: grid; gap: .5vw; }
.tv-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid #d9e2ed; background: linear-gradient(#fff, #fbfdff); border-radius: 1.5vh; padding: 1.2vh .5vw 1vh; box-shadow: 0 .5vh 1.5vh #0d27420b; overflow: hidden; }
.tv-col-cab { display: flex; flex-direction: column; gap: .6vh; margin-bottom: .9vh; }
.tv-col-cab .nome { font-size: 2vh; font-weight: 860; letter-spacing: -.024em; line-height: 1.2; }
.tv-col-cab .veic { font-weight: 600; color: #5e7488; }
.tv-col-cab .estado { display: flex; justify-content: space-between; align-items: center; font-size: 1.4vh; font-weight: 760; }
.tv-st { display: inline-block; font-weight: 790; border-radius: .7vh; padding: .5vh .5vw; font-size: 1.3vh; line-height: 1; white-space: nowrap; }
.tv-st.rota { background: #ffdc93; color: #623c0b; }
.tv-st.sep { background: #dfe8f3; color: #29445c; }
.tv-st.ent { background: #dcf6e6; color: #17623d; }
.tv-st.prob { background: #fae0de; color: #a53131; }
.tv-barra { height: .6vh; background: #e2e8f0; border-radius: .3vh; overflow: hidden; }
.tv-barra > div { height: 100%; background: #25a267; width: 0; }
.tv-cards { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .8vh; overflow: hidden; }
.tv-entregues { flex-shrink: 0; text-align: center; font-size: 1.5vh; font-weight: 800; color: #17623d; background: #e3f6ea; border-radius: 1vh; padding: .7vh .4vw; }
.tv-card { flex-shrink: 0; border: 1px solid #d2dce6; background: #fff; border-radius: 1.1vh; padding: 1vh .6vw; display: flex; flex-direction: column; gap: .5vh; }
.tv-card.rota { border: .15vh solid #f2a22a; background: linear-gradient(130deg, #fff9ee, #fff); }
.tv-card.problema, .tv-card.retorno { border: .18vh solid #e55a58; background: #fff3f2; }
.tv-card .l1 { display: flex; align-items: center; gap: .4vw; }
.tv-card .ico { width: 2.2vh; height: 2.2vh; flex-shrink: 0; color: #0f4a7a; }
.tv-card.rota .ico { color: #dc7e03; }
.tv-card.problema .ico, .tv-card.retorno .ico { color: #ce3030; }
.tv-card .n { font-size: 2.2vh; font-weight: 850; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tv-card .c { font-size: 1.5vh; color: #3d5368; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-card .tv-st { align-self: flex-start; }
.tv-mais { flex-shrink: 0; font-size: 1.5vh; font-weight: 700; color: var(--cinza); text-align: center; }
.tv-vazio { font-size: 1.5vh; color: var(--cinza); text-align: center; padding: 2vh .5vw; }
.tv-prox { flex-shrink: 0; margin-top: .9vh; border: 1px dashed #aebfcd; border-radius: .9vh; padding: .8vh .4vw; text-align: center; font-size: 1.4vh; font-weight: 850; color: #38516a; white-space: nowrap; }
.tv-rodape { display: flex; justify-content: space-between; align-items: center; padding: .6vh 1.2vw .9vh; color: #5e7488; font-size: 1.3vh; gap: 1vw; }
.tv-rodape .marca-tv { display: flex; align-items: center; gap: .5vw; font-weight: 800; color: #10243a; }
.tv-rodape .marca-tv img { height: 2.6vh; width: auto; }
.tv-pontos { display: flex; gap: .4vw; }
.tv-pontos span { width: 1vh; height: 1vh; border-radius: 50%; background: #c3d0dc; }
.tv-pontos span.on { background: #1b415c; }
.tv-erro { position: fixed; top: 0; left: 0; right: 0; background: var(--vermelho); color: #fff; text-align: center; font-size: 2vh; font-weight: 700; padding: 1vh; z-index: 5; }
@media (prefers-reduced-motion: reduce) { .tv-total.prob.alerta { animation: none; } }
.link-peq { min-height: 32px; padding: 0; font-size: 13px; align-self: flex-start; }
#ped-msg .caixa-link { margin-top: 8px; }

.acomp-icone.pulsa { animation: pulsa 1.6s ease-in-out infinite; }
@keyframes pulsa { 0%, 100% { box-shadow: 0 0 0 0 rgba(245, 154, 27, .55); } 50% { box-shadow: 0 0 0 14px rgba(245, 154, 27, 0); } }
@media (prefers-reduced-motion: reduce) { .acomp-icone.pulsa { animation: none; } }
.logo-login { height: 56px; width: auto; }
