@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

/* ---------- base ---------- */
.ne, .ne * { box-sizing: border-box; }
.ne { font-family: var(--font-sans); font-size: 14px; line-height: 22px; color: var(--ink); -webkit-font-smoothing: antialiased; }
.ne :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ne-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ne-muted { color: var(--ink-muted); }
.ne-subtle { color: var(--ink-subtle); }
.ne-row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.ne-stack { display: flex; flex-direction: column; gap: var(--space-4); }
.ne-grid { display: grid; gap: var(--space-4); }
.ne-eyebrow { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-subtle); }
.ne-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ne-icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- button ---------- */
.ne-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid transparent; font: 500 14px/20px var(--font-sans); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; text-decoration: none; }
.ne-btn .ne-icon { width: 16px; height: 16px; }
.ne-btn-primary { background: var(--primary); color: var(--on-primary); }
.ne-btn-primary:hover { background: var(--primary-hover); }
.ne-btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.ne-btn-secondary:hover { background: var(--primary-soft); }
.ne-btn-ghost { background: transparent; color: var(--ink-muted); }
.ne-btn-ghost:hover { background: var(--surface-sunken); color: var(--ink); }
.ne-btn-success { background: var(--success-fill); color: var(--on-success); }
.ne-btn-danger { background: var(--danger-fill); color: var(--on-danger); }
.ne-btn-danger-outline { background: var(--surface); color: var(--danger); border-color: var(--danger); }
.ne-btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.ne-btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.ne-btn-block { width: 100%; }
.ne-btn-icon { width: 36px; padding: 0; }
.ne-btn-sm.ne-btn-icon { width: 30px; }
.ne-btn[disabled] { opacity: .55; cursor: not-allowed; }
.ne-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ne-spin .7s linear infinite; }
@keyframes ne-spin { to { transform: rotate(360deg); } }

/* ---------- badge ---------- */
.ne-badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: var(--radius-pill); font: 500 12px/16px var(--font-sans); white-space: nowrap; }
.ne-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ne-badge-success { background: var(--success-soft); color: var(--success); }
.ne-badge-warning { background: var(--warning-soft); color: var(--warning); }
.ne-badge-danger { background: var(--danger-soft); color: var(--danger); }
.ne-badge-info { background: var(--info-soft); color: var(--info); }
.ne-badge-accent { background: var(--accent-soft); color: var(--accent); }
.ne-badge-neutral { background: var(--surface-sunken); color: var(--ink-muted); }

