:root {
    color-scheme: light;
    --nx-orange: #ec5f1c;
    --nx-orange-dark: #bf4310;
    --nx-orange-soft: #fff1e9;
    --nx-ink: #142033;
    --nx-text: #334155;
    --nx-muted: #64748b;
    --nx-faint: #94a3b8;
    --nx-line: #e2e8f0;
    --nx-canvas: #eef2f6;
    --nx-card: #ffffff;
    --nx-blue: #2563eb;
    --nx-blue-soft: #eaf1ff;
    --nx-green: #0f9f6e;
    --nx-green-soft: #e7f8f1;
    --nx-red: #dc3545;
    --nx-red-soft: #ffeaec;
    --nx-amber: #d97706;
    --nx-amber-soft: #fff4d6;
    --nx-violet: #7c3aed;
    --nx-violet-soft: #f2ebff;
    --nx-cyan: #0891b2;
    --nx-cyan-soft: #e5f8fc;
    --nx-pink: #db2777;
    --nx-pink-soft: #fce7f3;
    --nx-shadow: 0 10px 28px rgba(20, 32, 51, 0.07);
    --nx-shadow-small: 0 2px 10px rgba(20, 32, 51, 0.06);
    --nx-sidebar: 260px;
    --nx-topbar: 68px;
    --nx-radius-card: 14px;
    --nx-radius-control: 8px;
    /* Type scale — one family for nav + content (SaaS density). */
    --nx-font: "Plus Jakarta Sans", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
    --nx-fs-page: 1.5rem;       /* page title */
    --nx-fs-section: 1.05rem;   /* Open Claims / Channel Mix */
    --nx-fs-metric: 2rem;       /* hero Open/Closed totals */
    --nx-fs-lane: 1.2rem;       /* lane counts */
    --nx-fs-body: 0.9375rem;    /* nav + body */
    --nx-fs-meta: 0.75rem;      /* stamps, % shares, captions */
    --nx-fs-chip: 0.7rem;       /* SLA chips — calm, not soup */
    --nx-fw-regular: 500;
    --nx-fw-medium: 600;
    --nx-fw-bold: 700;
    --nx-fw-black: 800;
    font-family: var(--nx-font);
    font-size: 16px;
    letter-spacing: 0;
    font-feature-settings: "ss01" 1, "cv11" 1;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    letter-spacing: 0;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--nx-canvas);
    color: var(--nx-text);
}

body {
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
}

img,
svg {
    display: block;
}

.nx-skip-link {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    border-radius: var(--nx-radius-control);
    background: var(--nx-ink);
    color: #fff;
    transform: translateY(-160%);
}

.nx-skip-link:focus {
    transform: translateY(0);
}

:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.42);
    outline-offset: 2px;
}

.nx-body {
    min-width: 320px;
    overflow-x: hidden;
}

.nx-boot-screen,
.nx-noscript {
    min-height: 100vh;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 10px;
    text-align: center;
    color: var(--nx-muted);
}

.nx-boot-screen img {
    border-radius: 14px;
    box-shadow: var(--nx-shadow-small);
}

.nx-boot-screen strong {
    color: var(--nx-ink);
    font-size: 1.2rem;
}

.nx-app-shell {
    min-height: 100vh;
    background: var(--nx-canvas);
}

.nx-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: var(--nx-sidebar);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--nx-line);
    background: #fff;
    transition: transform 180ms ease;
}

.nx-brand {
    min-height: var(--nx-topbar);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 22px;
    border-bottom: 1px solid #edf1f5;
}

.nx-brand img {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(236, 95, 28, 0.18);
    object-fit: contain;
    background: #fff;
}

.nx-brand strong,
.nx-auth-brand strong {
    display: block;
    color: var(--nx-ink);
    font-size: 1.08rem;
    line-height: 1.2;
}

.nx-brand span,
.nx-auth-brand span {
    display: block;
    margin-top: 2px;
    color: var(--nx-orange);
    font-size: 0.68rem;
    font-weight: 800;
}

.nx-brand-tagline,
.nx-auth-tagline {
    font-size: 0.82rem;
    line-height: 1.25;
    letter-spacing: 0.01em;
    text-transform: none;
}

.nx-nav {
    flex: 1;
    overflow-y: auto;
    padding: 18px 14px 26px;
    scrollbar-width: thin;
}

.nx-nav-section + .nx-nav-section {
    margin-top: 22px;
}

.nx-nav-heading {
    margin: 0 12px 8px;
    color: var(--nx-faint);
    font-size: var(--nx-fs-meta);
    font-weight: var(--nx-fw-bold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nx-nav-section.is-primary {
    margin-bottom: 8px;
}

.nx-nav-section.is-secondary {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    opacity: 0.78;
}

.nx-nav-heading.is-secondary {
    font-weight: 650;
    letter-spacing: 0.04em;
    color: #8a97a8;
}

.nx-nav-section.is-secondary .nx-nav-item,
.nx-nav-item.is-secondary {
    min-height: 40px;
    font-weight: 550;
    color: #6b7a8d;
}

.nx-nav-section.is-secondary .nx-nav-item.is-active,
.nx-nav-item.is-secondary.is-active {
    opacity: 1;
    color: var(--nx-ink);
}

.nx-back-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 36px;
    padding: 6px 12px 6px 8px;
    border: 1px solid #d7dee8;
    border-radius: 10px;
    background: #fff;
    color: var(--nx-ink);
    font-weight: 650;
    cursor: pointer;
}

.nx-back-button:hover {
    background: #f6f8fa;
}

.nx-back-chevron {
    width: 18px;
    height: 18px;
    stroke-width: 2.4;
}

.nx-claimant-bar .nx-back-button {
    flex-shrink: 0;
}

.nx-nav-item {
    position: relative;
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0;
    padding: 8px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #4a5a6d;
    font-size: var(--nx-fs-body);
    font-weight: var(--nx-fw-medium);
    line-height: 1.25;
    text-align: left;
    transition: background 160ms ease, color 160ms ease, transform 120ms ease;
}

.nx-nav-item:hover {
    background: #f6f8fa;
    color: var(--nx-ink);
}

.nx-nav-item:active,
.nx-button:active,
.nx-icon-button:active {
    transform: translateY(1px);
}

.nx-nav-item.is-active {
    padding-right: 28px;
    background: var(--nx-orange-soft);
    color: var(--nx-orange-dark);
}

.nx-nav-item.is-active::after {
    content: "";
    position: absolute;
    right: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--nx-orange);
}

.nx-nav-icon,
.nx-button svg,
.nx-icon-button svg,
.nx-inline-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    stroke-width: 2;
}

.nx-sidebar-footer {
    padding: 14px;
    border-top: 1px solid #edf1f5;
}

.nx-release-label {
    display: block;
    margin-top: 9px;
    color: #6f8092;
    font-size: 0.66rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.nx-safety-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px;
    border-radius: 10px;
    background: var(--nx-green-soft);
    color: #116149;
    font-size: 0.78rem;
}

.nx-topbar {
    position: fixed;
    inset: 0 0 auto var(--nx-sidebar);
    z-index: 30;
    height: var(--nx-topbar);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 28px;
    border-bottom: 1px solid var(--nx-line);
    background: rgba(255, 255, 255, 0.98);
}

.nx-topbar-spacer {
    flex: 1;
}

.nx-is-offline .nx-topbar {
    border-bottom-color: #d74242;
    box-shadow: inset 0 -3px 0 #d74242;
}

.nx-icon-button {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--nx-line);
    border-radius: 50%;
    background: #fff;
    color: #526277;
}

.nx-icon-button:hover {
    background: #f7f9fb;
    color: var(--nx-ink);
}

.nx-menu-button {
    display: none;
}

.nx-topbar-context {
    min-width: 0;
}

.nx-topbar-context strong {
    display: block;
    max-width: 30ch;
    overflow: hidden;
    color: var(--nx-ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nx-topbar-context span {
    display: block;
    color: var(--nx-muted);
    font-size: 0.75rem;
}

.nx-profile {
    position: relative;
    padding-left: 18px;
    border-left: 1px solid var(--nx-line);
}

.nx-profile-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    list-style: none;
    cursor: pointer;
    border-radius: 12px;
    padding: 4px 6px;
}

.nx-profile-trigger::-webkit-details-marker {
    display: none;
}

.nx-profile-trigger:hover,
.nx-profile[open] .nx-profile-trigger {
    background: rgba(15, 23, 42, 0.04);
}

.nx-profile-copy {
    min-width: 0;
    text-align: right;
}

.nx-profile-copy strong,
.nx-profile-copy span {
    display: block;
    max-width: 22ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nx-profile-copy strong {
    color: var(--nx-ink);
    font-size: 0.88rem;
}

.nx-profile-copy span {
    color: var(--nx-blue);
    font-size: 0.7rem;
    font-weight: 700;
}

.nx-profile-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 40;
    min-width: 220px;
    padding: 10px;
    border: 1px solid var(--nx-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--nx-shadow-small);
}

.nx-profile-menu-meta {
    display: grid;
    gap: 2px;
    padding: 6px 8px 10px;
    border-bottom: 1px solid var(--nx-line);
    margin-bottom: 8px;
}

.nx-profile-menu-meta span,
.nx-profile-menu-meta small {
    color: var(--nx-muted);
    font-size: 0.72rem;
}

.nx-profile-menu-meta strong {
    color: var(--nx-ink);
    font-size: 0.92rem;
}

.nx-profile-signout {
    width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: var(--nx-ink);
    font: inherit;
    font-weight: 700;
    padding: 10px 8px;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
}

.nx-profile-signout:hover {
    background: rgba(220, 38, 38, 0.08);
    color: var(--nx-red);
}

.nx-table tr.is-clickable {
    cursor: pointer;
}

.nx-table tr.is-clickable:hover {
    background: rgba(37, 99, 235, 0.04);
}

.nx-email-wrap {
    display: block;
    max-width: 28ch;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.nx-allocation-card .nx-button {
    margin-top: 8px;
    align-self: flex-start;
}

.nx-avatar {
    position: relative;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--nx-blue);
    color: #fff;
    font-weight: 750;
}

.nx-avatar::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 1px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #22c55e;
}

.nx-main {
    min-width: 0;
    min-height: 100vh;
    margin-left: var(--nx-sidebar);
    padding: calc(var(--nx-topbar) + 30px) 30px 54px;
}

.nx-content {
    min-width: 0;
    width: min(100%, 1680px);
    margin: 0 auto;
}

.nx-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.nx-page-header > div:first-child {
    min-width: 0;
}

.nx-page-header h1,
.nx-section-title,
.nx-card-title {
    margin: 0;
    color: var(--nx-ink);
}

.nx-page-header h1 {
    font-size: clamp(1.65rem, 2.2vw, 2.25rem);
    line-height: 1.18;
}

.nx-page-header p,
.nx-section-header p,
.nx-card-header p {
    margin: 5px 0 0;
    color: var(--nx-muted);
}

.nx-eyebrow {
    margin: 0 0 7px !important;
    color: var(--nx-blue) !important;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.nx-header-actions,
.nx-toolbar,
.nx-button-row,
.nx-inline-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nx-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: var(--nx-radius-control);
    background: #fff;
    color: var(--nx-ink);
    font-weight: 720;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.nx-button-primary {
    border-color: var(--nx-orange);
    background: var(--nx-orange);
    color: #fff;
    box-shadow: 0 7px 16px rgba(236, 95, 28, 0.2);
}

.nx-button-primary:hover {
    background: var(--nx-orange-dark);
}

.nx-button-blue {
    border-color: var(--nx-blue);
    background: var(--nx-blue);
    color: #fff;
}

.nx-button-success {
    border-color: var(--nx-green);
    background: var(--nx-green);
    color: #fff;
}

.nx-button-danger {
    border-color: var(--nx-red);
    background: var(--nx-red);
    color: #fff;
}

.nx-button-warning {
    border-color: #f59e0b;
    background: #f59e0b;
    color: #172334;
}

.nx-button-secondary {
    border-color: #cbd5e1;
    background: #fff;
    color: #3f4e62;
}

.nx-button-ghost {
    border-color: transparent;
    background: transparent;
    color: var(--nx-blue);
}

.nx-button-small {
    min-height: 36px;
    padding: 7px 11px;
    font-size: 0.82rem;
}

.nx-button-wide {
    width: 100%;
}

.nx-mailbox-test {
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
}

.nx-button:disabled,
.nx-icon-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    box-shadow: none;
}

.nx-hint-strip {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 24px;
    padding: 15px 16px;
    border: 1px solid #cddcff;
    border-radius: 12px;
    background: #f1f6ff;
    color: #274060;
}

.nx-hint-strip ol {
    display: flex;
    gap: 22px;
    margin: 0;
    padding-left: 20px;
    font-size: 0.88rem;
}

.nx-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 26px;
}

.nx-kpi-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nx-kpi-ready-expand {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: -10px 0 22px;
}

.nx-kpi-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid #dbe4ef;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: left;
}

.nx-kpi-child span {
    color: #3c4c60;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nx-kpi-child strong {
    flex-shrink: 0;
    font-size: 1.2rem;
}

.nx-kpi-child.is-active,
.nx-kpi-card.is-active {
    border-color: #ec5f1c;
    box-shadow: 0 0 0 2px rgba(236, 95, 28, 0.16);
}

/* Six-tile boards (Manager Center) — keep one even row instead of a
   single orphaned tile wrapping onto its own line. */
.nx-kpi-grid:has(> :nth-child(6)) {
    grid-template-columns: repeat(6, minmax(140px, 1fr));
}

.nx-kpi-card {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    padding: 20px;
    border: 1px solid #e7ebf0;
    border-radius: var(--nx-radius-card);
    background: #fff;
    box-shadow: var(--nx-shadow-small);
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.nx-kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--tone, var(--nx-blue));
}

.nx-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--nx-shadow);
}

.nx-kpi-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 10px;
    background: var(--tone, var(--nx-blue));
    color: #fff;
}

.nx-kpi-icon svg {
    width: 23px;
    height: 23px;
}

.nx-kpi-label {
    display: block;
    color: var(--nx-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.nx-kpi-value {
    display: block;
    margin-top: 3px;
    color: var(--tone, var(--nx-blue));
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
}

button.nx-kpi-card,
button.nx-summary-tile,
button.nx-detail-row,
button.nx-management-flow-step,
button.nx-count-jump,
button.nx-badge,
button.nx-work-rag,
button.nx-work-summary-main {
    font: inherit;
    color: inherit;
    text-align: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

button.nx-kpi-card,
button.nx-summary-tile,
button.nx-management-flow-step,
button.nx-work-summary-main {
    width: 100%;
}

button.nx-detail-row {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 8px 0;
    border-radius: 8px;
}

button.nx-detail-row:hover,
button.nx-count-jump:hover,
.nx-source-row.is-clickable:hover {
    background: rgba(37, 99, 235, 0.06);
}

button.nx-count-jump {
    border: 0;
    background: transparent;
    padding: 0;
}

.nx-kpi-card.is-clickable,
.nx-summary-tile.is-clickable,
.nx-management-flow-step.is-clickable {
    cursor: pointer;
}

.nx-kpi-card.is-clickable:focus-visible,
.nx-summary-tile.is-clickable:focus-visible,
.nx-detail-row.is-clickable:focus-visible,
.nx-management-flow-step.is-clickable:focus-visible,
.nx-source-row.is-clickable:focus-visible,
button.nx-badge.is-clickable:focus-visible {
    outline: 2px solid var(--nx-blue);
    outline-offset: 2px;
}

.nx-source-row.is-clickable {
    cursor: pointer;
}

.nx-section-focus {
    animation: nx-section-focus-pulse 1.6s ease;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.28);
    border-radius: 12px;
}

@keyframes nx-section-focus-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45); }
    40% { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.18); }
    100% { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0); }
}

.nx-tone-primary,
.nx-tone-blue {
    --tone: var(--nx-blue);
    --tone-soft: var(--nx-blue-soft);
}

.nx-tone-positive,
.nx-tone-green {
    --tone: var(--nx-green);
    --tone-soft: var(--nx-green-soft);
}

.nx-tone-danger,
.nx-tone-red {
    --tone: var(--nx-red);
    --tone-soft: var(--nx-red-soft);
}

.nx-tone-warning,
.nx-tone-orange,
.nx-tone-amber {
    --tone: var(--nx-amber);
    --tone-soft: var(--nx-amber-soft);
}

.nx-tone-violet {
    --tone: var(--nx-violet);
    --tone-soft: var(--nx-violet-soft);
}

.nx-tone-cyan,
.nx-tone-neutral {
    --tone: var(--nx-cyan);
    --tone-soft: var(--nx-cyan-soft);
}

.nx-tone-pink {
    --tone: var(--nx-pink);
    --tone-soft: var(--nx-pink-soft);
}

.nx-grid-2,
.nx-grid-3,
.nx-grid-4,
.nx-grid-main-aside,
.nx-dashboard-grid {
    min-width: 0;
    display: grid;
    gap: 20px;
}

.nx-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nx-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nx-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.nx-section-header-compact {
    margin-top: 12px;
    margin-bottom: 8px;
}

.nx-section-header-compact h3 {
    margin: 0;
    font-size: 0.95rem;
}

.nx-confusion-grid {
    margin-bottom: 12px;
}

.nx-grid-main-aside {
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
}

.nx-dashboard-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.nx-card,
.nx-table-card,
.nx-panel {
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: var(--nx-radius-card);
    background: #fff;
    box-shadow: var(--nx-shadow-small);
}

.nx-card,
.nx-panel {
    padding: 22px;
}

/* Table cards have no body padding — give the header room so titles
   never sit on / through the top border. */
.nx-table-card > .nx-card-header {
    padding: 18px 20px 14px;
    margin-bottom: 0;
    border-bottom: 1px solid #eef2f6;
}

.nx-table-card > .nx-empty {
    padding: 20px;
}

.nx-card-header,
.nx-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.nx-card-header > *,
.nx-section-header > * {
    min-width: 0;
}

.nx-card-title,
.nx-section-title {
    font-size: 1.08rem;
}

.nx-table-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: inherit;
    -webkit-overflow-scrolling: touch;
    /* Keep a visible scrollbar so a horizontally-clipped table (e.g. the
       Amount column on narrow screens) is discoverable, not hidden. */
    scrollbar-width: thin;
}

.nx-table-wrap::-webkit-scrollbar {
    height: 8px;
}

.nx-table-wrap::-webkit-scrollbar-thumb {
    background: var(--nx-line);
    border-radius: 8px;
}

/* Money never wraps mid-number and never clips — the column keeps its
   width and the container scrolls instead. */
.nx-table td .nx-money-amount,
.nx-money-amount {
    white-space: nowrap;
}

.nx-table {
    width: 100%;
    border-collapse: collapse;
    color: #344256;
}

