/* Recife in USA — painel de pedidos. Celular primeiro; ≥768 tablet; ≥1024 colunas lado a lado. */
:root {
  --azul: #14274e; --azul-2: #1f3b73; --azul-claro: #eaf0fb; --azul-borda: #c9d6ee;
  --fundo: #ffffff; --fundo-2: #f5f7fb; --borda: #e3e8f0; --texto: #101828; --texto-2: #5b6576; --texto-3: #8a93a3;
  --verde: #0d7a52; --verde-claro: #e6f6ef; --amarelo: #8a5a00; --amarelo-claro: #fff4dc;
  --vermelho: #b42318; --vermelho-claro: #fdecea; --roxo-claro: #f1ecfb; --roxo: #5b3aa6;
  --raio: 14px; --raio-p: 10px; --sombra: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --sombra-alta: 0 12px 40px rgba(16, 24, 40, .18);
  --margem: 16px; --toque: 44px;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fundo); color: var(--texto); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
body.com-folha { overflow: hidden; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.centro { text-align: center; }
.nota { color: var(--texto-2); font-size: 13px; }
.meta { color: var(--texto-2); font-size: 13px; }
.link { color: var(--azul-2); font-weight: 600; font-size: 14px; text-decoration: none; display: inline-block; padding: 6px 0; }
:focus-visible { outline: 3px solid #7aa2e8; outline-offset: 2px; }

/* ---------- botões e campos ---------- */
.bt { min-height: var(--toque); padding: 10px 16px; border-radius: var(--raio-p); border: 1px solid transparent; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-align: center;
  transition: background .15s ease, border-color .15s ease, opacity .15s ease; -webkit-tap-highlight-color: transparent; }
.bt small { display: block; font-weight: 500; font-size: 12px; opacity: .8; }
.bt:disabled { opacity: .45; cursor: not-allowed; }
.bt-primario { background: var(--azul); color: #fff; }
.bt-primario:not(:disabled):hover { background: var(--azul-2); }
.bt-secundario { background: var(--azul-claro); color: var(--azul); border-color: var(--azul-borda); }
.bt-leve { background: #fff; color: var(--texto); border-color: var(--borda); }
.bt-leve:not(:disabled):hover { background: var(--fundo-2); }
.bt-perigo { background: #fff; color: var(--vermelho); border-color: #f3c3bd; }
.bt-cheio { width: 100%; }
.bt-icone { width: var(--toque); height: var(--toque); border-radius: 50%; border: 1px solid var(--borda); background: #fff; color: var(--texto-2);
  display: grid; place-items: center; cursor: pointer; flex: none; font-size: 16px; padding: 0; }
.bt-icone svg { width: 20px; height: 20px; }
.campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.campo > span { font-size: 13px; font-weight: 600; color: var(--texto-2); }
input, select, textarea { width: 100%; min-height: var(--toque); border: 1px solid var(--borda); border-radius: var(--raio-p); background: #fff;
  padding: 10px 12px; font-size: 16px; min-width: 0; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--azul-2); box-shadow: 0 0 0 3px rgba(31, 59, 115, .15); }
input[type=file] { padding: 8px; font-size: 14px; }
.grade-campos { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .grade-campos { grid-template-columns: 1fr 1fr; } .campo-largo { grid-column: 1 / -1; } }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px var(--margem); background: linear-gradient(180deg, var(--azul-claro), #fff 60%); }
.login-caixa { width: 100%; max-width: 380px; background: #fff; border: 1px solid var(--borda); border-radius: 20px; padding: 28px 22px;
  box-shadow: var(--sombra-alta); display: flex; flex-direction: column; gap: 16px; }
.login-caixa h1 { text-align: center; font-size: 24px; letter-spacing: -.02em; color: var(--azul); }
.login-sub { text-align: center; color: var(--texto-2); margin-top: -10px; }
.marca { display: flex; justify-content: center; }
.marca-selo { width: 56px; height: 56px; border-radius: 16px; background: var(--azul); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.olho-caixa { position: relative; display: block; }
.olho-caixa input { padding-right: 52px; }
.olho { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: var(--toque); height: var(--toque); border: 0; background: transparent;
  color: var(--texto-3); display: grid; place-items: center; cursor: pointer; border-radius: 8px; }
.olho svg { width: 20px; height: 20px; }
.erro { color: var(--vermelho); background: var(--vermelho-claro); border-radius: var(--raio-p); padding: 10px 12px; font-size: 14px; text-align: center; }

/* ---------- topo ---------- */
.topo { padding: 12px var(--margem) 8px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--borda); background: #fff; }
.topo-linha { display: flex; align-items: center; gap: 10px; }
.titulo { flex: 1; text-align: center; font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: var(--azul); white-space: nowrap; }
#bt-novo { padding: 10px 14px; }
.controles { display: grid; grid-template-columns: 1fr; gap: 10px; }
.busca input { background: var(--fundo-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' fill='none' stroke='%238a93a3' stroke-width='2'/%3E%3Cpath d='m20 20-3.5-3.5' stroke='%238a93a3' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 12px center / 18px;
  padding-left: 40px; border-color: transparent; }
.alternador { display: grid; grid-template-columns: 1fr 1fr; background: var(--fundo-2); border-radius: 12px; padding: 4px; gap: 4px; }
.alternador button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; color: var(--texto-2); cursor: pointer; }
.alternador button.ativo { background: #fff; color: var(--azul); box-shadow: var(--sombra); }
.filtros { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filtros select { font-size: 14px; padding: 8px 10px; }
.numeros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.numero { border: 1px solid var(--borda); background: #fff; border-radius: 12px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; cursor: pointer; min-height: 60px; min-width: 0; }
.numero b { font-size: 20px; font-weight: 800; color: var(--azul); line-height: 1.1; font-variant-numeric: tabular-nums; }
.numero span { font-size: 11px; color: var(--texto-2); font-weight: 600; text-align: center; line-height: 1.15; }
.numero-dinheiro b { font-size: 14px; white-space: nowrap; }

/* ---------- abas (celular) ---------- */
.principal { padding: 0 0 40px; }
.abas { display: flex; gap: 8px; overflow-x: auto; padding: 12px var(--margem); position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--borda); scrollbar-width: none; scroll-padding: 0 var(--margem); }
.abas::-webkit-scrollbar { display: none; }
.aba { flex: none; min-height: 40px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--borda); background: #fff; font-weight: 600; font-size: 14px;
  color: var(--texto-2); display: inline-flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; }
.aba.ativa { background: var(--azul); color: #fff; border-color: var(--azul); }
.contador { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--fundo-2); color: var(--texto-2); font-size: 12px; font-weight: 700;
  display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.aba.ativa .contador { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---------- quadro ---------- */
.quadro { padding: 12px var(--margem); }
.coluna:not(.ativa) { display: none; }
.coluna-cab { display: none; }
.coluna-lista { display: grid; gap: 12px; }
.vazio { color: var(--texto-3); text-align: center; padding: 28px 8px; font-size: 14px; }
.vazio.grande { padding: 48px 16px; }
@media (min-width: 640px) and (max-width: 1023px) { .coluna-lista { grid-template-columns: 1fr 1fr; } }

/* ---------- cartão ---------- */
.cartao { background: #fff; border: 1px solid var(--borda); border-radius: var(--raio); padding: 12px; box-shadow: var(--sombra); cursor: pointer;
  display: flex; flex-direction: column; gap: 10px; min-width: 0; transition: border-color .15s ease, box-shadow .15s ease; }
.cartao:hover { border-color: var(--azul-borda); box-shadow: 0 4px 14px rgba(16, 24, 40, .08); }
.cartao-topo { display: flex; gap: 12px; min-width: 0; }
.cartao-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cartao-l1 { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.num { font-weight: 800; color: var(--azul); font-size: 14px; flex: none; }
.cliente { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.produto { font-size: 15px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.variante { font-size: 13px; color: var(--texto); }
.cartao .meta { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foto { flex: none; aspect-ratio: 1; border-radius: var(--raio-p); overflow: hidden; background: var(--fundo-2); display: grid; }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-vazia { display: grid; place-items: center; background: linear-gradient(135deg, var(--azul-claro), #f6f8fd); color: var(--azul-2); position: relative; }
.foto-vazia svg { width: 42%; height: 42%; opacity: .55; }
.foto-vazia b { position: absolute; bottom: 6%; right: 9%; font-size: 12px; font-weight: 800; opacity: .7; }
.foto-cartao { width: 76px; }
.foto-item { width: 52px; }
.foto-det { width: 112px; }
.precos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.precos > div { background: var(--fundo-2); border-radius: 8px; padding: 6px 8px; min-width: 0; }
.precos small, .det-precos small { display: block; font-size: 11px; color: var(--texto-2); font-weight: 600; }
.precos b { display: block; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.precos .aviso-br { background: var(--amarelo-claro); }
.nosso { display: flex; align-items: center; gap: 10px; background: var(--azul); color: #fff; border-radius: var(--raio-p); padding: 8px 12px; }
.nosso span { font-size: 12px; font-weight: 600; opacity: .85; flex: 1; min-width: 0; }
.nosso span small { display: block; font-size: 11px; font-weight: 500; opacity: .9; white-space: normal; }
.nosso b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nosso em { flex-shrink: 0; white-space: nowrap; font-style: normal; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .18); padding: 2px 7px; border-radius: 999px; }
.selos { display: flex; flex-wrap: wrap; gap: 6px; }
.selo { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; line-height: 1.3; }
.selo-falta { background: var(--amarelo-claro); color: var(--amarelo); }
.selo-ok { background: var(--verde-claro); color: var(--verde); }
.selo-alerta { background: var(--vermelho-claro); color: var(--vermelho); }
.selo-falta-info { background: var(--roxo-claro); color: var(--roxo); }
.selo-neutro { background: var(--fundo-2); color: var(--texto-2); }

/* ---------- folha de detalhe ---------- */
.veu { position: fixed; inset: 0; background: rgba(16, 24, 40, .38); z-index: 20; }
.folha { position: fixed; left: 0; right: 0; bottom: 0; max-height: 92dvh; background: #fff; z-index: 21; border-radius: 20px 20px 0 0;
  box-shadow: var(--sombra-alta); overflow-y: auto; overscroll-behavior: contain; transform: translateY(100%); transition: transform .22s ease; }
.folha.aberta { transform: none; }
.folha-cab { position: sticky; top: 0; z-index: 2; background: #fff; display: flex; align-items: center; gap: 10px; padding: 14px var(--margem) 10px;
  border-bottom: 1px solid var(--borda); }
.pegador { position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; margin-left: -20px; background: var(--borda); border-radius: 4px; }
.folha-titulo { flex: 1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.folha-titulo h2 { font-size: 18px; font-weight: 800; color: var(--azul); }
.chip { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--azul-claro); color: var(--azul); }
.folha-corpo { padding: 16px var(--margem) 32px; display: flex; flex-direction: column; gap: 16px; }
.det-topo { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.det-topo > div:last-child { min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.det-produto { font-size: 17px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.bt-foto { min-height: 36px; padding: 6px 12px; font-size: 13px; margin-top: 4px; }
.alerta-falta { background: var(--roxo-claro); color: var(--roxo); padding: 10px 12px; border-radius: var(--raio-p); font-size: 14px; }
.det-precos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.det-precos > div { background: var(--fundo-2); border-radius: var(--raio-p); padding: 8px 10px; min-width: 0; }
.det-precos b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.det-precos .det-nosso { grid-column: 1 / -1; background: var(--azul); color: #fff; text-align: center; padding: 12px; }
.det-nosso small { color: rgba(255, 255, 255, .8) !important; }
.det-nosso b { font-size: 26px; font-weight: 800; }
.det-nosso span { font-size: 13px; opacity: .85; }
.det-nosso > span { display: block; }
.det-nosso-valor { display: flex; width: fit-content; align-items: center; justify-content: center; gap: 8px; min-height: 48px; max-width: 100%; margin: 4px auto;
  padding: 2px 14px; border: 1px dashed rgba(255, 255, 255, .45); border-radius: 12px; background: rgba(255, 255, 255, .06); color: #fff; font: inherit; cursor: pointer; }
.det-nosso-valor:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .8); }
.det-nosso-valor:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.det-nosso-valor b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.lapis { width: 20px; height: 20px; flex: none; opacity: .9; }
.det-nosso-edit { display: flex; flex-direction: column; gap: 10px; text-align: left !important; }
.det-nosso-edit label { text-align: center; }
.preco-campo { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 0 14px; max-width: 280px; width: 100%; margin: 0 auto;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.preco-campo span { color: var(--texto-2); font-size: 20px; font-weight: 700; }
.preco-campo input { flex: 1; min-width: 0; border: 0; box-shadow: none !important; padding: 8px 0; min-height: 56px; font-size: 28px; font-weight: 800;
  color: var(--azul); text-align: right; font-variant-numeric: tabular-nums; background: transparent; }
.preco-ao-vivo { display: flex; flex-direction: column; gap: 8px; }
.pv-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.pv-grade > div { background: rgba(255, 255, 255, .1); border-radius: 10px; padding: 7px 10px; min-width: 0; }
.pv-grade small { font-size: 11px; }
.pv-grade b { font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; font-variant-numeric: tabular-nums; }
.pv-grade b.neg { color: #ffb4ab; }
.pv-cartao, .pv-dica { font-size: 13px; text-align: center; color: rgba(255, 255, 255, .9); }
.det-nosso .pv-alerta b, .det-nosso .pv-cartao b { display: inline; font-size: inherit; font-weight: 800; white-space: normal; }
.pv-alerta { font-size: 13px; line-height: 1.4; padding: 8px 10px; border-radius: 10px; }
.pv-ruim { background: var(--vermelho-claro); color: var(--vermelho); font-weight: 600; }
.pv-atencao { background: var(--amarelo-claro); color: var(--amarelo); font-weight: 600; }
.pv-info { background: var(--roxo-claro); color: var(--roxo); }
.bt-preco-salvar { background: #fff; color: var(--azul); font-weight: 800; }
.bt-preco-salvar:not(:disabled):hover { background: var(--azul-claro); }
.bt-preco-cancelar { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.bt-preco-cancelar:hover { background: rgba(255, 255, 255, .1); }
.acoes { display: flex; flex-direction: column; gap: 10px; }
.acoes-par { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acoes-par .bt { flex-direction: column; gap: 0; }
.bloco { border-top: 1px solid var(--borda); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.bloco h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-2); }
.pag-resumo { font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.linha-cartao { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.lista-simples { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lista-simples li { background: var(--fundo-2); border-radius: var(--raio-p); padding: 10px 12px; font-size: 14px; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.lista-simples li span { color: var(--texto-2); font-size: 12px; }
.encerrar { border-top: 1px solid var(--borda); padding-top: 14px; }
.encerrar:has(> :only-child) { grid-template-columns: 1fr; }

/* ---------- diálogos ---------- */
.dialogo { border: 0; padding: 0; border-radius: 18px; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: var(--sombra-alta); }
.dialogo-pequeno { width: min(420px, calc(100vw - 24px)); }
.dialogo::backdrop { background: rgba(16, 24, 40, .45); }
.dialogo-corpo { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.dialogo-cab { display: flex; align-items: center; gap: 10px; }
.dialogo-cab h2 { flex: 1; font-size: 18px; font-weight: 800; color: var(--azul); }
.cotacao { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.cotacao > div { background: var(--fundo-2); border-radius: var(--raio-p); padding: 8px 6px; min-width: 0; }
.cotacao small { display: block; font-size: 11px; color: var(--texto-2); font-weight: 600; }
.cotacao b { font-size: 15px; white-space: nowrap; }
.cotacao .destaque { color: var(--azul); font-size: 17px; }
.cotacao .nota { grid-column: 1 / -1; }

/* ---------- por loja ---------- */
.lojas { padding: 16px var(--margem); display: flex; flex-direction: column; gap: 20px; }
.lojas-cab { display: flex; flex-direction: column; gap: 12px; text-align: center; }
.lojas-cab h2 { font-size: 20px; font-weight: 800; color: var(--azul); }
.lojas-botoes { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.dia { display: flex; flex-direction: column; gap: 12px; }
.dia-titulo { font-size: 17px; font-weight: 800; color: #fff; background: var(--azul); padding: 10px 14px; border-radius: var(--raio-p); text-align: center; }
.cidade { display: flex; flex-direction: column; gap: 10px; }
.cidade-titulo { font-size: 14px; font-weight: 700; color: var(--texto-2); padding: 0 2px; }
.loja { border: 1px solid var(--borda); border-radius: var(--raio); background: #fff; box-shadow: var(--sombra); overflow: hidden; }
.loja-cab { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--fundo-2); }
.loja-cab > div:first-child { flex: 1; min-width: 0; }
.loja-cab h3 { font-size: 16px; font-weight: 800; }
.loja-total { text-align: right; display: flex; flex-direction: column; }
.loja-total small { font-size: 11px; color: var(--texto-2); font-weight: 600; }
.loja-total b { font-size: 16px; color: var(--azul); font-variant-numeric: tabular-nums; white-space: nowrap; }
.itens { list-style: none; margin: 0; padding: 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--borda); cursor: pointer; min-height: 64px; }
.item:hover { background: var(--fundo-2); }
.item.talvez { opacity: .55; }
.item-info { flex: 1; min-width: 0; }
.item-prod { font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.item-var, .item-cli { font-size: 13px; color: var(--texto-2); }
.item-usd { font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.loja .vazio { padding: 14px; }

/* ---------- aviso ---------- */
.aviso { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; background: var(--texto); color: #fff;
  padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: var(--sombra-alta); width: max-content; max-width: calc(100vw - 32px); text-align: center; }
.aviso.ok { background: var(--verde); }
.aviso.erro { background: var(--vermelho); }

/* ---------- tablet ---------- */
@media (min-width: 768px) {
  :root { --margem: 24px; }
  .controles { grid-template-columns: 1fr 1fr; }
  .busca { grid-column: 1 / -1; }
  .numero b { font-size: 24px; } .numero-dinheiro b { font-size: 18px; } .numero span { font-size: 12px; }
  .lojas { max-width: 760px; margin: 0 auto; width: 100%; }
}

/* ---------- computador: colunas lado a lado + painel lateral ---------- */
@media (min-width: 1024px) {
  .topo { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 12px; }
  .topo-linha { display: contents; }
  .titulo { text-align: left; order: 0; flex: 1 1 auto; font-size: 22px; }
  .numeros { order: 1; flex: 0 1 560px; }
  #bt-novo { order: 2; }
  #bt-sair { order: 3; }
  .controles { order: 4; flex: 1 1 100%; grid-template-columns: minmax(240px, 1fr) 260px minmax(0, 480px); }
  .busca { grid-column: auto; }
  .nosso b { font-size: 17px; }
  .nosso span { white-space: nowrap; }
  .abas { display: none; }
  .quadro { display: grid; grid-auto-flow: column; grid-auto-columns: 300px; gap: 14px; overflow-x: auto; align-items: start; padding-bottom: 24px; }
  .coluna, .coluna:not(.ativa) { display: flex; flex-direction: column; gap: 10px; background: var(--fundo-2); border-radius: var(--raio); padding: 10px; min-height: 200px; }
  .coluna-cab { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 2px; }
  .coluna-cab h2 { font-size: 14px; font-weight: 700; }
  .coluna-cab .contador { background: #fff; }
  .coluna-fim { opacity: .9; }
  .lojas-cab { flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
  .dia-titulo { text-align: left; }
  .folha { left: auto; top: 0; bottom: 0; width: 460px; max-height: none; border-radius: 0; transform: translateX(100%); }
  .folha.aberta { transform: none; }
  .pegador { display: none; }
  .veu { background: rgba(16, 24, 40, .2); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* R3b: botões das 2 opções (texto empilhado) */
.bt-opcao { flex-direction: column; gap: 2px; padding-top: 10px; padding-bottom: 10px; line-height: 1.25; }
.bt-opcao small { font-size: 12px; font-weight: 500; opacity: .85; }

/* ---------- arrastar e soltar (computador) ---------- */
.cartao img { -webkit-user-drag: none; user-select: none; }
@media (min-width: 1024px) {
  .cartao[draggable="true"] { cursor: grab; }
  .cartao.arrastando { opacity: .45; cursor: grabbing; }
  .cartao.movido { opacity: .7; }
  .coluna { transition: background .12s ease, box-shadow .12s ease; }
  .coluna.alvo { background: var(--azul-claro); box-shadow: inset 0 0 0 2px var(--azul-2); }
  .coluna.alvo .coluna-cab h2 { color: var(--azul); }
}

/* ---------- último check (envio pelo WhatsApp) ---------- */
#form-envio textarea { font-size: 14px; line-height: 1.45; min-height: 220px; }
.ops { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.ops legend { font-size: 13px; font-weight: 600; color: var(--texto-2); padding: 0 0 6px; }
.op-escolha { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--borda); border-radius: var(--raio-p); padding: 10px 12px;
  cursor: pointer; min-height: var(--toque); min-width: 0; }
.op-escolha:has(input:checked) { border-color: var(--azul-2); background: var(--azul-claro); }
.op-escolha input { width: 20px; min-height: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--azul); }
.op-escolha span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.op-escolha b { font-size: 15px; color: var(--azul); }
.op-escolha small { font-size: 12px; color: var(--texto-2); overflow-wrap: anywhere; }
.vai-para { background: var(--verde-claro); color: var(--verde); border-radius: var(--raio-p); padding: 10px 12px; font-size: 14px; overflow-wrap: anywhere; }
.vai-para b { font-weight: 800; }
.bt-whats { background: #128c4b; color: #fff; }
.bt-whats:not(:disabled):hover { background: #0e743e; }
.bt-mini { min-height: 36px; padding: 6px 12px; font-size: 13px; align-self: flex-start; margin-top: 4px; }
.envio-enviado { background: var(--verde-claro) !important; }
.envio-erro { background: var(--vermelho-claro) !important; }
.envio-pendente, .envio-enviando { background: var(--amarelo-claro) !important; }

/* ---------- onde vimos o pedido (prints de origem) ---------- */
.prints { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.print-mini { aspect-ratio: 3 / 4; min-height: var(--toque); border: 1px solid var(--borda); border-radius: var(--raio-p); overflow: hidden; padding: 0;
  background: var(--fundo-2); cursor: zoom-in; display: grid; place-items: center; color: var(--texto-3); }
.print-mini img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh; margin: 0; overflow: hidden; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(10, 16, 30, .88); }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100dvh - 96px); object-fit: contain; border-radius: var(--raio-p); background: #fff; }
.lightbox-x { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 2; }
.vai-para .tel { white-space: nowrap; }

/* ---------- custo detalhado + margem manual (29/10) ---------- */
.custo-split { grid-column: 1 / -1; margin: 0 2px; font-size: 11px; color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums; }
.selo-manual { background: var(--azul-claro); color: var(--azul); }
.det-nosso .chip-manual { display: inline-block; margin-top: 6px; background: rgba(255, 255, 255, .18); border-radius: 999px; padding: 3px 10px; font-size: 12px;
  font-weight: 700; opacity: 1; }
.det-custo { border: 1px solid var(--borda); border-radius: var(--raio); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.det-custo h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-2); margin-bottom: 4px; }
.det-custo h4 small { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--texto-3); }
.custo-linha { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 6px 0; font-size: 14px; min-width: 0; }
.custo-linha > span:first-child { min-width: 0; font-weight: 600; }
.custo-linha small { display: block; font-size: 12px; font-weight: 500; color: var(--texto-2); }
.custo-val { text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.custo-val b { font-weight: 700; }
.custo-total { border-top: 1px solid var(--borda); padding-top: 8px; color: var(--azul); }
.custo-total .custo-val b { font-weight: 800; font-size: 16px; }
.editor-campos { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.editor-campo { display: flex; flex-direction: column; gap: 6px; text-align: center; min-width: 0; }
.editor-campo .preco-campo { max-width: none; }
.editor-campo .preco-campo input { font-size: 24px; min-height: 52px; }
.margem-campo input { text-align: right; }
.margem-campo input::placeholder { font-size: 15px; font-weight: 600; color: var(--texto-3); }
.margem-campo input:disabled { background: transparent; }
@media (min-width: 400px) { .editor-campos { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.pv-conta { font-size: 13px; text-align: center; color: rgba(255, 255, 255, .92); }
.det-nosso .pv-conta b { display: inline; font-size: inherit; }
.bt-preco-faixa { width: 100%; background: transparent; color: #fff; border: 1px dashed rgba(255, 255, 255, .6); white-space: normal; font-size: 14px; }
.bt-preco-faixa:hover { background: rgba(255, 255, 255, .1); }
.cotacao .custo-novo { grid-column: 1 / -1; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; }
.custo-novo p { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--texto-2); }
.custo-novo p b { font-size: 14px; color: var(--texto); font-variant-numeric: tabular-nums; }
.custo-novo .custo-total { padding-top: 4px; margin-top: 2px; }
.custo-novo .custo-total span, .custo-novo .custo-total b { color: var(--azul); font-weight: 800; }
.custo-novo .custo-qtd b { white-space: normal; text-align: right; font-size: 12px; }

/* ---------- arquivados (29/10) ---------- */
.bt-arquivar { width: 100%; background: var(--fundo-2); color: var(--texto-2); border-color: var(--borda); font-weight: 600; }
.bt-arquivar:hover { background: var(--borda); }
.bt-arquivo { display: none; }
.arquivo-dica { display: none; }
@media (min-width: 1024px) {
  .bt-arquivo { display: inline-flex; width: 100%; min-height: var(--toque); }
  .coluna-arquivo.recolhida .coluna-lista { display: none; }
  .coluna-arquivo.recolhida .arquivo-dica { display: block; padding: 4px; }
  .coluna-arquivo.recolhida { width: 150px; justify-self: start; min-height: 180px; background: #eef1f6; border: 1px dashed var(--azul-borda); }
  /* enquanto arrasta um cartão que pode ser arquivado, a bandeja "Arquivados" flutua no canto (sem tapar colunas o resto do tempo) */
  body.arrastando-cartao .coluna-arquivo.recolhida { position: fixed; right: 24px; bottom: 24px; z-index: 20; width: 220px; min-height: 150px;
    box-shadow: var(--sombra-alta); border: 2px dashed var(--azul-2); background: #fff; }
  body.arrastando-cartao .coluna-arquivo.recolhida .bt-arquivo { display: none; }
  .coluna-arquivo.recolhida .coluna-cab h2 { font-size: 13px; }
  .coluna-arquivo.recolhida .bt-arquivo { padding: 8px; font-size: 13px; white-space: normal; }
  .coluna-arquivo.recolhida .arquivo-dica { font-size: 12px; }
}
