/* ===========================
   Navigation & Sidebar
=========================== */

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--bg-secondary);
    box-shadow: 2px 0px 8px var(--shadow-light);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
}

/* Sidebar Title */
.sidebar h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-tertiary);
    margin-bottom: 20px;
}

/* Navigation Links Groups */
.sidebar .nav-links-top,
.sidebar .nav-links-middle,
.sidebar .nav-links-bottom {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.sidebar .nav-links-top {
    gap: 10px;
}

.sidebar .nav-links-middle {
    margin-top: 20px;
    gap: 5px;
    background-color: var(--brand-purple);
    border-radius: 12px;
    padding: 15px 10px;
    box-shadow: 0 4px 8px rgba(174, 79, 254, 0.2);
    position: relative;
    transition: background-color 0.3s ease;
}

/* Override link colors for middle section since they're on purple background */
.sidebar .nav-links-middle a {
    color: var(--white);
}

.sidebar .nav-links-middle a:hover,
.sidebar .nav-links-middle a.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

/* Add a small badge/icon in the top right of the purple box */
.sidebar .nav-links-middle:after {
    content: "$";
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--bg-primary);
    color: var(--brand-purple-alt);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 4px var(--shadow-light);
    transition: background-color 0.3s ease;
}

.sidebar .nav-links-bottom {
    margin-top: auto;
    gap: 10px;
}

/* Sidebar Links */
.sidebar a {
    text-decoration: none;
    font-size: 1rem;
    color: var(--text-tertiary);
    padding: 10px 15px;
    border-radius: 8px;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease-in-out, opacity 0.2s ease-in-out;
}

.sidebar i {
    font-weight: 900;
    margin-right: 10px;
}

/* Bottom Links Transparency */
.nav-links-bottom a {
    opacity: 0.6;
}

.nav-links-bottom a:hover,
.nav-links-bottom a.active {
    opacity: 1;
}

.nav-links-bottom i {
    opacity: 0.6;
    transition: opacity 0.2s ease-in-out;
}

.nav-links-bottom a:hover i {
    opacity: 1;
}

/* Hover Effects for All Sidebar Links */
.sidebar a:hover,
.sidebar a.active {
    background-color: var(--brand-purple-light, #ebd4ff);
    color: var(--brand-purple-active, rgb(180, 41, 255));
}

/* Page Content */
.page-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, margin-left 0.3s ease;
    margin-left: 250px;
}

/* Mobile Navigation Tabs */
.mobile-nav-tabs {
    display: none;
}

.mobile-nav-tab {
    text-decoration: none;
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    text-align: center;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    font-weight: 500;
}

.mobile-nav-tab:hover {
    background-color: var(--brand-purple-light);
    color: var(--brand-purple);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-nav-tab.active {
    background-color: var(--brand-purple);
    color: white;
    border-color: var(--brand-purple);
    box-shadow: 0 2px 4px rgba(174, 79, 254, 0.3);
}

.mobile-nav-tab.active:hover {
    background-color: var(--brand-purple-hover);
    color: white;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.sidebar-overlay.show {
    display: block;
} 