.nx-table th {
    padding: 14px 16px;
    border-bottom: 1px solid var(--nx-line);
    background: #f8fafc;
    color: var(--nx-muted);
    font-size: 0.7rem;
    font-weight: 800;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.nx-table td {
    min-width: 0;
    min-height: 58px;
    padding: 14px 16px;
    border-bottom: 1px solid #edf1f5;
    vertical-align: top;
}

.nx-table td > .nx-status,
.nx-table td > .nx-badge,
.nx-table td > .nx-money-amount,
.nx-table td > strong.nx-money-amount {
    max-width: 100%;
}

.nx-table .nx-status,
.nx-table .nx-badge {
    white-space: normal;
    text-align: left;
    height: auto;
}

.nx-table tbody tr:last-child td {
    border-bottom: 0;
}

.nx-table tbody tr:hover {
    background: #fbfcfd;
}

.nx-table-link {
    border: 0;
    background: transparent;
    color: var(--nx-blue);
    font-weight: 750;
    text-align: left;
}

.nx-table-link:hover {
    text-decoration: underline;
}

.nx-cell-title {
    display: block;
    color: var(--nx-ink);
    font-weight: 720;
}

.nx-cell-subtitle {
    display: block;
    margin-top: 2px;
    color: var(--nx-muted);
    font-size: 0.78rem;
}

.nx-number-positive {
    color: var(--nx-green);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.nx-number-negative {
    color: var(--nx-red);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.nx-number-active {
    color: var(--nx-blue);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* Metric counts in people / product tables — slightly larger for glanceability */
.nx-table .nx-number-positive,
.nx-table .nx-number-negative,
.nx-table .nx-number-active {
    font-size: 1.08rem;
    line-height: 1.2;
}

.nx-badge,
.nx-status,
.nx-chip,
.nx-rank {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 750;
    line-height: 1.25;
    white-space: nowrap;
}

.nx-badge,
.nx-status,
.nx-chip {
    padding: 5px 9px;
    background: var(--tone-soft, #eef2f6);
    color: var(--tone, #516075);
}

.nx-rank {
    min-width: 34px;
    min-height: 34px;
    justify-content: center;
    border-radius: 8px;
    background: #edf2f7;
    color: #4b5d73;
}

.nx-rank-1 {
    background: #ffd43b;
    color: #624a00;
}

.nx-rank-2 {
    background: #dce4ed;
    color: #42556c;
}

.nx-rank-3 {
    background: #ff9e4a;
    color: #5f2c00;
}

.nx-filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 0.35fr)) auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 16px;
    padding: 15px;
    border: 1px solid var(--nx-line);
    border-radius: 12px;
    background: #fff;
}

.nx-field {
    display: grid;
    gap: 6px;
}

.nx-field label,
.nx-fieldset legend {
    color: #334155;
    font-size: 0.78rem;
    font-weight: 750;
}

.nx-field input,
.nx-field select,
.nx-field textarea,
.nx-control {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: var(--nx-radius-control);
    background: #fff;
    color: var(--nx-ink);
}

.nx-field textarea {
    min-height: 110px;
    resize: vertical;
}

.nx-field input::placeholder,
.nx-field textarea::placeholder {
    color: #7b899b;
}

.nx-field input:focus,
.nx-field select:focus,
.nx-field textarea:focus,
.nx-control:focus {
    border-color: var(--nx-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
    outline: 0;
}

.nx-field-help {
    color: var(--nx-muted);
    font-size: 0.74rem;
}

.nx-amount-preview {
    display: block;
    margin-top: 4px;
    color: var(--nx-ink);
    font-weight: 600;
}

.nx-req {
    color: var(--nx-red);
    font-weight: 700;
    margin-left: 2px;
}

.nx-collapse {
    margin-top: 18px;
    border: 1px solid var(--nx-line);
    border-radius: 12px;
    padding: 6px 14px;
    background: #fff;
}

.nx-collapse > summary {
    cursor: pointer;
    padding: 8px 0;
    font-weight: 700;
    color: var(--nx-muted);
}

/* Day Close side-by-side handover columns share a row height. */
.nx-grid-2 > .nx-card,
.nx-grid-2 > article {
    height: 100%;
}

.nx-field-error {
    color: var(--nx-red);
    font-size: 0.75rem;
    font-weight: 650;
}

.nx-fieldset {
    margin: 0;
    padding: 14px;
    border: 1px solid var(--nx-line);
    border-radius: 10px;
}

.nx-checkbox {
    min-height: 38px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #334155;
}

.nx-checkbox input {
    width: 19px;
    height: 19px;
    margin-top: 2px;
    accent-color: var(--nx-orange);
}

.nx-auth-remember {
    margin-top: -2px;
}

.nx-auth-remember span {
    display: grid;
    gap: 2px;
}

.nx-auth-remember strong {
    font-size: 0.84rem;
}

.nx-auth-remember small {
    color: var(--nx-muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.nx-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.nx-form-grid .nx-span-2 {
    grid-column: 1 / -1;
}

.nx-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-top: 1px solid var(--nx-line);
}

.nx-empty,
.nx-error-state,
.nx-loading {
    min-height: 260px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 10px;
    padding: 36px;
    text-align: center;
    color: var(--nx-muted);
}

.nx-empty-icon,
.nx-error-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--nx-blue-soft);
    color: var(--nx-blue);
}

.nx-empty h3,
.nx-error-state h2 {
    margin: 4px 0 0;
    color: var(--nx-ink);
}

.nx-empty p,
.nx-error-state p {
    max-width: 48ch;
    margin: 0;
}

.nx-skeleton {
    width: min(100%, 1100px);
    display: grid;
    gap: 14px;
}

.nx-skeleton-line,
.nx-skeleton-card {
    overflow: hidden;
    border-radius: 8px;
    background: #e7edf3;
}

.nx-skeleton-line {
    height: 18px;
}

.nx-skeleton-line:nth-child(2) {
    width: 60%;
}

.nx-skeleton-card {
    height: 160px;
}

.nx-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 14px;
    border: 1px solid;
    border-radius: 10px;
}

.nx-alert > span:first-child {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    font-weight: 850;
}

.nx-alert p {
    margin: 0;
}

.nx-alert-info {
    border-color: #b9d2ff;
    background: var(--nx-blue-soft);
    color: #24466f;
}

.nx-alert-danger {
    border-color: #f5bcc3;
    background: var(--nx-red-soft);
    color: #7d2630;
}

.nx-alert-warning {
    border-color: #f4d38c;
    background: var(--nx-amber-soft);
    color: #75430a;
}

.nx-alert-success {
    border-color: #a9dfcd;
    background: var(--nx-green-soft);
    color: #155e49;
}

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

.nx-quick-action {
    min-height: 112px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--nx-line);
    border-radius: 12px;
    background: #fff;
    color: var(--nx-ink);
    font-weight: 750;
    text-align: left;
}

.nx-quick-action:hover {
    border-color: var(--tone, var(--nx-blue));
    box-shadow: var(--nx-shadow-small);
}

.nx-quick-action .nx-kpi-icon {
    width: 38px;
    height: 38px;
    margin: 0;
}

.nx-chart-placeholder {
    min-height: 250px;
}

.nx-donut-layout {
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 38px;
}

.nx-donut {
    --segments: conic-gradient(var(--nx-blue) 0 42%, var(--nx-green) 42% 66%, var(--nx-amber) 66% 84%, var(--nx-violet) 84% 100%);
    position: relative;
    width: 170px;
    height: 170px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--segments);
}

.nx-donut::after {
    content: "";
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    background: #fff;
}

.nx-donut-center {
    position: relative;
    z-index: 1;
    text-align: center;
}

.nx-donut-center strong,
.nx-donut-center span {
    display: block;
}

.nx-donut-center strong {
    color: var(--nx-ink);
    font-size: 1.65rem;
}

.nx-donut-center span {
    color: var(--nx-muted);
    font-size: 0.75rem;
}

.nx-legend {
    display: grid;
    gap: 9px;
}

.nx-legend-row {
    display: grid;
    grid-template-columns: 12px minmax(100px, 1fr) auto;
    gap: 9px;
    align-items: center;
    font-size: 0.84rem;
}

.nx-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--tone);
}

.nx-bar-list {
    display: grid;
    gap: 14px;
}

.nx-bar-row {
    display: grid;
    grid-template-columns: minmax(110px, 0.35fr) minmax(160px, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.nx-bar-track,
.nx-risk-track {
    overflow: hidden;
    border-radius: 999px;
    background: #edf2f7;
}

.nx-bar-track {
    height: 16px;
}

.nx-bar-fill {
    min-width: 2px;
    height: 100%;
    border-radius: inherit;
    background: var(--tone, var(--nx-blue));
}

.nx-w-0 { width: 0%; }
.nx-w-5 { width: 5%; }
.nx-w-10 { width: 10%; }
.nx-w-15 { width: 15%; }
.nx-w-20 { width: 20%; }
.nx-w-25 { width: 25%; }
.nx-w-30 { width: 30%; }
.nx-w-35 { width: 35%; }
.nx-w-40 { width: 40%; }
.nx-w-45 { width: 45%; }
.nx-w-50 { width: 50%; }
.nx-w-55 { width: 55%; }
.nx-w-60 { width: 60%; }
.nx-w-65 { width: 65%; }
.nx-w-70 { width: 70%; }
.nx-w-75 { width: 75%; }
.nx-w-80 { width: 80%; }
.nx-w-85 { width: 85%; }
.nx-w-90 { width: 90%; }
.nx-w-95 { width: 95%; }
.nx-w-100 { width: 100%; }

.nx-manager-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.nx-summary-tile {
    padding: 16px;
    border-left: 4px solid var(--tone, var(--nx-blue));
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--nx-shadow-small);
}

.nx-summary-tile span,
.nx-summary-tile strong {
    display: block;
}

.nx-summary-tile span {
    color: var(--nx-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.nx-summary-tile strong {
    margin-top: 3px;
    color: var(--tone, var(--nx-blue));
    font-size: 1.55rem;
}

.nx-roster-list,
.nx-card-list,
.nx-email-list,
.nx-timeline-list,
.nx-note-list,
.nx-task-list,
.nx-connection-list {
    display: grid;
    gap: 12px;
}

.nx-roster-row,
.nx-queue-card,
.nx-email-card,
.nx-task-row,
.nx-connection-row,
.nx-note {
    border: 1px solid var(--nx-line);
    border-radius: 12px;
    background: #fff;
}

.nx-roster-row,
.nx-task-row,
.nx-connection-row,
.nx-note {
    padding: 14px;
}

.nx-roster-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(150px, 1.4fr) auto;
    gap: 14px;
    align-items: center;
}

/* Name/status cells hold inline strong+span pairs — stack them so the
   text does not run together ("Naledi MokoenaAvailable…"). */
.nx-roster-row > div:first-child,
.nx-connection-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.nx-roster-row > div:first-child span,
.nx-connection-copy span,
.nx-connection-copy small {
    color: var(--nx-muted);
    font-size: 0.8rem;
}

.nx-day-close-line {
    display: grid;
    grid-template-columns: auto minmax(9.5rem, auto) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    cursor: pointer;
}

.nx-day-close-line .nx-status,
.nx-day-close-line .nx-badge {
    white-space: normal;
    text-align: left;
    max-width: 12rem;
}

.nx-day-close-line > input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--nx-blue);
}

.nx-day-close-line p {
    margin: 4px 0;
    color: var(--nx-muted);
}

.nx-capacity-meter {
    display: grid;
    gap: 5px;
}

.nx-capacity-meter small {
    color: var(--nx-muted);
}

.nx-queue-card {
    display: grid;
    grid-template-columns: minmax(160px, 1.2fr) repeat(3, minmax(90px, 0.6fr)) minmax(160px, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 14px 16px;
    border-left: 4px solid var(--tone, var(--nx-blue));
    min-width: 0;
}

.nx-queue-card > * {
    min-width: 0;
}

.nx-queue-card .nx-claim-serial,
.nx-queue-card .nx-table-link {
    min-height: 0;
    display: inline;
    font-size: 0.95rem;
}

.nx-claim-header {
    position: sticky;
    z-index: 20;
    top: calc(var(--nx-topbar) + 12px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
    padding: 18px 20px;
    border: 1px solid var(--nx-line);
    border-radius: 14px;
    /* Fully opaque — a translucent header let the section below ghost
       through while scrolling. */
    background: #fff;
    box-shadow: var(--nx-shadow-small);
}

/* Solid mask over the gap between the topbar and the sticky header so
   content scrolling up does not peek through above it. */
.nx-claim-header::before {
    content: "";
    position: absolute;
    left: -1px;
    right: -1px;
    bottom: 100%;
    height: 14px;
    background: var(--nx-bg, #f4f6f9);
}

.nx-claim-header .nx-info-block {
    min-width: 0;
    max-width: 220px;
    min-height: 0;
    display: grid;
    align-content: center;
    overflow: hidden;
    gap: 4px;
    padding: 12px 16px;
}

.nx-claim-header .nx-info-block span,
.nx-claim-header .nx-info-block strong {
    display: block;
}

.nx-claim-header .nx-info-block span {
    color: var(--nx-muted);
    font-size: 0.75rem;
}

.nx-claim-header .nx-info-block strong {
    color: var(--nx-ink);
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.nx-claimant-bar {
    position: sticky;
    z-index: 20;
    top: calc(var(--nx-topbar) + 10px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 10px 12px;
    align-items: center;
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid var(--nx-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--nx-shadow-small);
}

.nx-claimant-bar::before {
    content: "";
    position: absolute;
    left: -1px;
    right: -1px;
    bottom: 100%;
    height: 12px;
    background: var(--nx-bg, #f4f6f9);
}

.nx-claimant-bar-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
}

.nx-claimant-bar-copy {
    min-width: 0;
    overflow: hidden;
}

.nx-claimant-avatar {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    font-size: 0.82rem;
    font-weight: 800;
    background: #1e3a5f;
    color: #fff;
}

.nx-claimant-bar-identity h1 {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.2;
    color: var(--nx-ink);
}

.nx-claimant-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin: 4px 0 0;
    color: var(--nx-muted);
    font-size: 0.8rem;
    line-height: 1.3;
}

.nx-claimant-link {
    color: var(--nx-blue);
    font-weight: 600;
    text-decoration: none;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nx-claimant-link:hover {
    text-decoration: underline;
}

.nx-claimant-ref {
    color: var(--nx-muted);
    font-weight: 600;
}

.nx-claimant-bar-stats {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0;
    border: 1px solid var(--nx-line);
    border-radius: 10px;
    background: #f8fafc;
    overflow: hidden;
}

.nx-claimant-bar-stats > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-width: 58px;
    padding: 6px 12px;
}

.nx-claimant-bar-stats > div + div {
    border-left: 1px solid var(--nx-line);
}

.nx-claimant-bar-stats strong {
    color: var(--nx-ink);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.1;
}

.nx-claimant-bar-stats span {
    color: var(--nx-muted);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.nx-claimant-details {
    margin-bottom: 10px;
    padding: 10px 12px;
}

.nx-claimant-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nx-claimant-facts > li {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
}

.nx-claimant-facts > li > span:first-child {
    color: var(--nx-muted);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

.nx-claimant-facts > li > strong {
    color: var(--nx-ink);
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.nx-claimant-facts .nx-status,
.nx-claimant-facts .nx-badge {
    max-width: 100%;
}

.nx-claimant-fact-note {
    display: block;
    margin: 0;
    color: var(--nx-muted);
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.3;
}

.nx-alert-compact {
    margin-bottom: 10px;
    padding: 8px 12px;
    font-size: 0.84rem;
}

.nx-card-header-compact {
    margin-bottom: 8px;
    padding-bottom: 0;
}

.nx-card-header-compact p {
    margin: 2px 0 0;
    font-size: 0.8rem;
}

.nx-claimant-history .nx-card-title {
    margin: 0;
    font-size: 1rem;
}

.nx-cell-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.nx-table-dense th,
.nx-table-dense td {
    min-height: 0;
    padding: 10px 12px;
    vertical-align: top;
}

.nx-table-dense .nx-table-link,
.nx-table-dense .nx-icon-button {
    min-height: 0;
    min-width: 0;
}

.nx-table-dense .nx-table-link {
    display: inline;
    padding: 0;
    font-size: 0.92rem;
    font-weight: 750;
    line-height: 1.3;
}

.nx-table-dense .nx-claim-serial,
.nx-table-dense .nx-table-link.nx-claim-serial {
    font-size: 0.92rem;
    font-weight: 750;
}

.nx-table-dense .nx-money-amount {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0;
}

.nx-table-dense .nx-cell-subtitle {
    margin-top: 0;
    line-height: 1.3;
}

.nx-table-dense .nx-badge,
.nx-table-dense .nx-status {
    padding: 3px 8px;
    font-size: 0.72rem;
}

.nx-claimant-history .nx-table-dense th {
    padding-top: 8px;
    padding-bottom: 8px;
}

@media (max-width: 900px) {
    .nx-claimant-bar {
        grid-template-columns: auto 1fr;
    }

    .nx-claimant-bar-stats,
    .nx-claimant-bar > .nx-button-primary {
        grid-column: 1 / -1;
    }

    .nx-claimant-bar-stats {
        width: max-content;
    }

    .nx-claimant-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .nx-claimant-facts {
        grid-template-columns: 1fr;
    }

    .nx-claimant-link {
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

.nx-claim-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.nx-claim-title h1,
h1.nx-claim-title,
h1.nx-claim-title.nx-claim-serial {
    margin: 0;
    color: var(--nx-ink);
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    font-weight: 800;
    line-height: 1.2;
}

.nx-claim-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    row-gap: 6px;
    flex-wrap: wrap;
    margin-top: 7px;
}

.nx-claim-meta .nx-status,
.nx-claim-meta .nx-badge {
    max-width: 100%;
}

.nx-workflow-strip {
    display: flex;
    gap: 0;
    overflow-x: auto;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--nx-line);
    border-radius: 14px;
    background: #fff;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
}

.nx-workflow-step {
    position: relative;
    min-width: 125px;
    flex: 1 0 125px;
    padding: 34px 8px 0;
    color: var(--nx-muted);
    font-size: 0.72rem;
    text-align: center;
    scroll-snap-align: center;
}

.nx-workflow-step::before {
    content: "";
    position: absolute;
    z-index: 2;
    top: 4px;
    left: 50%;
    width: 24px;
    height: 24px;
    border: 5px solid #fff;
    border-radius: 50%;
    background: #cbd5e1;
    box-shadow: 0 0 0 2px #cbd5e1;
    transform: translateX(-50%);
}

.nx-workflow-step::after {
    content: "";
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #dbe2e9;
}

.nx-workflow-step:first-child::after {
    left: 50%;
    width: 50%;
}

.nx-workflow-step:last-child::after {
    width: 50%;
}

.nx-workflow-step.is-done::before,
.nx-workflow-step.is-done::after {
    background: var(--nx-green);
}

.nx-workflow-step.is-current::before {
    background: var(--nx-orange);
    box-shadow: 0 0 0 2px var(--nx-orange), 0 0 0 7px rgba(236, 95, 28, 0.13);
}

.nx-workflow-step strong,
.nx-workflow-step small {
    display: block;
}

.nx-workflow-step strong {
    color: var(--nx-ink);
    font-size: 0.76rem;
}

.nx-workflow-step small {
    margin-top: 3px;
}

.nx-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 18px;
    padding: 5px;
    border: 1px solid var(--nx-line);
    border-radius: 10px;
    background: #fff;
}

.nx-tab {
    min-height: 40px;
    padding: 8px 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #5c6b7e;
    font-weight: 700;
    white-space: nowrap;
}

.nx-tab.is-active {
    background: var(--nx-orange-soft);
    color: var(--nx-orange-dark);
}

.nx-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.nx-info-block {
    min-height: 135px;
    padding: 17px;
    border: 1px solid var(--nx-line);
    border-radius: 12px;
    background: #fff;
}

.nx-info-block h3 {
    margin: 0 0 12px;
    color: var(--nx-ink);
    font-size: 0.93rem;
}

.nx-detail-list {
    display: grid;
    gap: 8px;
    margin: 0;
}

.nx-detail-row {
    display: grid;
    grid-template-columns: minmax(90px, 0.45fr) minmax(0, 1fr);
    gap: 12px;
}

.nx-detail-row dt {
    color: var(--nx-muted);
    font-size: 0.76rem;
}

.nx-detail-row dd {
    margin: 0;
    color: var(--nx-ink);
    overflow-wrap: anywhere;
}

/* Sign-off rows put a hint <small> inside the label span — keep it on
   its own muted line instead of running into the label text. */
.nx-detail-row > span small {
    display: block;
    margin-top: 2px;
    color: var(--nx-muted);
    font-size: 0.76rem;
}

.nx-dropzone {
    min-height: 150px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 24px;
    border: 2px dashed #b8c4d2;
    border-radius: 12px;
    background: #f9fbfd;
    color: var(--nx-muted);
    text-align: center;
}

.nx-dropzone.is-dragging {
    border-color: var(--nx-blue);
    background: var(--nx-blue-soft);
}

.nx-document-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.nx-document-item {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--nx-line);
    border-radius: 11px;
    background: #fff;
}

.nx-document-item h4 {
    margin: 8px 0;
    overflow: hidden;
    color: var(--nx-ink);
    font-size: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nx-fraud-review-panel {
    margin: 0 0 18px;
    padding: 20px 22px;
    border: 1px solid #f0d7a4;
    border-left: 6px solid var(--nx-amber);
    border-radius: var(--nx-radius-card);
    background: linear-gradient(180deg, #fffaf0 0%, #ffffff 58%);
    box-shadow: var(--nx-shadow-small);
}

.nx-fraud-review-panel.nx-tone-red {
    border-color: #f0c4ca;
    border-left-color: var(--nx-red);
    background: linear-gradient(180deg, #fff5f6 0%, #ffffff 58%);
}

.nx-fraud-review-head {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 24px;
    align-items: flex-start;
    justify-content: space-between;
}

.nx-fraud-review-title {
    margin: 4px 0 10px;
    color: var(--nx-ink);
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    font-weight: 850;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.nx-fraud-review-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.nx-fraud-review-chips .nx-status,
.nx-fraud-review-chips .nx-badge {
    font-size: 0.86rem;
    font-weight: 750;
    padding: 6px 10px;
}

.nx-fraud-review-score {
    min-width: 118px;
    padding: 12px 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #f0d7a4;
    text-align: center;
}

.nx-fraud-review-panel.nx-tone-red .nx-fraud-review-score {
    border-color: #f0c4ca;
}

.nx-fraud-review-score strong {
    display: block;
    color: var(--nx-amber);
    font-size: clamp(2rem, 3.2vw, 2.55rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
}

.nx-fraud-review-panel.nx-tone-red .nx-fraud-review-score strong {
    color: var(--nx-red);
}

.nx-fraud-review-score span {
    display: block;
    margin-top: 6px;
    color: var(--nx-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nx-fraud-review-body {
    margin-top: 16px;
}

.nx-fraud-review-track {
    height: 10px;
    margin: 0 0 16px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2f7;
}

.nx-fraud-review-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--nx-amber);
}

.nx-fraud-review-panel.nx-tone-red .nx-fraud-review-fill {
    background: var(--nx-red);
}

.nx-fraud-review-why-block {
    margin: 0 0 14px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff8e8;
    border: 1px solid #f0d7a4;
}

.nx-fraud-review-panel.nx-tone-red .nx-fraud-review-why-block {
    background: #fff1f2;
    border-color: #f0c4ca;
}

.nx-fraud-review-why-label {
    display: block;
    margin-bottom: 8px;
    color: var(--nx-muted);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nx-fraud-review-why {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--nx-ink);
}

.nx-fraud-review-why li {
    margin: 0 0 6px;
    line-height: 1.4;
}

.nx-fraud-review-why li:last-child {
    margin-bottom: 0;
}

.nx-fraud-review-why-empty,
.nx-fraud-review-advisory,
.nx-fraud-rail-copy {
    margin: 0;
    color: var(--nx-text);
    line-height: 1.45;
}

.nx-fraud-review-advisory {
    margin-top: 10px;
    color: var(--nx-muted);
    font-size: 0.92rem;
    font-weight: 650;
}

.nx-fraud-review-actions {
    margin-top: 4px;
}

.nx-fraud-intel-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 18px;
    align-items: start;
}

.nx-fraud-intel-main {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.nx-fraud-intel-rail .nx-fraud-rail-copy {
    margin: 0 0 14px;
}

.nx-fraud-findings-card,
.nx-doc-intel-card {
    margin: 0;
}

.nx-risk-card {
    border-top: 4px solid var(--tone, var(--nx-amber));
}

.nx-risk-score {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
}

.nx-risk-number {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--tone-soft, var(--nx-amber-soft));
    color: var(--tone, var(--nx-amber));
    font-size: 1.7rem;
    font-weight: 850;
}

.nx-risk-track {
    height: 14px;
}

.nx-risk-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--tone, var(--nx-amber));
}

.nx-finding {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 13px 0;
    border-bottom: 1px solid #edf1f5;
}

.nx-finding:last-child {
    border-bottom: 0;
}

.nx-copilot-strip {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin: 0 0 18px;
    padding: 16px 18px;
    border: 1px solid #cfe0f8;
    border-left: 4px solid var(--nx-blue);
    border-radius: var(--nx-radius-control);
    background: #f8fbff;
    box-shadow: var(--nx-shadow-small);
}

.nx-copilot-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: var(--nx-radius-control);
    background: var(--nx-blue);
    color: #fff;
}

.nx-copilot-mark svg,
.nx-next-step-card .nx-card-header > svg {
    width: 22px;
    height: 22px;
}

.nx-copilot-copy > strong,
.nx-copilot-copy > p,
.nx-copilot-limit {
    display: block;
}

.nx-copilot-copy > strong {
    color: var(--nx-ink);
    font-size: 1rem;
}

.nx-copilot-copy > p {
    margin: 3px 0 8px;
    color: var(--nx-text);
}

.nx-copilot-evidence {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 7px;
}

.nx-copilot-evidence > span {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid color-mix(in srgb, var(--tone) 22%, white);
    border-radius: var(--nx-radius-control);
    background: var(--tone-soft);
    color: var(--tone);
}

.nx-copilot-evidence small,
.nx-copilot-evidence strong {
    font-size: 0.74rem;
}

.nx-copilot-limit {
    color: var(--nx-muted);
    font-size: 0.72rem;
}

.nx-copilot-actions {
    display: flex;
    gap: 7px;
    align-items: center;
}

.nx-next-step-card {
    border-top: 3px solid var(--nx-blue);
}

.nx-next-step-card .nx-card-header > svg {
    color: var(--nx-blue);
}

.nx-next-step-card > small {
    display: block;
    margin-top: 10px;
    color: var(--nx-muted);
}

.nx-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 12px;
    padding-bottom: 18px;
}

.nx-timeline-item::before {
    content: "";
    position: absolute;
    top: 27px;
    bottom: 0;
    left: 13px;
    width: 2px;
    background: #dce4eb;
}

.nx-timeline-item:last-child::before {
    display: none;
}

.nx-timeline-dot {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    z-index: 1;
    border-radius: 50%;
    background: var(--tone-soft, var(--nx-blue-soft));
    color: var(--tone, var(--nx-blue));
}

.nx-timeline-content strong,
.nx-timeline-content span {
    display: block;
}

.nx-timeline-content strong {
    color: var(--nx-ink);
}

.nx-timeline-content span,
.nx-timeline-time {
    color: var(--nx-muted);
    font-size: 0.77rem;
}

.nx-story-list .nx-timeline-content p {
    margin: 3px 0;
    color: var(--nx-text);
}

.nx-story-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.nx-story-head strong,
.nx-story-head {
    color: var(--nx-ink);
    font-size: 0.95rem;
}

.nx-timeline-item.is-ai-action {
    background: linear-gradient(90deg, rgba(109, 40, 217, 0.05), transparent 48%);
}

.nx-story-list .nx-timeline-content small {
    display: block;
    margin-top: 7px;
    padding: 8px 10px;
    border-left: 3px solid var(--nx-line);
    background: var(--nx-canvas);
    color: var(--nx-text);
    white-space: pre-wrap;
}

.nx-note strong,
.nx-note time {
    display: block;
}

.nx-note strong {
    color: var(--nx-ink);
}

.nx-note time {
    color: var(--nx-muted);
    font-size: 0.74rem;
}

.nx-note p {
    margin: 8px 0 0;
    white-space: pre-wrap;
}

.nx-email-card {
    overflow: hidden;
}

.nx-email-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--nx-line);
}

.nx-email-head h3 {
    margin: 0;
    color: var(--nx-ink);
    font-size: 1rem;
}

.nx-email-head p {
    margin: 4px 0 0;
    color: var(--nx-muted);
    font-size: 0.8rem;
}

.nx-email-pipeline,
.nx-intake-pipeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
    gap: 0;
    margin: 14px 0 16px;
    padding: 12px 14px 10px;
    border: 1px solid var(--nx-line);
    border-radius: 10px;
    background: #f7f9fc;
}

.nx-email-stage,
.nx-intake-stage {
    position: relative;
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 0 4px;
    color: var(--nx-muted);
    text-align: center;
}

.nx-email-stage::after,
.nx-intake-stage::after {
    content: "";
    position: absolute;
    top: 11px;
    left: calc(50% + 12px);
    width: calc(100% - 24px);
    height: 2px;
    background: #d5deea;
}

.nx-email-stage:last-child::after,
.nx-intake-stage:last-child::after {
    display: none;
}

.nx-email-stage.is-done::after,
.nx-intake-stage.is-done::after {
    background: var(--nx-green);
}

.nx-intake-stage-dot {
    position: relative;
    z-index: 1;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border: 2px solid #d5deea;
    border-radius: 50%;
    background: #fff;
    color: transparent;
}

.nx-intake-stage-dot svg {
    width: 12px;
    height: 12px;
}

.nx-intake-stage.is-done .nx-intake-stage-dot,
.nx-email-stage.is-done .nx-intake-stage-dot {
    border-color: var(--nx-green);
    background: var(--nx-green);
    color: #fff;
}

.nx-intake-stage.is-current .nx-intake-stage-dot,
.nx-email-stage.is-current .nx-intake-stage-dot {
    border-color: var(--nx-orange);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(234, 120, 36, 0.18);
}

.nx-intake-stage strong,
.nx-email-stage strong {
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
}

.nx-intake-stage.is-done strong,
.nx-email-stage.is-done strong {
    color: #1f6b45;
}

.nx-intake-stage.is-current strong,
.nx-email-stage.is-current strong {
    color: var(--nx-orange-dark, #c45a12);
}

.nx-email-body {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 16px 18px;
}

.nx-email-block {
    min-width: 0;
}

.nx-email-block > span {
    display: block;
    margin-bottom: 6px;
    color: var(--nx-muted);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.nx-email-block strong,
.nx-email-block small {
    display: block;
    overflow-wrap: anywhere;
}

.nx-email-block strong {
    color: var(--nx-ink);
}

.nx-email-block small {
    color: var(--nx-muted);
}

.nx-connection-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.nx-connection-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--tone-soft, var(--nx-blue-soft));
    color: var(--tone, var(--nx-blue));
}

.nx-connection-copy h3,
.nx-connection-copy p {
    margin: 0;
}

.nx-connection-copy h3 {
    color: var(--nx-ink);
    font-size: 0.95rem;
}

.nx-connection-copy p {
    margin-top: 3px;
    color: var(--nx-muted);
    font-size: 0.78rem;
}

.nx-flow-hero {
    padding: 26px;
    border-left: 5px solid var(--nx-orange);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--nx-shadow-small);
}

.nx-flow-hero h2 {
    max-width: 28ch;
    margin: 0;
    color: var(--nx-ink);
    font-size: 1.65rem;
}

.nx-flow-hero p {
    max-width: 70ch;
    margin: 8px 0 0;
    color: var(--nx-muted);
}

.nx-flow-section {
    margin-top: 28px;
}

.nx-rule-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.nx-rule-card {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--nx-line);
    border-top: 4px solid var(--nx-blue);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--nx-shadow-small);
}

