[x-cloak] { display: none !important; }
/* Original Nexus artwork uses Ollie's KF red and dark brand palette. */
.nexus-brand { display: inline-flex; align-items: center; max-width: 100%; }
.nexus-brand-logo { display: block; width: auto; height: 38px; max-width: 100%; }
.brand-logo .nexus-brand-logo { height: 48px; }
.nexus-auth-aside { background: #eef2f7; align-items: center; justify-content: center; padding: 64px; }
.nexus-auth-message { max-width: 520px; }
.nexus-auth-message h2 { color: #364a63; font-size: clamp(28px, 3vw, 44px); line-height: 1.nx-25; margin: 20px 0; }
.nexus-auth-message p { color: #526484; font-size: 17px; line-height: 1.nx-8; }
.nexus-auth-modules { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 36px; font-size: 13px; color: #526484; }
.nexus-auth-modules .icon { color: #2263b3; margin-right: 4px; }
.nexus-password { padding-right: 48px; }
.nexus-password-toggle { position: absolute; right: 5px; top: 3px; width: 40px; height: 40px; background: none; border: 0; color: #8094ae; }
.nexus-user-form { max-width: 920px; }
.nexus-user-table { min-width: 640px; margin-bottom: 0; }
.nexus-user-table td { vertical-align: middle; }
.nexus-workspace { min-width: 0; }
/* Keep page entrances immediate; theme.css synchronizes sidebar and shell motion. */
#nexus-main,
#nexus-main > [data-page-content],
#nexus-main .nk-content-inner,
#nexus-main .nk-content-body,
#nexus-main .nexus-workspace {
    animation: none !important;
    transition: none !important;
}
/* Existing CRM demo layouts are isolated from Bootstrap's utility names. */
#nexus-workspace :where(button, input, select, textarea) { font: inherit; }
#nexus-workspace :where(button:not(.btn)) { cursor: pointer; background-color: transparent; border-style: solid; border-width: 0; }
#nexus-workspace :where(input:not(.form-control), select:not(.form-control), textarea:not(.form-control)) { border-style: solid; }
#nexus-workspace :where(h1,h2,h3,h4,p) { margin-top: 0; margin-bottom: 0; }
#nexus-workspace :where(table) { border-collapse: collapse; }
#nexus-workspace :where(th) { text-align: inherit; }
#nexus-workspace :where(svg) { display: inline-block; vertical-align: middle; }
#nexus-workspace :where(.nx-border,.nx-border-b,.nx-border-t,.nx-border-r,.nx-border-l-2,.nx-border-b-2,.nx-divide-y > *) { border-style: solid; }
#nexus-workspace .nx-border-b { border-width: 0 0 1px; }
#nexus-workspace .nx-border-t { border-width: 1px 0 0; }
#nexus-workspace .nx-border-r { border-width: 0 1px 0 0; }
#nexus-workspace .nx-font-bold, #nexus-workspace .nx-font-extrabold { font-weight: 600; }
#nexus-workspace .nx-tracking-tight { letter-spacing: normal; }
#nexus-workspace .nx-text-red-500:not(.nx-border), #nexus-workspace .text-\[\#4965f5\] { color: #2263b3; }
#nexus-workspace .bg-\[\#315bd6\] { background-color: #2263b3; }
#nexus-workspace .nx-shadow-panel { box-shadow: none; }
#nexus-workspace .nx-rounded-xl { border-radius: 4px; }
#nexus-workspace .nexus-page-content { display: contents; }
@media(max-width:767px) { .nk-content { padding: 20px 12px; } .nk-auth-body { padding: 24px; } .nk-block-between { flex-wrap: wrap; gap: 12px; } .nexus-user-form .btn { min-height: 44px; } }
@media(prefers-reduced-motion:reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
    .nk-sidebar,
    .nk-sidebar + .nk-wrap,
    .nk-sidebar + .nk-wrap > .nk-header-fixed { transition-duration: .01ms !important; }
}

/* Restore the scoped CRM baseline without changing native DashLite components. */
#nexus-workspace :where(*, ::before, ::after) { box-sizing: border-box; border-width: 0; border-style: solid; border-color: #e5e7eb; }
#nexus-workspace :where(h1,h2,h3,h4,h5,h6) { font-size: inherit; font-weight: inherit; line-height: inherit; }
#nexus-workspace :where(button, input, select, textarea) { margin: 0; padding: 0; color: inherit; }
#nexus-workspace :where(ul,ol) { list-style: none; margin: 0; padding: 0; }
#nexus-workspace :where(a) { color: inherit; text-decoration: inherit; }
#nexus-workspace .nx-text-\[\#4965f5\] { color: #2263b3; }
#nexus-workspace .nx-bg-\[\#315bd6\] { background-color: #2263b3; }

#nexus-workspace .nx-overflow-x-auto { position: relative; }
#nexus-workspace .nx--my-7 { margin-top: 0; margin-bottom: 0; }

/* Shared Ollie-style page return control, including legacy CRM scopes. */
.nexus-back-button,
#nexus-workspace .nexus-back-button {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: .25rem;
    padding: .25rem .75rem;
    border: 1px solid #dbdfea;
    border-radius: 4px;
    background: #fff;
    color: #526484;
    font-size: .75rem;
    font-weight: 500;
    line-height: 1.5rem;
    text-decoration: none;
    white-space: nowrap;
}
.nexus-back-button:hover,
#nexus-workspace .nexus-back-button:hover { background: #f5f6fa; color: #364a63; border-color: #b7c2d0; }
.nexus-back-button:focus-visible { outline: 2px solid #2263b3; outline-offset: 3px; }
.nexus-back-button .icon { font-size: 1.125rem; }
.nexus-back-button .icon + span { padding: 0; margin: 0; }

/* Select2 renders outside the legacy select element; preserve native form sizing. */
.nexus-workspace .select2-container { max-width: 100%; min-width: 0; }
.nexus-workspace .select2-selection { min-height: 38px; }
.nexus-workspace .select2-selection--multiple { min-height: 38px; }
.select2-container--open { z-index: 1200; }
#nexus-workspace .select2-selection { border: 1px solid #dbdfea; border-radius: 4px; background: white; font-size: .875rem; }
#nexus-workspace .select2-selection__rendered { color: #526484; }
#nexus-workspace .select2-search__field { padding: 0; }

/* Ollie's compact pagination, shared across native and legacy table scopes. */
.nexus-table-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; font-size: .75rem; }
.nexus-table-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.nexus-page-size { display: inline-flex; align-items: center; flex-shrink: 0; gap: .5rem; margin: 0; font-size: .75rem; font-weight: 400; white-space: nowrap; }
.nexus-page-size .form-control { width: 64px; }
.nexus-page-size .select2-container { width: 64px !important; }
.nexus-page-size .select2-container .select2-selection--single { height: 30px; min-height: 30px; font-size: .75rem; }
.nexus-page-size .select2-container .select2-selection__rendered { line-height: 28px; padding: 0 1.25rem 0 .5rem; }
.nexus-page-size .select2-container .select2-selection__arrow { height: 28px; }
.nexus-pagination { max-width: 100%; }
:is(#nexus-workspace, #nexus-native) .nexus-pagination .pagination { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0; padding: 0; list-style: none; }
:is(#nexus-workspace, #nexus-native) .nexus-pagination .page-link { display: block; min-width: 30px; margin: 0; padding: .4375rem .5rem; border: 1px solid #e5e9f2; border-radius: 4px; background: #fff; color: #526484; font-size: .75rem; font-weight: 400; line-height: .875rem; text-align: center; text-decoration: none; }
:is(#nexus-workspace, #nexus-native) .nexus-pagination .page-link:hover { background: #ebeef2; color: #2263b3; }
:is(#nexus-workspace, #nexus-native) .nexus-pagination .active .page-link { background: #2263b3; border-color: #2263b3; color: #fff; }
:is(#nexus-workspace, #nexus-native) .nexus-pagination .disabled .page-link { background: #fff; color: #b7c2d0; cursor: default; pointer-events: none; }
:is(#nexus-workspace, #nexus-native) .nexus-pagination .page-link:focus-visible { outline: 2px solid #2263b3; outline-offset: 2px; }
@media (max-width: 575px) {
    .nexus-pagination .page-item[data-page-number]:not(.active) { display: none; }
}

/* Contact relationship indicator follows the compact ascending-bar reference. */
#nexus-workspace .nexus-contact-table { min-width: 960px; }
#nexus-workspace .nexus-relationship-strength { display: inline-flex; align-items: flex-end; gap: 3px; height: 20px; vertical-align: middle; }
#nexus-workspace .nexus-relationship-bar { display: block; width: 4px; border-radius: 2px; background: #e2e8f0; }
#nexus-workspace .nexus-relationship-bar.is-active { background: #2dd4a0; }
#nexus-workspace .nexus-relationship-bar:nth-child(1) { height: 6px; }
#nexus-workspace .nexus-relationship-bar:nth-child(2) { height: 9px; }
#nexus-workspace .nexus-relationship-bar:nth-child(3) { height: 12px; }
#nexus-workspace .nexus-relationship-bar:nth-child(4) { height: 15px; }
#nexus-workspace .nexus-relationship-bar:nth-child(5) { height: 18px; }

/* Name titles stay separate from names and wrap within the contact column. */
#nexus-workspace .nexus-contact-name { min-width: 0; }
#nexus-workspace .nexus-honorific-badges { display: flex; flex-wrap: wrap; gap: 4px; }
#nexus-workspace .nexus-honorific-badges:has(.nexus-honorific-badge) { margin-top: 4px; }
#nexus-workspace .nexus-honorific-badge { background: #fff8e6; color: #8a6116; border: 1px solid #f0dfb0; font-size: 10px; font-weight: 600; line-height: 1.3; padding: 2px 6px; white-space: normal; text-align: left; }

#nexus-workspace .nexus-honorific-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
#nexus-workspace .nexus-honorific-suggestion.btn { border: 1px solid #c5d5eb; border-radius: 4px; padding: 4px 8px; background: #fff; color: #2263b3; font-size: 12px; line-height: 1.4; }
#nexus-workspace .nexus-honorific-suggestion.btn:hover { background: #edf4fc; }
#nexus-workspace .nexus-honorific-suggestion.btn:focus-visible { outline: 2px solid #2263b3; outline-offset: 2px; }

#nexus-workspace .nexus-contact-information dt { color: #8094ae; font-size: 11px; font-weight: 600; text-transform: uppercase; }
#nexus-workspace .nexus-contact-information dd { margin: 4px 0 0; color: #364a63; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
#nexus-workspace .nexus-colleague-table { min-width: 640px; margin-bottom: 0; font-size: 13px; }
#nexus-workspace .nexus-colleague-table th { white-space: nowrap; background: #f5f6fa; color: #8094ae; font-size: 11px; }
#nexus-workspace .nexus-colleague-table td { vertical-align: middle; padding: 16px 12px; }
#nexus-workspace .nexus-colleague-profile { min-width: 180px; font-size: 12px; }

/* Contact profiles must sit above the fixed DashLite shell on phones. */
#nexus-workspace .nexus-contact-backdrop { z-index: 1040; }
#nexus-workspace .nexus-contact-modal { z-index: 1050; }

/* Purple identifies the contact avatar; modal controls retain the shared blue theme. */
#nexus-workspace .nexus-contact-modal .nexus-colleague-profile a { color: #2263b3; }
#nexus-workspace .nexus-contact-modal :is(a, button):focus-visible { outline: 2px solid #2263b3; outline-offset: 2px; }

#nexus-workspace .nexus-contact-name-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
#nexus-workspace .nexus-contact-name-row > :first-child { min-width: 0; }
#nexus-workspace .nexus-contact-name-row > .nexus-honorific-badges { margin-top: 0; flex-wrap: nowrap; max-width: 60%; }
#nexus-workspace .nexus-contact-name-row .nexus-honorific-badge { min-width: 0; }

/* Organisation dossier: reference-inspired header, underline tabs and flat sections. */
#nexus-workspace .nexus-org-detail { min-width: 0; }
#nexus-workspace .nexus-org-back { margin-bottom: 16px; }
#nexus-workspace .nexus-org-dossier { border: 1px solid #dbdfea; box-shadow: none; overflow: hidden; }
#nexus-workspace .nexus-org-header { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; padding: 28px 28px 22px; }
#nexus-workspace .nexus-org-identity { display: flex; align-items: center; flex: 1; min-width: 0; gap: 16px; }
#nexus-workspace .nexus-org-avatar { width: 60px; height: 60px; flex-shrink: 0; border-radius: 5px; font-size: 19px; }
#nexus-workspace .nexus-org-name { min-width: 0; }
#nexus-workspace .nexus-org-name-row { gap: 10px; }
#nexus-workspace .nexus-org-name h1 { font-size: 23px; line-height: 1.35; overflow-wrap: anywhere; margin: 0; }
#nexus-workspace .nexus-org-website { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }
#nexus-workspace .nexus-org-meta { font-size: 12px; margin-top: 5px; }
#nexus-workspace .nexus-org-counts { display: flex; align-items: center; gap: 24px; }
#nexus-workspace .nexus-org-counts button { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; padding: 6px 0; color: #364a63; text-align: left; }
#nexus-workspace .nexus-org-counts strong { font-size: 27px; line-height: 1; }
#nexus-workspace .nexus-org-counts span { font-size: 11px; line-height: 1.4; }
#nexus-workspace .nexus-org-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
#nexus-workspace .nexus-org-tabs { display: flex; gap: 25px; margin: 0 28px; border-bottom: 1px solid #dbdfea; overflow-x: auto; }
#nexus-workspace .nexus-org-tabs button { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; position: relative; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #8094ae; padding: 13px 0; font-size: 13px; font-weight: 500; white-space: nowrap; }
#nexus-workspace .nexus-org-tabs button.active { color: #2263b3; border-bottom-color: #2263b3; }
#nexus-workspace .nexus-org-tabs button:hover { color: #2263b3; }
#nexus-workspace .nexus-org-tab-count { background: #f0f3f7; padding: 1px 5px; border-radius: 3px; font-size: 10px; }
#nexus-workspace .nexus-org-panels { padding: 10px 28px 28px; }
#nexus-workspace .nexus-org-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; }
#nexus-workspace .nexus-org-column { min-width: 0; }
#nexus-workspace .nexus-org-section { min-width: 0; border-bottom: 1px solid #e5e9f2; padding-bottom: 8px; }
#nexus-workspace .nexus-org-section > header,
#nexus-workspace .nexus-org-section > button { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; border-bottom: 1px solid #e5e9f2; }
#nexus-workspace .nexus-org-section h2,
#nexus-workspace .nexus-org-section > button > span > span:first-child { font-size: 14px; font-weight: 600; color: #364a63; }
#nexus-workspace .nexus-org-section h2 .icon { margin-right: 7px; color: #8094ae; }
#nexus-workspace .nexus-org-section header p { font-size: 12px; margin-top: 3px; }
#nexus-workspace .nexus-org-metric-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 22px 0 18px; }
#nexus-workspace .nexus-org-metric-pair span,
#nexus-workspace .nexus-org-metric-pair small { font-size: 12px; }
#nexus-workspace .nexus-org-metric-pair strong { display: block; font-size: 21px; line-height: 1.45; margin: 5px 0; }
#nexus-workspace .nexus-org-section-body { padding: 18px 0; }
#nexus-workspace .nexus-org-section-body h3 { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
#nexus-workspace .nexus-org-section-body p { font-size: 13px; line-height: 1.8; color: #526484; margin-bottom: 10px; }
#nexus-workspace .nexus-org-section .nx-p-5 { padding: 18px 0; }
#nexus-workspace .nexus-org-overview #correspondence article { grid-template-columns: 32px minmax(0, 1fr); padding: 16px 0; gap: 10px; }
#nexus-workspace .nexus-org-overview #correspondence article > p { grid-column: 2; text-align: left; }
#nexus-workspace .nexus-org-overview #correspondence article > span { width: 32px; height: 32px; }
#nexus-workspace .nexus-org-overview #touch-points article { border: 0; border-bottom: 1px solid #e5e9f2; border-radius: 0; padding: 12px 0; }
#nexus-workspace .nexus-org-overview dd { overflow-wrap: anywhere; }
#nexus-workspace .nexus-org-tabs button:focus-visible,
#nexus-workspace .nexus-org-counts button:focus-visible { outline: 2px solid #2263b3; outline-offset: -2px; border-radius: 3px; }
@media (max-width: 991px) {
    #nexus-workspace .nexus-org-header { padding: 22px 20px 16px; gap: 16px; }
    #nexus-workspace .nexus-org-tabs { margin: 0 20px; gap: 22px; }
    #nexus-workspace .nexus-org-panels { padding: 8px 20px 20px; }
    #nexus-workspace .nexus-org-overview { grid-template-columns: minmax(0, 1fr); }
    #nexus-workspace .nexus-org-counts { gap: 20px; }
}
@media (max-width: 575px) {
    #nexus-workspace .nexus-org-header { padding: 20px 16px 14px; }
    #nexus-workspace .nexus-org-identity { flex-basis: 100%; gap: 12px; }
    #nexus-workspace .nexus-org-avatar { width: 48px; height: 48px; font-size: 16px; }
    #nexus-workspace .nexus-org-name h1 { font-size: 19px; }
    #nexus-workspace .nexus-org-actions { justify-content: flex-start; }
    #nexus-workspace .nexus-org-tabs { margin: 0 16px; }
    #nexus-workspace .nexus-org-panels { padding: 8px 16px 20px; }
    #nexus-workspace .nexus-org-section > header { flex-wrap: wrap; }
    #nexus-workspace .nexus-org-metric-pair { gap: 12px; }
    #nexus-workspace .nexus-org-metric-pair strong { font-size: 18px; }
}
#nexus-workspace .nexus-org-header-side { display: flex; flex-direction: column; align-items: flex-end; gap: 18px; }
#nexus-workspace .nexus-org-detail .btn { padding: .25rem .75rem; border: 1px solid #dbdfea; font-size: 12px; line-height: 1.5rem; color: #526484; }
#nexus-workspace .nexus-org-detail .btn-primary { background: #2263b3; border-color: #2263b3; color: #fff; }
#nexus-workspace .nexus-org-detail .btn-primary:hover { background: #1b5092; border-color: #1b5092; }
#nexus-workspace .nexus-org-website,
#nexus-workspace .nexus-org-detail .nexus-colleague-profile a { color: #2263b3; }
@media (max-width: 767px) {
    #nexus-workspace .nexus-org-header-side { width: 100%; align-items: flex-start; gap: 16px; }
}

#nexus-workspace .nexus-contact-organisation { display: flex; align-items: center; gap: 6px; min-width: 0; }
#nexus-workspace .nexus-contact-organisation > p { min-width: 0; }
#nexus-workspace .nexus-organisation-shortcut.btn { width: 18px; height: 18px; min-width: 18px; min-height: 18px; padding: 0; flex-shrink: 0; border: 1px solid #dbe3ef; border-radius: 4px; color: #8094ae; background: #fff; }
#nexus-workspace .nexus-organisation-shortcut.btn:hover { color: #2263b3; background: #edf4fc; border-color: #c5d5eb; }
#nexus-workspace .nexus-organisation-shortcut.btn:focus-visible { outline: 2px solid #2263b3; outline-offset: 2px; }
#nexus-workspace .nexus-organisation-shortcut .icon { font-size: 11px; }
@media (max-width: 991px) {
    #nexus-workspace .nexus-org-column { display: contents; }
    #nexus-workspace .nexus-org-summary { order: 1; }
    #nexus-workspace .nexus-org-latest { order: 2; }
    #nexus-workspace .nexus-org-section[aria-labelledby="organisation-information-title"] { order: 3; }
    #nexus-workspace .nexus-org-overview #correspondence { order: 4; }
    #nexus-workspace .nexus-org-overview #touch-points { order: 5; }
}

/* Shared list-page titles and inline totals follow the Organisations reference. */
:is(#nexus-workspace, #nexus-native) .nexus-directory-header { margin-bottom: 24px; }
:is(#nexus-workspace, #nexus-native) .nexus-directory-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
:is(#nexus-workspace, #nexus-native) h1[class],
:is(#nexus-workspace, #nexus-native) .nexus-directory-title { margin: 0; color: #364a63; font-size: 24px; font-weight: 700; line-height: 1.3; letter-spacing: -.03em; }
:is(#nexus-workspace, #nexus-native) .nexus-directory-description { margin: 4px 0 0; color: #8094ae; font-size: 14px; line-height: 1.5; }
:is(#nexus-workspace, #nexus-native) .nexus-directory-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex-shrink: 0; }
:is(#nexus-workspace, #nexus-native) .nexus-directory-actions .btn { font-size: 13px; font-weight: 700; padding: 8px 16px; border-width: 1px; border-radius: 4px; }
:is(#nexus-workspace, #nexus-native) .nexus-directory-actions .btn-outline-light { color: #526484; border-color: #dbdfea; background: #fff; }
:is(#nexus-workspace, #nexus-native) .nexus-directory-actions .btn-primary { color: #fff; }
:is(#nexus-workspace, #nexus-native) .nexus-directory-metrics { display: flex; flex-wrap: wrap; gap: 16px 40px; margin: 0; padding-top: 36px; }
:is(#nexus-workspace, #nexus-native) .nexus-directory-metrics > div { display: flex; align-items: baseline; gap: 10px; }
:is(#nexus-workspace, #nexus-native) .nexus-directory-metrics dd { order: -1; margin: 0; color: #364a63; font-size: 48px; font-weight: 600; line-height: 1.2; }
:is(#nexus-workspace, #nexus-native) .nexus-directory-metrics dt { color: #8094ae; font-size: 16px; font-weight: 400; }
@media (max-width: 575px) {
    :is(#nexus-workspace, #nexus-native) .nexus-directory-heading { flex-direction: column; align-items: flex-start; }
    :is(#nexus-workspace, #nexus-native) .nexus-directory-actions { flex-shrink: 1; max-width: 100%; }
    :is(#nexus-workspace, #nexus-native) .nexus-directory-metrics { column-gap: 24px; padding-top: 24px; }
    :is(#nexus-workspace, #nexus-native) .nexus-directory-metrics dd { font-size: 40px; }
}

/* A single square logo renderer is shared by organisation list and card views. */
#nexus-workspace .nexus-org-list-identity { display: flex; align-items: center; gap: 12px; }
#nexus-workspace .nexus-company-logo { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: 0 0 36px; overflow: hidden; border: 1px solid #e5e9f2; border-radius: 4px; background: #f5f6fa; color: #8094ae; }
#nexus-workspace .nexus-company-logo img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
#nexus-workspace .nexus-company-logo .icon { font-size: 20px; }
#nexus-workspace .nexus-org-identity .nexus-company-logo { width: 60px; height: 60px; flex-basis: 60px; }
@media (max-width: 575px) {
    #nexus-workspace .nexus-org-identity .nexus-company-logo { width: 48px; height: 48px; flex-basis: 48px; }
}
#nexus-workspace .nexus-org-colleague-count { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; background: #f1f4f8; color: #526484; font-size: 12px; font-weight: 600; }
#nexus-workspace .nexus-org-colleague-count:hover { background: #e8f0fa; color: #2263b3; }
/* Shared directory actions across Contacts, Organisations and Deals. */
.nexus-workspace .nexus-directory-action,
#nexus-workspace .nexus-org-deals .nexus-directory-action,
#nexus-workspace .nexus-contact-view,
#nexus-workspace .nexus-org-view-button { padding: 3px 10px; border: 1px solid #c4d8ef; color: #2263b3; background: #e9f2fc; font-size: 11px; line-height: 18px; font-weight: 700; }
.nexus-workspace .nexus-directory-action:hover,
#nexus-workspace .nexus-org-deals .nexus-directory-action:hover,
#nexus-workspace .nexus-contact-view:hover,
#nexus-workspace .nexus-org-view-button:hover { color: #fff; background: #2263b3; border-color: #2263b3; }
.nexus-workspace .nexus-directory-action-secondary,
#nexus-workspace .nexus-org-deals .nexus-directory-action-secondary { color: #526484; background: #f5f6fa; border-color: #dbdfea; }
.nexus-workspace .nexus-directory-action-secondary:hover,
#nexus-workspace .nexus-org-deals .nexus-directory-action-secondary:hover { color: #fff; background: #364a63; border-color: #364a63; }
#nexus-workspace .nexus-org-directory-table { min-width: 900px; }
#nexus-workspace .nexus-org-name-column { min-width: 200px; }

/* Pointer clicks retain control state without a lingering keyboard-focus ring. */
#nexus-workspace .nexus-org-page :is(button, a):focus:not(:focus-visible) { outline: none; box-shadow: none; }
#nexus-workspace .nexus-org-page :is(button, a):focus-visible { outline: 2px solid #2263b3; outline-offset: 2px; }

/* Bound Select2 width through its wrapper so organisation section filters stay compact. */
#nexus-workspace .nexus-org-section-filter { width: 180px; max-width: 100%; flex: 0 0 180px; margin-left: auto; }
#nexus-workspace .nexus-org-section-filter .select2-container { width: 100% !important; }
#nexus-workspace .nexus-org-section-filter .select2-selection--single { min-height: 32px; height: 32px; font-size: 12px; }
#nexus-workspace .nexus-org-section-filter .select2-selection__rendered { line-height: 30px; }
#nexus-workspace .nexus-org-section-filter .select2-selection__arrow { height: 30px; }

/* Shared sales-stage pills: Deals and Organisation deals use the same mapping. */
.deal-stage { display: inline-block; border: 0; border-radius: 9999px; padding: .25rem .625rem; font-size: .75rem; font-weight: 700; line-height: 1.4; white-space: normal; text-align: left; color: var(--deal-stage-ink); background-color: var(--deal-stage-fill); }
.deal-stage.deal-stage-prospecting { --deal-stage-ink: #334155; --deal-stage-fill: #f1f5f9; }
.deal-stage.deal-stage-initial { --deal-stage-ink: #6d28d9; --deal-stage-fill: #ede9fe; }
.deal-stage.deal-stage-viewing { --deal-stage-ink: #a21caf; --deal-stage-fill: #fae8ff; }
.deal-stage.deal-stage-negotiation { --deal-stage-ink: #0369a1; --deal-stage-fill: #e0f2fe; }
.deal-stage.deal-stage-documentation { --deal-stage-ink: #155e75; --deal-stage-fill: #cffafe; }
.deal-stage.deal-stage-closeout { --deal-stage-ink: #0f766e; --deal-stage-fill: #ccfbf1; }
.deal-stage.deal-stage-billing { --deal-stage-ink: #3f6212; --deal-stage-fill: #ecfccb; }
.deal-stage.deal-stage-won { --deal-stage-ink: #047857; --deal-stage-fill: #d1fae5; }
.deal-stage.deal-stage-lost { --deal-stage-ink: #be123c; --deal-stage-fill: #ffe4e6; }
.deal-stage.deal-stage-kiv { --deal-stage-ink: #854d0e; --deal-stage-fill: #fef9c3; }
.deal-stage.deal-stage-unknown { --deal-stage-ink: #334155; --deal-stage-fill: #f1f5f9; }
a.deal-stage:hover { text-decoration: underline; filter: brightness(.97); }

/* Ollie-style Users directory; keep these rules scoped to the native Users page. */
.nexus-users-breadcrumb { margin: 10px 0 0; padding: 0; background: transparent; font-size: 11px; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; }
.nexus-users-filters .form-icon { color: #8094ae; }
.nexus-users-filter-actions { display: flex; gap: 12px; }
.nexus-users-page .nexus-user-table { min-width: 960px; }
.nexus-users-page .nexus-user-table th { padding: 7px 12px; white-space: nowrap; }
.nexus-users-page .nexus-user-table td { padding: 8px 12px; }
.nexus-users-page .nexus-user-number { width: 48px; }
.nexus-users-page .nexus-user-identity { width: 28%; }
.nexus-users-page .nexus-user-departments { width: 35%; }
.nexus-users-page .nexus-user-table th:nth-child(3) { width: 9%; }
.nexus-users-page .nexus-user-table th:nth-child(5) { width: 5%; }
.nexus-users-page .nexus-user-table th:nth-child(6) { width: 16%; }
.nexus-users-breadcrumb .breadcrumb-item + .breadcrumb-item::before { content: "/"; }
.nexus-user-name { display: flex; align-items: center; gap: 6px; }
.nexus-user-meta { margin-top: 2px; overflow-wrap: anywhere; }
.nexus-user-login { white-space: nowrap; }
.nexus-user-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.nexus-user-actions .dropdown-toggle::after { display: none; }
.nexus-user-actions .btn-trigger { width: 28px; height: 28px; padding: 0; }
.nexus-users-page .badge { white-space: nowrap; }
@media (max-width: 767px) {
    .nexus-users-page .nk-block-between { align-items: flex-start; gap: 16px; }
    .nexus-users-filter-actions { margin-top: 8px; }
}

/* Organisation deal rows reuse the native Deals table and shared action palette. */
#nexus-workspace .nexus-org-deals .deal-table { font-size: .8125rem; }
#nexus-workspace .nexus-org-deals .deal-table th { background: #f5f6fa; font-size: .75rem; font-weight: 600; color: #526484; }
#nexus-workspace .nexus-org-deals .deal-table td { border-bottom: 1px solid #edf1f7; color: #526484; }
#nexus-workspace .nexus-org-deals .deal-table tbody tr:hover { background: #f8fafc; }
#nexus-workspace .nexus-org-deals .deal-table a.deal-cell { color: #2263b3; font-weight: 700; }

#nexus-workspace .nexus-org-contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 18px 0; }
#nexus-workspace .nexus-org-contact-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px; border: 1px solid #dbdfea; border-radius: 4px; background: #fff; text-align: left; color: #526484; transition: border-color .15s, background-color .15s; }
#nexus-workspace .nexus-org-contact-card:hover { border-color: #b8cce5; background: #f8fafc; }
#nexus-workspace .nexus-org-contact-card:focus-visible { outline: 2px solid #2263b3; outline-offset: 2px; }
#nexus-workspace .nexus-org-contact-copy { display: grid; gap: 4px; min-width: 0; flex: 1; font-size: 12px; }
#nexus-workspace .nexus-org-contact-copy strong { font-size: 14px; font-weight: 600; color: #334155; }
#nexus-workspace .nexus-org-contact-copy > span { overflow-wrap: anywhere; }
#nexus-workspace .nexus-org-contact-email { color: #2263b3; }
#nexus-workspace .nexus-org-contact-card > .nexus-relationship-strength { flex-shrink: 0; }
#nexus-workspace.nexus-deal-contacts { padding: 0 24px; }
.nexus-deals .deal-related-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
#nexus-workspace .nexus-deal-contact-item { min-width: 0; }
@media (max-width: 1199px) { #nexus-workspace .nexus-org-contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { #nexus-workspace .nexus-org-contact-grid { grid-template-columns: minmax(0, 1fr); } }

/* Pointer focus keeps controls operable without leaving a click outline. */
:is(#nexus-workspace, #nexus-native, .nk-header, .nk-sidebar) :is(button, a, [role="button"], [role="tab"]):focus:not(:focus-visible) { outline: none; box-shadow: none; }
:is(#nexus-workspace, #nexus-native, .nk-header, .nk-sidebar) :is(button, a, [role="button"], [role="tab"]):focus-visible { outline: 2px solid #2263b3; outline-offset: 2px; }


/* Settings section navigation adapted from Ollie's shell. */
.nexus-settings-workspace { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100vh - 245px); overflow: hidden; border: 1px solid #e5e9f2; border-radius: 6px; background: #fff; }
.nexus-settings-nav { padding: 16px 0; border-right: 1px solid #e5e9f2; }
.nexus-settings-nav-link { display: flex; align-items: center; gap: 12px; min-height: 52px; margin: 0 14px 5px; padding: 12px 16px; border-left: 4px solid transparent; border-radius: 0 5px 5px 0; color: #526484; font-weight: 600; }
.nexus-settings-nav-link:hover { background: #f5f8fc; color: #2263b3; }
.nexus-settings-nav-link.active { border-left-color: #2263b3; background: #edf6fd; color: #2263b3; }
.nexus-settings-nav-link .icon { width: 20px; font-size: 20px; text-align: center; }
.nexus-settings-content { min-width: 0; padding: 20px 32px 32px; }
@media (max-width: 767px) {
    .nexus-settings-workspace { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .nexus-settings-nav { border-right: 0; border-bottom: 1px solid #e5e9f2; }
    .nexus-settings-content { padding: 20px 16px; }
}

/* Organisation colleague identity follows Users, with a stronger name hierarchy. */
#nexus-workspace .nexus-org-colleagues .nexus-user-name { gap: 8px; }
#nexus-workspace .nexus-org-colleagues .nexus-user-name .icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: #e9f2fc; color: #526484; font-size: 18px; }
#nexus-workspace .nexus-org-colleagues .nexus-user-name strong { color: #334155; font-size: 14px; font-weight: 600; line-height: 1.5; }
#nexus-workspace .nexus-org-colleagues .nexus-user-meta { margin-top: 2px; margin-left: 36px; font-size: 12px; color: #8094ae; }
#nexus-workspace .nexus-org-colleagues .nexus-user-meta a { color: inherit; }
#nexus-workspace .nexus-org-colleagues .nexus-user-meta a:hover { color: #2263b3; text-decoration: underline; }

#nexus-workspace .nexus-org-colleagues .nexus-colleague-table td { padding: 12px; }

/* Compact contact cards, scoped to Deal Connections. */
#nexus-workspace.nexus-deal-contacts .nexus-org-contact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 4px 0 16px; }
#nexus-workspace.nexus-deal-contacts .nexus-org-contact-card { padding: 10px 12px; gap: 10px; }
#nexus-workspace.nexus-deal-contacts .nexus-org-contact-copy { gap: 2px; font-size: 11px; }
#nexus-workspace.nexus-deal-contacts .nexus-org-contact-copy strong { font-size: 13px; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-connections-table td { padding: 8px 12px; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-connection-person { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 12px; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-connection-person .icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; background: #e9f2fc; color: #8094ae; font-size: 18px; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-connection-person strong { font-weight: 600; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-connection-contact { padding: 0; border: 0; background: transparent; color: #2263b3; text-align: left; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-connection-contact .icon { background: #ede9fe; color: #8b5cf6; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-connection-contact:hover span { text-decoration: underline; }
@media (max-width: 991px) { #nexus-workspace.nexus-deal-contacts .nexus-org-contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { #nexus-workspace.nexus-deal-contacts .nexus-org-contact-grid { grid-template-columns: minmax(0, 1fr); } }

/* Key contact removal uses a sibling control, never a nested button. */
#nexus-workspace.nexus-deal-contacts .nexus-deal-contact-profile { position: relative; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-contact-profile > .nexus-org-contact-card { padding-right: 44px; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-contact-remove { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; border-radius: 4px; background: transparent; color: #8094ae; font-size: 17px; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-contact-remove:hover { color: #e85347; background: #fff0f0; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog { width: 440px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: auto; border: 1px solid #dbdfea; border-radius: 6px; color: #364a63; background: #fff; box-shadow: 0 16px 48px #1c2c4533; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog::backdrop { background: #101b2d80; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog .modal-footer { gap: 8px; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog .modal-header { padding: 16px 20px; border-bottom: 1px solid #e5e9f2; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog .modal-title { font-size: 16px; font-weight: 600; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog .modal-body { padding: 20px; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog .modal-footer { display: flex; justify-content: flex-end; flex-wrap: wrap; padding: 16px 20px; border-top: 1px solid #e5e9f2; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog .btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; border: 1px solid #dbdfea; border-radius: 4px; background: #fff; color: #526484; font-size: 13px; font-weight: 600; line-height: 1.4; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog .btn-danger { border-color: #e85347; background: #e85347; color: #fff; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog .btn-danger:hover { border-color: #d74035; background: #d74035; }
html:has(:is(.nexus-deal-remove-dialog, .nexus-deal-add-dialog)[open]) { overflow: hidden; }

#nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog { width: 620px; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog .form-label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog .form-control { display: block; width: 100%; padding: 8px 12px; min-height: 38px; border: 1px solid #dbdfea; border-radius: 4px; background: #fff; font-size: 13px; }
#nexus-workspace.nexus-deal-contacts .nexus-create-contact-link { padding: 0; border: 0; background: transparent; color: #2263b3; text-decoration: underline; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog .btn-primary,
#nexus-workspace.nexus-deal-contacts .nexus-add-key-contact { padding: 7px 12px; border: 1px solid #2263b3; border-radius: 4px; background: #2263b3; color: #fff; font-size: 12px; font-weight: 600; }
#nexus-workspace.nexus-deal-contacts .nexus-add-key-contact { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; font-size: 11px; line-height: 1.5; }
/* Keep this picker in modal flow so results cannot cover or widen its actions. */
#nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog[open] { display: flex; flex-direction: column; overflow: hidden; top: 32px; bottom: auto; left: 0; right: 0; margin: 0 auto; height: min(580px, calc(100dvh - 64px)); max-height: calc(100dvh - 64px); }
#nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog > form { display: flex; flex-direction: column; flex: 1; width: 100%; min-width: 0; min-height: 0; max-height: calc(100dvh - 66px); margin: 0; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog .modal-header,
#nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog .modal-footer { flex-shrink: 0; }
#nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog .modal-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
#nexus-workspace.nexus-deal-contacts .nexus-contact-picker { min-width: 0; }
#nexus-workspace.nexus-deal-contacts .nexus-contact-picker > .select2 { width: 100% !important; }
#nexus-workspace.nexus-deal-contacts .nexus-contact-picker > .select2-container:not(.select2) { position: static !important; width: 100% !important; }
#nexus-workspace.nexus-deal-contacts .nexus-contact-picker .select2-dropdown { position: static; width: 100% !important; border: 1px solid #dbdfea; background: #fff; }
#nexus-workspace.nexus-deal-contacts .nexus-contact-picker .select2-search--dropdown { display: block; padding: 8px; }
#nexus-workspace.nexus-deal-contacts .nexus-contact-picker .select2-search__field { display: block; box-sizing: border-box; width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #dbdfea; border-radius: 4px; background: #fff; color: #364a63; font-size: 13px; line-height: 1.4; }
#nexus-workspace.nexus-deal-contacts .nexus-contact-picker .select2-results__options { max-height: min(220px, 30dvh); overflow-y: auto; }
#nexus-workspace.nexus-deal-contacts .nexus-contact-picker .select2-results__option { padding: 8px 10px; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
#nexus-workspace.nexus-deal-contacts .nexus-contact-picker .select2-selection__rendered { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Fixed geometry prevents outside pointer-down dismissal moving the next target. */
@media (max-width: 575px) {
    #nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog[open] { top: 16px; height: calc(100dvh - 32px); max-height: calc(100dvh - 32px); }
    #nexus-workspace.nexus-deal-contacts .nexus-deal-add-dialog > form { max-height: calc(100dvh - 34px); }
}

/* Page-owned preview strip follows the shell width and stays below its 65px header. */
.nk-wrap > .nexus-preview-notice {
    position: sticky;
    top: 65px;
    z-index: 1000;
    flex-shrink: 0;
    margin: 65px 0 0;
    border-radius: 0;
    border-width: 0 0 1px;
    color: #000;
}
.nk-wrap > .nexus-preview-notice .icon { color: #000; }
.nk-header-fixed ~ .nexus-preview-notice ~ .nk-content { margin-top: 0; }
