.app-shell {
    display: flex;
    min-height: 100vh;
}

.brand-panel {
    width: 160px;
    background: var(--panel);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    box-shadow: 0 20px 60px rgba(15, 23, 58, .08);
}

body[data-theme="dark"] .brand-panel {
    box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}

main {
    flex: 1;
    padding: 32px 48px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
    border-radius: 0;
    margin: 0;
    background: transparent;
}

main>footer {
    margin-top: auto;
}

.global-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.global-header.hidden {
    display: none;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-left h2 {
    white-space: nowrap;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    letter-spacing: .15rem;
    text-transform: uppercase;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

footer {
    flex-shrink: 0;
    padding: 24px 0 0;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: .85rem;
    color: var(--muted);
    border-top: 1px solid rgba(15, 20, 40, .08);
}

body[data-theme="dark"] footer {
    border-top: 1px solid rgba(255, 255, 255, .04);
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

@media (max-width:900px) {
    .brand-panel {
        display: none;
    }

    main {
        padding: 24px 16px;
    }
}

@media (max-width:820px) {
    .global-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .header-left {
        width: 100%;
        justify-content: center;
    }

    .header-left h2 {
        text-align: center;
    }

    .header-right {
        width: 100%;
        justify-content: center;
        gap: 10px;
    }
}

@media (max-width:640px) {
    .header-left h2 {
        font-size: .95rem;
        letter-spacing: .1rem;
    }

    .header-right {
        gap: 8px;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
    }

    .header-right .theme-toggle,
    .header-right .language-toggle {
        width: auto;
        flex: 0 0 auto;
    }

    .header-right .theme-toggle {
        padding: 10px 14px;
        font-size: .95rem;
        white-space: nowrap;
    }
}