* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
:root {
  --bg: #0f172a;
  --card: #1e293b;
  --border: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --primary: #f97316;
  --ok: #22c55e;
  --warn: #eab308;
  --err: #ef4444;
}
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar h1 { font-size: 1.05rem; display: flex; align-items: center; gap: 6px; }
.brand-ic { width: 24px; height: 24px; border-radius: 6px; display: block; }
.base-info { font-size: 0.75rem; color: var(--muted); }

main { flex: 1; padding: 12px; padding-bottom: 76px; max-width: 640px; width: 100%; margin: 0 auto; }
.tab { display: none; }
.tab.active { display: block; }

/* estatísticas */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
}
.stat span { font-size: 1.3rem; font-weight: 700; display: block; }
.stat label { font-size: 0.62rem; color: var(--muted); text-transform: uppercase; }
.stat.ok span { color: var(--ok); }
.stat.warn span { color: var(--warn); }
.stat.err span { color: var(--err); }

/* scanner */
.scanner-box { position: relative; border-radius: 12px; overflow: hidden; background: #000; }
#video { width: 100%; display: block; height: 28vh; max-height: 260px; object-fit: cover; }
#video[hidden] { display: none; }
.scanner-box:has(#video[hidden]) { background: transparent; }
.scan-dica {
  position: absolute; left: 0; right: 0; bottom: 8px;
  text-align: center; font-size: 0.78rem; color: #fff;
  background: rgba(0,0,0,0.45); padding: 6px 10px; margin: 0 8px; border-radius: 8px;
}

/* aviso visual do código capturado */
.scan-toast {
  position: fixed; top: 62px; left: 50%; transform: translateX(-50%);
  z-index: 40; padding: 12px 22px; border-radius: 999px;
  font-size: 1.25rem; font-weight: 800; font-family: monospace;
  color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,0.45);
  max-width: 92vw; text-align: center; letter-spacing: 0.03em;
  animation: toastPop 0.15s ease-out;
}
.scan-toast.ok { background: var(--ok); }
.scan-toast.err { background: var(--err); }

/* banner de instalação */
.instalar-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--primary); color: #fff; padding: 10px 14px; font-size: 0.88rem; font-weight: 600;
}
.instalar-banner .instalar-acoes { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.instalar-banner .btn { background: #fff; color: var(--primary); border-color: #fff; padding: 8px 14px; margin: 0; }
.instalar-banner .btn-x { background: transparent; border: none; color: #fff; font-size: 1.1rem; cursor: pointer; padding: 4px 8px; }
@keyframes toastPop { from { transform: translate(-50%, -8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.scan-line {
  position: absolute;
  left: 8%; right: 8%;
  top: 50%;
  height: 2px;
  background: var(--err);
  box-shadow: 0 0 8px var(--err);
  animation: scan 1.6s ease-in-out infinite;
}
@keyframes scan { 0%,100% { transform: translateY(-40px);} 50% { transform: translateY(40px);} }
#btnScan { width: 100%; margin-top: 8px; }

/* entrada manual */
.manual { display: flex; gap: 8px; margin-top: 10px; }
.manual input {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
}

/* resultado */
.resultado {
  margin-top: 12px;
  border-radius: 14px;
  padding: 16px;
  border: 2px solid var(--border);
  background: var(--card);
  animation: pop 0.15s ease-out;
}
@keyframes pop { from { transform: scale(0.96); opacity: 0.5; } }
.resultado.found { border-color: var(--ok); }
.resultado.notfound { border-color: var(--err); }
.resultado .status { font-size: 1.05rem; font-weight: 800; margin-bottom: 6px; }
.resultado.found .status { color: var(--ok); }
.resultado.notfound .status { color: var(--err); }
.resultado .nome { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.resultado .detalhe { color: var(--muted); font-size: 0.85rem; margin-bottom: 2px; }
.resultado .preco { font-size: 1.7rem; font-weight: 800; color: var(--primary); margin: 8px 0; }
.resultado .acoes { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.preco-check { margin-top: 10px; display: flex; gap: 8px; }
.preco-check input {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

/* cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.card h2 { font-size: 1rem; margin-bottom: 8px; }
.hint { color: var(--muted); font-size: 0.85rem; margin-bottom: 12px; line-height: 1.5; }
.import-status { margin-top: 10px; font-size: 0.9rem; line-height: 1.5; }
.import-status.ok { color: var(--ok); }
.import-status.err { color: var(--err); }

/* botões */
.btn {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.warn { background: var(--warn); border-color: var(--warn); color: #1a1a1a; }
.btn.danger { background: transparent; border-color: var(--err); color: var(--err); }
.btn.big { width: 100%; padding: 14px; font-size: 1.05rem; }
.btn + .btn { margin-top: 8px; }
.btn-link { display: inline-block; text-decoration: none; text-align: center; }

/* listas do relatório */
.lista { list-style: none; }
.lista li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  line-height: 1.4;
}
.lista li:last-child { border-bottom: none; }
.lista .cod { font-family: monospace; color: var(--muted); }
.lista .dif { color: var(--warn); font-weight: 600; }
.lista .vazio { color: var(--muted); font-style: italic; }

/* barra de abas */
.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--border);
  z-index: 10;
}
.tabbar button {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  padding: 10px 0 12px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.tabbar button span { font-size: 0.65rem; font-weight: 600; }
.tabbar button.active { color: var(--primary); }

/* ===== cabeçalho da conferência ===== */
.conf-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 12px; flex-wrap: wrap;
}
.conf-nome { display: flex; align-items: center; gap: 8px; min-width: 0; }
.conf-nome b { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45vw; }
.badge {
  font-size: 0.62rem; text-transform: uppercase; font-weight: 700;
  background: var(--border); color: var(--text);
  padding: 2px 8px; border-radius: 999px; letter-spacing: 0.03em;
}
.badge.inv { background: var(--primary); color: #fff; }
.badge.err { background: var(--err); color: #fff; }
.seg { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.seg button {
  background: none; border: none; color: var(--muted);
  padding: 6px 12px; font-size: 0.78rem; font-weight: 600; cursor: pointer;
}
.seg button.active { background: var(--primary); color: #fff; }

/* ===== linha preço + quantidade ===== */
.linha-preco-qtd { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.qtd-ctl { display: flex; align-items: center; gap: 8px; }
.qtd-ctl button {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.qtd-ctl .qtd-val {
  font-size: 1.4rem; font-weight: 800; min-width: 28px; max-width: 60px; text-align: center;
  background: none; border: none; border-bottom: 2px solid var(--border); color: var(--text);
  font-family: inherit; padding: 0 2px;
}
.qtd-ctl .qtd-val:focus { outline: none; border-bottom-color: var(--primary); }
.qtd-ctl .qtd-val::-webkit-inner-spin-button, .qtd-ctl .qtd-val::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qtd-ctl label { font-size: 0.62rem; color: var(--muted); text-transform: uppercase; }

/* ===== resultado: itens de busca por nome ===== */
.resultado-item {
  display: flex; flex-direction: column; gap: 2px; text-align: left; width: 100%;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; margin-top: 8px; color: var(--text); cursor: pointer;
}
.resultado-item b { font-size: 0.95rem; }

/* ===== lista de lidos ===== */
.lidos-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 16px 0 4px; }
.lidos-head h2 { font-size: 0.95rem; }
.lidos-head span { font-size: 0.75rem; color: var(--muted); }
.lista-lidos { list-style: none; }
.lista-lidos li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.lista-lidos li.separado { opacity: 0.5; }
.lista-lidos li.separado .li-txt b { text-decoration: line-through; }
.li-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.li-txt { display: flex; flex-direction: column; min-width: 0; }
.li-txt b { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.li-txt .cod { font-family: monospace; font-size: 0.72rem; color: var(--muted); }
.chip {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; font-size: 0.85rem; font-weight: 800; color: #fff;
}
.chip.ok { background: var(--ok); }
.chip.err { background: var(--err); }
.chip.warn { background: var(--warn); color: #1a1a1a; }
.li-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.li-qtd { font-weight: 700; font-size: 0.85rem; color: var(--primary); }
.mini {
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  border-radius: 8px; padding: 5px 8px; font-size: 0.75rem; cursor: pointer;
}
.mini.sep.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.mini.del { border-color: var(--err); }

/* ===== conferências (histórico) ===== */
.conf-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.conf-item.ativa { background: rgba(249,115,22,0.08); margin: 0 -8px; padding: 8px; border-radius: 8px; border-bottom: none; }
.conf-item-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.conf-item-info b { font-size: 0.92rem; }
.conf-item-info .cod { font-size: 0.72rem; }
.conf-item-acoes { display: flex; gap: 6px; flex-shrink: 0; }

/* ===== relatório: botões de compartilhar ===== */
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.share-grid .btn { margin-top: 0; }
.share-grid .btn.primary { grid-column: 1 / -1; }

/* ===== lanterna ===== */
.btn.flash {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  width: 46px; height: 46px; padding: 0; border-radius: 50%;
  background: rgba(0,0,0,0.5); border-color: rgba(255,255,255,0.4);
  font-size: 1.3rem; margin: 0;
}
.btn.flash.on { background: var(--warn); border-color: var(--warn); }
.btn.trocar-cam {
  position: absolute; top: 10px; left: 10px; z-index: 5;
  padding: 8px 12px; border-radius: 999px; margin: 0;
  background: rgba(0,0,0,0.5); border-color: rgba(255,255,255,0.4);
  font-size: 0.8rem; font-weight: 600;
}

/* ===== diferença de estoque no card ===== */
.dif-estoque { margin-top: 8px; padding: 8px 10px; border-radius: 8px; font-size: 0.9rem; background: var(--bg); }
.dif-estoque.ok { border: 1px solid var(--ok); }
.dif-estoque.alerta { border: 1px solid var(--warn); }

/* ===== mini-cadastro do não encontrado ===== */
.mini-cad { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.mini-cad-titulo { font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; }
.mini-cad input, .mini-cad textarea {
  width: 100%; padding: 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 1rem; margin-bottom: 8px;
  font-family: inherit; resize: vertical;
}
.obs-enc {
  width: 100%; padding: 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 0.95rem; margin-top: 8px;
  font-family: inherit; resize: vertical;
}
.lista .obs { color: var(--text); font-size: 0.85rem; font-style: italic; }

/* ===== dados do cliente (CNPJ) ===== */
.campo-lbl { display: block; font-size: 0.78rem; color: var(--muted); margin: 8px 0 3px; }
#cnpjInput, #razaoInput {
  width: 100%; padding: 11px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 1rem; margin-bottom: 6px;
}

/* ===== ficha do produto (IA) ===== */
.btn-ficha { width: 100%; margin-bottom: 8px; }
.ficha {
  border: 1px solid var(--primary); border-radius: 10px; padding: 10px 12px;
  margin-bottom: 10px; background: rgba(249,115,22,0.06);
}
.ficha-cab { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; }
.ficha-conf { font-size: 0.72rem; font-weight: 600; color: var(--muted); }
.ficha-linha { display: flex; justify-content: space-between; gap: 10px; font-size: 0.85rem; padding: 2px 0; border-bottom: 1px solid var(--border); }
.ficha-linha span { color: var(--muted); }
.ficha-linha b { text-align: right; }
.ficha-aviso { font-size: 0.75rem; color: var(--warn); margin: 8px 0; line-height: 1.4; }
.ficha-ncmdesc { font-size: 0.72rem; color: var(--muted); padding: 2px 0 4px; line-height: 1.35; border-bottom: 1px solid var(--border); }
.ok-tag { font-size: 0.62rem; color: var(--ok); font-weight: 700; }
.warn-tag { font-size: 0.62rem; color: var(--warn); font-weight: 700; }
.mini-cad-linha { display: flex; gap: 8px; }
.mini-cad-linha input { margin-bottom: 0; flex: 1; }
.mini-cad-linha .btn { margin: 0; white-space: nowrap; }

/* ===== fotos do item ===== */
.fotos-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; flex-wrap: wrap; }
.fotos-row .btn { margin: 0; padding: 10px 14px; }
.foto-thumb { position: relative; display: inline-block; }
.foto-thumb img {
  width: 72px; height: 72px; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--border); display: block;
}
.foto-del {
  position: absolute; top: -7px; right: -7px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--err); color: #fff; border: none;
  font-size: 0.7rem; cursor: pointer; line-height: 1;
}
.li-foto {
  width: 34px; height: 34px; object-fit: cover;
  border-radius: 7px; border: 1px solid var(--border); flex-shrink: 0;
}
.li-foto.rel { width: 56px; height: 56px; margin-top: 4px; }

.lista .dif { color: var(--warn); font-weight: 600; font-size: 0.8rem; }

/* ===== modal de mapeamento de colunas ===== */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,0.6); display: flex; align-items: flex-end; justify-content: center;
}
.modal-box {
  background: var(--card); border-top: 1px solid var(--border);
  border-radius: 16px 16px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  width: 100%; max-width: 640px; max-height: 92dvh; overflow-y: auto;
}
.modal-box h2 { font-size: 1.05rem; margin-bottom: 6px; }
.check-linha { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text); margin: 10px 0; }
.check-linha input { width: 18px; height: 18px; }
.mapa-campos { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.mapa-campo { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mapa-campo > span { font-size: 0.9rem; }
.mapa-campo .obrig { color: var(--err); }
.mapa-campo select {
  flex: 1; max-width: 62%; padding: 9px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 0.9rem;
}
.mapa-preview-wrap { margin: 12px 0; }
.mapa-preview-titulo { font-size: 0.78rem; color: var(--muted); margin-bottom: 4px; }
.mapa-preview { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
.mapa-preview table { border-collapse: collapse; font-size: 0.72rem; white-space: nowrap; }
.mapa-preview th, .mapa-preview td { padding: 5px 8px; border: 1px solid var(--border); text-align: left; }
.mapa-preview th { background: var(--bg); color: var(--primary); font-weight: 700; }
.mapa-preview .linha-header td { color: var(--muted); font-style: italic; }
.modal-acoes { display: flex; gap: 8px; margin-top: 8px; }
.modal-acoes .btn { flex: 1; margin: 0; }
.link-box {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px; font-size: 0.78rem; color: var(--primary); word-break: break-all;
  margin: 8px 0; font-family: monospace;
}
#codigoGrande {
  font-size: 2.6rem; font-weight: 800; letter-spacing: 8px; color: var(--primary);
  margin: 12px 0; font-family: monospace;
}

/* ===== chat de suporte ===== */
.chat-fab {
  position: fixed; right: 16px; bottom: 78px; z-index: 110;
  width: 52px; height: 52px; border-radius: 50%; border: none;
  background: var(--primary); color: #fff; font-size: 1.4rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
#chatModal { z-index: 120; }
.chat-box { display: flex; flex-direction: column; max-height: 88dvh; }
.chat-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-topo .btn-x { background: transparent; border: none; color: var(--muted); font-size: 1.2rem; cursor: pointer; padding: 4px 8px; }
.chat-aviso { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin: 8px 0 12px; }
#chatIdentWrap input, #chatInput {
  width: 100%; padding: 11px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 0.95rem; font-family: inherit;
}
.chat-msgs {
  flex: 1; overflow-y: auto; min-height: 30vh; max-height: 50vh;
  display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; margin-bottom: 10px;
}
.chat-msg { display: flex; flex-direction: column; max-width: 82%; }
.chat-msg.minha { align-items: flex-end; align-self: flex-end; }
.chat-msg.delas, .chat-msg.ia { align-items: flex-start; align-self: flex-start; }
.chat-bolha { padding: 8px 12px; border-radius: 12px; font-size: 0.9rem; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.chat-msg.minha .chat-bolha { background: var(--primary); color: #fff; border-bottom-right-radius: 3px; }
.chat-msg.delas .chat-bolha { background: var(--card); border: 1px solid var(--border); border-bottom-left-radius: 3px; }
.chat-msg.ia .chat-bolha { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.4); border-bottom-left-radius: 3px; }
.chat-hora { font-size: 0.66rem; color: var(--muted); margin-top: 2px; padding: 0 4px; }
.chat-vazio { color: var(--muted); font-size: 0.85rem; text-align: center; margin: auto; font-style: italic; }
.chat-form { display: flex; gap: 8px; align-items: center; }
.chat-form input[type="text"] { flex: 1; }
.chat-form button { margin: 0; }
.chat-anexo-btn {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; cursor: pointer;
}
.chat-anexo-preview {
  display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; font-size: 0.82rem;
}
.chat-anexo-preview img { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; }
.chat-anexo-preview .nome { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-anexo-preview button { background: none; border: none; color: var(--err); font-size: 1rem; cursor: pointer; padding: 2px 6px; }
.chat-img { max-width: 100%; max-height: 220px; border-radius: 8px; display: block; margin-top: 4px; }
.chat-arquivo {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 6px 10px;
  background: rgba(255,255,255,0.08); border-radius: 8px; font-size: 0.82rem; text-decoration: none; color: inherit;
}
.chat-msg.minha .chat-arquivo { background: rgba(255,255,255,0.18); color: #fff; }

/* ===== painel central ===== */
.central-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.central-head .btn { margin: 0; }
.central-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.central-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.central-acoes .btn { margin: 0; flex: 1; min-width: 120px; }
#tab-central .lista { max-height: 46vh; overflow-y: auto; }

/* ===== topbar direita + badge de licença ===== */
.topbar-dir { display: flex; align-items: center; gap: 8px; }
#licencaBadge { white-space: nowrap; }

/* ===== tela de bloqueio (licença) ===== */
.lock {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 20px;
}
.lock-box { width: 100%; max-width: 400px; text-align: center; }
.lock-logo { width: 84px; height: 84px; border-radius: 20px; margin-bottom: 12px; }
.lock-logo-full { height: 46px; width: auto; margin-bottom: 18px; }
.lock-box h2 { font-size: 1.3rem; margin-bottom: 6px; }
.lock-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; }
.lock-msg { font-size: 0.85rem; margin-bottom: 10px; min-height: 1em; line-height: 1.4; }
.lock-msg.err { color: var(--err); }
#lockInput {
  width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-size: 0.9rem; font-family: monospace;
  resize: vertical; margin-bottom: 10px;
}
#trialPhone {
  width: 100%; padding: 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-size: 1.1rem; text-align: center;
  margin-bottom: 10px;
}
#comprovanteForm { text-align: left; margin-top: 4px; }
#comprovanteForm input, #comprovanteForm textarea {
  width: 100%; padding: 11px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-size: 0.9rem; margin-bottom: 8px;
  font-family: inherit; resize: vertical; box-sizing: border-box;
}
.lock-rodape a { color: var(--primary); font-weight: 600; text-decoration: none; }
#lockBtn { width: 100%; }
.lock-rodape { color: var(--muted); font-size: 0.78rem; margin-top: 14px; line-height: 1.4; }
#licencaInfo .venc { color: var(--warn); font-weight: 600; }
