/* Nuitée Product UI — component styles. Every value comes from tokens.css (var(--…)). Prefix: nx- */
.nx, .nx *, .nx *::before, .nx *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-body); font-size: 14px; line-height: 20px; color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; }
.nx-num { font-variant-numeric: tabular-nums; }
.nx-mono { font-family: var(--font-mono); }
.nx-muted { color: var(--muted); }
.nx-stack { display: flex; flex-direction: column; gap: var(--space-3); }
.nx-row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.nx-pad { padding: var(--space-4); }
.nx-icon { flex: none; display: block; }
:where(.nx) :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .nx * { transition: none !important; animation: none !important; } }

/* ---------- Eyebrow & product label ---------- */
.nx-eyebrow { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--muted); text-transform: uppercase; }
.nx-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: currentColor; }
.nx-eyebrow--accent::before { background: var(--accent); }
.nx-eyebrow--plain::before { display: none; }
.nx-on-chrome .nx-eyebrow { color: var(--ink-2); }
.nx-product { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em; color: var(--ink); }
.nx-product i { width: 10px; height: 10px; border-radius: 3px; background: var(--connect); }
.nx-product--cloud i { background: var(--cloud); }

/* ---------- Buttons ---------- */
.nx-btn { font: inherit; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--control-md); padding: 0 var(--space-4); border-radius: var(--radius-pill); border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background-color .2s cubic-bezier(.22,1,.36,1), box-shadow .2s cubic-bezier(.22,1,.36,1); }
.nx-btn--sm { height: var(--control-sm); padding: 0 var(--space-3); font-size: 13px; }
.nx-btn--lg { height: var(--control-lg); padding: 0 20px; }
.nx-btn--primary { background: var(--ink); color: var(--on-ink); }
.nx-btn--primary:hover { box-shadow: inset 0 0 0 999px rgba(255,255,255,.1); }
.nx-btn--secondary { background: var(--canvas); color: var(--ink); border-color: var(--line-2); }
.nx-btn--secondary:hover { background: var(--hover); }
.nx-btn--ghost { background: transparent; color: var(--ink-2); }
.nx-btn--ghost:hover { background: var(--hover); color: var(--ink); }
.nx-btn--accent { background: var(--accent); color: var(--on-accent); }
.nx-btn--accent:hover, .nx-btn--danger:hover { box-shadow: inset 0 0 0 999px rgba(0,0,0,.08); }
.nx-btn--danger { background: var(--danger); color: var(--on-danger); }
.nx-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.nx-btn--icon { width: var(--control-md); padding: 0; }
.nx-btn--icon.nx-btn--sm { width: var(--control-sm); }
.nx-link { display: inline-flex; align-items: center; gap: 4px; color: var(--link); font-weight: 500; text-decoration: none; cursor: pointer; background: none; border: 0; padding: 0; font: inherit; }
.nx-link .nx-icon { transition: transform .25s cubic-bezier(.22,1,.36,1); }
.nx-link:hover .nx-icon { transform: translateX(3px); }

/* ---------- Tags & status ---------- */
.nx-tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 var(--space-2); border-radius: var(--radius-sm); background: var(--panel); color: var(--ink-2); text-transform: uppercase; white-space: nowrap; }
.nx-tag--connect { background: var(--connect-wash); color: var(--connect); text-transform: none; }
.nx-tag--cloud { background: var(--cloud-wash); color: var(--cloud); text-transform: none; }
.nx-tag--success { background: var(--success-bg); color: var(--success); }
.nx-tag--warning { background: var(--warning-bg); color: var(--warning); }
.nx-tag--danger { background: var(--danger-bg); color: var(--danger); }
.nx-tag--new { background: var(--ink); color: var(--on-ink); }
.nx-status { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 var(--space-2) 0 6px; border-radius: var(--radius-sm); font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; background: var(--panel); color: var(--ink-2); }
.nx-status::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--muted); }
.nx-status--success { background: var(--success-bg); color: var(--success); } .nx-status--success::before { background: var(--success-mark); }
.nx-status--warning { background: var(--warning-bg); color: var(--warning); } .nx-status--warning::before { background: var(--warning-mark); }
.nx-status--danger { background: var(--danger-bg); color: var(--danger); } .nx-status--danger::before { background: var(--danger-mark); }
.nx-status--accent { background: var(--accent-wash); color: var(--accent); } .nx-status--accent::before { background: var(--accent); }