/* ---------- card / stat ---------- */
.ne-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.ne-card-pad { padding: var(--space-5); }
.ne-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); }
.ne-card-title { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.ne-card-body { padding: var(--space-5); }
.ne-stat { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-5); }
.ne-stat-icon { width: 40px; height: 40px; border-radius: var(--radius-md); display: grid; place-items: center; flex: none; }
.ne-stat-icon .ne-icon { width: 20px; height: 20px; }
.ne-tone-primary { background: var(--primary-soft); color: var(--primary); }
.ne-tone-success { background: var(--success-soft); color: var(--success); }
.ne-tone-warning { background: var(--warning-soft); color: var(--warning); }
.ne-tone-danger { background: var(--danger-soft); color: var(--danger); }
.ne-tone-info { background: var(--info-soft); color: var(--info); }
.ne-tone-accent { background: var(--accent-soft); color: var(--accent); }
.ne-stat-label { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.ne-stat-value { font: 600 26px/32px var(--font-mono); letter-spacing: -.01em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ne-stat-delta { font-size: 12px; line-height: 16px; margin-top: 4px; color: var(--ink-subtle); }
.ne-stat-delta b { font-weight: 600; }
.ne-up { color: var(--success); } .ne-down { color: var(--danger); }

/* ---------- chart ---------- */
.ne-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.ne-chart .ax { fill: var(--ink-subtle); font: 500 11px var(--font-sans); }
.ne-chart .grid { stroke: var(--border); stroke-width: 1; }
.ne-chart .s0 { fill: var(--primary); stroke: var(--primary); }
.ne-chart .s1 { fill: var(--warning-fill); stroke: var(--warning-fill); }
.ne-chart .s2 { fill: var(--success-fill); stroke: var(--success-fill); }
.ne-chart .s3 { fill: var(--accent); stroke: var(--accent); }
.ne-chart .s4 { fill: var(--info); stroke: var(--info); }
.ne-chart .line { fill: none; stroke-width: 2.5; }
.ne-chart .area { stroke: none; opacity: .12; }
.ne-chart .bar:hover { opacity: .8; }
.ne-legend { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-3); font-size: 12px; color: var(--ink-muted); }
.ne-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ne-legend .s0 { background: var(--primary); } .ne-legend .s1 { background: var(--warning-fill); } .ne-legend .s2 { background: var(--success-fill); } .ne-legend .s3 { background: var(--accent); } .ne-legend .s4 { background: var(--info); }

/* ---------- form ---------- */
.ne-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ne-field-label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink); }
.ne-req { color: var(--danger); margin-left: 2px; }
.ne-input, .ne-select, .ne-textarea { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: 400 14px/20px var(--font-sans); }
.ne-textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }
.ne-input::placeholder, .ne-textarea::placeholder { color: var(--ink-subtle); }
.ne-input:focus, .ne-select:focus, .ne-textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.ne-field-error .ne-input, .ne-field-error .ne-select, .ne-field-error .ne-textarea { border-color: var(--danger); }
.ne-help { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.ne-err { font-size: 12px; line-height: 16px; color: var(--danger); display: flex; gap: 4px; align-items: center; }
.ne-input-wrap { position: relative; }
.ne-input-wrap .ne-input { padding-left: 36px; }
.ne-input-wrap > .ne-icon { position: absolute; left: 11px; top: 10px; color: var(--ink-subtle); width: 16px; height: 16px; }
.ne-input-wrap .ne-input-end { position: absolute; right: 4px; top: 4px; }
.ne-check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.ne-check input { width: 16px; height: 16px; accent-color: var(--primary); }
.ne-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-4); }
.ne-upload { border: 1.5px dashed var(--border-strong); border-radius: var(--radius-md); padding: var(--space-6) var(--space-4); text-align: center; background: var(--surface-sunken); cursor: pointer; color: var(--ink-muted); }
.ne-upload:hover, .ne-upload.drag { border-color: var(--primary); background: var(--primary-soft); }
.ne-upload .ne-icon { width: 28px; height: 28px; color: var(--primary); margin-bottom: 6px; }
.ne-file-row { display: flex; align-items: center; gap: var(--space-3); padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-top: 8px; background: var(--surface); text-align: left; }

/* ---------- filter bar ---------- */
.ne-filterbar { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.ne-filterbar .ne-input-wrap { flex: 1 1 220px; max-width: 320px; }
.ne-filterbar .ne-select { width: auto; min-width: 140px; height: 36px; }
.ne-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--radius-pill); background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 500; border: 0; cursor: pointer; }

/* ---------- table ---------- */
.ne-table-wrap { overflow-x: auto; }
.ne-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.ne-table th { position: sticky; top: 0; background: var(--surface-sunken); text-align: left; font: 600 12px/16px var(--font-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-subtle); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ne-table th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.ne-table th button:focus-visible { outline: 2px solid var(--focus); }
.ne-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ne-table tr:last-child td { border-bottom: 0; }
.ne-table tbody tr:hover td { background: var(--bg); }
.ne-table .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ne-table-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
.ne-table-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border); font-size: 13px; color: var(--ink-muted); }
.ne-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ne-person-name { font-weight: 500; white-space: nowrap; }
.ne-person-sub { font: 500 12px/16px var(--font-mono); color: var(--ink-subtle); }

/* ---------- pagination ---------- */
.ne-pager { display: flex; gap: 4px; align-items: center; }
.ne-pager button { min-width: 30px; height: 30px; padding: 0 8px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: 500 13px var(--font-sans); cursor: pointer; }
.ne-pager button[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.ne-pager button:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- avatar ---------- */
.ne-avatar { width: 34px; height: 34px; border-radius: var(--radius-pill); display: grid; place-items: center; flex: none; font: 600 13px var(--font-sans); background: var(--primary-soft); color: var(--primary); overflow: hidden; }
.ne-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ne-avatar-lg { width: 64px; height: 64px; font-size: 22px; }
.ne-avatar-t1 { background: var(--accent-soft); color: var(--accent); }
.ne-avatar-t2 { background: var(--success-soft); color: var(--success); }
.ne-avatar-t3 { background: var(--warning-soft); color: var(--warning); }

/* ---------- dropdown / menu ---------- */
.ne-pop { position: relative; display: inline-block; }
.ne-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 180px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 4px; }
.ne-menu button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 8px 10px; border: 0; background: none; border-radius: var(--radius-sm); font: 400 14px var(--font-sans); color: var(--ink); cursor: pointer; text-align: left; }
.ne-menu button:hover { background: var(--surface-sunken); }
.ne-menu button.danger { color: var(--danger); }

