﻿/* =========================================================
   CARDS E TÍTULOS (PADRÃO GOV.BR)
   ========================================================= */
#main {
    padding-bottom: 40px !important;
}   

#main .br-card, #main .gov-card {
    background: #ffffff !important;
    border: 1px solid #E1E1E1 !important;
    border-radius: 4px !important;
    box-shadow: 0 3px 6px rgba(0,0,0,0.05) !important;
    padding: 24px !important;
    margin-bottom: 20px !important;
    overflow: hidden;
}

#main .br-title, #main .gov-card-title {
    color: #004580 !important;
    font-weight: 700 !important;
    font-size: 1.35rem !important;
    border-bottom: 3px solid #1351b4 !important;
    padding-bottom: 10px !important;
    margin-bottom: 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

#main .dms-info, #main .gov-alert {
    background: #f0f5f9 !important;
    padding: 15px !important;
    border-radius: 4px !important;
    border-left: 4px solid #1351b4 !important;
    margin-bottom: 20px !important;
    font-size: 14px !important;
    color: #334155 !important;
}

/* =========================================================
   FORMULÁRIOS
   ========================================================= */

#main .field label, #main .gov-label {
    display: block !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 2px !important;
}

#main .form-control {
    height: 36px !important; 
    font-size: 13px !important;
    border-radius: 4px !important;
    border: 1px solid #888888 !important;
    box-shadow: none !important;
    padding: 6px 12px !important;
    background-color: #ffffff !important;
}

#main .form-control:focus {
    border-color: #1351b4 !important;
    box-shadow: 0 0 0 2px rgba(19, 81, 180, 0.2) !important;
    outline: none !important;
}

/* =========================================================
   DATATABLES (REFINADO 12px)
   ========================================================= */

/* 1. Células do corpo: Fonte 12px e linhas claras */
#main table.dataTable tbody td {
    font-size: 12px !important; /* Ajustado de 14 para 12 */
    border-bottom: 1px solid #f2f2f2 !important; 
    padding: 6px 10px !important; /* Padding mais compacto */
    color: #444 !important;
}

/* 2. Reset de bordas laterais */
#main table.dataTable, 
#main table.dataTable.border-separate {
    border-collapse: collapse !important;
    border: none !important;
}

/* 3. Cabeçalho: Azul Gov e fonte 11px */
#main table.dataTable thead th {
    background-color: #f9fafb !important;
    color: #004580 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    
    /* Remove bordas de todos os lados primeiro */
    border: none !important; 
    
    /* Aplica apenas a borda inferior azul (linha única) */
    border-bottom: 2px solid #1351b4 !important; 
    
    padding: 10px !important;
    line-height: 1.2 !important;
}

/* Efeito Hover */
#main table.dataTable tbody tr:hover td {
    background-color: #f8fafd !important;
    border-bottom: 1px solid #d1d1d1 !important;
}

.dataTables_wrapper .dt-toolbar {
    border: none !important;
    background: transparent !important;
}

/* =========================================================
   MODALS
   ========================================================= */

.ui-dialog.gov-dialog .ui-dialog-titlebar {
    background: #ffffff !important;
    border-bottom: 1px solid #dddddd !important;
}

.ui-dialog.gov-dialog .ui-dialog-title {
    color: #004580 !important;
    font-weight: 700 !important;
}

.gov-dlg-title {
    color: #004580;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =========================================================
   UTIL
   ========================================================= */

.alignCenter { text-align: center !important; }
.alignRight  { text-align: right !important; }

/* =========================================================
   HEADER GOV.BR PREMIUM (VERSÃO FINAL)
   ========================================================= */

#header.xtr-header-clean {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 70px !important;
    background: #ffffff !important;
    border-bottom: 2px solid #1351b4 !important;
    padding: 0 20px !important;
    position: relative !important;
    z-index: 1000 !important;
    float: none !important;
    width: 100% !important;
}

/* Evita sobreposição do SmartAdmin */
body.fixed-header #main {
    margin-top: 0 !important;
    padding-top: 70px !important;
}

/* ESQUERDA (Sistema) */
.header-left-box {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex: 1 !important;
}

.header-soft-logo {
    max-height: 34px !important;
    width: auto !important;
}

.header-soft-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #444 !important;
}

/* CENTRO (Prefeitura) */
.header-center-box {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    text-align: left !important;
}

