.mobile-menu-wrapper {
    position: relative;
}

/* Modern Toggle Button */
.mobile-menu-toggle {
    background: #0048d8;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.mobile-menu-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 72, 216, 0.4);
    background: linear-gradient(135deg, #002b7a 0%, #0048d8 100%);
}

.mobile-menu-toggle:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 72, 216, 0.3);
}

/* Modern Hamburger Icon */
.hamburger-icon {
    position: relative;
    width: 20px;
    height: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-icon .line {
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

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

.mobile-menu-toggle.active .hamburger-icon .line-2 {
    opacity: 0;
    transform: scaleX(0);
}

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

.toggle-text {
    font-weight: 600;
    font-size: 14px;
}

/* Modern Off-canvas Panel */
.mobile-menu-offcanvas {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.mobile-menu-offcanvas.active {
    left: 0;
}

/* Modern Header */
.mobile-menu-header {
    padding: 20px;
    background: linear-gradient(135deg, #0048d8 0%, #0066ff 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 72, 216, 0.2);
}

.modern-header {
    background: linear-gradient(135deg, #0048d8 0%, #0066ff 100%);
    color: white;
    border-radius: 0 0 20px 20px;
}
.modern-header h3.modern-title{
	color:#fff;
}
/* User Info Section */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar img {
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.user-name {
    font-weight: 600;
    font-size: 16px;
}

.user-role {
    font-size: 12px;
    opacity: 0.8;
    text-transform: capitalize;
}

.login-prompt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-prompt:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Search Box */
.menu-search {
    padding: 20px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 12px 16px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: #0048d8;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 72, 216, 0.1);
}

.search-box .material-icons {
    color: #666;
    margin-right: 8px;
}

.search-input {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    font-size: 16px;
    color: #333;
}

.search-input::placeholder {
    color: #999;
}

/* Modern Menu Content */
.modern-content {
    background: white;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modern-menu {
    padding: 0;
}

.modern-menu li {
    margin: 0;
    padding: 0;
    position: relative;
}

.modern-menu a {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modern-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: #0048d8;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.modern-menu a:hover {
    color: #0048d8;
    background: #f8f9ff;
    padding-left: 24px;
}

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

/* Menu Footer */
.menu-footer {
    background: #f8f9fa;
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

.footer-links {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border-radius: 20px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.footer-link:hover {
    color: #0048d8;
    background: #f0f4ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.social-links {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.social-link:hover {
    color: #0048d8;
    background: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-menu-back {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #0048d8;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 30px;
    box-shadow: 0 4px 16px rgba(0,72,216,0.3);
    z-index: 1002;
    font-weight: 600;
    font-size: 16px;
    gap: 8px;
}

.mobile-menu-back.show {
    display: flex !important;
}

.mobile-menu-back:hover {
    color: #fff;
    background: #002b7a;
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(0,72,216,0.4);
}

.mobile-menu-back:active {
    transform: translateX(-50%) scale(0.95);
    background: #001f5c;
}

.mobile-menu-logo {
    max-width: 150px;
}

.mobile-menu-logo img {
    max-width: 100%;
    height: auto;
    width:200px;
}

.mobile-menu-close {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #dc3545;
    border: none;
    padding: 12px;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(220,53,69,0.3);
    z-index: 1002;
}

.mobile-menu-close.show {
    display: flex;
}

.mobile-menu-close:hover {
    color: #fff;
    background: #c82333;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(220,53,69,0.4);
}

.mobile-menu-close:active {
    transform: scale(0.95);
    background: #a71e2a;
}

.mobile-menu-content {
    padding: 15px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu li {
    margin: 0;
    padding: 0;
    position: relative;
}

.mobile-menu a {
    display: block;
    padding: 15px 0;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.3s ease;
}

.mobile-menu a:hover {
    color: #0048d8;
    padding-left: 5px;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Submenu styles */
.mobile-menu .menu-item > a{
    padding-left:10px;
}
.mobile-menu .menu-item-has-children > a {
    position: relative;
    padding-right: 44px;
}

.mobile-menu .menu-item-has-children > a:after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
    opacity: 0.5;
}

.mobile-menu .menu-item-has-children > a:hover:after {
    opacity: 1;
}

/* Submenu Panel Styles */
.submenu-panel {
    z-index: 1001;
}

.back-to-main {
    background: #0048d8;
    border: none;
    padding: 14px 24px;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    border-radius: 30px;
    margin: 32px 0 15px 0;
    align-self: center;
    width: 92%;
    max-width: 340px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.back-to-main .material-icons {
    font-size: 28px;
    color: #0048d8;
    transition: color 0.2s, transform 0.2s;
}
.back-to-main:hover {
    background: #0048d8;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,72,216,0.12);
    transform: scale(1.04);
}
.back-to-main:hover .material-icons {
    color: #fff;
}
.back-to-main:active {
    background: #002b7a;
    color: #fff;
    transform: scale(0.98);
}
.submenu-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.placeholder {
    width: 40px;
}

.submenu-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.submenu-items li a {
    display: block;
    padding: 15px 0;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.3s ease;
}

/* Active state styles */
.mobile-menu .current-menu-item > a {
    color: #0048d8;
    font-weight: 600;
}

/* Scrollbar styles */
.mobile-menu-content::-webkit-scrollbar {
    width: 5px;
}

.mobile-menu-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.mobile-menu-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

.mobile-menu-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.mobile-menu .sub-menu {
    display: none !important;
}

.submenu-flex {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding-bottom: 0;
}
.submenu-items {
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    margin-bottom: 0;
}
.mobile-menu .submenu-toggle {
    border: none;
    padding: 2px 15px;
    background: #fff;
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 2;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.mobile-menu .submenu-toggle .material-icons {
    font-size: 28px;
    color: #000;
    transition: color 0.2s, transform 0.2s;
}
.mobile-menu .submenu-toggle:focus,
.mobile-menu .submenu-toggle:hover {
    color:#0048d8;
    transform: scale(1.08);
}
.mobile-menu .submenu-toggle:active .material-icons {
    color: #002b7a;
    transform: scale(0.95);
}
.submenu-note {
    font-size: 15px;
    color: #888;
    margin-bottom: 10px;
    text-align: left;
    font-style: italic;
    display: block;
}
.submenu-items .parent-link a {
    position: relative;
    color: #0048d8 !important;
    font-weight: 700;
    border-radius: 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.parent-badge {
    display: inline-block;
    background: #f0f1f5;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    border-radius: 10px;
    padding: 2px 10px;
    margin-left: 10px;
    vertical-align: middle;
}

.main-menu-flex {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.main-menu-flex .mobile-menu-content {
    flex: 1 1 auto;
    overflow-y: auto;
}

.submenu-panel.submenu-flex {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.submenu-flex-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}
.submenu-items {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    margin-bottom: 0;
}

/* Modern Submenu Styles */
.modern-submenu-toggle {
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}


.modern-submenu-toggle .material-icons {
    font-size: 18px;
}

.modern-parent-link a {
    margin-bottom: 8px;
    font-weight: 600;
    color: #0048d8 !important;
    box-shadow: 0 2px 4px rgba(0, 72, 216, 0.1);
}

.modern-note {
    background: linear-gradient(135deg, #e8f0ff 0%, #f0f4ff 100%);
    border: 1px solid #d0d9ff;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #0048d8;
    font-weight: 500;
    font-size: 14px;
}

/* Loading Animation */
.modern-menu a.loading {
    position: relative;
    color: #999;
    pointer-events: none;
}

.modern-menu a.loading::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0048d8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Body scroll lock when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Modern overlay */
.modern-overlay {
    background: linear-gradient(135deg, rgba(0, 72, 216, 0.1) 0%, rgba(0, 102, 255, 0.1) 100%);
    backdrop-filter: blur(5px);
}

/* Responsive improvements */
@media (max-width: 480px) {
    .mobile-menu-toggle {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .hamburger-icon {
        width: 18px;
        height: 14px;
    }
    
    .user-details {
        display: none;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .footer-link {
        justify-content: center;
    }
}


/* Accessibility improvements */
.mobile-menu-toggle:focus,
.mobile-menu-close:focus,
.submenu-toggle:focus {
    outline: 2px solid #0048d8;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mobile-menu-toggle {
        border: 2px solid #000;
    }
    
    .modern-menu a {
        border-bottom: 2px solid #000;
    }
    
    .modern-menu a:hover {
        background: #000;
        color: #fff;
    }
}
