/* ============================================================================
   LAYOUT STRUCTURE
   ============================================================================ */

.container {
    width: 100%;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: var(--topbar-height);
    bottom: 0;
    width: var(--sidebar-width);
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-right: none;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: calc(var(--z-fixed) + 1);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3), inset -1px 0 0 rgba(74, 173, 224, 0.05),
        2px 0 8px rgba(36, 137, 189, 0.55),
        4px 0 18px rgba(36, 137, 189, 0.3),
        6px 0 30px rgba(36, 137, 189, 0.12);
    animation: sidebar-glow-breathe 4s ease-in-out infinite;
}

@keyframes sidebar-glow-breathe {
    0%, 100% {
        box-shadow: 4px 0 24px rgba(0,0,0,0.3), inset -1px 0 0 rgba(74,173,224,0.05),
            2px 0 8px rgba(36,137,189,0.55),
            4px 0 18px rgba(36,137,189,0.3),
            6px 0 30px rgba(36,137,189,0.12);
    }
    50% {
        box-shadow: 4px 0 24px rgba(0,0,0,0.3), inset -1px 0 0 rgba(74,173,224,0.08),
            2px 0 12px rgba(36,137,189,0.75),
            5px 0 24px rgba(36,137,189,0.45),
            8px 0 40px rgba(36,137,189,0.2);
    }
}

@keyframes ai-panel-glow-breathe {
    0%, 100% {
        box-shadow: -4px 0 80px rgba(0,0,0,0.6),
            -4px 0 40px var(--corona-glow),
            -8px 0 20px rgba(74,173,224,0.4),
            -15px 0 40px rgba(74,173,224,0.2);
    }
    50% {
        box-shadow: -4px 0 80px rgba(0,0,0,0.6),
            -4px 0 50px var(--corona-glow),
            -10px 0 28px rgba(74,173,224,0.55),
            -18px 0 50px rgba(74,173,224,0.3);
    }
}

@keyframes shine-vertical {
    0%, 100% { background-position: 0 -100vh, 0 0; }
    50% { background-position: 0 100vh, 0 0; }
}

@keyframes shine-horizontal {
    0%, 100% { background-position: -100vw 0, 0 0; }
    50% { background-position: 100vw 0, 0 0; }
}

@keyframes shine-horizontal-offset {
    0%, 100% { background-position: calc(-100vw - var(--sidebar-width)) 0, 0 0; }
    50% { background-position: calc(100vw - var(--sidebar-width)) 0, 0 0; }
}


.sidebar::before {
    display: none;
}

.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    bottom: 0;
    background:
        linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.8) 45%, rgba(255,255,255,0.8) 55%, transparent 100%) 0 -100vh / 100% 30px no-repeat,
        linear-gradient(180deg, #489E46, #2489BD, #7CC8E6);
    animation: shine-vertical 16s ease-in-out infinite;
    z-index: 10;
    pointer-events: none;
}

.logo {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
    position: relative;
    flex-shrink: 0;
    width: calc(var(--sidebar-width) - 1.25rem);
}

.logo img {
    height: 50px;
    width: auto;
    object-fit: cover;
    object-position: top;
    clip-path: inset(0 0 10% 0);
    margin-bottom: -5px;
    flex-shrink: 0;
}

.logo-divider {
    width: 1px;
    align-self: stretch;
    margin: 0.25rem 0.5rem;
    background: linear-gradient(180deg, transparent, var(--corona) 50%, transparent);
    opacity: 0.35;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    align-items: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: var(--text-xs);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-secondary);
    white-space: nowrap;
}


.logo::after {
    display: none;
}

.nav-item {
    padding: 0.875rem 1.25rem;
    margin-bottom: 0.25rem;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    display: flex;
    align-items: center;
    gap: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    border: 0;
}

.sidebar > .nav-item:first-child {
    margin-top: 1rem;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--grad-corona-border);
    opacity: 0;
    transition: opacity 0.3s var(--ease-out-expo);
}

.nav-item::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s var(--ease-out-expo);
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent 0%, var(--corona) 30%, var(--corona-bright) 50%, var(--corona) 70%, transparent 100%) top / 100% 1px no-repeat,
        linear-gradient(90deg, transparent 0%, var(--corona) 30%, var(--corona-bright) 50%, var(--corona) 70%, transparent 100%) bottom / 100% 1px no-repeat;
}

.nav-item:hover {
    background: rgba(74, 173, 224, 0.06);
    color: var(--text-primary);
}

.nav-item:hover::after {
    opacity: 0.6;
}

@keyframes text-shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(36, 137, 189, 0.12) 0%, rgba(74, 173, 224, 0.06) 60%, transparent 100%);
    color: var(--corona-bright);
    box-shadow: inset 0 0 20px rgba(74, 173, 224, 0.04);
}

.nav-item.active::before {
    opacity: 1;
}

.nav-item.active::after {
    opacity: 0.4;
}

.nav-item.active .nav-label {
    background: linear-gradient(120deg, var(--corona-bright) 0%, var(--corona-bright) 40%, #ffffff 50%, var(--corona-bright) 60%, var(--corona-bright) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: text-shimmer 5s ease-in-out infinite;
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

.nav-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.nav-item.active .nav-icon {
    opacity: 1;
}

.nav-separator {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(74, 173, 224, 0.25) 40%, rgba(133, 221, 240, 0.3) 60%, transparent);
    margin: 0.75rem 1rem;
}

/* Main Content Area */
.content {
    margin-left: var(--sidebar-width);
    padding-top: 20px;
    min-height: 100vh;
    position: relative;
    flex: 1;
    background: transparent;
    display: flex;
    flex-direction: column;
}