.header-pref-logo {
    max-height: 50px !important;
    width: auto !important;
}

.header-pref-title {
    color: #004580 !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    margin: 0 !important;
}

.header-pref-sub {
    color: #666 !important;
    font-size: 9px !important;
    font-weight: 600 !important;
}

/* DIREITA (Botões) */
.header-right-box {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex: 1 !important;
}

.header-btn a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 4px;
    color: #555;
    background: transparent;
    transition: all 0.2s;
    font-size: 18px;
}

.header-btn a:hover {
    background: #f0f0f0;
    color: #004580;
}

/* RESPONSIVO */
@media (max-width: 768px) {

    .header-left-box {
        display: none !important;
    }

    .header-center-box {
        position: static !important;
        transform: none !important;
        margin: 0 auto !important;
    }

    .header-pref-logo {
        max-height: 40px !important;
    }

    .header-pref-title {
        font-size: 14px !important;
    }
}

/* Ajuste específico para o texto ao lado do logo NFSe */
.header-soft-text {
    line-height: 1.1 !important;
    display: flex;
    flex-direction: column;
}

.header-soft-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #444 !important;
    text-transform: uppercase;
}

/* Blindagem contra o SmartAdmin que tenta empurrar o conteúdo */
#header.xtr-header-clean {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
}

/* Garante que o menu lateral (left-panel) não fique por cima do cabeçalho */
#left-panel {
    z-index: 800 !important;
}

/* Garante que o link da esquerda mantenha o estilo Gov.br */
.header-left-box a, 
.header-left-box a:hover, 
.header-left-box a:focus {
    text-decoration: none !important;
    color: inherit !important;
    outline: none !important;
}

.header-soft-title {
    /* Mantendo o que já estava no seu css */
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #444 !important;
    text-transform: uppercase;
    line-height: 1.1 !important;
}

/* =========================================================
   RIBBON / USER IDENTIFICATION CARD (GOV.BR)
   ========================================================= */

#ribbon.ribbon-container {
    margin: 0 0 15px 0 !important;
    padding: 12px 20px !important;
    min-height: auto !important;
    display: block !important;
    background: #fff !important;
    border-bottom: 1px solid #ddd !important;
}

.ribbon-content {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
}

.ribbon-user-title {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #004580 !important;
    margin: 0 0 5px 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

.ribbon-meta-info {
    font-size: 13px;
    color: #444;
}

.ribbon-fantasia {
    display: block;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
}

.ribbon-details {
    display: flex;
    gap: 15px;
    margin-bottom: 2px;
}

.ribbon-simples {
    color: #1a7f37;
    font-weight: 600;
}

.ribbon-address {
    font-size: 12px;
    color: #666;
}

.ribbon-logo-box img {
    max-height: 55px;
    width: auto;
    border: 1px solid #eee;
    padding: 2px;
    background: #fff;
    border-radius: 4px;
}

/* Ajuste para o SmartAdmin não empurrar o Ribbon pro lado */
body.fixed-ribbon #ribbon {
    left: 0 !important;
}

/* =========================================================
   TELA DE LOGIN (SAM ADMIN)
   ========================================================= */

/* Centralização do corpo do Login */
body.my-login-page {
    background-color: #f7f9fb !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100vh !important;
    margin: 0 !important;
}

.my-login-page .card-wrapper {
    width: 100%;
    max-width: 400px;
}

.my-login-page .card.fat {
    border: none !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

/* Ajuste das cores e títulos do Login */
.my-login-page .card-title {
    color: #004580 !important;
    font-weight: 700 !important;
}

.my-login-page .btn-primary {
    background-color: #1351b4 !important;
    border-color: #1351b4 !important;
    height: 45px;
    font-weight: bold;
}

.my-login-page .footer {
    margin-top: 30px;
    color: #888;
    text-align: center;
    font-size: 13px;
}

/* Ajuste dos inputs do Login para o padrão Gov */
.my-login-page .form-control {
    border-radius: 4px !important;
    border: 1px solid #888 !important;
    height: 40px !important;
}

/* Container de Filtros */
.gov-filters {
    display: flex;
    justify-content: space-between; /* Empurra os grupos para os cantos */
    align-items: flex-end;         /* Alinha os itens pela base (perfeito para labels) */
    gap: 20px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 20px;
    flex-wrap: wrap;               /* Garante que em telas pequenas os itens quebrem linha */
}

/* Grupo das Datas (Lado Esquerdo) */
.gov-filter-group {
    display: flex;
    gap: 15px;
}

/* Campos Individuais */
.gov-field {
    display: flex;
    flex-direction: column;
}

.gov-field label {
    font-size: 12px;
    font-weight: bold;
    color: #444;
    margin-bottom: 4px;
}

.gov-field input.form-control {
    width: 160px; /* Largura fixa para manter simetria */
    height: 38px;
}

/* Lado Direito (Botões) */
.gov-actions {
    display: flex;
    gap: 10px;
}

/* =========================================================
   REFINAMENTO DE GRID E ÍCONES
   ========================================================= */

/* 1. Remove a linha dupla: limpa bordas da tabela e aplica só no th */
#main table.dataTable {
    border: none !important;
    border-collapse: collapse !important;
}