/* ---------- tabs / breadcrumbs ---------- */
.ne-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.ne-tab { border: 0; background: none; padding: 10px 14px; font: 500 14px var(--font-sans); color: var(--ink-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.ne-tab:hover { color: var(--ink); }
.ne-tab[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }
.ne-tab-count { font: 600 11px/16px var(--font-sans); background: var(--surface-sunken); color: var(--ink-muted); padding: 0 6px; border-radius: var(--radius-pill); }
.ne-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-muted); }
.ne-crumbs a { color: var(--ink-muted); text-decoration: none; cursor: pointer; }
.ne-crumbs a:hover { color: var(--primary); text-decoration: underline; }
.ne-crumbs [aria-current] { color: var(--ink); font-weight: 500; }
.ne-crumbs .ne-icon { width: 14px; height: 14px; color: var(--ink-subtle); }

/* ---------- sidebar / topbar / shell ---------- */
.ne-shell { display: grid; grid-template-columns: var(--sidebar-width) 1fr; min-height: 100%; background: var(--bg); }
.ne-sidebar { background: var(--sidebar); color: var(--sidebar-ink); display: flex; flex-direction: column; min-height: 100%; }
.ne-brand { display: flex; gap: 10px; align-items: center; height: var(--topbar-height); padding: 0 var(--space-5); border-bottom: 1px solid rgba(255,255,255,.08); }
.ne-brand-mark { width: 32px; height: 32px; object-fit: contain; }
.ne-brand-name { font: 700 14px/16px var(--font-sans); letter-spacing: .06em; }
.ne-brand-sub { font: 500 11px/14px var(--font-sans); color: var(--sidebar-ink-muted); }
.ne-nav { padding: var(--space-3); display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.ne-nav-caption { font: 600 11px/16px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--sidebar-ink-muted); padding: 14px 10px 6px; }
.ne-nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--sidebar-ink-muted); font: 500 14px/20px var(--font-sans); border: 0; background: none; cursor: pointer; text-align: left; width: 100%; }
.ne-nav-item:hover { color: var(--sidebar-ink); background: rgba(255,255,255,.06); }
.ne-nav-item[aria-current="page"] { background: var(--sidebar-active); color: var(--sidebar-ink); }
.ne-nav-item[aria-current="page"] .ne-icon { color: var(--warning-fill); }
.ne-nav-count { margin-left: auto; font: 600 11px/18px var(--font-sans); background: var(--warning-fill); color: var(--on-warning); padding: 0 7px; border-radius: var(--radius-pill); }
.ne-sidebar-foot { padding: var(--space-4) var(--space-5); border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: var(--sidebar-ink-muted); }
.ne-topbar { height: var(--topbar-height); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: var(--space-3); padding: 0 var(--space-6); position: sticky; top: 0; z-index: 20; }
.ne-topbar-search { flex: 1; max-width: 440px; position: relative; }
.ne-topbar-actions { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.ne-dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--radius-pill); background: var(--danger-fill); color: var(--on-danger); font: 600 10px/16px var(--font-sans); text-align: center; }
.ne-main { min-width: 0; display: flex; flex-direction: column; }
.ne-page { padding: var(--space-6) var(--space-8); max-width: var(--content-max); width: 100%; }
.ne-page-head { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: flex-end; justify-content: space-between; margin-bottom: var(--space-6); }
.ne-page-title { margin: 6px 0 0; font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -.01em; }
.ne-search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); z-index: 40; max-height: 360px; overflow: auto; padding: 6px; }
.ne-search-group { font: 600 11px/16px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-subtle); padding: 8px 10px 4px; }
.ne-search-item { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: var(--radius-sm); text-align: left; cursor: pointer; color: var(--ink); font: 400 14px var(--font-sans); }
.ne-search-item:hover, .ne-search-item[aria-selected="true"] { background: var(--primary-soft); }
.ne-search-item mark { background: var(--warning-soft); color: inherit; border-radius: 2px; }

