/* Shared workspace spacing for pages using the NT header. */
.nt-page-workspace {
    margin-top: 32px
}

@media(max-width:767.98px) {
    .nt-page-workspace {
        margin-top: 22px
    }
}

/* NetworkerTools shared application UI components. Opt-in only. */
.nt-page-header {
    --nt-page-accent: var(--nt-primary-color, #4361ee);
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 0 24px;
    padding: 0 0 24px;
    border-bottom: none;
    text-align: left
}

.nt-page-header__icon {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 25px;
    color: var(--nt-page-accent);
    background: color-mix(in srgb, var(--nt-page-accent) 9%, transparent)
}

.nt-page-header__content {
    flex: 1 1 auto;
    min-width: 0
}

.nt-page-header__eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--nt-page-accent);
    margin-bottom: 5px
}

.nt-page-header__title {
    font-family: 'Inter Tight', Inter, system-ui, sans-serif;
    font-size: clamp(25px, 2.4vw, 34px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.025em;
    color: #202735;
    margin: 0 0 8px;
    text-align: left
}

.nt-page-header__description {
    color: #647184;
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
    text-align: left
}

.nt-page-header__description a {
    color: var(--nt-page-accent);
    text-underline-offset: 3px
}

.nt-page-header__aside {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    min-height: 68px;
    padding: 10px 18px;
    border: 1px solid rgba(115, 130, 150, .16);
    border-radius: 15px;
    background: rgba(127, 142, 165, .035)
}

.nt-page-header__aside strong {
    font-size: 25px;
    line-height: 1.15;
    color: #202735
}

.nt-page-header__aside span {
    font-size: 11px;
    color: #647184
}

@media(max-width:767.98px) {
    .nt-page-header {
        gap: 12px;
        align-items: flex-start;
        margin-bottom: 20px;
        padding-bottom: 18px
    }

    .nt-page-header__icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        font-size: 20px;
        border-radius: 12px
    }

    .nt-page-header__title {
        font-size: clamp(23px, 5.5vw, 28px)
    }

    .nt-page-header__description {
        font-size: 13px
    }

    .nt-page-header__aside {
        display: none
    }
}

/* CRM and other explicitly opted-in compact mobile headers. */
@media (max-width: 767.98px) {

    /* The CRM page has legacy margin rules; scope this override to the opt-in workspace. */
    .nt-page-workspace:has(> .nt-page-header--compact-mobile) {
        margin-top: 2px !important;
    }

    .nt-page-header--compact-mobile {
        align-items: center;
        gap: 10px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .nt-page-header--compact-mobile .nt-page-header__icon {
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        border-radius: 11px;
        font-size: 18px;
    }

    .nt-page-header--compact-mobile .nt-page-header__eyebrow,
    .nt-page-header--compact-mobile .nt-page-header__description {
        display: none;
    }

    .nt-page-header--compact-mobile .nt-page-header__title {
        font-size: clamp(19px, 5vw, 23px);
        line-height: 1.2;
        margin: 0;
        overflow-wrap: anywhere;
    }
}

/* CRM: scoped spacing, protected against legacy CRM margin rules.
   Do not change the Kanban workspace padding or scrolling. */
.nt-page-workspace:has(> .nt-page-header--compact-mobile) {
    margin-top: 32px !important;
}

@media (max-width: 767.98px) {
    .nt-page-workspace:has(> .nt-page-header--compact-mobile) {
        margin-top: 2px !important;
    }

    .nt-page-workspace>.nt-page-header--compact-mobile {
        padding-left: 12px;
        padding-right: 12px;
        margin-bottom: 16px;
        padding-bottom: 10px;
    }
}

/* CRM mobile fine adjustment: move icon and heading together, not the toolbar. */
@media (max-width: 767.98px) {

    .nt-page-header--compact-mobile>.nt-page-header__icon,
    .nt-page-header--compact-mobile>.nt-page-header__content {
        transform: translateY(-4px);
    }
}

/* Projects: same centrally controlled mobile workspace spacing as CRM.
   Keep the full project header content and existing desktop layout. */
@media (max-width: 767.98px) {
    .nt-projects-page .nt-projects-workspace.nt-page-workspace {
        margin-top: 2px !important;
    }
}

/* Projects workspace: preserve the proven desktop spacing without affecting
   the compact mobile rule or the CRM layout. */
@media (min-width: 768px) {
    .nt-projects-page .nt-projects-workspace.nt-page-workspace {
        margin-top: 32px !important;
    }
}