/* ---------- Inputs ---------- */
.nx-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nx-field__label { color: var(--ink-2); }
.nx-field__hint { color: var(--muted); }
.nx-field__err { color: var(--danger); }
.nx-input { font: inherit; width: 100%; height: var(--control-md); padding: 0 var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--line-2); background: var(--canvas); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.nx-input::placeholder { color: var(--faint); }
.nx-input:hover { border-color: var(--control-edge); }
.nx-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.nx-input--lg { height: var(--control-lg); }
.nx-field.is-invalid .nx-input { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.nx-select { appearance: none; padding-right: 32px; background-image: none; cursor: pointer; }
.nx-select-wrap { position: relative; }
.nx-select-wrap .nx-icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.nx-search { position: relative; display: flex; align-items: center; min-width: 0; }
.nx-search > .nx-icon { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.nx-search .nx-input { padding-left: 34px; padding-right: 36px; }
.nx-kbd { position: absolute; right: 8px; font-family: var(--font-mono); font-size: 11px; line-height: 18px; padding: 0 6px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--muted); }
.nx-check { display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; }
.nx-check input { appearance: none; margin: 0; width: 16px; height: 16px; border-radius: var(--radius-xs); border: 1px solid var(--control-edge); background: var(--canvas); display: grid; place-content: center; cursor: pointer; flex: none; }
.nx-check input:checked, .nx-check input:indeterminate { background: var(--accent); border-color: var(--accent); }
.nx-check input:checked::after { content: ""; width: 8px; height: 4px; border: 2px solid var(--on-accent); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.nx-check input:indeterminate::after { content: ""; width: 8px; height: 2px; background: var(--on-accent); }
.nx-check input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- Filter chips & segmented ---------- */
.nx-chip { font: inherit; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; height: var(--control-sm); padding: 0 10px; border-radius: var(--radius-pill); border: 1px solid var(--line-2); background: var(--canvas); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.nx-chip:hover { background: var(--hover); }
.nx-chip b { font-weight: 500; color: var(--ink); }
.nx-chip--active { background: var(--accent-wash); border-color: var(--accent-tint); color: var(--ink-2); }
.nx-chip--add { border-style: dashed; color: var(--muted); }
.nx-chip__x { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: -4px; border-radius: 50%; color: var(--muted); }
.nx-chip__x:hover { background: var(--hover); color: var(--ink); }
.nx-seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: var(--radius-pill); background: var(--panel); }
.nx-seg button { font: inherit; font-size: 13px; height: 24px; padding: 0 10px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink-2); cursor: pointer; }
.nx-seg button[aria-pressed="true"] { background: var(--canvas); color: var(--ink); font-weight: 500; box-shadow: var(--shadow-s); }

/* ---------- Tabs ---------- */
.nx-tabs { display: flex; gap: var(--space-6); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.nx-tab { font: inherit; position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; white-space: nowrap; }
.nx-tab:hover { color: var(--ink); }
.nx-tab[aria-selected="true"] { color: var(--ink); font-weight: 500; }
.nx-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); border-radius: 2px 2px 0 0; }
.nx-tab__count { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

/* ---------- App shell & sidebar ---------- */
.nx-shell { display: grid; grid-template-columns: var(--sidebar-width) 1fr; min-height: 100vh; background: var(--canvas); }
.nx-side { background: var(--chrome); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-3); min-height: 100%; }
.nx-side__brand { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); height: 40px; padding: 0 4px 0 var(--space-2); border-radius: var(--radius-md); }
.nx-plogo { display: inline-flex; align-items: center; gap: 0.4em; font-family: var(--font-display); font-weight: 500; letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.nx-plogo__mark { display: block; width: auto; flex: none; }
.nx-plogo__tile { display: block; flex: none; border-radius: 22%; background: var(--cloud); }
.nx-nuitee { display: block; width: auto; }
.nx-plogo--sub { gap: 0.45em; }
.nx-plogo__stack { display: flex; flex-direction: column; gap: 3px; }
.nx-plogo__sub { font-family: var(--font-body); font-size: 11px; line-height: 12px; font-weight: 400; letter-spacing: 0; color: var(--ink-2); }
.nx-nav > span:not([class]) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nx-nav__end { margin-left: auto; display: inline-flex; align-items: center; }
.nx-nav__chev { display: inline-flex; color: var(--ink-2); transition: transform .2s cubic-bezier(.22,1,.36,1); }
.nx-nav__chev.is-open { transform: rotate(180deg); }
.nx-nav__end + .nx-nav__chev { margin-left: 6px; }
[data-theme$="dark"] .nx-nuitee { filter: brightness(0) invert(1); }
.nx-side__switch { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: var(--radius-md); border: 0; background: transparent; cursor: pointer; color: var(--ink-2); }
.nx-side__switch:hover { background: var(--hover); color: var(--ink); }
.nx-side__group { display: flex; flex-direction: column; gap: 1px; }
.nx-side__label { padding: 0 var(--space-2) 6px; }
.nx-nav { font: inherit; display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 var(--space-2); border: 0; border-radius: var(--radius-md); background: transparent; color: var(--ink-2); text-align: left; cursor: pointer; text-decoration: none; }
.nx-nav:hover { background: var(--hover); color: var(--ink); }
.nx-nav[aria-current="page"] { background: var(--panel); color: var(--ink); font-weight: 500; }
.nx-nav[aria-current="page"] .nx-icon { color: var(--accent); }
.nx-nav .nx-icon--mark { color: var(--ink); width: 15px; height: 15px; margin: 0 0.5px; }
.nx-nav[aria-current="page"] .nx-icon--mark { color: var(--accent); }
.nx-nav--child { padding-left: 34px; height: 30px; }
.nx-nav__count { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); }
.nx-side__foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: var(--space-4) var(--space-2) var(--space-2); border-top: 1px solid var(--line); }
.nx-avatar { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--panel); color: var(--ink-2); font-size: 11px; font-weight: 500; }
.nx-avatar--sq { border-radius: var(--radius-md); }
.nx-main { min-width: 0; display: flex; flex-direction: column; }
.nx-topbar { height: var(--topbar-height); display: flex; align-items: center; gap: var(--space-3); padding: 0 var(--space-8); border-bottom: 1px solid var(--line); }
.nx-topbar .nx-search { flex: 1; max-width: 480px; }
.nx-content { padding: var(--space-6) var(--space-8) var(--space-10); display: flex; flex-direction: column; gap: var(--space-6); }

