/* ─── Design system ─────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --texto:       #0f172a;
  --texto-2:     #64748b;
  --texto-3:     #94a3b8;
  --fundo:       #f8fafc;
  --superficie:  #ffffff;
  --borda:       #e2e8f0;
  --primaria:    #f97316;
  --primaria-2:  #ea580c;
  --ambar:       #f59e0b;
  --navy:        #0e1b30;
  --navy-2:      #16283f;
  --sucesso:     #16a34a;
  --perigo:      #dc2626;
  --raio:        12px;
  --sombra:      0 1px 2px rgba(15, 23, 42, .05);
}
/* Trava a largura na tela do aparelho. No atalho do celular (modo app) não há
   barra do navegador, então um estouro de largura deixava a tela deslizando
   para o lado sem jeito de voltar ao lugar. Fica no html (e não no body) para
   não quebrar o topo grudado — position: sticky. */
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  background: #eef2f7;
  color: var(--texto);
  padding-bottom: 76px;
}
svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ─── Topo escuro: identidade da oficina ────────────────────────── */
.topo {
  background: linear-gradient(180deg, var(--navy), var(--navy-2));
  padding: 0 16px;
  height: 54px;
  display: flex; align-items: center;
  position: sticky; top: 0; z-index: 10;
  border-bottom: 3px solid var(--primaria);
}
.marca { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; color: #fff; }
.marca svg {
  width: 30px; height: 30px; padding: 6px;
  color: #fff; background: linear-gradient(145deg, var(--ambar), var(--primaria));
  border-radius: 9px; box-sizing: border-box;
}

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

/* ─── Navegação inferior ────────────────────────────────────────── */
.abas {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex;
  background: var(--superficie);
  border-top: 1px solid var(--borda);
  padding-bottom: env(safe-area-inset-bottom);
}
.abas button {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px 7px;
  border: none; background: none; cursor: pointer;
  font-size: 11px; font-weight: 500; font-family: inherit;
  color: var(--texto-3);
}
.abas button svg { width: 22px; height: 22px; }
.abas button.ativa { color: var(--primaria); }

/* ─── Cabeçalho de seção ────────────────────────────────────────── */
.secao {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
  flex-wrap: wrap; /* só age quando os botões de ação não cabem ao lado do título */
}
.secao h1 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.secao .sub { color: var(--texto-2); font-size: 13px; margin-top: 1px; }

h2 { font-size: 13px; font-weight: 600; color: var(--texto-2); text-transform: uppercase; letter-spacing: .04em; margin: 20px 0 8px; }

/* ─── Botões ────────────────────────────────────────────────────── */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(145deg, var(--ambar), var(--primaria)); color: #fff;
  border: none; border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; text-decoration: none;
  transition: background .12s, filter .12s;
}
.botao:hover { filter: brightness(1.06); }
.botao svg { width: 17px; height: 17px; }
.botao.claro { background: var(--superficie); color: var(--texto); border: 1px solid var(--borda); }
.botao.claro:hover { background: var(--fundo); filter: none; }
.botao.perigo { background: var(--superficie); color: var(--perigo); border: 1px solid var(--borda); }
.botao.perigo:hover { background: #fef2f2; border-color: #fecaca; filter: none; }
.botao.largo { width: 100%; }
.botao.pequeno { padding: 7px 12px; font-size: 13px; }
/* WhatsApp: verde escuro (contraste ~5:1 com o branco, como .etapa.feita) no
   lugar do #25d366 antigo, que sumia o texto branco. */
.botao.zap { background: #15803d; }

.voltar {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer; font-family: inherit;
  color: var(--texto-2); font-size: 14px; font-weight: 500;
  padding: 0; margin-bottom: 14px;
}
.voltar:hover { color: var(--texto); }
.voltar svg { width: 17px; height: 17px; }

/* ─── Cards de lista ────────────────────────────────────────────── */
.cartao {
  display: flex; align-items: center; gap: 12px;
  background: var(--superficie);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  padding: 13px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  box-shadow: var(--sombra);
  transition: border-color .12s;
}
.cartao:hover { border-color: #cbd5e1; }
.cartao.estatico { cursor: default; }
.cartao .meio { flex: 1; min-width: 0; }
.cartao .titulo { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cartao .detalhe { color: var(--texto-2); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Na lista de OS o nome do cliente quebra em vez de sumir no "..." */
.cartao .detalhe.quebra { white-space: normal; }
.cartao .fim { text-align: right; }
.cartao .fim .valor { font-weight: 600; font-variant-numeric: tabular-nums; }
.cartao .fim .apoio { color: var(--texto-3); font-size: 12px; margin-top: 2px; }
.cartao > svg.seta { color: var(--texto-3); width: 17px; height: 17px; }

/* Card de retorno em coluna: dados em cima, WhatsApp + "Avisado" embaixo,
   dividindo a linha. Ocupa menos altura que a versão em linha. */
.cartao.retorno { flex-direction: column; align-items: stretch; gap: 8px; }
.acoes-retorno { display: flex; gap: 8px; }
.acoes-retorno .botao { flex: 1; }

.placa {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12px; font-weight: 600;
  background: var(--fundo); border: 1px solid var(--borda);
  border-radius: 6px; padding: 1px 7px;
  letter-spacing: .03em;
}

/* ─── Etiquetas de status (ponto colorido + fundo tintado) ──────── */
.etiqueta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 99px;
  white-space: nowrap;
}
.etiqueta::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-orcamento       { color: #64748b; background: #f1f5f9; }
.st-aprovado        { color: #2563eb; background: #eff6ff; }
.st-em_servico      { color: #d97706; background: #fffbeb; }
.st-aguardando_peca { color: #9333ea; background: #faf5ff; }
.st-pronto          { color: #16a34a; background: #f0fdf4; }
.st-entregue        { color: #475569; background: #f1f5f9; }

.grupo-status h3 {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--texto-2);
  margin: 18px 0 8px;
}
.grupo-status h3 .contagem {
  background: var(--borda); color: var(--texto-2);
  font-size: 11px; font-weight: 700;
  border-radius: 99px; padding: 1px 8px;
}
/* Cabeçalho de "Últimos entregues", que abre/fecha o histórico num toque */
.grupo-status h3.alternavel { cursor: pointer; }
.alterna { color: var(--texto-3); font-size: 12px; }
/* Ritmo vertical mais apertado só no quadro da Oficina (a meta é menos scroll) */
#of-lista .grupo-status h3 { margin: 12px 0 6px; }

/* ─── Formulários ───────────────────────────────────────────────── */
label { display: block; font-size: 13px; font-weight: 500; color: var(--texto-2); margin-bottom: 5px; }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--borda);
  border-radius: 10px;
  font-size: 15px; font-family: inherit; color: var(--texto);
  background: var(--superficie);
  margin-bottom: 14px;
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primaria);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .14);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
  padding-right: 38px;
}

.busca { position: relative; margin-bottom: 12px; }
.busca svg {
  position: absolute; left: 12px; top: 12px;
  width: 18px; height: 18px; color: var(--texto-3);
  pointer-events: none;
}
.busca input { padding-left: 40px; margin-bottom: 0; }

/* No celular as duas colunas passam a empilhar em vez de espremer: sem isto o
   bloco "Lembrete de retorno" (data + os três botões de prazo) estourava a
   largura da tela em 25px e a página inteira arrastava para o lado. */
.duas-colunas { display: flex; flex-wrap: wrap; gap: 12px; }
.duas-colunas > div { flex: 1 1 200px; min-width: 0; }

/* ─── Itens da OS ───────────────────────────────────────────────── */
.item-os {
  display: flex; align-items: center; gap: 10px;
  background: var(--superficie);
  border: 1px solid var(--borda); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 6px;
}
.item-os .desc { flex: 1; min-width: 0; }
.item-os .desc .nome { font-weight: 500; font-size: 14px; }
.item-os .desc .apoio { color: var(--texto-2); font-size: 12px; }
.item-os .valor { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 14px; }
.item-os .remover {
  background: none; border: none; cursor: pointer;
  color: var(--texto-3); padding: 6px; border-radius: 8px; display: flex;
}
.item-os .remover:hover { color: var(--perigo); background: #fef2f2; }
.item-os .remover svg { width: 16px; height: 16px; }

.totais-os {
  background: var(--superficie);
  border: 1px solid var(--borda); border-radius: var(--raio);
  padding: 14px 16px; margin-top: 12px;
}
.totais-os .linha { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; color: var(--texto-2); font-size: 14px; }
.totais-os .linha input { width: 110px; margin: 0; text-align: right; padding: 6px 10px; font-size: 14px; }
.totais-os .total {
  display: flex; justify-content: space-between;
  font-weight: 700; font-size: 17px; color: var(--texto);
  border-top: 1px solid var(--borda); margin-top: 8px; padding-top: 10px;
  font-variant-numeric: tabular-nums;
}

/* ─── Trilha de etapas da OS ────────────────────────────────────── */
.etapas {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  margin-bottom: 10px;
}
.etapa {
  display: inline-flex; align-items: center;
  min-height: 34px; padding: 5px 11px;
  border-radius: 99px; border: 1px solid var(--borda);
  font-size: 12.5px; font-weight: 600; font-family: inherit;
  background: var(--superficie); color: var(--texto-3);
  cursor: pointer; white-space: nowrap;
}
.etapa.feita { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.etapa.atual { border: 2px solid currentColor; cursor: default; font-weight: 700; }
.etapa.futura:hover { border-color: var(--primaria); color: var(--primaria); }
.etapa-seta { color: var(--texto-3); font-size: 13px; user-select: none; }
.etapa-encerrada {
  text-align: center; padding: 10px;
  color: #15803d; font-weight: 600; font-size: 14px;
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px;
}

/* ─── Checklist de entrada ──────────────────────────────────────── */
.check-cabecalho {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 8px;
  color: var(--texto-2); font-size: 13px; font-weight: 500;
}
.check-item {
  background: var(--superficie);
  border: 1px solid var(--borda); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 6px;
}
.check-item .check-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.check-item .check-nome { font-weight: 500; font-size: 14px; }
.check-item .check-camera {
  background: none; border: none; cursor: pointer;
  color: var(--texto-3); padding: 6px; border-radius: 8px; display: flex;
}
.check-item .check-camera:hover { color: var(--primaria); background: var(--fundo); }
.check-item .check-camera svg { width: 18px; height: 18px; }
.segmentado { display: flex; gap: 6px; }
.segmentado button {
  flex: 1; min-height: 40px;
  background: var(--fundo); color: var(--texto-2);
  border: 1px solid var(--borda); border-radius: 8px;
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.segmentado button.ativo.ok       { color: var(--sucesso); background: #f0fdf4; border-color: #bbf7d0; }
.segmentado button.ativo.atencao  { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.segmentado button.ativo.problema { color: var(--perigo); background: #fef2f2; border-color: #fecaca; }
.check-item .check-obs { margin: 8px 0 0; padding: 8px 10px; font-size: 14px; }
.check-item .check-fotos {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.check-item .check-fotos .foto { width: 56px; height: 56px; aspect-ratio: auto; border-radius: 8px; }
.check-item .check-fotos .foto button { top: 2px; right: 2px; padding: 3px; }
.check-item .check-fotos .foto button svg { width: 10px; height: 10px; }
.check-toggle {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--texto); font-weight: 500;
  background: var(--superficie);
  border: 1px solid var(--borda); border-radius: 10px;
  padding: 10px 12px; margin-top: 8px; cursor: pointer;
}
.check-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--primaria); }
.check-dica { color: var(--texto-3); font-size: 12px; margin-top: 6px; }

/* ─── Modal ─────────────────────────────────────────────────────── */
.modal-fundo {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: var(--superficie);
  width: 100%; max-width: 480px;
  border-radius: 16px 16px 0 0;
  padding: 20px;
  max-height: 88vh; overflow-y: auto;
  animation: subir .18s ease-out;
}
@keyframes subir { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-titulo {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.modal-titulo h2 { font-size: 17px; font-weight: 700; color: var(--texto); text-transform: none; letter-spacing: -.01em; margin: 0; }
.modal-titulo .fechar {
  background: var(--fundo); border: none; cursor: pointer;
  color: var(--texto-2); border-radius: 99px; padding: 7px; display: flex;
}
.modal-titulo .fechar svg { width: 16px; height: 16px; }
.escondido { display: none !important; }

.sugestoes {
  border: 1px solid var(--borda); border-radius: 10px;
  margin: 8px 0 14px; background: var(--superficie);
  max-height: 220px; overflow-y: auto;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}
.sugestoes div { padding: 11px 14px; border-bottom: 1px solid var(--fundo); cursor: pointer; font-size: 14px; }
.sugestoes div:last-child { border-bottom: none; }
.sugestoes div:hover { background: var(--fundo); }
.sugestoes .nada { color: var(--texto-2); cursor: default; }

.separador { display: flex; align-items: center; gap: 10px; color: var(--texto-3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin: 16px 0 14px; }
.separador::before, .separador::after { content: ''; flex: 1; height: 1px; background: var(--borda); }

/* ─── Fotos da OS ───────────────────────────────────────────────── */
.fotos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}
.foto {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--borda);
  background: var(--superficie);
}
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto button {
  position: absolute; top: 4px; right: 4px;
  background: rgba(15, 23, 42, .65); color: #fff;
  border: none; border-radius: 99px; padding: 4px;
  cursor: pointer; display: flex;
}
.foto button svg { width: 12px; height: 12px; }
.foto.adicionar {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1px dashed var(--borda); color: var(--texto-2);
  font-size: 12px; font-weight: 500; font-family: inherit; cursor: pointer;
}
.foto.adicionar:hover { border-color: var(--primaria); color: var(--primaria); }
.foto.adicionar svg { width: 20px; height: 20px; }

/* ─── Visor de fotos (tela cheia, com zoom) ─────────────────────── */
.visor {
  position: fixed; inset: 0; z-index: 30;
  background: #020617; /* opaco: a tela de trás não atrapalha a leitura da foto */
  display: flex; flex-direction: column;
}
.visor-topo {
  display: flex; align-items: flex-start; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 14px 12px;
  color: #fff;
}
.visor-info { flex: 1; min-width: 0; }
.visor-info .titulo { font-size: 15px; font-weight: 600; }
/* Data/hora do registro: é o que dá à foto valor de vistoria de entrada */
.visor-info .quando { font-size: 12.5px; color: #cbd5e1; margin-top: 2px; }
.visor-fechar {
  background: rgba(255, 255, 255, .15); color: #fff;
  border: none; border-radius: 99px; padding: 9px;
  display: flex; cursor: pointer; flex-shrink: 0;
}
/* touch-action: none entrega os dois dedos para o nosso zoom, em vez de o
   navegador tentar dar zoom na página inteira por baixo do visor */
.visor-palco {
  position: relative;
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; touch-action: none;
}
.visor-palco img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  transform-origin: center;
  user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
}
/* Setas nos cantos: longe do × lá em cima e dos botões de zoom lá embaixo, o
   polegar não troca de foto sem querer */
.visor-seta {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 99px;
  /* Fundo escuro (e não claro): a seta fica legível tanto sobre foto clara
     quanto sobre foto escura, já que ela cai por cima da imagem */
  /* O contorno claro segura a leitura quando a seta cai no fundo preto do
     visor; o miolo escuro segura quando ela cai por cima de foto clara */
  border: 1px solid rgba(255, 255, 255, .35); background: rgba(2, 6, 23, .55); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 1px 6px rgba(2, 6, 23, .4);
}
.visor-seta.esquerda { left: 10px; }
.visor-seta.direita { right: 10px; }
/* Foto ampliada: o dedo na lateral é para arrastar a foto, não para trocar */
.visor.com-zoom .visor-seta { display: none; }
.visor-contagem { font-size: 12.5px; color: #cbd5e1; padding-top: 2px; white-space: nowrap; }

.visor-zoom {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 10px 14px calc(14px + env(safe-area-inset-bottom));
  color: #fff;
}
.visor-zoom button {
  width: 46px; height: 46px; border-radius: 99px;
  border: none; background: rgba(255, 255, 255, .15); color: #fff;
  font-size: 24px; font-family: inherit; line-height: 1; cursor: pointer;
}
.visor-zoom .nivel { font-size: 13px; min-width: 58px; text-align: center; font-variant-numeric: tabular-nums; color: #cbd5e1; }
.visor-dica { text-align: center; font-size: 12px; color: #94a3b8; padding: 0 14px 6px; }
/* No computador o zoom é pelos botões — a dica de dedos só serve no toque */
@media (hover: hover) and (pointer: fine) { .visor-dica { display: none; } }
/* Enquanto o visor está aberto a página de trás não rola junto */
body.sem-rolagem { overflow: hidden; }

/* ─── Financeiro ────────────────────────────────────────────────── */
.resumo-caixa { display: flex; gap: 10px; margin-bottom: 6px; }
.caixinha {
  flex: 1;
  background: var(--superficie);
  border: 1px solid var(--borda); border-radius: var(--raio);
  padding: 14px 16px;
  box-shadow: var(--sombra);
}
.caixinha .rotulo { font-size: 12px; font-weight: 500; color: var(--texto-2); margin-bottom: 4px; }
.caixinha .valor { font-size: 21px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.caixinha.positivo { background: #f0fdf4; border-color: #bbf7d0; }
.caixinha.positivo .valor { color: var(--sucesso); }
.caixinha.negativo { background: #fef2f2; border-color: #fecaca; }
.caixinha.negativo .valor { color: var(--perigo); }

/* ─── Envio de vários orçamentos ────────────────────────────────── */
/* Espaço para a lista não terminar embaixo da barra fixa de ações */
.tela-envio { padding-bottom: 120px; }

.acoes-cabecalho { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* Quadro da Oficina cortado no teto: diz o que ficou de fora em vez de sumir */
.aviso-corte {
  background: var(--fundo); border: 1px dashed var(--borda); color: var(--texto-2);
  border-radius: var(--raio); padding: 10px 14px; margin: 16px 0 12px;
  font-size: 13px; line-height: 1.4;
}

.aviso-envio {
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  border-radius: var(--raio); padding: 10px 14px; margin-bottom: 12px;
  font-size: 13px;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chips button {
  padding: 7px 13px; border-radius: 99px;
  border: 1px solid var(--borda); background: var(--superficie);
  font-family: inherit; font-size: 13px; font-weight: 500; color: var(--texto-2);
  cursor: pointer; white-space: nowrap;
}
.chips button:hover { border-color: #cbd5e1; }
.chips button.ativo { background: var(--texto); border-color: var(--texto); color: #fff; font-weight: 600; }

/* Chips de visão rápida da Oficina: uma linha só, rolagem lateral, grudados sob
   o topo (54px). Diferente dos .chips da aba Ordens: aqui é atalho de visão. */
.chips-oficina {
  position: sticky; top: 54px; z-index: 5;      /* abaixo do .topo (10) e das .abas do desktop (11) */
  display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto;
  margin: 0 -16px 4px; padding: 8px 16px;       /* sangra o padding do main para grudar de borda a borda */
  background: #eef2f7;                           /* cor do body: cobre os cards ao rolar por baixo */
  scrollbar-width: none;
}
.chips-oficina::-webkit-scrollbar { display: none; }
.chips-oficina button {
  min-height: 40px; padding: 8px 14px;          /* alvo de toque >=40px (só aqui; a aba Ordens fica intacta) */
  border-radius: 99px; border: 1px solid var(--borda);
  background: var(--superficie); color: var(--texto-2);
  font: inherit; font-size: 13px; font-weight: 500;
  white-space: nowrap; flex-shrink: 0; cursor: pointer;
}
.chips-oficina button.ativo { background: var(--texto); border-color: var(--texto); color: #fff; font-weight: 600; }

.linha-selecao { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.linha-selecao span { flex: 1; min-width: 0; font-size: 13px; color: var(--texto-2); }

/* O cartão inteiro é <label>: clicar em qualquer lugar marca (alvo grande) */
.cartao.selecionavel { font-size: 15px; font-weight: 400; color: var(--texto); }
.cartao.selecionavel input[type="checkbox"] {
  width: 20px; height: 20px; flex: none; margin: 0;
  accent-color: var(--primaria); cursor: pointer;
}
.cartao.selecionavel.marcado { border-color: var(--primaria); background: #fff7ed; }

/* Selo de "já passei este orçamento para o cliente" */
.tag-enviado {
  font-size: 11px; font-weight: 600;
  color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: 99px; padding: 1px 8px;
}
.linha-enviado {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--superficie); border: 1px solid var(--borda);
  border-radius: var(--raio); padding: 10px 14px; margin-top: 16px;
  box-shadow: var(--sombra);
  font-size: 13px; color: var(--texto-2);
}
.linha-enviado span { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 220px; }
.linha-enviado svg { width: 16px; height: 16px; color: var(--texto-3); }
.linha-enviado b { color: var(--texto); }

/* Barra fixa com o total do que está marcado. Fica ATRÁS das abas (z-index
   menor): o excesso de padding embaixo some sob elas, sem fresta nem sobreposição. */
.barra-envio {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9;
  background: var(--superficie);
  border-top: 1px solid var(--borda);
  box-shadow: 0 -4px 14px rgba(15, 23, 42, .07);
  padding: 10px 16px calc(61px + env(safe-area-inset-bottom));
}
.barra-envio-caixa {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  max-width: 860px; margin: 0 auto;
}
.barra-envio .resumo { flex: 1; min-width: 130px; }
.barra-envio .resumo .contagem { font-size: 13px; color: var(--texto-2); }
.barra-envio .resumo .valor { font-size: 19px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.barra-envio .resumo .pergunta { font-size: 16px; font-weight: 700; letter-spacing: -.01em; color: var(--texto); }
.barra-envio .acoes { display: flex; gap: 8px; flex: 1; min-width: 210px; }
.barra-envio .acoes .botao { flex: 1; }

.botao:disabled { opacity: .45; cursor: default; filter: none; }

/* ─── Banner de atualização disponível ──────────────────────────── */
.banner-atualizacao {
  display: flex; align-items: center; gap: 10px;
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8;
  border-radius: var(--raio); padding: 10px 14px;
  margin: 14px 16px 0; max-width: 828px;
  font-size: 14px; font-weight: 500;
}
.banner-atualizacao a { color: #1d4ed8; font-weight: 700; }
.banner-atualizacao button {
  margin-left: auto; background: none; border: none; cursor: pointer;
  color: #60a5fa; display: flex; padding: 4px;
}
@media (min-width: 860px) { .banner-atualizacao { margin-left: auto; margin-right: auto; } }

/* Variantes do banner para a licença: aviso (vencendo) e bloqueio (modo consulta) */
.banner-atualizacao.alerta { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.banner-atualizacao.alerta a, .banner-atualizacao.alerta button { color: #92400e; }
.banner-atualizacao.bloqueio { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.banner-atualizacao.bloqueio a, .banner-atualizacao.bloqueio button { color: #b91c1c; }

/* ─── Estados vazios e feedback ─────────────────────────────────── */
.vazio {
  text-align: center; padding: 36px 20px;
  color: var(--texto-2);
  background: var(--superficie);
  border: 1px dashed var(--borda); border-radius: var(--raio);
  margin-bottom: 8px;
}
.vazio svg { width: 34px; height: 34px; color: var(--texto-3); margin-bottom: 8px; }
.vazio .principal { font-weight: 600; color: var(--texto); font-size: 14px; }
.vazio .apoio { font-size: 13px; margin-top: 3px; }

.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(16px);
  background: var(--texto); color: #fff;
  padding: 10px 18px; border-radius: 99px;
  font-size: 13px; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 30; white-space: nowrap;
}
.toast.visivel { opacity: 1; transform: translateX(-50%) translateY(0); }

.acoes-linha { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.acoes-linha .botao { flex: 1; }

/* ─── Crédito do desenvolvedor ──────────────────────────────────── */
.credito {
  text-align: center;
  font-size: 11.5px;
  color: var(--texto-3);
  padding: 8px 16px 16px;
  max-width: 860px; margin: 0 auto;
}
.credito a { color: var(--texto-2); }

/* ─── Desktop: navegação vira menu no próprio topo escuro ───────── */
@media (min-width: 700px) {
  body { padding-bottom: 24px; }
  .abas {
    position: fixed; top: 0; left: 0; right: 0; bottom: auto;
    height: 54px;
    background: transparent; border: none;
    justify-content: center; align-items: center; gap: 6px;
    pointer-events: none;
    z-index: 11;
  }
  .abas button {
    pointer-events: auto;
    flex: none; flex-direction: row; gap: 8px;
    padding: 8px 14px; font-size: 14px; font-weight: 500;
    border-radius: 8px;
    color: #94a3b8;
    transition: background .12s, color .12s;
  }
  .abas button:hover { background: rgba(255, 255, 255, .08); color: #fff; }
  .abas button svg { width: 18px; height: 18px; }
  .abas button.ativa { background: linear-gradient(145deg, var(--ambar), var(--primaria)); color: #fff; font-weight: 600; }
  .modal-fundo { align-items: center; padding: 20px; }
  .modal { border-radius: 16px; }
  .toast { bottom: 32px; }
  .barra-envio { padding-bottom: 12px; }
  .tela-envio { padding-bottom: 96px; }
}

/* Em larguras intermediárias o menu central pode encostar na marca: esconde os ícones */
@media (min-width: 700px) and (max-width: 860px) {
  .abas button svg { display: none; }
}
