/*
  Entregas AFS — identidade visual Açaí Fruit Show (Manual de Aplicações 2026).
  Cores oficiais: roxo açaí #51275D · lavanda #B99FC4 · verde oliva #BDC789
  verde claro #E0E8BA · branco. Tipografia oficial Gotham → web: Montserrat.
  Mesmos tokens do PDV (frontend/src/index.css).
*/
:root {
  --roxo: #51275d;          /* roxo açaí — botões/topo/realce */
  --roxo-md: #6f3c88;       /* roxo médio — links/labels */
  --roxo-esc: #431f4d;
  --roxo-esc2: #35193d;
  --lavanda: #b99fc4;
  --oliva: #bdc789;
  --verde-cl: #e0e8ba;
  --verde-ok: #7a8c3f;      /* verde oliva escurecido p/ status "ok" legível */

  --canvas: #f5eff7;        /* fundo da tela (lavanda suave) */
  --card: #ffffff;
  --superficie2: #efe7f4;   /* hover / chips */
  --borda: #dccfe6;
  --txt: #2a1626;           /* texto primário */
  --txt-2: #4a3557;         /* texto secundário */
  --txt-suave: #5a4869;
  --vermelho: #b3261e;
  --sombra: 0 1px 3px rgba(81,39,93,.14);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  font-family: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--canvas); color: var(--txt);
  overscroll-behavior-y: contain;
}
.hidden { display: none !important; }
.sem-scroll { overflow: hidden !important; height: 100%; }

/* Topo */
header {
  background: var(--roxo); color: #fff;
  padding: calc(14px + env(safe-area-inset-top)) 16px 14px; display: flex; align-items: center; gap: 12px;
  position: sticky; top: 0; z-index: 10; box-shadow: var(--sombra);
}
/* alvo de toque ≥ 44px (a margem negativa mantém o título no mesmo lugar) */
header .voltar { font-size: 26px; cursor: pointer; line-height: 1; background: none; border: 0; color: #fff;
  min-width: 44px; min-height: 44px; margin: -10px 0 -10px -10px; padding: 0; display: inline-flex;
  align-items: center; justify-content: center; border-radius: 10px; }
header .voltar:active { background: rgba(255,255,255,.14); }
header h1 { font-size: 17px; margin: 0; flex: 1; font-weight: 700; letter-spacing: .01em; }
header .sub { font-size: 12px; opacity: .85; font-weight: 500; }
header .sair { font-size: 13px; background: rgba(255,255,255,.18); border: 0; color: #fff; padding: 0 14px; border-radius: 9px;
  font-weight: 600; min-height: 44px; margin: -8px 0; font-family: inherit; white-space: nowrap; }

main { padding: 16px; max-width: 640px; margin: 0 auto; }

/* Login */
.login-card {
  background: var(--card); border-radius: 16px; padding: 32px 24px; box-shadow: var(--sombra);
  max-width: 360px; margin: 48px auto 0; text-align: center; border: 1px solid var(--borda);
}
.login-card .marca { font-size: 13px; font-weight: 700; letter-spacing: .14em; color: var(--roxo); text-transform: uppercase; }
.login-card h2 { margin: 6px 0 2px; font-size: 22px; font-weight: 700; color: var(--txt); }
.login-card p { margin: 0 0 24px; color: var(--txt-suave); font-size: 14px; }
label { display: block; text-align: left; font-size: 13px; color: var(--txt-2); margin: 0 0 5px; font-weight: 600; }
input {
  width: 100%; padding: 13px 14px; font-size: 16px; border: 1px solid var(--borda);
  border-radius: 10px; margin-bottom: 14px; background: #fff; color: var(--txt);
  font-family: inherit;
}
input:focus { outline: none; border-color: var(--roxo); box-shadow: 0 0 0 3px rgba(81,39,93,.12); }

button.primario {
  width: 100%; padding: 14px; font-size: 16px; font-weight: 700; color: #fff;
  background: var(--roxo); border: 0; border-radius: 10px; cursor: pointer; font-family: inherit;
}
button.primario:active { background: var(--roxo-esc); }
button.primario:disabled { opacity: .55; }

.erro { color: var(--vermelho); font-size: 13px; margin: -6px 0 12px; min-height: 16px; text-align: left; }

