/* Controladoria do Dr. Ivan — ajustes sobre o Tabler 1.x. Cores do escritório: azul #14213d e dourado #c9a227. */
:root { --marca: #14213d; --ouro: #c9a227; --tblr-primary: #14213d; --tblr-primary-rgb: 20, 33, 61; }
[x-cloak] { display: none !important; }
body { background: #f4f5f7; font-size: 15px; }
input, select, textarea, .form-control, .form-select { font-size: 16px !important; } /* iPhone não dá zoom */
.btn { min-height: 40px; }
.btn-sm { min-height: 34px; }

.topo { background: var(--marca); color: #fff; position: sticky; top: 0; z-index: 30; }
.topo .navbar-toggler { border-color: rgba(255, 255, 255, .4); }
.topo .navbar-toggler-icon { filter: invert(1); }
.marca { color: #fff !important; font-weight: 400; }
.marca b { color: var(--ouro); }
.selo { background: var(--ouro); color: var(--marca); font-weight: 800; border-radius: 6px; padding: 2px 6px; margin-right: 6px; font-size: 12px; }
.busca-rapida { background: rgba(255, 255, 255, .12); color: #fff; border: 0; margin-left: 16px; }
.busca-rapida kbd { background: rgba(0, 0, 0, .25); margin-left: 6px; }
.status-topo { font-size: 13px; }
.st::before { content: "●"; margin-right: 4px; }
.st.ok::before { color: #2fb344; } .st.meio::before { color: #f59f00; } .st.mal::before { color: #d63939; }

.faixa-andamento, .faixa-offline, .faixa-velho { padding: 8px 16px; font-size: 14px; }
.faixa-andamento { background: #e7f0ff; }
.faixa-offline { background: #fde8e8; color: #8a1c1c; }
.faixa-velho { background: #fff4d6; }

.corpo { display: flex; min-height: calc(100vh - 56px); }
.lateral { width: 240px; flex: 0 0 240px; background: #fff; border-right: 1px solid #e6e7e9; padding: 10px 8px; position: sticky; top: 56px; height: calc(100vh - 56px); overflow: auto; }
.nav-item-ctl { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; color: #1d273b; text-decoration: none; min-height: 44px; }
.nav-item-ctl:hover { background: #f1f3f6; text-decoration: none; }
.nav-item-ctl.ativo { background: #e8eef7; color: var(--marca); font-weight: 600; }
.rodape-nav { font-size: 12px; color: #6c7a91; padding: 14px 10px; border-top: 1px solid #e6e7e9; margin-top: 10px; }
.conteudo { flex: 1; padding: 20px; min-width: 0; outline: none; }
.titulo { font-size: 22px; margin: 0 0 4px; }
.sub { color: #6c7a91; margin-bottom: 14px; }
.aviso { font-size: 12px; color: #8a4b00; background: #fff4d6; border: 1px solid #f5d27a; border-radius: 6px; padding: 1px 6px; }

.grade-kpi { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.kpi { border-left: 4px solid #adb5bd; text-decoration: none; color: inherit; }
.kpi:hover { text-decoration: none; box-shadow: 0 2px 8px rgba(20, 33, 61, .15); }
.kpi .n { font-size: 28px; font-weight: 700; }
.kpi .r { color: #6c7a91; font-size: 13px; }
.kpi-v { border-color: #d63939; } .kpi-l { border-color: #f59f00; } .kpi-a { border-color: #206bc4; } .kpi-g { border-color: #2fb344; }
.grafico { height: 260px; } .grafico.grande { height: 420px; }

.filtros { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.filtros .form-control, .filtros .form-select { max-width: 340px; }

.kanban { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 12px; align-items: start; }
.coluna { background: #eceff3; border-radius: 12px; padding: 10px; min-height: 120px; }
.coluna-titulo { font-size: 14px; display: flex; justify-content: space-between; margin: 2px 4px 10px; }
.cartao { background: #fff; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); border-left: 4px solid #adb5bd; cursor: pointer; overflow-wrap: anywhere; }
.cartao:hover, .cartao:focus { box-shadow: 0 2px 10px rgba(20, 33, 61, .2); outline: 2px solid #206bc4; outline-offset: 1px; }
.cartao.col-decidir { border-color: #d63939; } .cartao.col-preparando { border-color: #206bc4; } .cartao.col-esperando { border-color: #f59f00; } .cartao.col-feito { border-color: #2fb344; }
.cartao.sla-estourado { background: #fff7f7; }
.cartao .cnj { color: #206bc4; font-size: 13px; }
.cartao .m { color: #6c7a91; font-size: 13px; margin-top: 4px; }
.acoes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.abas-colunas { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; }

.modal-fundo { position: fixed; inset: 0; background: rgba(16, 24, 40, .5); display: flex; align-items: flex-start; justify-content: center; z-index: 1050; padding: 40px 12px; overflow: auto; }
.modal-caixa { background: #fff; border-radius: 14px; max-width: 920px; width: 100%; padding: 22px; position: relative; }
.modal-caixa.pequena { max-width: 520px; }
.modal-caixa.paleta { max-width: 640px; }
.modal-caixa .fechar { position: absolute; right: 14px; top: 14px; }
.ficha { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; }
.ficha dt { font-size: 12px; color: #6c7a91; text-transform: uppercase; font-weight: 500; }
.ficha dd { margin: 0 0 6px; }
pre.texto { white-space: pre-wrap; font: 14px/1.5 inherit; background: #fafbfc; border: 1px solid #e6e7e9; border-radius: 8px; padding: 12px; max-height: 50vh; overflow: auto; }
.historico .ev, .ev { padding: 6px 0; border-bottom: 1px solid #eef0f3; }

.chat { display: flex; flex-direction: column; gap: 10px; max-height: 58vh; overflow: auto; }
.bolha { max-width: 82%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.bolha.usuario { align-self: flex-end; background: var(--marca); color: #fff; border-bottom-right-radius: 4px; }
.bolha.ivan { align-self: flex-start; background: #fff; border: 1px solid #e6e7e9; border-bottom-left-radius: 4px; }
.bolha .h { font-size: 11px; opacity: .7; margin-top: 4px; }
.digitando { font-style: italic; color: #6c7a91; }
.tabulator-row { cursor: pointer; }
.notyf__toast { max-width: 90vw; }

@media (max-width: 991px) {
  .lateral { position: fixed; left: 0; top: 56px; z-index: 40; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 30px rgba(0, 0, 0, .2); }
  body.menu-aberto .lateral { transform: none; }
  .busca-rapida kbd, .busca-rapida { display: none; }
}
@media (max-width: 767px) {
  .conteudo { padding: 12px; }
  .kanban { grid-template-columns: 1fr; }
  .coluna.oculta-movel { display: none; }
  .table-responsive table thead { display: none; }
  .table-responsive table tr { display: block; border-bottom: 1px solid #e6e7e9; padding: 6px 0; }
  .table-responsive table td { display: block; border: 0; padding: 2px 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* avisos no canto de cima, abaixo do topo, sem cobrir botões de modal (o aviso no meio de baixo tampava "Enviar e-mail") */
.notyf { top: 64px !important; pointer-events: none; z-index: 1100; }
.notyf__toast { pointer-events: auto; }
/* tela de login */
.tela-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--marca); padding: 16px; }
.caixa-login { max-width: 420px; width: 100%; }
.text-dourado { color: var(--ouro); }
.codigo { font-size: 28px !important; letter-spacing: 8px; text-align: center; }
.btn-sair { background: rgba(255,255,255,.12); color: #fff; border: 0; }
