:root {
  --marca: #2553e6;
  --fundo: #f5f6f8;
  --cartao: #ffffff;
  --texto: #111827;
  --texto2: #5b6474;
  --borda: #e3e6eb;
  --ok: #16a34a;
  --aviso: #d97706;
  --problema: #dc2626;
  --neutro: #94a3b8;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
}
body {
  font:
    15px/1.4 system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  background: var(--fundo);
  color: var(--texto);
}
[hidden] {
  display: none !important;
}
button,
input,
select {
  font: inherit;
}
button {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  background: var(--marca);
  color: #fff;
  font-weight: 700;
}
button.secundario {
  background: transparent;
  color: var(--texto2);
  border: 1px solid var(--borda);
}
button:disabled {
  opacity: 0.6;
  cursor: default;
}
input,
select {
  border: 1px solid var(--borda);
  border-radius: 10px;
  padding: 9px 12px;
  background: #fff;
  color: var(--texto);
}
.marca {
  font-weight: 800;
  font-size: 20px;
  color: var(--marca);
}
.marca span {
  color: var(--texto);
  font-weight: 600;
}
.marca {
  display: flex;
  align-items: center;
  gap: 10px;
}
.marca span {
  border-left: 1px solid var(--borda);
  padding-left: 10px;
  font-size: 17px;
}
.logo-topo {
  height: 40px;
  width: auto;
  display: block;
}
.logo-login {
  width: 200px;
  max-width: 70%;
  height: auto;
  justify-self: center;
  margin-bottom: 8px;
}
.erro {
  color: var(--problema);
  min-height: 1.4em;
  margin: 0;
}

/* Login */
.login {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 16px;
}
.cartao-login {
  width: 100%;
  max-width: 360px;
  background: var(--cartao);
  border-radius: 16px;
  padding: 28px;
  display: grid;
  gap: 16px;
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.08);
}
.cartao-login label {
  display: grid;
  gap: 6px;
  color: var(--texto2);
  font-weight: 600;
}

/* Painel */
.painel {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: var(--cartao);
  border-bottom: 1px solid var(--borda);
}
.controles {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.corpo {
  flex: 1;
  display: flex;
  min-height: 0;
}
.lateral {
  width: 380px;
  max-width: 100%;
  overflow-y: auto;
  border-right: 1px solid var(--borda);
  background: var(--fundo);
}
.mapa {
  flex: 1;
  min-height: 300px;
}
.lista {
  display: grid;
  gap: 8px;
  padding: 12px;
}
.vazio {
  color: var(--texto2);
  padding: 24px 12px;
  text-align: center;
}

.motorista {
  background: var(--cartao);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  border: 2px solid transparent;
  display: grid;
  gap: 6px;
  text-align: left;
  color: var(--texto);
  font-weight: 400;
}
.motorista.ativo {
  border-color: var(--marca);
}
.motorista .linha {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.motorista .nome {
  font-weight: 800;
}
.motorista .info {
  color: var(--texto2);
  font-size: 13px;
}
.barra {
  height: 6px;
  border-radius: 3px;
  background: var(--borda);
  overflow: hidden;
  display: flex;
}
.barra i {
  display: block;
  height: 100%;
}
.selo {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.selo.ok {
  background: #dcfce7;
  color: #166534;
}
.selo.aviso {
  background: #fef3c7;
  color: #92400e;
}
.selo.neutro {
  background: #eef0f3;
  color: var(--texto2);
}

.detalhe {
  padding: 0 12px 16px;
  display: grid;
  gap: 10px;
}
.detalhe h2 {
  font-size: 17px;
  margin: 8px 0 0;
}
.km {
  background: var(--cartao);
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}
.km .total {
  font-size: 22px;
  font-weight: 800;
}
.km .partes {
  color: var(--texto2);
  font-size: 13px;
}
.entregas {
  display: grid;
  gap: 6px;
}
.entrega {
  background: var(--cartao);
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 10px;
  align-items: center;
  cursor: pointer;
}
.entrega .num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
}
.entrega .end {
  color: var(--texto2);
  font-size: 13px;
}

.pino {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.35);
}
.pino-motorista {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--marca);
  color: #fff;
  border: 3px solid #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.4);
}
.pino-motorista.parado {
  background: var(--neutro);
}
.pino-casa {
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.4));
}

@media (max-width: 760px) {
  .corpo {
    flex-direction: column-reverse;
  }
  .lateral {
    width: 100%;
    border-right: 0;
    flex: 1;
  }
  .mapa {
    flex: none;
    height: 45vh;
  }
  .topo {
    padding: 10px 16px;
  }
}
