/**
 * ============================================================================
 * FERRAMENTAS HUB - HEADER PERSONALIZADO
 * ============================================================================
 * Classes prefixadas com "fhub-" para evitar conflitos com outros estilos
 */

/* ============================================================================
   HEADER PRINCIPAL
   ============================================================================ */

.fhub-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(229, 229, 229, 0.8);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 1px 3px rgba(0, 0, 0, 0.04);
}

.fhub-header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0.75rem 0;
    height: 72px;
    justify-content: space-between;
}

/* ============================================================================
   LOGO E BRANDING
   ============================================================================ */

.fhub-site-branding .fhub-brand-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.fhub-site-branding .fhub-brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #10b981, #2563eb);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.fhub-site-branding .fhub-brand-icon::before {
    content: '⚡';
    position: absolute;
    font-size: 18px;
    color: white;
    z-index: 2;
}

.fhub-site-branding .fhub-brand-icon i {
    font-size: 1.25rem;
    color: white;
    opacity: 0;
}

.fhub-site-branding .fhub-site-title {
    font-size: 24px;
    font-weight: 800;
    font-family: 'Lexend Deca', sans-serif;
    color: #171717;
    margin: 0;
    line-height: 1;
}

.fhub-site-branding .fhub-site-description {
    font-size: 0.6875rem;
    color: #737373;
    margin: 0;
    display: none;
}

/* ============================================================================
   NAVEGAÇÃO PRINCIPAL
   ============================================================================ */

.fhub-main-navigation {
    display: flex;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

.fhub-main-navigation .fhub-nav-link {
    color: #525252;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    padding: 8px 16px;
    border-radius: 8px;
    background: transparent;
}

.fhub-main-navigation .fhub-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
    z-index: 0;
}

.fhub-main-navigation .fhub-nav-link:hover::before {
    left: 100%;
}

.fhub-main-navigation .fhub-nav-link:hover {
    color: #10b981;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

/* ============================================================================
   AÇÕES DO HEADER
   ============================================================================ */

.fhub-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.fhub-header-icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(229, 229, 229, 0.6);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    color: #525252;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    overflow: hidden;
}

.fhub-header-icon-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.fhub-header-icon-btn:hover::before {
    left: 100%;
}

.fhub-header-icon-btn:hover {
    background: rgba(240, 253, 244, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-color: #10b981;
    color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.fhub-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* ============================================================================
   BOTÕES DE AÇÃO
   ============================================================================ */

.fhub-btn-criar-venda {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fhub-btn-criar-venda::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.fhub-btn-criar-venda:hover::before {
    left: 100%;
}

.fhub-btn-criar-venda:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: #ffffff;
}

.fhub-btn-login {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #525252;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(229, 229, 229, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fhub-btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.fhub-btn-login:hover::before {
    left: 100%;
}

.fhub-btn-login:hover {
    background: rgba(250, 250, 250, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #404040;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* ============================================================================
   USUÁRIO LOGADO
   ============================================================================ */

.fhub-header-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 6px 12px 6px 6px;
    border-radius: 8px;
    border: 1px solid rgba(229, 229, 229, 0.8);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    cursor: pointer;
}

.fhub-header-user:hover {
    background: rgba(240, 253, 244, 0.6);
    border-color: #10b981;
    box-shadow: 
        0 8px 16px rgba(16, 185, 129, 0.15),
        0 2px 4px rgba(16, 185, 129, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
}

.fhub-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #e5e5e5;
}

.fhub-user-name {
    color: #171717;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
}

/* ============================================================================
   MENU MOBILE
   ============================================================================ */

.fhub-mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
}

.fhub-mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #525252;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.fhub-mobile-menu-toggle:hover span {
    background: #10b981;
}

.fhub-mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.fhub-mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.fhub-mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.fhub-mobile-navigation {
    display: none;
    position: fixed;
    top: 72px;
    right: 0;
    width: 280px;
    max-width: 85%;
    height: calc(100vh - 72px);
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.5rem;
    z-index: 999;
    overflow-y: auto;
}

.fhub-mobile-navigation.active {
    display: flex;
}

.fhub-mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    color: #525252;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.fhub-mobile-nav-link:hover {
    background: rgba(240, 253, 244, 0.8);
    color: #10b981;
}

.fhub-mobile-nav-link i {
    font-size: 1.125rem;
}

.fhub-btn-criar-mobile {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white !important;
    margin-top: 0.5rem;
}

.fhub-btn-criar-mobile:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
}

.fhub-mobile-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e5e5, transparent);
    margin: 0.75rem 0;
}

.fhub-mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fhub-mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* ============================================================================
   RESPONSIVE - TABLET E MOBILE
   ============================================================================ */

@media (max-width: 1024px) {
    .fhub-main-navigation {
        display: none;
    }
    
    .fhub-mobile-menu-toggle {
        display: flex;
    }
    
    .fhub-user-name {
        display: none;
    }
    
    .fhub-header-content {
        gap: 1rem;
    }
    
    .fhub-header-actions {
        gap: 0.75rem;
    }
    
    /* Ocultar botões Entrar e Cadastrar no mobile - ficam apenas no menu */
    .fhub-header-actions .fhub-btn-login,
    .fhub-header-actions .fhub-btn-criar-venda:not(.fhub-mobile-nav-link) {
        display: none;
    }
}

@media (max-width: 768px) {
    .fhub-site-branding {
        max-width: 180px;
    }
    
    .fhub-brand-icon {
        width: 40px;
        height: 40px;
    }
    
    .fhub-site-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 640px) {
    .fhub-btn-criar-venda span,
    .fhub-btn-login span {
        display: none;
    }
    
    .fhub-header-icon-btn {
        width: 36px;
        height: 36px;
    }
    
    .fhub-btn-criar-venda,
    .fhub-btn-login {
        padding: 0.5rem;
        min-width: 40px;
        justify-content: center;
    }
    
    .fhub-header-content {
        height: 60px;
    }
    
    .fhub-mobile-navigation {
        top: 60px;
        height: calc(100vh - 60px);
    }
}

@media (max-width: 480px) {
    .fhub-header-actions {
        gap: 0.5rem;
    }
    
    .fhub-search-btn {
        display: none;
    }
}
