/* Identidade visual da Vitrine de Pedidos (provisória, a ser redefinida).
   Claro com azul-marinho. Cor nos números: azul = destaque, verde = entrada, vermelho = saída/atraso.
   Impressão: sempre claro. */
:root {
  /* equipe: claro com azul-marinho, letra escura e grande (fácil de ler para todos os sócios) */
  --fundo: #f2f5fa;
  --superficie: #ffffff;
  --superficie-2: #f6f8fc;
  --texto: #0f1b33;
  --texto-suave: #2c3a55;
  --sutil: #52607a;
  --borda: #d5ddea;
  --borda-forte: #b6c3d8;
  --marca: #1e3a8a;
  --marca-forte: #172f72;
  --laranja: #f97316;
  --topo: #13294b;
  --sobre-marca: #ffffff;
  --link: #1d4ed8;
  --acento: #2563eb;
  --acento-suave: #e8effc;
  --destaque: #1d4ed8;
  --ok: #15803d;
  --ok-fundo: #dcfce7;
  --aviso: #92400e;
  --aviso-fundo: #fef3c7;
  --erro: #b91c1c;
  --erro-fundo: #fee2e2;
  --brilho: radial-gradient(1200px 500px at 85% -10%, #dce7fb 0%, transparent 60%);
  --cartao-fundo: var(--superficie);
  --raio: 16px;
  --sombra: 0 1px 2px rgb(19 41 75 / .06), 0 10px 28px -18px rgb(19 41 75 / .35);
  --fonte: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --fonte-titulo: "Sora", "Inter", ui-sans-serif, sans-serif;
  color-scheme: light;
}
@media print {
  :root {
    --fundo: #fff; --superficie: #fff; --superficie-2: #fff; --texto: #111; --texto-suave: #333; --sutil: #555; --cartao-fundo: #fff; --brilho: none;
    --borda: #ccc; --borda-forte: #999; --marca: #1e3a8a; --link: #111; color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--brilho), var(--fundo); background-attachment: fixed; color: var(--texto); font: 17px/1.45 var(--fonte); min-height: 100dvh; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; font-family: var(--fonte-titulo); letter-spacing: -.01em; }
h2 { font-size: 1.2rem; }
small { display: block; color: var(--sutil); font-size: .82rem; }
.sutil { color: var(--sutil); font-size: .9rem; }
a { color: var(--link); }
.oculto { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
/* ---------- blocos ---------- */
.cartao { background: var(--cartao-fundo); border: 1px solid var(--borda); border-radius: var(--raio); padding: 1rem; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: .8rem; }
.cartao + .cartao, .cartao + .lista, .lista + .cartao { margin-top: 1rem; }
.pilha { display: flex; flex-direction: column; gap: 1rem; }
.linha { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.linha > .cresce { flex: 1; min-width: 0; }
.entre { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.grade-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.card { display: flex; flex-direction: column; gap: .2rem; padding: 1rem; min-height: 112px; background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); color: inherit; text-decoration: none; box-shadow: var(--sombra); }
.card:hover { border-color: var(--marca); }
.card-icone { font-size: 1.8rem; }
.saudacao { font-size: 1.3rem; font-weight: 600; margin: .25rem 0 1rem; }
.grupo { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sutil); margin: 1.25rem 0 .5rem; }

/* ---------- formulários ---------- */
label { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; font-weight: 600; }
label.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; }
input, select, textarea { width: 100%; min-height: 46px; padding: .6rem .8rem; border: 1px solid var(--borda-forte); border-radius: 12px; background: var(--superficie); font-weight: 400; }
input[type=checkbox], input[type=radio] { width: 22px; min-height: 22px; accent-color: var(--marca); }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--acento); outline-offset: 1px; }
.campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .8rem; }
.erro-campo { color: var(--erro); font-size: .85rem; }

