/* Locatur Frota - app do motorista e da manutenção (PWA). Cores do logo: azul-marinho e dourado, fonte Outfit. */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&display=swap");
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/all.min.css");

:root {
  --ciano: #d6b05e;   /* dourado do logo */
  --preto: #0d2d5e;   /* azul-marinho do logo */
  --suave: rgb(242, 242, 242);
  --linha: rgba(0, 0, 0, 0.12);
  --texto: rgba(0, 0, 0, 0.6);
  --verde: rgb(22, 163, 74);
  --amarelo: rgb(234, 179, 8);
  --laranja: rgb(234, 88, 12);
  --vermelho: rgb(220, 38, 38);
  --raio: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--preto);
  background: var(--suave);
  min-height: 100%;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--suave);
  padding-bottom: calc(30px + env(safe-area-inset-bottom));
}

/* topo */
.app-topo {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 18px 14px;
  background: var(--preto);
  color: #fff;
}
.app-topo .app-logo {
  font-size: 20px;
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
}
.app-topo .app-logo span { font-weight: 300; color: var(--ciano); }
/* logo da Locatur numa placa branca (o "Frota" do logo é branco) */
.app-placa {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 10px;
  background: #fff;
}
.app-placa img { display: block; height: 30px; width: auto; }
.app-topo .app-logo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.app-topo .app-modo {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ciano);
}
.app-topo .app-voltar,
.app-topo .app-icone {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}
.app-online {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}
.app-online.off { background: var(--amarelo); color: var(--preto); }

.app-corpo { padding: 18px; }
.app-ola { margin: 6px 2px 18px; }
.app-ola h1 { font-size: 26px; font-weight: 500; line-height: 1.15; }
.app-ola p { color: var(--texto); margin-top: 4px; }
.app-titulo { font-size: 24px; font-weight: 500; margin: 4px 2px 18px; }
.app-rotulo {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.5);
  margin: 0 2px 8px;
}

/* cartões */
.app-cartao {
  background: #fff;
  border-radius: var(--raio);
  padding: 18px;
  margin-bottom: 14px;
}
.app-cartao.escuro { background: var(--preto); color: #fff; }
.app-cartao.escuro .app-rotulo { color: rgba(255, 255, 255, 0.5); }
.app-cartao h2 { font-size: 20px; font-weight: 500; margin-bottom: 4px; }
.app-cartao .sub { color: var(--texto); font-size: 14px; }
.app-cartao.escuro .sub { color: rgba(255, 255, 255, 0.6); }
.app-linha { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--linha); font-size: 15px; }
.app-linha:last-child { border-bottom: none; }
.app-linha span { color: var(--texto); }
.app-cartao.escuro .app-linha { border-bottom-color: rgba(255, 255, 255, 0.1); }
.app-cartao.escuro .app-linha span { color: rgba(255, 255, 255, 0.55); }

/* avisos */
.app-aviso {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 14px;
  background: #fff;
  border-left: 5px solid var(--amarelo);
  font-size: 15px;
}
.app-aviso i { margin-top: 3px; }
.app-aviso.vermelho { border-left-color: var(--vermelho); }
.app-aviso.vermelho i { color: var(--vermelho); }
.app-aviso.ok { border-left-color: var(--verde); }
.app-aviso.ok i { color: var(--verde); }
.app-aviso.ciano { border-left-color: var(--ciano); }