/* Progresso da rota */
.progresso {
  background: var(--card); border-radius: 14px; padding: 16px; box-shadow: var(--sombra);
  margin-bottom: 14px; display: flex; align-items: center; gap: 14px; border: 1px solid var(--borda);
}
.progresso .num { font-size: 26px; font-weight: 700; color: var(--roxo); min-width: 56px; }
.progresso .barra { height: 8px; background: var(--superficie2); border-radius: 99px; overflow: hidden; margin-bottom: 6px; }
.progresso .barra > i { display: block; height: 100%; background: var(--oliva); transition: width .3s; }
.progresso .txt { font-size: 13px; color: var(--txt-suave); font-weight: 500; }
.btn-atualizar { flex-shrink: 0; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--borda);
  background: var(--superficie2); color: var(--roxo); font-weight: 700; font-size: 13px; font-family: inherit; cursor: pointer; }
.btn-atualizar:disabled { opacity: .55; }

/* Cartão de nota (checklist) */
.nota {
  background: var(--card); border-radius: 12px; padding: 14px 16px; box-shadow: var(--sombra);
  margin-bottom: 10px; display: flex; align-items: center; gap: 12px; cursor: pointer;
  border: 1px solid var(--borda); border-left: 4px solid var(--borda);
}
.nota.assinada { border-left-color: var(--oliva); }
.nota .check {
  width: 26px; height: 26px; border-radius: 99px; border: 2px solid var(--borda);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff; font-weight: 700;
}
.nota.assinada .check { background: var(--oliva); border-color: var(--oliva); }
.nota .info { flex: 1; min-width: 0; }
.nota .cliente { font-weight: 600; font-size: 15px; color: var(--txt); }
.nota .meta { font-size: 12px; color: var(--txt-suave); margin-top: 2px; }
.nota .valor { font-size: 13px; font-weight: 700; color: var(--txt); white-space: nowrap; margin-top: 4px; }
.nota .seta { color: var(--lavanda); font-size: 20px; }

.grupo-ordem { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--roxo-md); margin: 18px 4px 8px; font-weight: 700; }

/* Abas (detalhe da nota) */
.tabs {
  display: flex; background: var(--roxo); position: sticky; top: calc(50px + env(safe-area-inset-top)); z-index: 9;
  padding: 0 8px; box-shadow: var(--sombra);
}
.tabs .tab {
  flex: 1; background: none; border: 0; color: rgba(255,255,255,.7); font-family: inherit;
  font-size: 14px; font-weight: 600; padding: 12px 8px; cursor: pointer;
  border-bottom: 3px solid transparent;
}
.tabs .tab.ativa { color: #fff; border-bottom-color: var(--oliva); }
/* aba Devolução ainda sem resposta: bolinha âmbar chamando atenção */
.tabs .tab.tab-pendente::after {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 99px;
  background: #f5b638; margin-left: 6px; vertical-align: middle;
}

/* Visor da nota em CANVAS (PDF.js) — rolável, funciona no celular */
#danfe-container {
  max-height: 64vh; overflow: auto; background: #eee;
  border: 1px solid var(--borda); border-radius: 10px; padding: 8px;
  -webkit-overflow-scrolling: touch;
}
.pdf-page {
  display: block; margin: 0 auto 8px; max-width: 100%;
  box-shadow: 0 1px 5px rgba(0,0,0,.18); background: #fff;
}
.danfe-vazio { text-align: center; color: var(--txt-suave); padding: 32px 16px; font-size: 14px; }
.btn-secundario {
  display: block; width: 100%; text-align: center; margin-top: 12px; padding: 12px; border-radius: 9px;
  border: 1px solid var(--borda); background: #fff; color: var(--roxo); font-weight: 600;
  text-decoration: none; font-size: 14px; font-family: inherit; cursor: pointer;
}

