/* Header Mobile Redesenhado */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    height: 70px;
    position: relative;
}

/* Logo Redesenhado */
.logo a {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(200, 154, 57, 0.3);
    transition: all 0.3s ease;
}

.logo-icon i {
    color: white;
    font-size: 1.2rem;
}

.logo:hover .logo-icon {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(200, 154, 57, 0.4);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    opacity: 0.8;
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.9rem;
}

.nav-link i {
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(200, 154, 57, 0.1);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-link.active {
    background: rgba(200, 154, 57, 0.15);
    color: var(--primary-color);
}

/* Desktop User Menu */
.desktop-user-menu {
    display: flex;
    align-items: center;
}

.user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.user-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    overflow: hidden;
}

.user-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar-large {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-details .user-name {
    color: white;
    font-weight: 700;
    font-size: 1rem;
}

.user-details .user-email {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: rgba(200, 154, 57, 0.1);
    color: var(--primary-color);
}

.dropdown-item.admin-item {
    border-left: 3px solid var(--primary-color);
    background: rgba(200, 154, 57, 0.05);
}

.dropdown-item.logout-item {
    color: #ff6b6b;
}

.dropdown-item.logout-item:hover {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    gap: 0.75rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 15px rgba(200, 154, 57, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 154, 57, 0.4);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Mobile Header Actions */
.mobile-header-actions {
    display: none;
    align-items: center;
    gap: 0.75rem;
}

.mobile-user-btn,
.mobile-login-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.mobile-user-btn:hover,
.mobile-login-btn:hover {
    background: rgba(200, 154, 57, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.05);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 4px;
    padding: 0;
}

.mobile-menu-toggle:hover {
    background: rgba(200, 154, 57, 0.1);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.hamburger-line {
    width: 18px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu Redesenhado */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    pointer-events: none;
}

.mobile-menu.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.mobile-menu-content {
    width: 350px;
    height: 100%;
    background: var(--bg-secondary);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    padding: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    max-height: 100vh;
}

.mobile-menu-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
}

.mobile-menu-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.mobile-menu-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.mobile-menu-logo .logo-text {
    display: flex;
    flex-direction: column;
}

.mobile-menu-logo .logo-title {
    font-weight: 700;
    font-size: 1rem;
    color: white;
    line-height: 1.2;
}

.mobile-menu-logo .logo-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.mobile-menu-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Mobile Navigation */
.mobile-nav {
    flex: 1;
    padding: 1.5rem 0;
    display: block;
    visibility: visible;
    opacity: 1;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 1rem 1.5rem;
    opacity: 0.7;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: block;
    visibility: visible;
    opacity: 1;
}

.mobile-nav-list li {
    margin: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
    visibility: visible;
    opacity: 1;
    width: 100%;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(200, 154, 57, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    background: rgba(200, 154, 57, 0.2);
    color: var(--primary-color);
    transform: scale(1.05);
}

.nav-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.nav-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.nav-arrow {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.nav-item:hover .nav-arrow {
    color: var(--primary-color);
    transform: translateX(3px);
}

/* Mobile User Section */
.mobile-user-section {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar-large {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(200, 154, 57, 0.3);
}

.user-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-details .user-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.user-details .user-email {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.user-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.user-action-btn:hover {
    background: rgba(200, 154, 57, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.user-action-btn.admin-btn {
    border-left: 3px solid var(--primary-color);
    background: rgba(200, 154, 57, 0.05);
}

.user-action-btn.logout-btn {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.2);
}

.user-action-btn.logout-btn:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: #ff6b6b;
    color: #ff6b6b;
}

/* Mobile Auth Section */
.mobile-auth-section {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.auth-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    opacity: 0.8;
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.full-width {
    width: 100%;
    justify-content: center;
}

/* Mobile User Menu */
.mobile-user-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    background: var(--bg-secondary);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10000;
    display: flex;
    flex-direction: column;
}

.mobile-user-menu.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.mobile-user-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    z-index: -1;
}

.mobile-user-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-profile-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.user-profile-header .user-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.user-profile-header .user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-profile-header .user-name {
    font-weight: 700;
    font-size: 1rem;
    color: white;
}

.user-profile-header .user-role {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.user-menu-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.user-menu-actions {
    flex: 1;
    padding: 1rem 0;
}

.menu-action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}

.menu-action:hover {
    background: rgba(200, 154, 57, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.menu-action.admin-action {
    border-left-color: var(--primary-color);
    background: rgba(200, 154, 57, 0.05);
}

.menu-action.logout-action {
    color: #ff6b6b;
}

.menu-action.logout-action:hover {
    background: rgba(255, 107, 107, 0.1);
    border-left-color: #ff6b6b;
    color: #ff6b6b;
}

/* Garantir visibilidade do menu mobile */
.mobile-menu.active .mobile-menu-content {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.mobile-menu.active .mobile-nav {
    display: block !important;
}

.mobile-menu.active .mobile-nav-list {
    display: block !important;
}

.mobile-menu.active .nav-item {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Responsividade */
@media (max-width: 1023px) {
    .desktop-nav,
    .desktop-user-menu {
        display: none;
    }
    
    .mobile-header-actions {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Forçar visibilidade no mobile */
    .mobile-menu {
        display: flex !important;
    }
    
    .mobile-menu-content {
        display: flex !important;
    }
}

@media (max-width: 480px) {
    .mobile-menu-content {
        width: 100%;
        max-width: 100vw;
    }
    
    .mobile-user-menu {
        width: 100%;
    }
    
    .header-content {
        padding: 0.75rem 0;
        height: 60px;
    }
    
    .logo-text {
        display: none;
    }
    
    .logo-icon {
        width: 35px;
        height: 35px;
    }
    
    .mobile-header-actions {
        gap: 0.5rem;
    }
    
    .mobile-user-btn,
    .mobile-login-btn,
    .mobile-menu-toggle {
        width: 35px;
        height: 35px;
    }
}

/* Debug - Garantir visibilidade */
.mobile-menu {
    display: flex !important;
}

.mobile-menu.active {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
}

.mobile-menu-content {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.mobile-nav {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.mobile-nav-list {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.nav-item {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Forçar visibilidade em mobile */
@media (max-width: 1023px) {
    .mobile-menu {
        display: flex !important;
    }
    
    .mobile-menu.active {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: translateX(0) !important;
    }
    
    .mobile-menu-content {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Animações */
.mobile-menu,
.mobile-user-menu {
    will-change: transform, opacity;
}

.nav-item,
.user-action-btn,
.menu-action {
    will-change: background-color, color, transform;
}

.mobile-menu-toggle {
    will-change: transform;
}

.hamburger-line {
    will-change: transform, opacity;
}