/* botões */
.app-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 0 20px;
  border-radius: 58px;
  border: none;
  background: var(--ciano);
  color: var(--preto);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.1s;
}
.app-btn:active { transform: scale(0.98); }
.app-btn.preto { background: var(--preto); color: var(--ciano); }
.app-btn.claro { background: #fff; color: var(--preto); border: 1px solid var(--linha); }
.app-btn.perigo { background: var(--vermelho); color: #fff; }
.app-btn.pequeno { min-height: 44px; font-size: 13px; }
.app-btn[disabled] { opacity: 0.5; }
.app-btns { display: grid; gap: 10px; }
.app-btns.dois { grid-template-columns: 1fr 1fr; }

/* grade de ações */
.app-grade {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.app-acao {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px;
  min-height: 120px;
  border-radius: var(--raio);
  background: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  position: relative;
}
.app-acao i {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--preto);
  color: var(--ciano);
  font-size: 18px;
}
.app-acao small { display: block; font-weight: 400; font-size: 13px; color: var(--texto); margin-top: 2px; }
.app-acao .conta {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 26px;
  background: var(--vermelho);
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-acao:active { transform: scale(0.98); }

/* formulários */
.app-campo { margin-bottom: 18px; }
.app-campo label, .app-campo .app-rotulo { display: block; font-size: 12px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(0, 0, 0, 0.6); margin-bottom: 8px; }
.app-campo input,
.app-campo select,
.app-campo textarea {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid var(--linha);
  border-radius: 14px;
  background: #fff;
  font-size: 18px;
  color: var(--preto);
  -webkit-appearance: none;
  appearance: none;
}
.app-campo select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.app-campo textarea { padding: 14px 16px; min-height: 110px; resize: vertical; font-size: 17px; }
.app-campo input:focus,
.app-campo select:focus,
.app-campo textarea:focus { outline: none; border-color: var(--preto); box-shadow: 0 0 0 3px var(--ciano); }
.app-campo .ajuda { display: block; font-size: 13px; color: var(--texto); margin-top: 6px; }
.app-campo-grande input { font-size: 30px; font-weight: 500; min-height: 70px; text-align: center; letter-spacing: 1px; }
.app-duas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* opções em botão (radio) */
.app-opcoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.app-opcoes.tres { grid-template-columns: 1fr 1fr 1fr; }
.app-opcao { position: relative; }
.app-opcao input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.app-opcao span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 76px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--linha);
  background: #fff;
  font-weight: 500;
  text-align: center;
  font-size: 15px;
}
.app-opcao span i { font-size: 20px; }
.app-opcao input:checked + span { background: var(--preto); border-color: var(--preto); color: var(--ciano); }

/* checklist */
.app-check { background: #fff; border-radius: var(--raio); padding: 6px 16px; margin-bottom: 18px; }
.app-check-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--linha); }
.app-check-item:last-child { border-bottom: none; }
.app-check-item b { font-weight: 500; font-size: 15px; }
.app-check-sn { display: flex; gap: 6px; flex-shrink: 0; }
.app-check-sn label { position: relative; }
.app-check-sn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.app-check-sn span { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 40px; padding: 0 12px; border-radius: 40px; border: 1px solid var(--linha); font-size: 13px; font-weight: 500; }
.app-check-sn input[value=ok]:checked + span { background: var(--verde); border-color: var(--verde); color: #fff; }
.app-check-sn input[value=problema]:checked + span { background: var(--vermelho); border-color: var(--vermelho); color: #fff; }

/* foto */
.app-foto { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 76px; border: 2px dashed var(--linha); border-radius: 14px; background: #fff; font-weight: 500; color: rgba(0, 0, 0, 0.6); overflow: hidden; }
.app-foto input { position: absolute; inset: 0; opacity: 0; }
.app-foto img { max-height: 140px; border-radius: 10px; }
.app-foto.tem { border-style: solid; border-color: var(--verde); }

/* listas */
.app-lista { background: #fff; border-radius: var(--raio); overflow: hidden; margin-bottom: 14px; }
.app-item { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--linha); }
.app-item:last-child { border-bottom: none; }
.app-item .ic { width: 40px; height: 40px; border-radius: 50%; background: var(--suave); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.app-item .tx { flex: 1; min-width: 0; }
.app-item .tx b { display: block; font-weight: 500; font-size: 15px; }
.app-item .tx small { color: var(--texto); font-size: 13px; }
.app-item .vl { font-weight: 500; white-space: nowrap; font-size: 14px; }
.app-item.laranja { box-shadow: inset 4px 0 0 var(--laranja); }
.app-item.vermelho { box-shadow: inset 4px 0 0 var(--vermelho); }

.selo { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 24px; font-size: 11px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; background: var(--suave); }
.selo.ciano { background: var(--ciano); }
.selo.laranja { background: rgba(234, 88, 12, 0.12); color: var(--laranja); }
.selo.verde { background: rgba(22, 163, 74, 0.12); color: var(--verde); }
.placa { display: inline-block; border: 1.5px solid var(--preto); border-radius: 5px; padding: 0 6px; font-weight: 600; letter-spacing: 1px; font-size: 13px; background: #fff; color: var(--preto); }

/* mensagem ao enviar */
.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 50;
  width: calc(100% - 32px);
  max-width: 520px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--preto);
  color: #fff;
  font-size: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.app-toast i { color: var(--ciano); margin-top: 3px; }
.app-toast.erro i { color: #f87171; }

/* login */
.app-login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--preto); color: #fff; }
/* telas largas (computador/tablet): o app fica centralizado, com fundo azul em volta */
@media screen and (min-width: 600px) {
  html, body { background: var(--preto); }
  .app { box-shadow: 0 0 60px rgba(0, 0, 0, 0.25); }
  .app-login { max-width: 520px; margin: 0 auto; box-shadow: 0 0 60px rgba(0, 0, 0, 0.25); }
}
.app-login-topo { padding: calc(40px + env(safe-area-inset-top)) 26px 30px; text-align: center; }
.app-placa-grande { padding: 10px 16px; border-radius: 14px; margin: 0 auto 26px; }
.app-placa-grande img { height: 64px; }
.app-login-topo h1 { font-size: 30px; font-weight: 500; line-height: 1.15; }
.app-login-topo h1 span { color: var(--ciano); }
.app-login-topo p { color: rgba(255, 255, 255, 0.6); margin-top: 8px; }
.app-login-form { flex: 1; background: var(--suave); color: var(--preto); border-radius: 26px 26px 0 0; padding: 30px 22px calc(30px + env(safe-area-inset-bottom)); }

.app-fila { font-size: 13px; }
.oculto { display: none !important; }

/* leitor de QR code */
.app-leitor { position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 62vh; border-radius: 20px; overflow: hidden; background: #000; margin-bottom: 14px; }
.app-leitor video { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-mira { position: absolute; inset: 18% 14%; border: 3px solid var(--ciano); border-radius: 22px; box-shadow: 0 0 0 9999px rgba(13, 45, 94, 0.45); }
.app-leitor-msg { text-align: center; margin: 4px 0 16px; color: var(--texto); }
.app-leitor-msg.erro { color: var(--vermelho); font-weight: 500; }
.app-btns.dois .app-btn { font-size: 15px; }

/* aviso embaixo do Registrar saída: a chegada é registrada no mesmo lugar */
.app-dica-saida { margin: 0 4px 16px; font-size: 13px; line-height: 1.5; color: rgba(13, 45, 94, 0.7); text-align: center; }
.app-dica-saida i { color: #d6b05e; margin-right: 4px; }

/* escolhas por toque (sem digitar): pílulas que marcam com um toque */
.app-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.app-chip { position: relative; }
.app-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.app-chip span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 24px; border: 1px solid rgba(13, 45, 94, 0.18); background: #fff; color: var(--preto); font-size: 15px; line-height: 1.25; cursor: pointer; transition: 0.15s; }
.app-chip input[type=checkbox] + span:before { content: ""; width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid rgba(13, 45, 94, 0.35); flex-shrink: 0; }
.app-chip input:checked + span { background: var(--preto); border-color: var(--preto); color: var(--ciano); }
.app-chip input[type=checkbox]:checked + span:before { background: var(--ciano); border-color: var(--ciano); box-shadow: inset 0 0 0 3px var(--preto); }
.app-chip input:focus-visible + span { outline: 2px solid var(--ciano); outline-offset: 2px; }
.app-rotulo small { text-transform: none; letter-spacing: 0; font-weight: 400; opacity: 0.75; }
.app-tipos-problema .app-opcao span { min-height: 78px; }
.app-problema-itens { animation: app-aparece 0.2s ease; }
@keyframes app-aparece { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* bonificação */
.app-bonus { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 14px; background: #fff; border-radius: var(--raio); box-shadow: inset 4px 0 0 var(--ciano); }
.app-bonus .ic { width: 40px; height: 40px; border-radius: 50%; background: var(--preto); color: var(--ciano); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.app-bonus .tx { flex: 1; min-width: 0; }
.app-bonus .tx b { display: block; font-weight: 500; font-size: 15px; }
.app-bonus .tx small { color: var(--texto); font-size: 13px; }
.app-bonus .vl { font-weight: 600; white-space: nowrap; font-size: 15px; }
.app-cartao h2.app-bonus-valor { font-size: 34px; color: var(--ciano); margin: 2px 0 6px; }
.app-bonus-numeros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.app-bonus-numeros div { background: rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 10px 8px; text-align: center; }
.app-bonus-numeros b { display: block; font-size: 22px; font-weight: 500; line-height: 1.1; }
.app-bonus-numeros span { display: block; margin-top: 4px; font-size: 11px; color: rgba(255, 255, 255, 0.6); }
.app-etapa .ic { color: rgba(0, 0, 0, 0.3); }
.app-etapa.ok .ic { background: rgba(22, 163, 74, 0.12); color: var(--verde); }
.app-etapa.erro .ic { background: rgba(220, 38, 38, 0.12); color: var(--vermelho); }
.app-etapa.espera .ic { background: rgba(214, 176, 94, 0.25); color: var(--preto); }
.app-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 14px; background: #fff; border-radius: var(--raio) var(--raio) 0 0; }
.app-cal-sem { text-align: center; font-size: 11px; font-weight: 500; color: var(--texto); }
.app-cal-dia { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 10px; font-size: 14px; background: var(--suave); color: rgba(0, 0, 0, 0.45); }
.app-cal-dia.app-cal-ok { background: var(--verde); color: #fff; }
.app-cal-dia.app-cal-falha { background: var(--vermelho); color: #fff; }
.app-cal-dia.app-cal-abonado { background: var(--ciano); color: var(--preto); }
.app-cal-dia.app-cal-pendente { background: #fff; color: var(--preto); box-shadow: inset 0 0 0 2px var(--preto); }
.app-cal-dia.app-cal-hoje { font-weight: 600; outline: 2px solid var(--preto); outline-offset: 1px; }
.app-cal-legenda { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 0 14px 14px; margin-bottom: 14px; background: #fff; border-radius: 0 0 var(--raio) var(--raio); font-size: 12px; color: var(--texto); }
.app-cal-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.app-cal-legenda i { width: 12px; height: 12px; border-radius: 4px; }
.app-cal-legenda i.app-cal-ok { background: var(--verde); }
.app-cal-legenda i.app-cal-falha { background: var(--vermelho); }
.app-cal-legenda i.app-cal-abonado { background: var(--ciano); }
.app-cal-legenda i.app-cal-pendente { background: #fff; box-shadow: inset 0 0 0 2px var(--preto); }
