/* Personalização do AdminLTE4 para POPPFIRE ADMIN */

/* Substitui a logo padrão */
.brand-image[src*="AdminLTELogo.png"] {
    content: url('/static/img/logo_app.png') !important;
}

/* Estilo para a logo personalizada */
.brand-image {
    height: 33px !important;
    width: auto !important;
}

/* Personalização do texto da marca */
.brand-text {
    font-weight: 400 !important;
}

/* Título personalizado */
.content-header h1 {
    color: #495057;
}

/* Header personalizado */
#site-name a {
    color: #fff !important;
    text-decoration: none !important;
    font-weight: bold !important;
}

/* ============================================================================
   SISTEMA DE CORES E FORMATAÇÃO PADRONIZADO - POPPFIRE ADMIN
   ============================================================================ */

/* Sidebar principal - gradiente azul profissional */
.main-sidebar {
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%) !important;
    border-right: 2px solid rgba(52, 152, 219, 0.2);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

/* Brand area com destaque */
.brand-link {
    background: rgba(44, 62, 80, 0.9) !important;
    border-bottom: 1px solid rgba(52, 152, 219, 0.3);
    padding: 15px !important;
}

.brand-text {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 18px;
    letter-spacing: 0.8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* ============================================================================
   LINKS DO MENU - ESTILO PADRÃO UNIFICADO
   ============================================================================ */
.nav-sidebar .nav-link {
    color: #ecf0f1 !important;
    background: transparent !important;
    border-radius: 10px;
    margin: 4px 15px;
    padding: 16px 20px;
    transition: all 0.4s ease;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid transparent;
    position: relative;
    display: flex;
    align-items: center;
}

/* Efeito hover unificado */
.nav-sidebar .nav-link:hover {
    background: linear-gradient(135deg, #34495e 0%, #3498db 100%) !important;
    color: #ffffff !important;
    transform: translateX(8px) scale(1.02);
    border-color: rgba(52, 152, 219, 0.6);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

/* Estado ativo */
.nav-sidebar .nav-link.active {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
    color: #ffffff !important;
    border-color: #2980b9;
    font-weight: 700;
    box-shadow: 0 6px 25px rgba(52, 152, 219, 0.5);
    transform: scale(1.03);
}

/* ============================================================================
   ÍCONES PADRONIZADOS
   ============================================================================ */
.nav-sidebar .nav-icon {
    color: #bdc3c7 !important;
    width: 22px;
    height: 22px;
    text-align: center;
    margin-right: 15px;
    font-size: 16px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-sidebar .nav-link:hover .nav-icon {
    color: #ffffff !important;
    transform: scale(1.2) rotate(5deg);
}

.nav-sidebar .nav-link.active .nav-icon {
    color: #ffffff !important;
    transform: scale(1.2);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Texto dos menus */
.nav-sidebar .nav-link p {
    color: inherit !important;
    margin: 0;
    font-size: 14px;
}

/* ============================================================================
   FORMULÁRIOS E PÁGINAS DE LOGIN
   ============================================================================ */

/* Estilos para a página de login */
.login-box {
    width: 400px;
    margin: 7% auto;
}

.login-logo img {
    max-height: 60px;
    margin-bottom: 10px;
}

.login-logo h1 {
    font-size: 24px;
    font-weight: bold;
    color: #495057;
    margin: 0;
}

.login-box-msg {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 20px;
    text-align: center;
}

.login-card-body {
    padding: 20px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group input {
    border-radius: 0.25rem 0 0 0.25rem;
}

.input-group-text {
    border-radius: 0 0.25rem 0.25rem 0;
    background-color: #f8f9fa;
    border-left: none;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    padding: 10px 20px;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.alert-danger {
    margin-bottom: 15px;
    border-radius: 0.25rem;
}

.errornote {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border: 1px solid #f5c6cb;
    border-radius: 0.25rem;
    margin-bottom: 15px;
}

/* Responsividade para mobile */
@media (max-width: 576px) {
    .login-box {
        width: 90%;
        margin: 10% auto;
    }
}

/* Personalização dos inputs de login */
.form-control {
    border-radius: 0.25rem;
    border: 1px solid #ced4da;
}

/* Customização específica para português brasileiro */
:lang(pt-br) {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ============================================================================
   ESTILO BÁSICO DO MENU SIDEBAR
   ============================================================================ */

/* Sidebar principal */
.main-sidebar {
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%) !important;
}

/* Links do menu */
.nav-sidebar .nav-link {
    color: #ecf0f1 !important;
    background: transparent !important;
    border-radius: 6px;
    margin: 2px 10px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.nav-sidebar .nav-link:hover {
    background: linear-gradient(135deg, #34495e 0%, #3498db 100%) !important;
    color: #ffffff !important;
}

.nav-sidebar .nav-link.active {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
    color: #ffffff !important;
}

/* Headers */
.nav-header {
    color: #95a5a6 !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    padding: 10px 15px;
    margin-top: 15px;
    margin-bottom: 10px;
}

/* Ícones */
.nav-sidebar .nav-icon {
    color: #bdc3c7 !important;
    margin-right: 10px;
}

.nav-sidebar .nav-link:hover .nav-icon,
.nav-sidebar .nav-link.active .nav-icon {
    color: #ffffff !important;
}

/* Texto dos links */
.nav-sidebar .nav-link p {
    color: inherit !important;
    margin: 0;
}

/* Brand/Logo */
.brand-text {
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* ============================================================================
   CORREÇÃO DE ÍCONES FONTAWESOME
   ============================================================================ */

/* Garantir que os ícones FontAwesome apareçam corretamente */
.fas, .far, .fab, .fa {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-transform: none !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    display: inline-block !important;
}

.far {
    font-weight: 400 !important;
}

.fab {
    font-weight: 400 !important;
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands", "FontAwesome" !important;
}

/* Força o carregamento correto dos ícones */
i.fa::before,
i.fas::before,
i.far::before,
i.fab::before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
}

/* Ícones específicos mais comuns */
.fa-database:before { content: "\f1c0" !important; }
.fa-chart-bar:before { content: "\f080" !important; }
.fa-chart-line:before { content: "\f201" !important; }
.fa-info-circle:before { content: "\f05a" !important; }
.fa-user:before { content: "\f007" !important; }
.fa-users:before { content: "\f0c0" !important; }
.fa-lock:before { content: "\f023" !important; }
.fa-cog:before { content: "\f013" !important; }
.fa-home:before { content: "\f015" !important; }
.fa-edit:before { content: "\f044" !important; }
.fa-plus:before { content: "\f067" !important; }
.fa-trash:before { content: "\f2ed" !important; }
.fa-eye:before { content: "\f06e" !important; }
.fa-download:before { content: "\f019" !important; }
.fa-upload:before { content: "\f093" !important; }
.fa-search:before { content: "\f002" !important; }
.fa-filter:before { content: "\f0b0" !important; }
.fa-arrow-left:before { content: "\f060" !important; }
.fa-sign-out-alt:before { content: "\f2f5" !important; }
.fa-video:before { content: "\f03d" !important; }
.fa-wifi:before { content: "\f1eb" !important; }
.fa-globe:before { content: "\f0ac" !important; }
.fa-shield-alt:before { content: "\f3ed" !important; }

/* Garantir visibilidade em todos os contextos */
i[class*="fa-"]:before {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ============================================================================
   EVITAR QUE O MENU RECOLHA AO CLICAR NOS LINKS
   ============================================================================ */

/* Forçar que o sidebar permaneça aberto */
.main-sidebar.sidebar-collapse {
    width: 250px !important;
}

/* Anular comportamento de colapso automático */
body.sidebar-collapse .main-sidebar {
    width: 250px !important;
    margin-left: 0 !important;
}

/* Evitar que o conteúdo principal se mova quando o menu não colapsa */
body.sidebar-collapse .content-wrapper,
body.sidebar-collapse .main-footer {
    margin-left: 250px !important;
}

/* Força exibição completa dos links mesmo em telas menores */
@media (max-width: 991.98px) {
    .main-sidebar {
        width: 250px !important;
        transform: translateX(0) !important;
    }
    
    .main-sidebar.sidebar-collapse {
        width: 250px !important;
        transform: translateX(0) !important;
    }
}

/* Desabilitar animações de colapso que podem interferir */
.main-sidebar .nav-sidebar .nav-item > .nav-link {
    transition: all 0.3s ease !important;
}

/* Garantir que todos os links sejam visíveis */
.nav-sidebar .nav-item,
.nav-sidebar .nav-link {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ============================================================================
   CORREÇÕES ADICIONAIS PARA DISPOSITIVOS MÓVEIS
   ============================================================================ */

/* Força sidebar visível em todas as resoluções */
@media (min-width: 768px) {
    body:not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-fixed) .content-wrapper {
        margin-left: 250px !important;
    }
}

/* Prevenir colapso automático em mobile */
@media (max-width: 767.98px) {
    .main-sidebar {
        position: fixed !important;
        z-index: 1050 !important;
        width: 250px !important;
        transform: translateX(0) !important;
    }
    
    body.sidebar-open .main-sidebar {
        transform: translateX(0) !important;
    }
}

/* Força classes para manter sidebar aberto */
body.control-sidebar-slide-open .control-sidebar,
body.sidebar-open .main-sidebar {
    transform: translateX(0) !important;
}

/* Desabilitar overlay que pode esconder o menu */
.sidebar-overlay {
    display: none !important;
}
