/* Revenda Bruquim v0.4.1
   Identidade da Bruquim (carrossel oficial): azul #2448BA, vermelho #D21E1E nos detalhes e no botão principal,
   bolhas do Q como elemento, títulos condensados com a palavra principal numa caixa branca.
   Topo fixo como no Bolão028 (branco, logo tradicional): título médio que vira pequeno ao rolar. Compra = azul, Venda = verde. */

@font-face { font-family: 'Manrope'; src: url('/fontes/manrope.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('/fontes/barlow-sc-300.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('/fontes/barlow-sc-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('/fontes/barlow-sc-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('/fontes/barlow-sc-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('/fontes/barlow-sc-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('/fontes/barlow-sc-900.woff2') format('woff2'); font-weight: 900; font-display: swap; }

:root {
  /* ---- Marca Bruquim ---- */
  --marca: #2448BA;
  --marca-escura: #1B3896;
  --marca-funda: #142B78;
  --marca-suave: #E9EEFB;
  --vermelho-marca: #D21E1E;
  --vermelho-marca-escuro: #AE1616;
  --branco: #FFFFFF;
  --bolha: rgba(255, 255, 255, 0.22);

  /* ---- Linhas de produto (faixa de cor) ---- */
  --linha-superficies: #2448BA;
  --linha-lavanderia: #7A5AD8;
  --linha-automotiva: #E07B24;
  --linha-outra: #6B7A99;

  /* ---- Níveis ---- */
  --nivel-1: #0EA5D9;
  --nivel-1-texto: #0A7DA6;
  --nivel-2: #7C3AED;
  --nivel-2-texto: #6D28D9;
  --nivel-3: #E9A800;
  --nivel-3-texto: #9A6E00;

  /* ---- Ações: vender (verde) e comprar (azul da marca) ---- */
  --verde: #14975A;
  --verde-escuro: #0F7A48;
  --verde-suave: #E4F5EC;

  /* ---- Escala de tipos (4 tamanhos de destaque) ---- */
  --t-display: 30px;
  --t-h1: 21px;
  --t-h2: 19px;
  --t-num: 25px;
  --t-num-p: 19px;

  /* ---- Neutros e estados ---- */
  --fundo: #F4F5F8;
  --superficie: #FFFFFF;
  --texto: #16214A;
  --texto-2: #56618A;
  --texto-3: #8D96B3;
  --linha: #E1E5EF;
  --linha-2: #EDF0F6;
  --chip: #EEF1F8;
  --ok: #14975A;
  --ok-fundo: #E3F3EA;
  --ambar: #946010;
  --ambar-fundo: #FFF3DC;
  --ambar-linha: #EBC57A;
  --vermelho: #C21A1A;
  --vermelho-fundo: #FFFFFF;
  --whats: #14975A;

  /* ---- Forma ---- */
  --raio: 22px;
  --raio-m: 16px;
  --raio-p: 14px;
  --sombra: 0 1px 0 rgba(22, 33, 74, 0.05), 0 8px 24px -16px rgba(22, 33, 74, 0.30);
  --sombra-alta: 0 18px 40px -18px rgba(20, 43, 120, 0.45);
  --f-texto: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --f-titulo: 'Barlow Semi Condensed', 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --nav-altura: 64px;
  --nav-folga: 14px;
  --seg-baixo: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-texto);
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--texto);
  background: var(--fundo);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--marca); }
h1, h2, h3 { margin: 0; font-family: var(--f-titulo); line-height: 1.02; letter-spacing: -0.005em; }
p { margin: 0; }
strong { font-weight: 750; }
.num { font-variant-numeric: tabular-nums; }
.mudo { color: var(--texto-2); }
.fraco { color: var(--texto-3); font-size: 13px; }
.oculto { display: none !important; }
.rotulo-cx { font-size: 11px; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase; color: var(--texto-2); }

/* ================= Topo fixo (como o Bolão028) ================= */
/* Sempre preso em cima. Título médio; ao rolar a tela, o título some da segunda linha e aparece pequeno ao lado do voltar.
   O espaço reservado embaixo tem a altura do topo aberto, então nada pula ao encolher. */
.carregando { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 14px; color: var(--texto-2); background: var(--fundo); }
.carregando img { width: 190px; height: auto; }
.marca-logo { display: block; }
.marca-logo img { width: 100%; height: auto; display: block; }