/* Visor da DANFE em tela cheia (overlay dentro do app) */
.danfe-fs {
  position: fixed; inset: 0; z-index: 60; background: var(--canvas);
  display: flex; flex-direction: column; overscroll-behavior: contain;
}
.danfe-fs-topo {
  background: var(--roxo); color: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px; font-weight: 700; font-size: 16px;
}
.danfe-fs-acoes { display: flex; align-items: center; gap: 8px; }
.danfe-fs-zoom { background: rgba(255,255,255,.18); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 8px; font-weight: 700; font-family: inherit; font-size: 22px; line-height: 1; }
.danfe-fs-x { background: rgba(255,255,255,.18); border: 0; color: #fff; padding: 0 14px; min-height: 44px; border-radius: 8px; font-weight: 600; font-family: inherit; font-size: 14px; }
#danfe-fs-corpo { flex: 1; overflow: auto; padding: 10px; -webkit-overflow-scrolling: touch; }
#danfe-fs-corpo .pdf-page { margin: 0 auto 12px; }

.instrucao { margin: -4px 0 14px; font-size: 13px; color: var(--txt-suave); line-height: 1.4; }

/* Status de sincronização com o Sankhya (no selo de assinada) */
.sync-linha { margin-top: 8px; font-size: 12.5px; font-weight: 600; }
.sync-ok { color: var(--verde-ok); }
.sync-pend { color: #b06a00; }

/* Detalhe / assinatura */
.bloco { background: var(--card); border-radius: 12px; padding: 16px; box-shadow: var(--sombra); margin-bottom: 14px; border: 1px solid var(--borda); }
.bloco h3 { margin: 0 0 10px; font-size: 12px; color: var(--roxo-md); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.linha { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--superficie2); font-size: 14px; }
.linha:last-child { border-bottom: 0; }
.linha .k { color: var(--txt-suave); }
.item { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--superficie2); }
.item:last-child { border-bottom: 0; }
.item > span:first-child { min-width: 0; line-height: 1.35; }   /* nome quebra certo na coluna esquerda */
.item .q { color: var(--roxo); font-weight: 700; white-space: nowrap; flex-shrink: 0; }   /* "1 CX" sempre numa linha */

canvas.assinatura {
  width: 100%; height: 200px; background: #fff; border: 2px dashed var(--borda);
  border-radius: 10px; touch-action: none; display: block;
}
.assin-acoes { display: flex; gap: 10px; margin-top: 10px; }
.assin-acoes button { flex: 1; padding: 11px; min-height: 44px; border-radius: 9px; border: 1px solid var(--borda); background: #fff; font-size: 14px; font-weight: 600; color: var(--roxo); font-family: inherit; }
.selo-assinada { background: var(--verde-cl); color: var(--roxo-esc2); border-radius: 10px; padding: 14px; font-size: 14px; text-align: center; font-weight: 600; border: 1px solid var(--oliva); }

.rodape-fixo { position: sticky; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--canvas) 72%, transparent); }
/* teclado aberto num campo: o rodapé (~190px) sairia por cima do campo — some e volta no blur */
body.teclado .rodape-fixo { display: none; }
/* Dentro do app AFS: o app põe um botão "Início" fixo no canto inferior esquerdo (~44px,
   bottom 16px + safe-area). Folga embaixo pra ele não cobrir botões nem o fim da lista. */
html.afs-app main { padding-bottom: 80px; }
html.afs-app .rodape-fixo { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
html.afs-app #tela-nota main { padding-bottom: 16px; }   /* aqui quem tem a folga é o rodapé */

/* Toast — verde, semitransparente, surge e some */
#toast {
  position: fixed; bottom: 28px; left: 50%; pointer-events: none;
  background: rgba(47, 133, 71, .88); color: #fff; padding: 12px 20px; border-radius: 12px;
  font-size: 14px; font-weight: 600; box-shadow: 0 6px 20px rgba(31,90,50,.28); max-width: 90%;
  z-index: 100;   /* acima das telas cheias (não realizada 70, confirmação 90): antes o aviso ficava escondido atrás */
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  /* 0,25s aparecendo + 3s visível + 0,4s sumindo = 3,65s */
  animation: toast-vida 3.65s ease forwards;
}
@keyframes toast-vida {
  0%   { opacity: 0; transform: translateX(-50%) translateY(14px) scale(.96); }
  7%   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }      /* fim da aparição (~0,25s) */
  89%  { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }      /* +3s visível */
  100% { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.98); } /* fade-out */
}
@media (prefers-reduced-motion: reduce) { #toast { animation: none; opacity: 1; transform: translateX(-50%); } }
/* no app o canto de baixo é do botão "Início": o aviso aparece no topo */
html.afs-app #toast { bottom: auto; top: calc(14px + env(safe-area-inset-top)); }
.vazio { text-align: center; color: var(--txt-suave); padding: 40px 20px; }

/* Seletor de motorista (só no usuário de teste) */
.sel-mot {
  background: var(--card); border: 1px solid var(--borda); border-radius: 12px;
  padding: 10px 14px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
  box-shadow: var(--sombra);
}
.sel-mot label { margin: 0; font-size: 13px; color: var(--txt-2); font-weight: 600; white-space: nowrap; }
.sel-mot select {
  flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--borda); border-radius: 9px;
  font-size: 15px; font-family: inherit; background: #fff; color: var(--txt); margin: 0;
  text-overflow: ellipsis;   /* nome longo do motorista não estoura a tela */
}