.nx-rule-card > header,
.nx-rule-card > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.nx-fraud-rule-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.nx-fraud-rule-card {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--nx-line);
    border-top: 4px solid var(--nx-orange);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--nx-shadow-small);
}

.nx-fraud-rule-card > header,
.nx-fraud-rule-card > footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.nx-fraud-rule-card h3,
.nx-fraud-rule-card p {
    margin: 0;
}

.nx-fraud-rule-card header p,
.nx-fraud-rule-card > p,
.nx-fraud-rule-card footer > span {
    color: var(--nx-muted);
    font-size: 0.8rem;
}

.nx-fraud-rule-card > footer {
    padding-top: 12px;
    border-top: 1px solid var(--nx-line);
}

.nx-fraud-rule-pattern {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #fff7ed;
}

.nx-fraud-rule-pattern > div:nth-child(2) {
    display: grid;
    gap: 2px;
}

.nx-fraud-rule-pattern span {
    color: var(--nx-muted);
    font-size: 0.76rem;
}

.nx-fraud-rule-pattern > strong {
    color: #c2410c;
    font-size: 1.15rem;
}

.nx-rule-parameter[hidden] {
    display: none;
}

.nx-simulation-score {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.nx-simulation-score > div {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    background: #f8fafc;
}

.nx-simulation-score span {
    color: var(--nx-muted);
    font-size: 0.76rem;
}

.nx-simulation-score strong {
    color: var(--nx-ink);
    font-size: 1.45rem;
}

.nx-rule-card h3 {
    margin: 2px 0 0;
    color: var(--nx-ink);
    font-size: 1.05rem;
}

.nx-rule-card > footer {
    padding-top: 14px;
    border-top: 1px solid var(--nx-line);
    color: var(--nx-muted);
    font-size: 0.78rem;
}

.nx-rule-toggle {
    padding: 12px;
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    background: #f8fafc;
}

.nx-rule-toggle label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.nx-rule-toggle input {
    width: 19px;
    height: 19px;
    margin-top: 2px;
    accent-color: var(--nx-blue);
}

.nx-rule-toggle span,
.nx-rule-toggle small {
    display: block;
}

.nx-rule-toggle small {
    margin-top: 2px;
    color: var(--nx-muted);
}

.nx-input-prefix,
.nx-input-suffix {
    display: flex;
    align-items: center;
    min-width: 0;
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.nx-input-prefix:focus-within,
.nx-input-suffix:focus-within {
    border-color: var(--nx-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.nx-input-prefix > span,
.nx-input-suffix > span {
    flex: 0 0 auto;
    padding: 0 10px;
    color: var(--nx-muted);
    font-size: 0.75rem;
    font-weight: 750;
}

.nx-input-prefix input,
.nx-input-suffix input {
    min-width: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
}

.nx-rule-details {
    border-top: 1px solid var(--nx-line);
    padding-top: 12px;
}

.nx-rule-details summary {
    cursor: pointer;
    color: var(--nx-blue-dark);
    font-size: 0.82rem;
    font-weight: 750;
}

.nx-rule-details[open] summary {
    margin-bottom: 14px;
}

.nx-flow-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.nx-flow-step {
    position: relative;
    min-height: 180px;
    padding: 18px;
    border-top: 4px solid var(--tone, var(--nx-blue));
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--nx-shadow-small);
}

.nx-flow-step .nx-kpi-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
}

.nx-flow-step h3 {
    margin: 0;
    color: var(--nx-ink);
    font-size: 0.96rem;
}

.nx-flow-step p {
    margin: 6px 0 0;
    color: var(--nx-muted);
    font-size: 0.82rem;
}

.nx-safety-grid {
    display: grid;
    /* auto-fit + a real minimum keeps each card wide enough for its text
       at any viewport — cards reflow to fewer columns instead of clipping
       ("Use ar...", "Add eviden..."). */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 12px;
}

.nx-safety-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--nx-line);
}

/* Stack the title/hint pair — inline strong+span otherwise run together. */
.nx-safety-item > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.nx-safety-item span {
    color: var(--nx-muted);
    font-size: 0.78rem;
}

.nx-modal-layer {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 160ms ease, visibility 160ms ease;
}

.nx-modal-layer.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nx-modal {
    width: min(100%, 620px);
    max-height: min(88vh, 900px);
    overflow-y: auto;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.nx-modal-large {
    width: min(100%, 860px);
}

.nx-modal-header,
.nx-modal-body,
.nx-modal-footer {
    padding: 20px 22px;
}

.nx-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--nx-line);
}

.nx-modal-header h2 {
    margin: 0;
    color: var(--nx-ink);
    font-size: 1.25rem;
}

.nx-modal-header p {
    margin: 4px 0 0;
    color: var(--nx-muted);
}

.nx-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--nx-line);
}

.nx-toast-region {
    position: fixed;
    z-index: 130;
    top: 92px;
    right: 20px;
    width: min(390px, calc(100vw - 40px));
    display: grid;
    gap: 10px;
}

.nx-toast {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: start;
    padding: 13px 14px;
    border: 1px solid #b7dccc;
    border-left: 4px solid var(--nx-green);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--nx-shadow);
}

.nx-toast.is-error {
    border-color: #f2b4bb;
    border-left-color: var(--nx-red);
}

.nx-toast p {
    margin: 0;
    color: var(--nx-ink);
}

.nx-toast button {
    border: 0;
    background: transparent;
    color: var(--nx-muted);
}

.nx-mobile-backdrop {
    display: none;
}

.nx-auth-body {
    min-width: 320px;
    background: #f2f5f8;
}

.nx-auth-shell {
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(340px, 0.95fr) minmax(480px, 1.05fr);
}

.nx-auth-story {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(30px, 5vw, 70px);
    background: #fff;
}

.nx-auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nx-auth-brand img,
.nx-auth-mobile-brand img {
    border-radius: 12px;
    box-shadow: var(--nx-shadow-small);
}

.nx-auth-message h1 {
    max-width: 11ch;
    margin: 0;
    color: var(--nx-ink);
    font-size: clamp(2.45rem, 5vw, 4.7rem);
    line-height: 1.02;
}

.nx-auth-message > p:last-child {
    max-width: 48ch;
    margin: 18px 0 0;
    color: var(--nx-muted);
    font-size: 1.05rem;
}

.nx-auth-journey {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nx-auth-journey li {
    display: grid;
    gap: 10px;
    align-content: start;
}

.nx-journey-index {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--tone-soft);
    color: var(--tone);
    font-weight: 850;
}

.nx-auth-journey strong,
.nx-auth-journey small {
    display: block;
}

.nx-auth-journey strong {
    color: var(--nx-ink);
}

.nx-auth-journey small {
    margin-top: 3px;
    color: var(--nx-muted);
    font-size: 0.74rem;
}

.nx-auth-panel {
    display: grid;
    place-items: center;
    padding: 24px clamp(18px, 2.5vw, 36px);
    background: #edf2f7;
    min-height: 0;
    overflow: hidden;
}

.nx-auth-card {
    width: min(100%, 470px);
    max-height: calc(100vh - 48px);
    padding: clamp(20px, 2.4vw, 32px);
    border: 1px solid #dde4ec;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--nx-shadow);
    overflow: hidden;
}

.nx-auth-card:has(.nx-demo-mode) {
    width: min(100%, 860px);
    overflow: visible;
}

.nx-auth-card-main {
    display: grid;
    gap: 12px;
}

.nx-auth-card:has(.nx-demo-mode) .nx-auth-card-main {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 18px;
    align-items: start;
}

.nx-demo-login-btn {
    margin-top: 8px;
}

.nx-auth-card-primary {
    min-width: 0;
}

.nx-auth-card h2 {
    margin: 0;
    color: var(--nx-ink);
    font-size: 1.8rem;
}

.nx-auth-helper {
    margin: 6px 0 14px;
    color: var(--nx-muted);
}

.nx-auth-card .nx-alert {
    margin-bottom: 12px;
}

.nx-auth-form {
    display: grid;
    gap: 12px;
}

.nx-auth-help {
    display: block;
    margin-top: 12px;
    color: var(--nx-blue);
    font-weight: 700;
    text-align: center;
}

.nx-demo-mode {
    margin-top: 0;
    min-width: 0;
}

.nx-demo-mode-panel {
    margin-top: 0;
    padding: 12px;
    border: 1px solid var(--nx-line);
    border-radius: 10px;
    background: #f7fafc;
}

.nx-demo-mode-title {
    margin: 0 0 4px;
    color: var(--nx-ink);
    font-size: 0.95rem;
    font-weight: 800;
    text-align: center;
}

.nx-demo-mode-hint {
    margin: 0 0 10px;
    color: var(--nx-muted);
    font-size: 0.78rem;
    text-align: center;
}

.nx-demo-role-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.nx-demo-role-list button,
.nx-demo-public-link {
    min-height: 38px;
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    background: #fff;
    color: var(--nx-ink);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    padding: 0 10px;
}

.nx-demo-public-link {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    text-decoration: none;
}

.nx-demo-role-list button:hover,
.nx-demo-public-link:hover,
.nx-demo-role-list button.is-selected {
    border-color: var(--nx-blue);
    color: var(--nx-blue);
}

.nx-demo-role-list button.is-selected {
    background: #eef5ff;
}

#nx-sign-in-form button.nx-demo-ready {
    box-shadow: 0 0 0 3px rgba(18, 104, 220, 0.18);
}

.nx-auth-trust {
    display: flex;
    gap: 9px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--nx-line);
    color: var(--nx-muted);
    font-size: 0.76rem;
}

.nx-auth-trust span {
    color: var(--nx-green);
    font-weight: 850;
}

.nx-auth-trust p {
    margin: 0;
}

.nx-auth-mobile-brand {
    display: none;
}

.nx-access-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.nx-access-card {
    width: min(100%, 480px);
    display: grid;
    justify-items: center;
    gap: 15px;
    padding: 38px;
    border: 1px solid var(--nx-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--nx-shadow);
    text-align: center;
}

.nx-access-card > img {
    border-radius: 14px;
}

.nx-access-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--nx-amber-soft);
    font-size: 1.3rem;
}

