:root {
    --sidebar-width: 240px;
    --sidebar-bg: #111;
    --top-bar-height: 60px;
    --accent-color: #3ecf8e; /* Supabase Green */
}
[data-bs-theme="light"] {
    --sidebar-bg: #f8f9fa;
}
body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    overflow: hidden;
    display: flex;
    height: 100vh;
}
/* Sidebar */
#sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--bs-border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform 0.3s ease, visibility 0.3s;
    z-index: 1050;
}
#sidebar .logo-container {
    height: var(--top-bar-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--bs-border-color);
}
#sidebar .nav-links {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}
#sidebar .nav-link {
    padding: 10px 20px;
    color: var(--bs-body-color);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    border-left: 3px solid transparent;
}
#sidebar .nav-link:hover {
    background: rgba(62, 207, 142, 0.1);
    color: var(--accent-color);
}
#sidebar .nav-link.active {
    color: var(--accent-color);
    background: rgba(62, 207, 142, 0.1);
    border-left-color: var(--accent-color);
}
/* Main Content Area */
#main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}
#header-bar {
    height: var(--top-bar-height);
    border-bottom: 1px solid var(--bs-border-color);
    display: flex;
    align-items: center;
    padding: 0 16px;
    justify-content: space-between;
}
#content-area {
    flex: 1;
    overflow-y: auto;
    background: var(--bs-body-bg);
}

/* Responsive Sidebar */
@media (max-width: 991.98px) {
    #sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        transform: translateX(-100%);
        visibility: hidden;
    }
    #sidebar.show {
        transform: translateX(0);
        visibility: visible;
    }
    #sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }
    #sidebar-overlay.show {
        display: block;
    }
}
/* Theme Toggler override */
.theme-toggler .btn {
    border: none;
    background: transparent;
    color: var(--bs-body-color);
}
.logo-img {
    height: 24px;
    filter: grayscale(1) invert(1);
}
[data-bs-theme="light"] .logo-img {
    filter: none;
}

/* APON Syntax Highlighting */
.apon-comment {
    color: var(--bs-secondary-color);
    font-style: italic;
}
.apon-key {
    color: var(--bs-link-color);
    font-weight: 600;
}
.apon-string {
    color: var(--bs-success);
}
.apon-keyword {
    color: var(--bs-danger);
    font-weight: bold;
}
.apon-bracket {
    color: var(--bs-body-color);
    font-weight: bold;
}
.apon-number {
    color: var(--bs-warning);
    font-weight: 600;
}

#details-content {
    white-space: pre;
    overflow-x: auto;
    margin: 0;
    font-family: var(--bs-font-monospace);
    font-size: 0.875rem;
}