/* Assinatura em tela cheia (overlay dentro do app) */
.assin-fs { position: fixed; inset: 0; z-index: 70; background: var(--canvas); display: flex; flex-direction: column; overscroll-behavior: contain; }
.assin-fs-topo {
  background: var(--roxo); color: #fff; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; font-weight: 700;
}
.assin-fs-topo > span { min-width: 0; font-size: 15px; line-height: 1.2; }
.assin-fs-acoes { display: flex; gap: 7px; flex-shrink: 0; }
.assin-fs-btn {
  background: rgba(255,255,255,.18); border: 0; color: #fff; padding: 0 12px; min-height: 44px; border-radius: 8px;
  font-weight: 600; font-family: inherit; font-size: 13px; white-space: nowrap;
}
.assin-fs-btn.ok { background: var(--oliva); color: var(--roxo-esc2); }
.assin-fs-dica { text-align: center; font-size: 13px; color: var(--txt-suave); padding: 8px 16px 4px; }
.assin-fs-area { flex: 1; position: relative; min-height: 0; }
.assin-fs-canvas { position: absolute; inset: 0; width: 100%; height: 100%; background: #fff; touch-action: none; display: block; }
/* linha de assinatura (só guia visual, não entra na imagem) */
.assin-fs-linha { position: absolute; left: 8%; right: 8%; bottom: 26%; border-bottom: 2px dashed #c9bcd0; pointer-events: none; }
/* MODO LADO: a tela está em pé, mas quem assina segura o celular deitado
   (topo do celular para a esquerda). Barra e dica giram 90° e ficam na borda
   direita; a linha vira vertical do lado esquerdo (o "embaixo" de quem assina).
   O canvas NÃO gira (o toque continua alinhado); o desenho é girado ao concluir. */
.assin-fs.lado { display: block; }
.assin-fs.lado .assin-fs-topo, .assin-fs.lado .assin-fs-dica {
  position: absolute; top: 0; width: var(--fs-h, 100vh); box-sizing: border-box;
  transform-origin: 0 0; transform: rotate(90deg);
}
.assin-fs.lado .assin-fs-topo { left: 100%; height: 58px; padding: 10px 16px; }
.assin-fs.lado .assin-fs-dica { left: calc(100% - 58px); height: 32px; padding: 7px 16px 0; background: var(--canvas); }
.assin-fs.lado .assin-fs-area { position: absolute; top: 0; bottom: 0; left: 0; right: 90px; }
.assin-fs.lado .assin-fs-linha { top: 8%; bottom: 8%; left: 26%; right: auto; border-bottom: 0; border-left: 2px dashed #c9bcd0; }

/* Devolução parcial */
.dev-resp { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.dev-op {
  display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px;
  border: 2px solid var(--borda); border-radius: 10px; background: #fff;
  font-size: 15px; font-weight: 600; color: var(--txt); cursor: pointer;
}
.dev-op input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--roxo); }
.dev-op.marcado { border-color: var(--roxo); background: var(--superficie2); }
.dev-aviso {
  background: #fdf1d8; border: 1px solid #e9c46a; color: #6b4a00;
  border-radius: 10px; padding: 12px 14px; font-size: 13.5px; line-height: 1.45; margin-bottom: 14px;
}
#dev-form select, .nr-corpo select {
  width: 100%; padding: 13px 14px; font-size: 16px; border: 1px solid var(--borda);
  border-radius: 10px; margin-bottom: 14px; background: #fff; color: var(--txt); font-family: inherit;
}
.dev-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--superficie2);
}
.dev-item:last-child { border-bottom: 0; }
.dev-item-nome { display: flex; align-items: center; gap: 10px; margin: 0; min-width: 0; flex: 1;
  font-size: 14px; font-weight: 500; color: var(--txt); line-height: 1.35; cursor: pointer; }