.nx-access-card h1,
.nx-access-card p,
.nx-access-card small {
    margin: 0;
}

.nx-access-card h1 {
    color: var(--nx-ink);
}

.nx-access-card p,
.nx-access-card small {
    color: var(--nx-muted);
}

.nx-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.nx-time-cell {
    display: grid;
    min-width: 150px;
    gap: 4px;
}

.nx-time-cell strong {
    color: var(--nx-ink);
    font-size: 0.86rem;
}

.nx-time-cell > span:last-child {
    color: var(--nx-muted);
    font-size: 0.76rem;
}

.nx-work-summary {
    display: grid;
    grid-template-columns: minmax(210px, 1.4fr) repeat(3, minmax(115px, 0.6fr));
    gap: 12px;
    margin-bottom: 18px;
}

.nx-work-summary > div,
.nx-work-summary > button {
    display: grid;
    min-height: 92px;
    align-content: center;
    gap: 4px;
    padding: 15px 17px;
    border: 1px solid var(--nx-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--nx-shadow-small);
}

.nx-work-summary span,
.nx-work-summary small {
    color: var(--nx-muted);
}

.nx-work-summary strong {
    color: var(--nx-ink);
    font-size: 1.35rem;
}

.nx-work-rag {
    grid-template-columns: auto 1fr;
    align-items: center;
}

.nx-work-rag small {
    grid-column: 2;
}

.nx-rag-dot {
    grid-row: 1 / 3;
    width: 13px;
    height: 13px;
    border-radius: 50%;
}

.nx-rag-red { background: var(--nx-red); }
.nx-rag-orange { background: var(--nx-orange); }
.nx-rag-green { background: var(--nx-green); }

.nx-allocation-board {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(320px, 1.3fr);
    min-height: 0;
    border-top: 1px solid var(--nx-line);
}

.nx-allocation-pool,
.nx-handler-lanes {
    padding: 18px;
}

.nx-allocation-pool {
    border-right: 1px solid var(--nx-line);
    background: #f8fafc;
}

.nx-board-heading,
.nx-handler-lane-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.nx-handler-lane-head > div:first-child {
    min-width: 0;
}

.nx-handler-lane-head > .nx-badge,
.nx-handler-lane-head > .nx-status {
    flex-shrink: 0;
}

.nx-board-heading {
    margin-bottom: 12px;
}

.nx-board-heading span,
.nx-handler-lane-head span {
    color: var(--nx-muted);
    font-size: 0.78rem;
}

.nx-allocation-cards,
.nx-handler-lanes {
    display: grid;
    align-content: start;
    gap: 12px;
}

.nx-allocation-card {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 7px 10px;
    border: 1px solid #dbe4ef;
    border-left: 3px solid var(--nx-blue);
    border-radius: 7px;
    background: #fff;
    box-shadow: var(--nx-shadow-small);
    cursor: grab;
    transition: border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.nx-allocation-card:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.26);
    outline-offset: 2px;
}

.nx-allocation-card.is-dragging {
    opacity: 0.46;
}

.nx-allocation-card > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 10px;
    min-width: 0;
}

.nx-allocation-card .nx-claim-serial,
.nx-allocation-card .nx-table-link {
    min-height: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nx-allocation-card > span,
.nx-allocation-card small {
    color: var(--nx-muted);
    font-size: 0.78rem;
}

.nx-suggest-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(18, 104, 220, 0.1);
    color: #0b4ea8;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.nx-drag-handle {
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    color: var(--nx-blue);
}

.nx-drag-handle svg {
    width: 15px;
    height: 15px;
}

.nx-handler-lanes {
    grid-template-columns: 1fr;
}

.nx-handler-lane {
    padding: 10px 12px;
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    background: #fff;
    min-width: 0;
}

.nx-handler-lane.is-preview {
    border-color: #ec5f1c;
}

.nx-handler-lane.is-unavailable,
.nx-handler-lane.is-full {
    background: #fff7f7;
}

.nx-handler-lane-head > div {
    display: grid;
    gap: 2px;
}

.nx-handler-drop {
    display: grid;
    min-height: 52px;
    margin-top: 8px;
    place-items: center;
    gap: 4px;
    padding: 8px;
    border: 2px dashed #c9d5e3;
    border-radius: 8px;
    color: var(--nx-muted);
    text-align: center;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.nx-action-tabs {
    position: sticky;
    top: 0;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
    padding: 10px 0;
    background: linear-gradient(180deg, #f3f7fb 70%, rgba(243, 247, 251, 0));
}

.nx-action-tabs.nx-action-segment {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin: 0 0 12px;
    padding: 4px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f1f5f9;
    overflow: hidden;
    box-shadow: none;
}

.nx-action-tab {
    border: 1px solid rgba(30, 42, 58, 0.14);
    background: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    color: #3c4c60;
}

.nx-action-segment .nx-action-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    border: 0;
    border-radius: 10px;
    border-right: 0;
    background: transparent;
    padding: 11px 14px;
    color: #475569;
    font-size: 0.92rem;
    font-weight: 750;
    transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.nx-action-segment .nx-action-tab:last-child {
    border-right: 0;
}

.nx-action-tab-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nx-action-tab-count {
    flex-shrink: 0;
    min-width: 2.1rem;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(30, 42, 58, 0.08);
    color: #243447;
    font-size: 0.98rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    text-align: center;
}

.nx-action-tab:hover,
.nx-action-tab:focus-visible {
    border-color: #1268dc;
    color: #0b4ea8;
}

.nx-action-segment .nx-action-tab:hover,
.nx-action-segment .nx-action-tab:focus-visible {
    background: rgba(255, 255, 255, 0.72);
    color: #1e2a3a;
}

/* Per-mode active colors — selected work mode is unmistakable */
.nx-action-segment .nx-action-tab.nx-ac-tab-blue.is-active {
    background: #1268dc;
    color: #fff;
    box-shadow: 0 1px 2px rgba(18, 104, 220, 0.28);
}

.nx-action-segment .nx-action-tab.nx-ac-tab-orange.is-active {
    background: #ec5f1c;
    color: #fff;
    box-shadow: 0 1px 2px rgba(236, 95, 28, 0.28);
}

.nx-action-segment .nx-action-tab.nx-ac-tab-amber.is-active {
    background: #b45309;
    color: #fff;
    box-shadow: 0 1px 2px rgba(180, 83, 9, 0.28);
}

.nx-action-segment .nx-action-tab.is-active .nx-action-tab-count {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.nx-action-panel {
    margin-top: 0;
}

.nx-action-panel-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
    padding: 0 0 10px;
    border-bottom: 1px solid #e7ebf0;
}

.nx-action-panel-hint {
    margin: 0;
    color: var(--nx-muted);
    font-size: 0.86rem;
    font-weight: 650;
}

.nx-card-header-compact {
    margin-bottom: 10px;
    padding-bottom: 8px;
}

.nx-card-header-compact .nx-card-title,
.nx-card-header-compact .nx-subsection-title {
    margin: 0;
    font-size: 1rem;
}

.nx-fraud-compact {
    margin-top: 14px;
}

.nx-fraud-compact .nx-table-wrap {
    margin-top: 0;
}

.nx-fraud-empty,
.nx-fraud-more {
    margin: 4px 0 0;
    font-size: 0.85rem;
}

.nx-incomplete-stack {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
    gap: 14px;
    flex: 1 1 auto;
    min-height: 0;
    padding: 14px 16px 16px;
    overflow: hidden;
}

@media (max-width: 960px) {
    .nx-incomplete-stack {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
}

.nx-ac-pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    border: 1px solid #e4ebf3;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.nx-ac-pane-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f6;
    background: #fbfcfe;
}

.nx-ac-pane-hint {
    margin: 2px 0 0;
    color: var(--nx-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.nx-ac-pane-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 0;
}

.nx-ac-pane-body .nx-empty {
    margin: 24px 16px;
}

.nx-ac-draft-preview {
    max-width: 22rem;
    color: #5a6b7f;
    font-size: 0.84rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nx-ac-wait-list {
    padding: 10px;
    gap: 8px;
}

.nx-ac-wait-card {
    width: 100%;
    text-align: left;
}

.nx-incomplete-stack > .nx-table-card,
.nx-incomplete-stack > .nx-card {
    margin: 0;
}

.nx-wip-group-label {
    display: inline-flex;
    align-items: center;
    padding: 7px 2px 7px 8px;
    color: var(--nx-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nx-handler-drop svg {
    width: 21px;
    height: 21px;
}

.nx-handler-drop.is-drop-target {
    border-color: var(--nx-green);
    background: #ecfdf5;
    color: #047857;
}

.nx-handler-drop[data-handler-unavailable="true"] {
    cursor: not-allowed;
    opacity: 0.72;
}

.nx-rebalance-section {
    display: grid;
    gap: 12px;
}

.nx-rebalance-section + .nx-rebalance-section {
    padding-top: 18px;
    border-top: 1px solid var(--nx-line);
}

.nx-rebalance-section h3 {
    margin: 0;
    font-size: 1rem;
}

.nx-rebalance-handlers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.nx-rebalance-handler {
    display: flex;
    min-height: 82px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid currentColor;
    border-radius: 8px;
    background: #fff;
}

.nx-rebalance-handler > div {
    display: grid;
    gap: 3px;
}

.nx-rebalance-handler > div:last-child {
    flex: 0 0 auto;
    text-align: right;
}

.nx-rebalance-handler span,
.nx-rebalance-handler small {
    color: var(--nx-muted);
    font-size: 0.76rem;
}

.nx-rebalance-proposal {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.nx-rebalance-proposal:has(input:checked) {
    border-color: var(--nx-blue);
    background: #eff6ff;
}

.nx-rebalance-proposal input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.nx-rebalance-proposal span {
    display: grid;
    gap: 4px;
}

.nx-rebalance-proposal small,
.nx-rebalance-proposal em {
    color: var(--nx-muted);
    font-size: 0.78rem;
    font-style: normal;
}

.nx-rebalance-proposal em {
    line-height: 1.45;
}

.nx-investigation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.nx-investigation-card {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--nx-line);
    border-top: 4px solid var(--nx-blue);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--nx-shadow-small);
}

.nx-investigation-card-mechanic {
    border-top-color: var(--nx-cyan);
}

.nx-subsection {
    display: grid;
    gap: 12px;
}

.nx-subsection + .nx-subsection,
.nx-subsection + .nx-empty-state {
    margin-top: 18px;
}

.nx-subsection-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--nx-ink-muted);
}

.nx-investigation-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.nx-investigation-card > header > div:first-child {
    min-width: 0;
}

.nx-investigation-card > header > .nx-status,
.nx-investigation-card > header > .nx-badge {
    flex-shrink: 0;
    white-space: normal;
    max-width: 10rem;
    text-align: right;
}

.nx-investigation-card .nx-table-link {
    min-height: 0;
    padding: 0;
    line-height: 1.3;
}

.nx-investigation-card h3,
.nx-investigation-card p {
    margin: 0;
}

.nx-investigation-card header p {
    margin-top: 4px;
    color: var(--nx-muted);
    font-size: 0.82rem;
}

.nx-investigation-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.nx-investigation-facts > div {
    display: grid;
    gap: 3px;
    padding: 11px;
    border: 1px solid #e5eaf0;
    border-radius: 8px;
    background: #f8fafc;
}

.nx-investigation-facts span,
.nx-investigation-facts small {
    color: var(--nx-muted);
    font-size: 0.75rem;
}

.nx-investigation-findings {
    padding: 13px;
    border-left: 4px solid var(--nx-green);
    background: #ecfdf5;
}

.nx-investigation-findings p {
    margin-top: 6px;
    color: #245447;
}

.nx-speed-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.nx-speed-grid > div {
    display: grid;
    min-height: 104px;
    align-content: center;
    gap: 4px;
    padding: 15px;
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    background: #fff;
}

.nx-speed-grid span,
.nx-speed-grid small {
    color: var(--nx-muted);
}

.nx-speed-grid strong {
    color: var(--nx-blue);
    font-size: 1.45rem;
}

.nx-import-panel form {
    display: grid;
    gap: 14px;
}

.nx-field small {
    color: var(--nx-muted);
    font-size: 0.75rem;
}

.nx-muted {
    color: var(--nx-muted);
}

.nx-intake-tabs {
    max-width: 520px;
    margin-bottom: 8px;
}

.nx-intake-lead {
    margin: 0 0 14px;
    color: var(--nx-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.nx-intake-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    gap: 10px;
    margin: 0 0 14px;
}

.nx-intake-stats-mail {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    max-width: 920px;
}

.nx-not-claim-fold {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--nx-line);
    border-radius: 10px;
    background: #f7f8fa;
}

.nx-not-claim-fold > summary {
    cursor: pointer;
    font-weight: 700;
    color: #5b6b7c;
}

.nx-intake-list-muted {
    margin-top: 10px;
    opacity: 0.92;
}

.nx-intake-stat {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--nx-line);
    border-left: 3px solid var(--tone, var(--nx-blue));
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--nx-shadow-small);
    text-align: left;
    cursor: pointer;
}

div.nx-intake-stat {
    cursor: default;
}

.nx-intake-stat span {
    color: var(--nx-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.nx-intake-stat strong {
    color: var(--tone, var(--nx-ink));
    font-size: 1.35rem;
    line-height: 1.1;
}

.nx-intake-stat.is-active,
button.nx-intake-stat:hover {
    border-color: color-mix(in srgb, var(--tone, var(--nx-blue)) 45%, var(--nx-line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone, var(--nx-blue)) 14%, transparent);
}

.nx-tone-neutral {
    --tone: #5b6b7c;
}

.nx-heartbeat {
    display: grid;
    /* Wrap the channel-activity cards onto multiple rows instead of a
       clipped horizontal scroll where the last card was unreadable. */
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr));
    gap: 8px;
    margin: 0 0 14px;
    padding-bottom: 2px;
}

.nx-management-flow {
    margin: 18px 0 22px;
}

.nx-management-flow-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(170px, 1fr);
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.nx-management-flow-step {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 88px;
    padding: 14px 16px;
    border: 1px solid var(--nx-line);
    border-top: 4px solid var(--nx-blue);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--nx-shadow-small);
}

.nx-management-flow-step.nx-tone-green {
    border-top-color: var(--nx-green);
}

.nx-management-flow-step.nx-tone-red {
    border-top-color: var(--nx-red);
}

.nx-management-flow-step.nx-tone-amber {
    border-top-color: var(--nx-orange);
}

.nx-management-flow-step strong {
    display: block;
    font-size: 0.92rem;
}

.nx-management-flow-step .nx-key-figure {
    display: block;
    margin-top: 4px;
    font-size: 1.45rem;
    line-height: 1.1;
}

.nx-management-flow-arrow {
    color: var(--nx-muted);
}

.nx-key-figure-block {
    display: grid;
    gap: 8px;
    padding: 22px 24px;
}

.nx-heartbeat-card {
    min-height: 64px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 10px;
    padding: 10px 12px;
    border: 1px solid var(--nx-line);
    border-radius: 10px;
    background: #fff;
}

.nx-heartbeat-card strong,
.nx-heartbeat-card small {
    display: block;
    min-width: 0;
}

.nx-heartbeat-card small {
    overflow: hidden;
    color: var(--nx-muted);
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nx-heartbeat-count {
    color: var(--nx-ink);
    font-size: 1.05rem;
    font-weight: 800;
}

.nx-heartbeat-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--nx-faint);
}

.nx-heartbeat-dot.is-active {
    background: var(--nx-green);
    box-shadow: 0 0 0 3px var(--nx-green-soft);
}

.nx-intake-filter {
    display: grid;
    grid-template-columns: minmax(240px, 1.7fr) repeat(2, minmax(140px, 0.65fr)) auto;
    align-items: end;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid var(--nx-line);
    border-radius: 12px;
    background: #fff;
}

.nx-intake-list {
    display: grid;
    gap: 10px;
}

.nx-intake-card {
    overflow: hidden;
    border: 1px solid var(--nx-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--nx-shadow-small);
}

.nx-intake-card.is-attention {
    border-color: color-mix(in srgb, var(--nx-orange) 40%, var(--nx-line));
}

.nx-intake-card > summary {
    min-height: 78px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto 24px;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    list-style: none;
    cursor: pointer;
}

.nx-intake-card > summary::-webkit-details-marker {
    display: none;
}

.nx-intake-card > summary:hover {
    background: #fafbfd;
}

.nx-intake-card[open] > summary {
    border-bottom: 1px solid var(--nx-line);
    background: #fbfcfe;
}

.nx-intake-channel {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--nx-blue-soft);
    color: var(--nx-blue);
}

.nx-intake-channel svg,
.nx-disclosure svg {
    width: 18px;
    height: 18px;
}

.nx-channel-email {
    background: var(--nx-orange-soft);
    color: var(--nx-orange-dark);
}

.nx-channel-whatsapp {
    background: var(--nx-green-soft);
    color: var(--nx-green);
}

.nx-intake-summary h2,
.nx-intake-summary p {
    margin: 0;
}

.nx-intake-summary-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    row-gap: 2px;
    min-width: 0;
}

