.pbw-dashboard-app-active .pbw-page {
    max-width: none;
    padding: 0;
}

.pbw-dashboard-app-active .pbw-page > .pbw-nav,
.pbw-dashboard-app-active .pbw-site-footer,
.pbw-dashboard-authenticated > .pbw-dashboard-shell[hidden],
.pbw-dashboard-authenticated > .pbw-workbench-shell[hidden] {
    display: none !important;
}

.pbw-app-shell {
    --pbw-app-navy: #071a3d;
    --pbw-app-navy-soft: #102b57;
    --pbw-app-green: #008b62;
    --pbw-app-green-soft: #e9f7f1;
    --pbw-app-ink: #12203a;
    --pbw-app-muted: #64728a;
    --pbw-app-line: #d8e0ea;
    --pbw-app-surface: #ffffff;
    --pbw-app-canvas: #f5f7fa;
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    min-height: 100vh;
    color: var(--pbw-app-ink);
    background: var(--pbw-app-canvas);
}

.pbw-app-sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 24px 18px;
    color: #fff;
    background: var(--pbw-app-navy);
}

.pbw-app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    margin: 0 8px 30px;
    color: #fff;
    text-decoration: none;
}

.pbw-app-brand .pbw-brand-mark {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
}

.pbw-app-brand > span:last-child {
    display: grid;
    min-width: 0;
}

.pbw-app-brand strong {
    overflow: hidden;
    font-size: 17px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pbw-app-brand small {
    margin-top: 3px;
    color: #aebbd0;
    font-size: 12px;
}

.pbw-app-nav {
    display: grid;
    gap: 5px;
}

.pbw-app-nav-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    color: #dbe5f3;
    text-align: left;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
}

.pbw-app-nav-item:hover,
.pbw-app-nav-item:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, .08);
    outline: 2px solid transparent;
}

.pbw-app-nav-item[aria-selected="true"] {
    color: #fff;
    background: var(--pbw-app-navy-soft);
    box-shadow: inset 3px 0 0 #3dd6a1;
}

.pbw-app-nav-item > .dashicons {
    width: 20px;
    height: 20px;
    margin-left: 4px;
    font-size: 20px;
}

.pbw-app-nav-item > span:last-child {
    display: grid;
    min-width: 0;
}

.pbw-app-nav-item strong {
    font-size: 14px;
    line-height: 1.25;
}

.pbw-app-nav-item small {
    overflow: hidden;
    margin-top: 2px;
    color: #aebbd0;
    font-size: 11px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pbw-app-sidebar-footer {
    display: grid;
    gap: 12px;
    margin-top: auto;
    padding: 20px 10px 4px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: 12px;
}

.pbw-app-sidebar-footer a {
    color: #cbd8e9;
}

.pbw-app-health {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dce8f5;
}

.pbw-app-health i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #35d49b;
    box-shadow: 0 0 0 3px rgba(53, 212, 155, .16);
}

.pbw-app-main {
    min-width: 0;
}

.pbw-app-topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    display: grid;
    grid-template-columns: auto minmax(130px, auto) minmax(240px, 560px) auto;
    align-items: center;
    gap: 24px;
    min-height: 76px;
    padding: 12px 30px;
    border-bottom: 1px solid var(--pbw-app-line);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
}

.pbw-app-menu {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--pbw-app-line);
    border-radius: 6px;
    color: var(--pbw-app-ink);
    background: #fff;
}

.pbw-app-heading {
    display: grid;
}

.pbw-app-heading span {
    color: var(--pbw-app-muted);
    font-size: 11px;
    text-transform: uppercase;
}

.pbw-app-heading strong {
    font-size: 18px;
}

.pbw-app-global-search {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    min-width: 0;
}

.pbw-app-global-search > .dashicons {
    position: absolute;
    left: 14px;
    z-index: 1;
    color: #78869b;
}

.pbw-app-global-search input {
    width: 100%;
    min-height: 44px;
    padding: 10px 92px 10px 43px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
}

