/*
====================================================
 PropNook v1.8.1 — Real-Use Stabilization

 Final workspace consistency layer.

 Loaded after existing PropNook CSS.

 Goals:
 - wide desktop workspace
 - consistent consumer/pro/PM scale
 - fluid mobile behavior
 - no redesign of cards/forms/components
 - preserve existing navigation and architecture
====================================================
*/

:root {
    --pn-workspace-max: 1500px;
    --pn-workspace-padding: clamp(16px, 2.2vw, 32px);
}

/*
 Application canvas
*/

.app-shell {
    width: 100%;
    max-width: none;
}

.main-content {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/*
 Primary workspace pages.
 Do NOT apply these widths to individual cards,
 dialogs, forms or authentication boxes.
*/

.main-content > .page,
.main-content > .dashboard,
main > .page,
main > .dashboard {
    width: min(100%, var(--pn-workspace-max));
    max-width: var(--pn-workspace-max);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/*
 Common workspace wrappers used throughout
 older and newer PropNook pages.
*/

.main-content > .content,
main > .content,
.main-content > .workspace,
main > .workspace {
    width: 100%;
    max-width: var(--pn-workspace-max);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/*
 Prevent children from forcing the shell wider.
*/

.main-content *,
.page *,
.dashboard * {
    min-width: 0;
}

table {
    max-width: 100%;
}

/*
 Desktop breathing room.
*/

@media (min-width: 1000px) {
    .main-content {
        padding-left: var(--pn-workspace-padding);
        padding-right: var(--pn-workspace-padding);
    }
}

/*
 Mobile remains fluid.
*/

@media (max-width: 999px) {
    .main-content {
        width: 100%;
    }

    .main-content > .page,
    .main-content > .dashboard,
    main > .page,
    main > .dashboard,
    .main-content > .content,
    main > .content,
    .main-content > .workspace,
    main > .workspace {
        width: 100%;
        max-width: none;
    }
}
