:root {
  --navy: #0e2238; --navy2: #16304d; --amber: #f5b700; --ouro: #b07f00;
  --ink: #0e2238; --muted: #5b6b80; --line: #e3e8ef; --bg: #f6f8fb; --white: #fff;
  --green: #1a9e4b; --red: #b3261e;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.topo { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--navy); color: var(--white); }
.marca { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.logo { background: var(--amber); color: var(--navy); border-radius: 8px; padding: 2px 7px; font-weight: 800; font-size: 13px; }
.sair { background: transparent; color: var(--white); border: 1px solid #ffffff55; border-radius: 8px; padding: 5px 10px; font: inherit; }
main { max-width: 760px; margin: 0 auto; padding: 16px 14px 96px; }
h1 { font-size: 20px; margin: 4px 0 14px; }
h2 { font-size: 16px; margin: 22px 0 10px; }
.cartoes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cartao { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.cartao .num { font-size: 26px; font-weight: 800; }
.cartao .rot { color: var(--muted); font-size: 13px; }
.cartao.alerta { border-color: var(--amber); background: #fff8e1; }
.lista { display: flex; flex-direction: column; gap: 8px; }
.item { display: block; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: inherit; text-decoration: none; }
.item .linha1 { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.item .linha2 { color: var(--muted); font-size: 13px; margin-top: 2px; }
.selo { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 99px; padding: 2px 9px; background: #e8eef6; color: var(--navy2); white-space: nowrap; }
.selo.ganho { background: #e3f6ea; color: var(--green); }
.selo.perdido { background: #fdeceb; color: var(--red); }
.selo.atraso { background: #fff3cd; color: var(--ouro); }
.abas { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; }
.abas button { flex: none; border: 1px solid var(--line); background: var(--white); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 13px; color: var(--ink); }
.abas button.ativa { background: var(--navy); color: var(--white); border-color: var(--navy); }
.ficha { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.ficha td { padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.ficha tr:first-child td { border-top: 0; }
.ficha td:first-child { color: var(--muted); width: 40%; font-size: 13px; }
.conversa { display: flex; flex-direction: column; gap: 6px; }
.balao { max-width: 85%; padding: 8px 11px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; font-size: 14px; }
.balao.in { align-self: flex-start; background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.balao.out { align-self: flex-end; background: #dcf3e4; border-bottom-right-radius: 4px; }
.balao .hora { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; text-align: right; }
.tempo { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.tempo li { padding: 4px 0 10px 14px; position: relative; font-size: 14px; }
.tempo li::before { content: ""; position: absolute; left: -6px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--amber); }
.tempo .quando { color: var(--muted); font-size: 12px; }
.menu { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--white); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.menu a { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 8px 2px; font-size: 12px; color: var(--muted); text-decoration: none; }
.menu a span { font-size: 19px; }
.menu a.ativa { color: var(--navy); font-weight: 700; }
form.acesso { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 20px; max-width: 380px; margin: 30px auto; display: flex; flex-direction: column; gap: 10px; }
form.acesso label { font-size: 13px; color: var(--muted); }
input, textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; width: 100%; }
.botao { background: var(--amber); color: var(--navy); border: 0; border-radius: 10px; padding: 11px 14px; font: inherit; font-weight: 700; cursor: pointer; }
.botao.sec { background: var(--white); border: 1px solid var(--line); font-weight: 600; }
.link { background: none; border: 0; color: var(--navy2); text-decoration: underline; font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.aviso { padding: 10px 12px; border-radius: 10px; background: #fff8e1; border: 1px solid #f5d97a; font-size: 14px; }
.erro { padding: 10px 12px; border-radius: 10px; background: #fdeceb; color: var(--red); font-size: 14px; }
.vazio { color: var(--muted); text-align: center; padding: 30px 0; }
.voltar { display: inline-block; margin-bottom: 8px; color: var(--navy2); text-decoration: none; font-size: 14px; }
.acoes { display: flex; gap: 8px; margin-top: 8px; }