.pbw-app-global-search button {
    position: absolute;
    right: 4px;
    min-height: 36px;
    padding: 7px 13px;
    border: 0;
    border-radius: 5px;
    color: #fff;
    background: var(--pbw-app-navy);
}

.pbw-app-account {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-width: 178px;
    padding: 6px 8px;
    border: 0;
    border-radius: 6px;
    color: var(--pbw-app-ink);
    text-align: left;
    background: transparent;
}

.pbw-app-account:hover,
.pbw-app-account:focus-visible {
    background: #f0f4f8;
}

.pbw-app-account > span:first-child {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    background: var(--pbw-app-green);
}

.pbw-app-account > span:last-child {
    display: grid;
    min-width: 0;
}

.pbw-app-account strong,
.pbw-app-account small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pbw-app-account strong {
    font-size: 13px;
}

.pbw-app-account small {
    color: var(--pbw-app-muted);
    font-size: 11px;
}

.pbw-app-mobile-context {
    display: none;
}

.pbw-app-content {
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px 30px 64px;
}

.pbw-app-view[hidden] {
    display: none !important;
}

.pbw-app-view {
    display: grid;
    gap: 22px;
}

.pbw-app-welcome {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
    gap: 36px;
    align-items: end;
    padding: 30px 34px;
    border: 1px solid var(--pbw-app-line);
    border-radius: 8px;
    background: var(--pbw-app-surface);
}

.pbw-app-welcome h1 {
    max-width: 760px;
    margin: 8px 0 12px;
    color: var(--pbw-app-ink);
    font-size: clamp(30px, 3.2vw, 48px);
    line-height: 1.08;
    letter-spacing: 0;
}

.pbw-app-welcome p {
    max-width: 760px;
    margin: 0;
    color: var(--pbw-app-muted);
    font-size: 16px;
    line-height: 1.7;
}

.pbw-app-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.pbw-app-quick-actions button {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    min-height: 92px;
    padding: 14px 12px;
    border: 1px solid var(--pbw-app-line);
    border-radius: 6px;
    color: var(--pbw-app-ink);
    text-align: left;
    background: #f8fafc;
}

.pbw-app-quick-actions button:hover,
.pbw-app-quick-actions button:focus-visible {
    border-color: var(--pbw-app-green);
    background: var(--pbw-app-green-soft);
}

.pbw-app-quick-actions .dashicons {
    color: var(--pbw-app-green);
}

.pbw-app-quick-actions button > span:last-child {
    display: grid;
}

.pbw-app-quick-actions strong {
    font-size: 13px;
}

.pbw-app-quick-actions small {
    margin-top: 3px;
    color: var(--pbw-app-muted);
    font-size: 11px;
    line-height: 1.35;
}

.pbw-app-account-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--pbw-app-line);
    border-radius: 8px;
    background: #fff;
}

.pbw-app-account-strip > div {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 17px 20px;
    border-right: 1px solid var(--pbw-app-line);
}

.pbw-app-account-strip > div:last-child {
    border-right: 0;
}

.pbw-app-account-strip span {
    color: var(--pbw-app-muted);
    font-size: 11px;
    text-transform: uppercase;
}

