/*
==============================================================
 PROPNOOK APPLICATION SHELL — WAVE 2
==============================================================

Shared SaaS cockpit.

One engine.
Six experiences.

This stylesheet is intentionally scoped to pn-app-* classes.
It does not globally restyle legacy page content.
==============================================================
*/


/* ============================================================
   APP FRAME
   ============================================================ */

.pn-app {
    min-height: 100vh;
    background: var(--pn-bg);
    color: var(--pn-text);
    font-family: var(--pn-font);
}

.pn-app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--pn-sidebar-width) minmax(0, 1fr);
}


/* ============================================================
   SIDEBAR
   ============================================================ */

.pn-app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 800;

    width: var(--pn-sidebar-width);
    height: 100vh;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: var(--pn-navy-950);
    border-right: 1px solid rgba(255,255,255,.06);

    color: #fff;
}

.pn-app-brand {
    height: var(--pn-topbar-height);

    display: flex;
    align-items: center;
    gap: 11px;

    flex: 0 0 auto;

    padding: 0 18px;

    border-bottom: 1px solid rgba(255,255,255,.08);

    color: #fff;
    text-decoration: none;
}

.pn-app-brand:hover {
    color: #fff;
    text-decoration: none;
}

.pn-app-brand-mark {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

    border-radius: 8px;

    background: var(--pn-orange);
    color: #fff;

    font-size: 17px;
    font-weight: 800;
}

.pn-app-brand-copy {
    min-width: 0;
}

.pn-app-brand-name {
    display: block;

    color: #fff;

    font-size: 18px;
    font-weight: 750;
    letter-spacing: -.025em;
    line-height: 1.1;
}

.pn-app-brand-tier {
    display: block;

    margin-top: 3px;

    overflow: hidden;

    color: rgba(255,255,255,.55);

    font-size: 11px;
    font-weight: 600;

    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ============================================================
   SIDEBAR NAVIGATION
   ============================================================ */

.pn-app-nav {
    flex: 1 1 auto;

    min-height: 0;

    padding: 15px 11px 20px;

    overflow-y: auto;
    overscroll-behavior: contain;

    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.16) transparent;
}

.pn-app-nav-section {
    margin: 18px 8px 7px;

    color: rgba(255,255,255,.38);

    font-size: 10px;
    font-weight: 750;

    letter-spacing: .09em;
    text-transform: uppercase;
}

.pn-app-nav-section:first-child {
    margin-top: 4px;
}

.pn-app-nav-item {
    min-height: 40px;

    display: flex;
    align-items: center;
    gap: 11px;

    position: relative;

    margin: 2px 0;
    padding: 8px 10px;

    border: 1px solid transparent;
    border-radius: 7px;

    color: rgba(255,255,255,.72);

    font-size: 13px;
    font-weight: 600;

    text-decoration: none;

    transition:
        color 140ms ease,
        background 140ms ease,
        border-color 140ms ease;
}

.pn-app-nav-item:hover {
    background: rgba(255,255,255,.06);
    color: #fff;
    text-decoration: none;
}

.pn-app-nav-item.is-active {
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.06);
    color: #fff;
}

.pn-app-nav-item.is-active::before {
    content: "";

    position: absolute;
    top: 9px;
    bottom: 9px;
    left: -11px;

    width: 3px;

    border-radius: 0 3px 3px 0;

    background: var(--pn-orange);
}

.pn-app-nav-icon {
    width: 19px;
    height: 19px;

    display: grid;
    place-items: center;

    flex: 0 0 19px;

    color: currentColor;
}

