/* ============================================
   HEADER MENU STYLES
   Designed to fit within MainLayout header
   Uses dark navy background (#06061e) to match sidebar
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --header-primary: #667eea;
    --header-primary-dark: #5a67d8;
    --header-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --header-text-primary: #ffffff;
    --header-text-secondary: #e2e8f0;
    --header-text-muted: #a0aec0;
    /* Dark navy background to match sidebar */
    --header-bg: #06061e;
    --header-bg-secondary: #0d0d2b;
 --header-border: #2d365a;
    --header-transition: all 0.25s ease;
    --header-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================
   HEADER SECTION - Fills the header container
   Cross-browser compatible with fallback colors
   ============================================ */
.header-section {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    width: 100%;
    /* Fallback dark navy color for all browsers */
    background-color: #06061e;
    background: #06061e;
    background: var(--header-bg, #06061e);
}

/* ============================================
   HEADER CONTAINER - Top bar with search/profile
   ============================================ */
.header-container {
    width: 100%;
    /* Explicit dark navy fallback background colors for cross-browser support */
    background-color: #06061e;
    background: #06061e;
    background: var(--header-bg, #06061e);
    /* Fallback border */
    border-bottom: 1px solid #2d365a;
    border-bottom: 1px solid var(--header-border, #2d365a);
}

/* ============================================
   HEADER INNER CONTENT
   Row with title, search, and profile
   ============================================ */
.header-inner-content {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    width: 100%;
    /* Ensure dark navy background is set here too for nested content */
    background-color: #06061e;
    background: #06061e;
    background: var(--header-bg, #06061e);
    /* Padding creates breathing room */
    padding: 14px 16px;
    min-height: 68px;
    gap: 12px;
}

/* Tablet */
@media (min-width: 640px) {
    .header-inner-content {
 padding: 16px 20px;
    min-height: 72px;
        gap: 16px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .header-inner-content {
        padding: 18px 24px;
        min-height: 76px;
        gap: 20px;
    }
}

/* Large Desktop */
@media (min-width: 1440px) {
    .header-inner-content {
        padding: 20px 32px;
        min-height: 80px;
    }
}

/* ============================================
   PAGE TITLE
 ============================================ */
.page-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-family: var(--header-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 1.0625rem;
    font-weight: 600;
    color: #ffffff;
    color: var(--header-text-primary, #ffffff);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
 letter-spacing: -0.01em;
    line-height: 1.3;
}

@media (min-width: 640px) {
    .page-title {
        font-size: 1.125rem;
    }
}

@media (min-width: 1024px) {
    .page-title {
  font-size: 1.25rem;
    }
}

/* ============================================
   SEARCH CONTAINER
 ============================================ */
.search-container {
    position: relative;
    -webkit-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
  transition: all 0.25s ease;
  transition: var(--header-transition, all 0.25s ease);
}

.search-container input[type="search"] {
    width: 100%;
    height: 40px;
    padding: 0 14px 0 26px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-family: var(--header-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 14px;
    color: #ffffff;
    color: var(--header-text-primary, #ffffff);
    /* Dark secondary background for search */
 background-color: #0d0d2b;
 background: #0d0d2b;
    background: var(--header-bg-secondary, #0d0d2b);
    border: 2px solid #2d365a;
    border: 2px solid var(--header-border, #2d365a);
 -webkit-border-radius: 20px;
    border-radius: 20px;
    outline: none;
    -webkit-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
  transition: all 0.25s ease;
    transition: var(--header-transition, all 0.25s ease);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.search-container input[type="search"]::-webkit-input-placeholder {
    color: #a0aec0;
    color: var(--header-text-muted, #a0aec0);
}

.search-container input[type="search"]::-moz-placeholder {
    color: #a0aec0;
    color: var(--header-text-muted, #a0aec0);
}

.search-container input[type="search"]:-ms-input-placeholder {
    color: #a0aec0;
    color: var(--header-text-muted, #a0aec0);
}

.search-container input[type="search"]::placeholder {
    color: #a0aec0;
    color: var(--header-text-muted, #a0aec0);
}

.search-container input[type="search"]:focus {
    background-color: #0d0d2b;
    background: #0d0d2b;
    background: var(--header-bg-secondary, #0d0d2b);
 border-color: #667eea;
    border-color: var(--header-primary, #667eea);
    -webkit-box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
}

.search-container input[type="search"]:focus::-webkit-input-placeholder {
    opacity: 0.5;
}

.search-container input[type="search"]:focus::-moz-placeholder {
    opacity: 0.5;
}

.search-container input[type="search"]:focus:-ms-input-placeholder {
    opacity: 0.5;
}

.search-container input[type="search"]:focus::placeholder {
    opacity: 0.5;
}

.search-container input[type="search"]::-webkit-search-decoration,
.search-container input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    display: none;
}

@media (min-width: 640px) {
    .search-container input[type="search"] {
height: 42px;
     font-size: 14px;
        -webkit-border-radius: 21px;
   border-radius: 21px;
    }
}

@media (min-width: 1024px) {
    .search-container input[type="search"] {
        height: 44px;
        min-width: 280px;
-webkit-border-radius: 22px;
        border-radius: 22px;
    }
}

/* ============================================
   PROFILE AVATAR
   ============================================ */
.profile-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    overflow: hidden;
    /* Dark background for avatar */
    background-color: #0d0d2b;
    background: #0d0d2b;
    background: var(--header-bg-secondary, #0d0d2b);
    /* Border matching theme */
    border: 2px solid #2d365a;
    border: 2px solid var(--header-border, #2d365a);
    cursor: pointer;
    -webkit-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
    transition: all 0.25s ease;
    transition: var(--header-transition, all 0.25s ease);
 -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
  -o-object-fit: cover;
    object-fit: cover;
    -o-object-position: center;
 object-position: center;
    -webkit-transition: all 0.25s ease;
 -o-transition: all 0.25s ease;
    transition: all 0.25s ease;
    transition: var(--header-transition, all 0.25s ease);
}

.profile-avatar:hover {
    border-color: #667eea;
    border-color: var(--header-primary, #667eea);
    -webkit-box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
    -webkit-transform: scale(1.05);
    -ms-transform: scale(1.05);
    transform: scale(1.05);
}

.profile-avatar:active {
    -webkit-transform: scale(0.98);
    -ms-transform: scale(0.98);
    transform: scale(0.98);
}

@media (min-width: 640px) {
    .profile-avatar {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
}

@media (min-width: 1024px) {
    .profile-avatar {
        width: 48px;
  height: 48px;
      min-width: 48px;
        min-height: 48px;
    }
}

/* ============================================
   MOBILE HAMBURGER MENU TRIGGER
   ============================================ */
.modern-menu-trigger {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
 -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
  justify-content: center;
    width: 40px;
    height: 40px;
    /* Dark background */
    background-color: #0d0d2b;
    background: #0d0d2b;
    background: var(--header-bg-secondary, #0d0d2b);
    border: none;
    -webkit-border-radius: 10px;
    border-radius: 10px;
    cursor: pointer;
    -webkit-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
    transition: all 0.25s ease;
    transition: var(--header-transition, all 0.25s ease);
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.modern-menu-trigger:hover {
    background-color: rgba(102, 126, 234, 0.2);
    background: rgba(102, 126, 234, 0.2);
}

.modern-menu-trigger:active {
    -webkit-transform: scale(0.95);
    -ms-transform: scale(0.95);
    transform: scale(0.95);
}

.modern-menu-trigger:focus {
    outline: none;
    -webkit-box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.menu-icon {
    width: 18px;
    height: 12px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

.menu-line {
    width: 100%;
    height: 2px;
    background-color: #667eea;
    background: #667eea;
    background: var(--header-primary, #667eea);
    -webkit-border-radius: 2px;
    border-radius: 2px;
    -webkit-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
    transition: all 0.25s ease;
    transition: var(--header-transition, all 0.25s ease);
    -webkit-transform-origin: center;
    -ms-transform-origin: center;
    transform-origin: center;
}

.modern-menu-trigger.menu-open .menu-line:nth-child(1) {
    -webkit-transform: translateY(5px) rotate(45deg);
    -ms-transform: translateY(5px) rotate(45deg);
    transform: translateY(5px) rotate(45deg);
}

.modern-menu-trigger.menu-open .menu-line:nth-child(2) {
    opacity: 0;
    -webkit-transform: scaleX(0);
    -ms-transform: scaleX(0);
    transform: scaleX(0);
}

.modern-menu-trigger.menu-open .menu-line:nth-child(3) {
    -webkit-transform: translateY(-5px) rotate(-45deg);
    -ms-transform: translateY(-5px) rotate(-45deg);
    transform: translateY(-5px) rotate(-45deg);
}

/* ============================================
   MENU OVERLAY
   ============================================ */
.menu-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0);
    background: rgba(0, 0, 0, 0);
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    -webkit-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
    transition: all 0.25s ease;
  transition: var(--header-transition, all 0.25s ease);
}

.menu-overlay-active {
    opacity: 1;
    visibility: visible;
    background-color: rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* ============================================
   SLIDE-IN MENU PANEL
   ============================================ */
.modern-menu-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 85%;
    max-width: 360px;
    /* Dark navy background for menu panel */
    background-color: #06061e;
    background: #06061e;
    background: var(--header-bg, #06061e);
    -webkit-box-shadow: -6px 0 24px rgba(0, 0, 0, 0.3);
    box-shadow: -6px 0 24px rgba(0, 0, 0, 0.3);
    z-index: 151;
    -webkit-transform: translateX(100%);
-ms-transform: translateX(100%);
    transform: translateX(100%);
    opacity: 0;
    -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
 -o-transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
 transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    overflow: hidden;
}

.menu-panel-active {
    -webkit-transform: translateX(0);
    -ms-transform: translateX(0);
    transform: translateX(0);
    opacity: 1;
}

/* ============================================
   MENU PANEL HEADER
   ============================================ */
.menu-panel-header {
    /* Gradient header */
    background-color: #667eea;
    background: -webkit-linear-gradient(315deg, #667eea 0%, #764ba2 100%);
  background: -o-linear-gradient(315deg, #667eea 0%, #764ba2 100%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: var(--header-gradient, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
  padding: 20px 16px;
    position: relative;
 overflow: hidden;
}

.menu-panel-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 180px;
    height: 180px;
    background: -webkit-radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    background: -o-radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    -webkit-border-radius: 50%;
    border-radius: 50%;
    pointer-events: none;
}

.menu-panel-header-content {
    display: -webkit-box;
    display: -ms-flexbox;
  display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.menu-brand {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
 -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 10px;
}

.menu-brand-icon {
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    -webkit-border-radius: 10px;
    border-radius: 10px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.menu-brand-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-family: var(--header-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
}

.menu-close-btn {
    width: 36px;
    height: 36px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    -webkit-border-radius: 10px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    -webkit-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
    transition: all 0.25s ease;
    transition: var(--header-transition, all 0.25s ease);
}

.menu-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.3);
    -webkit-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    transform: rotate(90deg);
}

/* ============================================
   MENU PANEL CONTENT
   ============================================ */
.menu-panel-content {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    overflow-y: auto;
  padding: 16px 0;
    -webkit-overflow-scrolling: touch;
    /* Dark navy background */
    background-color: #06061e;
  background: #06061e;
    background: var(--header-bg, #06061e);
}

/* ============================================
 MENU ITEMS
   ============================================ */
.menu-item {
    display: -webkit-box;
  display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin: 4px 10px;
    -webkit-border-radius: 12px;
    border-radius: 12px;
    text-decoration: none;
    color: #ffffff;
    color: var(--header-text-primary, #ffffff);
    background-color: transparent;
    background: transparent;
    -webkit-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
    transition: all 0.25s ease;
    transition: var(--header-transition, all 0.25s ease);
    cursor: pointer;
    min-height: 56px;
    position: relative;
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    /* Gradient overlay */
    background-color: rgba(102, 126, 234, 0.1);
    background: -webkit-linear-gradient(315deg, #667eea 0%, #764ba2 100%);
background: -o-linear-gradient(315deg, #667eea 0%, #764ba2 100%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
background: var(--header-gradient, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    opacity: 0;
    -webkit-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
    transition: all 0.25s ease;
    transition: var(--header-transition, all 0.25s ease);
    -webkit-border-radius: 12px;
    border-radius: 12px;
}

.menu-item:hover::before,
.menu-item:active::before {
    opacity: 0.15;
}

.menu-item:active {
    -webkit-transform: scale(0.98);
    -ms-transform: scale(0.98);
    transform: scale(0.98);
}

.menu-item-icon {
    width: 40px;
    height: 40px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    /* Subtle background */
    background-color: rgba(102, 126, 234, 0.15);
    background: -webkit-linear-gradient(315deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.12) 100%);
    background: -o-linear-gradient(315deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.12) 100%);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.12) 100%);
    -webkit-border-radius: 10px;
    border-radius: 10px;
    color: #667eea;
    color: var(--header-primary, #667eea);
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    -webkit-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
    transition: all 0.25s ease;
    transition: var(--header-transition, all 0.25s ease);
}

.menu-item:hover .menu-item-icon {
    /* Gradient on hover */
    background-color: #667eea;
    background: -webkit-linear-gradient(315deg, #667eea 0%, #764ba2 100%);
    background: -o-linear-gradient(315deg, #667eea 0%, #764ba2 100%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: var(--header-gradient, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    color: white;
  -webkit-transform: scale(1.05);
    -ms-transform: scale(1.05);
    transform: scale(1.05);
}

.menu-item-content {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 2px;
    position: relative;
    z-index: 1;
}

.menu-item-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-family: var(--header-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    color: var(--header-text-primary, #ffffff);
    line-height: 1.4;
}

.menu-item-description {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
font-family: var(--header-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 0.75rem;
    color: #a0aec0;
    color: var(--header-text-muted, #a0aec0);
    line-height: 1.3;
}

.menu-item-arrow {
  width: 18px;
    height: 18px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
 justify-content: center;
    color: #a0aec0;
    color: var(--header-text-muted, #a0aec0);
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    -webkit-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
    transition: all 0.25s ease;
    transition: var(--header-transition, all 0.25s ease);
}

.menu-item:hover .menu-item-arrow {
    color: #667eea;
    color: var(--header-primary, #667eea);
    -webkit-transform: translateX(3px);
    -ms-transform: translateX(3px);
 transform: translateX(3px);
}

/* ============================================
   MENU PANEL FOOTER
   ============================================ */
.menu-panel-footer {
    padding: 14px 14px;
    padding-bottom: 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
    /* Slightly lighter dark background */
    background-color: #0d0d2b;
    background: #0d0d2b;
    background: var(--header-bg-secondary, #0d0d2b);
    border-top: 1px solid #2d365a;
    border-top: 1px solid var(--header-border, #2d365a);
}

.menu-footer-content {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.menu-footer-user {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 12px;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    padding: 12px;
    /* Dark background */
    background-color: #06061e;
    background: #06061e;
    background: var(--header-bg, #06061e);
    -webkit-border-radius: 14px;
    border-radius: 14px;
    border: 1px solid #2d365a;
    border: 1px solid var(--header-border, #2d365a);
    -webkit-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
    transition: all 0.25s ease;
    transition: var(--header-transition, all 0.25s ease);
 cursor: pointer;
}

.menu-footer-user:hover {
    border-color: #667eea;
    border-color: var(--header-primary, #667eea);
    -webkit-box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.menu-footer-avatar {
    width: 48px;
    height: 48px;
  -webkit-border-radius: 12px;
    border-radius: 12px;
    -o-object-fit: cover;
    object-fit: cover;
    border: 2px solid #2d365a;
    border: 2px solid var(--header-border, #2d365a);
    -webkit-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
    transition: all 0.25s ease;
    transition: var(--header-transition, all 0.25s ease);
}

.menu-footer-user:hover .menu-footer-avatar {
    border-color: #667eea;
    border-color: var(--header-primary, #667eea);
}

.menu-footer-user-info {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 2px;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    min-width: 0;
}

.menu-footer-user-name {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-family: var(--header-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    color: var(--header-text-primary, #ffffff);
    overflow: hidden;
    -o-text-overflow: ellipsis;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-footer-user-status {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-family: var(--header-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  font-size: 0.75rem;
    color: #a0aec0;
    color: var(--header-text-muted, #a0aec0);
}

/* ============================================
   DESKTOP NAVIGATION BAR
   ============================================ */
.desktop-menu-container {
    /* Slightly lighter dark background for nav bar */
    background-color: #0d0d2b;
    background: #0d0d2b;
    background: var(--header-bg-secondary, #0d0d2b);
    border-bottom: 1px solid #2d365a;
    border-bottom: 1px solid var(--header-border, #2d365a);
}

.desktop-menu-wrapper {
    max-width: 100%;
    margin: 0;
    padding: 0 24px;
    display: -webkit-box;
 display: -ms-flexbox;
    display: flex;
-webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    min-height: 48px;
}

@media (min-width: 1440px) {
    .desktop-menu-wrapper {
      padding: 0 32px;
    }
}

.desktop-menu-nav {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
-webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 6px;
}

/* ============================================
   DESKTOP MENU ITEMS
 ============================================ */
.desktop-menu-item {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    -webkit-border-radius: 8px;
    border-radius: 8px;
    text-decoration: none;
    color: #e2e8f0;
  color: var(--header-text-secondary, #e2e8f0);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-family: var(--header-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  font-size: 0.8125rem;
    font-weight: 500;
    -webkit-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
  transition: all 0.25s ease;
  transition: var(--header-transition, all 0.25s ease);
    cursor: pointer;
}

.desktop-menu-item::before {
    content: '';
    position: absolute;
    top: 0;
  right: 0;
    bottom: 0;
    left: 0;
    /* Gradient overlay */
    background-color: rgba(102, 126, 234, 0.15);
    background: -webkit-linear-gradient(315deg, #667eea 0%, #764ba2 100%);
    background: -o-linear-gradient(315deg, #667eea 0%, #764ba2 100%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: var(--header-gradient, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    opacity: 0;
    -webkit-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
    transition: all 0.25s ease;
    transition: var(--header-transition, all 0.25s ease);
    -webkit-border-radius: 8px;
    border-radius: 8px;
}

.desktop-menu-item:hover::before {
    opacity: 0.15;
}

.desktop-menu-item:hover {
    color: #ffffff;
    color: var(--header-text-primary, #ffffff);
}

.desktop-menu-item-icon {
    width: 28px;
    height: 28px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    /* Subtle background */
    background-color: rgba(102, 126, 234, 0.15);
    background: -webkit-linear-gradient(315deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.12) 100%);
    background: -o-linear-gradient(315deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.12) 100%);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.12) 100%);
    -webkit-border-radius: 6px;
    border-radius: 6px;
    color: #667eea;
    color: var(--header-primary, #667eea);
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    -webkit-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
    transition: all 0.25s ease;
    transition: var(--header-transition, all 0.25s ease);
}

.desktop-menu-item:hover .desktop-menu-item-icon {
    /* Gradient on hover */
    background-color: #667eea;
    background: -webkit-linear-gradient(315deg, #667eea 0%, #764ba2 100%);
background: -o-linear-gradient(315deg, #667eea 0%, #764ba2 100%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: var(--header-gradient, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    color: white;
    -webkit-transform: scale(1.05);
    -ms-transform: scale(1.05);
    transform: scale(1.05);
    -webkit-box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.desktop-menu-item-text {
  position: relative;
    z-index: 1;
    white-space: nowrap;
}

.desktop-menu-item-indicator {
    position: absolute;
    bottom: -1px;
    left: 50%;
    -webkit-transform: translateX(-50%) scaleX(0);
    -ms-transform: translateX(-50%) scaleX(0);
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    /* Gradient indicator */
    background-color: #667eea;
    background: -webkit-linear-gradient(315deg, #667eea 0%, #764ba2 100%);
    background: -o-linear-gradient(315deg, #667eea 0%, #764ba2 100%);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: var(--header-gradient, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    -webkit-border-radius: 2px 2px 0 0;
 border-radius: 2px 2px 0 0;
    -webkit-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
    transition: all 0.25s ease;
    transition: var(--header-transition, all 0.25s ease);
}

.desktop-menu-item:hover .desktop-menu-item-indicator {
    -webkit-transform: translateX(-50%) scaleX(1);
    -ms-transform: translateX(-50%) scaleX(1);
    transform: translateX(-50%) scaleX(1);
}

/* ============================================
   PREMIUM BADGE
   ============================================ */
.desktop-menu-badge {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
  -ms-flex-align: center;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    /* Gradient badge */
    background-color: #667eea;
    background: -webkit-linear-gradient(315deg, #667eea 0%, #764ba2 100%);
    background: -o-linear-gradient(315deg, #667eea 0%, #764ba2 100%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: var(--header-gradient, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    color: white;
    -webkit-border-radius: 16px;
    border-radius: 16px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-family: var(--header-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 0.75rem;
    font-weight: 600;
    -webkit-box-shadow: 0 3px 10px rgba(102, 126, 234, 0.35);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.35);
-webkit-animation: badge-glow 3s ease-in-out infinite;
    animation: badge-glow 3s ease-in-out infinite;
}

.desktop-menu-badge svg {
    -webkit-animation: spin-slow 6s linear infinite;
    animation: spin-slow 6s linear infinite;
}

@-webkit-keyframes badge-glow {
    0%, 100% { -webkit-box-shadow: 0 3px 10px rgba(102, 126, 234, 0.35); box-shadow: 0 3px 10px rgba(102, 126, 234, 0.35); }
    50% { -webkit-box-shadow: 0 3px 16px rgba(102, 126, 234, 0.5); box-shadow: 0 3px 16px rgba(102, 126, 234, 0.5); }
}

@keyframes badge-glow {
    0%, 100% { -webkit-box-shadow: 0 3px 10px rgba(102, 126, 234, 0.35); box-shadow: 0 3px 10px rgba(102, 126, 234, 0.35); }
    50% { -webkit-box-shadow: 0 3px 16px rgba(102, 126, 234, 0.5); box-shadow: 0 3px 16px rgba(102, 126, 234, 0.5); }
}

@-webkit-keyframes spin-slow {
    from { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
    to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

@keyframes spin-slow {
    from { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
    to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE & ACCESSIBILITY
   ============================================ */
@media (min-width: 640px) {
    .modern-menu-panel {
        max-width: 380px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        -webkit-animation-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        -webkit-transition-duration: 0.01ms !important;
      -o-transition-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .header-container {
      border-bottom-width: 2px;
    }
    
    .profile-avatar {
        border-width: 3px;
    }
}

/* Focus states */
.menu-item:focus-visible,
.modern-menu-trigger:focus-visible,
.menu-close-btn:focus-visible,
.desktop-menu-item:focus-visible,
.profile-avatar:focus-visible {
    outline: 3px solid #667eea;
    outline: 3px solid var(--header-primary, #667eea);
  outline-offset: 2px;
}

/* Safe area for notched phones */
@supports (padding-top: env(safe-area-inset-top)) {
    .header-section {
        padding-top: env(safe-area-inset-top);
    }
}