button, .botao { min-height: 46px; padding: .6rem 1.1rem; border-radius: 12px; border: 0; background: var(--marca); color: var(--sobre-marca); font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
button:hover, .botao:hover { background: var(--marca-forte); }
button:disabled { opacity: .55; cursor: wait; }
button.secundario, .botao.secundario { background: transparent; color: var(--marca); border: 1.5px solid var(--marca); }
button.secundario:hover { background: var(--acento-suave); }
button.perigo { background: var(--erro); }
button.ok { background: var(--ok); }
button.leve { background: var(--acento-suave); color: var(--texto); }
button.grande, .botao.grande { min-height: 60px; font-size: 1.15rem; width: 100%; border-radius: 16px; }
.vazio { text-align: center; color: var(--sutil); padding: 2rem 1rem; }
.carregando { display: flex; gap: .6rem; align-items: center; justify-content: center; color: var(--sutil); padding: 2rem; }
.spinner { width: 20px; height: 20px; border: 3px solid var(--borda); border-top-color: var(--marca); border-radius: 50%; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: calc(5rem + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100; padding: .8rem 1.2rem; border-radius: 12px; background: var(--texto); color: var(--fundo); font-weight: 600; box-shadow: var(--sombra); max-width: 92vw; transition: opacity .3s; }
.toast-erro { background: var(--erro); color: #fff; }
.toast.saindo { opacity: 0; }
.abas { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; margin-bottom: 1rem; }
.abas button { background: var(--superficie); color: var(--texto-suave); border: 1px solid var(--borda); white-space: nowrap; min-height: 40px; }
.abas button.ativo { background: var(--marca); color: #fff; border-color: var(--marca); }

/* ---------- vitrine da loja (celular primeiro: letra ≥17px, toques ≥44px) ---------- */
.loja { --cor-fornecedor: var(--marca); --sobre-fornecedor: #fff; max-width: 640px; margin: 0 auto; padding: 12px 16px calc(7.5rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: .9rem; font-size: 17px; }
.loja small, .loja .sutil { font-size: 1rem; }
.loja-nav { display: flex; justify-content: flex-end; }
.loja-nav a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; text-decoration: none; color: var(--texto); }
.loja-heroi { display: flex; align-items: center; gap: .9rem; padding: 1.1rem; border-radius: 20px; color: var(--sobre-fornecedor); box-shadow: var(--sombra);
  background: linear-gradient(135deg, var(--cor-fornecedor), color-mix(in srgb, var(--cor-fornecedor) 85%, #000)); }
.loja-heroi h1 { margin: 0; color: inherit; font-size: clamp(1.4rem, 6vw, 1.9rem); }
.loja-heroi p { margin: .15rem 0 0; opacity: .92; }
.loja-logo { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 16px; object-fit: cover; background: rgb(255 255 255 / .22); color: inherit;
  display: grid; place-items: center; font: 700 1.8rem var(--fonte-titulo); }
.contagem { margin: 0; color: var(--texto-suave); font-weight: 600; }
.contagem:empty { display: none; }
.aviso { margin: 0; padding: .7rem .9rem; border-radius: 12px; background: var(--aviso-fundo); color: var(--aviso); font-weight: 600; }
.aviso-acesso h2 { margin: 0; }
.aviso-acesso p { margin: 0; }
.loja-data select { min-height: 52px; font-size: 1.05rem; font-weight: 600; }
.loja-data { font-size: 1rem; }
.loja-titulo { margin: .3rem 0 0; font-size: 1.3rem; }
.produtos-lista { display: flex; flex-direction: column; gap: .55rem; }
.produto { display: flex; align-items: center; gap: .7rem; padding: .55rem; background: var(--superficie); border: 1px solid var(--borda); border-radius: 16px; box-shadow: var(--sombra); }
.produto.tem { border-color: var(--cor-fornecedor); box-shadow: 0 0 0 2px var(--cor-fornecedor); }
.produto-foto { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
  background: var(--superficie-2); color: var(--sutil); font: 700 1.5rem var(--fonte-titulo); }
.produto-foto img { width: 100%; height: 100%; object-fit: cover; }
.produto-info { flex: 1; min-width: 0; }
.produto-nome { font-weight: 600; font-size: 1.05rem; line-height: 1.25; }
.produto-preco { color: var(--sutil); font-size: 1rem; }
.produto.tem .produto-preco { color: var(--texto); font-weight: 600; }
.stepper { flex: 0 0 auto; display: flex; align-items: center; gap: .3rem; }
.stepper button { width: 46px; min-height: 46px; padding: 0; font-size: 1.5rem; border-radius: 12px; background: var(--cor-fornecedor); color: var(--sobre-fornecedor); }
.stepper button.leve { background: var(--acento-suave); color: var(--texto); }
.stepper input { width: 56px; min-height: 46px; padding: .2rem; text-align: center; font-size: 1.1rem; font-weight: 700; }
.barra-total { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(.6rem + env(safe-area-inset-bottom)); z-index: 10; width: min(608px, calc(100% - 32px));
  display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem .7rem 1rem; border-radius: 18px; background: var(--topo); color: #fff; box-shadow: 0 10px 30px rgb(19 41 75 / .35); }
.barra-total .cresce { flex: 1; display: flex; flex-direction: column; min-width: 0; font-size: .95rem; }
.barra-total strong { font-size: 1.35rem; }
.barra-total button.grande { width: auto; min-height: 54px; font-size: 1.05rem; padding: .6rem 1.1rem; background: var(--cor-fornecedor); color: var(--sobre-fornecedor); }
.loja-confirmar p { margin: 0; }
.loja-confirmar .destaque { font-size: 1.15rem; font-weight: 700; }
.itens { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.itens li { display: flex; justify-content: space-between; gap: .6rem; }
.total { margin: 0; font-size: 1.15rem; border-top: 1px solid var(--borda); padding-top: .5rem; }
.pedido-cartao h2, .pedido-cartao p { margin: 0; }
.selo { font-size: .95rem; font-weight: 700; padding: .2rem .7rem; border-radius: 999px; background: var(--acento-suave); color: var(--marca); }
.status-cancelado .selo { background: var(--erro-fundo); color: var(--erro); }
.status-entregue .selo { background: var(--ok-fundo); color: var(--ok); }
.status-cancelado { opacity: .75; }
.codigo-entrada { font-size: 2rem; letter-spacing: .4em; text-align: center; font-weight: 700; min-height: 64px; }
.loja .erro-campo { font-size: 1rem; margin: 0; }
.loja .erro-campo:empty { display: none; }
.stepper button, .stepper input, .barra-total button { touch-action: manipulation; }
.loja label { font-size: 1rem; }
body:has(.barra-total) .toast { bottom: calc(7.5rem + env(safe-area-inset-bottom)); }

/* ---------- fornecedor: cadastro, guia, produtos, aparência ---------- */
.painel { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(2rem + env(safe-area-inset-bottom)); }
.painel h1 { margin: 0; font-size: 1.5rem; }
.painel summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.passo { flex-direction: row; align-items: center; gap: .9rem; min-height: 0; }
.passo-n { flex: 0 0 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--acento-suave); color: var(--marca); font-weight: 700; font-size: 1.2rem; }
.passo.feito .passo-n { background: var(--ok-fundo); color: var(--ok); }
.ordenar { list-style: none; margin: 0; padding: 0; }
.ordenar .produto { gap: .5rem; }
.ordenar .inativo { opacity: .6; }
.ordenar .arrastando { box-shadow: 0 0 0 2px var(--acento), var(--sombra); }
.alca { width: 44px; padding: 0; touch-action: none; cursor: grab; flex: 0 0 44px; }
.previa-foto .produto-foto { width: 72px; height: 72px; flex-basis: 72px; }
.previa-loja { padding: 0; margin: 0; font-size: 17px; }
.chips { display: flex; gap: .3rem; justify-content: space-between; }
.chip { flex: 1 1 0; min-width: 0; height: 44px; padding: 0; border-radius: 50%; max-width: 44px; background: var(--acento-suave); color: var(--texto); font-weight: 700; }
.chip[aria-pressed=true] { background: var(--marca); color: #fff; }
.lista-sem { list-style: none; margin: 0; padding: 0; gap: .3rem; }

/* Painel de pedidos (#/painel, #/pedidos) */
.pedido-linha { width: 100%; text-align: left; color: var(--texto); align-items: stretch; justify-content: flex-start; gap: .3rem; font-weight: 400; }
.pedido-linha:hover { background: var(--cartao-fundo); border-color: var(--marca); }
.selo-celular { align-self: flex-start; padding: .15rem .6rem; font-size: .85rem; }
.total-produto { min-height: 0; }
.total-qtd { font-size: 2.2rem; font-weight: 800; line-height: 1.1; }
