* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f4f6fb;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  color: #1e293b;
}

/* Coluna em largura de celular, centralizada — igual ao projeto original (sem sombra, mesma cor do fundo) */
.app {
  width: 100%;
  max-width: 390px;
  min-height: 100vh;
  background: #f4f6fb;
  display: flex;
  flex-direction: column;
}

.header {
  background: #fff;
  padding: 16px 20px;
  border-bottom: 1px solid #e8edf5;
  display: flex;
  align-items: center;
  gap: 10px;
}
.header .logo { width: 27px; height: 27px; color: #1e3a8a; }
.header b { font-size: 21px; font-weight: 800; color: #1e3a8a; letter-spacing: -0.3px; }

.content { flex: 1; padding: 30px 20px 26px; display: flex; flex-direction: column; }

.backlink {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: #64748b; text-decoration: none; margin-bottom: 16px;
}
.backlink svg { width: 16px; height: 16px; }

.title { font-size: 24px; font-weight: 800; text-align: center; margin-bottom: 8px; }
.subtitle { font-size: 14px; color: #64748b; text-align: center; line-height: 1.55; max-width: 300px; margin: 0 auto 26px; }

.cards { display: flex; flex-direction: column; gap: 14px; }

.card {
  display: block; background: #fff; border-radius: 16px; padding: 20px;
  border: 1.5px solid #e2e8f0; text-decoration: none; color: inherit;
  position: relative; transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.09); transform: translateY(-1px); }
.card.moto { border-top: 4px solid #f97316; }

.badge {
  position: absolute; top: 16px; right: 16px; font-size: 10px; font-weight: 700;
  color: #0c447c; background: #e6f1fb; padding: 3px 9px; border-radius: 20px;
}
.cico { width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.cico svg { width: 30px; height: 30px; }
.cico .emoji { font-size: 30px; line-height: 1; }
.card h2 { font-size: 18px; font-weight: 800; margin-bottom: 5px; }
.card p { font-size: 13px; color: #64748b; line-height: 1.5; margin-bottom: 14px; }
.clink { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.clink svg { width: 17px; height: 17px; }

.footer { display: flex; justify-content: space-around; padding: 12px 0 16px; background: #fff; border-top: 1px solid #e2e8f0; }
.footer a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: #64748b; text-decoration: none; }
.footer svg { width: 20px; height: 20px; }

/* ── Download do motoboy ── */
.hero { background: #1e3a8a; border-radius: 16px; padding: 24px 20px; text-align: center; margin-bottom: 16px; }
.heroico { width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.heroico svg { width: 30px; height: 30px; color: #fff; }
.heroico .emoji { font-size: 30px; line-height: 1; }
.hero h2 { font-size: 19px; font-weight: 800; color: #fff; margin-bottom: 6px; }
.hero p { font-size: 13px; color: #b5d4f4; line-height: 1.5; max-width: 300px; margin: 0 auto 18px; }
.dlbtn { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: #1e40af; font-size: 15px; font-weight: 800; padding: 12px 22px; border-radius: 12px; text-decoration: none; }
.dlbtn svg { width: 20px; height: 20px; }
.heronote { font-size: 11px; color: #85b7eb; margin-top: 10px; }

.steprow { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; justify-content: center; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 18px; }
.steps { flex: 1; min-width: 175px; display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; align-items: center; gap: 10px; }
.stepn { width: 26px; height: 26px; border-radius: 50%; background: #eff4ff; color: #1e40af; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; }
.step span { font-size: 13px; color: #334155; line-height: 1.35; }
.qrwrap { text-align: center; flex: none; }
#qr { display: inline-block; padding: 8px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; line-height: 0; }
#qr img, #qr canvas { display: block; }
.qrcap { font-size: 10px; color: #64748b; margin-top: 6px; max-width: 130px; line-height: 1.3; }

.foot { font-size: 12px; color: #64748b; text-align: center; margin-top: 16px; line-height: 1.4; }

/* ───────── Painel da empresa (auth + shell) ───────── */
.hide { display: none !important; }

/* spinner de carregamento inicial */
.spin { width: 34px; height: 34px; border: 3px solid #dbe3f0; border-top-color: #1e40af; border-radius: 50%; animation: sp .8s linear infinite; margin: 70px auto; }
@keyframes sp { to { transform: rotate(360deg); } }

/* formulários */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: #475569; margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 13px 14px; font-size: 15px; font-family: inherit;
  border: 1.5px solid #e2e8f0; border-radius: 12px; background: #fff; color: #1e293b;
  outline: none; transition: border-color .15s;
}
.field input:focus, .field select:focus { border-color: #1e40af; }
.field input::placeholder { color: #94a3b8; }
.field input.bad, .field select.bad { border-color: #e3a0a0; background: #fdf6f6; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
.fielderr { font-size: 12px; color: #b42318; margin-top: 5px; }
.pininput { letter-spacing: 6px; font-weight: 700; }
.codeinput { letter-spacing: 10px; text-align: center; font-size: 22px; font-weight: 800; }

.btn {
  width: 100%; padding: 14px; font-size: 15.5px; font-weight: 800; font-family: inherit;
  border: none; border-radius: 12px; background: #1e40af; color: #fff; cursor: pointer;
  transition: opacity .15s, background .15s;
}
.btn:hover { background: #1b3aa0; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.sec { background: #fff; color: #1e40af; border: 1.5px solid #cdd9ef; }
.btn.sec:hover { background: #f3f6fd; }
.btn + .btn { margin-top: 10px; }

.linkrow { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; gap: 10px; }
.tlink { background: none; border: none; font-size: 13px; font-weight: 700; color: #1e40af; cursor: pointer; font-family: inherit; padding: 0; text-decoration: none; }
.tlink.muted { color: #64748b; }
.tlink:disabled { color: #94a3b8; cursor: default; }

.msg { font-size: 13px; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; line-height: 1.45; }
.msg.err { background: #fdecec; color: #b42318; }
.msg.ok { background: #e7f6ec; color: #147a3d; }

.hint { font-size: 12.5px; color: #64748b; line-height: 1.55; margin-bottom: 18px; }
.hint b { color: #334155; }

/* telas de "estado" (análise / erro) centralizadas com ícone */
.gate { text-align: center; padding: 18px 4px; }
.gate .gico { width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 10px auto 18px; }
.gate .gico svg { width: 34px; height: 34px; }
.gate h2 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.gate p { font-size: 14px; color: #64748b; line-height: 1.55; max-width: 300px; margin: 0 auto 22px; }

/* cartão do usuário logado (header da home) */
.usercard { background: #fff; border: 1.5px solid #e2e8f0; border-radius: 14px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.usercard .av { width: 44px; height: 44px; border-radius: 50%; background: #eff4ff; color: #1e3a8a; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex: none; }
.usercard .nm { font-size: 15px; font-weight: 800; line-height: 1.2; }
.usercard .sub { font-size: 12px; color: #64748b; margin-top: 2px; }

/* botão sair no header */
.hsair { margin-left: auto; background: none; border: none; cursor: pointer; color: #64748b; display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; font-family: inherit; }
.hsair svg { width: 17px; height: 17px; }

/* cards "em breve" da home (fatias futuras) */
.tag-soon { position: absolute; top: 16px; right: 16px; font-size: 10px; font-weight: 700; color: #92600e; background: #fdf0d5; padding: 3px 9px; border-radius: 20px; }
.card.soon { opacity: .85; }
.card.soon:hover { box-shadow: none; transform: none; }

/* ── menu inferior (navigation bar) ── */
.botnav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 390px; background: #fff; border-top: 1px solid #e2e8f0;
  display: flex; z-index: 50;
}
.navit {
  flex: 1; background: none; border: none; cursor: pointer; font-family: inherit;
  padding: 8px 2px 10px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: #94a3b8; font-size: 11px; font-weight: 700;
}
.navit .ic { font-size: 19px; line-height: 1; filter: grayscale(.4); opacity: .75; }
.navit.on { color: #1e40af; }
.navit.on .ic { filter: none; opacity: 1; }
/* reserva espaço pro menu fixo não cobrir o conteúdo */
body.comnav .content { padding-bottom: 80px; }

/* ── cartões de seção (configurações) ── */
.seccard { background: #fff; border: 1.5px solid #e2e8f0; border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.seclabel { font-size: 11px; font-weight: 800; color: #64748b; letter-spacing: .4px; margin-bottom: 12px; }

/* ── faixa "nova versão disponível" (auto-update ativo) ── */
.upbar {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 24px); max-width: 366px;
  background: #1e40af; color: #fff; border-radius: 12px;
  padding: 10px 12px 10px 16px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 10px 28px rgba(30,58,138,.38); z-index: 9999;
  font-size: 13.5px; font-weight: 700; animation: upin .25s ease;
}
.upbar span { flex: 1; line-height: 1.3; }
.upbar button {
  background: #fff; color: #1e40af; border: none; border-radius: 9px;
  padding: 8px 14px; font-size: 13px; font-weight: 800; cursor: pointer;
  font-family: inherit; flex: none;
}
@keyframes upin { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