/* ---------- notifications ---------- */
.ne-notif { width: 360px; max-width: calc(100vw - 32px); position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); z-index: 40; overflow: hidden; }
.ne-notif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.ne-notif-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; background: var(--surface); border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; font: inherit; color: inherit; }
.ne-notif-item:hover { background: var(--bg); }
.ne-notif-item.unread { background: var(--primary-soft); }
.ne-notif-item .ne-stat-icon { width: 32px; height: 32px; }
.ne-notif-item .ne-stat-icon .ne-icon { width: 16px; height: 16px; }
.ne-notif-time { font-size: 12px; color: var(--ink-subtle); }
.ne-unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--info); flex: none; margin-top: 6px; }

/* ---------- modal / toast ---------- */
.ne-scrim { position: fixed; inset: 0; background: var(--overlay); display: grid; place-items: center; padding: var(--space-4); z-index: 100; animation: ne-fade .15s ease-out; }
.ne-modal { width: 100%; max-width: 560px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: ne-rise .18s ease-out; }
.ne-modal-lg { max-width: 820px; }
.ne-modal-sm { max-width: 420px; }
.ne-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); padding: var(--space-5) var(--space-6) var(--space-4); border-bottom: 1px solid var(--border); }
.ne-modal-title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; }
.ne-modal-body { padding: var(--space-6); overflow: auto; }
.ne-modal-foot { display: flex; justify-content: flex-end; gap: var(--space-2); padding: var(--space-4) var(--space-6); border-top: 1px solid var(--border); background: var(--bg); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.ne-toasts { position: fixed; right: var(--space-6); bottom: var(--space-6); display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.ne-toast { display: flex; gap: 10px; align-items: flex-start; min-width: 280px; max-width: 380px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); animation: ne-rise .2s ease-out; }
.ne-toast .ne-icon { margin-top: 2px; }
.ne-toast-success .ne-icon { color: var(--success); } .ne-toast-danger .ne-icon { color: var(--danger); } .ne-toast-info .ne-icon { color: var(--info); } .ne-toast-warning .ne-icon { color: var(--warning); }
@keyframes ne-fade { from { opacity: 0; } }
@keyframes ne-rise { from { opacity: 0; transform: translateY(8px); } }
.ne-banner { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-md); font-size: 13px; line-height: 20px; }
.ne-banner-info { background: var(--info-soft); color: var(--info); }
.ne-banner-warning { background: var(--warning-soft); color: var(--warning); }
.ne-banner-danger { background: var(--danger-soft); color: var(--danger); }
.ne-banner-success { background: var(--success-soft); color: var(--success); }

/* ---------- states ---------- */
.ne-empty { text-align: center; padding: var(--space-12) var(--space-6); }
.ne-empty-icon { width: 56px; height: 56px; margin: 0 auto var(--space-4); border-radius: var(--radius-pill); display: grid; place-items: center; background: var(--surface-sunken); color: var(--ink-subtle); }
.ne-empty-icon .ne-icon { width: 26px; height: 26px; }
.ne-empty h3 { margin: 0 0 4px; font-size: 16px; line-height: 24px; font-weight: 600; }
.ne-empty p { margin: 0 auto var(--space-4); max-width: 360px; color: var(--ink-muted); }
.ne-skel { display: block; height: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--surface-sunken) 0%, var(--border) 50%, var(--surface-sunken) 100%); background-size: 200% 100%; animation: ne-shimmer 1.2s linear infinite; }
@keyframes ne-shimmer { to { background-position: -200% 0; } }