#main table.dataTable thead th {
    font-size: 11px !important;
    color: #004580 !important;
    background-color: #f9fafb !important;
    /* Linha única e sólida padrão Gov.br */
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 2px solid #1351b4 !important; 
    padding: 10px !important;
}

/* 2. Espaçamento entre os ícones de comando */
.gov-cmd {
    display: flex !important;
    justify-content: flex-start !important; /* Alinha à esquerda na célula */
    gap: 6px !important; /* Espaço entre os botões */
    padding-left: 5px;
}

/* Garante que os botões xs não fiquem colados */
.gov-cmd .btn {
    margin: 0 !important; 
}

/* =========================================================
   STEPPER / WIZARD (PADRÃO GOV.BR)
   ========================================================= */

.stepper-wrap {
    position: relative;
    margin-bottom: 30px;
    padding: 20px 0;
}

/* Linha de fundo cinza */
.stepper-line {
    position: absolute;
    top: 50px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: #e0e0e0;
    z-index: 1;
}

/* Barra de progresso azul (dinâmica via JS) */
.stepper-progress {
    position: absolute;
    top: 50px;
    left: 10%;
    width: 0%; /* JS controla isso */
    height: 3px;
    background: #1351b4;
    z-index: 2;
    transition: width 0.4s ease;
}

.nfse-steps {
    list-style: none;
    display: flex;
    justify-content: space-between;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 3;
}

.nfse-steps li {
    text-align: center;
    flex: 1;
}

.nfse-steps li a {
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #666;
    transition: all 0.3s;
}

/* Círculo do Passo */
.step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 10px;
    color: #999;
}

.step-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

/* ESTADO: ATIVO */
.nfse-steps li.active .step-circle {
    border-color: #1351b4;
    color: #1351b4;
    transform: scale(1.1);
    box-shadow: 0 0 0 5px rgba(19, 81, 180, 0.1);
}

.nfse-steps li.active .step-label {
    color: #1351b4;
}

/* ESTADO: CONCLUÍDO (DONE) */
.nfse-steps li.done .step-circle {
    background: #1351b4;
    border-color: #1351b4;
    color: #fff;
}

/* ESTADO: BLOQUEADO (LOCKED) */
.nfse-steps li.locked {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Esconder as setinhas padrão do SmartAdmin que podem estar vindo do tab-content */
.tab-content {
    border: none !important;
    background: transparent !important;
}

/* Container de ações do rodapé (Wizard) */
.tab-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center;
    width: 100%;
}

/* Alinhamento forçado para a direita no botão final */
.dps-actions {
    text-align: right;
    margin-top: 20px;
}

#btsubmit {
    background-color: #1a7f37 !important; /* Verde Gov mais sóbrio */
    border-color: #1a7f37 !important;
    min-width: 150px;
}

/* Ajuste das Opções para não ocupar linha */
.pull-right {
    margin-top: -5px; /* Sobe um pouco para alinhar com o título se necessário */
}

