/* ============================================
   AVACONNEX SIDEBAR THEME
   Copper, Matte Black, and Neon Green
   ============================================ */

/* ============================================
   SIDEBAR BACKGROUND & STRUCTURE
   ============================================ */

.sidebar {
    background: linear-gradient(180deg, var(--color-black) 0%, var(--color-black-light) 100%);
    border-right: 3px solid var(--color-copper);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

.sidebar-header {
    background-color: var(--color-black-dark);
    border-bottom: 2px solid var(--color-copper);
}

.sidebar-toggle {
    background-color: var(--color-copper);
    color: white;
    transition: all var(--transition-base);
    box-shadow: 0 0 10px rgba(184, 115, 51, 0.3);
}

.sidebar-toggle:hover {
    background-color: var(--color-copper-light);
    box-shadow: 0 0 15px rgba(184, 115, 51, 0.5);
    transform: scale(1.1);
}

.sidebar-toggle:active {
    transform: scale(0.95);
}

.sidebar-resize-handle:hover {
    background-color: var(--color-copper);
    box-shadow: 0 0 8px rgba(184, 115, 51, 0.6);
}

/* ============================================
   NAVIGATION ITEMS
   ============================================ */

.nav-item ::deep .nav-link {
    color: rgba(255, 255, 255, 0.7);
    background: none;
    border: none;
    border-radius: 6px;
    height: 2.5rem;
    display: flex;
    align-items: center;
    line-height: 2.5rem;
    width: 100%;
    padding: 0 1rem;
    text-decoration: none;
    transition: all var(--transition-base);
    margin: 0.25rem 0.5rem;
    position: relative;
}

.nav-item ::deep .nav-link:hover {
    background-color: rgba(184, 115, 51, 0.15);
    color: var(--color-copper-light);
    border-left: 3px solid var(--color-copper);
    padding-left: calc(1rem - 3px);
}

.nav-item ::deep a.active {
    background: linear-gradient(90deg, rgba(184, 115, 51, 0.3) 0%, rgba(184, 115, 51, 0.1) 100%);
    color: var(--color-copper);
    border-left: 3px solid var(--color-neon-green);
    padding-left: calc(1rem - 3px);
    font-weight: 600;
    box-shadow: inset 0 0 10px rgba(184, 115, 51, 0.2);
}

.nav-item ::deep a.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background-color: var(--color-neon-green);
    border-radius: 3px 0 0 3px;
}

/* ============================================
   NAVIGATION SECTIONS
   ============================================ */

.nav-section {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.nav-section:first-of-type {
    margin-top: 0.5rem;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-copper);
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    border-left: 3px solid var(--color-copper);
    padding-left: calc(1rem - 3px);
}

.nav-section-toggle {
    color: rgba(255, 255, 255, 0.7);
    background: none;
    border: none;
    border-radius: 6px;
    height: 2.5rem;
    display: flex;
    align-items: center;
    line-height: 2.5rem;
    width: 100%;
    padding: 0 1rem;
    text-decoration: none;
    transition: all var(--transition-base);
    margin: 0.25rem 0.5rem;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-section-toggle:hover {
    background-color: rgba(184, 115, 51, 0.15);
    color: var(--color-copper-light);
}

.nav-section-toggle.active {
    background: linear-gradient(90deg, rgba(184, 115, 51, 0.3) 0%, rgba(184, 115, 51, 0.1) 100%);
    color: var(--color-copper);
    font-weight: 600;
}

.nav-section-toggle.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background-color: var(--color-neon-green);
    border-radius: 3px 0 0 3px;
}

/* ============================================
   SUB-NAVIGATION ITEMS
   ============================================ */

.nav-sub-link {
    font-size: 0.85rem !important;
    padding-left: 2.5rem !important;
    height: 2.25rem !important;
    line-height: 2.25rem !important;
    color: rgba(255, 255, 255, 0.6) !important;
    transition: all var(--transition-base);
}

.nav-sub-link:hover {
    color: var(--color-copper-light) !important;
    background-color: rgba(184, 115, 51, 0.1) !important;
    border-left: 3px solid var(--color-copper) !important;
    padding-left: calc(2.5rem - 3px) !important;
}

