* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.4 system-ui, sans-serif; color: #1d2433; background: #f4f6fa; }
[hidden] { display: none !important; }
button { cursor: pointer; border: 0; border-radius: 6px; padding: 8px 12px; background: #1f6feb; color: #fff; font: inherit; }
button.secundario { background: #e3e8f0; color: #1d2433; }
button.link { background: none; color: #1f6feb; padding: 0; }
button:disabled { opacity: .5; cursor: default; }
input, select { font: inherit; padding: 7px; border: 1px solid #c8d0dc; border-radius: 6px; width: 100%; }

.login { display: grid; place-items: center; height: 100vh; }
.login form { background: #fff; padding: 32px; border-radius: 12px; width: 320px; display: grid; gap: 12px; box-shadow: 0 4px 24px #0001; }
.login h1 { margin: 0 0 8px; font-size: 22px; }
.erro { color: #c62828; margin: 0; min-height: 1em; }

.app { display: grid; grid-template-columns: 320px 1fr; height: 100vh; }
aside { background: #fff; border-right: 1px solid #e3e8f0; padding: 16px; overflow-y: auto; }
aside header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
h2 { font-size: 15px; margin: 18px 0 8px; }
h3 { font-size: 13px; margin: 18px 0 6px; text-transform: uppercase; color: #5b6578; letter-spacing: .04em; }
.demo { background: #fff4d6; padding: 6px 8px; border-radius: 6px; font-size: 12px; }

#lista-veiculos { list-style: none; padding: 0; margin: 0; }
#lista-veiculos li { padding: 8px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
#lista-veiculos li:hover { background: #f0f4fa; }
#lista-veiculos li.ativo { background: #e2ecff; }
.bolinha { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; background: #9aa3b2; }
.bolinha.on { background: #2e9d4f; } .bolinha.off { background: #d14343; } .bolinha.antiga { background: #e0a100; }
.mini { font-size: 12px; color: #5b6578; white-space: nowrap; }

dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; }
dt { color: #5b6578; } dd { margin: 0; }
.aviso { color: #a66b00; font-weight: 600; }
label { display: block; margin-bottom: 6px; font-size: 12px; color: #5b6578; }
.linha { display: flex; gap: 8px; margin-top: 6px; }
.status { font-size: 12px; color: #5b6578; min-height: 1em; }
small { color: #5b6578; font-size: 11px; }

main { position: relative; }
#mapa { position: absolute; inset: 0; }
#video-box { position: absolute; right: 16px; bottom: 16px; width: 420px; background: #111; border-radius: 10px; overflow: hidden; z-index: 1000; box-shadow: 0 6px 28px #0005; }
.video-topo { display: flex; justify-content: space-between; align-items: center; color: #fff; padding: 6px 10px; font-size: 13px; }
.video-topo button { padding: 4px 8px; background: #333; }
video { width: 100%; display: block; background: #000; aspect-ratio: 16/9; }

@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 45vh 55vh; }
  aside { order: 2; } #video-box { width: calc(100% - 32px); }
}
