:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --border: #dfe3e8;
  --text: #1f2933;
  --muted: #6b7684;
  --primary: #1a56db;
  --primary-dark: #12409c;
  --ok: #0f7b3f;
  --ok-bg: #e5f7ec;
  --danger: #c0362c;
  --danger-bg: #fdecea;
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

/* Layout geral: barra lateral fixa (esquerda) + area de conteudo rolavel */
.app-shell {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
}

aside.sidebar {
  display: flex;
  flex-direction: column;
  width: 220px;
  flex: 0 0 220px;
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 16px 14px;
  gap: 4px;
  overflow-y: auto;
  z-index: 10;
}

.area-principal {
  flex: 1 1 auto;
  min-width: 0;
}

aside.sidebar .marca {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  padding-bottom: 14px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
aside.sidebar .marca img {
  height: 30px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
aside.sidebar h1 {
  font-size: 15px;
  margin: 0;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

aside.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
aside.sidebar nav > a,
aside.sidebar nav > div.dropdown > .dropdown-toggle {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 6px;
  white-space: nowrap;
  text-align: left;
  width: 100%;
  display: block;
}
aside.sidebar nav > a:hover,
aside.sidebar nav > div.dropdown > .dropdown-toggle:hover { background: var(--bg); }
aside.sidebar nav > a.ativo { background: var(--primary); color: #fff; }

.dropdown { position: relative; }
.dropdown-toggle {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}
.dropdown-menu {
  display: none;
  flex-direction: column;
  padding: 2px 0 2px 14px;
  gap: 1px;
}
.dropdown.aberto .dropdown-menu { display: flex; }
.dropdown-menu a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid var(--border);
}
.dropdown-menu a:hover { background: var(--bg); color: var(--text); }
.dropdown-menu a.ativo { color: var(--primary); border-left-color: var(--primary); font-weight: 600; }

.sidebar-rodape {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.usuario-chip {
  font-size: 13px;
  color: var(--muted);
}

.zoom-controles {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.zoom-controles button {
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1;
}
#zoom-label { min-width: 34px; text-align: center; }

@media (max-width: 860px) {
  main { padding: 14px; }
  /* sticky calculava a posicao com base na altura antiga do topbar - com o
     menu quebrando em varias linhas em tela estreita a altura varia, entao
     desliga o sticky aqui em vez de arriscar sobrepor conteudo */
  .toolbar, .filtros-painel { position: static; top: auto; box-shadow: none; }
  .filtros-painel { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  /* essas telas fixam grid-template-columns via style="" inline no HTML, que
     tem prioridade sobre regra normal de CSS - precisa de !important aqui */
  #grade-cadastros,
  #form-nova-politica,
  #nu-secoes-lista,
  #secoes-lista { grid-template-columns: 1fr !important; }
  .grade-campos-relatorio { grid-template-columns: repeat(2, 1fr); }
  .card { width: min(320px, 92vw); padding: 22px; }
  table { font-size: 13px; }
  th, td { padding: 7px 8px; }
}

@media (max-width: 480px) {
  .filtros-painel { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar input[type=text], .toolbar input[type=date] { width: 100%; }
  .toolbar .status { margin-left: 0; }
  .barra-lote.ativa { flex-direction: column; align-items: stretch; }
  .barra-lote input { width: 100%; }
}

@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  aside.sidebar {
    width: 100%;
    flex: 0 0 auto;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }
  aside.sidebar .marca { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
  aside.sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .dropdown-menu { position: absolute; top: calc(100% + 6px); left: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,.12); min-width: 170px; padding: 6px; z-index: 20; }
  .dropdown-menu a { border-left: none; color: var(--text); }
  .sidebar-rodape { margin-top: 0; margin-left: auto; padding-top: 0; border-top: none; flex-direction: row; align-items: center; }
}

button, .btn {
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel);
  cursor: pointer;
}
button.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
button.primary:hover { background: var(--primary-dark); }
button.btn-perigo { background: var(--danger-bg); color: var(--danger); border-color: #f0c4c0; }
button.btn-perigo:hover { background: #fbdad6; }
button:disabled { opacity: .5; cursor: default; }

main { padding: 20px; max-width: 1400px; margin: 0 auto; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  position: sticky;
  top: 53px;
  z-index: 8;
  background: var(--bg);
  padding: 10px 0;
}
.toolbar input[type=text], .toolbar input[type=date] {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
}
.toolbar .status { font-size: 13px; color: var(--muted); margin-left: auto; }

/* Envolve toda tabela (ver app/static/*.html) - deixa so' a tabela rolar na
   horizontal em tela estreita, sem quebrar layout nem alinhamento de coluna
   (ao contrario do truque de "display:block" direto na table, que desalinha
   cabecalho e corpo). */
.tabela-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
}
.tabela-scroll table { border-radius: 8px; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
th, td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}
th {
  background: #fafbfc;
  font-weight: 600;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
tr:hover td { background: #fbfcfe; }

td.cc-cell { cursor: text; min-width: 110px; }
td.cc-cell input {
  width: 90px;
  padding: 5px 6px;
  border: 1px solid var(--primary);
  border-radius: 4px;
  font-size: 14px;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  background: var(--ok-bg);
  color: var(--ok);
}
.badge.velho { background: #fff4e0; color: #8a5a00; }
.flash-ok { animation: flash-ok 1.1s ease; }
@keyframes flash-ok {
  0% { background: var(--ok-bg); }
  100% { background: transparent; }
}
.flash-erro { animation: flash-erro 1.1s ease; }
@keyframes flash-erro {
  0% { background: var(--danger-bg); }
  100% { background: transparent; }
}

.overlay {
  position: fixed; inset: 0;
  background: rgba(20,25,30,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
}
.hidden { display: none !important; }
.card {
  background: var(--panel);
  padding: 28px;
  border-radius: 10px;
  width: 320px;
  box-shadow: 0 8px 30px rgba(0,0,0,.2);
}
.login-marca { text-align: center; margin-bottom: 8px; }
.login-marca img { height: 56px; width: auto; }
.card h2 { margin-top: 0; font-size: 18px; text-align: center; color: var(--muted); font-weight: 500; }
.card label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
.card input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
}
.card .erro { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 8px; }
.card .ok { color: var(--ok); font-size: 13px; min-height: 18px; margin-top: 4px; }
.card button.primary { width: 100%; margin-top: 14px; }
.card .link-botao {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.campo-senha { position: relative; }
.campo-senha input { padding-right: 36px; }
.campo-senha button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  padding: 4px 6px;
  opacity: .6;
}
.campo-senha button:hover { opacity: 1; }

#btn-trocar-senha.link-botao {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  margin-right: 8px;
}

.ficha-card {
  width: min(900px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  transition: width .15s ease, height .15s ease;
}
.ficha-card.maximizada {
  width: 96vw;
  max-height: 96vh;
  height: 96vh;
}
.ficha-card.minimizada {
  height: auto;
  max-height: none;
  overflow: hidden;
  width: min(420px, 92vw);
}
.ficha-card.minimizada #ficha-corpo { display: none; }

/* FASE 8 item 33: maximizar/minimizar generico pra qualquer .card, nao so'
   a ficha do veiculo (que ja tinha o proprio, ver acima - :not(.ficha-card)
   evita ambiguidade de especificidade entre as duas regras). Convencao:
   todo card que quer suportar minimizar envolve o conteudo (tudo exceto o
   cabecalho) numa div class="caixa-corpo". */
.overlay .card.maximizada:not(.ficha-card) {
  width: 96vw;
  max-height: 96vh;
  height: 96vh;
  overflow-y: auto;
}
.overlay .card.minimizada:not(.ficha-card) {
  height: auto;
  max-height: none;
  overflow: hidden;
  width: min(420px, 92vw);
}
.card.minimizada:not(.ficha-card) .caixa-corpo { display: none; }
.ficha-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: -28px;
  background: var(--panel);
  padding-bottom: 8px;
}
.ficha-header h2 { margin: 0; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ficha-header > div { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
label.ficha-vendido-toggle, label.ficha-sinistro-toggle {
  font-size: 13px; display: flex; align-items: center; gap: 6px;
}
label.ficha-vendido-toggle input[type="checkbox"], label.ficha-sinistro-toggle input[type="checkbox"] {
  width: auto; flex: none;
}
.janela-controles { display: flex; gap: 4px; }
.janela-controles button {
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
}
.ficha-secao { margin-bottom: 16px; border-top: 1px solid var(--border); padding-top: 10px; }
.ficha-secao h4 {
  margin: 0 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em;
  display: flex; align-items: center; gap: 8px;
}
.ficha-secao h4 > span:first-child { flex: 1; }
.ficha-secao-bloqueada { font-size: 12px; }
.ficha-secao-acoes { display: flex; gap: 6px; }
.ficha-secao-acoes button {
  text-transform: none; letter-spacing: normal; font-size: 12px; padding: 3px 10px;
}
.aviso-sinistro {
  background: var(--danger-bg); color: var(--danger); font-weight: 600;
  padding: 6px 10px; border-radius: 6px; font-size: 13px; margin-bottom: 8px;
}
.ficha-bloco-sinistro { margin-top: 8px; }

.lista-documentos { list-style: none; padding: 0; margin: 0 0 10px; }
.lista-documentos li {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.lista-documentos a { color: var(--primary); text-decoration: none; flex: 1; }
.lista-documentos a:hover { text-decoration: underline; }
.badge-doc {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 1px 8px; font-size: 11px; color: var(--muted); white-space: nowrap;
}
.doc-meta { color: var(--muted); font-size: 11px; white-space: nowrap; }
.btn-excluir-doc { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 13px; padding: 2px 6px; }
.upload-documento { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.upload-documento select { padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; }

.so-impressao { display: none; }
.ficha-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 16px; }
.ficha-campo { display: flex; flex-direction: column; font-size: 13px; }
.ficha-campo span { color: var(--muted); font-size: 11px; }
.ficha-campo strong { font-size: 14px; font-weight: 500; }
.ficha-campo-editavel { display: flex; flex-direction: column; font-size: 13px; gap: 3px; }
.ficha-campo-editavel span { color: var(--muted); font-size: 11px; }
.ficha-campo-editavel input, .ficha-campo-editavel textarea {
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 13px;
  font-family: inherit;
}
.ficha-campo-editavel textarea { resize: vertical; }

tr.linha-vendida { background: var(--danger-bg); }
tr.linha-vendida td { color: #8a4a44; }
.badge-vendido { display: inline-block; padding: 1px 8px; border-radius: 10px; background: var(--danger-bg); color: var(--danger); font-size: 11px; margin-left: 6px; }
.aviso-duplicado { display: block; color: var(--danger); font-size: 11px; font-weight: 600; margin-top: 2px; }
.ficha-avisos-vencimento { display: flex; gap: 6px; flex-wrap: wrap; }
.badge-vencimento { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-vencimento.vencido { background: var(--danger-bg); color: var(--danger); }
.badge-vencimento.vencendo { background: #fff3cd; color: #8a5a00; }

.badge-status { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-status.status-rascunho { background: #eef0f2; color: var(--muted); }
.badge-status.status-pendente_recebimento { background: #fff3cd; color: #8a5a00; }
.badge-status.status-concluida { background: var(--ok-bg); color: var(--ok); }
.badge-status.status-devolvida_recusada { background: var(--danger-bg); color: var(--danger); }

/* Tela de entrada "Gestao de Ativos Operacionais" - marca institucional
   (esquerda, ~60%) + cartao de login (direita, ~40%). Paleta e composicao
   seguem a referencia aprovada pela empresa (ver memoria do projeto):
   azuis Vectra + laranjas Traxterra, linhas geometricas, sem girar logo. */
#overlay-splash {
  position: fixed; inset: 0;
  z-index: 200;
  display: flex;
  background: #061426;
  color: #fff;
  font-family: 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif;
  animation: splash-fade-in .4s ease;
}
#overlay-splash.hidden { display: none !important; }
@keyframes splash-fade-in { from { opacity: 0; } to { opacity: 1; } }

.splash-esquerda {
  position: relative;
  flex: 0 0 60%;
  min-width: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px 6vw;
  overflow: hidden;
  /* base solida (sempre visivel, mesmo sem a foto abaixo) */
  background-color: #061426;
  /* camada de baixo pra cima: foto de fundo (se o arquivo existir) coberta
     pelos degrades de escurecimento + pontos de luz azul/laranja. Se
     background-operacional.webp/.jpg nao existir, essa camada so' nao
     pinta nada e o degrade solido de baixo continua aparecendo normalmente -
     nao precisa mexer em mais nada quando o arquivo chegar, so' colocar
     em app/static/ com esse nome. */
  background-image:
    radial-gradient(ellipse 620px 620px at -6% -8%, rgba(20,92,199,.35) 0%, rgba(20,92,199,0) 60%),
    radial-gradient(ellipse 560px 560px at 108% 108%, rgba(255,106,0,.22) 0%, rgba(255,106,0,0) 60%),
    linear-gradient(160deg, rgba(11,42,85,.42) 0%, rgba(7,26,51,.5) 50%, rgba(6,20,38,.62) 100%),
    url("/static/background-operacional.webp"),
    url("/static/background-operacional.jpg");
  background-size: auto, auto, auto, cover, cover;
  background-position: 0 0, 0 0, 0 0, left center, left center;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
}
.splash-linhas-svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .8; animation: splash-linhas-in 1.1s ease .1s both; }
@keyframes splash-linhas-in { from { opacity: 0; transform: scale(1.03); } to { opacity: .8; transform: scale(1); } }
.splash-linha-azul { fill: none; stroke: #145CC7; stroke-width: 2.5; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(20,92,199,.7)); }
.splash-linha-laranja { fill: none; stroke: #FF6A00; stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 8px rgba(255,106,0,.6)); }
.splash-pontos-azul circle { fill: #145CC7; }
.splash-pontos-laranja circle { fill: #F58220; }

.splash-marcas-linha { position: relative; display: flex; align-items: center; gap: 20px; margin-bottom: 40px; animation: splash-sobe-in .5s ease .1s both; }
.splash-marca-item { display: flex; align-items: center; gap: 12px; }
.splash-marca {
  display: block; height: 46px; width: auto;
  /* halo claro atras da marca - sem isso a Vectra (azul escuro solido) quase
     some por cima da foto/degrade tambem escuros */
  filter:
    drop-shadow(0 0 1px rgba(255,255,255,.9))
    drop-shadow(0 0 8px rgba(255,255,255,.55))
    drop-shadow(0 2px 10px rgba(0,0,0,.45));
}
.splash-marca-traxterra { height: 50px; }
.splash-marca-nome {
  display: flex; flex-direction: column; font-weight: 800; font-size: 17px;
  letter-spacing: .04em; line-height: 1.15; color: #fff;
}
.splash-marca-nome small { font-weight: 500; font-size: 9px; letter-spacing: .16em; color: #B8C4D6; }
.splash-divisor { width: 1px; height: 34px; background: rgba(184,196,214,.3); }

.splash-titulo {
  position: relative;
  margin: 0; font-weight: 800; letter-spacing: .01em;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.14; text-transform: uppercase; color: #fff;
  animation: splash-sobe-in .5s ease .18s both;
}
.splash-titulo span { color: #FF6A00; }
.splash-titulo-linha {
  position: relative; width: 64px; height: 3px; margin: 20px 0;
  background: linear-gradient(90deg, #145CC7, #FF6A00); border-radius: 2px;
  animation: splash-sobe-in .5s ease .24s both;
}
.splash-subtitulo {
  position: relative; margin: 0; font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  color: #B8C4D6;
  animation: splash-sobe-in .5s ease .3s both;
}
@keyframes splash-sobe-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.splash-direita {
  flex: 0 0 40%;
  min-width: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
  background: #071a33;
}
.splash-card {
  width: min(400px, 100%);
  background: rgba(11,42,85,.4);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(184,196,214,.18);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  text-align: left;
  animation: splash-sobe-in .5s ease .2s both;
}
.splash-card-topo { width: 42px; height: 3px; border-radius: 2px; background: #FF6A00; margin-bottom: 18px; }
.splash-card h2 { margin: 0; font-size: 24px; font-weight: 700; color: #fff; }
.splash-card-sub { margin: 6px 0 26px; font-size: 13.5px; color: #B8C4D6; }

#form-login label { display: block; font-size: 12.5px; color: #B8C4D6; margin: 0 0 6px; font-weight: 500; }
#form-login label:not(:first-of-type) { margin-top: 16px; }
.splash-campo {
  position: relative; display: flex; align-items: center;
  border: 1px solid rgba(184,196,214,.22); border-radius: 10px;
  background: rgba(6,20,38,.4); transition: border-color .15s, background .15s;
}
.splash-campo:focus-within { border-color: #FF6A00; background: rgba(6,20,38,.6); }
.splash-campo.splash-campo-erro { border-color: #ff5a4e; }
.splash-campo-icone {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 42px; flex-shrink: 0; color: #B8C4D6;
}
.splash-campo-icone svg { width: 17px; height: 17px; }
.splash-campo input {
  flex: 1; min-width: 0; height: 42px; padding: 0 12px 0 0;
  border: none; background: none; color: #fff; font-size: 14px; font-family: inherit;
}
.splash-campo input::placeholder { color: rgba(184,196,214,.5); }
.splash-campo input:focus { outline: none; }
.splash-campo-olho {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 42px; flex-shrink: 0; background: none; border: none;
  color: #B8C4D6; cursor: pointer;
}
.splash-campo-olho svg { width: 17px; height: 17px; }
.splash-campo-olho:hover { color: #fff; }

.splash-opcoes { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.splash-lembrar { display: flex !important; align-items: center; gap: 7px; margin: 0 !important; font-size: 12.5px; color: #B8C4D6; cursor: pointer; }
.splash-lembrar input { accent-color: #FF6A00; width: 14px; height: 14px; cursor: pointer; }
.splash-opcoes .link-botao {
  background: none; border: none; color: #F58220; font-size: 12.5px; cursor: pointer; padding: 0;
}
.splash-opcoes .link-botao:hover { text-decoration: underline; }

#login-erro { color: #ff9d8f; font-size: 12.5px; min-height: 16px; margin-top: 10px; }

.splash-btn-entrar {
  width: 100%; margin-top: 18px; padding: 13px; font-size: 15px; font-weight: 700;
  border: none; border-radius: 10px; cursor: pointer; color: #fff; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(90deg, #145CC7 0%, #6b4fb0 55%, #FF6A00 100%);
  transition: filter .15s, transform .15s, opacity .15s;
}
.splash-btn-entrar svg { width: 17px; height: 17px; transition: transform .15s; }
.splash-btn-entrar:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.splash-btn-entrar:hover:not(:disabled) svg { transform: translateX(3px); }
.splash-btn-entrar:active:not(:disabled) { transform: translateY(0); }
.splash-btn-entrar:disabled { opacity: .7; cursor: default; }

@media (max-width: 860px) {
  #overlay-splash { flex-direction: column; overflow-y: auto; }
  .splash-esquerda { flex: none; padding: 40px 28px 28px; }
  .splash-direita { flex: none; padding: 24px 20px 40px; }
  .splash-titulo { font-size: 30px; }
  .splash-card { padding: 32px 26px; }
}
@media (max-width: 420px) {
  .splash-marcas-linha { gap: 12px; flex-wrap: wrap; }
  .splash-marca { height: 38px; }
  .splash-marca-traxterra { height: 42px; }
  .splash-marca-nome { font-size: 14px; }
}

.filtros-painel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 16px;
  position: sticky;
  top: 107px;
  z-index: 7;
  box-shadow: 0 4px 10px rgba(0,0,0,.06);
}
.filtros-painel label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.filtros-painel input, .filtros-painel select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.filtros-painel .filtros-acoes { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; }

.barra-lote {
  display: none;
  align-items: center;
  gap: 10px;
  background: #eef4ff;
  border: 1px solid #c7dbfb;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
}
.barra-lote.ativa { display: flex; }
.barra-lote input { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; width: 140px; }

.menu-relatorios {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.cartao-relatorio {
  text-align: left;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cartao-relatorio:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.cartao-relatorio strong { font-size: 15px; }
.cartao-relatorio span { font-size: 13px; color: var(--muted); font-weight: 400; }

.overlay .card.relatorio-card {
  width: min(1000px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
}
.relatorio-card .relatorio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.relatorio-card .relatorio-header h2 { margin: 0; font-size: 17px; }
.relatorio-filtros {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 14px;
}
.relatorio-filtros label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.relatorio-filtros input, .relatorio-filtros select {
  padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}
.form-grid label { grid-column: span 1; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.form-grid input { padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; }
.grade-campos-relatorio { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }

/* Lista de Verificacao de Transferencia (mobilizacao/desmobilizacao) */
.transf-card { width: min(760px, 94vw); max-height: 90vh; overflow-y: auto; }
.tr-secao-titulo {
  font-size: 12px; font-weight: 700; color: var(--primary); text-transform: uppercase;
  letter-spacing: .02em; margin: 16px 0 6px; padding-top: 8px; border-top: 1px solid var(--border);
}
.tr-secao-titulo:first-of-type { border-top: none; padding-top: 0; }
.tr-item {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  gap: 4px 12px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.tr-item-pergunta { grid-column: 1; }
.tr-item-resposta { grid-column: 2; display: flex; gap: 10px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.tr-item-resposta label { display: flex; align-items: center; gap: 3px; }
.tr-item-comentario {
  grid-column: 1 / -1; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 12.5px;
}
