/* ---------- App shell + navbar (components/layout/app.php, components/dashboard/navbar.php) ---------- */

.app-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.app-navbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: var(--navbar-height);
    padding: 0 1rem;
    background: var(--card);
    border-bottom: 1px solid var(--border);
}

.app-navbar-left,
.app-navbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.app-navbar-title {
    overflow: hidden;
    font-size: 1.05rem;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    background: var(--brand-navy);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.user-meta {
    display: none;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.user-name {
    overflow: hidden;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.logout-form {
    margin: 0;
}

.logout-btn {
    width: 2.25rem;
    padding: 0;
}

.logout-label {
    display: none;
}

.app-main {
    flex: 1 0 auto;
    padding: 1.25rem 1rem 2rem;
}

.page-header {
    margin-bottom: 1.25rem;
}

.page-welcome {
    font-size: 0.95rem;
    color: var(--muted-foreground);
}

@media (min-width: 640px) {
    .app-navbar {
        padding: 0 1.5rem;
    }

    .user-meta {
        display: flex;
    }

    .logout-btn {
        width: auto;
        padding: 0 0.85rem;
    }

    .logout-label {
        display: inline;
    }

    .app-main {
        padding: 1.5rem 1.5rem 2.5rem;
    }
}

@media (min-width: 1024px) {
    .app-content {
        margin-left: var(--sidebar-width);
    }

    .sidebar-toggle {
        display: none;
    }

    .app-navbar {
        padding: 0 2rem;
    }

    .app-main {
        padding: 2rem 2rem 3rem;
    }
}