.pn-app-nav-icon svg {
    width: 18px;
    height: 18px;

    display: block;

    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.pn-app-nav-label {
    min-width: 0;

    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.pn-app-nav-badge {
    min-width: 20px;
    height: 20px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-left: auto;
    padding: 0 6px;

    border-radius: 999px;

    background: rgba(255,255,255,.10);
    color: rgba(255,255,255,.78);

    font-size: 10px;
    font-weight: 700;
}


/* ============================================================
   SIDEBAR USER / BOTTOM AREA
   ============================================================ */

.pn-app-sidebar-footer {
    flex: 0 0 auto;

    padding: 12px;

    border-top: 1px solid rgba(255,255,255,.08);
}

.pn-app-user {
    width: 100%;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 8px;

    border: 0;
    border-radius: 8px;

    background: transparent;
    color: #fff;

    font: inherit;
    text-align: left;
    cursor: pointer;
}

.pn-app-user:hover {
    background: rgba(255,255,255,.06);
}

.pn-app-avatar {
    width: 32px;
    height: 32px;

    display: grid;
    place-items: center;

    flex: 0 0 32px;

    border-radius: 50%;

    background: rgba(255,255,255,.12);
    color: #fff;

    font-size: 12px;
    font-weight: 750;
}

.pn-app-user-copy {
    min-width: 0;
    flex: 1;
}

.pn-app-user-name {
    display: block;

    overflow: hidden;

    color: #fff;

    font-size: 12px;
    font-weight: 650;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.pn-app-user-meta {
    display: block;

    margin-top: 2px;

    overflow: hidden;

    color: rgba(255,255,255,.45);

    font-size: 10px;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ============================================================
   MAIN COLUMN
   ============================================================ */

.pn-app-main {
    min-width: 0;

    grid-column: 2;

    margin-left: 0;
}


/* ============================================================
   TOP BAR
   ============================================================ */

.pn-app-topbar {
    position: sticky;
    top: 0;
    z-index: 700;

    height: var(--pn-topbar-height);

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 0 22px;

    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--pn-border);

    backdrop-filter: blur(10px);
}

.pn-app-mobile-menu {
    display: none;

    width: 38px;
    height: 38px;

    align-items: center;
    justify-content: center;

    flex: 0 0 38px;

    border: 1px solid var(--pn-border);
    border-radius: 7px;

    background: #fff;
    color: var(--pn-text);

    cursor: pointer;
}

.pn-app-topbar-search {
    position: relative;

    width: min(500px, 42vw);

    flex: 0 1 500px;
}

.pn-app-search-icon {
    position: absolute;
    top: 50%;
    left: 12px;

    width: 17px;
    height: 17px;

    transform: translateY(-50%);

    color: var(--pn-text-muted);
    pointer-events: none;
}

.pn-app-search-icon svg {
    width: 17px;
    height: 17px;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.pn-app-search-input {
    width: 100%;
    height: 38px;

    padding: 0 76px 0 38px;

    border: 1px solid var(--pn-border);
    border-radius: 8px;

    background: var(--pn-surface-soft);
    color: var(--pn-text);

    font: inherit;
    font-size: 13px;

    transition:
        border-color 140ms ease,
        box-shadow 140ms ease,
        background 140ms ease;
}

.pn-app-search-input:hover {
    border-color: var(--pn-border-strong);
}

.pn-app-search-input:focus {
    outline: none;

    background: #fff;
    border-color: var(--pn-primary);

    box-shadow: 0 0 0 3px rgba(36,87,214,.10);
}

.pn-app-search-input::placeholder {
    color: var(--pn-text-muted);
}

.pn-app-search-shortcut {
    position: absolute;
    top: 50%;
    right: 8px;

    transform: translateY(-50%);

    padding: 3px 6px;

    border: 1px solid var(--pn-border);
    border-radius: 5px;

    background: #fff;
    color: var(--pn-text-muted);

    font-size: 10px;
    font-weight: 650;
}

.pn-app-topbar-spacer {
    flex: 1 1 auto;
}


/* ============================================================
   TOP BAR ACTIONS
   ============================================================ */

.pn-app-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.pn-app-action {
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    position: relative;

    padding: 0 11px;

    border: 1px solid var(--pn-border);
    border-radius: 7px;

    background: #fff;
    color: var(--pn-text-soft);

    font: inherit;
    font-size: 12px;
    font-weight: 650;

    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;

    transition:
        background 140ms ease,
        color 140ms ease,
        border-color 140ms ease;
}

.pn-app-action:hover {
    background: var(--pn-surface-soft);
    border-color: var(--pn-border-strong);
    color: var(--pn-text);
    text-decoration: none;
}

.pn-app-action svg {
    width: 17px;
    height: 17px;

    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.pn-app-action-primary {
    background: var(--pn-primary);
    border-color: var(--pn-primary);
    color: #fff;
}

.pn-app-action-primary:hover {
    background: var(--pn-primary-hover);
    border-color: var(--pn-primary-hover);
    color: #fff;
}

.pn-app-notification-dot {
    position: absolute;
    top: 7px;
    right: 7px;

    width: 7px;
    height: 7px;

    border: 2px solid #fff;
    border-radius: 50%;

    background: var(--pn-orange);
}


/* ============================================================
   CONTENT WORKSPACE
   ============================================================ */

.pn-app-content {
    min-width: 0;
    min-height: calc(100vh - var(--pn-topbar-height));

    padding: 28px 30px 48px;
}

.pn-app-content-inner {
    width: 100%;
    max-width: var(--pn-workspace-max);
    margin: 0 auto;
}


/* ============================================================
   GLOBAL SEARCH PANEL
   ============================================================ */

.pn-app-search-panel {
    position: fixed;
    top: 72px;
    left: calc(var(--pn-sidebar-width) + 22px);
    z-index: 950;

    width: min(560px, calc(100vw - var(--pn-sidebar-width) - 44px));
    max-height: min(620px, calc(100vh - 96px));

    display: none;

    overflow: hidden;

    background: #fff;
    border: 1px solid var(--pn-border);
    border-radius: 10px;
    box-shadow: var(--pn-shadow-md);
}

.pn-app-search-panel.is-open {
    display: block;
}

.pn-app-search-panel-head {
    padding: 12px 15px;

    border-bottom: 1px solid var(--pn-border);

    color: var(--pn-text-muted);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: .04em;
    text-transform: uppercase;
}

.pn-app-search-results {
    max-height: 500px;
    overflow-y: auto;
}

.pn-app-search-empty {
    padding: 30px 20px;

    color: var(--pn-text-muted);

    font-size: 13px;
    text-align: center;
}


/* ============================================================
   DROPDOWNS
   ============================================================ */

.pn-app-menu {
    position: fixed;
    z-index: 960;

    width: 230px;

    display: none;

    padding: 6px;

    background: #fff;
    border: 1px solid var(--pn-border);
    border-radius: 9px;
    box-shadow: var(--pn-shadow-md);
}

.pn-app-menu.is-open {
    display: block;
}

.pn-app-menu-title {
    padding: 8px 9px 6px;

    color: var(--pn-text-muted);

    font-size: 10px;
    font-weight: 750;

    letter-spacing: .06em;
    text-transform: uppercase;
}

.pn-app-menu-item {
    min-height: 37px;

    display: flex;
    align-items: center;
    gap: 9px;

    padding: 7px 9px;

    border-radius: 6px;

    color: var(--pn-text);

    font-size: 12px;
    font-weight: 600;

    text-decoration: none;
    cursor: pointer;
}

.pn-app-menu-item:hover {
    background: var(--pn-surface-soft);
    text-decoration: none;
}

.pn-app-menu-divider {
    height: 1px;
    margin: 5px 4px;
    background: var(--pn-border);
}


/* ============================================================
   ASK FREDDY PANEL
   ============================================================ */

.pn-freddy-shell {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;

    width: min(420px, 100vw);

    display: flex;
    flex-direction: column;

    transform: translateX(105%);

    background: #fff;
    border-left: 1px solid var(--pn-border);
    box-shadow: var(--pn-shadow-md);

    transition: transform 180ms ease;
}

.pn-freddy-shell.is-open {
    transform: translateX(0);
}

.pn-freddy-shell-head {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 16px;

    border-bottom: 1px solid var(--pn-border);
}

.pn-freddy-shell-art {
    width: 54px;
    height: 54px;

    flex: 0 0 54px;

    object-fit: contain;
}

.pn-freddy-shell-title {
    margin: 0;

    font-size: 16px;
    font-weight: 750;
}

.pn-freddy-shell-subtitle {
    margin: 2px 0 0;

    color: var(--pn-text-muted);

    font-size: 11px;
}

.pn-freddy-shell-close {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    margin-left: auto;

    border: 1px solid var(--pn-border);
    border-radius: 7px;

    background: #fff;
    cursor: pointer;
}

.pn-freddy-shell-body {
    flex: 1;
    overflow-y: auto;

    padding: 18px;
}

.pn-freddy-shell-welcome {
    padding: 16px;

    background: var(--pn-primary-soft);
    border: 1px solid #d9e3ff;
    border-radius: 9px;
}

.pn-freddy-shell-welcome strong {
    display: block;
    margin-bottom: 5px;
}

.pn-freddy-shell-welcome p {
    margin: 0;

    color: var(--pn-text-soft);

    font-size: 13px;
}

.pn-freddy-shell-input {
    padding: 14px;

    border-top: 1px solid var(--pn-border);
}

.pn-freddy-shell-form {
    display: flex;
    gap: 8px;
}

.pn-freddy-shell-form input {
    min-width: 0;
    flex: 1;

    height: 40px;

    padding: 0 11px;

    border: 1px solid var(--pn-border-strong);
    border-radius: 7px;

    font: inherit;
    font-size: 13px;
}


/* ============================================================
   OVERLAY
   ============================================================ */

.pn-app-screen {
    position: fixed;
    inset: 0;
    z-index: 900;

    display: none;

    background: rgba(15,29,46,.32);
}

.pn-app-screen.is-open {
    display: block;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 960px) {

    .pn-app-shell {
        display: block;
    }

    .pn-app-sidebar {
        transform: translateX(-105%);
        box-shadow: var(--pn-shadow-md);

        transition: transform 180ms ease;
    }

    .pn-app-sidebar.is-open {
        transform: translateX(0);
    }

    .pn-app-main {
        margin-left: 0;
    }

    .pn-app-mobile-menu {
        display: inline-flex;
    }

    .pn-app-topbar {
        padding: 0 14px;
    }

    .pn-app-topbar-search {
        width: auto;
        flex: 1;
    }

    .pn-app-search-panel {
        left: 14px;
        width: calc(100vw - 28px);
    }

    .pn-app-content {
        padding: 22px 18px 40px;
    }
}


@media (max-width: 700px) {

    .pn-app-action-label {
        display: none;
    }

    .pn-app-action {
        width: 38px;
        padding: 0;
    }

    .pn-app-search-shortcut {
        display: none;
    }

    .pn-app-search-input {
        padding-right: 12px;
    }
}


@media (max-width: 520px) {

    .pn-app-action-freddy {
        display: none;
    }

    .pn-app-content {
        padding: 18px 14px 34px;
    }
}


/* ============================================================
   WAVE 3 — TIER COCKPIT NAVIGATION
   ============================================================ */

.pn-tier-identity {
    margin: 4px 8px 15px;
    padding: 11px 10px;

    border: 1px solid rgba(255,255,255,.07);
    border-radius: 8px;

    background: rgba(255,255,255,.04);
}

.pn-tier-identity-label {
    display: block;

    margin-bottom: 3px;

    color: rgba(255,255,255,.42);

    font-size: 9px;
    font-weight: 750;

    letter-spacing: .08em;
    text-transform: uppercase;
}

.pn-tier-identity-name {
    display: block;

    overflow: hidden;

    color: #fff;

    font-size: 12px;
    font-weight: 700;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.pn-tier-identity-purpose {
    display: block;

    margin-top: 3px;

    color: rgba(255,255,255,.52);

    font-size: 10px;
    line-height: 1.35;
}

.pn-tier-nav {
    min-height: 0;
    flex: 1 1 auto;

    padding: 12px 11px 20px;

    overflow-y: auto;

    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.16) transparent;
}

.pn-tier-nav .pn-app-nav-section {
    margin-top: 17px;
}

.pn-tier-nav .pn-app-nav-section:first-child {
    margin-top: 3px;
}

.pn-tier-nav .pn-app-nav-item {
    width: 100%;
}

.pn-tier-nav .pn-app-nav-item.is-active {
    background: rgba(255,255,255,.10);
}

.pn-tier-nav .pn-app-nav-item.is-active .pn-app-nav-icon {
    color: var(--pn-orange);
}


/*
Wave 3 navigation replaces the old sidebar visually only when
the new cockpit has been installed successfully.
*/

body.pn-tier-nav-ready > .sidebar {
    display: none !important;
}

.pn-wave3-shell {
    display: contents;
}

.pn-wave3-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 800;

    width: var(--pn-sidebar-width);
    height: 100vh;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: var(--pn-navy-950);
    border-right: 1px solid rgba(255,255,255,.06);

    color: #fff;
}

body.pn-tier-nav-ready .main-content,
body.pn-tier-nav-ready main.main-content {
    margin-left: var(--pn-sidebar-width);
}

@media (max-width: 960px) {

    .pn-wave3-sidebar {
        transform: translateX(-105%);
        transition: transform 180ms ease;
    }

    .pn-wave3-sidebar.is-open {
        transform: translateX(0);
    }

    body.pn-tier-nav-ready .main-content,
    body.pn-tier-nav-ready main.main-content {
        margin-left: 0;
    }
}


/* PROPNOOK MOBILE NAV ICON POLISH 20260907 */

@media (max-width: 960px) {

    .pn-app-nav-icon {
        width: 22px;
        height: 22px;
        flex: 0 0 22px;
    }

    .pn-app-nav-icon svg {
        width: 22px;
        height: 22px;
        stroke-width: 2;
    }

    .pn-app-nav-item.is-active
    .pn-app-nav-icon svg {
        stroke-width: 2.3;
    }

}