/* ---------- timeline / stepper ---------- */
.ne-timeline { list-style: none; margin: 0; padding: 0; }
.ne-tl-item { display: grid; grid-template-columns: 28px 1fr; gap: 12px; position: relative; padding-bottom: 18px; }
.ne-tl-item:last-child { padding-bottom: 0; }
.ne-tl-item::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--border); }
.ne-tl-item:last-child::before { display: none; }
.ne-tl-item.done::before { background: var(--success-fill); }
.ne-tl-dot { width: 28px; height: 28px; border-radius: var(--radius-pill); display: grid; place-items: center; background: var(--surface-sunken); color: var(--ink-subtle); border: 2px solid var(--border); }
.ne-tl-dot .ne-icon { width: 14px; height: 14px; stroke-width: 2.5; }
.ne-tl-item.done .ne-tl-dot { background: var(--success-fill); border-color: var(--success-fill); color: var(--on-success); }
.ne-tl-item.current .ne-tl-dot { background: var(--surface); border-color: var(--warning-fill); color: var(--warning); }
.ne-tl-item.rejected .ne-tl-dot { background: var(--danger-fill); border-color: var(--danger-fill); color: var(--on-danger); }
.ne-tl-title { font-weight: 500; line-height: 28px; }
.ne-tl-meta { font-size: 12px; line-height: 16px; color: var(--ink-subtle); }
.ne-steps { display: flex; gap: 0; overflow-x: auto; padding: 4px 0; }
.ne-step { flex: 1 1 0; min-width: 110px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; position: relative; }
.ne-step::after { content: ""; position: absolute; top: 15px; left: calc(50% + 20px); right: calc(-50% + 20px); height: 2px; background: var(--border); }
.ne-step:last-child::after { display: none; }
.ne-step.done::after { background: var(--success-fill); }
.ne-step-num { width: 32px; height: 32px; border-radius: var(--radius-pill); display: grid; place-items: center; font: 600 13px var(--font-sans); background: var(--surface-sunken); color: var(--ink-muted); border: 2px solid var(--border); z-index: 1; }
.ne-step.done .ne-step-num { background: var(--success-fill); color: var(--on-success); border-color: var(--success-fill); }
.ne-step.current .ne-step-num { background: var(--warning-fill); color: var(--on-warning); border-color: var(--warning-fill); }
.ne-step-label { font-size: 13px; line-height: 18px; font-weight: 500; }
.ne-step-sub { font-size: 12px; line-height: 16px; color: var(--ink-subtle); }

/* ---------- document / gate pass / payslip ---------- */
.ne-doc { display: flex; gap: 12px; align-items: center; padding: 12px 14px; }
.ne-doc-thumb { width: 44px; height: 52px; border-radius: var(--radius-sm); background: var(--surface-sunken); border: 1px solid var(--border); display: grid; place-items: center; color: var(--ink-subtle); flex: none; }
.ne-doc-body { flex: 1; min-width: 0; }
.ne-doc-name { font-weight: 500; }
.ne-gp { width: 340px; max-width: 100%; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-md); }
.ne-gp-head { background: var(--sidebar); color: var(--sidebar-ink); padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; }
.ne-gp-strip { height: 6px; background: var(--warning-fill); }
.ne-gp-body { padding: 18px; display: grid; grid-template-columns: 84px 1fr; gap: 16px; }
.ne-gp-photo { width: 84px; height: 100px; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font: 600 28px var(--font-sans); }
.ne-gp-kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 12px; line-height: 18px; }
.ne-gp-kv dt { color: var(--ink-subtle); } .ne-gp-kv dd { margin: 0; font-weight: 500; }
.ne-gp-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px dashed var(--border-strong); }
.ne-qr { width: 64px; height: 64px; display: block; }
.ne-qr rect { fill: var(--ink); }
.ne-slip { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); max-width: 760px; }
.ne-slip-head { display: flex; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 2px solid var(--primary); flex-wrap: wrap; }
.ne-slip-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 20px; padding: 16px 24px; background: var(--bg); font-size: 13px; }
.ne-slip-meta span { display: block; color: var(--ink-subtle); font-size: 12px; }
.ne-slip-cols { display: grid; grid-template-columns: 1fr 1fr; }
.ne-slip-cols > div { padding: 16px 24px; }
.ne-slip-cols > div + div { border-left: 1px solid var(--border); }
.ne-slip-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; border-bottom: 1px dotted var(--border); }
.ne-slip-line b { font-family: var(--font-mono); font-weight: 500; }
.ne-slip-total { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; background: var(--primary-soft); color: var(--primary); flex-wrap: wrap; gap: 12px; }
.ne-slip-sign { display: flex; justify-content: space-between; padding: 24px; font-size: 12px; color: var(--ink-subtle); }

/* ---------- worker mobile ---------- */
.ne-phone { width: 380px; max-width: 100%; margin: 0 auto; background: var(--bg); border: 1px solid var(--border); border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.ne-bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); height: var(--bottom-nav-height); background: var(--surface); border-top: 1px solid var(--border); }
.ne-bottomnav button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font: 500 11px var(--font-sans); color: var(--ink-subtle); cursor: pointer; }
.ne-bottomnav button[aria-current="page"] { color: var(--primary); }
.ne-bottomnav button[aria-current="page"] .ne-icon { stroke-width: 2.3; }
.ne-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4); display: flex; flex-direction: column; gap: 6px; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.ne-tile:hover { border-color: var(--primary); }