.nav-sub-link.active {
    color: var(--color-neon-green) !important;
    background-color: rgba(57, 255, 20, 0.1) !important;
    border-left: 3px solid var(--color-neon-green) !important;
    padding-left: calc(2.5rem - 3px) !important;
    font-weight: 600;
}

/* ============================================
   BADGES & NOTIFICATIONS
   ============================================ */

.badge {
    background-color: var(--color-neon-green);
    color: var(--color-black);
    font-weight: 600;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    margin-left: auto;
}

.badge.badge-danger {
    background-color: var(--color-danger);
    color: white;
}

.badge.badge-warning {
    background-color: var(--color-warning);
    color: var(--color-black);
}

/* ============================================
   ICONS
   ============================================ */

.bi,
.oi {
    flex-shrink: 0;
    min-width: 1.25rem;
    color: inherit;
    transition: color var(--transition-base);
}

.nav-item ::deep .nav-link:hover .bi,
.nav-item ::deep .nav-link:hover .oi {
    color: var(--color-copper-light);
}

.nav-item ::deep a.active .bi,
.nav-item ::deep a.active .oi {
    color: var(--color-copper);
}

/* ============================================
   NAVBAR BRAND
   ============================================ */

.top-row {
    background-color: var(--color-black-dark);
    border-bottom: 2px solid var(--color-copper);
}

.navbar-brand {
    color: var(--color-copper);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 1px;
    transition: all var(--transition-base);
}

.navbar-brand:hover {
    color: var(--color-copper-light);
    text-shadow: 0 0 10px rgba(184, 115, 51, 0.3);
}

.navbar-logo {
    max-height: 40px;
    max-width: 40px;
    object-fit: contain;
    filter: brightness(1.1);
    transition: filter var(--transition-base);
}

.navbar-logo:hover {
    filter: brightness(1.3) drop-shadow(0 0 5px rgba(184, 115, 51, 0.5));
}

/* ============================================
   SCROLLABLE AREA
   ============================================ */

.nav-scrollable {
    scrollbar-width: thin;
    scrollbar-color: var(--color-copper) transparent;
}

.nav-scrollable::-webkit-scrollbar {
    width: 6px;
}

.nav-scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.nav-scrollable::-webkit-scrollbar-thumb {
    background-color: var(--color-copper);
    border-radius: 3px;
    transition: background-color var(--transition-base);
}

.nav-scrollable::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-copper-light);
}

/* ============================================
   COLLAPSED STATE
   ============================================ */

.sidebar.collapsed .nav-item ::deep .nav-link span:not(.bi):not(.oi) {
    display: none;
}

.sidebar.collapsed .nav-section-toggle span:not(.bi):not(.oi) {
    display: none;
}

.sidebar.collapsed .navbar-brand span {
    display: none;
}

.sidebar.collapsed .badge {
    display: none;
}

.sidebar.collapsed .nav-item,
.sidebar.collapsed .nav-section {
    position: relative;
}

.sidebar.collapsed .nav-item:hover::after,
.sidebar.collapsed .nav-section:hover::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--color-black);
    color: var(--color-copper);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 1000;
    margin-left: 0.5rem;
    font-size: 0.8rem;
    border-left: 2px solid var(--color-copper);
    box-shadow: 0 0 10px rgba(184, 115, 51, 0.3);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 640.98px) {
    .sidebar {
        border-right: none;
        border-bottom: 3px solid var(--color-copper);
    }

    .sidebar-header {
        border-bottom: 2px solid var(--color-copper);
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-item,
.nav-section {
    animation: slideInLeft 0.3s ease-out;
}

.nav-item:nth-child(1) { animation-delay: 0.05s; }
.nav-item:nth-child(2) { animation-delay: 0.1s; }
.nav-item:nth-child(3) { animation-delay: 0.15s; }
.nav-item:nth-child(4) { animation-delay: 0.2s; }
.nav-item:nth-child(5) { animation-delay: 0.25s; }

