@font-face { font-family: "Saira"; src: url("/static/fontes/Saira-400.ttf"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Saira"; src: url("/static/fontes/Saira-500.ttf"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Saira"; src: url("/static/fontes/Saira-600.ttf"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Saira"; src: url("/static/fontes/Saira-700.ttf"); font-weight: 700; font-display: swap; }

:root {
  --bg: #F6F9F7; --card: #FFFFFF; --soft: #EEF4F0; --field: #CCDCD2; --ink: #27363F; --muted: #4F5F68; --line: #D3DFD7;
  --moss: #3B5F47; --moss-2: #2F4D3A; --sage: #76A984; --water: #4D7E94; --foot: #24323B;
  --sim: #A8322A; --sim-bg: #FBEAE7; --at: #8A5A00; --at-bg: #FFF3D6; --nao: #5E6A70; --nao-bg: #ECEFF1;
  --raio: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 "Saira", system-ui, sans-serif; }
a { color: var(--moss); }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; font-weight: 600; }
h1 { font-size: 24px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
small, .muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }

.topo { background: var(--foot); color: #fff; }
.topo .faixa { max-width: 1240px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 22px; }
.topo img { height: 34px; display: block; }
.topo nav { display: flex; gap: 4px; flex: 1; }
.topo nav button { background: none; border: 0; color: #C9D6CE; padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 500; }
.topo nav button:hover { background: rgba(255,255,255,.07); color: #fff; }
.topo nav button.ativo { background: var(--moss); color: #fff; }
.topo .quem { font-size: 13px; color: #C9D6CE; text-align: right; }
.topo .quem button { background: none; border: 0; color: #9CC4A4; cursor: pointer; padding: 0 0 0 10px; font-size: 13px; }

main { max-width: 1240px; margin: 0 auto; padding: 24px 20px 60px; }
.cartao { background: var(--card); border: 1px solid var(--line); border-radius: var(--raio); padding: 20px 22px; margin-bottom: 18px; }
.linha { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.campo { display: flex; flex-direction: column; gap: 5px; }
.campo label { font-size: 13px; font-weight: 600; color: var(--muted); }
input[type=text], input[type=password], input[type=number], input[type=search], select {
  border: 1px solid var(--field); border-radius: 8px; padding: 10px 12px; background: #fff; min-width: 0; }
input:focus, select:focus { outline: 2px solid var(--sage); outline-offset: 0; border-color: var(--sage); }
.btn { background: var(--moss); color: #fff; border: 0; border-radius: 8px; padding: 10px 18px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--moss-2); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.claro { background: var(--soft); color: var(--moss); }
.btn.claro:hover { background: #E1ECE5; }
.btn.peq { padding: 6px 12px; font-size: 13px; }
.link { background: none; border: 0; color: var(--moss); cursor: pointer; padding: 0; text-decoration: underline; font-size: 14px; }
.msg { padding: 10px 14px; border-radius: 8px; background: var(--soft); color: var(--moss); margin: 12px 0 0; }
.msg.erro { background: var(--sim-bg); color: var(--sim); }
.msg.aviso { background: var(--at-bg); color: var(--at); }
.oculto { display: none !important; }

.cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; margin-top: 14px; }
.car { border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; background: #fff; text-align: left; }
.car:hover { border-color: var(--sage); }
.car.sel { border-color: var(--moss); box-shadow: 0 0 0 2px var(--soft); }
.car .cod { font-size: 12.5px; word-break: break-all; color: var(--muted); }
.car .lin { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 4px; font-weight: 600; }

.selo { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.selo.ativo, .selo.ok { background: var(--soft); color: var(--moss); }
.selo.pendente, .selo.atencao { background: var(--at-bg); color: var(--at); }
.selo.suspenso, .selo.cancelado, .selo.sim { background: var(--sim-bg); color: var(--sim); }
.selo.outro, .selo.nao, .selo.inativo { background: var(--nao-bg); color: var(--nao); }

.mapa { height: 420px; border-radius: var(--raio); border: 1px solid var(--line); overflow: hidden; background: #3a4a44; }
.grade2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; }
@media (max-width: 900px) { .grade2 { grid-template-columns: 1fr; } .topo .faixa { flex-wrap: wrap; } }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); border-bottom: 1.5px solid var(--ink); padding: 8px; }
table.t td { border-bottom: 1px solid var(--line); padding: 9px 8px; vertical-align: top; }
table.t td.n, table.t th.n { text-align: right; white-space: nowrap; }
table.t tr.clica { cursor: pointer; }
table.t tr.clica:hover td { background: var(--soft); }
.cor { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }

.progresso { display: flex; gap: 14px; align-items: center; }
.giro { width: 26px; height: 26px; border: 3px solid var(--field); border-top-color: var(--moss); border-radius: 50%; animation: gira 0.9s linear infinite; flex: none; }
@keyframes gira { to { transform: rotate(360deg); } }

.destaques { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0; }
.destaque { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.destaque b { display: block; font-size: 22px; line-height: 1.1; }
.destaque.alerta b { color: var(--sim); } .destaque.verde b { color: var(--moss); }
.secao-res { border-top: 1px solid var(--line); padding: 12px 0; }
.secao-res > summary { cursor: pointer; display: flex; gap: 10px; align-items: center; font-weight: 600; list-style: none; }
.secao-res > summary::-webkit-details-marker { display: none; }
.secao-res > summary .dir { margin-left: auto; display: flex; gap: 8px; align-items: center; font-weight: 400; }
.item { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin: 10px 0; font-size: 14px; }
.item .nums { display: flex; gap: 22px; flex-wrap: wrap; margin: 6px 0; }
.item .nums b { display: block; font-size: 16px; }
.item dl { display: grid; grid-template-columns: 180px 1fr; gap: 3px 10px; margin: 6px 0 0; font-size: 13.5px; }
.item dt { color: var(--muted); } .item dd { margin: 0; }
.cabecalho-res { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.fichinha { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 18px; margin: 14px 0 4px; font-size: 14px; }
.fichinha div small { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip { font-size: 12px; padding: 1px 8px; border-radius: 12px; background: var(--sim-bg); color: var(--sim); white-space: nowrap; }
.chip.neutro { background: var(--soft); color: var(--moss); }
.modal-fundo { position: fixed; inset: 0; background: rgba(20,30,26,.55); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 20px; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 100%; max-width: 430px; }
.modal .campo { margin-bottom: 12px; }
.modal input { width: 100%; }
.leaflet-container { font: 13px "Saira", sans-serif; }