/* ---------- public site ---------- */
.ne-pub-header { background: var(--surface); border-bottom: 1px solid var(--border); height: var(--topbar-height); display: flex; align-items: center; gap: var(--space-6); padding: 0 var(--space-8); }
.ne-pub-nav { display: flex; gap: var(--space-5); font-size: 14px; font-weight: 500; }
.ne-pub-nav a { color: var(--ink-muted); text-decoration: none; cursor: pointer; }
.ne-pub-nav a[aria-current] { color: var(--primary); }
.ne-hero { background: var(--sidebar); color: var(--sidebar-ink); padding: var(--space-20) var(--space-8); }
.ne-hero h1 { margin: 0; font-size: 44px; line-height: 52px; font-weight: 700; letter-spacing: -.02em; max-width: 620px; }
.ne-hero p { margin: var(--space-4) 0 var(--space-8); font-size: 17px; line-height: 27px; color: var(--sidebar-ink-muted); max-width: 520px; }
.ne-hero .ne-btn-secondary { background: transparent; color: var(--sidebar-ink); border-color: var(--sidebar-ink-muted); }
.ne-hero .ne-btn-secondary:hover { background: var(--sidebar-active); }
.ne-hero-cta { background: var(--warning-fill); color: var(--on-warning); }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .ne-shell { grid-template-columns: 1fr; }
  .ne-shell > .ne-sidebar { display: none; }
  .ne-page { padding: var(--space-4); }
  .ne-topbar { padding: 0 var(--space-4); }
}
@media (max-width: 640px) {
  .ne-slip-cols { grid-template-columns: 1fr; }
  .ne-slip-cols > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .ne-hero { padding: var(--space-12) var(--space-4); }
  .ne-hero h1 { font-size: 32px; line-height: 40px; }
  .ne-pub-nav { display: none; }
  .ne-pub-header { padding: 0 var(--space-4); }
  .ne-toasts { left: var(--space-4); right: var(--space-4); }
}
@media print {
  .ne-sidebar, .ne-topbar, .ne-noprint { display: none !important; }
  .ne-slip, .ne-gp { box-shadow: none; }
}

/* =====================================================================
   POLISH LAYER v2 — motion, focus, hover, states (Sep 2026)
   ===================================================================== */
@keyframes ne-in-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ne-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ne-out { to { opacity: 0; } }
@keyframes ne-pop-in { from { opacity: 0; transform: translateY(4px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes ne-pop-out { to { opacity: 0; transform: translateY(4px) scale(.97); } }
@keyframes ne-toast-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@keyframes ne-toast-out { to { opacity: 0; transform: translateX(12px); } }
@keyframes ne-slide-in { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes ne-draw { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
@keyframes ne-pulse { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* typography refinements */
.ne { color: var(--ink); letter-spacing: -0.003em; }
.ne-page-title { font-weight: 650; letter-spacing: -0.018em; text-wrap: balance; }
.ne-card-title { font-weight: 600; letter-spacing: -0.006em; }
.ne-modal-title { font-weight: 600; letter-spacing: -0.01em; }
.ne-stat-label { font-weight: 500; }
.ne-help { color: var(--ink-muted); }

/* buttons */
.ne-btn { transition: background-color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease), transform var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease); }
.ne-btn:not([disabled]):active { transform: scale(.98); }
.ne-btn-primary:not([disabled]):hover { box-shadow: 0 2px 8px rgba(15, 28, 46, .18); }
.ne-btn-secondary:not([disabled]):hover { border-color: var(--primary); }
.ne-btn-success:not([disabled]):hover, .ne-btn-danger:not([disabled]):hover { filter: brightness(1.06); }
.ne-btn-danger-outline:not([disabled]):hover { background: var(--danger-soft); }
.ne-btn[aria-busy="true"] { cursor: progress; }
.ne-btn .ne-icon { transition: transform var(--dur-2) var(--ease); }
.ne-btn:hover .ne-icon[data-i="chevron-right"] { transform: translateX(2px); }

/* focus */
.ne :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: inherit; }
.ne-input, .ne-select, .ne-textarea { transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease); }
.ne-input:hover:not(:disabled), .ne-select:hover:not(:disabled), .ne-textarea:hover:not(:disabled) { border-color: var(--ink-subtle); }
.ne-input:focus, .ne-select:focus, .ne-textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-ring); }
.ne-field-error .ne-input:focus, .ne-field-error .ne-select:focus, .ne-field-error .ne-textarea:focus { box-shadow: 0 0 0 3px var(--danger-soft); border-color: var(--danger); }
.ne-input:disabled, .ne-select:disabled, .ne-textarea:disabled { background: var(--surface-sunken); color: var(--ink-muted); cursor: not-allowed; }
.ne-err { animation: ne-in-up var(--dur-2) var(--ease); }
.ne-field-label { color: var(--ink); }