/* ---------- Page header ---------- */
.nx-ph { display: flex; flex-direction: column; gap: var(--space-4); }
.nx-ph__top { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.nx-ph__crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); margin-bottom: 6px; }
.nx-ph__crumbs a { color: inherit; text-decoration: none; } .nx-ph__crumbs a:hover { color: var(--ink); }
.nx-ph h1 { margin: 0; color: var(--ink); }
.nx-ph__count { color: var(--muted); font-weight: 400; margin-left: 8px; }
.nx-ph__actions { display: flex; gap: var(--space-2); }

/* ---------- Toolbar ---------- */
.nx-toolbar { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.nx-toolbar .nx-search { width: 320px; max-width: 100%; }
.nx-toolbar__spacer { flex: 1; }

/* ---------- Cards & KPIs ---------- */
.nx-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); min-width: 0; }
.nx-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-4) 0; }
.nx-card__head h3 { margin: 0; }
.nx-card__body { padding: var(--space-4); }
.nx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); }
.nx-kpi { padding: var(--space-4); display: flex; flex-direction: column; gap: 6px; }
.nx-kpi__label { color: var(--muted); display: flex; align-items: center; justify-content: space-between; }
.nx-kpi__value { color: var(--ink); font-variant-numeric: tabular-nums; font-family: var(--font-display); }
.nx-kpi__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.nx-delta { white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; font-size: 12px; line-height: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.nx-delta--up { color: var(--success); } .nx-delta--down { color: var(--danger); } .nx-delta--flat { color: var(--muted); }
.nx-delta span { color: var(--muted); font-weight: 400; margin-left: 4px; }
.nx-spark { display: block; }
.nx-spark path { fill: none; stroke: var(--chart-1); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.nx-spark path.prev { stroke: var(--chart-neutral); stroke-dasharray: 2 3; }

/* ---------- Charts ---------- */
.nx-chart { display: block; width: 100%; height: auto; overflow: visible; }
.nx-chart .grid { stroke: var(--chart-grid); stroke-width: 1; }
.nx-chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.nx-chart .s1 { fill: var(--chart-1); } .nx-chart .s2 { fill: var(--chart-2); } .nx-chart .s3 { fill: var(--chart-3); } .nx-chart .sn { fill: var(--chart-neutral); }
.nx-chart .l1 { fill: none; stroke: var(--chart-1); stroke-width: 2; stroke-linejoin: round; }
.nx-chart .ln { fill: none; stroke: var(--chart-neutral); stroke-width: 1.5; stroke-dasharray: 3 4; }
.nx-legend { display: flex; gap: var(--space-4); flex-wrap: wrap; color: var(--ink-2); font-size: 12px; }
.nx-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.nx-meter { display: flex; height: 8px; border-radius: 2px; overflow: hidden; gap: 2px; }
.nx-meter > span { display: block; height: 100%; }

/* ---------- Table ---------- */
.nx-table-wrap { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.nx-table-scroll { overflow-x: auto; }
.nx-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.nx-table th { height: 36px; padding: 0 var(--space-3); text-align: left; color: var(--muted); font-size: 12px; line-height: 16px; font-weight: 500; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.nx-table th button { font: inherit; color: inherit; background: none; border: 0; padding: 0; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.nx-table th button:hover, .nx-table th[aria-sort] button { color: var(--ink); }
.nx-table td { height: var(--row-height); padding: 0 var(--space-3); border-bottom: 1px solid var(--line); vertical-align: middle; }
.nx-table--compact td { height: var(--row-height-compact); }
.nx-table tbody tr:last-child td { border-bottom: 0; }
.nx-table tbody tr:hover td { background: var(--hover); }
.nx-table tr.is-selected td { background: var(--accent-wash); }
.nx-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.nx-table .is-check { width: 40px; padding-right: 0; }
.nx-table .is-actions { width: 48px; text-align: right; }
.nx-table tr.nx-group td { height: 32px; background: var(--chrome); color: var(--ink-2); font-size: 12px; font-weight: 500; }
.nx-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nx-cell__text { display: flex; flex-direction: column; min-width: 0; }
.nx-cell__primary { color: var(--ink); font-size: 14px; line-height: 20px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-cell__secondary { color: var(--muted); font-size: 12px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-cell__mark { flex: none; width: 28px; height: 28px; border-radius: var(--radius-md); display: grid; place-items: center; background: var(--panel); color: var(--ink-2); }
.nx-cell__mark--accent { background: var(--accent-wash); color: var(--accent); }
.nx-table-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.nx-selbar { display: flex; align-items: center; gap: var(--space-3); height: 44px; padding: 0 6px 0 var(--space-4); border-radius: var(--radius-pill); background: var(--dark); color: var(--on-dark); box-shadow: var(--shadow-m); width: max-content; max-width: 100%; }
.nx-selbar__count { font-variant-numeric: tabular-nums; font-weight: 500; }
.nx-selbar .nx-btn { height: 32px; background: transparent; color: var(--on-dark); }
.nx-selbar .nx-btn:hover { background: rgba(247,246,245,.12); }
.nx-selbar .nx-sep { width: 1px; height: 20px; background: rgba(247,246,245,.18); }

/* ---------- Promo card & stat tile ---------- */
.nx-promo { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.nx-promo__body { padding: var(--space-8); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.nx-promo__title { margin: 4px 0 0; color: var(--ink); }
.nx-promo__text { margin: 0; color: var(--ink-2); max-width: 46ch; text-wrap: pretty; }
.nx-promo__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-2); }
.nx-promo__aside { background: var(--accent-wash); padding: var(--space-6); display: flex; align-items: center; justify-content: center; min-width: 0; }
.nx-stat { display: flex; flex-direction: column; gap: 6px; padding: 14px var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); min-width: 0; }
.nx-stat .nx-eyebrow { color: var(--ink-2); }
.nx-stat__value { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--font-display); font-size: 22px; line-height: 28px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.nx-stat__value small { font-family: var(--font-body); font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--ink-2); }
.nx-stat--text .nx-stat__value { font-family: var(--font-body); font-size: 14px; line-height: 28px; letter-spacing: 0; }
.nx-stat__dot { width: 8px; height: 8px; border-radius: 2px; align-self: center; background: var(--muted); }
.nx-stat__dot--success { background: var(--success-mark); } .nx-stat__dot--warning { background: var(--warning-mark); } .nx-stat__dot--accent { background: var(--accent); }
@media (max-width: 860px) { .nx-promo { grid-template-columns: 1fr; } }

/* ---------- Banner ---------- */
.nx-banner { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg); background: var(--panel); color: var(--ink); }
.nx-banner__icon { color: var(--ink-2); }
.nx-banner__text { flex: 1; min-width: 0; }
.nx-banner__text p { margin: 0; color: var(--ink-2); }
.nx-banner--accent { background: var(--accent-wash); } .nx-banner--accent .nx-banner__icon { color: var(--accent); }
.nx-banner--warning { background: var(--warning-bg); } .nx-banner--warning .nx-banner__icon { color: var(--warning); }
.nx-banner--danger { background: var(--danger-bg); } .nx-banner--danger .nx-banner__icon { color: var(--danger); }
.nx-banner--success { background: var(--success-bg); } .nx-banner--success .nx-banner__icon { color: var(--success); }
.nx-progress { width: 120px; height: 4px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.nx-progress > span { display: block; height: 100%; background: var(--accent); }

/* ---------- Menu ---------- */
.nx-menu { min-width: 200px; padding: 4px; border-radius: var(--radius-md); background: var(--overlay); box-shadow: var(--shadow-m); display: flex; flex-direction: column; }
.nx-menu__item { font: inherit; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 var(--space-2); border: 0; border-radius: 6px; background: none; color: var(--ink-2); text-align: left; cursor: pointer; }
.nx-menu__item:hover { background: var(--hover); color: var(--ink); }
.nx-menu__item--danger { color: var(--danger); }
.nx-menu__item kbd { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.nx-menu__sep { height: 1px; margin: 4px; background: var(--line); }

/* ---------- Drawer & modal ---------- */
.nx-layer { position: relative; overflow: hidden; background: var(--scrim); }
.nx-layer--fixed { position: fixed; inset: 0; z-index: 50; }
.nx-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(var(--drawer-width), 100%); background: var(--overlay); box-shadow: var(--shadow-l); display: flex; flex-direction: column; border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.nx-drawer__head, .nx-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); padding: var(--space-5) var(--space-5) var(--space-4); }
.nx-drawer__head h2, .nx-modal__head h2 { margin: 0; }
.nx-drawer__head p, .nx-modal p { margin: 4px 0 0; color: var(--muted); }
.nx-drawer__body { flex: 1; overflow-y: auto; padding: 0 var(--space-5) var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.nx-drawer__foot, .nx-modal__foot { display: flex; justify-content: flex-end; gap: var(--space-2); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--line); }
.nx-modal-pos { position: absolute; inset: 0; display: grid; place-items: center; padding: var(--space-4); }
.nx-modal { width: min(420px, 100%); background: var(--overlay); border-radius: var(--radius-lg); box-shadow: var(--shadow-l); }
.nx-modal__body { padding: 0 var(--space-5) var(--space-5); color: var(--ink-2); }
.nx-modal__foot { border-top: 0; padding-top: 0; }
.nx-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }

/* ---------- Empty & loading ---------- */
.nx-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-2); padding: var(--space-10) var(--space-6); }
.nx-empty__mark { width: 40px; height: 40px; border-radius: var(--radius-md); display: grid; place-items: center; background: var(--panel); color: var(--ink-2); margin-bottom: var(--space-2); }
.nx-empty h3 { margin: 0; }
.nx-empty p { margin: 0 0 var(--space-3); color: var(--muted); max-width: 360px; }
.nx-skel { display: block; height: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: nx-shimmer 1.4s cubic-bezier(.22,1,.36,1) infinite; }
@keyframes nx-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- Code ---------- */
.nx-code { border-radius: var(--radius-lg); background: var(--dark-2); color: var(--on-dark); overflow: hidden; }
.nx-code__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); border-bottom: 1px solid rgba(247,246,245,.09); color: var(--on-dark-muted); }
.nx-code__method { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; padding: 2px 6px; border-radius: 4px; background: rgba(247,246,245,.1); color: var(--on-dark); margin-right: 8px; }
.nx-code pre { margin: 0; padding: var(--space-4); font-family: var(--font-mono); font-size: 12.5px; line-height: 20px; overflow-x: auto; }
.nx-code .nx-btn { color: var(--on-dark-muted); background: transparent; }
.nx-code .nx-btn:hover { background: rgba(247,246,245,.1); color: var(--on-dark); }
.nx-secret { display: flex; align-items: center; gap: var(--space-2); height: var(--control-md); padding: 0 4px 0 var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--line-2); background: var(--chrome); font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); }
.nx-secret span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Dashboard layout helpers ---------- */
.nx-dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-4); }
.nx-split-list { display: flex; flex-direction: column; }
.nx-split-list > div { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 10px 0; border-bottom: 1px solid var(--line); }
.nx-split-list > div:last-child { border-bottom: 0; }

