    min-height: 100vh;
    position: relative;
    overflow-x: clip;
}

.navigation-backdrop {
    position: fixed;
    inset: 0;
    border: 0;
    background: rgba(7, 10, 9, 0.64);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 30;
}

.navigation-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(84vw, 320px);
    padding: max(1rem, env(safe-area-inset-top)) 1rem calc(1.5rem + env(safe-area-inset-bottom));
    border-right: 1px solid var(--surface-border);
    background: linear-gradient(180deg, rgba(17, 23, 21, 0.94), rgba(16, 22, 19, 0.98));
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 1.2rem;
    overflow-y: auto;
    transform: translateX(-100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.2s ease;
    z-index: 40;
}

.app-sidebar.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

.sidebar-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.sidebar-close-button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-top: 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--surface-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: var(--radius-medium);
    background: rgba(195, 142, 56, 0.08);
    border: 1px solid rgba(195, 142, 56, 0.14);
}

.brand-copy {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.brand-logo {
    width: auto;
    height: 4.25rem;
    max-width: 100%;
    flex: 0 0 auto;
    object-fit: contain;
}

.brand-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.brand-subtitle {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.app-navigation {
    display: grid;
    gap: 0.45rem;
    align-content: start;
}

.nav-section-label {
    padding: 1.2rem 1rem 0.35rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.app-navigation a {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-small);
    color: var(--text-secondary);
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.app-navigation a.active,
.app-navigation a:hover {
    background: rgba(237, 243, 239, 0.07);
    color: var(--text-primary);
    transform: translateX(2px);
}

.sidebar-meta {
    padding: 1.2rem;
    border-radius: var(--radius-medium);
    border: 1px solid var(--surface-border);
    background: rgba(255, 255, 255, 0.02);
}

.meta-label,
.detail-label {
    display: block;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    margin-bottom: 0.35rem;
}

.meta-value {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.sidebar-meta .meta-value:last-child {
    margin-bottom: 0;
}

.sidebar-sign-out-button {
    margin-top: 1rem;
    width: 100%;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-small);
    border: 1px solid var(--surface-border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: left;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-sign-out-button:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

/* Hide topbar sign-out on mobile — it lives in the sidebar instead */
.topbar-actions--desktop-only {
    display: none;
}

.app-main {
    display: grid;
    grid-template-rows: auto 1fr;
    min-width: 0;
}

.app-topbar {
    display: grid;
    gap: 1rem;
    padding: max(0.9rem, env(safe-area-inset-top)) 1rem 0.9rem;
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(15, 20, 18, 0.94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--surface-border);
}

.topbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    min-width: 0;
}

.topbar-row--secondary {
    padding-top: 0.1rem;
    border-top: 1px solid rgba(202, 214, 205, 0.08);
}

.topbar-leading {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    min-width: 0;
}

.navigation-toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.85rem;
    padding: 0 1rem;
    border-radius: 999px;
    border: 1px solid var(--surface-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    flex-shrink: 0;
}

.topbar-sign-out-button {
    min-height: 2.85rem;
}

.topbar-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.topbar-subtitle,
.muted {
    color: var(--text-secondary);
}

.topbar-subtitle {
    font-size: 0.9rem;
    line-height: 1.45;
}

.topbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
    min-width: 0;
}

.topbar-actions > * {
    flex: 1 1 10rem;
}

.topbar-primary-cta {
    flex: 0 0 auto;
    white-space: nowrap;
}

.topbar-demo-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.75rem;
    min-width: 0;
}

.topbar-domain {
    color: var(--text-secondary);
    font-size: 0.92rem;
    letter-spacing: 0.03em;
}

.topbar-demo-badge::before {
    animation: none;
}

.app-content {
    display: grid;
    align-content: start;
    gap: 1.5rem;
    padding: 1rem 1rem calc(1.5rem + env(safe-area-inset-bottom));
}

.page-header {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.page-header h1 {
    margin: 0.6rem 0 0;
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 2.1vw, 2.6rem);
    line-height: 1.05;
    max-width: 28ch;
}

.page-actions,
.action-row {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.page-actions > *,
.action-row > * {
    width: 100%;
}
