/**
 * Sidebar Navigation Styles
 * Hamburger menu with slide-in sidebar for desktop and mobile
 */

/* ===================================
   TOP NAVIGATION BAR - FULL WIDTH ABOVE CONTENT
   =================================== */

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-bottom: 1px solid rgba(0, 255, 242, 0.2); /* Subtle teal border */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Logo */
.logo {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.logo:hover {
    color: #00fff2;
}

.logo .site-logo {
    height: 32px;
    width: 32px;
}

.logo .brand-name {
    font-size: 22px;
    font-weight: 700;
}

/* Refresh Button */
.refresh-btn {
    background: linear-gradient(135deg, #029D6E 0%, #027d58 100%);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(2, 157, 110, 0.3);
    font-size: 14px;
}

.refresh-btn:hover {
    background: linear-gradient(135deg, #027d58 0%, #029D6E 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(2, 157, 110, 0.4);
}

/* ===================================
   HAMBURGER BUTTON - TEAL ROUNDED SQUARE
   =================================== */

.hamburger-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #00fff2 0%, #00d4c7 100%);
    border: none;
    border-radius: 8px; /* Rounded corners */
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 255, 242, 0.3);
    position: relative;
}

.hamburger-btn:hover {
    background: linear-gradient(135deg, #00d4c7 0%, #00fff2 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 255, 242, 0.5);
}

.hamburger-btn:active {
    transform: scale(0.95);
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 3px;
    background: #ffffff; /* White lines on teal background */
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animated hamburger when menu open - X shape */
.hamburger-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background: #ffffff;
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background: #ffffff;
}

/* ===================================
   SIDEBAR MENU
   =================================== */

.sidebar-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: #16213e; /* Dark navy, no gradients */
    border-right: 2px solid #029D6E;
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Show sidebar */
.sidebar-menu.open {
    transform: translateX(0);
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(2, 157, 110, 0.2);
    background: transparent; /* No background */
    position: sticky;
    top: 0;
    z-index: 1;
}

.sidebar-header h2 {
    color: #029D6E;
    font-size: 24px;
    margin: 0;
    font-weight: 600;
}

.close-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: 2px solid #029D6E;
    border-radius: 50%;
    color: #029D6E;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.close-btn:hover {
    background: rgba(2, 157, 110, 0.1);
    transform: rotate(90deg);
}

/* ===================================
   MENU ITEMS
   =================================== */

.sidebar-nav {
    flex: 1;
    padding: 10px 0;
    overflow-y: auto;
}

/* Menu Item - NO GREEN BACKGROUNDS */
.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: #ffffff;
    text-decoration: none;
    background: transparent !important; /* NO background */
    border: none;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-size: 15px;
    font-weight: 400;
    position: relative;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05) !important; /* Subtle white, not green */
    border-left-color: #029D6E;
    color: #029D6E;
}

.menu-item.active {
    background: transparent !important; /* NO green bubble */
    border-left-color: #029D6E; /* Cyan border only */
    color: #029D6E;
    font-weight: 500;
}

.menu-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.menu-text {
    flex: 1;
}

.menu-arrow {
    font-size: 10px;
    transition: transform 0.3s;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

/* Badge in menu items */
.menu-item .badge {
    position: absolute;
    top: 10px;
    right: 20px;
    background: #ef4444;
    color: #ffffff;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    padding: 0 4px;
    line-height: 1;
}

.menu-item .badge:empty {
    display: none;
}

/* ===================================
   SUBMENU (Collapsible)
   =================================== */

.menu-group {
    position: relative;
}

.menu-submenu {
    max-height: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2); /* Slightly darker, not green */
    transition: max-height 0.3s ease;
}

.menu-group.open .menu-submenu {
    max-height: 500px; /* Large enough for content */
}

.menu-group.open .menu-arrow {
    transform: rotate(180deg);
}

.submenu-item {
    display: block;
    padding: 12px 20px 12px 52px; /* Indent for hierarchy */
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-size: 14px;
    position: relative;
    background: transparent !important; /* NO background */
}

.submenu-item:hover {
    background: rgba(255, 255, 255, 0.05) !important; /* Subtle white, not green */
    border-left-color: #029D6E;
    color: #029D6E;
}

.submenu-item.active {
    background: transparent !important; /* NO green bubble */
    border-left-color: #029D6E;
    color: #029D6E;
    font-weight: 500;
}

.submenu-item .badge {
    position: absolute;
    top: 8px;
    right: 20px;
    background: #ef4444;
    color: #ffffff;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    padding: 0 4px;
    line-height: 1;
}

.submenu-item .badge:empty {
    display: none;
}

/* ===================================
   SIDEBAR FOOTER - ACCOUNT SWITCHER
   =================================== */

.sidebar-footer {
    margin-top: auto; /* Push to bottom */
    border-top: 1px solid rgba(2, 157, 110, 0.2);
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
}

.account-switcher {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-btn {
    padding: 10px 12px;
    background: transparent;
    border: 1px solid rgba(2, 157, 110, 0.3);
    color: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    text-align: left;
    font-weight: 400;
}

.account-btn:hover {
    background: rgba(2, 157, 110, 0.05);
    border-color: #029D6E;
    color: #029D6E;
}

.account-btn.active {
    background: rgba(2, 157, 110, 0.1);
    border-color: #029D6E;
    color: #029D6E;
    font-weight: 600;
}

/* ===================================
   OVERLAY (Darkens background)
   =================================== */

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1500;
    backdrop-filter: blur(2px);
}

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

/* ===================================
   MAIN CONTENT ADJUSTMENT
   =================================== */

/* Content starts BELOW the top bar - MINIMAL SPACING */
body {
    padding-top: 60px !important; /* Just the nav height */
    margin: 0;
}

/* Prevent scrolling when menu open */
body.menu-open {
    overflow: hidden;
}

/* Main content - NO extra top padding */
main,
.main-content,
.dashboard-content,
.content-wrapper {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Container - small breathing room */
.container {
    padding: 20px;
    padding-top: 20px; /* Just 20px from nav bar */
}

/* Portfolio section - starts immediately */
.portfolio-section,
.dashboard-section:first-child,
.insight-card:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ===================================
   MOBILE RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .sidebar-menu {
        width: 280px; /* Slightly narrower on mobile */
    }
    
    .logo {
        font-size: 18px;
    }
    
    .logo .brand-name {
        font-size: 18px;
    }
    
    .refresh-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .top-nav {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .sidebar-menu {
        width: 100%; /* Full width on small phones */
        max-width: 320px;
    }
    
    .logo .brand-name {
        display: none; /* Hide text on very small screens */
    }
}

/* ===================================
   SCROLLBAR STYLING
   =================================== */

.sidebar-nav::-webkit-scrollbar {
    width: 8px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(2, 157, 110, 0.5);
    border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(2, 157, 110, 0.7);
}