.dev-item-nome input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--roxo); }
.dev-item-qtd { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.dev-qtd { width: 72px; padding: 9px 8px; font-size: 16px; text-align: center; margin: 0; }
.dev-qtd:disabled { background: var(--superficie2); }
.dev-de { font-size: 11.5px; color: var(--txt-suave); margin-top: 3px; white-space: nowrap; }
.dev-item.marcado .dev-item-nome { color: var(--roxo); font-weight: 700; }
.dev-resumo h3 { color: #8a5a00 !important; }
.tag-dev { color: #8a5a00; font-weight: 700; }
.dev-linha { color: #8a5a00; }

/* Modal de confirmação */
.confirma { position: fixed; inset: 0; z-index: 90; background: rgba(42,22,38,.55);
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.confirma-card { background: #fff; border-radius: 14px; padding: 20px; max-width: 380px; width: 100%;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.confirma-card h3 { margin: 0 0 8px; font-size: 17px; color: var(--txt); }
.confirma-card p { margin: 0 0 16px; font-size: 14.5px; line-height: 1.45; color: var(--txt-2); }
.confirma-acoes { display: flex; gap: 10px; }
.confirma-acoes button { flex: 1; margin: 0; }

/* Entrega não realizada */
.nota.nao-realizada { border-left-color: var(--vermelho); }
.nota.nao-realizada .check { background: var(--vermelho); border-color: var(--vermelho); }

.btn-nr {
  display: block; width: 100%; margin-top: 10px; padding: 12px; border-radius: 10px;
  border: 1px solid var(--vermelho); background: #fff; color: var(--vermelho);
  font-weight: 700; font-size: 15px; font-family: inherit; cursor: pointer;
}
.btn-nr:active { background: #fdecec; }

.bloco-lib { border: 2px solid #A3261E; }
.bloco-lib h3 { color: #A3261E; }
.bloco-lib label { display: block; margin-top: 10px; }
.bloco-lib input { width: 100%; margin: 4px 0 10px; }
.lib-status { border-radius: 10px; padding: 10px 12px; margin: 8px 0 10px; font-weight: 600; font-size: 14px; }
.lib-pend { background: #FCEFD4; color: #8A5A00; }
.lib-rec { background: #FBE3E1; color: #A3261E; }
.selo-nr {
  background: #fdecec; color: #7a1c17; border: 1px solid var(--vermelho);
  border-radius: 10px; padding: 14px; font-size: 14px; text-align: center; font-weight: 600;
}

/* Modal de não realizada (overlay dentro do app) */
.nr-fs { position: fixed; inset: 0; z-index: 70; background: var(--canvas); display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.nr-fs-topo {
  background: var(--vermelho); color: #fff; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; font-weight: 700;
  position: sticky; top: 0; z-index: 2;
}
.nr-fs-topo > span { min-width: 0; font-size: 15px; line-height: 1.2; }
.nr-corpo { padding: 16px; max-width: 640px; margin: 0 auto; width: 100%; }
.nr-corpo select {
  width: 100%; padding: 13px 14px; font-size: 16px; border: 1px solid var(--borda);
  border-radius: 10px; margin-bottom: 14px; background: #fff; color: var(--txt); font-family: inherit;
}
.nr-foto-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 16px; border-radius: 10px; border: 2px dashed var(--borda);
  background: #fff; color: var(--roxo); font-weight: 700; font-size: 15px; cursor: pointer; margin-bottom: 12px;
}
.nr-foto-gal { border-style: solid; padding: 12px; font-size: 14px; margin-top: -4px; }
.nr-foto-dica { margin: -4px 0 14px; font-size: 12.5px; line-height: 1.4; color: var(--txt-suave); }
.nr-foto-preview {
  display: block; width: 100%; max-height: 320px; object-fit: contain;
  border: 1px solid var(--borda); border-radius: 10px; margin-bottom: 14px; background: #fff;
}

/* carga aguardando conferência */
.aguardando-conf { background: #fff; border: 2px dashed #B99FC4; border-radius: 14px; padding: 22px 18px; text-align: center; }
.aguardando-conf h3 { color: #51275D; margin: 0 0 8px; }
.aguardando-conf p { color: #5a4869; margin: 0 0 14px; line-height: 1.45; }

/* mesmo cliente com nota de outra empresa na carga */
.aviso-empresas {
  background: #fdf1d8; border: 2px solid #d99a00; color: #5c3f00;
  border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-size: 14px; line-height: 1.45;
}
.aviso-empresas strong.titulo { display: block; font-size: 15px; margin-bottom: 4px; color: #7a4f00; }
.aviso-empresas ul { margin: 6px 0 0; padding-left: 18px; }
.aviso-empresas .feita { color: #2e7d32; }
.tag-empresa { color: #8a5a00; font-weight: 700; }

/* Administrador no app (modo visualização): faixa fixa e sem as ações de entrega */
.faixa-vis { display: none; }
body.modo-vis .faixa-vis { display: block; position: sticky; top: 0; z-index: 50; background: #1F6FB2; color: #fff;
  font-weight: 700; font-size: 12px; text-align: center; padding: 7px 12px; }
body.modo-vis #btn-salvar, body.modo-vis #btn-nao-realizada, body.modo-vis #btn-assin-fs,
body.modo-vis #btn-local, body.modo-vis #local-dica { display: none !important; }

.grupo-veic { display: block; margin-top: 3px; font-size: 12px; text-transform: none; letter-spacing: .02em;
  color: var(--texto, #2a1626); font-weight: 600; }

.obrig { font-weight: 500; color: var(--txt-suave); font-size: 12px; }

/* SEQUÊNCIA DE ENTREGA + antecipação + confirmar local (01/10/2026) */
.nota .check.seq { font-size: 12px; font-weight: 700; color: var(--roxo); border-color: var(--lavanda); }
.nota.travada { opacity: .62; border-left-color: var(--lavanda); }
.nota.travada .check { background: var(--superficie2); color: var(--txt-suave); }
.nota .tag-vez { display: inline-block; background: var(--superficie2); color: var(--roxo); border-radius: 6px; padding: 0 6px; font-weight: 700; }
.grupo-aberto { display: block; margin-top: 3px; font-size: 11px; color: #8A5A00; letter-spacing: .02em; }
.aviso-conf { background: #fff; border: 2px dashed #B99FC4; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-size: 13.5px; color: #5a4869; line-height: 1.4; }
.aviso-conf b { color: #51275D; }
.bloco-trava { border: 2px solid var(--lavanda); }
.bloco-trava h3 { color: var(--roxo); }
.bloco-trava label { display: block; margin-top: 10px; }
.bloco-trava input { width: 100%; margin: 4px 0 10px; }
.btn-local {
  width: 100%; padding: 11px; font-size: 15px; font-weight: 700; border-radius: 10px; font-family: inherit;
  border: 2px solid var(--roxo); background: #fff; color: var(--roxo); margin-bottom: 6px; cursor: pointer;
}
.btn-local.ok { border-color: var(--verde-ok); color: var(--verde-ok); background: #f4f7e8; }
.btn-local:disabled { opacity: .6; }
.local-dica { font-size: 12px; color: var(--txt-suave); text-align: center; margin-bottom: 6px; }
.local-dica.ok { color: var(--verde-ok); }
button.btn-nr:disabled { opacity: .45; }

/* Localização desligada/bloqueada (01/10/2026) */
.geo-fs { position: fixed; inset: 0; z-index: 80; background: rgba(42,22,38,.72); display: flex;
  align-items: center; justify-content: center; padding: 16px; }
.geo-card { background: #fff; border-radius: 16px; padding: 22px 20px; max-width: 420px; width: 100%;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); max-height: 92vh; overflow-y: auto; }
.geo-card h3 { margin: 0 0 8px; color: var(--vermelho); font-size: 19px; }
.geo-card p { margin: 0 0 10px; color: var(--txt-2); font-size: 14.5px; line-height: 1.45; }
.geo-passos { margin: 0 0 16px; padding-left: 20px; color: var(--txt); font-size: 14px; line-height: 1.5; }
.geo-passos li { margin-bottom: 6px; }
.geo-status { margin-top: 10px; font-size: 13px; color: var(--txt-suave); text-align: center; min-height: 16px; }

/* conta: esqueci a senha / avisos únicos (05/10/2026) */
.link-esqueci { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--roxo-md);
  font-weight: 600; font-size: 14px; font-family: inherit; cursor: pointer; }
#tela-esqueci .login-card p { margin: 0 0 16px; }
.conta-fs { z-index: 90; }
.conta-tit { color: var(--roxo) !important; }
.conta-fs .btn-secundario { margin-top: 8px; width: 100%; }
#confirma-texto { white-space: pre-line; }

/* finalizar carga (05/10/2026) */
.finalizar-box { margin: 18px 0 8px; }
.btn-finalizar { width: 100%; padding: 14px; font-size: 16px; font-weight: 700; border-radius: 10px; font-family: inherit;
  border: 2px solid var(--roxo); background: #fff; color: var(--roxo); cursor: pointer; }
.carga-finalizada { background: #f4f7e8; border: 1px solid var(--oliva); color: var(--verde-ok); border-radius: 12px;
  padding: 12px 14px; font-weight: 600; text-align: center; }

/* código do parceiro (Sankhya) ao lado do nome do cliente */
.nota .cliente { display: flex; align-items: flex-start; gap: 6px; line-height: 1.3; }
/* nome do cliente em até 2 linhas (antes cortava em 1 e o valor roubava espaço) */
.nota .cliente .nome-cli { min-width: 0; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.nota .cliente .cod-parc { margin-top: 1px; }
.cod-parc { flex: none; display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--canvas);
  border: 1px solid var(--borda); color: var(--txt-suave); font-size: 11px; font-weight: 600; line-height: 17px;
  white-space: nowrap; }
.linha .cod-parc { margin-left: 6px; }

/* Waze / Google Maps no bloco do cliente */
.links-mapa { align-items: center; }
.btns-mapa { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn-mapa { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 72px;
  padding: 0 14px; border-radius: 9px; border: 1px solid var(--roxo);
  color: var(--roxo); font-weight: 600; font-size: 14px; text-decoration: none; background: #fff; }
.btn-mapa:active { background: var(--roxo); color: #fff; }

/* contagem de volumes do motorista (antes da rota) */
.contagem-form { background: #fff; border: 2px solid #B99FC4; border-radius: 14px; padding: 18px 16px; }
.contagem-form h3 { color: #51275D; margin: 0 0 6px; }
.contagem-form p { color: #5a4869; margin: 0 0 14px; line-height: 1.45; }
.cont-linha { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eee4f1; }
.cont-nome { flex: 1; min-width: 0; margin: 0; font-weight: 600; color: #2a1626; font-size: 15px; line-height: 1.3; }
.cont-nome small { font-weight: 400; color: #6b5873; }
.cont-linha input { width: 72px; padding: 10px 4px; font-size: 18px; text-align: center; border: 1px solid #cdb9d6;
  border-radius: 9px; font-family: inherit; margin: 0; -moz-appearance: textfield; appearance: textfield; }
.cont-linha input::-webkit-outer-spin-button, .cont-linha input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cont-ctl { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.cont-btn { width: 48px; height: 48px; border-radius: 10px; border: 1px solid #cdb9d6; background: var(--superficie2);
  color: var(--roxo); font-size: 24px; font-weight: 700; line-height: 1; font-family: inherit; padding: 0; cursor: pointer; }
.cont-btn:active { background: var(--lavanda); }
.contagem-form button.primario { margin-top: 16px; }
.cont-erro { color: #A3261E; font-weight: 600; margin-top: 10px; }
.cont-dica { display: block; font-size: 12px; font-weight: 400; color: #6b5873; margin-top: 2px; }

/* nova entrega (não realizada liberada para outro dia) */
.nota .meta.tag-nova { color: #8A5A00; font-weight: 600; }