/* ---------- Responsive (Ramp-inferred breakpoints) ---------- */
@media (max-width: 1024px) {
  .nx-shell { grid-template-columns: 64px 1fr; }
  .nx-shell .nx-side .nx-nav span, .nx-shell .nx-side .nx-side__label, .nx-shell .nx-side .nx-nav--child, .nx-shell .nx-side .nx-side__switch, .nx-shell .nx-side .nx-plogo__word, .nx-shell .nx-nav__count, .nx-shell .nx-side__foot { display: none; }
  .nx-shell .nx-side .nx-nav { justify-content: center; }
  .nx-dash-grid { grid-template-columns: 1fr; }
  .nx-topbar, .nx-content { padding-left: var(--space-6); padding-right: var(--space-6); }
}
@media (max-width: 767px) {
  .nx-shell { grid-template-columns: 1fr; }
  .nx-shell .nx-side { display: none; }
  .nx-topbar, .nx-content { padding-left: var(--space-4); padding-right: var(--space-4); }
  .nx-toolbar .nx-search { width: 100%; }
  .nx-grid-2 { grid-template-columns: 1fr; }
}

/* ---------- Demo motion (opt-in: add .nx-animate to a container) ---------- */
@keyframes nx-grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes nx-grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes nx-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes nx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nx-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.nx-animate .nx-chart rect, .nx-animate .grow-y { transform-box: fill-box; transform-origin: 50% 100%; animation: nx-grow-y .9s cubic-bezier(.22,1,.36,1) calc(var(--nx-delay, 0s) + .25s) both; }
.nx-animate .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: nx-draw 2s cubic-bezier(.45,0,.2,1) calc(var(--nx-delay, 0s) + .35s) forwards; }
.nx-animate .fade-in, .nx-animate .nx-chart .ln { animation: nx-fade 1.2s ease calc(var(--nx-delay, 0s) + .5s) both; }
.nx-animate .nx-meter > span, .nx-animate .nx-progress > span, .nx-animate .bar-grow { transform-origin: 0 50%; animation: nx-grow-x 1.2s cubic-bezier(.22,1,.36,1) calc(var(--nx-delay, 0s) + .3s) both; }
.nx-animate .nx-card, .nx-animate .rise { animation: nx-rise .7s cubic-bezier(.22,1,.36,1) both; }
.nx-animate .nx-table tbody tr { animation: nx-rise .6s cubic-bezier(.22,1,.36,1) both; }
.nx-animate .nx-card:nth-child(1), .nx-animate .rise:nth-child(1) { animation-delay: calc(var(--nx-delay, 0s) + 0.12s); }
.nx-animate .nx-card:nth-child(2), .nx-animate .rise:nth-child(2) { animation-delay: calc(var(--nx-delay, 0s) + 0.19s); }
.nx-animate .nx-card:nth-child(3), .nx-animate .rise:nth-child(3) { animation-delay: calc(var(--nx-delay, 0s) + 0.26s); }
.nx-animate .nx-card:nth-child(4), .nx-animate .rise:nth-child(4) { animation-delay: calc(var(--nx-delay, 0s) + 0.33s); }
.nx-animate .nx-card:nth-child(5), .nx-animate .rise:nth-child(5) { animation-delay: calc(var(--nx-delay, 0s) + 0.40s); }
.nx-animate .nx-card:nth-child(6), .nx-animate .rise:nth-child(6) { animation-delay: calc(var(--nx-delay, 0s) + 0.47s); }
.nx-animate .nx-card:nth-child(7), .nx-animate .rise:nth-child(7) { animation-delay: calc(var(--nx-delay, 0s) + 0.54s); }
.nx-animate .nx-card:nth-child(8), .nx-animate .rise:nth-child(8) { animation-delay: calc(var(--nx-delay, 0s) + 0.61s); }
.nx-animate .nx-card:nth-child(9), .nx-animate .rise:nth-child(9) { animation-delay: calc(var(--nx-delay, 0s) + 0.68s); }
.nx-animate .nx-card:nth-child(10), .nx-animate .rise:nth-child(10) { animation-delay: calc(var(--nx-delay, 0s) + 0.75s); }
.nx-animate .nx-card:nth-child(11), .nx-animate .rise:nth-child(11) { animation-delay: calc(var(--nx-delay, 0s) + 0.82s); }
.nx-animate .nx-card:nth-child(12), .nx-animate .rise:nth-child(12) { animation-delay: calc(var(--nx-delay, 0s) + 0.89s); }
.nx-animate .nx-table tbody tr:nth-child(1) { animation-delay: calc(var(--nx-delay, 0s) + 0.31s); }
.nx-animate .nx-table tbody tr:nth-child(2) { animation-delay: calc(var(--nx-delay, 0s) + 0.37s); }
.nx-animate .nx-table tbody tr:nth-child(3) { animation-delay: calc(var(--nx-delay, 0s) + 0.43s); }
.nx-animate .nx-table tbody tr:nth-child(4) { animation-delay: calc(var(--nx-delay, 0s) + 0.49s); }
.nx-animate .nx-table tbody tr:nth-child(5) { animation-delay: calc(var(--nx-delay, 0s) + 0.55s); }
.nx-animate .nx-table tbody tr:nth-child(6) { animation-delay: calc(var(--nx-delay, 0s) + 0.61s); }
.nx-animate .nx-table tbody tr:nth-child(7) { animation-delay: calc(var(--nx-delay, 0s) + 0.67s); }
.nx-animate .nx-table tbody tr:nth-child(8) { animation-delay: calc(var(--nx-delay, 0s) + 0.73s); }
.nx-animate .nx-table tbody tr:nth-child(9) { animation-delay: calc(var(--nx-delay, 0s) + 0.79s); }
.nx-animate .nx-table tbody tr:nth-child(10) { animation-delay: calc(var(--nx-delay, 0s) + 0.85s); }
.nx-animate .nx-table tbody tr:nth-child(11) { animation-delay: calc(var(--nx-delay, 0s) + 0.91s); }
.nx-animate .nx-table tbody tr:nth-child(12) { animation-delay: calc(var(--nx-delay, 0s) + 0.97s); }
@media (prefers-reduced-motion: reduce) { .nx-animate *, .nx-animate { animation: none !important; } .nx-animate .draw { stroke-dasharray: none; } }
