/* MONO — layout.css : app shell (header, sidebar, bottom nav, content) */

.app-shell {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--header-height);
    padding-top: var(--safe-top);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: var(--space-4);
    background: var(--background);
    border-bottom: 1px solid var(--border);
}

.app-header__brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
}

.app-header__actions { display: flex; align-items: center; gap: var(--space-2); }

.app-body {
    flex: 1;
    display: flex;
}

.app-sidebar {
    display: none;
}

.app-main {
    flex: 1;
    min-width: 0;
    padding: var(--space-5) var(--space-4) calc(var(--bottom-nav-height) + var(--space-6) + var(--safe-bottom));
    max-width: 1200px;
    width: 100%;
    margin-inline: auto;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
    flex-wrap: wrap;
}

.page-header__title { display: flex; flex-direction: column; gap: 2px; }

.bottom-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 50;
    display: flex;
    background: var(--background);
    border-top: 1px solid var(--border);
    padding-bottom: var(--safe-bottom);
}

.bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 56px;
    color: var(--text-tertiary);
    font-size: 11px;
    position: relative;
}

.bottom-nav__item svg { width: 22px; height: 22px; }
.bottom-nav__item[aria-current="page"] { color: var(--text-primary); }

.fab-add {
    position: fixed;
    right: var(--space-4);
    bottom: calc(var(--bottom-nav-height) + var(--space-4) + var(--safe-bottom));
    z-index: 55;
    width: 56px; height: 56px;
    border-radius: var(--radius-full);
    background: var(--text-primary);
    color: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: transform var(--duration-fast) var(--easing);
}
.fab-add:active { transform: scale(0.94); }
.fab-add svg { width: 26px; height: 26px; }

.container-narrow { max-width: 480px; margin-inline: auto; width: 100%; }

/* Auth / guest pages */
.guest-shell {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-5);
}
.guest-card {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}
.guest-card__brand { text-align: center; display: flex; flex-direction: column; gap: var(--space-1); }

@media (min-width: 1024px) {
    .app-header { display: none; }

    .app-sidebar {
        display: flex;
        flex-direction: column;
        width: var(--sidebar-width);
        flex-shrink: 0;
        border-right: 1px solid var(--border);
        padding: var(--space-5) var(--space-3);
        height: 100vh;
        position: sticky;
        top: 0;
        gap: var(--space-6);
    }

    .app-sidebar__brand { font-weight: 700; font-size: 17px; padding-inline: var(--space-2); display: flex; align-items: center; gap: var(--space-2); }

    .app-sidebar__nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }

    .app-sidebar__link {
        display: flex;
        align-items: center;
        gap: var(--space-3);
        padding: var(--space-2) var(--space-3);
        border-radius: var(--radius-sm);
        color: var(--text-secondary);
        font-size: 14px;
        font-weight: 500;
    }
    .app-sidebar__link svg { width: 18px; height: 18px; flex-shrink: 0; }
    .app-sidebar__link:hover { background: var(--surface); color: var(--text-primary); }
    .app-sidebar__link[aria-current="page"] { background: var(--surface); color: var(--text-primary); }

    .bottom-nav, .fab-add { display: none; }

    .app-main { padding: var(--space-6) var(--space-6) var(--space-7); }

    .guest-shell { background: var(--surface); }
    .guest-card { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-7); box-shadow: var(--shadow-sm); }
}