.nx-intake-summary h2,
.nx-intake-claim-link {
    overflow: hidden;
    color: var(--nx-blue);
    font-size: 1.02rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

button.nx-intake-claim-link {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

button.nx-intake-claim-link:hover {
    text-decoration: underline;
}

.nx-intake-type {
    flex: 0 1 auto;
    color: var(--nx-muted);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: normal;
}

.nx-intake-summary p {
    margin-top: 3px;
    overflow: hidden;
    color: var(--nx-muted);
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nx-intake-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.nx-intake-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef3f9;
    color: #35506d;
    font-size: 0.72rem;
    font-weight: 700;
}

.nx-intake-summary-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.nx-disclosure {
    color: var(--nx-faint);
    transition: transform 150ms ease;
}

.nx-intake-card[open] .nx-disclosure {
    transform: rotate(90deg);
}

.nx-intake-content {
    padding: 4px 16px 16px;
}

.nx-router-pipeline,
.nx-intake-pipeline:has(.nx-intake-stage:nth-child(4):last-child) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.nx-intake-compare {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--nx-line);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.nx-intake-compare-hitl {
    min-height: 420px;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.nx-intake-compare > section {
    min-width: 0;
    padding: 14px 16px 16px;
}

.nx-intake-compare > section + section {
    border-left: 1px solid var(--nx-line);
}

.nx-intake-doc-pane {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f7f9fc;
}

.nx-intake-doc-viewer {
    position: relative;
    min-height: 320px;
    /* Not `display:grid; place-items:center`. A zoomed page is larger than
       this container, and a centred grid item overflows equally in BOTH
       directions — the top-left of the page becomes unreachable by scrolling.
       Start-aligned, with the stage centring itself only while it fits. */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    background: #1c2430;
    color: #d7dee8;
}

/* The decision belongs where the reviewer's eye starts, not after a long
   scroll: outcome text left, the two actions pinned right, above the split. */
.nx-intake-decisionbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
    padding: 12px 16px;
    border: 1px solid var(--nx-line);
    border-radius: 10px;
    background: var(--nx-surface, #fff);
}

.nx-intake-decisionbar-text { min-width: 0; }

.nx-intake-decisionbar-text h3 {
    margin: 0 0 2px;
    font-size: 13px;
    font-weight: 700;
}

.nx-intake-decisionbar-text p { margin: 0; font-size: 12px; }

.nx-intake-decisionbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.nx-doc-toolbar {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    background: #141b25;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.nx-doc-tool-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nx-doc-tool {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #eaf0f7;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.nx-doc-tool:hover:not(:disabled) { background: rgba(255, 255, 255, 0.16); }
.nx-doc-tool:disabled { opacity: 0.35; cursor: not-allowed; }

.nx-doc-pageno,
.nx-doc-zoom {
    min-width: 54px;
    text-align: center;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: #c3ccd8;
}

.nx-doc-stage {
    flex: 1 1 auto;
    min-height: 520px;
    overflow: auto;
    padding: 10px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    scroll-behavior: smooth;
    cursor: grab;
    touch-action: pan-x pan-y pinch-zoom;
    overscroll-behavior: contain;
}

/* `safe` centring keeps a small page centred but refuses to push a large one
   out of reach — it degrades to start alignment exactly when it must. */
@supports (justify-content: safe center) {
    .nx-doc-stage {
        justify-content: safe center;
        align-items: safe center;
    }
}

.nx-doc-stage.is-loading { opacity: 0.55; }

/* While dragging, suppress smooth-scroll or the pan fights the animation. */
.nx-doc-stage.is-panning {
    cursor: grabbing;
    scroll-behavior: auto;
    user-select: none;
}

/* Full screen: the document takes the window so a dense handwritten form can
   actually be read, without leaving the review context. */
.nx-intake-doc-viewer.is-expanded {
    position: fixed;
    inset: 16px;
    z-index: 1200;
    max-height: none;
    box-shadow: 0 24px 80px rgba(4, 10, 20, 0.55);
}

.nx-intake-doc-viewer.is-expanded .nx-doc-stage { min-height: 0; }

body.nx-doc-locked { overflow: hidden; }

.nx-doc-canvas {
    position: relative;
    /* NO auto margins. A flex item wider than its scroll container with
       `margin:auto` overflows equally on BOTH sides, and the left/top overflow
       cannot be reached by scrolling — the page zooms but you can never pan to
       what you zoomed in on. Centring is done by the stage instead, safely. */
    flex: 0 0 auto;
    /* Width is set in PIXELS by paintIntakePage, not as a CSS percentage.
       A percentage on a flex item resolves against the flex container in ways
       that varied here, and the page simply refused to grow. Explicit pixels
       are unambiguous and make the scroll extents exactly right. */
    transform: rotate(var(--nx-doc-rotate, 0deg));
    transform-origin: center center;
    line-height: 0;
}

.nx-doc-page {
    display: block;
    width: 100%;
    height: auto;
    background: #fff;
    border-radius: 4px;
}

/* The overlay shares the canvas box exactly, so a region stored as page
   fractions maps to plain percentages and stays correct at any zoom. */
.nx-doc-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.nx-doc-region {
    position: absolute;
    padding: 0;
    border: 2px solid rgba(255, 176, 32, 0.85);
    border-radius: 3px;
    background: rgba(255, 205, 90, 0.18);
    pointer-events: auto;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease;
}

.nx-doc-region:hover {
    background: rgba(255, 205, 90, 0.34);
}

.nx-doc-region.is-active {
    border-color: #1268dc;
    background: rgba(18, 104, 220, 0.28);
    box-shadow: 0 0 0 2px rgba(18, 104, 220, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    .nx-doc-stage { scroll-behavior: auto; }
    .nx-doc-region { transition: none; }
}

.nx-intake-doc-viewer.is-empty {
    background: #eef2f7;
    color: var(--nx-muted);
}

.nx-intake-doc-frame,
.nx-intake-doc-image {
    width: 100%;
    min-height: 320px;
    height: 520px;
    border: 0;
    background: #fff;
}

/* Review panel: sections, progress, and the locked two-pane viewport. The
   client's complaint was an endlessly scrolling page — so the PAGE holds
   still and each pane scrolls inside its own box. */
.nx-review-progress {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 2px 10px;
    background: var(--nx-surface, #fff);
    font-size: 12px;
    font-weight: 600;
    color: var(--nx-muted);
}

.nx-review-bar {
    flex: 1 1 auto;
    height: 6px;
    border-radius: 999px;
    background: rgba(18, 104, 220, 0.14);
    overflow: hidden;
}

.nx-review-bar > i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: #1268dc;
    transition: width 220ms ease;
}

.nx-review-section {
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    margin-bottom: 8px;
    background: var(--nx-surface, #fff);
    overflow: hidden;
}

.nx-review-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.nx-review-section-head:hover { background: rgba(18, 104, 220, 0.05); }

.nx-review-section-title {
    flex: 1 1 auto;
    font-weight: 700;
    font-size: 13px;
}

.nx-review-chevron {
    display: inline-flex;
    transition: transform 160ms ease;
    opacity: 0.6;
}

.nx-review-section.is-open .nx-review-chevron { transform: rotate(90deg); }

.nx-review-section-body { display: none; padding: 0 12px 12px; }
.nx-review-section.is-open .nx-review-section-body { display: block; }

.nx-intake-field[data-field-row].is-linked {
    outline: 2px solid #1268dc;
    outline-offset: 2px;
    border-radius: 6px;
}

.nx-intake-page-tag {
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(18, 104, 220, 0.12);
    color: #1a4f9c;
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Locked viewport: the compare pane owns the height, both children scroll
   independently, and the page body never grows. Falls back to normal document
   flow on narrow screens, where a locked split is unusable. */
@media (min-width: 1100px) {
    .nx-intake-compare-hitl {
        display: grid;
        /* The document is the source of truth and it is handwritten — give it
           the larger share and the full height of the viewport. The old
           74vh/900px box left the page rendered at ~550px with dead space
           beneath it, which is precisely the thing a verifier cannot afford. */
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        gap: 16px;
        height: min(88vh, 1180px);
        min-height: 620px;
    }

    .nx-intake-compare-hitl > .nx-intake-doc-pane,
    .nx-intake-compare-hitl > .nx-intake-fields-pane {
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
    }

    .nx-intake-compare-hitl > .nx-intake-doc-pane > .nx-intake-doc-viewer {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
    }

    .nx-intake-compare-hitl > .nx-intake-fields-pane {
        overflow-y: auto;
        padding-right: 4px;
    }

    /* Attachments and the message fold are reference material, not the work.
       Keep them to a thin strip at the bottom so the page keeps the height. */
    .nx-intake-compare-hitl .nx-intake-attachments,
    .nx-intake-compare-hitl .nx-intake-message-fold {
        flex: 0 0 auto;
        margin-top: 8px;
    }

    .nx-intake-compare-hitl .nx-intake-attachments {
        max-height: 118px;
        overflow-y: auto;
    }

    .nx-intake-compare-hitl .nx-intake-attachments h4 {
        margin: 0 0 4px;
        font-size: 12px;
    }

    .nx-intake-compare-hitl .nx-intake-doc-pane > .nx-intake-pane-head {
        flex: 0 0 auto;
        margin-bottom: 6px;
    }

    .nx-intake-compare-hitl .nx-intake-pane-head p {
        margin: 0;
        font-size: 12px;
    }
}

.nx-intake-doc-open {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.86);
    color: #f3f6fa;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.nx-intake-doc-open:hover,
.nx-intake-doc-open:focus-visible {
    background: #111827;
    color: #fff;
    text-decoration: none;
}

.nx-intake-doc-image {
    height: auto;
    max-height: 560px;
    object-fit: contain;
    background: #111827;
}

.nx-intake-doc-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nx-intake-doc-list li {
    display: flex;
    min-width: 0;
}

.nx-intake-doc-pick {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    background: #fff;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.nx-intake-doc-pick.is-active {
    border-color: var(--nx-blue);
    box-shadow: inset 3px 0 0 var(--nx-blue);
    background: #f3f8ff;
}

.nx-intake-doc-pick span {
    display: grid;
    gap: 2px;
    min-width: 0;
    font-size: 0.82rem;
}

.nx-intake-doc-pick small {
    color: var(--nx-muted);
}

.nx-intake-message-fold {
    margin-top: 2px;
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    background: #fff;
}

.nx-intake-message-fold > summary {
    cursor: pointer;
    padding: 8px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--nx-ink);
}

.nx-intake-message-fold[open] > summary {
    border-bottom: 1px solid var(--nx-line);
}

.nx-intake-message-fold .nx-original-message {
    margin: 0;
    border-left: 0;
    border-radius: 0;
    max-height: 140px;
}

.nx-intake-fields-pane .nx-intake-field {
    margin-top: 8px;
}

.nx-intake-pane-head {
    margin-bottom: 10px;
}

.nx-intake-pane-head h3,
.nx-intake-compare h4,
.nx-intake-outcome h3,
.nx-intake-attachments h4 {
    margin: 0;
    color: var(--nx-ink);
    font-size: 0.92rem;
}

.nx-intake-pane-head p {
    margin: 2px 0 0;
    color: var(--nx-muted);
    font-size: 0.76rem;
}

.nx-original-message {
    max-height: 180px;
    overflow: auto;
    padding: 12px 12px;
    border-left: 3px solid var(--nx-blue);
    border-radius: 0 8px 8px 0;
    background: #f5f8fc;
    color: #25354a;
    font-size: 0.86rem;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.nx-intake-attachments {
    margin-top: 12px;
}

.nx-intake-attachments h4 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.nx-intake-attachments h4 span,
.nx-intake-attachments small {
    color: var(--nx-muted);
    font-weight: 600;
}

.nx-intake-attachments ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nx-intake-attachments li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    background: #fafbfd;
}

.nx-intake-attachments li span {
    display: grid;
    gap: 2px;
    min-width: 0;
    font-size: 0.82rem;
    font-weight: 650;
}

.nx-intake-field-list {
    display: grid;
    gap: 0;
}

.nx-intake-field {
    display: grid;
    gap: 6px;
    padding: 12px 0;
    border-bottom: 1px solid #edf1f6;
}

.nx-intake-field.is-empty {
    background: linear-gradient(90deg, rgba(236, 95, 28, 0.04), transparent 70%);
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
    border-radius: 8px;
}

.nx-intake-field.is-corrected {
    background: linear-gradient(90deg, rgba(18, 160, 98, 0.06), transparent 70%);
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
    border-radius: 8px;
}

.nx-intake-field-placeholder {
    color: var(--nx-muted) !important;
    font-weight: 650 !important;
}

.nx-intake-corrected-tag {
    color: #0b7a4b !important;
    font-weight: 750 !important;
}

.nx-intake-field-history {
    display: grid;
    gap: 2px;
}

.nx-intake-field-history span,
.nx-intake-field-history small {
    color: var(--nx-muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.nx-intake-fields-pane .nx-alert p {
    margin: 4px 0 0;
}

.nx-intake-field:last-of-type {
    border-bottom: 0;
}

.nx-intake-field-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    color: var(--nx-muted);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.nx-intake-field-value {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.nx-intake-field-value strong {
    color: var(--nx-ink);
    font-size: 0.95rem;
}

.nx-match-box {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    background: #f8fafc;
}

.nx-match-box h4 {
    margin: 0 0 8px;
    font-size: 0.8rem;
}

.nx-intake-outcome {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.nx-intake-outcome > section {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--nx-line);
    border-radius: 10px;
    background: #fff;
}

.nx-intake-outcome-claim {
    display: grid;
    gap: 4px;
    margin: 8px 0 10px;
}

.nx-intake-decision {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.nx-intake-timeline {
    display: grid;
    gap: 8px;
    margin: 10px 0;
    padding: 0;
    list-style: none;
}

.nx-intake-timeline li {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 8px;
}

.nx-intake-timeline li > span {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--nx-green-soft);
    color: var(--nx-green);
}

.nx-intake-timeline svg {
    width: 13px;
    height: 13px;
}

.nx-intake-timeline strong,
.nx-intake-timeline small {
    display: block;
}

.nx-intake-timeline small,
.nx-correlation {
    color: var(--nx-muted);
    font-size: 0.72rem;
    overflow-wrap: anywhere;
}

.nx-voice-section {
    margin: 22px 0 28px;
    padding: 22px 0 26px;
    border-top: 1px solid var(--nx-line);
    border-bottom: 1px solid var(--nx-line);
}

.nx-voice-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 16px 0;
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    background: #fff;
}

.nx-voice-flow > div {
    min-width: 0;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-content: center;
    gap: 2px 9px;
    min-height: 84px;
    padding: 12px 14px;
}

.nx-voice-flow > div + div {
    border-left: 1px solid var(--nx-line);
}

.nx-voice-flow span,
.nx-voice-icon {
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--nx-blue-soft);
    color: var(--nx-blue);
}

.nx-voice-flow span {
    width: 30px;
    height: 30px;
    grid-row: 1 / 3;
    font-size: 0.78rem;
    font-weight: 800;
}

.nx-voice-flow strong,
.nx-voice-flow small {
    min-width: 0;
}

.nx-voice-flow small {
    color: var(--nx-muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.nx-voice-upload {
    display: grid;
    grid-template-columns: minmax(250px, 0.9fr) minmax(290px, 1.1fr);
    gap: 16px 20px;
    padding: 20px;
    border: 1px solid var(--nx-line);
    border-left: 4px solid var(--nx-blue);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--nx-shadow-small);
}

.nx-voice-upload-copy {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.nx-voice-upload-copy h3,
.nx-voice-upload-copy p {
    margin: 0;
}

.nx-voice-upload-copy p {
    margin-top: 5px;
    color: var(--nx-muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.nx-voice-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
}

.nx-voice-icon svg {
    width: 22px;
    height: 22px;
}

.nx-voice-dropzone {
    min-height: 112px;
    margin: 0;
}

.nx-voice-upload .nx-form-grid,
.nx-voice-upload > .nx-button,
.nx-voice-upload > .nx-field-help {
    grid-column: 1 / -1;
}

.nx-voice-history-header {
    margin-top: 24px;
}

.nx-voice-history-header > span {
    color: var(--nx-muted);
    font-size: 0.78rem;
}

.nx-voice-list {
    display: grid;
    gap: 12px;
}

.nx-voice-card {
    overflow: hidden;
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--nx-shadow-small);
}

.nx-voice-card > header,
.nx-voice-card > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
}

.nx-voice-card > header {
    border-bottom: 1px solid var(--nx-line);
}

.nx-voice-card > footer {
    justify-content: flex-end;
    border-top: 1px solid var(--nx-line);
    background: #f8fafc;
}

.nx-voice-file {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 11px;
}

.nx-voice-file > div {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.nx-voice-file > span {
    width: 38px;
    height: 38px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 8px;
    background: var(--nx-orange-soft);
    color: var(--nx-orange-dark);
}

.nx-voice-file svg {
    width: 20px;
    height: 20px;
}

.nx-voice-file strong,
.nx-voice-file small {
    display: block;
    min-width: 0;
}

.nx-voice-file small {
    margin-top: 3px;
    overflow: hidden;
    color: var(--nx-muted);
    font-size: 0.73rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nx-voice-safety {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--nx-line);
    background: var(--nx-green-soft);
    color: #17633b;
    font-size: 0.72rem;
    font-weight: 700;
}

.nx-voice-safety span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.nx-voice-safety svg {
    width: 15px;
    height: 15px;
}

.nx-voice-player {
    min-height: 0;
    padding: 0 18px;
}

.nx-voice-player:not(:empty) {
    padding-top: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--nx-line);
    background: #f8fafc;
}

.nx-voice-player audio {
    width: 100%;
    min-height: 42px;
    display: block;
}

.nx-voice-review {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
}

.nx-voice-review textarea {
    min-height: 150px;
}

.nx-voice-transcript {
    padding: 18px;
    border-bottom: 1px solid var(--nx-line);
}

.nx-voice-transcript span {
    color: var(--nx-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.nx-voice-transcript p {
    margin: 8px 0 0;
    color: var(--nx-ink);
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.nx-voice-meta {
    padding: 4px 18px 12px;
}

.nx-voice-handoff {
    display: grid;
    gap: 6px;
    margin: 0 18px 14px;
    padding: 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: var(--nx-blue-soft);
}

.nx-voice-handoff > span {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.nx-voice-handoff small {
    color: var(--nx-muted);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.nx-voice-governance {
    margin: 0;
    padding: 10px 18px;
    border-top: 1px solid var(--nx-line);
    background: #f8fafc;
    color: var(--nx-muted);
    font-size: 0.75rem;
}

.nx-role-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.nx-role-card {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    gap: 13px;
    padding: 18px;
    border: 1px solid var(--nx-line);
    border-top: 4px solid var(--tone, var(--nx-blue));
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--nx-shadow-small);
}

.nx-role-card > header {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.nx-role-card h3,
.nx-role-card p {
    margin: 0;
}

.nx-role-card h3 {
    color: var(--nx-ink);
    font-size: 1rem;
}

.nx-role-card p {
    color: var(--nx-muted);
    font-size: 0.82rem;
}

.nx-role-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--tone-soft, var(--nx-blue-soft));
    color: var(--tone, var(--nx-blue));
}

.nx-role-icon svg {
    width: 21px;
    height: 21px;
}

.nx-role-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: auto;
}

.nx-role-features span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #40516a;
    font-size: 0.76rem;
}

.nx-role-features svg {
    width: 14px;
    height: 14px;
    color: var(--nx-green);
}

.nx-people-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.nx-person-card {
    display: grid;
    gap: 15px;
    padding: 17px;
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--nx-shadow-small);
}

.nx-person-card.is-inactive {
    background: #f8fafc;
    opacity: 0.78;
}

.nx-person-card > header {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.nx-person-card h3,
.nx-person-card p {
    margin: 0;
}

.nx-person-card h3 {
    color: var(--nx-ink);
    font-size: 0.96rem;
}

.nx-person-card p {
    color: var(--nx-muted);
    font-size: 0.76rem;
}

.nx-person-avatar {
    width: 44px;
    height: 44px;
}

.nx-person-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.nx-person-metrics > div {
    min-width: 0;
    display: grid;
    gap: 2px;
    padding: 9px;
    border-radius: 8px;
    background: #f8fafc;
}

.nx-person-metrics span {
    color: var(--nx-muted);
    font-size: 0.68rem;
}

.nx-person-metrics strong {
    overflow: hidden;
    color: var(--nx-ink);
    font-size: 0.82rem;
    text-overflow: ellipsis;
}

.nx-load-meter {
    display: grid;
    gap: 6px;
}

.nx-load-meter > span,
.nx-person-card > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.nx-load-meter small,
.nx-person-card > footer small {
    color: var(--nx-muted);
    font-size: 0.72rem;
}

.nx-credential-box {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    background: #f8fafc;
}

.nx-credential-box span,
.nx-credential-box small {
    color: var(--nx-muted);
    font-size: 0.76rem;
}

.nx-credential-box code {
    overflow-wrap: anywhere;
    color: var(--nx-ink);
    font-size: 1rem;
    font-weight: 800;
}

.nx-training-banner {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin-bottom: 20px;
    padding: 22px;
    border: 1px solid #cfe0f4;
    border-left: 5px solid var(--nx-blue);
    border-radius: 8px;
    background: #f7fbff;
}

.nx-training-banner h2,
.nx-training-banner p {
    margin: 0;
}

.nx-training-banner h2 {
    margin-top: 3px;
    color: var(--nx-ink);
    font-size: 1.25rem;
}

.nx-training-banner p {
    margin-top: 6px;
    color: var(--nx-muted);
    line-height: 1.5;
}

.nx-training-banner-icon,
.nx-training-card-icon {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: #e3f0ff;
    color: var(--nx-blue);
}

.nx-training-banner-icon svg,
.nx-training-card-icon svg {
    width: 25px;
    height: 25px;
}

.nx-training-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.nx-training-card {
    min-width: 0;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--nx-shadow-small);
}

.nx-training-card > header {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.nx-training-card h2,
.nx-training-card p {
    margin: 0;
}

.nx-training-card h2 {
    margin-top: 3px;
    color: var(--nx-ink);
    font-size: 1rem;
}

.nx-training-card p {
    color: var(--nx-muted);
    line-height: 1.55;
}

.nx-training-card > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--nx-muted);
    font-size: 0.8rem;
}

.nx-training-progress {
    display: grid;
    grid-template-columns: minmax(80px, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
    color: var(--nx-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.nx-training-progress .nx-bar-track {
    height: 8px;
}

.nx-training-workspace {
    align-items: start;
    margin-bottom: 20px;
}

.nx-training-next {
    position: sticky;
    top: 88px;
}

.nx-training-next > h2,
.nx-training-next > p {
    margin: 8px 0 0;
}

.nx-training-next > p {
    color: var(--nx-muted);
    line-height: 1.55;
}

.nx-training-documents {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--nx-line);
}

.nx-training-documents > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nx-training-documents span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 9px;
    border-radius: 6px;
    background: #f2f6fa;
    color: var(--nx-muted);
    font-size: 0.76rem;
}

.nx-training-documents svg {
    width: 16px;
    height: 16px;
}

.nx-training-finish {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 22px 10px;
    text-align: center;
}

.nx-training-finish > svg {
    width: 42px;
    height: 42px;
    color: var(--nx-green);
}

.nx-training-finish h2,
.nx-training-finish p {
    margin: 0;
}

.nx-training-finish p {
    color: var(--nx-muted);
}

.nx-training-steps {
    list-style: none;
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
}

.nx-training-steps li {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    padding: 16px;
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    background: #fff;
}

.nx-training-steps li.is-current {
    border-color: #8dbbf0;
    background: #f7fbff;
    box-shadow: 0 0 0 2px rgba(18, 104, 220, 0.08);
}

.nx-training-steps li.is-complete {
    border-color: #a9dec5;
    background: #f6fcf9;
}

.nx-training-step-number {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #eaf1f8;
    color: var(--nx-muted);
    font-weight: 800;
}

.nx-training-step-number svg {
    width: 18px;
    height: 18px;
}

.is-current > .nx-training-step-number {
    background: var(--nx-blue);
    color: #fff;
}

.is-complete > .nx-training-step-number {
    background: var(--nx-green);
    color: #fff;
}

.nx-training-steps strong,
.nx-training-steps p,
.nx-training-steps small {
    display: block;
}

.nx-training-steps p {
    margin: 4px 0;
    color: var(--nx-muted);
    line-height: 1.5;
}

.nx-training-steps small {
    color: #6a7c90;
    line-height: 1.45;
}

@media (max-width: 1280px) {
    .nx-kpi-grid {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }

    .nx-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nx-filter-bar > :first-child {
        grid-column: 1 / -1;
    }

    .nx-email-body,
    .nx-flow-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nx-rule-grid {
        grid-template-columns: 1fr;
    }

    .nx-fraud-rule-grid {
        grid-template-columns: 1fr;
    }

    .nx-role-grid,
    .nx-people-grid,
    .nx-training-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nx-queue-card {
        grid-template-columns: minmax(170px, 1.2fr) repeat(2, minmax(100px, 0.6fr)) minmax(180px, 1fr) auto;
    }

    .nx-queue-card > :nth-child(4) {
        display: none;
    }
}

@media (max-width: 1024px) {
    :root {
        --nx-sidebar: 248px;
    }

    .nx-profile-copy {
        display: none;
    }

    .nx-grid-main-aside,
    .nx-dashboard-grid,
    .nx-fraud-intel-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .nx-info-grid,
    .nx-document-grid,
    .nx-safety-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nx-manager-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nx-training-next {
        position: static;
    }

    .nx-work-summary,
    .nx-speed-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nx-investigation-grid {
        grid-template-columns: 1fr;
    }

    .nx-intake-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nx-auth-shell {
        grid-template-columns: minmax(300px, 0.8fr) minmax(420px, 1.2fr);
    }

    .nx-auth-card:has(.nx-demo-mode) {
        width: min(100%, 720px);
    }

    .nx-auth-journey {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .nx-sidebar {
        width: min(86vw, 310px);
        transform: translateX(-105%);
        box-shadow: 20px 0 50px rgba(15, 23, 42, 0.18);
    }

    .nx-body.nx-menu-open {
        overflow: hidden;
    }

    .nx-body.nx-menu-open .nx-sidebar {
        transform: translateX(0);
    }

    .nx-mobile-backdrop {
        position: fixed;
        z-index: 35;
        inset: 0;
        display: none;
        border: 0;
        background: rgba(15, 23, 42, 0.45);
    }

    .nx-body.nx-menu-open .nx-mobile-backdrop {
        display: block;
    }

    .nx-topbar {
        left: 0;
        padding: 0 16px;
    }

    .nx-main {
        margin-left: 0;
        padding: calc(var(--nx-topbar) + 22px) 16px 42px;
    }

    .nx-menu-button {
        display: inline-grid;
    }

    .nx-topbar-context span {
        display: none;
    }

    .nx-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .nx-header-actions {
        width: 100%;
    }

    .nx-header-actions .nx-button {
        flex: 1;
    }

    .nx-kpi-grid {
        grid-template-columns: repeat(2, minmax(145px, 1fr));
    }

    .nx-allocation-board {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .nx-allocation-pool {
        border-right: 0;
        border-bottom: 1px solid var(--nx-line);
    }

    .nx-kpi-grid-3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .nx-kpi-ready-expand {
        grid-template-columns: minmax(0, 1fr);
    }

    .nx-grid-2,
    .nx-grid-3,
    .nx-form-grid,
    .nx-info-grid,
    .nx-document-grid,
    .nx-safety-grid,
    .nx-quick-actions,
    .nx-email-body,
    .nx-flow-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .nx-intake-filter,
    .nx-intake-compare,
    .nx-role-grid,
    .nx-people-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .nx-voice-flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nx-voice-flow > div:nth-child(3) {
        border-left: 0;
    }

    .nx-voice-flow > div:nth-child(n + 3) {
        border-top: 1px solid var(--nx-line);
    }

    .nx-voice-upload {
        grid-template-columns: minmax(0, 1fr);
    }

    .nx-voice-upload > * {
        grid-column: auto;
    }

    .nx-intake-compare > section + section,
    .nx-intake-compare-hitl > section + section {
        border-top: 1px solid var(--nx-line);
        border-left: 0;
    }

    .nx-intake-compare-hitl {
        min-height: 0;
        grid-template-columns: minmax(0, 1fr);
    }

    .nx-intake-doc-viewer,
    .nx-intake-doc-frame {
        min-height: 240px;
        height: 360px;
        max-height: 420px;
    }

    .nx-rebalance-handlers {
        grid-template-columns: minmax(0, 1fr);
    }

    .nx-rebalance-handler {
        align-items: flex-start;
    }

    .nx-rule-card > header,
    .nx-rule-card > footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .nx-fraud-rule-card > header,
    .nx-fraud-rule-card > footer {
        flex-direction: column;
    }

    .nx-simulation-score {
        grid-template-columns: minmax(0, 1fr);
    }

    .nx-form-grid .nx-span-2 {
        grid-column: auto;
    }

    .nx-queue-card {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .nx-queue-card > :not(:first-child):not(:last-child) {
        display: none;
    }

    .nx-claim-header {
        position: static;
        grid-template-columns: 1fr;
    }

    .nx-claim-header .nx-header-actions {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .nx-flow-step {
        min-height: 0;
    }

    .nx-auth-shell {
        display: block;
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    .nx-auth-story {
        display: none;
    }

    .nx-auth-panel {
        min-height: 100vh;
        padding: 20px;
        overflow: auto;
    }

    .nx-auth-card,
    .nx-auth-card:has(.nx-demo-mode) {
        width: min(100%, 470px);
        max-height: none;
        overflow: visible;
    }

    .nx-auth-card:has(.nx-demo-mode) .nx-auth-card-main {
        grid-template-columns: 1fr;
    }

    .nx-auth-mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 30px;
        color: var(--nx-ink);
    }
}

@media (max-width: 560px) {
    :root {
        font-size: 15px;
    }

    .nx-topbar-context {
        display: none;
    }

    .nx-topbar .nx-button {
        min-width: 44px;
        width: 44px;
        padding: 9px;
    }

    .nx-topbar .nx-button span {
        display: none;
    }

    .nx-profile {
        padding-left: 10px;
    }

    .nx-avatar {
        width: 40px;
        height: 40px;
    }

    .nx-kpi-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .nx-copilot-strip {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 12px;
        padding: 14px;
    }

    .nx-copilot-mark {
        width: 40px;
        height: 40px;
    }

    .nx-copilot-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .nx-copilot-actions .nx-button {
        flex: 1;
    }

    .nx-timeline-item {
        grid-template-columns: 28px minmax(0, 1fr);
    }

    .nx-timeline-time {
        grid-column: 2;
    }

    .nx-kpi-card {
        min-height: 132px;
        padding: 15px;
    }

    .nx-kpi-icon {
        width: 39px;
        height: 39px;
        margin-bottom: 10px;
    }

    .nx-kpi-value {
        font-size: 1.65rem;
    }

    .nx-card,
    .nx-panel {
        padding: 17px;
    }

    .nx-card-header,
    .nx-section-header {
        flex-wrap: wrap;
    }

    .nx-filter-bar {
        grid-template-columns: 1fr;
    }

    .nx-filter-bar > :first-child {
        grid-column: auto;
    }

    .nx-manager-summary {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }

    .nx-work-summary,
    .nx-speed-grid,
    .nx-investigation-facts {
        grid-template-columns: 1fr;
    }

    .nx-roster-row,
    .nx-connection-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .nx-roster-row > :last-child,
    .nx-connection-row > :last-child {
        grid-column: 1 / -1;
    }

    .nx-donut-layout {
        flex-direction: column;
        gap: 24px;
    }

    .nx-email-head {
        grid-template-columns: 1fr;
    }

    .nx-intake-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nx-intake-card > summary {
        grid-template-columns: 40px minmax(0, 1fr) 22px;
        gap: 10px;
        padding: 12px;
    }

    .nx-intake-summary-status {
        grid-column: 2 / -1;
        grid-row: 2;
        justify-content: flex-start;
    }

    .nx-disclosure {
        grid-column: 3;
        grid-row: 1;
    }

    .nx-intake-content {
        padding: 0 12px 12px;
    }

    .nx-intake-compare,
    .nx-intake-outcome {
        grid-template-columns: 1fr;
    }

    .nx-intake-compare > section + section,
    .nx-intake-compare-hitl > section + section {
        border-top: 1px solid var(--nx-line);
        border-left: 0;
    }

    .nx-intake-compare-hitl {
        min-height: 0;
        grid-template-columns: minmax(0, 1fr);
    }

    .nx-intake-doc-viewer,
    .nx-intake-doc-frame {
        min-height: 220px;
        height: 300px;
        max-height: 360px;
    }

    .nx-intake-compare > section {
        padding: 12px;
    }

    .nx-voice-flow {
        grid-template-columns: minmax(0, 1fr);
    }

    .nx-voice-flow > div + div,
    .nx-voice-flow > div:nth-child(3) {
        border-top: 1px solid var(--nx-line);
        border-left: 0;
    }

    .nx-voice-upload,
    .nx-voice-card > header,
    .nx-voice-review {
        padding: 15px;
    }

    .nx-voice-card > header {
        align-items: flex-start;
        flex-direction: column;
    }

    .nx-voice-review {
        grid-template-columns: minmax(0, 1fr);
    }

    .nx-voice-review .nx-span-2 {
        grid-column: auto;
    }

    .nx-voice-card > footer .nx-button {
        flex: 1;
    }

    .nx-person-card > header {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .nx-person-card > header .nx-status {
        grid-column: 2;
    }

    .nx-modal-layer {
        align-items: end;
        padding: 0;
    }

    .nx-modal {
        width: 100%;
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
    }

    .nx-modal-footer {
        position: sticky;
        bottom: 0;
        background: #fff;
    }

    .nx-modal-footer .nx-button {
        flex: 1;
    }

    .nx-hint-strip {
        grid-template-columns: 1fr auto;
    }

    .nx-hint-strip > svg {
        display: none;
    }

    .nx-hint-strip ol {
        flex-direction: column;
        gap: 4px;
    }

    .nx-access-card,
    .nx-auth-card {
        padding: 26px 20px;
    }

    .nx-training-banner,
    .nx-training-card > header,
    .nx-training-steps li {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .nx-training-banner > .nx-status,
    .nx-training-card > header > .nx-status,
    .nx-training-steps li > .nx-badge {
        grid-column: 2;
    }

    .nx-training-grid {
        grid-template-columns: 1fr;
    }

    .nx-training-card > footer {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* T6 — prominent money in hero/detail blocks; tables stay readable */
.nx-money-amount,
.nx-key-figure {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.nx-key-figure-block strong.nx-key-figure {
    font-size: 1.45rem;
}

.nx-table .nx-money-amount,
.nx-allocation-card .nx-money-amount,
.nx-queue-card .nx-money-amount,
.nx-card-header .nx-money-amount,
.nx-approval-card .nx-money-amount,
.nx-finance-card .nx-money-amount {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0;
}

.nx-claim-serial,
.nx-table-link.nx-claim-serial {
    font-size: 1.05rem;
    font-weight: 800;
}

.nx-table .nx-claim-serial,
.nx-table .nx-table-link.nx-claim-serial,
.nx-source-claims .nx-claim-serial,
.nx-source-claims .nx-table-link.nx-claim-serial {
    font-size: 0.92rem;
    font-weight: 750;
}

.nx-amount-input {
    max-width: 14rem;
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
}

.nx-table-roomy th,
.nx-table-roomy td {
    padding: 14px 16px;
    vertical-align: top;
}

.nx-button,
.nx-tab {
    min-height: 44px;
}

.nx-table-roomy .nx-icon-button {
    min-height: 44px;
}

.nx-table-link {
    min-height: 0;
}

.nx-cell-stack .nx-table-link,
.nx-source-claims .nx-table-link {
    min-height: 0;
    padding: 0;
    line-height: 1.35;
}

.nx-icon-button {
    min-width: 44px;
}

.nx-detail-row strong.nx-money-amount,
.nx-detail-row strong.nx-key-figure {
    display: inline-block;
    margin-top: 2px;
}

.nx-todays-source {
    margin-bottom: var(--nx-space-5, 1.25rem);
}

.nx-source-flow .nx-source-total-row td {
    border-bottom: 2px solid var(--nx-border-strong, #c5d3e0);
    padding-bottom: 0.85rem;
}

.nx-source-count {
    width: 6rem;
    text-align: right;
    white-space: nowrap;
}

.nx-source-claims {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.65rem;
}

.nx-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: normal;
    font-size: 0.8rem;
    color: var(--nx-muted);
}

/* Anti-overlap: dual-line cells and flex children must shrink, not paint over neighbours */
.nx-table td .nx-cell-stack,
.nx-table td .nx-cell-title,
.nx-table td .nx-cell-subtitle,
.nx-table td .nx-email-wrap {
    max-width: 100%;
}

.nx-email-wrap {
    display: block;
    overflow-wrap: anywhere;
}

.nx-card-header,
.nx-section-header {
    gap: 12px;
}

.nx-card-header > div:first-child,
.nx-section-header > div:first-child {
    min-width: 0;
}

.nx-source-drafts {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--nx-border, #dce5ef);
}

.nx-source-draft-head {
    margin-bottom: 0.75rem;
}

.nx-report-row {
    cursor: pointer;
}

.nx-report-row:hover,
.nx-report-row:focus-visible {
    background: color-mix(in srgb, var(--nx-accent, #2563eb) 8%, transparent);
}

.nx-report-total-row {
    font-weight: 600;
    background: var(--nx-surface-muted, #f8fafc);
}

.nx-reports-breakdown {
    margin-top: 1rem;
}

.nx-report-entry-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 8px 0 20px;
}

.nx-report-entry {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    padding: 18px 20px;
    border: 1px solid #e2e8f0;
    border-radius: var(--nx-radius-card, 14px);
    background: #fff;
    box-shadow: var(--nx-shadow-small);
    cursor: pointer;
    color: inherit;
}

.nx-report-entry strong {
    font-size: 1.05rem;
}

.nx-report-entry span {
    color: var(--nx-muted, #64748b);
    font-size: 0.88rem;
}

.nx-report-entry.is-active {
    border-color: #ec5f1c;
    box-shadow: 0 0 0 1px rgba(236, 95, 28, 0.25);
}

.nx-reports-summary,
.nx-reports-footer {
    margin-bottom: 8px;
}

@media (max-width: 860px) {
    .nx-report-entry-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    .nx-sidebar,
    .nx-topbar,
    .nx-mobile-backdrop,
    .nx-header-actions,
    .nx-hint-strip,
    .nx-button,
    .nx-tabs,
    .nx-print-hide,
    .nx-toast-region,
    .nx-modal-layer {
        display: none !important;
    }

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

    .nx-main {
        margin: 0;
        padding: 0;
        width: 100%;
    }

    .nx-content {
        padding: 0;
    }

    .nx-card,
    .nx-table-card,
    .nx-panel {
        break-inside: avoid;
        box-shadow: none;
        border-color: #ccc;
    }

    .nx-table {
        font-size: 11px;
    }
}

/* === Manager Dashboard — world-class claims ops (BIC) === */
.nx-dash-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 20px;
    margin: 0 0 12px;
}

.nx-dash-eyebrow {
    margin: 0 0 2px;
    color: var(--nx-muted);
    font-size: var(--nx-fs-meta);
    font-weight: var(--nx-fw-bold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nx-dash-header h1 {
    margin: 0;
    color: var(--nx-ink);
    font-size: var(--nx-fs-page);
    font-weight: var(--nx-fw-black);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.nx-dash-header .nx-dashboard-toolbar {
    margin: 0;
}

.nx-dashboard-toolbar {
    justify-content: flex-end;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.nx-dashboard-dates {
    align-items: flex-end;
    gap: 8px;
}

.nx-dashboard-dates .nx-field {
    margin: 0;
}

.nx-dashboard-dates .nx-field label {
    font-size: var(--nx-fs-meta);
    font-weight: var(--nx-fw-medium);
    color: var(--nx-muted);
}

.nx-dashboard-dates input[type="date"] {
    min-height: 36px;
    font-size: var(--nx-fs-body);
    font-weight: var(--nx-fw-medium);
}

.nx-flow-label-btn:hover,
button.nx-flow-count:hover,
button.nx-flow-total:hover {
    color: var(--nx-orange-dark);
}

/* First viewport: Open+Closed stack + Channel Mix beside on wide screens. */
.nx-dash-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    width: 100%;
}

@media (min-width: 1120px) {
    .nx-dash-shell {
        grid-template-columns: minmax(0, 1.55fr) minmax(280px, 340px);
        gap: 12px 14px;
    }

    .nx-dash-shell > .nx-dash-primary {
        grid-column: 1;
        grid-row: 1;
    }

    .nx-dash-shell > .nx-dash-closed {
        grid-column: 1;
        grid-row: 2;
    }

    .nx-dash-shell > .nx-dash-channels-card {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: stretch;
    }
}

.nx-dash-primary,
.nx-dash-closed,
.nx-flow-card,
.nx-dash-panel {
    min-width: 0;
}

.nx-flow-card,
.nx-dash-channels-card {
    padding: 14px 16px 14px;
    border: 1px solid rgba(20, 32, 51, 0.08);
    border-radius: var(--nx-radius-card);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), #fff 40%),
        var(--nx-card);
    box-shadow: var(--nx-shadow-small);
}

.nx-flow-card {
    display: flex;
    flex-direction: column;
}

.nx-flow-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 12px;
}

.nx-flow-card-metrics {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nx-flow-title {
    margin: 0;
    color: var(--nx-ink);
    font-size: var(--nx-fs-section);
    font-weight: var(--nx-fw-black);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.nx-flow-stamp {
    display: block;
    margin-top: 2px;
    color: var(--nx-muted);
    font-size: var(--nx-fs-meta);
    font-weight: var(--nx-fw-medium);
}

/* Exclusive peer lanes — siblings under Open/Closed, never nested in Manager. */
.nx-flow-peer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: start;
}

.nx-flow-peer-grid > .nx-flow-peer {
    min-width: 0;
    align-self: start;
}

.nx-flow-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
}

.nx-flow-split-main {
    min-width: 0;
}

.nx-flow-total,
button.nx-flow-total {
    flex-shrink: 0;
    min-width: 2.5ch;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--nx-orange);
    font-size: var(--nx-fs-metric);
    font-weight: var(--nx-fw-black);
    line-height: 0.95;
    letter-spacing: -0.03em;
    text-align: right;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: color 140ms ease, transform 140ms ease;
}

button.nx-flow-total:hover {
    transform: translateY(-1px);
}

.nx-flow-tree {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.nx-flow-node {
    min-width: 0;
    border: 1px solid rgba(20, 32, 51, 0.08);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    border-left: 3px solid var(--nx-dept, #94a3b8);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.nx-flow-node[open] {
    box-shadow: 0 1px 0 rgba(20, 32, 51, 0.03);
}

.nx-flow-node > summary {
    display: block;
    padding: 0;
    cursor: pointer;
    list-style: none;
}

.nx-flow-node > summary::-webkit-details-marker {
    display: none;
}

.nx-flow-node > summary:hover,
.nx-flow-row:hover {
    background: #f7f9fc;
}

.nx-flow-node[open] > summary {
    border-bottom: 1px solid rgba(20, 32, 51, 0.06);
}

.nx-flow-node[open] > summary .nx-disclosure {
    transform: rotate(90deg);
}

.nx-flow-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 4px 10px;
    align-items: center;
    padding: 8px 10px;
    min-width: 0;
}

.nx-flow-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 8px;
    min-width: 0;
}

.nx-flow-label,
.nx-flow-label-btn {
    color: var(--nx-ink);
    font-size: var(--nx-fs-body);
    font-weight: var(--nx-fw-bold);
    line-height: 1.2;
}

.nx-flow-label-btn {
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.nx-flow-label-btn:hover {
    color: var(--nx-orange-dark);
}

/* Count on top, % below with clear gap — never stuck to the number. */
.nx-flow-count,
button.nx-flow-count {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    min-width: 3.2ch;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--nx-ink);
    font-size: var(--nx-fs-lane);
    font-weight: var(--nx-fw-black);
    line-height: 1;
    text-align: right;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    cursor: pointer;
}

.nx-flow-count-num {
    font: inherit;
    color: inherit;
}

.nx-flow-share {
    color: var(--nx-muted);
    font-size: var(--nx-fs-meta);
    font-weight: var(--nx-fw-bold);
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
}

.nx-flow-head > .nx-disclosure {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: var(--nx-muted);
    transition: transform 180ms ease;
}

.nx-flow-chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 3px;
    margin: 0;
    max-width: 100%;
    align-items: center;
}

.nx-flow-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border: 0;
    border-radius: 999px;
    background: var(--tone-soft, #eef2f6);
    color: var(--tone, #516075);
    font-size: var(--nx-fs-chip);
    font-weight: var(--nx-fw-bold);
    line-height: 1.25;
    white-space: nowrap;
}

button.nx-flow-chip {
    cursor: pointer;
}

button.nx-flow-chip:hover {
    filter: brightness(0.97);
}

.nx-flow-fraud {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 4px 10px;
    border: 1px solid rgba(20, 32, 51, 0.1);
    border-radius: 8px;
    background: #f4f6f9;
    color: #243247;
    line-height: 1.2;
    white-space: nowrap;
    transition: background 140ms ease, border-color 140ms ease;
}

button.nx-flow-fraud {
    cursor: pointer;
}

button.nx-flow-fraud:hover {
    border-color: rgba(20, 32, 51, 0.18);
    background: #ebeef3;
}

.nx-flow-fraud-label {
    font-size: var(--nx-fs-meta);
    font-weight: var(--nx-fw-bold);
    color: #4a5870;
}

.nx-flow-fraud-count {
    min-width: 1.4ch;
    font-size: 0.95rem;
    font-weight: var(--nx-fw-black);
    font-variant-numeric: tabular-nums;
    color: var(--nx-ink);
}

.nx-sla-split {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.nx-sla-seg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.7rem;
    padding: 4px 8px;
    border: 0;
    margin: 0;
    background: var(--tone-soft, #eef2f6);
    color: var(--tone, #516075);
    /* Green / amber / red Open+Closed lane chips — readable at a glance */
    font-size: 0.92rem;
    font-weight: var(--nx-fw-black, 850);
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
}

button.nx-sla-seg {
    cursor: pointer;
}

button.nx-sla-seg:hover {
    filter: brightness(0.97);
}

.nx-sla-seg + .nx-sla-seg {
    box-shadow: inset 1px 0 0 rgba(15, 23, 42, 0.08);
}

.nx-flow-children {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
    padding: 6px;
    min-width: 0;
    background: #f8fafc;
    animation: nx-flow-open 180ms ease;
}

@keyframes nx-flow-open {
    from { opacity: 0.55; transform: translateY(-2px); }
    to { opacity: 1; transform: none; }
}

.nx-flow-stage-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
}

.nx-flow-row {
    min-width: 0;
    border: 1px solid rgba(20, 32, 51, 0.07);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    border-left: 3px solid var(--nx-dept, #94a3b8);
    transition: background 140ms ease, border-color 140ms ease;
}

.nx-flow-leaf.is-clickable {
    cursor: pointer;
}

.nx-flow-leaf.is-clickable:hover {
    background: #f7f9fc;
}

.nx-flow-leaf .nx-flow-head {
    grid-template-columns: minmax(0, 1fr) auto;
}

.nx-flow-person {
    background: #fff;
    border-style: solid;
}

.nx-flow-people {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 1px;
}

.nx-flow-empty {
    margin: 0;
    padding: 6px 4px;
    font-size: var(--nx-fs-meta);
    color: var(--nx-muted);
}

.nx-flow-finance {
    --nx-dept: #0f9f6e;
    border: 1px solid rgba(15, 159, 110, 0.22);
    border-left: 3px solid #0f9f6e;
    border-radius: 10px;
    background: linear-gradient(180deg, #f4fbf7, #eef8f3);
    position: relative;
}

/* Finance peer: label centered in the label area; count/% stay readable. */
.nx-flow-finance > summary .nx-flow-head {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
}

.nx-flow-finance > summary .nx-flow-main {
    justify-content: center;
    width: 100%;
}

.nx-flow-finance > summary .nx-flow-label {
    width: 100%;
    text-align: center;
}

.nx-flow-finance > summary .nx-flow-count {
    align-items: flex-end;
}

.nx-flow-finance .nx-flow-share {
    color: #2f855a;
}

.nx-dept-manager { --nx-dept: #2b6cb0; }
.nx-dept-handler { --nx-dept: #0d9488; }
.nx-dept-investigator { --nx-dept: #6d5b9a; }
.nx-dept-workshop { --nx-dept: #b7791f; }
.nx-dept-customer { --nx-dept: #c05621; }
.nx-dept-finance { --nx-dept: #0f9f6e; }

.nx-dept-manager > summary {
    background: linear-gradient(90deg, rgba(43, 108, 176, 0.07), transparent 58%);
}

.nx-flow-peer > summary .nx-flow-label {
    font-size: var(--nx-fs-body);
}

.nx-flow-peer > summary .nx-flow-count {
    font-size: var(--nx-fs-lane);
}

.nx-flow-peer > summary .nx-flow-share {
    font-size: var(--nx-fs-meta);
}

.nx-dash-panel .nx-card-header,
.nx-dash-channels-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.nx-dash-channels-card .nx-card-title {
    margin: 0;
    font-size: var(--nx-fs-section);
    font-weight: var(--nx-fw-black);
    letter-spacing: -0.02em;
}

.nx-dash-channels-sub {
    margin: 2px 0 0;
    color: var(--nx-muted);
    font-size: var(--nx-fs-meta);
    font-weight: var(--nx-fw-medium);
}

.nx-dash-channel-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    color: var(--nx-ink);
    font-size: 1.65rem;
    font-weight: var(--nx-fw-black);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.nx-dash-channel-total small {
    color: var(--nx-muted);
    font-size: 0.65rem;
    font-weight: var(--nx-fw-bold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nx-dash-channels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-width: none;
}

.nx-dash-channel {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    min-height: 0;
    padding: 12px;
    border: 1px solid rgba(20, 32, 51, 0.08);
    border-radius: 12px;
    background: linear-gradient(165deg, #fcfdfe 0%, #f3f5f8 100%);
    color: #2a3648;
    text-align: left;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

button.nx-dash-channel {
    cursor: pointer;
}

.nx-dash-channel.is-clickable:hover {
    border-color: rgba(236, 95, 28, 0.32);
    background: linear-gradient(165deg, #fffaf6 0%, #f7f1ec 100%);
    transform: translateY(-1px);
}

.nx-dash-channel-name {
    font-size: var(--nx-fs-meta);
    font-weight: var(--nx-fw-bold);
    line-height: 1.2;
    color: #5a6b7f;
}

.nx-dash-channel-value {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nx-dash-channel-pct {
    font-size: 1.75rem;
    font-weight: var(--nx-fw-black);
    line-height: 0.95;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    color: var(--nx-ink);
}

.nx-dash-channel-count {
    color: #5a6b7f;
    font-size: var(--nx-fs-meta);
    font-weight: var(--nx-fw-bold);
    font-variant-numeric: tabular-nums;
}

.nx-dash-channel-count small {
    color: #8a96a8;
    font-size: 0.68rem;
    font-weight: var(--nx-fw-medium);
}

.nx-channel-tone-email {
    border-color: rgba(37, 99, 235, 0.14);
    background: linear-gradient(165deg, #fbfcfe 0%, #f1f5fb 100%);
}

.nx-channel-tone-phone {
    border-color: rgba(8, 145, 178, 0.14);
    background: linear-gradient(165deg, #fbfcfd 0%, #eef8fa 100%);
}

.nx-channel-tone-web {
    border-color: rgba(180, 120, 40, 0.16);
    background: linear-gradient(165deg, #fdfcf9 0%, #f7f2e9 100%);
}

.nx-channel-tone-whatsapp {
    border-color: rgba(22, 163, 74, 0.2);
    background: linear-gradient(165deg, #f8fcf9 0%, #e9f7ee 100%);
}

.nx-channel-tone-whatsapp .nx-dash-channel-pct {
    color: #166534;
}

.nx-dash-links {
    display: grid;
    gap: 8px;
}

.nx-dash-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--nx-line, #e2e8f0);
    border-radius: 10px;
    background: #fff;
    color: var(--nx-ink);
    text-align: left;
}

.nx-dash-link:hover {
    border-color: rgba(236, 95, 28, 0.45);
    background: #fffaf6;
}

.nx-dash-link-icon {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f4f7fb;
    color: var(--nx-primary, #ec5f1c);
}

.nx-dash-link-icon svg {
    width: 18px;
    height: 18px;
}

.nx-dash-link strong {
    display: block;
    font-size: 0.92rem;
}

.nx-dash-link small {
    display: block;
    margin-top: 2px;
    color: var(--nx-muted);
    font-size: 0.76rem;
}

.nx-tone-violet {
    background: rgba(124, 58, 237, 0.12);
    color: #6d28d9;
}

@media (max-width: 1119px) {
    .nx-flow-peer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nx-dash-channels {
        max-width: 360px;
    }
}

@media (max-width: 720px) {
    .nx-dash-shell,
    .nx-flow-peer-grid,
    .nx-flow-stage-grid {
        grid-template-columns: 1fr;
    }

    .nx-dash-header {
        flex-direction: column;
        align-items: stretch;
    }

    .nx-dash-channels {
        max-width: none;
    }

    .nx-dash-channel-pct {
        font-size: 1.5rem;
    }

    .nx-flow-total,
    button.nx-flow-total {
        font-size: 1.7rem;
    }
}

.nx-rebalance-today { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.nx-rebalance-today strong { font-size: 1.15rem; }
.nx-rebalance-today span { color: #5a6b7f; }

/* 2026-07-24 review: suggested-handler hint at HALF size; assigned-hours emphasis */
.nx-allocation-card > div > small { font-size: 0.68rem; line-height: 1.25; opacity: 0.75; max-width: 60%; }
.nx-hours-over { color: #c53030; font-weight: 800; }

/* 2026-07-24 full review: WIP/report filter tabs + workshop picker */
.nx-wip-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    align-items: center;
    margin: 0;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}
.nx-wip-tab {
    flex: 0 0 auto;
    border: 1px solid rgba(30, 42, 58, 0.14);
    background: #fff;
    border-radius: 999px;
    padding: 7px 13px;
    font-weight: 700;
    font-size: 0.84rem;
    cursor: pointer;
    color: #3c4c60;
    white-space: nowrap;
}
.nx-wip-tab.is-active {
    background: rgba(236, 95, 28, 0.12);
    border-color: #ec5f1c;
    color: #b34513;
}
.nx-wip-group-label {
    flex: 0 0 auto;
    margin-left: 4px;
    padding: 0 2px 0 8px;
    color: #7a8899;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}
.nx-workshop-city h4 { margin: 12px 0 6px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: #5a6b7f; }
.nx-workshop-option { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid rgba(30, 42, 58, 0.1); border-radius: 12px; margin-bottom: 6px; cursor: pointer; }
.nx-workshop-option:has(input:checked) { border-color: #ec5f1c; background: rgba(236, 95, 28, 0.06); }
.nx-workshop-option small { display: block; color: #5a6b7f; }


/* Action Center refine — fair rows, chips, overflow */
.nx-kpi-card,
.nx-kpi-label,
.nx-kpi-value,
.nx-wip-tab,
.nx-rebalance-handler {
    min-width: 0;
}

.nx-kpi-label,
.nx-kpi-value,
.nx-rebalance-handler strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Recommended moves — full-width stack (do not reuse checkbox .nx-rebalance-proposal 22px grid) */
.nx-rebalance-section {
    gap: 8px;
}

.nx-rebalance-proposal-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #e7ebf0;
    border-radius: 10px;
    background: #fff;
    margin-bottom: 0;
    min-width: 0;
    cursor: default;
}

.nx-rebalance-move-line {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #1e2a3a;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.nx-rebalance-move-line strong {
    font-weight: 800;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

.nx-rebalance-decision {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.nx-rebalance-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.nx-rebalance-decision .nx-button-success.is-active {
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.28);
}

.nx-rebalance-decision .nx-button-secondary.is-active {
    background: #3c4c60;
    border-color: #3c4c60;
    color: #fff;
    box-shadow: none;
}

.nx-reason-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    flex: 1 1 200px;
    min-width: 0;
}

.nx-reason-chip {
    border: 1px solid rgba(30, 42, 58, 0.14);
    background: #f7fafc;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #3c4c60;
    cursor: pointer;
    white-space: nowrap;
}

.nx-reason-chip.is-active {
    background: rgba(236, 95, 28, 0.12);
    border-color: #ec5f1c;
    color: #b34513;
    box-shadow: 0 0 0 1px rgba(236, 95, 28, 0.2);
}

.nx-wip-group-label {
    align-self: center;
    margin: 0 4px 0 8px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5a6b7f;
}

.nx-action-tab.is-active:not(.nx-ac-tab-blue):not(.nx-ac-tab-orange):not(.nx-ac-tab-amber) {
    background: rgba(236, 95, 28, 0.12);
    border-color: #ec5f1c;
    color: #b34513;
}

/* Claim open — reverse-angle back chevron (left), never a right arrow */
.nx-back-button svg {
    transform: none;
}

/* Roomy claim tables may wrap long stacked cells — never mid-word
   break Role/Person metric columns (that produced "Ha-ndl-er"). */
.nx-table-roomy td {
    max-width: none;
    overflow-wrap: normal;
    word-break: normal;
}

.nx-table-roomy td .nx-cell-stack,
.nx-table-roomy td .nx-email-wrap {
    max-width: 18rem;
    overflow-wrap: anywhere;
}

.nx-handler-lane-head,
.nx-allocation-card,
.nx-kpi-ready-expand {
    min-width: 0;
}

/* === Manager WIP — full-width decision rows, locked list scroll === */
#nx-section-returned.is-active {
    padding: 14px 16px 0;
}

.nx-wip-toolbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    min-width: 0;
}

.nx-wip-count-hint {
    flex-shrink: 0;
    color: var(--nx-muted);
    font-size: 0.82rem;
    font-weight: 750;
    white-space: nowrap;
}

.nx-wip-cards {
    flex: 1 1 auto;
    min-height: 0;
    max-width: none;
    display: grid;
    align-content: start;
    gap: 10px;
    overflow-y: auto;
    scrollbar-width: thin;
    padding: 2px 2px 18px;
}

.nx-wip-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px 20px;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #ec5f1c;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    cursor: pointer;
    transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.nx-wip-card:hover,
.nx-wip-card:focus-visible {
    border-color: rgba(236, 95, 28, 0.4);
    box-shadow: 0 0 0 2px rgba(236, 95, 28, 0.1), 0 4px 14px rgba(15, 23, 42, 0.06);
    background: #fffdfb;
}

.nx-wip-card-body {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.nx-wip-card-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.nx-wip-card-top .nx-claim-serial {
    font-size: 1.02rem;
    font-weight: 850;
}

.nx-wip-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.nx-wip-type {
    color: #3c4c60;
    font-size: 0.88rem;
    font-weight: 650;
}

.nx-wip-card-meta .nx-status,
.nx-wip-card-meta .nx-badge {
    font-size: 0.82rem;
    font-weight: 800;
    padding: 4px 10px;
}

.nx-wip-detail {
    margin: 0;
    color: #516075;
    font-size: 0.86rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nx-wip-detail strong {
    color: #1e2a3a;
    font-weight: 750;
}

.nx-wip-review {
    flex-shrink: 0;
    min-width: 6.5rem;
    justify-content: center;
}

.nx-wip-card .nx-suggest-chip {
    font-size: 0.78rem;
    font-weight: 750;
    padding: 4px 10px;
}

@media (max-width: 720px) {
    .nx-wip-card {
        grid-template-columns: 1fr;
    }

    .nx-wip-review {
        width: 100%;
    }

    .nx-wip-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}

.nx-tab,
.nx-action-tab,
.nx-wip-tab,
.nx-kpi-child,
.nx-nav-item,
button.nx-flow-chip,
button.nx-flow-fraud,
.nx-allocation-card.is-clickable,
.nx-queue-card {
    cursor: pointer;
}

.nx-tab:hover {
    background: rgba(236, 95, 28, 0.08);
    color: #b34513;
}

.nx-kpi-child:hover {
    border-color: rgba(236, 95, 28, 0.4);
    background: #fffaf6;
}

.nx-fraud-calm-chip {
    display: inline-block;
    margin-top: 4px;
    color: var(--nx-muted);
    font-size: 0.82rem;
    font-weight: 650;
}

.nx-fraud-review-panel.nx-tone-green {
    border-color: #c6e7d0;
    border-left-color: #16a34a;
    background: linear-gradient(180deg, #f3fbf5 0%, #ffffff 58%);
}

.nx-fraud-review-panel.nx-tone-green .nx-fraud-review-score {
    border-color: #c6e7d0;
}

.nx-fraud-review-panel.nx-tone-green .nx-fraud-review-score strong,
.nx-fraud-review-panel.nx-tone-green .nx-fraud-review-fill {
    color: #15803d;
    background: #16a34a;
}

.nx-fraud-review-panel.nx-tone-green .nx-fraud-review-score strong {
    background: transparent;
}

.nx-fraud-review-panel.nx-tone-amber .nx-fraud-review-score strong {
    color: var(--nx-amber);
}

.nx-risk-card.nx-tone-green {
    border-top-color: #16a34a;
}

.nx-risk-card.nx-tone-green .nx-risk-number {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.nx-risk-card.nx-tone-amber {
    border-top-color: var(--nx-amber);
}

.nx-risk-card.nx-tone-amber .nx-risk-number {
    background: var(--nx-amber-soft, #fff4e5);
    color: var(--nx-amber);
}

.nx-risk-card.nx-tone-red {
    border-top-color: var(--nx-red);
}

.nx-risk-card.nx-tone-red .nx-risk-number {
    background: rgba(220, 38, 38, 0.1);
    color: var(--nx-red);
}

.nx-manager-review-strip {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
    gap: 14px;
    margin: 0 0 16px;
    padding: 16px 18px;
    border: 1px solid #dbe4ef;
    border-left: 5px solid #1268dc;
    border-radius: 12px;
    background: linear-gradient(180deg, #f5f9ff 0%, #ffffff 70%);
}

.nx-manager-review-main h2 {
    margin: 4px 0 8px;
    font-size: 1.2rem;
    font-weight: 850;
}

.nx-manager-review-main p {
    margin: 0 0 10px;
    color: var(--nx-text);
    line-height: 1.45;
}

.nx-manager-review-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.nx-manager-review-decision {
    padding: 12px 14px;
    border: 1px solid #e7ebf0;
    border-radius: 10px;
    background: #fff;
}

.nx-manager-review-decision > p {
    margin: 4px 0 10px;
    color: var(--nx-muted);
    font-size: 0.88rem;
}

.nx-decision-hint {
    margin: 0 0 10px;
    color: var(--nx-muted);
    font-size: 0.88rem;
    line-height: 1.4;
}

.nx-decision-secondary .nx-button {
    opacity: 0.95;
}

@media (max-width: 860px) {
    .nx-manager-review-strip {
        grid-template-columns: 1fr;
    }

    .nx-action-tabs.nx-action-segment {
        grid-template-columns: 1fr;
    }

    .nx-action-segment .nx-action-tab {
        border-right: 0;
        border-bottom: 1px solid #d5deea;
        justify-content: space-between;
    }

    .nx-action-segment .nx-action-tab:last-child {
        border-bottom: 0;
    }

    .nx-action-panel-bar {
        flex-wrap: wrap;
    }
}

/* ============================================================
   2026-07-24 — Action Center locked viewport + Fair Allocation
   Stage hosts exactly one active panel; others are forced off.
   ============================================================ */
.nx-content[data-screen="manager"] {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--nx-topbar) - 84px);
    min-height: 0;
    overflow: hidden;
}

.nx-content[data-screen="manager"] > .nx-page-header,
.nx-content[data-screen="manager"] > .nx-action-tabs {
    flex: 0 0 auto;
}

.nx-ac-stage {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.nx-ac-stage > .nx-action-panel {
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    margin: 0;
}

/* Only the active panel is painted — never stack WIP under Incomplete. */
.nx-ac-stage > .nx-action-panel:not(.is-active),
.nx-ac-stage > .nx-action-panel[hidden] {
    display: none !important;
}

.nx-ac-stage > .nx-action-panel.is-active {
    display: flex !important;
}

/* New Applications — pool + handler lanes scroll independently.
   Page chrome stays locked; only the claim / handler lists scroll. */
#nx-section-allocate .nx-action-panel-bar {
    flex: 0 0 auto;
}

#nx-section-allocate .nx-allocation-board {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.nx-allocation-pool,
.nx-handler-lanes {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.nx-allocation-pool .nx-board-heading {
    flex: 0 0 auto;
}

.nx-allocation-pool .nx-allocation-cards,
.nx-handler-lanes {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

/* Handler lanes section itself is the scroll host (lanes are its children). */
section.nx-handler-lanes {
    overflow-y: auto;
}

/* WIP — filter toolbar stays put, the claim list scrolls. */
#nx-section-returned .nx-wip-toolbar {
    flex: 0 0 auto;
}

#nx-section-returned .nx-wip-cards {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
}

/* Incomplete — Drafts + Awaiting Customer scroll as one region. */
#nx-section-incomplete .nx-incomplete-stack {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
}

@media (max-width: 900px) {
    /* Small screens keep the simpler, naturally scrolling page —
       a locked two-pane board is not usable at that width anyway. */
    .nx-content[data-screen="manager"] {
        height: auto;
        overflow: visible;
    }

    .nx-ac-stage {
        overflow: visible;
        height: auto;
    }

    .nx-ac-stage > .nx-action-panel.is-active {
        overflow: visible;
    }

    #nx-section-allocate .nx-allocation-board,
    #nx-section-returned .nx-wip-cards,
    #nx-section-incomplete .nx-incomplete-stack,
    .nx-allocation-pool,
    .nx-handler-lanes {
        overflow: visible;
    }

    .nx-fair-moves-list {
        overflow: visible;
    }
}

@media print {
    .nx-content[data-screen="manager"],
    .nx-content[data-screen="manager"] > .nx-action-panel,
    .nx-allocation-pool,
    .nx-handler-lanes,
    .nx-fair-moves-list {
        height: auto !important;
        overflow: visible !important;
    }
}

/* Fair Allocation Review — balanced handler grid + redesigned moves. */
.nx-fair-panel {
    padding: 20px 22px 0;
}

.nx-fair-header {
    flex: 0 0 auto;
    margin-bottom: 0;
    padding-bottom: 16px;
}

.nx-fair-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.nx-rebalance-handlers {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
}

.nx-rebalance-handler {
    min-height: 76px;
}

.nx-rebalance-handler-count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.nx-rebalance-handler-count strong {
    font-size: 1.3rem;
    font-weight: 850;
    line-height: 1.1;
    color: var(--nx-ink);
}

.nx-rebalance-handler-count strong.nx-number-negative {
    color: var(--nx-red);
}

.nx-rebalance-handler-of {
    font-size: 0.72rem;
}

.nx-fair-moves {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 16px;
    border-top: 1px solid var(--nx-line);
}

.nx-fair-moves > .nx-card-header {
    flex: 0 0 auto;
}

.nx-fair-moves-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    display: grid;
    align-content: start;
    gap: 10px;
    padding-bottom: 4px;
}

.nx-move-card {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 14px 16px;
    border: 1px solid #e7ebf0;
    border-left: 3px solid var(--nx-violet);
    border-radius: 10px;
    background: #fff;
    cursor: default;
    transition: border-color 160ms ease, opacity 160ms ease;
}

.nx-move-card.is-rejected {
    border-left-color: var(--nx-line);
    opacity: 0.6;
}

.nx-move-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    min-width: 0;
    flex: 1 1 280px;
}

.nx-move-label {
    color: var(--nx-muted);
    font-size: 0.82rem;
    font-weight: 650;
}

.nx-move-claim {
    font-weight: 800;
    color: var(--nx-ink);
}

.nx-move-path {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f7fafc;
    font-size: 0.84rem;
    font-weight: 700;
    color: #3c4c60;
}

.nx-move-handler {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nx-move-handler-to {
    color: var(--nx-ink);
}

.nx-move-arrow {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    color: var(--nx-violet);
}

.nx-reason-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 1 1 260px;
    min-width: 0;
}

.nx-reason-label {
    flex-shrink: 0;
    color: var(--nx-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Reason chips read as a distinct tag group, not a third decision
   button — violet ties them to the Fair Allocation review context
   instead of borrowing the WIP tab's orange accent. */
.nx-fair-moves .nx-reason-chip.is-active {
    background: var(--nx-violet-soft);
    border-color: var(--nx-violet);
    color: #5b21b6;
    box-shadow: none;
}

.nx-fair-footer {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 -22px;
    padding: 14px 22px;
    border-top: 1px solid var(--nx-line);
    background: #fff;
    box-shadow: 0 -6px 16px rgba(20, 32, 51, 0.05);
}

.nx-fair-footer-hint {
    color: var(--nx-muted);
    font-size: 0.85rem;
    font-weight: 650;
}

.nx-fair-apply-button {
    gap: 10px;
}

.nx-fair-apply-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
    font-size: 0.78rem;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
}

.nx-fair-apply-button.is-disabled,
.nx-fair-apply-button[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

.nx-fair-nav-button {
    position: relative;
}

.nx-button-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.3rem;
    height: 1.3rem;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.14);
    color: var(--nx-violet);
    font-size: 0.72rem;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
}

.nx-button-primary .nx-button-count {
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
}

@media (max-width: 640px) {
    .nx-fair-panel {
        padding: 16px 16px 0;
    }

    .nx-fair-footer {
        flex-direction: column;
        align-items: stretch;
        margin: 0 -16px;
        padding: 12px 16px;
    }

    .nx-fair-apply-button {
        justify-content: center;
    }

    .nx-move-card {
        flex-direction: column;
        align-items: stretch;
    }

    .nx-reason-group {
        flex-basis: 100%;
    }
}

/* ============================================================
   2026-07-24 — Reports / Performance table polish
   Stop mid-word wrapping; enlarge In SLA / Late / Open / Settled
   and footer metric figures (Data quality, AI Fraud, Aging).
   ============================================================ */
.nx-reports-table,
.nx-perf-table {
    table-layout: auto;
    min-width: 960px;
    width: 100%;
}

.nx-reports-table th,
.nx-reports-table td,
.nx-perf-table th,
.nx-perf-table td {
    white-space: nowrap;
    vertical-align: middle;
    overflow-wrap: normal;
    word-break: normal;
}

.nx-reports-table td:first-child,
.nx-perf-table td:first-child {
    min-width: 11rem;
    max-width: 16rem;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
}

.nx-reports-table td:nth-child(2),
.nx-perf-table td:nth-child(2) {
    min-width: 7rem;
}

.nx-reports-table .nx-number-positive,
.nx-reports-table .nx-number-negative,
.nx-reports-table .nx-number-active,
.nx-perf-table .nx-number-positive,
.nx-perf-table .nx-number-negative,
.nx-perf-table .nx-number-active,
.nx-product-table .nx-number-positive,
.nx-product-table .nx-number-negative,
.nx-product-table .nx-number-active,
.nx-product-table .nx-number-total {
    font-size: 1.18rem;
    font-weight: 850;
}

.nx-product-table td:not(:first-child) {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.nx-product-table .nx-number-total {
    color: var(--nx-ink);
}

.nx-bar-row strong {
    font-size: 1.15rem;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
    min-width: 2.5rem;
    text-align: right;
}

.nx-reports-footer .nx-key-figure,
.nx-reports-footer .nx-number-positive {
    font-size: 2.05rem;
    font-weight: 850;
    line-height: 1.1;
}

.nx-confusion-grid .nx-summary-tile {
    padding: 18px 16px;
}

.nx-confusion-grid .nx-summary-tile strong {
    margin-top: 8px;
    font-size: 1.9rem;
    font-weight: 850;
    line-height: 1.05;
}

.nx-confusion-grid .nx-summary-tile span {
    font-size: 0.8rem;
    line-height: 1.3;
}

.nx-reports-footer .nx-badge.nx-tone-blue {
    font-size: 0.82rem;
    padding: 5px 10px;
}

/* AI Fraud Analysis — title / range / meta chips stay leveled */
.nx-fraud-analysis-card > .nx-card-header.nx-fraud-analysis-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
}

.nx-fraud-analysis-title {
    min-width: 0;
    flex: 1 1 220px;
}

.nx-fraud-analysis-range {
    margin: 4px 0 0 !important;
    color: var(--nx-muted);
    font-size: 0.84rem;
    font-weight: 600;
}

.nx-fraud-analysis-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 1 auto;
    max-width: 100%;
}

.nx-fraud-meta-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid #d7e0ea;
    border-radius: 999px;
    background: #f5f8fb;
    color: #3c4c60;
    font-size: 0.78rem;
    font-weight: 750;
    white-space: nowrap;
}

.nx-fraud-meta-chip.nx-tone-blue {
    border-color: rgba(18, 104, 220, 0.28);
    background: rgba(18, 104, 220, 0.08);
    color: #0b4ea8;
}

#nx-reports-people > .nx-card-header {
    padding-bottom: 10px;
}

#nx-reports-people .nx-wip-tabs {
    margin: 0 16px 12px;
}

/* ===== 2026-07-24 tri-audit wave 2: overflow, truncation, contrast ===== */

/* KPI and tile labels wrap instead of clipping ("AWAITING MANAGER RE..."). */
.nx-kpi-label,
.nx-summary-tile span,
.nx-card .nx-eyebrow {
    white-space: normal;
    overflow-wrap: anywhere;
}

/* WIP status chips wrap to a second row — nothing hides off-screen. */
.nx-wip-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
}

/* Scrollable tables show an edge shade while columns are cut off. */
.nx-table-wrap {
    background:
        linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)),
        linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)) 100% 0,
        radial-gradient(farthest-side at 0 50%, rgba(30, 42, 58, 0.22), rgba(0, 0, 0, 0)),
        radial-gradient(farthest-side at 100% 50%, rgba(30, 42, 58, 0.22), rgba(0, 0, 0, 0)) 100% 0;
    background-repeat: no-repeat;
    background-size: 42px 100%, 42px 100%, 15px 100%, 15px 100%;
    background-attachment: local, local, scroll, scroll;
}

/* Drafts to Send: the send action stays pinned on-screen. */
.nx-ac-draft-table th:last-child,
.nx-ac-draft-table td:last-child {
    position: sticky;
    right: 0;
    background: #fff;
    box-shadow: -10px 0 10px -10px rgba(30, 42, 58, 0.35);
}

/* Label/value pairs never overlap in the narrow fraud rail. */
.nx-detail-row > span {
    overflow-wrap: anywhere;
}
.nx-fraud-intel-rail .nx-detail-row {
    grid-template-columns: minmax(112px, 0.5fr) minmax(0, 1fr);
}

/* Status/badge text darkened to reach 4.5:1 on the soft tints. */
.nx-badge,
.nx-status,
.nx-chip {
    color: color-mix(in srgb, var(--tone, #516075) 62%, #23303f);
}

/* Primary buttons: slightly darker fill so white text passes 4.5:1. */
.nx-button-primary {
    border-color: color-mix(in srgb, var(--nx-orange) 82%, #000);
    background: color-mix(in srgb, var(--nx-orange) 82%, #000);
}

/* Narrow phones: single-column grids, scrollable journey, no overflow. */
@media (max-width: 380px) {
    .nx-kpi-grid,
    .nx-kpi-grid-3,
    .nx-grid-2,
    .nx-grid-3 {
        grid-template-columns: 1fr;
    }
    .nx-workflow-strip {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .nx-content {
        min-width: 0;
    }
}

/* ============================================================
   Performance Management — clean date bar, no title triple-up
   ============================================================ */
.nx-perf-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
    flex-wrap: wrap;
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--nx-shadow-small);
}

.nx-perf-toolbar-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.nx-perf-toolbar-label .nx-eyebrow {
    margin: 0 !important;
}

.nx-perf-toolbar-label strong {
    color: var(--nx-ink);
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.25;
}

.nx-perf-dates {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.nx-perf-dates .nx-field {
    margin: 0;
    min-width: 10.5rem;
}

.nx-perf-dates .nx-field label {
    display: block;
    margin-bottom: 5px;
    color: var(--nx-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.nx-perf-dates .nx-field input[type="date"] {
    min-height: 42px;
    min-width: 10.5rem;
}

.nx-perf-dates .nx-button {
    min-height: 42px;
    align-self: flex-end;
}

.nx-perf-card {
    margin-top: 4px;
}

.nx-content[data-screen="day_close"] .nx-kpi-grid {
    margin-bottom: 18px;
}

@media (max-width: 720px) {
    .nx-perf-toolbar {
        align-items: stretch;
    }

    .nx-perf-dates {
        width: 100%;
    }

    .nx-perf-dates .nx-field {
        flex: 1 1 140px;
    }

    .nx-perf-dates .nx-button {
        width: 100%;
    }
}

/* ==========================================================================
   Sidebar — dark rail (v2)
   Appended, not edited in place: `.nx-brand strong` / `.nx-brand span` are
   SHARED with the sign-in page (`.nx-auth-brand`). Restyling them at source
   would repaint the login. Everything below is scoped under `.nx-sidebar`,
   so the auth screen is untouched and reverting means deleting this block.
   ========================================================================== */

.nx-sidebar {
    --nx-rail-ground: #0b1220;
    --nx-rail-ground-2: #111c2e;
    --nx-rail-hairline: rgba(148, 163, 184, 0.12);
    --nx-rail-idle: #93a3b8;
    --nx-rail-live: #f8fafc;
    --nx-rail-heading: #5a6b82;
    --nx-rail-ease: cubic-bezier(0.32, 0.72, 0, 1);
    background: linear-gradient(180deg, var(--nx-rail-ground) 0%, var(--nx-rail-ground-2) 100%);
    border-right: 1px solid rgba(0, 0, 0, 0.5);
    box-shadow: 1px 0 0 rgba(255, 255, 255, 0.04) inset, 12px 0 32px rgba(8, 14, 24, 0.10);
}

/* Brand lockup ---------------------------------------------------------- */

.nx-sidebar .nx-brand {
    gap: 13px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--nx-rail-hairline);
    background: rgba(255, 255, 255, 0.02);
}

.nx-sidebar .nx-brand img {
    padding: 5px;
    border-radius: 12px;
    background: #fff;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.10),
        0 8px 20px rgba(0, 0, 0, 0.38);
}

.nx-sidebar .nx-brand strong {
    color: var(--nx-rail-live);
    font-size: 1.02rem;
    font-weight: 750;
    letter-spacing: -0.012em;
}

/* The tagline is the one warm note in the header. */
.nx-sidebar .nx-brand span,
.nx-sidebar .nx-brand-tagline {
    color: #f08a4f;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* Nav shell ------------------------------------------------------------- */

.nx-sidebar .nx-nav {
    padding: 16px 12px 28px;
    scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
}

.nx-sidebar .nx-nav::-webkit-scrollbar { width: 8px; }
.nx-sidebar .nx-nav::-webkit-scrollbar-track { background: transparent; }
.nx-sidebar .nx-nav::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.26);
    background-clip: content-box;
}
.nx-sidebar .nx-nav::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.42); background-clip: content-box; }

.nx-sidebar .nx-nav-heading,
.nx-sidebar .nx-nav-heading.is-secondary {
    margin: 0 10px 7px;
    color: var(--nx-rail-heading);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.13em;
}

/* The secondary group is separated by a hairline, never by dimming the
   whole block — opacity on a container also dims the active state. */
.nx-sidebar .nx-nav-section.is-primary {
    margin-bottom: 4px;
    padding-bottom: 6px;
}

.nx-sidebar .nx-nav-section.is-secondary {
    margin-top: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--nx-rail-hairline);
    opacity: 1;
}

/* Keep WORK labels on one line so the last item (Performance) never
   stacks into the INTAKE hairline. */
.nx-sidebar .nx-nav-item > span {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Items ----------------------------------------------------------------- */

.nx-sidebar .nx-nav-item,
.nx-sidebar .nx-nav-section.is-secondary .nx-nav-item,
.nx-sidebar .nx-nav-item.is-secondary {
    min-height: 42px;
    margin: 1px 0;
    padding: 9px 12px 9px 14px;
    border-radius: 10px;
    color: var(--nx-rail-idle);
    font-weight: 550;
    text-decoration: none;
    transition:
        background-color 220ms var(--nx-rail-ease),
        color 220ms var(--nx-rail-ease);
}

.nx-sidebar .nx-nav-item:hover {
    background: rgba(148, 163, 184, 0.10);
    color: var(--nx-rail-live);
}

.nx-sidebar .nx-nav-item .nx-nav-icon {
    color: #7c8da5;
    transition: color 220ms var(--nx-rail-ease);
}

.nx-sidebar .nx-nav-item:hover .nx-nav-icon { color: #c7d3e2; }

/* Active: a left rail, not a right-hand dot. The rail reads as "you are
   here" at a glance and survives long labels wrapping. */
.nx-sidebar .nx-nav-item.is-active,
.nx-sidebar .nx-nav-section.is-secondary .nx-nav-item.is-active,
.nx-sidebar .nx-nav-item.is-secondary.is-active {
    padding-right: 12px;
    background: linear-gradient(
        90deg,
        rgba(236, 95, 28, 0.20) 0%,
        rgba(236, 95, 28, 0.05) 62%,
        rgba(236, 95, 28, 0) 100%
    );
    color: #fff;
    font-weight: 700;
}

/* Neutralise the inherited right-hand dot. */
.nx-sidebar .nx-nav-item.is-active::after {
    content: none;
}

.nx-sidebar .nx-nav-item.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--nx-orange);
    box-shadow: 0 0 12px rgba(236, 95, 28, 0.65);
}

.nx-sidebar .nx-nav-item.is-active .nx-nav-icon {
    color: #ff8a4c;
}

/* Keyboard users get the same clarity as mouse users. */
.nx-sidebar .nx-nav-item:focus-visible {
    outline: 2px solid var(--nx-orange);
    outline-offset: -2px;
    color: var(--nx-rail-live);
}

.nx-sidebar .nx-nav-item:active { transform: none; }

@media (prefers-reduced-motion: reduce) {
    .nx-sidebar .nx-nav-item,
    .nx-sidebar .nx-nav-item .nx-nav-icon { transition: none; }
}

/* ---------------------------------------------------------- claimant picker
   A claim needs a consenting claimant. When the reader cannot resolve one,
   the reviewer gets ranked candidates WITH the reason each was proposed, and
   can always search instead. Nothing is ever attached automatically. */
.nx-claimant-picker {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--nx-line);
}

.nx-claimant-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}

.nx-claimant-suggestions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nx-claimant-suggestion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    background: var(--nx-surface, #fff);
}

.nx-claimant-suggestion.is-blocked { opacity: 0.72; }

.nx-claimant-suggestion-main {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.nx-claimant-suggestion-main strong { font-size: 13px; }
.nx-claimant-suggestion-main small { font-size: 11px; }

.nx-claimant-suggestion-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.nx-claimant-picked {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid var(--nx-line);
    border-radius: 8px;
    background: rgba(18, 104, 220, 0.05);
}

.nx-claimant-picked > div:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.nx-claimant-picked-actions { display: flex; gap: 6px; flex: 0 0 auto; }

.nx-claimant-results {
    max-height: 340px;
    overflow-y: auto;
    margin-top: 8px;
}

/* Evidence document name reads as the control it is. */
.nx-doc-open-link {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 700;
    color: var(--nx-primary, #1268dc);
    text-align: left;
    cursor: pointer;
}

.nx-doc-open-link:hover { text-decoration: underline; }

.nx-claimdoc-viewer {
    min-height: min(70vh, 620px);
    margin-top: 4px;
}
