/* ─── Layout ─── */
.app-layout {
    display: flex;
    height: 100%;
    width: 100%;
    position: relative;
}

/* ─── Sidebar wrapper (handles mobile show/hide) ─── */
.sidebar-wrapper {
    display: contents;
    /* transparent on desktop — sidebar acts normally */
}

/* Mobile: hamburger button (hidden on desktop) */
.sidebar-hamburger {
    display: none;
}

/* Mobile overlay */
.sidebar-mobile-overlay {
    display: none;
}

/* ─── Mobile layout ─── */
@media (max-width: 640px) {

    /* Sidebar wrapper becomes a fixed overlay layer by default */
    .sidebar-wrapper {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 200;
        pointer-events: none;
        transition: none;
    }

    /* When no room is active, sidebar is the main full-screen content */
    .app-layout.no-room .sidebar-wrapper {
        position: static;
        flex: 1;
        pointer-events: auto;
    }

    .app-layout.no-room .sidebar-wrapper .sidebar {
        position: static;
        width: 100%;
        height: 100%;
        transform: translateX(0);
        box-shadow: none;
        border-right: none;
    }

    .app-layout.no-room .main-content {
        display: none;
    }

    .sidebar-wrapper .sidebar {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        pointer-events: auto;
        box-shadow: var(--shadow-lg);
    }

    .sidebar-wrapper.sidebar-mobile-open {
        pointer-events: auto;
    }

    .sidebar-wrapper.sidebar-mobile-open .sidebar {
        transform: translateX(0);
    }

    /* Mobile overlay backdrop */
    .sidebar-mobile-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 199;
    }

    /* Hamburger — shown on mobile */
    .sidebar-hamburger {
        display: flex;
        position: absolute;
        top: calc(12px + env(safe-area-inset-top, 0px));
        left: calc(12px + env(safe-area-inset-left, 0px));
        z-index: 10;
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        color: var(--text-secondary);
        cursor: pointer;
        transition: all var(--transition-fast);
    }

    .sidebar-hamburger:hover {
        background: var(--bg-hover);
        color: var(--text-primary);
    }

    /* Main content takes full width on mobile */
    .main-content {
        width: 100%;
    }
}

/* ─── Main Content ─── */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.home-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.home-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.home-card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ─── Empty State ─── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 12px;
    padding: 32px;
    text-align: center;
}

.empty-state-icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 8px;
}

.empty-state-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.3px;
}

.empty-state-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    max-width: 260px;
    line-height: 1.5;
}

.empty-state-cta {
    margin-top: 8px;
    padding: 10px 24px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.empty-state-cta:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}