/* 1. Achata o cabeçalho e remove a margem inferior */
.gov-card-header {
    margin-bottom: 2px !important; /* Espaço mínimo entre título e campos */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* 2. Remove o respiro do topo do card que empurra o conteúdo */
.gov-card {
    padding-top: 5px !important; 
}

/* 3. Garante que a primeira linha (row) dentro do card não tenha margem no topo */
.gov-card > .row:first-of-type {
    margin-top: 0 !important;
}

/* 4. Remove espaços vazios de possíveis tags <p> ou <br> acidentais */
.gov-card-header + .row {
    margin-top: 0 !important;
}

.gov-card-title {
    font-size: 12px !important;     /* Diminuído para um visual mais técnico */
    font-weight: 700 !important;
    color: #1351b4 !important;
    margin: 0 !important;
    line-height: 1.2 !important;    /* Achata a altura da linha do texto */
}

.gov-card-title i {
    margin-right: 6px;
    font-size: 14px;                /* Ícone ligeiramente menor para alinhar com o texto */
}

/* 1. LARGURA TOTAL PARA CIDADE E NBS */
/* Precisamos atacar o container do Select2 que o JS cria em tempo de execução */
#cidadetomador, 
#codnbs, 
.select2,
.select2-container,
.select2-container--default,
.select2-selection--single {
    width: 100% !important;
    display: block !important;
}

/* Gruda o label no input */
.field label {
    margin-bottom: 2px !important; /* Espaço mínimo entre texto e campo */
    font-size: 11px !important;    /* Fonte técnica e compacta */
    display: block;                /* Garante que ocupe a linha toda */
}

/* Seletores mais específicos para vencer o tema */
#main #content .gov-card .field label {
    margin-bottom: 0px !important;
    padding-bottom: 0px !important;
    font-size: 11px !important;
    line-height: 1.0 !important;
    display: inline-block !important;
}

#main #content .gov-card .field input, 
#main #content .gov-card .field select,
#main #content .gov-card .field textarea {
    margin-top: 0px !important;
}

/* Remove o espaçamento de grid do Bootstrap que empurra pra baixo */
.form-group {
    margin-bottom: 5px !important;
}

/* Reduz o respiro interno de cada coluna de campo */
.field {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    margin-bottom: 5px !important;
}

/* Ajusta a altura dos inputs para acompanhar o visual compacto */
.form-control.input-sm {
    height: 28px !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
}

/* Se houver row dentro do card, reduz o espaçamento vertical entre elas */
.gov-card .row {
    margin-bottom: 0px !important;
}

/* 3. PADRONIZAR ALTURA E BORDAS */
/* Garante que o Select2 tenha a mesma altura exata do input-sm (30px) */
.select2-selection--single {
    height: 30px !important;
    padding: 0 !important;
    border: 1px solid #ccc !important;
}

.select2-selection__rendered {
    line-height: 28px !important; /* Alinha o texto verticalmente */
    padding-left: 8px !important;
}

.select2-selection__arrow {
    height: 28px !important;
}

/* Remove margens extras que o Bootstrap aplica em rows de formulários */
.gov-card .row {
    margin-bottom: 5px;
}

/* Estilização do Ribbon (Cabeçalho da Empresa) */
#ribbon.ribbon-container {
    padding: 0 15px !important; /* Removemos o padding vertical para a logo encostar */
    min-height: 85px; /* Altura mínima para o card */
    display: flex;
    align-items: center;
    background: #fff;
    border-bottom: 2px solid #1351b4;
    overflow: hidden; /* Garante que a logo não "vaze" se for muito grande */
}