.pbw-app-account-strip strong {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pbw-dashboard-authenticated .pbw-workbench-card,
.pbw-dashboard-authenticated .pbw-dashboard-product-panel,
.pbw-dashboard-authenticated .pbw-app-settings-panel {
    margin: 0;
    border: 1px solid var(--pbw-app-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}

.pbw-dashboard-authenticated .pbw-workbench-card {
    padding: 24px;
}

.pbw-dashboard-authenticated .pbw-workbench-card h3 {
    margin-top: 0;
    color: var(--pbw-app-ink);
    font-size: 22px;
}

.pbw-dashboard-authenticated .pbw-workbench-header {
    margin: 0;
    padding: 22px 24px;
    border: 1px solid var(--pbw-app-line);
    border-radius: 8px;
    background: #fff;
}

.pbw-dashboard-authenticated .pbw-workbench-header h2 {
    margin: 4px 0;
    font-size: 25px;
}

.pbw-dashboard-authenticated .pbw-workbench-button,
.pbw-dashboard-authenticated .pbw-small-button,
.pbw-dashboard-authenticated .pbw-billing-button,
.pbw-dashboard-authenticated .pbw-dashboard-settings > button[type="submit"] {
    min-height: 40px;
    padding: 9px 15px;
    border: 1px solid var(--pbw-app-navy);
    border-radius: 5px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    background: var(--pbw-app-navy);
    box-shadow: none;
}

.pbw-dashboard-authenticated .pbw-workbench-button.secondary,
.pbw-dashboard-authenticated .pbw-small-button {
    color: var(--pbw-app-navy);
    background: #fff;
}

.pbw-dashboard-authenticated input,
.pbw-dashboard-authenticated select,
.pbw-dashboard-authenticated textarea {
    border-color: #bdc8d7;
    border-radius: 5px;
    background: #fff;
}

.pbw-dashboard-authenticated label {
    color: var(--pbw-app-ink);
    font-size: 13px;
    font-weight: 700;
}

.pbw-dashboard-authenticated .pbw-workbench-filters {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.pbw-dashboard-authenticated .pbw-multi-state-filter {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.pbw-dashboard-authenticated .pbw-multi-state-filter legend {
    margin: 0 0 5px;
    padding: 0;
    color: var(--pbw-app-ink);
    font-size: 13px;
    font-weight: 700;
}

.pbw-dashboard-authenticated .pbw-multi-state-filter details {
    position: relative;
}

.pbw-dashboard-authenticated .pbw-multi-state-filter summary {
    min-height: 42px;
    padding: 10px 34px 10px 12px;
    overflow: hidden;
    border: 1px solid #bdc8d7;
    border-radius: 5px;
    color: var(--pbw-app-ink);
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.pbw-dashboard-authenticated .pbw-state-option-list {
    position: absolute;
    z-index: 30;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    max-height: 290px;
    padding: 8px;
    overflow-y: auto;
    border: 1px solid #bdc8d7;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(10, 32, 67, 0.14);
}

.pbw-dashboard-authenticated .pbw-state-option-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 6px;
    font-weight: 500;
}

.pbw-dashboard-authenticated .pbw-state-option-list input {
    width: 16px;
    min-width: 16px;
    height: 16px;
    margin: 0;
}

.pbw-dashboard-authenticated .pbw-multi-state-filter small {
    display: block;
    margin-top: 5px;
    color: var(--pbw-app-muted);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.35;
}

.pbw-dashboard-authenticated .pbw-search-result,
.pbw-dashboard-authenticated .pbw-document-result,
.pbw-dashboard-authenticated .pbw-pipeline-item,
.pbw-dashboard-authenticated .pbw-compact-row,
.pbw-dashboard-authenticated .pbw-dashboard-list-item,
.pbw-dashboard-authenticated .pbw-dashboard-match {
    border-radius: 6px;
    box-shadow: none;
}

.pbw-app-settings-panel {
    width: 100%;
    max-width: none;
    padding: 26px;
}

.pbw-app-settings-panel > h2 {
    margin: 0 0 6px;
    font-size: 25px;
}

.pbw-app-settings-panel > #pbw-dashboard-help {
    color: var(--pbw-app-muted);
}

.pbw-dashboard-authenticated .pbw-dashboard-settings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.pbw-dashboard-authenticated .pbw-dashboard-account,
.pbw-dashboard-authenticated #pbw-dashboard-alert-panel,
.pbw-dashboard-authenticated #pbw-dashboard-watchlists-panel,
.pbw-dashboard-authenticated #pbw-dashboard-team-panel,
.pbw-dashboard-authenticated #pbw-dashboard-recent-panel,
.pbw-dashboard-authenticated .pbw-dashboard-settings > button,
.pbw-dashboard-authenticated .pbw-dashboard-settings > .pbw-email-preference {
    grid-column: 1 / -1;
}

.pbw-dashboard-authenticated #pbw-dashboard-alert-panel,
.pbw-dashboard-authenticated #pbw-dashboard-watchlists-panel,
.pbw-dashboard-authenticated #pbw-dashboard-team-panel {
    padding: 22px;
}

.pbw-app-recent-panel {
    padding: 24px;
}

.pbw-app-status {
    min-height: 24px;
    margin: 0;
    color: var(--pbw-app-muted);
}

.pbw-app-scrim {
    display: none;
}

@media (max-width: 1120px) {
    .pbw-app-shell {
        grid-template-columns: 224px minmax(0, 1fr);
    }

    .pbw-app-topbar {
        grid-template-columns: auto minmax(120px, auto) minmax(220px, 1fr) auto;
        gap: 14px;
        padding-inline: 20px;
    }

    .pbw-app-account {
        min-width: 44px;
    }

    .pbw-app-account > span:last-child {
        display: none;
    }

    .pbw-app-welcome {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .pbw-app-shell {
        display: block;
    }

    .pbw-app-sidebar {
        position: fixed;
        left: 0;
        width: min(84vw, 300px);
        transform: translateX(-105%);
        transition: transform .2s ease;
    }

    .pbw-app-nav-open .pbw-app-sidebar {
        transform: translateX(0);
    }

    .pbw-app-topbar {
        grid-template-columns: 42px minmax(120px, auto) minmax(0, 1fr) 44px;
        min-height: 68px;
        padding: 10px 14px;
    }

    .pbw-app-menu {
        display: grid;
        place-items: center;
    }

    .pbw-dashboard-authenticated .pbw-app-global-search button {
        display: block;
        width: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
        min-height: 38px !important;
        height: 38px;
        box-sizing: border-box;
        padding: 0 !important;
        overflow: hidden;
        color: transparent !important;
    }

    .pbw-app-global-search button::before {
        position: absolute;
        inset: 0;
        display: grid;
        place-items: center;
        color: #fff;
        content: "\f179";
        font-family: dashicons;
    }

    .pbw-app-global-search input {
        padding-right: 48px;
    }

    .pbw-app-scrim {
        position: fixed;
        inset: 0;
        z-index: 19;
        border: 0;
        background: rgba(7, 26, 61, .48);
    }

    .pbw-app-nav-open .pbw-app-scrim {
        display: block;
    }

    .pbw-app-content {
        padding: 20px 16px 50px;
    }

    .pbw-app-mobile-context {
        display: block;
        padding: 8px 16px;
        border-bottom: 1px solid var(--pbw-app-line);
        color: var(--pbw-app-muted);
        font-size: 12px;
        background: #fff;
    }

    .pbw-app-account-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pbw-app-account-strip > div:nth-child(2) {
        border-right: 0;
    }

    .pbw-app-account-strip > div:nth-child(-n+2) {
        border-bottom: 1px solid var(--pbw-app-line);
    }
}

@media (max-width: 600px) {
    .pbw-app-heading {
        display: none;
    }

    .pbw-app-topbar {
        grid-template-columns: 42px minmax(0, 1fr) 44px;
    }

    .pbw-app-welcome {
        padding: 22px 20px;
    }

    .pbw-app-welcome h1 {
        font-size: 31px;
    }

    .pbw-app-quick-actions,
    .pbw-app-account-strip,
    .pbw-dashboard-authenticated .pbw-dashboard-settings {
        grid-template-columns: 1fr;
    }

    .pbw-app-account-strip > div {
        border-right: 0;
        border-bottom: 1px solid var(--pbw-app-line);
    }

    .pbw-app-account-strip > div:last-child {
        border-bottom: 0;
    }

    .pbw-dashboard-authenticated .pbw-workbench-card,
    .pbw-app-settings-panel {
        padding: 18px;
    }

    .pbw-dashboard-authenticated .pbw-workbench-actions {
        align-items: stretch;
    }

    .pbw-dashboard-authenticated .pbw-app-view .pbw-workbench-button,
    .pbw-dashboard-authenticated .pbw-inline-name {
        width: 100%;
    }

    .pbw-dashboard-authenticated .pbw-app-global-search .pbw-workbench-button {
        width: 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pbw-app-sidebar {
        transition: none;
    }
}