/* cards */
.ne-card { transition: border-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
.ne-stat[role="button"]:hover, .ne-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.ne-stat { position: relative; overflow: hidden; }
.ne-stat-value { font-weight: 600; }
.ne-spark { position: absolute; right: 14px; bottom: 12px; width: 84px; height: 30px; overflow: visible; }
.ne-spark .l { fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ne-spark .a { opacity: .1; stroke: none; }
.ne-spark-primary .l, .ne-spark-primary circle { stroke: var(--primary); } .ne-spark-primary .a, .ne-spark-primary circle { fill: var(--primary); }
.ne-spark-success .l { stroke: var(--success-fill); } .ne-spark-success .a, .ne-spark-success circle { fill: var(--success-fill); }
.ne-spark-danger .l { stroke: var(--danger-fill); } .ne-spark-danger .a, .ne-spark-danger circle { fill: var(--danger-fill); }
.ne-spark-warning .l { stroke: var(--warning-fill); } .ne-spark-warning .a, .ne-spark-warning circle { fill: var(--warning-fill); }
.ne-spark-info .l { stroke: var(--info); } .ne-spark-info .a, .ne-spark-info circle { fill: var(--info); }
.ne-spark-accent .l { stroke: var(--accent); } .ne-spark-accent .a, .ne-spark-accent circle { fill: var(--accent); }
.ne-stat:has(.ne-spark) .ne-stat-delta { padding-right: 92px; }

/* badges: icon + word, never colour alone */
.ne-badge { gap: 5px; padding: 0 9px 0 7px; font-weight: 550; }
.ne-badge::before { display: none; }
.ne-badge-ic { width: 12px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* tables */
.ne-table td { transition: background-color var(--dur-1) var(--ease); }
.ne-table tbody tr:hover td { background: var(--row-hover); }
.ne-table th button .ne-icon { opacity: .55; transition: opacity var(--dur-1), transform var(--dur-2) var(--ease); }
.ne-table th[aria-sort] button { color: var(--ink); }
.ne-table th[aria-sort] button .ne-icon { opacity: 1; color: var(--primary); }
.ne-table th button:hover .ne-icon { opacity: 1; }
.ne-tbody-in { animation: ne-in var(--dur-2) var(--ease); }
.ne-table-toolbar { background: var(--surface); border-radius: var(--radius-md) var(--radius-md) 0 0; }
.ne-pager button { transition: background-color var(--dur-1), border-color var(--dur-1), color var(--dur-1); }
.ne-pager button:not(:disabled):not([aria-current]):hover { border-color: var(--primary); color: var(--primary); }
.ne-menu { animation: ne-pop-in var(--dur-2) var(--ease); transform-origin: top right; }
.ne-search-results, .ne-notif { animation: ne-pop-in var(--dur-2) var(--ease); transform-origin: top center; }
.ne-menu button, .ne-search-item, .ne-notif-item { transition: background-color var(--dur-1) var(--ease); }

/* tabs */
.ne-tab { transition: color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), background-color var(--dur-2); border-radius: 6px 6px 0 0; }
.ne-tab:hover { background: var(--surface-sunken); }
.ne-tab[aria-selected="true"] { font-weight: 600; }

/* modal + toasts */
.ne-scrim { animation: ne-in var(--dur-2) var(--ease); }
.ne-scrim.is-leaving { animation: ne-out 160ms var(--ease-in) forwards; }
.ne-modal { animation: ne-pop-in 220ms var(--ease); }
.ne-scrim.is-leaving .ne-modal { animation: ne-pop-out 160ms var(--ease-in) forwards; }
.ne-modal:focus { outline: none; }
.ne-modal-head { padding-bottom: var(--space-4); }
.ne-toast { animation: ne-toast-in 240ms var(--ease); box-shadow: var(--shadow-lg); border-left-width: 1px; }
.ne-toast.is-leaving { animation: ne-toast-out 180ms var(--ease-in) forwards; }
.ne-toast-success .ne-icon path { stroke-dasharray: 40; animation: ne-draw 420ms var(--ease) 80ms both; }

/* sidebar */
.ne-sidebar { transition: width var(--dur-3) var(--ease); }
.ne-brand { gap: 12px; }
.ne-brand img.ne-brand-mark { width: 34px; height: 34px; object-fit: contain; background: none; border-radius: 0; flex: none; }
.ne-brand-name { white-space: nowrap; letter-spacing: .02em; }
.ne-nav-item { position: relative; transition: background-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease); }
.ne-nav-item .ne-icon { transition: color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
.ne-nav-item:hover .ne-icon { transform: translateX(1px); }
.ne-nav-item[aria-current="page"] { font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.ne-nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ne-collapse-btn { margin: 8px 12px 14px; width: auto; border-top: 0; opacity: .85; }
.ne-shell { transition: grid-template-columns var(--dur-3) var(--ease); }
.ne-shell.is-collapsed { grid-template-columns: var(--sidebar-collapsed) 1fr; }
.ne-sidebar.is-collapsed .ne-brand { padding: 0; justify-content: center; }
.ne-sidebar.is-collapsed .ne-brand-text, .ne-sidebar.is-collapsed .ne-nav-label, .ne-sidebar.is-collapsed .ne-nav-caption { display: none; }
.ne-sidebar.is-collapsed .ne-nav-item { justify-content: center; padding: 10px 0; }
.ne-sidebar.is-collapsed .ne-nav-count { position: absolute; top: 3px; right: 8px; padding: 0 5px; font-size: 10px; line-height: 15px; }
.ne-sidebar.is-collapsed .ne-nav { padding-top: 16px; overflow: visible; }
.ne-sidebar.is-collapsed .ne-collapse-btn { margin: 8px; }
.ne-sidebar.is-collapsed [data-tip]:hover::after, .ne-sidebar.is-collapsed [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); white-space: nowrap;
  background: var(--ink); color: var(--surface); font: 500 12px/16px var(--font-sans); padding: 6px 9px; border-radius: 6px; box-shadow: var(--shadow-md); z-index: 60; pointer-events: none; animation: ne-in var(--dur-1) var(--ease);
}
.ne-drawer-scrim { place-items: stretch start; padding: 0; }
.ne-drawer { width: var(--sidebar-width); height: 100%; animation: ne-slide-in 260ms var(--ease); box-shadow: var(--shadow-lg); }
.ne-drawer .ne-sidebar { height: 100%; min-height: 100%; }

/* topbar */
.ne-topbar { backdrop-filter: saturate(1.4) blur(6px); background: color-mix(in srgb, var(--surface) 92%, transparent); }
.ne-dot { animation: ne-pulse 600ms var(--ease) 400ms 2; }
.ne-page-head { align-items: flex-end; }

/* empty / error */
.ne-empty-icon { transition: transform var(--dur-3) var(--ease); }
.ne-empty:hover .ne-empty-icon { transform: translateY(-2px); }

/* timeline + stepper */
.ne-tl-item.done .ne-tl-dot .ne-icon path, .ne-step.done .ne-step-num .ne-icon path { stroke-dasharray: 40; animation: ne-draw 480ms var(--ease) both; }
.ne-step-num { transition: background-color var(--dur-3) var(--ease), border-color var(--dur-3) var(--ease), color var(--dur-3); }
.ne-step::after { transition: background-color var(--dur-4) var(--ease); }

/* upload */
.ne-upload { transition: border-color var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease); }
.ne-file-row { animation: ne-in-up var(--dur-2) var(--ease); }

@media (max-width: 1023px) { .ne-shell.is-collapsed { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .ne *, .ne *::before, .ne *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}
/* KPI trend as a footer strip under the metric */
.ne-stat { flex-wrap: wrap; }
.ne-stat > div:nth-child(2) { flex: 1 1 0; }
.ne-spark { position: static; flex: 1 0 100%; width: 100%; height: 30px; margin-top: 2px; }
.ne-stat:has(.ne-spark) .ne-stat-delta { padding-right: 0; }
.ne-stat-delta b { margin-right: 4px; }
