:root {
  --fundo: #FFF3E6;
  --card: #FFFFFF;
  --linha: #F0D8C0;
  --texto: #1C1612;
  --ajuda: #6D5848;
  --laranja: #EE6B1A;
  --laranja-escuro: #C6530E;
  --amarelo: #F5B400;
  --roxo: #6C3BB8;
  --verde: #187A42;
  --vermelho: #C43B2E;
  --sombra: 0 12px 30px rgba(90, 40, 8, 0.08);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--fundo);
  color: var(--texto);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  overscroll-behavior: none;
}
body { padding: env(safe-area-inset-top) 0 0; }
button, input, select { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hidden, [hidden] { display: none !important; }

#auth, .pagina-baixar {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px 32px;
}
.caixa {
  width: min(420px, 100%);
  background: var(--card);
  border-radius: 28px;
  padding: 28px 22px 24px;
  box-shadow: var(--sombra);
}
.logo {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.marca {
  margin: 0 0 6px;
  color: var(--laranja);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
h1, .titulo {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.ajuda, .muted { color: var(--ajuda); margin: 0 0 16px; }
.ajuda a { color: var(--laranja); font-weight: 800; }
.troca {
  display: flex;
  background: #F6E8D6;
  border-radius: 16px;
  padding: 4px;
  margin: 18px 0;
}
.troca button {
  flex: 1;
  border: 0;
  background: none;
  padding: 11px 8px;
  border-radius: 13px;
  font-weight: 700;
  color: var(--ajuda);
}
.troca button.on { background: #fff; color: var(--texto); box-shadow: 0 4px 12px rgba(80,40,10,.08); }

label { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 700; color: var(--ajuda); }
input, select {
  width: 100%;
  margin-top: 6px;
  padding: 14px 14px;
  border: 1px solid var(--linha);
  border-radius: 14px;
  background: #FFFDF9;
  color: var(--texto);
}
input:focus { outline: 3px solid #F8D2B0; border-color: var(--laranja); }

.btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 16px;
  background: var(--laranja);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  text-align: center;
  text-decoration: none;
}
.btn + .btn { margin-top: 10px; }
.btn.roxo { background: var(--roxo); }
.btn.amarelo { background: var(--amarelo); color: #3A2A00; }
.btn.vermelho { background: var(--vermelho); }
.btn.claro { background: #F4E6D4; color: var(--texto); }
.btn:active { transform: scale(0.98); }
.erro { color: var(--laranja); font-weight: 700; min-height: 1.2em; }

#app { min-height: 100dvh; }
#conteudo {
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 16px calc(108px + env(safe-area-inset-bottom));
}

.topo {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.topo small { display: block; color: var(--ajuda); font-weight: 700; text-transform: capitalize; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
  background: #F4E6D4;
  color: var(--texto);
  white-space: nowrap;
}
.chip.ligado { background: #D9F5E3; color: var(--verde); }
.chip .ponto {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(24, 122, 66, 0.15);
}

.hero {
  background: linear-gradient(160deg, #FF8C2E 0%, #E25A10 100%);
  color: #fff;
  border-radius: 28px;
  padding: 22px 20px 20px;
  margin-bottom: 14px;
  box-shadow: 0 16px 32px rgba(226, 90, 16, 0.28);
}
.hero h2 { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.86; }
.hero .grande { font-size: 42px; font-weight: 700; letter-spacing: -0.03em; margin: 6px 0 10px; }
.hero .linha { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 700; opacity: 0.95; }
.aviso-min {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: #FFF6D6;
  border-radius: 16px;
  color: #5A4300;
  font-weight: 700;
  font-size: 14px;
}

.cta { margin-bottom: 18px; }

.secao { margin: 6px 0 10px; font-size: 13px; font-weight: 800; color: var(--ajuda); text-transform: uppercase; letter-spacing: 0.04em; }

.grade { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.atalho {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: var(--card);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--sombra);
}
.atalho + .atalho { margin-top: 10px; }
.grade .atalho { margin-top: 0; }
.bolha {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  font-size: 24px;
  background: #FFF1E4;
  line-height: 1;
}
.atalho b { display: block; font-size: 16px; margin-bottom: 3px; }
.atalho span { color: var(--ajuda); font-size: 13px; }
.atalho.pedido { display: flex; align-items: center; gap: 14px; }
.atalho.pedido .bolha { margin: 0; flex: 0 0 44px; }
.atalho.pedido.pisca { outline: 3px solid var(--amarelo); }

.passo {
  background: var(--card);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: var(--sombra);
}
.passo.ligado { background: #FFF4E6; }
.mapa, .mapa-grande {
  height: 230px;
  width: 100%;
  border-radius: 16px;
  margin: 10px 0 4px;
  overflow: hidden;
  background: #E8D9C8;
  touch-action: pan-x pan-y;
}
.mapa-grande { height: min(42vh, 320px); }
.indicadores { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.indicadores div { background: var(--card); border-radius: 16px; padding: 12px; box-shadow: var(--sombra); }
.indicadores small { display: block; color: var(--ajuda); font-size: 11px; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; }
.indicadores b { display: block; margin-top: 4px; font-size: 18px; }
.legenda-mapa { display: flex; gap: 14px; font-size: 13px; color: var(--ajuda); font-weight: 700; margin: 0 0 12px; }
.legenda-mapa i { display: inline-block; width: 14px; height: 4px; border-radius: 4px; margin-right: 6px; vertical-align: middle; }
.legenda-mapa .turno { background: var(--laranja); }
.legenda-mapa .corrida { background: var(--roxo); }
.mapa-ajuda { font-size: 13px; margin: 0 0 10px; }
.passo h2 { margin: 0 0 6px; font-size: 14px; color: var(--ajuda); font-weight: 800; }
.grande { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; margin: 6px 0; }

.tres { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 12px; }
.tres div { background: var(--card); border-radius: 16px; padding: 12px 10px; box-shadow: var(--sombra); }
.tres small { display: block; color: var(--ajuda); font-size: 11px; font-weight: 800; letter-spacing: 0.03em; }
.lista {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 8px;
  box-shadow: var(--sombra);
}
.volta { border: 0; background: none; color: var(--laranja); font-weight: 800; padding: 4px 0 14px; }
.mes { width: auto; margin: 0 0 12px; }

.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal b { font-size: 12px; color: var(--ajuda); }
.dia { min-height: 54px; background: var(--card); border-radius: 10px; padding: 4px; font-size: 12px; box-shadow: var(--sombra); }
.dia.ok { background: #FFF4E6; }
.dia.off { opacity: .35; }

.oferta { border: 2px solid var(--roxo); }

.barra {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  display: flex;
  background: rgba(255,255,255,0.94);
  border-radius: 22px;
  padding: 6px;
  box-shadow: 0 10px 30px rgba(50, 20, 0, 0.14);
  backdrop-filter: blur(14px);
}
.barra button {
  flex: 1;
  border: 0;
  background: none;
  padding: 8px 4px 6px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 10px;
  color: var(--ajuda);
  display: grid;
  justify-items: center;
  gap: 2px;
}
.barra .ico { font-size: 20px; line-height: 1; }
.barra button.on { background: #FFF1D8; color: var(--texto); }

textarea {
  width: 100%;
  margin-top: 6px;
  padding: 14px;
  border: 1px solid var(--linha);
  border-radius: 14px;
  background: #FFFDF9;
  color: var(--texto);
  resize: vertical;
  min-height: 72px;
}
.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 25;
  background: #2B2118;
  color: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  font-weight: 700;
  box-shadow: var(--sombra);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(28, 22, 18, 0.45);
  display: flex;
  align-items: flex-end;
  z-index: 30;
}
.folha {
  width: 100%;
  background: #fff;
  border-radius: 28px 28px 0 0;
  padding: 10px 18px calc(24px + env(safe-area-inset-bottom));
  max-height: 92dvh;
  overflow: auto;
}
.puxador {
  width: 44px;
  height: 5px;
  border-radius: 99px;
  background: #E6D3C0;
  margin: 4px auto 10px;
}
.fechar { border: 0; background: none; color: var(--laranja); font-weight: 800; padding: 0 0 8px; }
.passos-app { margin: 0 0 18px; padding-left: 20px; color: var(--texto); }
.passos-app li { margin: 10px 0; font-weight: 600; }

.pagina-baixar { background: linear-gradient(180deg, #FFE1C2 0%, #FFF3E6 45%, #FFF3E6 100%); }
.baixar-caixa { text-align: center; }
.baixar-caixa .logo { margin: 0 auto 16px; }
.baixar-caixa .passos-app { text-align: left; }

@media (min-width: 800px) {
  .modal { align-items: center; padding: 24px; }
  .folha { max-width: 440px; margin: 0 auto; border-radius: 28px; }
  .barra { left: 50%; right: auto; width: min(480px, calc(100% - 32px)); transform: translateX(-50%); }
  .toast { left: 50%; right: auto; width: min(480px, calc(100% - 32px)); transform: translateX(-50%); }
  #conteudo { padding-top: 24px; }
}
