/* Minha Banca — feito para usar com uma mão, no sol, em pé na feira. */
:root {
  --verde: #1b7a3a;
  --verde-escuro: #11592a;
  --verde-claro: #e6f4ea;
  --laranja: #c2410c;
  --laranja-claro: #fff1e7;
  --vermelho: #b42318;
  --vermelho-claro: #fdecea;
  --azul: #1d4ed8;
  --azul-claro: #e8efff;
  --texto: #14201a;
  --texto-2: #4a5a50;
  --borda: #d5ddd7;
  --fundo: #f4f6f3;
  --cartao: #ffffff;
  --raio: 14px;
  --sombra: 0 1px 2px rgba(0, 0, 0, .06), 0 2px 8px rgba(0, 0, 0, .05);
  --nav: 68px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font: 17px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--texto);
  background: var(--fundo);
  min-height: 100vh;
  overscroll-behavior-y: contain;
}
button, input, select, textarea { font: inherit; color: inherit; }
.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.p { width: 18px; height: 18px; }
.ico.g { width: 30px; height: 30px; }

/* ---- Estrutura ---- */
#app { max-width: 560px; margin: 0 auto; padding-bottom: calc(var(--nav) + 24px + env(safe-area-inset-bottom)); }
.topo {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--verde); color: #fff;
  padding-top: calc(12px + env(safe-area-inset-top));
}
.topo h1 { font-size: 19px; margin: 0; flex: 1; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topo .sub { font-size: 13px; opacity: .85; font-weight: 400; display: block; }
.topo .voltar { background: none; border: 0; color: #fff; padding: 6px; margin: -6px 0 -6px -8px; display: flex; }
.tela { padding: 16px; display: flex; flex-direction: column; gap: 14px; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center;
  background: #fff; border-top: 1px solid var(--borda);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-in { display: flex; width: 100%; max-width: 560px; }
.nav a {
  flex: 1; height: var(--nav); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--texto-2); text-decoration: none; font-size: 12px; font-weight: 600;
}
.nav a.ativo { color: var(--verde); }
.nav a.ativo .ico { stroke-width: 2.4; }

/* ---- Cartões ---- */
.cartao { background: var(--cartao); border-radius: var(--raio); box-shadow: var(--sombra); padding: 16px; }
.cartao h2 { font-size: 15px; margin: 0 0 10px; color: var(--texto-2); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.cartao.destaque { background: var(--verde); color: #fff; }
.cartao.destaque h2 { color: rgba(255, 255, 255, .85); }
.cartao.destaque .num { background: rgba(255, 255, 255, .15); }
.cartao.destaque .num .r { color: rgba(255, 255, 255, .85); }
a.cartao, a.atalho, a.chip, a.btn { text-decoration: none; color: inherit; }
a.btn { color: #fff; }
a.btn.sec { color: var(--verde-escuro); }
a.btn.claro { color: var(--texto); }
label.btn { cursor: pointer; }
.cartao.alerta { background: var(--laranja-claro); border: 1px solid #f6c7a8; box-shadow: none; }
.cartao.alerta-v { background: var(--vermelho-claro); border: 1px solid #f3b8b1; box-shadow: none; }
.linha-titulo { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.numeros { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.num { background: var(--fundo); border-radius: 10px; padding: 10px 12px; }
.num .r { font-size: 13px; color: var(--texto-2); font-weight: 600; }
.num .v { font-size: 20px; font-weight: 800; margin-top: 2px; }
.num.verde .v { color: var(--verde); }
.num.verm .v { color: var(--vermelho); }
.num.lar .v { color: var(--laranja); }
.grande { font-size: 32px; font-weight: 800; letter-spacing: -.01em; }
.pos { color: var(--verde); }
.neg { color: var(--vermelho); }
.mudo { color: var(--texto-2); font-size: 14px; }
.peq { font-size: 13px; }

/* ---- Botões ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 18px; border-radius: 12px; border: 0;
  background: var(--verde); color: #fff; font-weight: 700; font-size: 17px; cursor: pointer;
  text-decoration: none;
}
.btn:active { transform: scale(.98); }
.btn.cheio { width: 100%; }
.btn.enorme { min-height: 64px; font-size: 19px; }
.btn.sec { background: var(--verde-claro); color: var(--verde-escuro); }
.btn.claro { background: #fff; color: var(--texto); border: 1px solid var(--borda); }
.btn.perigo { background: var(--vermelho); }
.btn.perigo-sec { background: var(--vermelho-claro); color: var(--vermelho); }
.btn.peq { min-height: 40px; font-size: 15px; padding: 0 12px; border-radius: 10px; white-space: nowrap; flex: none; }
.btn[disabled] { opacity: .45; }
.btn-ico { background: none; border: 0; padding: 8px; border-radius: 10px; color: var(--texto-2); display: inline-flex; cursor: pointer; }
.btn-ico:active { background: var(--fundo); }
.duplo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.atalhos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.atalho {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  background: #fff; border: 0; border-radius: var(--raio); box-shadow: var(--sombra);
  padding: 16px; min-height: 104px; text-align: left; cursor: pointer; font-weight: 700; font-size: 17px;
}
.atalho .bola { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.atalho small { display: block; font-weight: 500; font-size: 13px; color: var(--texto-2); margin-top: 2px; }
.bola.v { background: var(--verde-claro); color: var(--verde); }
.bola.a { background: var(--azul-claro); color: var(--azul); }
.bola.l { background: var(--laranja-claro); color: var(--laranja); }
.bola.r { background: var(--vermelho-claro); color: var(--vermelho); }

/* ---- Listas ---- */
.lista { background: #fff; border-radius: var(--raio); box-shadow: var(--sombra); overflow: hidden; }
.item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #edf0ee;
  text-decoration: none; color: inherit; background: none; width: 100%; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer;
}
.item:last-child { border-bottom: 0; }
.item .meio { flex: 1; min-width: 0; }
.item .t { font-weight: 700; }
.item .s { font-size: 14px; color: var(--texto-2); }
.item .dir { text-align: right; font-weight: 800; white-space: nowrap; }
.item .dir .s { font-weight: 500; }
.grupo-data { font-size: 13px; font-weight: 800; color: var(--texto-2); text-transform: uppercase; letter-spacing: .04em; margin: 6px 4px -4px; }
.vazio { text-align: center; color: var(--texto-2); padding: 28px 16px; }
.vazio .ico { width: 40px; height: 40px; margin-bottom: 6px; opacity: .6; }

.barra { height: 8px; border-radius: 4px; background: #edf0ee; overflow: hidden; margin-top: 6px; }
.barra i { display: block; height: 100%; background: var(--verde); border-radius: 4px; }
.barra i.l { background: var(--laranja); }
.barra i.r { background: var(--vermelho); }
.selo { display: inline-block; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--fundo); color: var(--texto-2); vertical-align: 2px; }
.selo.l { background: var(--laranja-claro); color: var(--laranja); }
.selo.r { background: var(--vermelho-claro); color: var(--vermelho); }
.selo.v { background: var(--verde-claro); color: var(--verde); }

/* ---- Formulários ---- */
label.campo { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 15px; }
label.campo .ajuda { font-weight: 500; color: var(--texto-2); font-size: 13px; }
.entrada {
  width: 100%; min-height: 54px; padding: 10px 14px; border: 2px solid var(--borda); border-radius: 12px;
  background: #fff; font-size: 19px; font-weight: 600;
}
.entrada:focus { outline: none; border-color: var(--verde); }
.entrada.dinheiro { font-size: 24px; font-weight: 800; }
textarea.entrada { min-height: 80px; font-size: 17px; font-weight: 500; }
select.entrada { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #4a5a50 50%), linear-gradient(135deg, #4a5a50 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.form { display: flex; flex-direction: column; gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 14px; border-radius: 99px; border: 2px solid var(--borda); background: #fff;
  font-weight: 700; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.chip.sel { border-color: var(--verde); background: var(--verde-claro); color: var(--verde-escuro); }
.troca { display: flex; background: var(--fundo); border-radius: 12px; padding: 4px; gap: 4px; }
.troca button { flex: 1; min-height: 44px; border: 0; border-radius: 9px; background: none; font-weight: 700; cursor: pointer; color: var(--texto-2); }
.troca button.sel { background: #fff; color: var(--verde-escuro); box-shadow: var(--sombra); }
.marcar { display: flex; align-items: flex-start; gap: 12px; font-weight: 600; cursor: pointer; }
.marcar input { width: 24px; height: 24px; accent-color: var(--verde); flex: none; margin-top: 1px; }

/* ---- Contagem do fechamento ---- */
.conta { background: #fff; border-radius: var(--raio); box-shadow: var(--sombra); padding: 12px 14px; border-left: 5px solid var(--borda); }
.conta.ok { border-left-color: var(--verde); }
.conta.erro { border-left-color: var(--laranja); }
.conta .cab { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.conta .nome { font-weight: 800; font-size: 18px; }
.conta .tinha { font-size: 14px; color: var(--texto-2); }
.conta .campos { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 8px; margin-top: 8px; align-items: end; }
.conta .campos label { font-size: 12px; font-weight: 700; color: var(--texto-2); display: flex; flex-direction: column; gap: 3px; }
.conta .entrada { min-height: 50px; font-size: 20px; padding: 6px 10px; }
.conta .zerar { min-height: 50px; padding: 0 10px; font-size: 13px; border-radius: 12px; }
.conta .preco { background: none; border: 0; padding: 0; color: var(--azul); font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.conta .aviso { font-size: 13px; color: var(--laranja); font-weight: 700; margin-top: 6px; }
.passos { display: flex; gap: 6px; }
.passos i { flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .35); }
.passos i.feito { background: #fff; }
.rodape-fixo {
  position: sticky; bottom: calc(var(--nav) + env(safe-area-inset-bottom) + 8px); z-index: 5;
  display: flex; gap: 10px; padding-top: 4px;
}
.conta-linha { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed #e3e8e4; }
.conta-linha:last-child { border-bottom: 0; }
.conta-linha.total { font-weight: 800; font-size: 19px; border-bottom: 0; border-top: 2px solid var(--texto); margin-top: 4px; padding-top: 10px; }

/* ---- Janela (modal) ---- */
.fundo-modal { position: fixed; inset: 0; background: rgba(10, 20, 14, .45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: aparece .15s; }
.modal {
  background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto;
  border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  animation: sobe .2s ease-out;
}
.modal .cab-modal { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal h3 { margin: 0; font-size: 20px; }
@keyframes sobe { from { transform: translateY(40px); opacity: .5; } }
@keyframes aparece { from { opacity: 0; } }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav) + 20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--texto); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 60;
  max-width: calc(100% - 32px); box-shadow: 0 6px 20px rgba(0, 0, 0, .25); animation: aparece .2s;
}
.faixa-versao { background: var(--azul); color: #fff; padding: 10px 16px; display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.faixa-versao button { margin-left: auto; background: #fff; color: var(--azul); border: 0; border-radius: 8px; padding: 8px 12px; font-weight: 800; }

/* ---- Configuração inicial ---- */
.boas-vindas { text-align: center; padding: 18px 8px 4px; }
.boas-vindas .logo { width: 72px; height: 72px; border-radius: 20px; background: var(--verde); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.boas-vindas .logo .ico { width: 40px; height: 40px; }
.boas-vindas h2 { font-size: 24px; margin: 14px 0 6px; }
.dia-feira { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.link { background: none; border: 0; color: var(--azul); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 0; }
