

.swish-crm-section-subnav nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 14px;
    color: var(--swish-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.swish-crm-section-subnav nav a span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    color: var(--swish-blue-dark);
}

.swish-crm-section-subnav nav a em {
    margin-left: auto;
    color: var(--swish-muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
}

.swish-crm-section-subnav nav a:hover,
.swish-crm-section-subnav nav a.is-active {
    background: var(--swish-blue-soft);
    color: var(--swish-blue-dark);
}

.swish-crm-section-main {
    min-width: 0;
    height: 100vh;
    padding: 34px;
    overflow-y: auto;
    overflow-x: hidden;
}

.swish-crm-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.swish-crm-section-header h1 {
    margin: 10px 0 0;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.swish-crm-section-header p {
    max-width: 720px;
    margin: 14px 0 0;
    color: var(--swish-muted);
    font-size: 16px;
    line-height: 1.6;
}

@media (max-width: 1000px) {
    body:has(.swish-crm-app-layout),
    body.page-template-default:has(.swish-crm-app-layout) {
        height: 100vh;
        overflow: hidden;
    }

    .swish-page-content:has(.swish-crm-app-layout) {
        height: 100vh;
        max-height: 100vh;
        overflow: hidden;
    }

    .swish-crm-app-layout,
    .swish-crm-app-layout--no-subnav {
        display: grid;
        grid-template-rows: auto auto minmax(0, 1fr);
        grid-template-columns: 1fr;
        height: 100vh;
        min-height: 100vh;
        overflow: hidden;
    }

    .swish-crm-icon-rail {
        flex-direction: row;
        justify-content: flex-start;
        height: auto;
        max-width: 100%;
        padding: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: 0;
        border-bottom: 1px solid var(--swish-border);
    }

    .swish-crm-section-subnav {
        height: auto;
        max-height: 180px;
        padding: 14px 16px;
        overflow-y: auto;
        overflow-x: hidden;
        border-right: 0;
        border-bottom: 1px solid var(--swish-border);
    }

    .swish-crm-section-main {
        height: auto;
        min-height: 0;
        padding: 24px;
        overflow-y: auto;
        overflow-x: hidden;
    }
}



@media (max-width: 700px) {
    .swish-crm-section-header {
        flex-direction: column;
    }
}

/* Lock app pages to viewport so only panels/content scroll */
html,
body {
    min-height: 100%;
}

body.page-template-default:has(.swish-crm-app-layout),
body:has(.swish-crm-app-layout) {
    height: 100vh;
    overflow: hidden;
}

body:has(.swish-crm-app-layout) .swish-crm-app-layout {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

.swish-page-content:has(.swish-crm-app-layout) {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

body.admin-bar:has(.swish-crm-app-layout),
body.admin-bar .swish-page-content:has(.swish-crm-app-layout),
body.admin-bar .swish-crm-app-layout {
    height: calc(100vh - 32px);
    max-height: calc(100vh - 32px);
}

@media (max-width: 782px) {
    body.admin-bar:has(.swish-crm-app-layout),
    body.admin-bar .swish-page-content:has(.swish-crm-app-layout),
    body.admin-bar .swish-crm-app-layout {
        height: calc(100vh - 46px);
        max-height: calc(100vh - 46px);
    }
}

/* Compatibility for old page sections inside new shell */
.swish-crm-section-main > .swish-crm-metrics-grid:first-child,
.swish-crm-section-main > .swish-crm-panel:first-child,
.swish-crm-section-main > .swish-crm-toolbar-filters:first-child,
.swish-crm-section-main > .swish-crm-task-board:first-child,
.swish-crm-section-main > .swish-crm-pipeline-board:first-child {
    margin-top: 0;
}
.swish-crm-source-pill--warning {
    background: #fef3f2;
    color: #b42318;
}

.swish-crm-report-filter-panel {
    margin-bottom: 18px;
    padding: 14px;
}

.swish-crm-report-filter-bar {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr)) auto auto;
    gap: 10px;
    align-items: end;
}

.swish-crm-report-filter-bar label {
    display: grid;
    gap: 7px;
}

.swish-crm-report-filter-bar label span {
    color: var(--swish-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.swish-crm-report-filter-bar select {
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--swish-border);
    border-radius: 13px;
    background: #ffffff;
    color: var(--swish-text);
    font-size: 13px;
    font-weight: 500;
    outline: none;
}