/**
 * KokoAPI - Sidebar Styles
 */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.5rem;
    overflow-y: auto;
    z-index: 100;
    transform: translateX(0);
    transition: transform var(--transition-normal);
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    left: 1rem;
    top: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    z-index: 101;
    transition: var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.sidebar-toggle svg {
    width: 20px;
    height: 20px;
}

.sidebar:not(.collapsed)~.sidebar-toggle {
    left: calc(var(--sidebar-width) + 1rem);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: 10px;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Sidebar Sections */
.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-section h3 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Status Card */
.status-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    font-size: 0.875rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-indicator.loading {
    background: var(--warning);
}

.status-indicator.healthy {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.status-indicator.degraded {
    background: var(--warning);
    box-shadow: 0 0 10px var(--warning);
}

.status-indicator.error {
    background: var(--error);
    box-shadow: 0 0 10px var(--error);
    animation: none;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: var(--transition-fast);
}

.sidebar-footer a:hover {
    color: var(--text-primary);
}

.sidebar-footer svg {
    width: 18px;
    height: 18px;
}