/* GRC + FROTA · complementos do tema do CRM (estilo.css + tema.css) */

/* Marca: GRC + com o selo FROTA */
.marca em { font-style: normal; font-family: Orbitron, sans-serif; font-weight: 700; font-size: .36em; letter-spacing: .3em;
  margin-left: .6em; padding: .42em .5em .42em .8em; border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 4px;
  vertical-align: .5em; color: #fff; text-shadow: none; }
.caixa .marca em { border-color: rgba(255, 255, 255, .4); }
body.em-acesso { --ciano: #39ff14; --ciano-tinta: #021918; --ciano-suave: rgba(57, 255, 20, .1); }
.acesso .botao.principal:hover { background: #7dff63; border-color: #7dff63; }
.painel-marca::after { background: radial-gradient(circle, rgba(57, 255, 20, .14), transparent 65%); }
.troca { flex-direction: column; align-items: flex-start; }
.app { grid-template-columns: 252px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
.topo-lateral .marca { font-size: 30px; }

/* Cores do menu por seção */
.lateral nav button[data-pagina="inicio"]         { --ic: #00a86b; }
.lateral nav button[data-pagina="checklists"]     { --ic: #2563eb; }
.lateral nav button[data-pagina="abastecimentos"] { --ic: #ea580c; }
.lateral nav button[data-pagina="manutencao"]     { --ic: #7c3aed; }
.lateral nav button[data-pagina="veiculos"]       { --ic: #0891b2; }
.lateral nav button[data-pagina="bi"]             { --ic: #db2777; }
.lateral nav button[data-pagina="usuarios"]       { --ic: #475569; }
.lateral nav button[data-pagina="clientes"]       { --ic: #00a86b; }
.lateral nav button[data-pagina="pedidos"]        { --ic: #db2777; }
.lateral nav button[data-pagina="sistema"]        { --ic: #475569; }
.app.papel-gestor .so-mestre, .app.papel-mestre .so-gestor { display: none !important; }
.lateral nav .contador { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--vermelho); color: #fff; font-size: 11px; font-weight: 800; text-align: center; }

/* Barra do topo */
.empresa-nome { font-size: 12.5px; font-weight: 700; color: #c3c8cf; padding: 0 4px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sino { position: relative; display: grid; place-items: center; width: 38px; height: 34px; border-radius: 6px; border: 1px solid rgba(255,255,255,.18); background: #121416; color: #f4f5f6; cursor: pointer; }
.sino:hover { border-color: var(--neon); }
.sino svg { width: 18px; height: 18px; }
.sino b { position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--neon); color: #021918; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 12px rgba(57,255,20,.5); }
.sino.tocando { animation: sacode .6s ease 2; }
@keyframes sacode { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }

/* Páginas */
.app .pagina { padding-bottom: 72px; }
.app .pagina:not(.entrada) > * { flex-shrink: 0; }
.app .pagina.entrada { padding-bottom: 0; }
.app .tabela-rolagem td { white-space: nowrap; }
.topo-pagina { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.topo-pagina .filtros-linha { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.app .pagina select.campo, .app .pagina input.campo { height: 36px; padding: 0 10px; border: 1px solid var(--linha-forte); border-radius: 8px; background: #fff; font: inherit; font-size: 13px; color: var(--texto); }
.app .pagina input.campo { min-width: 200px; }
.bloco { background: #fff; border: 1px solid var(--linha-forte); border-radius: var(--raio); box-shadow: var(--sombra); overflow: hidden; min-width: 0; }
.bloco > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--linha); background: #fbfcfb; }
.bloco > header h2 { font-size: 14.5px; font-weight: 800; }
.bloco .corpo { padding: 16px 18px; }
.duas-colunas { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.lista-simples .linha-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--linha); cursor: pointer; }
.lista-simples .linha-item:last-child { border-bottom: 0; }
.lista-simples .linha-item:hover { background: var(--hover); }
.lista-simples .vazio, .vazio-tabela { padding: 26px 18px; text-align: center; color: var(--mudo); }
.placa { display: inline-flex; align-items: center; justify-content: center; min-width: 78px; padding: 3px 8px; border-radius: 5px; border: 2px solid #1d2b4f; background: #fff; color: #0e1512;
  font-family: "Manrope", sans-serif; font-weight: 800; letter-spacing: .06em; font-size: 12.5px; position: relative; }
.placa::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: #1d4fd6; border-radius: 2px 2px 0 0; }
.selo { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; white-space: nowrap; border: 1px solid; }
.selo.ok { color: #046c4a; background: #dff7ea; border-color: #8fdcb6; }
.selo.problema { color: #b42323; background: #fdecec; border-color: #f0b4b4; }
.selo.novo { color: #1d4fd6; background: #e8efff; border-color: #b8cbfa; }
.selo.neutro { color: #475569; background: #eef2f6; border-color: #cbd5e1; }
.selo.preventiva { color: #046c4a; background: #dff7ea; border-color: #8fdcb6; }
.selo.corretiva { color: #9a3412; background: #fff1e7; border-color: #f7c39b; }
.selo.inativo { color: #b42323; background: #fdecec; border-color: #f0b4b4; }
.app td .acoes { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.app td .botao { padding: 5px 10px; font-size: 12px; }
.app td.num, .app th.num { text-align: right; white-space: nowrap; }
.app tbody tr.clicavel { cursor: pointer; }
.icone-alerta { color: var(--dourado); font-weight: 800; }
.dica-linha { font-size: 12px; color: var(--mudo); }

/* Indicadores: 3 ou 6 colunas */
.app .indicadores.seis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.app .indicadores.tres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.app .indicador .sub { font-size: 11.5px; color: var(--mudo); font-weight: 600; }

/* Checklists: detalhe com fotos */
.ck-cabecalho { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--linha); background: #fbfcfb; flex-wrap: wrap; }
.ck-cabecalho .quem { margin-right: auto; }
.fotos-checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; padding: 18px; flex: none; align-items: start; }
.foto-item { border: 1px solid var(--linha-forte); border-radius: 10px; overflow: hidden; background: #fff; box-shadow: var(--sombra); }
.foto-item.problema { border: 2px solid var(--vermelho); }
.foto-item .imagem { aspect-ratio: 4 / 3; background: #e7ece9; display: grid; place-items: center; cursor: zoom-in; overflow: hidden; color: var(--mudo); font-size: 12px; text-align: center; padding: 0; }
.foto-item .imagem img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-item .info { padding: 10px 12px; display: grid; gap: 4px; }
.foto-item .info strong { font-size: 13px; }
.foto-item .info p { font-size: 12.5px; color: var(--texto-2); }
.app .entrada-conversa { overflow-y: auto; }
.item .linha2 { display: flex; gap: 6px; align-items: center; }

/* Formulários na janela */
.modal-fundo { position: fixed; inset: 0; z-index: 40; background: rgba(14, 21, 18, .45); display: grid; place-items: center; padding: 20px; backdrop-filter: blur(2px); }
.modal { width: min(720px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: #fff; color: #0e1512; border-radius: 14px; box-shadow: 0 24px 60px rgba(14, 21, 18, .35); overflow: hidden;
  --linha: #dbe2de; --linha-forte: #b9c5c0; --texto: #0e1512; --texto-2: #36413d; --mudo: #5f6b66; --ciano: #00a86b; --hover: #dff7ea; --hover-borda: #34c98a; --hover-texto: #046c4a; }
.modal > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: #08090a; color: #fff; }
.modal > header h2 { font-size: 16px; font-weight: 800; }
.modal > header .fechar { color: #c3c8cf; }
.modal > header .fechar:hover { background: rgba(255,255,255,.1); color: #fff; }
.modal-corpo { padding: 18px 20px 20px; overflow-y: auto; }
.modal form { gap: 14px; }
.modal label { color: var(--texto-2); }
.modal input[type="text"], .modal input[type="email"], .modal input[type="password"], .modal input[type="number"], .modal input[type="date"], .modal select, .modal textarea {
  width: 100%; min-width: 0; padding: 10px 11px; font: inherit; font-size: 14px; color: var(--texto); background: #fff; border: 1px solid var(--linha-forte); border-radius: 8px; }
.modal input:focus, .modal select:focus, .modal textarea:focus { outline: 0; border-color: var(--ciano); box-shadow: 0 0 0 3px rgba(0, 168, 107, .16); }
.modal input:disabled { background: #f1f5f3; color: var(--mudo); }
.modal .tres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.modal .duas { gap: 12px; }
.modal .botao { background: #fff; border: 1px solid var(--linha-forte); color: var(--texto); border-radius: 8px; font-weight: 700; padding: 9px 14px; }
.modal .botao:hover { background: var(--hover); border-color: var(--hover-borda); color: var(--hover-texto); }
.modal .botao.principal { background: linear-gradient(#0cc07f, #00a86b); border-color: #00985f; color: #fff; margin-top: 0; }
.modal .botao.principal:hover { background: linear-gradient(#0ab274, #00955e); color: #fff; }
.modal .aviso { color: #b42323; background: #fdecec; border-color: #f0b4b4; }
.modal .aviso.ok { color: #046c4a; background: #dff7ea; border-color: #8fdcb6; }
.modal .aviso.atencao { color: #7a4b00; background: #fff6e0; border-color: #f0cf85; }
.modal .marcar { border-color: var(--linha-forte); color: var(--texto); }
.modal .rodape-form { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding-top: 4px; }
.modal .secao-form { display: grid; gap: 12px; padding: 14px; border: 1px dashed var(--linha-forte); border-radius: 10px; background: #fbfcfb; }
.modal .secao-form h3 { font-size: 13px; font-weight: 800; }
.escolha { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.escolha button { display: grid; gap: 6px; padding: 18px; text-align: left; border-radius: 12px; border: 2px solid var(--linha-forte); background: #fff; cursor: pointer; font: inherit; }
.escolha button { color: #0e1512; }
.escolha button strong { font-size: 15px; color: #0e1512; }
.modal strong, .modal b { color: inherit; }
.escolha button span { color: var(--mudo); font-size: 12.5px; }
.escolha button:hover { border-color: var(--ciano); background: var(--hover); }
.escolha button.corretiva:hover { border-color: #ea580c; background: #fff1e7; }
.leitura-pdf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.leitura-pdf input[type="file"] { display: none; }
.calculado { font-size: 12.5px; color: var(--mudo); }
.calculado b { color: var(--texto); }

/* Faixa rolante no rodapé (estilo scroller do Power BI) */
.faixa-aviso { position: fixed; left: 252px; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 0; background: #08090a; color: #fff; border-top: 2px solid var(--neon); box-shadow: 0 -6px 18px rgba(0,0,0,.18); }
.faixa-aviso.vermelha { background: #7f1d1d; border-top-color: #ff6b6b; }
.faixa-trilho { flex: 1; overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.faixa-texto { display: inline-block; padding-left: 100%; animation: rolar 26s linear infinite; font-size: 13.5px; font-weight: 700; }
.faixa-texto span { margin-right: 80px; }
.faixa-aviso:hover .faixa-texto { animation-play-state: paused; }
@keyframes rolar { from { transform: translateX(0); } to { transform: translateX(-100%); } }
.faixa-botao { flex: none; height: 32px; padding: 0 14px; border-radius: 6px; border: 0; cursor: pointer; font: inherit; font-weight: 800; font-size: 12.5px; background: var(--neon); color: #021918; }
.faixa-aviso.vermelha .faixa-botao { background: #fff; color: #7f1d1d; }

/* Avisos flutuantes */
.avisos { position: fixed; right: 18px; top: 18px; z-index: 60; display: grid; gap: 10px; width: min(360px, calc(100vw - 36px)); }
.aviso-flutuante { padding: 13px 16px; border-radius: 10px; background: #0e1512; color: #fff; font-weight: 700; font-size: 13.5px; box-shadow: 0 12px 30px rgba(14,21,18,.3); border-left: 5px solid var(--neon); animation: entra .3s ease; cursor: default; }
.aviso-flutuante.problema, .aviso-flutuante.erro { border-left-color: #ff5b5b; background: #3b0f0f; }
.aviso-flutuante.saindo { opacity: 0; transform: translateX(20px); transition: .3s; }
.aviso-flutuante.clicavel { cursor: pointer; }
@keyframes entra { from { opacity: 0; transform: translateY(-10px); } }

/* Foto ampliada */
.foto-ampliada { position: fixed; inset: 0; z-index: 70; background: rgba(8, 9, 10, .92); display: grid; place-items: center; padding: 30px; }
.foto-ampliada img { max-width: 100%; max-height: calc(100vh - 110px); border-radius: 8px; }
.foto-ampliada p { color: #e5e7eb; text-align: center; margin-top: 10px; font-weight: 600; }
.foto-ampliada .fechar { position: absolute; top: 16px; right: 16px; color: #fff; background: rgba(255,255,255,.12); width: 40px; height: 40px; }

/* Armazenamento */
.barra-espaco { height: 12px; border-radius: 999px; background: #e7ece9; overflow: hidden; border: 1px solid var(--linha-forte); }
.barra-espaco i { display: block; height: 100%; background: linear-gradient(90deg, #12c98a, #00a86b); }
.barra-espaco.alto i { background: linear-gradient(90deg, #f5a524, #e08600); }
.barra-espaco.critico i { background: linear-gradient(90deg, #ff7b7b, #e5484d); }

/* BI */
.bi-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.bi-grade .largo { grid-column: 1 / -1; }
.grafico-bi { height: 300px; }
.app .tiles.seis { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* Celular */
@media (max-width: 1100px) {
  .app .indicadores.seis, .app .tiles.seis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .duas-colunas, .bi-grade { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto minmax(0, 1fr); }
  .topo-lateral .marca { font-size: 22px; }
  .lateral nav { display: flex !important; gap: 2px !important; justify-content: flex-start; }
  .app .lateral nav button { flex: 0 0 auto; min-width: 74px; flex-direction: column; font-size: 10px !important; white-space: nowrap; }
  .app .lateral nav button.ativo::before { display: none; }
  .barra-acoes .ao-vivo { display: none; }
  .faixa-aviso { left: 0; bottom: calc(62px + env(safe-area-inset-bottom)); }
  .lateral nav { overflow-x: auto !important; }
  .lateral nav .contador { position: absolute; top: 0; right: 8px; margin: 0; }
  .app .lateral nav button { position: relative; min-width: 64px; }
  .modal .tres, .escolha { grid-template-columns: 1fr; }
  .app .indicadores.seis, .app .indicadores.tres, .app .tiles.seis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .empresa-nome { display: none; }
}