.ribbon-content {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

/* BOX DA LOGO: Ocupando a altura total */
.ribbon-logo-box {
    height: 85px; /* Mesma altura do container ou um pouco menos */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 5px 0; /* Pequena margem para não colar 100% no topo/base */
}

.ribbon-logo-box img {
    max-height: 100%; /* Estica até o limite da box */
    width: auto;      /* Mantém a proporção */
    object-fit: contain;
}

/* Ajuste dos textos para não colidir com a logo maior */
.ribbon-data {
    padding: 10px 0;
}

/* Estilo da Etiqueta de Modo */
.badge-modo {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    margin-left: 10px;
    text-transform: uppercase;
    display: inline-block;
    vertical-align: middle;
}

/* Modo Incluindo: Amarelo com texto escuro para contraste */
.modo-incluindo {
    background-color: #ffd100 !important;
    color: #000 !important;
    border: 1px solid #e6bc00;
}

/* Modo Alterando: Verde com texto branco */
.modo-alterando {
    background-color: #1a7f37 !important;
    color: #fff !important;
    border: 1px solid #14662c;
}

/* Ajuste no título para não comprimir a badge */
.gov-card-title {
    display: flex;
    align-items: center;
}

/* Destaque para campos com erro */
.field.has-error input, 
.field.has-error select, 
.field.has-error textarea {
    border: 1px solid #a94442 !important;
    background-color: #fff2f2 !important;
}

/* Estilo da mensagem de erro abaixo do campo */
.field .help-block.error {
    color: #a94442;
    font-size: 11px;
    font-weight: 700;
    margin-top: 2px;
}

.smart-form .select i {
    position: absolute;
    top: 14px;
    right: 12px;
    width: 9px;
    height: 9px;
    background: #fff;
    box-shadow: 0 0 0 9px #fff;
}

.smart-form .select select {
    display: block;
    width: 100%;
    padding: 10px 15px;
    line-height: 1.5;
    color: #404040;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    appearance: none; /* Remove a seta padrão */
    -webkit-appearance: none;
}

/* Estilo para o mini-card clicável */
.gov-mini {
    display: block;
    text-decoration: none !important;
    color: inherit !important;
    transition: all 0.2s ease-in-out;
    padding: 12px;
    border-radius: 8px;
    
    /* Moldura cinza clarinho e fundo sutil */
    border: 1px solid #e0e0e0; 
    background-color: #f9f9f9;
    margin-bottom: 10px;
    position: relative;
}

/* 3. Efeito ao passar o mouse (mais nítido agora) */
.gov-mini:hover {
    background-color: #ffffff;
    border-color: #1351b4; /* Azul padrão gov */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.gov-mini__label {
    font-size: 11px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 5px;
}

.gov-mini:hover .gov-mini__label {
    color: #296191; /* Destaca o rótulo no hover */
}

/* Adiciona uma setinha discreta que aparece no hover */
.gov-mini::after {
    content: '\f105'; /* ícone fa-angle-right */
    font-family: 'FontAwesome';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s;
    color: #296191;
}

.gov-mini:hover::after {
    opacity: 1;
}

/* 1. Garante que os cards da mesma linha tenham a mesma altura */
.row-stats {
    display: flex;
    flex-wrap: wrap;
}
.row-stats > [class*='col-'] {
    display: flex;
    flex-direction: column;
}
.row-stats .gov-card {
    flex: 1; /* Faz o card ocupar toda a altura da coluna */
    width: 100%;
}

#btn-vincular-nbs:hover {
    color: #0b3d8d !important;
    text-decoration: none !important;
}

/* Container da tabela no Modal */
.nbs-scroll-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    position: relative;
}

/* Deixa o cabeçalho da tabela fixo no topo ao rolar */
.nbs-scroll-container table thead th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 10;
    border-bottom: 2px solid #eee;
    box-shadow: 0 2px 2px -1px rgba(0,0,0,0.1);
}

/* Personalização da barra de rolagem (Scrollbar) Estilo Moderno */
.nbs-scroll-container::-webkit-scrollbar {
    width: 8px;
}
.nbs-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.nbs-scroll-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
.nbs-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #1351b4; /* Cor azul do sistema ao passar o mouse */
}

/* Limita a altura do SweetAlert se houver muitos erros de validação */
.sweet-alert {
    max-height: 90vh;
    overflow-y: auto;
}

/* Criamos uma grade de duas colunas iguais */
#feed-solicitacoes {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; /* Coluna Esquerda | Coluna Direita */
    gap: 20px !important;
    width: 100% !important;
    padding: 40px 10px 10px 10px !important; /* Margem no topo e lados conforme pedido */
}

/* Mensagem do Usuário: Fica na coluna 1 e ocupa só o seu espaço */
.pergunta-row {
    grid-column: 1 / 2; 
    justify-self: start;
}

/* Mensagem do Suporte: Fica na coluna 2 e ocupa só o seu espaço */
.resposta-row {
    grid-column: 2 / 3;
    justify-self: end;
}

.ribbon-email-inline {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px; /* Ajuste conforme necessário */
    display: inline-block;
    vertical-align: bottom;
}

#chat-container {
    height: 450px; /* Ou a altura que você preferir */
    overflow-y: auto;
    padding: 15px;
    background-color: #f5f5f5; /* Um cinza bem clarinho de fundo ajuda a destacar os balões */
}

/* Seletor forte para sobrepor o listrado do DataTables */
#dt_basic tbody tr.nfse-enviada-adn td {
    background-color: #e8f4fd !important; /* Azul bem sutil */
    color: #2c3e50; /* Garante que o texto continue legível */
}

