* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #fff;
  color: #111;
  -webkit-tap-highlight-color: transparent;
}
.wrap { max-width: 520px; margin: 0 auto; padding: 16px; }
header.topo {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #eee;
}
header.topo h1 { font-size: 18px; font-weight: 700; }
header.topo .link { font-size: 13px; color: #1e88e5; text-decoration: none; }

label.campo { display: block; font-size: 13px; color: #555; margin: 14px 0 6px; }
select, button, input { font-size: 16px; font-family: inherit; }
select {
  width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 10px; background: #fff;
}

.acoes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.acoes .full { grid-column: 1 / -1; }
button.acao {
  border: none; border-radius: 14px; padding: 20px 12px; color: #fff; font-weight: 700;
  cursor: pointer; font-size: 16px;
}
button.acao:active { transform: scale(0.98); }
.b-checkin  { background: #1e88e5; }
.b-ciclo    { background: #111; }
.b-pausa    { background: #fb8c00; }
.b-retorno  { background: #43a047; }
.b-checkout { background: #e53935; }
button:disabled { opacity: .5; }

.status {
  margin-top: 18px; padding: 14px; border-radius: 12px; background: #f6f6f6;
  font-size: 14px; line-height: 1.5; min-height: 54px; white-space: pre-line;
}
.status.ok { background: #e8f5e9; }
.status.erro { background: #ffebee; }
.status.loading { background: #fff8e1; }

.gps { font-size: 12px; color: #777; margin-top: 8px; }
.legenda { margin-top: 22px; font-size: 12px; color: #888; line-height: 1.6; }

/* ---- aprovacoes ---- */
.abas { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.aba { border: 1px solid #ddd; background: #fff; border-radius: 20px; padding: 7px 14px; font-size: 13px; cursor: pointer; }
.aba.ativa { background: #111; color: #fff; border-color: #111; }
.vazio { color: #999; text-align: center; padding: 40px 0; }
.cardap { border: 1px solid #eee; border-radius: 14px; padding: 12px; margin-bottom: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.cabap { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.cabap .sub { color: #888; font-size: 12px; font-weight: 400; }
.badge { color: #fff; font-size: 11px; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.fotoap { width: 100%; border-radius: 10px; margin: 10px 0; max-height: 320px; object-fit: cover; }
.metaap { font-size: 12px; color: #666; line-height: 1.5; }
.motivo { font-size: 12px; background: #fff3e0; border-radius: 8px; padding: 8px; margin-top: 8px; }
.checklist { margin: 10px 0 6px; display: grid; gap: 6px; }
.chk { font-size: 13px; display: flex; align-items: center; gap: 8px; }
.chk input { width: 18px; height: 18px; }
.obsap { width: 100%; border: 1px solid #ddd; border-radius: 8px; padding: 8px; font-size: 14px; min-height: 44px; resize: vertical; margin-bottom: 8px; }
.btnsap { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.bap { border: none; border-radius: 10px; padding: 12px 6px; color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
.bok { background: #43a047; } .bres { background: #fb8c00; } .brej { background: #e53935; }

/* ---- mapa ---- */
#map { position: absolute; inset: 0; }
.painel {
  position: absolute; z-index: 1000; top: 10px; left: 10px; right: 10px;
  background: rgba(255,255,255,.96); border-radius: 14px; padding: 12px 14px;
  box-shadow: 0 4px 18px rgba(0,0,0,.18); max-width: 380px;
}
.painel h2 { font-size: 15px; margin-bottom: 8px; }
.painel .filtros { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.painel select { padding: 8px; font-size: 13px; border-radius: 8px; }
.painel .full { grid-column: 1 / -1; }
.painel .info { font-size: 12px; color: #555; margin-top: 8px; }
.legenda-cores { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.legenda-cores span { font-size: 11px; display: flex; align-items: center; gap: 4px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,.2); }
.pop { font-size: 13px; line-height: 1.5; }
.pop img { width: 100%; border-radius: 8px; margin-top: 6px; }
.pop b { color: #111; }
