:root {
  --petroleo: #0F4652; --escuro: #0B2A31; --laranja: #E2703A; --creme: #F4F1EA;
  --linha: #cfc9bb; --apagado: #55666b; --erro: #a3261b;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--creme); color: var(--escuro);
  font: 17px/1.4 -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
.topo { padding: calc(env(safe-area-inset-top) + 4px) 16px 0; max-width: 640px; margin: auto; }
.topo a { display: inline-block; margin-left: -12px; }
.topo img { display: block; height: 76px; width: auto; }
main { max-width: 640px; margin: auto; padding: 4px 16px calc(env(safe-area-inset-bottom) + 24px); }
main.com-barra { padding-bottom: calc(env(safe-area-inset-bottom) + 190px); }
h1 { font-size: 26px; line-height: 1.2; margin: 8px 0 16px; color: var(--petroleo); }
h2 { font-size: 20px; margin: 0 0 12px; color: var(--petroleo); }
p { margin: 0 0 12px; }
.cartao { background: #fff; border: 1px solid #e2dccd; border-radius: 14px; padding: 16px; margin: 0 0 16px; }
label, legend { display: block; font-weight: 600; margin: 0 0 6px; padding: 0; }
fieldset { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.campo { margin-bottom: 14px; min-width: 0; }
.opcional { font-weight: 400; color: var(--apagado); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=search] {
  width: 100%; min-height: 52px; padding: 10px 14px; font: inherit; font-size: 18px; color: inherit;
  background: #fff; border: 1.5px solid #8b9a9d; border-radius: 10px; -webkit-appearance: none; appearance: none;
}
select {
  width: 100%; min-height: 52px; padding: 10px 44px 10px 14px; font: inherit; font-size: 18px; color: inherit;
  background: #fff; border: 1.5px solid #8b9a9d; border-radius: 10px; -webkit-appearance: none; appearance: none;
}
.seta { position: relative; }
.seta::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 10px; height: 10px; margin-top: -8px; pointer-events: none;
  border: solid var(--petroleo); border-width: 0 3px 3px 0; transform: rotate(45deg);
}
select:focus-visible, input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--laranja); outline-offset: 2px; }
input[aria-invalid=true] { border-color: var(--erro); }
.dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
button, .botao {
  display: block; width: 100%; min-height: 54px; padding: 12px 16px; font: inherit; font-size: 18px; font-weight: 700; text-align: center;
  text-decoration: none; color: #fff; background: var(--petroleo); border: 0; border-radius: 12px; cursor: pointer; touch-action: manipulation;
}
button:disabled { opacity: .55; }
.destaque { background: var(--laranja); color: var(--escuro); }
.claro { background: #fff; color: var(--petroleo); border: 1.5px solid var(--petroleo); }
.texto { background: none; color: var(--petroleo); text-decoration: underline; font-weight: 600; font-size: 17px; text-align: left; padding-left: 0; }
.perigo { color: var(--erro); }
.opcoes { display: flex; flex-wrap: wrap; gap: 8px; }
.opcoes button { flex: 1 1 28%; width: auto; min-height: 50px; padding: 8px 6px; font-size: 17px; font-weight: 600; background: #fff; color: var(--petroleo); border: 1.5px solid #8b9a9d; }
.opcoes button:first-child:nth-last-child(4), .opcoes button:first-child:nth-last-child(4) ~ button { flex-basis: 40%; }
.opcoes button[aria-pressed=true] { background: var(--petroleo); color: #fff; border-color: var(--petroleo); }
dd.parte { margin: 0; font-weight: 600; }
dd.parte + dt { margin-top: 10px; }
.pilha { display: grid; gap: 10px; }
.marcar { display: flex; align-items: center; gap: 12px; min-height: 48px; font-weight: 600; margin: 0; }
.marcar input { width: 26px; height: 26px; flex: none; accent-color: var(--petroleo); }
.linha { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.linha > :first-child { min-width: 0; overflow-wrap: anywhere; }
.valor { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.conta { border-top: 1px solid #e2dccd; padding-top: 10px; margin-top: 4px; }
.fraco { color: var(--apagado); }
.erro { color: var(--erro); font-weight: 600; margin: 8px 0 0; }
.erro:empty { display: none; }
.aviso { text-align: center; padding: 28px 8px; color: var(--apagado); }
.resumo { display: block; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.etiqueta { font-size: 14px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: #e4ecec; color: var(--petroleo); white-space: nowrap; }
.etiqueta.rascunho { background: #fbe3d6; color: #7a3210; }
.etiqueta.cancelado { background: #eee; color: #555; }
.barra {
  position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--linha);
  padding: 10px max(16px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 12px) max(16px, env(safe-area-inset-left));
}
.barra > div { max-width: 608px; margin: auto; }
.barra .total { font-size: 24px; }
.estado { font-size: 15px; color: var(--apagado); margin: 0 0 8px; min-height: 21px; }
.estado.ruim { color: var(--erro); font-weight: 600; }
dialog { width: min(92vw, 440px); border: 0; border-radius: 16px; padding: 20px; color: inherit; }
dialog::backdrop { background: rgba(11, 42, 49, .6); }
dl { margin: 0 0 12px; } dt { color: var(--apagado); font-size: 15px; } dd { margin: 0 0 10px; overflow-wrap: anywhere; }