.topo {
  --tom: var(--marca);
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  background: var(--superficie); color: var(--texto); overflow: hidden;
  padding: env(safe-area-inset-top, 0px) max(14px, env(safe-area-inset-right, 0px)) 0 max(14px, env(safe-area-inset-left, 0px));
  box-shadow: 0 1px 0 var(--linha), 0 10px 24px -20px rgba(20, 43, 120, 0.45);
  transition: background 0.2s;
}
.topo.tom-venda { --tom: var(--verde); }
.topo-in { max-width: 1240px; margin: 0 auto; position: relative; }
.topo-barra { display: flex; align-items: center; gap: 10px; height: 58px; }
.topo .marca-mini { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.topo .marca-mini img { height: 22px; width: auto; display: block; }
.topo .voltar { border: 0; background: color-mix(in srgb, var(--tom) 10%, #fff); color: var(--tom); width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.topo .h1-mini { flex: 1; min-width: 0; font-family: var(--f-titulo); font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--tom); display: none; }
.topo .espaco { flex: 1; }
.topo .acoes-topo { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.btn-topo { border: 0; background: color-mix(in srgb, var(--tom) 10%, #fff); color: var(--tom); height: 38px; min-width: 38px; padding: 0 10px; border-radius: 12px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none; font-size: 13.5px; font-weight: 700; }
.btn-topo svg { width: 19px; height: 19px; }
.btn-topo .kbd { font-size: 11px; font-weight: 750; padding: 2px 6px; border-radius: 6px; background: #fff; color: var(--texto-2); letter-spacing: 0.02em; }
.btn-topo .txt { display: none; }
.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--tom, var(--marca)); color: #fff; font-family: var(--f-titulo); font-weight: 700; font-size: 17px; text-decoration: none; flex-shrink: 0; }

.topo-titulo { display: grid; gap: 6px; justify-items: start; padding: 2px 64px 16px 0; max-height: 220px; opacity: 1; transition: max-height 0.22s ease, opacity 0.16s ease, padding 0.22s ease; }
.topo-titulo h1 { font-size: 26px; font-weight: 700; line-height: 1.12; letter-spacing: 0.005em; color: var(--tom); }
.topo.principal .topo-titulo h1 { font-weight: 300; text-transform: uppercase; }
.topo.principal .topo-titulo h1 em { font-style: normal; font-weight: 800; background: var(--tom); color: #fff; padding: 0 0.14em; border-radius: 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.topo .topo-titulo h1 em { font-style: normal; }
.topo-titulo .hero-sub { font-size: 13px; color: var(--texto-2); max-width: 560px; }
.pilula-topo { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--tom) 10%, #fff); font-size: 12px; font-weight: 700; color: var(--tom); letter-spacing: 0.01em; }
.pilula-topo::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--tom); }
.topo .bolhas { position: absolute; right: 0; bottom: 14px; width: 54px; height: 44px; pointer-events: none; transition: opacity 0.16s; }
.topo .bolhas circle { fill: color-mix(in srgb, var(--tom) 16%, #fff); }

/* Rolou: título pequeno na barra, segunda linha recolhida */
.topo.rolou .topo-titulo { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; }
.topo.rolou .bolhas { opacity: 0; }
.topo.rolou .h1-mini { display: block; }
.topo.rolou .marca-mini { display: none; }
.topo-espaco { height: 140px; }

.abas-top { display: none; }

/* ================= Conteúdo ================= */
.conteudo {
  max-width: 720px; margin: 0 auto;
  padding: 16px max(14px, env(safe-area-inset-right, 0px)) calc(var(--nav-altura) + var(--nav-folga) + 110px + var(--seg-baixo)) max(14px, env(safe-area-inset-left, 0px));
  display: grid; gap: 14px; position: relative; z-index: 2;
}

.conteudo > * { min-width: 0; }

/* ================= Menu flutuante ================= */
.nav {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-folga) + var(--seg-baixo)); z-index: 30;
  height: var(--nav-altura); border-radius: 22px;
  background: var(--marca);
  box-shadow: 0 14px 34px -12px rgba(20, 43, 120, 0.6);
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 0 4px;
}
.nav a { position: relative; display: grid; place-items: center; align-content: center; gap: 2px; text-decoration: none; color: rgba(255, 255, 255, 0.72); font-size: 11px; font-weight: 700; letter-spacing: 0.01em; }
.nav a .ic { width: 46px; height: 28px; border-radius: 10px; display: grid; place-items: center; transition: background 0.15s; }
.nav a svg { width: 22px; height: 22px; }
.nav a.ativo { color: #fff; }
.nav a.ativo .ic { background: #fff; color: var(--marca); }
.nav a.venda.ativo .ic { color: var(--verde); }
.bolinha { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--vermelho-marca); color: #fff; font-size: 10.5px; font-weight: 800; display: inline-grid; place-items: center; line-height: 1; }
.nav a .bolinha { position: absolute; top: 6px; left: calc(50% + 8px); box-shadow: 0 0 0 2px var(--marca); }

/* ================= Blocos ================= */
.card { background: var(--superficie); border-radius: var(--raio); box-shadow: var(--sombra); padding: 18px; display: grid; gap: 12px; min-width: 0; position: relative; }
.card h2 { font-size: var(--t-h2); font-weight: 700; color: var(--texto); line-height: 1.15; }
.card .cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.secao-titulo { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.14em; color: var(--texto-2); margin: 10px 4px -4px; display: flex; align-items: center; gap: 8px; }
.secao-titulo::after { content: ''; flex: 1; height: 1px; background: var(--linha); }
.grade-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grade-4 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.metrica { background: var(--superficie); border-radius: var(--raio); box-shadow: var(--sombra); padding: 16px; display: grid; gap: 2px; min-width: 0; text-decoration: none; color: inherit; position: relative; overflow: hidden; }
.metrica::before { content: ''; position: absolute; left: 0; top: 16px; bottom: 16px; width: 5px; border-radius: 0 4px 4px 0; background: var(--cor, var(--linha)); }
.metrica .v { font-family: var(--f-titulo); font-size: clamp(21px, 6vw, var(--t-num)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; letter-spacing: 0; font-variant-numeric: tabular-nums; line-height: 1.1; }
.metrica .v small { font-size: 15px; color: var(--texto-3); font-weight: 600; }
.metrica .r { font-size: 12.5px; color: var(--texto-2); font-weight: 650; }
a.metrica:hover { box-shadow: var(--sombra), 0 0 0 1.5px var(--linha); }

.lista { display: grid; background: var(--superficie); border-radius: var(--raio); box-shadow: var(--sombra); overflow: hidden; }
.lista.plana { box-shadow: none; border: 1px solid var(--linha); border-radius: var(--raio-m); }
.item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--linha-2); min-width: 0; text-decoration: none; color: inherit; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; cursor: pointer; position: relative; }
.item:last-child { border-bottom: 0; }
.item .corpo { flex: 1; min-width: 0; display: grid; gap: 2px; }
.item .titulo { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.item .sub { font-size: 13px; color: var(--texto-2); }
.item .dir { text-align: right; display: grid; gap: 5px; justify-items: end; font-variant-numeric: tabular-nums; }
.item .valor { font-weight: 750; font-variant-numeric: tabular-nums; }
.item.ativo { background: var(--marca-suave); }
.item.ativo::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 3px 3px 0; background: var(--marca); }
@media (hover: hover) { a.item:hover, button.item:hover { background: #F7FAFB; } a.item.ativo:hover { background: var(--marca-suave); } }
.vazio { text-align: center; padding: 30px 18px; color: var(--texto-2); display: grid; gap: 12px; justify-items: center; }
.vazio .ic-vazio { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--chip); color: var(--texto-3); }
.vazio .ic-vazio svg { width: 26px; height: 26px; }

/* ================= Botões, chips e pílulas ================= */
.btn {
  border: 0; border-radius: var(--raio-p); padding: 12px 16px; font-weight: 750; cursor: pointer; letter-spacing: 0.005em;
  background: var(--vermelho-marca); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; text-decoration: none; text-align: center; transition: transform 0.08s, background 0.15s;
}
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn:active { transform: translateY(1px); }
@media (hover: hover) { .btn:hover { background: var(--vermelho-marca-escuro); } .btn.sec:hover, .btn.contorno:hover, .btn.perigo:hover { background: var(--marca-suave); } .btn.azul:hover { background: var(--marca-escura); } .btn.ok:hover, .btn.verde:hover, .btn.whats:hover { background: var(--verde-escuro); } }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn.sec { background: var(--marca-suave); color: var(--marca); }
.btn.azul { background: var(--marca); color: #fff; }
.btn.contorno { background: var(--superficie); color: var(--texto); box-shadow: inset 0 0 0 1.5px var(--linha); }
.btn.perigo { background: var(--superficie); color: var(--vermelho); box-shadow: inset 0 0 0 1.5px var(--vermelho); }
.btn.ok, .btn.verde { background: var(--verde); }
.btn.whats { background: var(--whats); }
.btn.pequeno { min-height: 38px; padding: 7px 12px; font-size: 13.5px; border-radius: 12px; }
.btn.largo { width: 100%; }
.botoes { display: grid; gap: 10px; }
.botoes.lado { grid-template-columns: 1fr 1fr; }

.atalhos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.atalho { display: grid; gap: 10px; align-content: space-between; min-height: 104px; padding: 16px; border-radius: var(--raio); text-decoration: none; font-weight: 750; font-size: 15px; line-height: 1.25; box-shadow: var(--sombra); }
.atalho .ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; }
.atalho svg { width: 23px; height: 23px; }
.atalho.prim { background: var(--verde); color: #fff; position: relative; overflow: hidden; }
.atalho.prim .ic { background: rgba(255, 255, 255, 0.16); color: #fff; }
.atalho.sec { background: var(--marca); color: #fff; position: relative; overflow: hidden; }
.atalho.sec .ic { background: rgba(255, 255, 255, 0.16); color: #fff; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { text-decoration: none; border: 0; background: var(--superficie); box-shadow: inset 0 0 0 1.5px var(--linha); border-radius: 999px; padding: 7px 13px; font-size: 13.5px; font-weight: 700; white-space: nowrap; cursor: pointer; color: var(--texto-2); display: inline-flex; align-items: center; gap: 7px; }
.chip.ativo { background: var(--marca); color: #fff; box-shadow: none; }
.chip .n { font-size: 11.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--chip); color: var(--texto-2); }
.chip.ativo .n { background: rgba(255, 255, 255, 0.18); color: #fff; }
.chip .ponto, .ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--cor, var(--texto-3)); flex-shrink: 0; display: inline-block; }

.selo { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 750; white-space: nowrap; background: var(--chip); color: var(--texto-2); letter-spacing: 0.01em; }
.selo::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.selo.novo, .selo.aberta, .selo.ambar { background: var(--ambar-fundo); color: var(--ambar); }
.selo.pago { background: var(--marca-suave); color: var(--marca); }
.selo.separado { background: #E8ECF5; color: #3A4670; }
.selo.entregue, .selo.retirado, .selo.ok { background: var(--ok-fundo); color: var(--ok); }
.selo.cancelado, .selo.cancelada, .selo.vermelho { background: #fff; color: var(--vermelho); box-shadow: inset 0 0 0 1.5px var(--vermelho); }
.selo.cinza { background: var(--chip); color: var(--texto-2); }
.selo.n1 { background: color-mix(in srgb, var(--nivel-1) 13%, #fff); color: var(--nivel-1-texto); }
.selo.n2 { background: color-mix(in srgb, var(--nivel-2) 12%, #fff); color: var(--nivel-2-texto); }
.selo.n3 { background: color-mix(in srgb, var(--nivel-3) 18%, #fff); color: var(--nivel-3-texto); }

/* ================= Avisos (âmbar = confira, pode seguir; vermelho = não grava sem ação) ================= */
.aviso { border-radius: var(--raio-m); padding: 13px 15px; font-size: 14px; display: grid; gap: 8px; text-decoration: none; }
.aviso.ambar { background: var(--ambar-fundo); color: #6B4508; box-shadow: inset 0 0 0 1px var(--ambar-linha); }
.aviso.vermelho { background: #fff; color: var(--vermelho); box-shadow: inset 0 0 0 2px var(--vermelho); font-weight: 600; }
.aviso.vermelho strong { justify-self: start; background: var(--vermelho); color: #fff; padding: 2px 9px; border-radius: 6px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; font-size: 12.5px; }
.aviso.info { background: var(--superficie); color: var(--texto-2); box-shadow: var(--sombra); }
.aviso.info strong { color: var(--texto); }
.aviso.ok { background: var(--ok-fundo); color: #155D3C; }
.aviso a { color: inherit; font-weight: 750; }

/* ================= Formulários ================= */
.form { display: grid; gap: 14px; }
.campo { display: grid; gap: 6px; }
.campo label { font-size: 11px; font-weight: 750; color: var(--texto-2); text-transform: uppercase; letter-spacing: 0.12em; }
.campo input, .campo select, .campo textarea {
  width: 100%; border: 0; box-shadow: inset 0 0 0 1.5px var(--linha); border-radius: var(--raio-p); background: var(--superficie);
  padding: 12px 14px; min-height: 48px; font-size: 16px; font-weight: 550;
}
.campo textarea { min-height: 88px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--marca), 0 0 0 4px color-mix(in srgb, var(--marca) 16%, transparent); }
.campo .ajuda { font-size: 12.5px; color: var(--texto-3); }
.busca-campo { position: relative; }
.busca-campo svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--texto-3); pointer-events: none; }
.busca-campo input { padding-left: 42px; box-shadow: var(--sombra); }
.linha-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.alternar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; }
.alternar input { width: 46px; height: 28px; appearance: none; background: #CFD8DB; border-radius: 14px; position: relative; cursor: pointer; transition: background 0.15s; flex-shrink: 0; }
.alternar input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left 0.15s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.alternar input:checked { background: var(--ok); }
.alternar input:checked::after { left: 21px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--marca) 45%, transparent); outline-offset: 2px; }

/* ================= Stepper ================= */
.stepper { display: inline-flex; align-items: center; border-radius: 14px; overflow: hidden; background: var(--chip); flex-shrink: 0; }
.stepper button { width: 42px; height: 42px; border: 0; background: none; font-size: 22px; font-weight: 600; color: var(--marca); cursor: pointer; }
.stepper button:disabled { color: var(--texto-3); opacity: 0.6; }
.stepper .q { min-width: 30px; text-align: center; font-family: var(--f-titulo); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stepper.tem { background: var(--marca); color: #fff; }
.stepper.tem button { color: #fff; }

/* ================= Produto (faixa de cor por linha) ================= */
.produto { display: flex; gap: 12px; align-items: center; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--linha-2); position: relative; }
.produto::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 5px; border-radius: 0 4px 4px 0; background: var(--cor, var(--linha-outra)); }
.produto:last-child { border-bottom: 0; }
.produto .info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.produto .nome { font-weight: 750; }
.produto .nome .emb-tag { font-weight: 650; color: var(--texto-2); }
.produto .emb { font-size: 12.5px; color: var(--texto-2); }
.produto .preco { font-family: var(--f-titulo); font-size: var(--t-num-p); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--marca); }
.produto .riscado { text-decoration: line-through; color: var(--texto-3); font-weight: 600; font-size: 13px; margin-left: 6px; }
.produto .mais { border: 0; background: none; color: var(--marca); font-size: 13px; font-weight: 700; padding: 0; text-align: left; cursor: pointer; justify-self: start; }
.produto .desc { font-size: 13px; color: var(--texto-2); }
.produto-grupo { display: flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; color: var(--texto-2); padding: 14px 16px 8px; background: #F8FAFB; border-bottom: 1px solid var(--linha-2); }
.item.com-faixa { padding-left: 20px; }
.item.com-faixa::after { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 5px; border-radius: 0 4px 4px 0; background: var(--cor, var(--linha-outra)); }
.item.com-faixa.ativo::after { display: none; }

/* ================= Barra do pedido (flutua acima do menu) ================= */
.barra-pedido {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-altura) + var(--nav-folga) + 10px + var(--seg-baixo)); z-index: 25;
  background: var(--superficie); border-radius: 20px; box-shadow: var(--sombra-alta), 0 0 0 1px rgba(15, 42, 53, 0.04);
  padding: 12px 12px 12px 16px;
}
.barra-pedido .dentro { max-width: 720px; margin: 0 auto; display: grid; gap: 8px; }
.barra-pedido .linha { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.barra-pedido .total { font-family: var(--f-titulo); font-weight: 700; font-size: var(--t-num); color: var(--marca); line-height: 1; font-variant-numeric: tabular-nums; }
.barra-pedido .dica { font-size: 12.5px; font-weight: 700; color: var(--marca); display: flex; gap: 7px; align-items: center; }
.barra-pedido .dica::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.barra-pedido .dica.alerta { color: var(--ambar); }

/* ================= Nível ================= */
.nivel-card { background: var(--superficie); border-radius: var(--raio); box-shadow: var(--sombra); padding: 20px 18px 18px 24px; display: grid; gap: 14px; position: relative; overflow: hidden; }
.nivel-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--cor-nivel, var(--nivel-1)); }
.nivel-card .topo-n { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.nivel-card .rotulo { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; color: var(--texto-2); }
.nivel-card .nome { font-family: var(--f-titulo); font-size: 30px; font-weight: 700; line-height: 1; color: var(--cor-nivel-texto, var(--nivel-1-texto)); margin-top: 4px; }
.nivel-card .validade { font-size: 13.5px; color: var(--texto-2); font-weight: 600; margin-top: 4px; }
.nivel-card .caixas-mes { text-align: right; white-space: nowrap; }
.nivel-card .caixas-mes .v { font-family: var(--f-titulo); font-size: 30px; font-weight: 700; line-height: 1; }
.nivel-card .caixas-mes .r { font-size: 11.5px; color: var(--texto-2); font-weight: 650; }
.trilha { position: relative; height: 10px; background: var(--chip); border-radius: 5px; margin: 6px 4px 24px; }
.trilha .cheio { position: absolute; inset: 0 auto 0 0; background: var(--cor-nivel, var(--nivel-1)); border-radius: 5px; }
.trilha .marco { position: absolute; top: -4px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: #fff; border: 3px solid var(--linha); }
.trilha .marco.ok { border-color: var(--cor-nivel, var(--nivel-1)); background: var(--cor-nivel, var(--nivel-1)); }
.trilha .marco span { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); font-size: 11.5px; font-weight: 750; white-space: nowrap; color: var(--texto-2); }
.trilha .marco:last-of-type span { left: auto; right: -8px; transform: none; }
.nivel-card .falta { font-size: 14px; font-weight: 600; background: color-mix(in srgb, var(--cor-nivel, var(--nivel-1)) 9%, #fff); color: var(--texto); border-radius: var(--raio-p); padding: 11px 13px; }
.niveis-linha { display: flex; gap: 8px; flex-wrap: wrap; }
.niveis-linha .n { font-size: 12px; font-weight: 750; padding: 4px 11px; border-radius: 999px; background: var(--chip); color: var(--texto-2); display: inline-flex; gap: 5px; align-items: center; }
.niveis-linha .n.atual { background: var(--cor-nivel, var(--nivel-1)); color: #fff; }
.niveis-linha .n.atual.n3 { color: #3B2C00; }
.niveis-linha .n.bloq { background: none; box-shadow: inset 0 0 0 1.5px var(--linha); color: var(--texto-3); }

/* ================= Folha (sobe de baixo no celular, centro no computador) ================= */
.folha-fundo { position: fixed; inset: 0; background: rgba(4, 25, 33, 0.48); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: aparece 0.15s ease-out; }
.folha {
  background: var(--superficie); width: 100%; max-width: 640px; max-height: 92vh; border-radius: 26px 26px 0 0;
  display: flex; flex-direction: column; animation: sobe 0.2s ease-out; position: relative;
  padding-bottom: var(--seg-baixo);
}
.folha::before { content: ''; position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 40px; height: 4px; border-radius: 2px; background: var(--linha); }
.folha .f-cab { padding: 20px 18px 12px; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.folha .f-cab h2 { flex: 1; font-size: var(--t-h1); font-weight: 700; }
.folha .f-fechar { border: 0; background: var(--chip); width: 36px; height: 36px; border-radius: 12px; cursor: pointer; font-size: 20px; line-height: 1; color: var(--texto-2); flex-shrink: 0; }
.folha .f-corpo { overflow-y: auto; padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 14px; min-height: 0; flex: 1; }
.folha .f-corpo > * { flex-shrink: 0; }
.folha .f-acoes { padding: 12px 18px 14px; border-top: 1px solid var(--linha-2); display: grid; gap: 10px; flex-shrink: 0; }
.folha .f-acoes.lado { grid-template-columns: 1fr 1fr; }
@keyframes sobe { from { transform: translateY(28px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }

/* Formulário dentro do painel de detalhe (computador) */
.embutido { display: grid; gap: 0; background: var(--superficie); border-radius: var(--raio); box-shadow: var(--sombra); overflow: hidden; }
.embutido .f-cab { padding: 18px 18px 6px; display: flex; align-items: center; gap: 12px; }
.embutido .f-cab h2 { flex: 1; font-size: var(--t-h1); font-weight: 700; }
.embutido .f-fechar { border: 0; background: var(--chip); width: 36px; height: 36px; border-radius: 12px; cursor: pointer; font-size: 20px; color: var(--texto-2); }
.embutido .f-corpo { padding: 8px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.embutido .f-acoes { padding: 12px 18px 16px; border-top: 1px solid var(--linha-2); display: flex; gap: 10px; justify-content: flex-end; }

/* ================= Resumo de valores ================= */
.contas { display: grid; gap: 8px; font-variant-numeric: tabular-nums; }
.contas .l { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; }
.contas .l.menos { color: var(--ok); font-weight: 650; }
.contas .l.total { font-size: 15px; font-weight: 800; border-top: 1.5px dashed var(--linha); padding-top: 11px; margin-top: 3px; align-items: baseline; }
.contas .l.total span:last-child { font-family: var(--f-titulo); font-size: var(--t-num); font-weight: 700; color: var(--marca); }
.bloco-copiar { background: #F5F8F9; box-shadow: inset 0 0 0 1px var(--linha); border-radius: var(--raio-p); padding: 13px; font-size: 13.5px; white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, Menlo, Consolas, monospace; }

/* ================= Toast, offline e versão nova ================= */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-altura) + var(--nav-folga) + 96px + var(--seg-baixo)); z-index: 80; display: grid; gap: 8px; width: min(92vw, 460px); pointer-events: none; }
.toast { color: #fff; padding: 12px 16px; border-radius: var(--raio-p); font-size: 14px; font-weight: 650; box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.35); animation: sobe 0.2s ease-out; display: flex; gap: 10px; align-items: center; }
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; flex-shrink: 0; }
.toast { background: var(--marca); }
.toast.erro { background: #fff; color: var(--vermelho); box-shadow: inset 0 0 0 2px var(--vermelho), 0 12px 28px -8px rgba(0, 0, 0, 0.3); }
.toast.erro::before { content: 'Erro'; width: auto; height: auto; border-radius: 6px; background: var(--vermelho); color: #fff; padding: 2px 8px; font-weight: 800; text-transform: uppercase; font-size: 11.5px; letter-spacing: 0.05em; }
.toast.ok { background: var(--ok); }
.toast.ok::before { background: #fff; }
.faixa-rede { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-altura) + var(--nav-folga) + 12px + var(--seg-baixo)); z-index: 85; background: var(--marca-funda); color: #fff; padding: 7px 14px 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.4); max-width: calc(100vw - 24px); white-space: nowrap; }
.faixa-rede[hidden] { display: none; }
.faixa-rede::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #F2B33D; flex-shrink: 0; }
.faixa-rede button { border: 0; background: var(--vermelho-marca); color: #fff; font-weight: 800; border-radius: 999px; padding: 4px 10px; cursor: pointer; font-size: 12px; }
.faixa-rede.nova::before { background: #fff; }

/* ================= Esqueleto de carregamento ================= */
.esq { display: grid; gap: 12px; }
.esq .b { border-radius: var(--raio); background: linear-gradient(90deg, #E7EBF4 0%, #F4F6FA 40%, #E7EBF4 80%); background-size: 200% 100%; animation: brilho 1.2s linear infinite; }
@keyframes brilho { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ================= Entrada (login) ================= */
.entrada { min-height: 100vh; display: grid; place-items: center; padding: calc(28px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 110px max(16px, env(safe-area-inset-left, 0px)); background: var(--fundo); position: relative; overflow: hidden; }
.entrada .fundo-onda { position: fixed; left: 0; right: 0; bottom: 0; height: 56px; background: var(--marca); z-index: 0; }
.entrada .fundo-onda svg.onda { position: absolute; left: 0; right: 0; top: -27px; width: 100%; height: 28px; }
.entrada .fundo-onda svg.onda path { fill: var(--marca); }
.entrada .fundo-onda .bolhas { position: absolute; right: 22px; top: -62px; width: 54px; height: 46px; }
.entrada .fundo-onda .bolhas circle { fill: var(--marca); }
.entrada .caixa { width: 100%; max-width: 410px; display: grid; gap: 16px; position: relative; z-index: 1; }
.entrada .marca-logo { width: 230px; justify-self: center; margin-bottom: 2px; }
.entrada .sub { text-align: center; color: var(--marca); font-family: var(--f-titulo); font-size: 24px; font-weight: 300; margin-top: -4px; }
.entrada .sub strong { font-weight: 800; }
.entrada .card { padding: 22px; }
.entrada .aviso.info { background: var(--marca-suave); color: var(--marca); box-shadow: none; }
.termo { font-size: 14px; display: grid; gap: 10px; }
.termo h3 { font-size: 17px; font-weight: 700; margin-top: 6px; }

/* ================= Busca rápida (gestão) ================= */
.busca-fundo { position: fixed; inset: 0; z-index: 70; background: rgba(4, 25, 33, 0.5); display: flex; justify-content: center; align-items: flex-start; padding: calc(10vh + env(safe-area-inset-top, 0px)) 12px 12px; animation: aparece 0.12s ease-out; }
.busca { width: 100%; max-width: 640px; background: var(--superficie); border-radius: var(--raio); box-shadow: var(--sombra-alta); overflow: hidden; display: flex; flex-direction: column; max-height: 76vh; animation: sobe 0.16s ease-out; }
.busca .b-cab { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--linha-2); }
.busca .b-cab svg { width: 21px; height: 21px; color: var(--texto-3); flex-shrink: 0; }
.busca .b-cab input { flex: 1; border: 0; outline: none; font-size: 17px; font-weight: 600; min-height: 40px; background: none; }
.busca .b-cab .kbd { font-size: 11px; font-weight: 750; color: var(--texto-3); background: var(--chip); padding: 3px 7px; border-radius: 6px; }
.busca .b-res { overflow-y: auto; padding: 6px 0 8px; }
.busca .b-grupo { font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--texto-3); padding: 12px 18px 6px; }
.busca .res { display: flex; align-items: center; gap: 12px; padding: 10px 18px; text-decoration: none; color: inherit; cursor: pointer; }
.busca .res .ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--chip); color: var(--texto-2); flex-shrink: 0; }
.busca .res .ic svg { width: 18px; height: 18px; }
.busca .res .corpo { flex: 1; min-width: 0; display: grid; }
.busca .res .titulo { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.busca .res .sub { font-size: 12.5px; color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.busca .res.ativo { background: var(--marca-suave); }
.busca .res.ativo .ic { background: var(--marca); color: #fff; }
.busca .b-rodape { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--linha-2); font-size: 12px; color: var(--texto-3); font-weight: 600; }
.busca .b-rodape .kbd { font-size: 10.5px; font-weight: 800; background: var(--chip); padding: 2px 6px; border-radius: 5px; margin-right: 4px; color: var(--texto-2); }
.busca .b-vazio { padding: 26px 18px; text-align: center; color: var(--texto-2); }

/* ================= Imagem do pedido ================= */
.previa-img { width: 100%; border-radius: var(--raio-m); box-shadow: var(--sombra); background: #fff; }

/* ================= Telas médias ================= */
@media (min-width: 760px) {
  .topo-titulo h1 { font-size: 30px; }
  .grade-4 { grid-template-columns: repeat(4, 1fr); }
  .nav { left: 50%; right: auto; width: 560px; transform: translateX(-50%); }
  .barra-pedido { left: 50%; right: auto; width: min(720px, calc(100vw - 24px)); transform: translateX(-50%); }
  .folha-fundo { align-items: center; padding: 24px; }
  .folha { border-radius: var(--raio); max-height: 86vh; padding-bottom: 0; }
  .folha::before { display: none; }
  .btn-topo .txt { display: inline; }
}

/* ================= Computador: abas no topo, sem menu de baixo ================= */
@media (min-width: 1024px) {
  .nav { display: none; }
  .topo-barra { height: 64px; gap: 22px; }
  .topo .marca-mini img { height: 26px; }
  .topo.rolou .marca-mini { display: flex; }
  .topo.rolou .h1-mini { flex: 0 1 auto; max-width: 280px; padding-left: 14px; border-left: 1px solid var(--linha); }
  .topo-titulo { padding-bottom: 22px; }
  .topo-titulo h1 { font-size: 34px; }
  .topo.estreito .topo-titulo { max-width: 720px; margin: 0 auto; }
  .topo .bolhas { width: 72px; height: 58px; bottom: 18px; }
  .topo.estreito .bolhas { right: max(0px, calc((100% - 720px) / 2)); }
  .abas-top { display: flex; gap: 4px; flex: 1; }
  .abas-top a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; color: var(--texto-2); text-decoration: none; font-weight: 700; font-size: 14px; }
  .abas-top a svg { width: 18px; height: 18px; }
  .abas-top a:hover { background: var(--chip); color: var(--tom); }
  .abas-top a.ativo { background: color-mix(in srgb, var(--tom) 10%, #fff); color: var(--tom); }
  .abas-top .bolinha { background: var(--vermelho-marca); color: #fff; }
  .topo .espaco { display: none !important; }
  .conteudo { padding-bottom: 120px; padding-top: 20px; }
  .conteudo.largo { max-width: 1240px; padding-left: 24px; padding-right: 24px; }
  .barra-pedido { bottom: calc(18px + var(--seg-baixo)); }
  #toasts { bottom: 110px; }
  .painel-colunas { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }
  .painel-colunas > div { display: grid; gap: 14px; }

  .dividido { display: grid; grid-template-columns: minmax(360px, 430px) minmax(0, 1fr); gap: 18px; align-items: start; }
  .d-lista { position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow-y: auto; display: grid; gap: 12px; padding: 2px; align-content: start; scrollbar-width: thin; }
  .d-detalhe { display: grid; gap: 14px; min-width: 0; align-content: start; }
  .d-vazio { min-height: 340px; display: grid; place-content: center; justify-items: center; text-align: center; gap: 12px; color: var(--texto-2); background: var(--superficie); border-radius: var(--raio); box-shadow: var(--sombra); padding: 30px; }
  .d-vazio .ic-vazio { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--chip); color: var(--texto-3); }
  .d-vazio .ic-vazio svg { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .folha, .folha-fundo, .busca, .busca-fundo, .toast { animation: none; }
  .esq .b { animation: none; }
}

/* Detalhe, itens com ícone e colunas do painel */
.d-detalhe-in { display: grid; gap: 14px; min-width: 0; }
.item .ic-item { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--marca-suave); color: var(--marca); flex-shrink: 0; }
.item .ic-item svg { width: 20px; height: 20px; }
.painel-colunas { display: grid; gap: 14px; }
.painel-colunas > div { display: grid; gap: 14px; align-content: start; }

/* Celular estreito: botões de quantidade mais compactos */
@media (max-width: 420px) {
  .stepper button { width: 36px; height: 40px; }
  .stepper .q { min-width: 26px; }
  .produto { gap: 10px; padding-right: 12px; }
}

/* ================= Compra (azul) e Venda (verde) ================= */
.item .ic-item.compra { background: var(--marca-suave); color: var(--marca); }
.item .ic-item.venda { background: var(--verde-suave); color: var(--verde); }
.atalho .tipo { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; margin-bottom: 2px; }
.rotulo-cx.tipo-venda { color: var(--verde); }
.barra-pedido.venda .total { color: var(--verde); }
.barra-pedido.venda .dica { color: var(--verde); }

/* Escolha de pagamento na revisão da compra */
.opcoes-pag { display: grid; gap: 10px; }
.op-pag { border: 0; text-align: left; background: var(--superficie); box-shadow: inset 0 0 0 1.5px var(--linha); border-radius: var(--raio-p); padding: 12px 14px 12px 40px; display: grid; gap: 2px; cursor: pointer; position: relative; }
.op-pag::before { content: ''; position: absolute; left: 14px; top: 15px; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--linha); background: #fff; }
.op-pag.ativo { box-shadow: inset 0 0 0 2px var(--marca); background: var(--marca-suave); }
.op-pag.ativo::before { box-shadow: inset 0 0 0 5px var(--marca); }
.op-pag .t { font-weight: 800; color: var(--texto); }
.op-pag .s { font-size: 12.5px; color: var(--texto-2); }
.pagar-card { box-shadow: var(--sombra), inset 0 0 0 2px var(--marca); }
details.card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: '+'; font-size: 22px; color: var(--texto-3); font-weight: 600; }
details.card[open] > summary::after { content: '−'; }
