/* Modern Navigation Styles for StudentNavMenu */

.top-navbar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    z-index: var(--z-fixed, 1030);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e5e7eb;
    border-bottom: 1px solid var(--gray-200, #e5e7eb);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: var(--transition-all, all 0.3s cubic-bezier(0.4, 0, 0.2, 1));
}
.lanuguageStyle {
    appearance: none;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpolygon points='0,0 10,0 5,7' fill='%23ccc'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

    .lanuguageStyle:focus {
        outline: none;
        border-color: #66afe9;
    }
/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.75rem;
    padding: var(--space-3, 0.75rem);
    margin-right: 1rem;
    margin-right: var(--space-4, 1rem);
    border-radius: 0.5rem;
    border-radius: var(--radius-lg, 0.5rem);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: var(--transition-all, all 0.3s cubic-bezier(0.4, 0, 0.2, 1));
    color: #374151;
    color: var(--gray-700, #374151);
}

.mobile-menu-toggle:hover {
    background: #f3f4f6;
    background: var(--gray-100, #f3f4f6);
    color: #111827;
    color: var(--gray-900, #111827);
}

.hamburger-icon {
    font-size: 1.25rem;
    font-size: var(--text-xl, 1.25rem);
    font-weight: 400;
    font-weight: var(--font-weight-normal, 400);
}

/* Brand Section */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    gap: var(--space-3, 0.75rem);
    padding: 1rem 1.5rem;
    padding: var(--space-4, 1rem) var(--space-6, 1.5rem);
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0b7fd9, #1289e7);
    background: var(--gradient-primary, linear-gradient(135deg, #0b7fd9, #1289e7));
    border-radius: 0.75rem;
    border-radius: var(--radius-xl, 0.75rem);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: var(--transition-all, all 0.3s cubic-bezier(0.4, 0, 0.2, 1));
}

.brand-logo:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1));
}

.logo-icon {
    font-size: 1.25rem;
    font-size: var(--text-xl, 1.25rem);
    color: #ffffff;
    color: var(--white, #ffffff);
}

.brand-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-name {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-family: var(--font-display, 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 1.25rem;
    font-size: var(--text-xl, 1.25rem);
    font-weight: 700;
    font-weight: var(--font-weight-bold, 700);
    color: #111827;
    color: var(--gray-900, #111827);
    line-height: 1;
}

.brand-tagline {
    font-size: 0.875rem;
    font-size: var(--text-sm, 0.875rem);
    color: #4b5563;
    color: var(--gray-600, #4b5563);
    font-weight: 500;
    font-weight: var(--font-weight-medium, 500);
    line-height: 1;
}

/* Main Navigation */
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    gap: var(--space-2, 0.5rem);
    flex: 1;
    justify-content: center;
    padding: 0 1rem;
    padding: 0 var(--space-4, 1rem);
}

.nav-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    gap: var(--space-2, 0.5rem);
    background: #f9fafb;
    background: var(--hub-paper, #f7f4ee); /* the student shell is paper (Oct 2026) */
    border-radius: 1.5rem;
    border-radius: var(--radius-2xl, 1.5rem);
    padding: 0.5rem;
    padding: var(--space-2, 0.5rem);
    border: 1px solid #e5e7eb;
    border: 1px solid var(--gray-200, #e5e7eb);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    gap: var(--space-2, 0.5rem);
    padding: 0.75rem 1rem;
    padding: var(--space-3, 0.75rem) var(--space-4, 1rem);
    border-radius: 0.75rem;
    border-radius: var(--radius-xl, 0.75rem);
    text-decoration: none;
    color: #374151;
    color: var(--gray-700, #374151);
    font-weight: 500;
    font-weight: var(--font-weight-medium, 500);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: var(--transition-all, all 0.3s cubic-bezier(0.4, 0, 0.2, 1));
    position: relative;
    white-space: nowrap;
    font-size: 0.875rem;
    font-size: var(--text-sm, 0.875rem);
    border: 1px solid transparent;
}

.nav-item:hover {
    background: #ffffff;
    background: var(--white, #ffffff);
    color: #111827;
    color: var(--gray-900, #111827);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1));
    border-color: #e5e7eb;
    border-color: var(--gray-200, #e5e7eb);
}

.nav-item.active {
    background: #ffffff;
    background: var(--white, #ffffff);
    color: #0b7fd9;
    color: var(--primary-color, #0b7fd9);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1));
    border-color: #0b7fd9;
    border-color: var(--primary-color, #0b7fd9);
}

.nav-item.active .nav-icon {
    filter: grayscale(0);
}

.nav-icon {
    font-size: 1.125rem;
    font-size: var(--text-lg, 1.125rem);
    filter: grayscale(20%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: var(--transition-all, all 0.3s cubic-bezier(0.4, 0, 0.2, 1));
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
}

.nav-text {
    font-size: 0.875rem;
    font-size: var(--text-sm, 0.875rem);
    font-weight: 500;
    font-weight: var(--font-weight-medium, 500);
}

.nav-badge {
    background: #0b7fd9;
    background: var(--primary-color, #0b7fd9);
    color: #ffffff;
    color: var(--white, #ffffff);
    font-size: 0.75rem;
    font-size: var(--text-xs, 0.75rem);
    font-weight: 700;
    font-weight: var(--font-weight-bold, 700);
    padding: 2px 6px;
    border-radius: 9999px;
    border-radius: var(--radius-full, 9999px);
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.nav-badge.new {
    background: #ef4444;
    background: var(--error, #ef4444);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* User Profile & Actions */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    gap: var(--space-3, 0.75rem);
    padding-right: 1.5rem;
    padding-right: var(--space-6, 1.5rem);
    flex-shrink: 0;
}

/* User Profile Dropdown */
.user-profile-dropdown {
    position: relative;
}

.user-profile-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    gap: var(--space-3, 0.75rem);
    padding: 0.5rem;
    padding: var(--space-2, 0.5rem);
    background: none;
    border: 1px solid #e5e7eb;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 0.75rem;
    border-radius: var(--radius-xl, 0.75rem);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: var(--transition-all, all 0.3s cubic-bezier(0.4, 0, 0.2, 1));
    color: #374151;
    color: var(--gray-700, #374151);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
    background: #ffffff;
    background: var(--white, #ffffff);
}

.user-profile-toggle:hover {
    border-color: #d1d5db;
    border-color: var(--gray-300, #d1d5db);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1));
    transform: translateY(-1px);
    color: #111827;
    color: var(--gray-900, #111827);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #0b7fd9, #1289e7);
    background: var(--gradient-primary, linear-gradient(135deg, #0b7fd9, #1289e7));
    border-radius: 9999px;
    border-radius: var(--radius-full, 9999px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    color: var(--white, #ffffff);
    font-weight: 700;
    font-weight: var(--font-weight-bold, 700);
    font-size: 0.875rem;
    font-size: var(--text-sm, 0.875rem);
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    text-align: left;
}

.user-name {
    font-size: 0.875rem;
    font-size: var(--text-sm, 0.875rem);
    font-weight: 600;
    font-weight: var(--font-weight-semibold, 600);
    color: #111827;
    color: var(--gray-900, #111827);
    line-height: 1;
}

.user-status {
    font-size: 0.75rem;
    font-size: var(--text-xs, 0.75rem);
    color: #4b5563;
    color: var(--gray-600, #4b5563);
    line-height: 1;
}

.dropdown-arrow {
    font-size: 0.75rem;
    font-size: var(--text-xs, 0.75rem);
    color: #6b7280;
    color: var(--gray-500, #6b7280);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: var(--transition-all, all 0.3s cubic-bezier(0.4, 0, 0.2, 1));
    margin-left: 0.25rem;
    margin-left: var(--space-1, 0.25rem);
}

.user-profile-dropdown:hover .dropdown-arrow {
    color: #374151;
    color: var(--gray-700, #374151);
}

/* User Dropdown Menu */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1000;
    z-index: var(--z-dropdown, 1000);
    min-width: 280px;
    background: #ffffff;
    background: var(--white, #ffffff);
    border: 1px solid #e5e7eb;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 1rem;
    border-radius: var(--radius-2xl, 1rem);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1));
    padding: 1rem;
    padding: var(--space-4, 1rem);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: var(--transition-all, all 0.3s cubic-bezier(0.4, 0, 0.2, 1));
    backdrop-filter: blur(12px);
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


.dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    gap: var(--space-3, 0.75rem);
    padding: 0.75rem 0;
    padding: var(--space-3, 0.75rem) 0;
    border-bottom: 1px solid #f3f4f6;
    border-bottom: 1px solid var(--gray-100, #f3f4f6);
    margin-bottom: 0.75rem;
    margin-bottom: var(--space-3, 0.75rem);
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0b7fd9, #1289e7);
    background: var(--gradient-primary, linear-gradient(135deg, #0b7fd9, #1289e7));
    border-radius: 9999px;
    border-radius: var(--radius-full, 9999px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    color: var(--white, #ffffff);
    font-weight: 700;
    font-weight: var(--font-weight-bold, 700);
    font-size: 1.125rem;
    font-size: var(--text-lg, 1.125rem);
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1));
}

.dropdown-user-name {
    font-size: 1rem;
    font-size: var(--text-base, 1rem);
    font-weight: 600;
    font-weight: var(--font-weight-semibold, 600);
    color: #111827;
    color: var(--gray-900, #111827);
    line-height: 1.2;
}

.dropdown-user-status {
    font-size: 0.875rem;
    font-size: var(--text-sm, 0.875rem);
    color: #4b5563;
    color: var(--gray-600, #4b5563);
    line-height: 1.2;
}

.dropdown-divider {
    height: 1px;
    background: #f3f4f6;
    background: var(--gray-100, #f3f4f6);
    margin: 0.75rem 0;
    margin: var(--space-3, 0.75rem) 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    gap: var(--space-3, 0.75rem);
    padding: 0.75rem 0.75rem;
    padding: var(--space-3, 0.75rem) var(--space-3, 0.75rem);
    color: #374151;
    color: var(--gray-700, #374151);
    text-decoration: none;
    border-radius: 0.5rem;
    border-radius: var(--radius-lg, 0.5rem);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: var(--transition-all, all 0.3s cubic-bezier(0.4, 0, 0.2, 1));
    font-weight: 500;
    font-weight: var(--font-weight-medium, 500);
    font-size: 0.875rem;
    font-size: var(--text-sm, 0.875rem);
}

.dropdown-item:hover {
    background: #f9fafb;
    background: var(--hub-paper, #f7f4ee); /* the student shell is paper (Oct 2026) */
    color: #111827;
    color: var(--gray-900, #111827);
    text-decoration: none;
    transform: translateX(2px);
}

.dropdown-item span:first-child {
    font-size: 1.125rem;
    font-size: var(--text-lg, 1.125rem);
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-form {
    margin: 0;
}

.logout-btn {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.logout-btn:hover {
    background: #f87171;
    background: var(--error-light, #f87171);
    color: #ef4444;
    color: var(--error, #ef4444);
}

/* Auth Actions */
.auth-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    gap: var(--space-2, 0.5rem);
}

.auth-actions .nav-item {
    background: #ffffff;
    background: var(--white, #ffffff);
    border: 1px solid #e5e7eb;
    border: 1px solid var(--gray-200, #e5e7eb);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
    padding: 0.5rem 1rem;
    padding: var(--space-2, 0.5rem) var(--space-4, 1rem);
}

.auth-actions .nav-item:first-child {
    background: #f9fafb;
    background: var(--hub-paper, #f7f4ee); /* the student shell is paper (Oct 2026) */
}

.auth-actions .nav-item:last-child {
    background: linear-gradient(135deg, #0b7fd9, #1289e7);
    background: var(--gradient-primary, linear-gradient(135deg, #0b7fd9, #1289e7));
    color: #ffffff;
    color: var(--white, #ffffff);
    border-color: transparent;
}

.auth-actions .nav-item:last-child:hover {
    background: linear-gradient(135deg, #1289e7, #0b7fd9);
    background: var(--gradient-secondary, linear-gradient(135deg, #1289e7, #0b7fd9));
    color: #ffffff;
    color: var(--white, #ffffff);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1));
}

/* Layout Styles */
.modern-layout {
    min-height: 100vh;
    background: #f9fafb;
    background: var(--hub-paper, #f7f4ee); /* the student shell is paper (Oct 2026) */
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 0;
}

.content-area {
    flex: 1;
    width: 100%;
}

.page-content {
    min-height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .navbar-nav {
        padding: 0 0.5rem;
        padding: 0 var(--space-2, 0.5rem);
    }
    
    .nav-group {
        gap: 0.25rem;
        gap: var(--space-1, 0.25rem);
    }
    
    .nav-item {
        padding: 0.5rem 0.75rem;
        padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
    }
    
    .user-info {
        display: none;
    }
}

@media (max-width: 768px) {
    .top-navbar {
        flex-wrap: wrap;
        padding: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
        order: 1;
    }
    
    .navbar-brand {
        order: 2;
        flex: 1;
    }
    
    .navbar-actions {
        order: 3;
        padding-right: 1rem;
        padding-right: var(--space-4, 1rem);
    }
    
    .navbar-nav {
        order: 4;
        width: 100%;
        justify-content: flex-start;
        padding: 1rem;
        padding: var(--space-4, 1rem);
        background: #ffffff;
        background: var(--white, #ffffff);
        border-top: 1px solid #e5e7eb;
        border-top: 1px solid var(--gray-200, #e5e7eb);
        display: none;
    }
    
    .navbar-nav.show {
        display: flex;
    }
    .hide {
        display: none;
    }
    
    .nav-group {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        background: #f9fafb;
        background: var(--hub-paper, #f7f4ee); /* the student shell is paper (Oct 2026) */
        padding: 1rem;
        padding: var(--space-4, 1rem);
    }
    
    .nav-item {
        justify-content: flex-start;
        padding: 1rem;
        padding: var(--space-4, 1rem);
        font-size: 1rem;
        font-size: var(--text-base, 1rem);
    }
    
    .nav-text {
        font-size: 1rem;
        font-size: var(--text-base, 1rem);
    }
    
    .user-dropdown-menu {
        right: 1rem;
        right: var(--space-4, 1rem);
        left: 1rem;
        left: var(--space-4, 1rem);
        min-width: auto;
    }
    
    .brand-tagline {
        display: none;
    }
    
    .page-content {
        min-height: calc(100vh - 70px);
    }
}

@media (max-width: 480px) {
    .navbar-brand {
        padding: 0.75rem 1rem;
        padding: var(--space-3, 0.75rem) var(--space-4, 1rem);
    }
    
    .brand-name {
        font-size: 1.125rem;
        font-size: var(--text-lg, 1.125rem);
    }
    
    .navbar-actions {
        gap: 0.5rem;
        gap: var(--space-2, 0.5rem);
        padding-right: 0.75rem;
        padding-right: var(--space-3, 0.75rem);
    }
}

/* Loading and Interactive States */
.nav-item:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
}

.user-profile-toggle:active {
    transform: translateY(0);
}

/* Focus States for Accessibility */
.nav-item:focus,
.user-profile-toggle:focus,
.dropdown-item:focus,
.mobile-menu-toggle:focus {
    outline: 2px solid #0b7fd9;
    outline: 2px solid var(--primary-color, #0b7fd9);
    outline-offset: 2px;
}

/* ============================================ */
/* MODERN MOBILE BOTTOM NAVIGATION */
/* ============================================ */

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05), 0 -2px 4px -2px rgba(0, 0, 0, 0.03);
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    justify-content: space-around;
    align-items: center;
    gap: 4px;
}

@media (max-width: 860px) {
    .mobile-bottom-nav {
        display: flex;
    }
    
    /* Hide hamburger menu on mobile when using bottom nav */
    .hamburger {
        display: none !important;
    }
    
    /* Hide old mobile panel when using bottom nav */
    .mobile-panel,
    .overlay {
        display: none !important;
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: #6b7280;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-width: 64px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.mobile-nav-item:hover {
    background: #f3f4f6;
    color: #374151;
}

.mobile-nav-item.active {
    color: #0b7fd9;
}

.mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: #0b7fd9;
    border-radius: 0 0 3px 3px;
}

.mobile-nav-icon {
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-item.active .mobile-nav-icon {
    transform: scale(1.1);
}

.mobile-nav-label {
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    color: #000000;
}

/* Avatar icon in mobile nav */
.avatar-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #0b7fd9, #1289e7);
    border-radius: 50%;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-item.active .avatar-icon {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #0b7fd9;
}

/* ============================================ */
/* MOBILE PROFILE PANEL (Bottom Sheet) */
/* ============================================ */

.mobile-profile-panel {
    display: none;
}

@media (max-width: 768px) {
    .mobile-profile-panel {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1050;
        pointer-events: none;
    }
    
    .mobile-profile-panel.open {
        pointer-events: auto;
    }
}

.mobile-profile-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-profile-panel.open .mobile-profile-backdrop {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.mobile-profile-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.1), 0 -8px 10px -6px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 80vh;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
}

.mobile-profile-panel.open .mobile-profile-content {
    transform: translateY(0);
}

.profile-handle {
    width: 40px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
    margin: 12px auto 8px;
}

.mobile-profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    position: relative;
}

.mobile-profile-header .avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #0b7fd9, #1289e7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-status {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.3;
}

.close-profile-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    color: #6b7280;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.close-profile-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.mobile-profile-body {
    padding: 8px 0;
    overflow-y: auto;
    max-height: calc(80vh - 120px);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 1rem;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.profile-menu-item:hover {
    background: #f9fafb;
    color: #111827;
}

.profile-menu-icon {
    font-size: 1.375rem;
    width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-menu-item.logout-btn {
    color: #ef4444;
    margin-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.profile-menu-item.logout-btn:hover {
    background: #fef2f2;
}

.lang-item {
    cursor: default;
}

.lang-item:hover {
    background: transparent;
}

/* ============================================ */
/* MOBILE AUTH VIEW (Bottom Bar) */
/* ============================================ */

.mobile-bottom-nav-auth {
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
}

.mobile-auth-content {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}

.mobile-auth-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.mobile-auth-btn.primary {
    background: #f9fafb;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.mobile-auth-btn.primary:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.mobile-auth-btn.secondary {
    background: linear-gradient(135deg, #0b7fd9, #1289e7);
    color: white;
    border: 1px solid transparent;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.mobile-auth-btn.secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
}

/* ============================================ */
/* TABLET ADJUSTMENTS */
/* ============================================ */

@media (min-width: 859px) and (max-width: 1024px) {
    .mobile-bottom-nav {
        display: none;
    }
    
    body {
        padding-bottom: 0;
    }
}

/* ============================================ */
/* SAFE AREA SUPPORT FOR NOTCHED DEVICES */
/* ============================================ */

@supports (padding: max(0px)) {
    .mobile-bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
    
    .mobile-profile-content {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}