/* Efeito de destaque ao passar o mouse */
#dt_basic tbody tr.nfse-enviada-adn:hover td {
    background-color: #d1e9ff !important;
}

/* Customizando o balão do Tooltip */
.tooltip-inner {
    background-color: #1351b4 !important; /* Azul do seu sistema */
    color: #fff !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 11px !important;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Customizando a setinha do balão */
.tooltip.top .tooltip-arrow {
    border-top-color: #1351b4 !important;
}
.tooltip.bottom .tooltip-arrow {
    border-bottom-color: #1351b4 !important;
}

/* Garante que a coluna de comandos não quebre linha e tenha largura controlada */
.gov-cmd {
    white-space: nowrap !important;
    display: flex !important;
    gap: 3px; /* Espaçamento uniforme entre os botões */
    justify-content: flex-start;
    align-items: center;
}

/* Ajuste específico para a célula da tabela */
#dt_basic td:first-child {
    width: 200px !important;
    min-width: 200px !important;
    vertical-align: middle !important;
}

tbody tr:hover td {
    cursor: pointer;
}

input[readonly] {
        background-color: #f5f5f5 !important;
        cursor: not-allowed;
}

.header-gestor-custom {
    height: 90px !important; /* Mais espaço para as 3 linhas de info */
    background: #ffffff !important;
    border-bottom: 3px solid #1351b4 !important;
}

/* Ajuste do conteúdo centralizado para o Gestor */
/* =========================================================
   HEADER GESTOR: ALINHAMENTO À ESQUERDA
   ========================================================= */

/* 1. Resetamos o posicionamento absoluto para que ele flua à esquerda */
.header-gestor-custom .header-center-box {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Alinha o conteúdo no início (esquerda) */
    gap: 15px;
    
    position: static;   /* Mata o absolute do contribuinte */
    transform: none;     /* Mata o translate de centralização */
    left: auto;          /* Reseta a posição lateral */
    top: auto;           /* Reseta a posição superior */
    
    flex: 1;             /* Faz o bloco crescer e empurrar o que estiver à direita */
    margin-left: 10px;   /* Pequeno respiro da borda esquerda */
}

/* 2. Garantimos que o bloco de informações (info-col) não quebre */
.header-gestor-custom .info-col {
    display: flex;
    flex-direction: column;
    text-align: left;    /* Força o texto para a esquerda */
}

/* 3. Escondemos a box da esquerda (antigo logo XTR) para o gestor */
.header-gestor-custom .header-left-box {
    display: none;
}

.gestor-pref-title {
    color: #004580;
    font-weight: 800;
    font-size: 15px;
    margin: 0;
}

.gestor-pref-sub {
    color: #444;
    font-size: 11px;
    font-weight: 700;
    margin: 2px 0;
}

.gestor-pref-tecnico {
    color: #777;
    font-size: 9px;
    font-weight: 400;
    text-transform: uppercase;
}

/* Compensação para o #main não subir no header maior */
body.fixed-header #main {
    padding-top: 90px;
}

/* O container do link */
.info-link-hover {
    position: relative;
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #1351b4;
    cursor: help;
    text-decoration: underline;
}

/* O balão escondido */
.info-link-hover .balao-html {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 140%;
    right: -10px; /* Alinha a caixa para não vazar a tela */
    width: 250px;
    background-color: #1351b4; /* O Azul elegante */
    color: #fff;
    text-align: left;
    padding: 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 400;
    text-decoration: none;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: opacity 0.3s;
    text-transform: none;
    pointer-events: none; /* Impede bugs de flicker ao passar o mouse */
}

/* A setinha do balão apontando pra baixo */
.info-link-hover .balao-html::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 35px; /* Alinhado certinho com o texto "Onde vincular?" */
    border-width: 6px;
    border-style: solid;
    border-color: #1351b4 transparent transparent transparent;
}

/* Quando passa o mouse, o balão aparece */
.info-link-hover:hover .balao-html {
    visibility: visible;
    opacity: 1;
}

.modal-dialog-custom { max-width: 850px !important; }
.gov-label { font-weight: 600; font-size: 12px; margin-bottom: 2px; color: #333; }
.panel-desktop { border: 1px solid #ccc; padding: 15px; background: #f9f9f9; border-radius: 4px; margin-bottom: 15px; }