/* ============================================
   HEADER REDESIGN - Enterprise Cybersecurity
   ============================================ */

/* Header Container */
.header {
    position: fixed;
    top: 15px;
    left: 15px;
    right: 15px;
    z-index: 1000;
    overflow: visible;
    background: rgba(10, 14, 39, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 191, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 30px;
    max-width: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 18px;
    margin-right: 10px;
    flex-shrink: 0;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00bfff 0%, #8a2be2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 191, 255, 0.3);
}

.logo-icon i {
    font-size: 20px;
    color: white;
}

.logo span {
    background: linear-gradient(135deg, #00bfff 0%, #8a2be2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   HAMBURGER MENU
   ============================================ */

.hamburger-menu {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.hamburger-menu::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.1), rgba(138, 43, 226, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hamburger-menu:hover::before {
    opacity: 1;
}

.hamburger-menu:hover {
    border-color: rgba(0, 191, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.2);
    transform: scale(1.05);
}

.hamburger-line {
    width: 22px;
    height: 2px;
    background: linear-gradient(90deg, #00bfff, #8a2be2);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
}

/* Hamburger Animation - Morphing X */
.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

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

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

.hamburger-menu.active {
    background: rgba(0, 191, 255, 0.1);
    border-color: rgba(0, 191, 255, 0.3);
}

/* ============================================
   HAMBURGER PANEL
   ============================================ */

.hamburger-panel {
    position: fixed;
    top: 0;
    left: -350px;
    width: 350px;
    height: 100vh;
    background: rgba(10, 14, 39, 0.98);
    backdrop-filter: blur(30px);
    border-right: 1px solid rgba(0, 191, 255, 0.2);
    box-shadow: 4px 0 40px rgba(0, 0, 0, 0.5);
    z-index: 999998;
    transition: left 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow-y: auto;
    overflow-x: hidden;
}

.hamburger-panel.active {
    left: 0;
    display: block;
}

.hamburger-panel-content {
    padding: 30px 20px;
    width: 100%;
    box-sizing: border-box;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-header h3 {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #00bfff 0%, #8a2be2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.menu-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 8px;
    color: #ff4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.menu-close:hover {
    background: rgba(255, 68, 68, 0.2);
    transform: rotate(90deg);
}

.hamburger-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #00bfff, #8a2be2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.menu-item:hover::before {
    transform: scaleY(1);
}

.menu-item:hover {
    background: rgba(0, 191, 255, 0.1);
    border-color: rgba(0, 191, 255, 0.3);
    color: white;
    transform: translateX(10px);
    box-shadow: 0 4px 20px rgba(0, 191, 255, 0.2);
}

.menu-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    color: #00bfff;
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999997;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ============================================
   GLOBAL SEARCH BAR
   ============================================ */

.global-search-container {
    flex: 1;
    max-width: 600px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    right: 16px;
    color: rgba(0, 191, 255, 0.6);
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1;
}

.global-search-input {
    width: 100%;
    padding: 14px 48px 14px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(10px);
}

.global-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.global-search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 191, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(0, 191, 255, 0.1),
                0 0 30px rgba(0, 191, 255, 0.2);
    transform: scale(1.02);
}

.global-search-input:focus + .search-icon {
    color: #00bfff;
    transform: scale(1.1);
}

.search-clear {
    position: absolute;
    right: 12px;
    width: 28px;
    height: 28px;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 6px;
    color: #ff4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-clear:hover {
    background: rgba(255, 68, 68, 0.2);
    transform: rotate(90deg);
}

/* ============================================
   HEADER STATUS
   ============================================ */

.header-status {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 8px;
    font-size: 13px;
    color: #00ff88;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

/* ============================================
   USER PROFILE DROPDOWN
   ============================================ */

.user-profile-section {
    position: relative !important;
    flex-shrink: 0;
    z-index: 999999 !important;
}

.user-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 191, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.1);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #00bfff 0%, #8a2be2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
}

.user-dropdown-trigger.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* User Dropdown Menu */
.user-dropdown-menu {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    right: 0 !important;
    width: 280px;
    background: rgba(10, 14, 39, 0.95) !important;
    backdrop-filter: blur(30px);
    border: 1px solid rgba(0, 191, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 999999 !important;
    pointer-events: none;
}

.user-dropdown-menu.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    display: block !important;
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #00bfff 0%, #8a2be2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    overflow: hidden;
}

.user-name-large {
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dropdown-item:hover {
    background: rgba(0, 191, 255, 0.1);
    color: white;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: #00bfff;
}

.dropdown-item.logout-item {
    color: rgba(255, 68, 68, 0.8);
}

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

.dropdown-item.logout-item i {
    color: #ff4444;
}

/* ============================================
   AUTH BUTTONS (Not Logged In)
   ============================================ */

.auth-buttons {
    flex-shrink: 0;
}

.btn-signin {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #00bfff 0%, #8a2be2 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 191, 255, 0.3);
}

.btn-signin:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 191, 255, 0.4);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .global-search-container {
        max-width: 400px;
    }
    
    .user-name {
        display: none;
    }
    
    .system-status span {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 10px 15px;
        gap: 12px;
    }
    
    .logo span {
        display: none;
    }
    
    .global-search-container {
        max-width: 100%;
    }
    
    .global-search-input {
        padding: 12px 40px 12px 40px;
        font-size: 13px;
    }
    
    .header-status {
        display: none;
    }
    
    .hamburger-panel {
        width: 280px;
        left: -280px;
    }
}

@media (max-width: 480px) {
    .global-search-input::placeholder {
        content: 'Search...';
    }
}
