/* =====================================================================
   Ajustes visuais do sistema sobre o AdminLTE 4.
   ===================================================================== */

:root {
    --nfse-laranja: #fd7e14;
    --nfse-azul-escuro: #1f2d3d;
}

/* Faixas de aviso no topo (ambiente local e modo homologação). */
.faixa {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-align: center;
    padding: .3rem .75rem;
    color: #fff;
}
.faixa-local {
    background: repeating-linear-gradient(135deg, #343a40 0 12px, #495057 12px 24px);
}
.faixa-homologacao {
    background: var(--nfse-laranja);
}
.faixa-fixa {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

/* Telas públicas: fundo em degradê e cartão centralizado. */
.tela-publica {
    background: linear-gradient(135deg, #0d6efd 0%, #6f42c1 55%, #d63384 100%);
    min-height: 100vh;
}
.tela-publica .login-logo {
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    font-size: 1.8rem;
}
.tela-publica .login-logo .logo-icone {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* Logotipo (PNG transparente com texto branco, 4:1) no topo das telas públicas. */
.tela-publica .login-logo .logo-marca {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
}
.tela-publica .card {
    border-radius: .75rem;
}

/* Ícone redondo da marca no menu lateral. */
.sidebar-brand .brand-link .brand-image {
    width: 34px;
    height: 34px;
    max-height: 34px;
    flex: 0 0 34px;
    font-size: 1.05rem;
    line-height: 1;
    box-shadow: none;
}

/* Logotipo do sistema no topo do menu: ocupa a largura disponível (até 180 px) e a altura segue a proporção da imagem. */
.sidebar-brand .brand-link .brand-logo {
    display: block;
    flex: 0 1 auto;
    width: 100%;
    max-width: 180px;
    height: auto;
    max-height: none;
    object-fit: contain;
}
/* Com logotipo, a faixa deixa de ter altura fixa (3,5 rem) e cresce conforme a altura da imagem. */
.sidebar-brand.com-logotipo {
    height: auto;
    min-height: 3.5rem;
    padding: .6rem .8rem;
}
.sidebar-brand.com-logotipo .brand-link {
    width: 100%;
    justify-content: center;
}
/* Menu recolhido: mostra só o começo do logotipo, sem estourar a barra. */
.sidebar-collapse:not(.sidebar-open) .sidebar-brand .brand-link .brand-logo {
    max-width: 2.4rem;
    width: 2.4rem;
    height: 2.4rem;
    object-fit: cover;
    object-position: left center;
}

/* Botão de mostrar/ocultar senha. */
.btn-ver-senha {
    cursor: pointer;
}

/* Cartões de indicadores: rodapé sem link. */
.small-box .small-box-footer {
    display: block;
    padding: .25rem 0;
    text-align: center;
    background: rgba(0, 0, 0, .1);
}

/* Honeypot: campo-armadilha contra robôs, fora da área visível (não usar display:none). */
.campo-hp {
    position: absolute !important;
    left: -10000px !important;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Faixa que avisa o master de que ele está numa empresa diferente da dele. */
.faixa-outra-empresa {
    background: #6f42c1;
}

/* Seletor de empresa ativa (master) na barra superior. */
.seletor-empresa {
    min-width: 200px;
    max-width: 320px;
}

/* Rótulos de abas e cartões de formulário. */
.nav-tabs .nav-link {
    font-weight: 600;
}
.card-form .form-label {
    font-weight: 600;
    font-size: .875rem;
}
.tabela-compacta td,
.tabela-compacta th {
    vertical-align: middle;
}
.table-responsive.empresas-tabela-unica {
    overflow: visible;
    position: relative;
    z-index: 2;
}
.logo-previa {
    max-height: 90px;
    max-width: 240px;
    object-fit: contain;
}
