/*
  Gestão Quantum — base visual
  Cores, tipografia e componentes usados em todas as telas.
  Azul = Frota / Checklist. Laranja = Munck. Vermelho = não conformidade. Verde = positivo.
*/

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fontes/poppins-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fontes/poppins-latin-700-normal.woff2") format("woff2");
}

:root {
  /* Marca */
  --marinho-950: #041431;
  --marinho-900: #071d45;
  --marinho-800: #0a2b63;
  --marinho-700: #0d3a85;
  --azul-600: #0b5bd3;
  --azul-700: #084ab0;
  --azul-100: #e2ecfd;
  --azul-050: #f1f6ff;
  --laranja-600: #f85a05;
  --laranja-700: #d94a00;
  --laranja-100: #ffe7d8;

  /* Neutros puxados para o azul da marca */
  --fundo: #f2f5fa;
  --superficie: #ffffff;
  --texto: #0c1f4a;
  --texto-suave: #4f5d7a;
  --texto-fraco: #7684a0;
  --borda: #d7dfec;
  --borda-forte: #b9c5d9;

  /* Estados */
  --verde-700: #0f6b3f;
  --verde-100: #dcf3e6;
  --vermelho-700: #b42318;
  --vermelho-100: #fde3e0;
  --ambar-800: #8a5200;
  --ambar-100: #fdeecd;

  --fonte-titulo: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --fonte-texto: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  --raio-p: 8px;
  --raio-m: 12px;
  --raio-g: 20px;
  --sombra-cartao: 0 1px 2px rgba(7, 29, 69, 0.06), 0 12px 32px -12px rgba(7, 29, 69, 0.18);
  --foco: 0 0 0 3px rgba(11, 91, 211, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--fundo);
  color: var(--texto);
  font-family: var(--fonte-texto);
  font-size: 16px;
  line-height: 1.5;
}

/* A página protegida só aparece depois de a sessão ser conferida. */
html.aguardando body {
  visibility: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--fonte-titulo);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--texto);
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--azul-600);
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: none;
  box-shadow: var(--foco);
}

[hidden] {
  display: none !important;
}

.so-leitor {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Botões ---------- */

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--raio-p);
  background: var(--superficie);
  color: var(--texto);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.botao svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Botão principal das telas de celular (fazer checklist, solicitar veículo) */
.botao--grande {
  min-height: 56px;
  font-size: 17px;
}

.botao--grande svg {
  width: 22px;
  height: 22px;
}

.botao:disabled,
.botao[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.botao--primario {
  background: var(--azul-600);
  color: #fff;
}
.botao--primario:hover:not(:disabled) {
  background: var(--azul-700);
}

.botao--laranja {
  background: var(--laranja-600);
  color: #fff;
}
.botao--laranja:hover:not(:disabled) {
  background: var(--laranja-700);
}

.botao--contorno {
  border-color: var(--borda-forte);
  background: var(--superficie);
}
.botao--contorno:hover:not(:disabled) {
  background: var(--azul-050);
  border-color: var(--azul-600);
}

.botao--perigo {
  border-color: #e7b3ad;
  background: var(--superficie);
  color: var(--vermelho-700);
}
.botao--perigo:hover:not(:disabled) {
  background: var(--vermelho-100);
}

.botao--perigo-cheio {
  background: var(--vermelho-700);
  color: #fff;
}

.botao--texto {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--azul-600);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  border-radius: 4px;
}

.botao--largo {
  width: 100%;
}

/* ---------- Campos ---------- */

.campo {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.campo > label {
  font-size: 14px;
  font-weight: 600;
  color: var(--texto);
}

.campo__ajuda {
  font-size: 13px;
  color: var(--texto-suave);
}

/* Caixa de marcar com o texto ao lado */
.marcar {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--texto);
  font-size: 15px;
  cursor: pointer;
}

.marcar input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--azul-600);
}

.entrada {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--borda-forte);
  border-radius: var(--raio-p);
  background: var(--superficie);
  color: var(--texto);
  font-size: 16px;
}

.entrada::placeholder {
  color: var(--texto-fraco);
}

.entrada:hover {
  border-color: #8fa0bd;
}

.entrada:focus-visible {
  border-color: var(--azul-600);
}

.entrada:disabled {
  background: #eef1f6;
  color: var(--texto-suave);
}

.entrada[aria-invalid="true"] {
  border-color: var(--vermelho-700);
}

textarea.entrada {
  min-height: 92px;
  padding: 10px 14px;
  line-height: 1.45;
  resize: vertical;
}

.entrada-com-botao {
  position: relative;
}
.entrada-com-botao .entrada {
  padding-right: 92px;
}
.entrada-com-botao button {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--azul-600);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- Avisos ---------- */

.aviso {
  padding: 12px 14px;
  border-radius: var(--raio-p);
  border: 1px solid var(--borda);
  background: var(--azul-050);
  color: var(--texto);
  font-size: 14.5px;
  line-height: 1.45;
}

.aviso--erro {
  border-color: #efb8b2;
  background: var(--vermelho-100);
  color: #7a1a12;
}

.aviso--ok {
  border-color: #a9dcc0;
  background: var(--verde-100);
  color: #0b4d2d;
}

.aviso--atencao {
  border-color: #efd08e;
  background: var(--ambar-100);
  color: #5f3900;
}

/* Placa de veículo: letras e números com a mesma largura, para ler de relance.
   Fica aqui porque aparece em todas as telas (o sino do topo mostra placas). */
.placa {
  font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
  font-size: 1.04em;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--marinho-800);
}

/* ---------- Etiquetas ---------- */

.etiqueta {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--azul-100);
  color: var(--marinho-800);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.etiqueta--master {
  background: var(--marinho-900);
  color: #fff;
}
.etiqueta--gerente {
  background: var(--marinho-700);
  color: #fff;
}
.etiqueta--munck {
  background: var(--laranja-100);
  color: #8a2f00;
}
.etiqueta--ok {
  background: var(--verde-100);
  color: var(--verde-700);
}
.etiqueta--atencao {
  background: var(--ambar-100);
  color: var(--ambar-800);
}
.etiqueta--erro {
  background: var(--vermelho-100);
  color: var(--vermelho-700);
}
.etiqueta--neutra {
  background: #e9edf3;
  color: var(--texto-suave);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
