/* Layout Styles */

/* Main App Layout */
.app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
    transition: grid-template-columns 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Sidebar */
.sidebar {
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    z-index: 50;
    padding: 3rem 2rem;
    transform: translateX(0);
    opacity: 1;
    white-space: nowrap;
    transition: all 0.3s ease;
}

body.sidebar-closed {
    --sidebar-width: 0px;
}

body.sidebar-closed .sidebar {
    padding: 0;
    opacity: 0;
    transform: translateX(-20px);
}

.sidebar-close-btn {
    display: none;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-dim);
}

/* Brand */
.brand {
    margin-bottom: 2rem;
    padding-left: 0.5rem;
}

.brand h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.brand p {
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Main Content Area */
.main-stage {
    padding: 3rem 4rem;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Mobile Header */
.mobile-header {
    display: none;
}

.overlay {
    display: none;
}

/* Responsive */
@media (max-width: 1200px) {
    .main-stage {
        padding: 2rem;
    }
}

@media (max-width: 850px) {
    .app-layout {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 300px;
        height: 100%;
        transform: translateX(-100%);
        padding: 4rem 2rem 2rem 2rem;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
        z-index: 2000;
        overflow-y: auto;
    }

    .sidebar.open {
        transform: translateX(0);
        opacity: 1;
    }

    .sidebar-close-btn {
        display: block;
    }

    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.5rem;
        background: var(--bg-body);
        border-bottom: 1px solid var(--border-subtle);
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .main-stage {
        padding: 1.5rem;
        width: 100%;
    }

    .overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(4px);
        z-index: 1000;
        opacity: 0;
        pointer-events: none;
        transition: 0.3s;
    }

    .overlay.active {
        opacity: 1;
        pointer-events: all;
    }
}