/* ==========================================================================
   BCMX Base Styles — Reset + Typography + Layout fundamentals
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.6;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; }

/* ---------- SPA Shell Layout ---------- */
.bcmx-app {
    display: flex;
    min-height: 100vh;
}

.bcmx-app-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
}

.bcmx-app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.bcmx-app-header {
    position: sticky;
    top: 0;
    z-index: 500;
}

.bcmx-app-content {
    flex: 1;
    padding: 24px 32px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .bcmx-app-sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .bcmx-app-sidebar.open {
        transform: translateX(0);
    }
    .bcmx-app-main {
        margin-left: 0;
    }
    .bcmx-app-content {
        padding: 16px;
    }
}
