/*
 * neuronc premium layer (loaded last on app pages).
 * Inter for UI, JetBrains Mono for addresses, hashes and numbers. Light by default; "Dark Cyber"
 * when the dashboard is in dark mode. Only restyles existing components, no layout changes.
 */

:root {
	--p-bg: #F7F8FC;
	--p-card: rgba(255, 255, 255, .86);
	--p-line: rgba(16, 24, 40, .08);
	--p-row: rgba(53, 56, 205, .035);
	--p-head: rgba(248, 249, 252, .94);
	--p-text: #0B1220;
	--p-mute: #667085;
	--p-acc: #3538CD;
	--p-acc2: #6172F3;
	--p-cy: #0EA5E9;
	--p-ok: #16A34A;
	--p-warn: #D97706;
	--p-bad: #DC2626;
	--p-glow: 0 0 0 1px rgba(97, 114, 243, .25), 0 8px 24px rgba(53, 56, 205, .28);
	--p-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
	--p-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
	--gt-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
	--p-bg: #070A14;
	--p-card: rgba(255, 255, 255, .035);
	--p-line: rgba(130, 150, 255, .12);
	--p-row: rgba(124, 140, 255, .06);
	--p-head: rgba(10, 14, 28, .92);
	--p-text: #E6E9F5;
	--p-mute: #8A93B2;
	--p-acc: #7C8CFF;
	--p-acc2: #22D3EE;
	--p-shadow: 0 10px 30px rgba(0, 0, 0, .35);
	--p-glow: 0 0 0 1px rgba(124, 140, 255, .35), 0 0 28px rgba(124, 140, 255, .35);
}

/* ---------------------------------------------------------------- typography */
.gt-app, .gt-app button, .gt-app input, .gt-app select, .gt-app textarea { font-family: var(--gt-font); font-feature-settings: "cv11", "ss01"; }
.gt-app code, .gt-app .ncw-net, .gt-app td.num, .gt-app .num, .gt-app .nws-kpi-v, .gt-app .gt-stat-value,
.gt-app input[name="address"], .gt-app .ncl-dir { font-family: var(--p-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.gt-app code { font-size: .86em; background: transparent; padding: 0; color: inherit; }
html[data-theme="dark"] .gt-app .gt-main { background: radial-gradient(1000px 360px at 0 -10%, rgba(124, 140, 255, .12), transparent), radial-gradient(700px 260px at 100% 0, rgba(34, 211, 238, .08), transparent); }

/* ---------------------------------------------------------------- tables */
.gt-app .gt-table-wrap { border: 1px solid var(--p-line); border-radius: 14px; background: var(--p-card); box-shadow: var(--p-shadow); overflow: auto; max-height: 72vh; -webkit-overflow-scrolling: touch; }
.gt-app .gt-table-wrap table { border: 0 !important; border-collapse: separate; border-spacing: 0; width: 100%; margin: 0; background: transparent; }
.gt-app .gt-table-wrap th { position: sticky; top: 0; z-index: 2; background: var(--p-head); backdrop-filter: blur(8px); border: 0 !important; border-bottom: 1px solid var(--p-line) !important; font: 600 11.5px/1.2 var(--gt-font); letter-spacing: .06em; text-transform: uppercase; color: var(--p-mute); padding: 12px 14px; text-align: left; white-space: nowrap; }
.gt-app .gt-table-wrap td { border: 0 !important; border-bottom: 1px solid var(--p-line) !important; padding: 12px 14px; color: var(--p-text); vertical-align: middle; transition: background .15s; }
.gt-app .gt-table-wrap tbody tr:last-child td { border-bottom: 0 !important; }
.gt-app .gt-table-wrap tbody tr:hover td { background: var(--p-row); }
.gt-app .gt-table-wrap tbody tr:nth-child(even) td { background-image: none; }

/* ---------------------------------------------------------------- buttons */
.gt-app .gt-btn { border-radius: 10px; font-weight: 600; letter-spacing: -.005em; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s; border: 1px solid var(--p-line); background: var(--p-card); color: var(--p-text); }
.gt-app .gt-btn:hover { border-color: rgba(97, 114, 243, .45); transform: translateY(-1px); }
.gt-app .gt-btn:active { transform: translateY(0); }
.gt-app .gt-btn:focus-visible { outline: 2px solid var(--p-acc2); outline-offset: 2px; }
.gt-app .gt-btn-primary, .gt-app .nws-add { background: linear-gradient(135deg, #3538CD 0%, #6172F3 55%, #0EA5E9 130%) !important; color: #fff !important; border-color: transparent !important; box-shadow: 0 6px 16px rgba(53, 56, 205, .25); }
.gt-app .gt-btn-primary:hover, .gt-app .nws-add:hover { box-shadow: var(--p-glow); }
.gt-app .gt-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------------------------------------------------------------- badges */
.gt-app .ncw-badge, .gt-app .nws-chip, .gt-app .nws-kyc { border: 1px solid transparent; font-size: 12px; letter-spacing: .01em; }
.gt-app .ncw-loading::before { animation: none; box-shadow: 0 0 0 0 currentColor; animation: pPulse 1.4s infinite; }
@keyframes pPulse { 0% { box-shadow: 0 0 0 0 rgba(97, 114, 243, .55); } 70% { box-shadow: 0 0 0 7px rgba(97, 114, 243, 0); } 100% { box-shadow: 0 0 0 0 rgba(97, 114, 243, 0); } }
.gt-app .ncw-notsynced { background: rgba(217, 119, 6, .1); color: #B45309; border-color: rgba(217, 119, 6, .25); }
.gt-app .ncw-notsynced::before { background: transparent; border: 1.5px solid currentColor; box-sizing: border-box; }
html[data-theme="dark"] .gt-app .ncw-notsynced { color: #FCD34D; }

/* ---------------------------------------------------------------- toasts (top right) */
.gt-toasts { position: fixed; top: 18px; right: 18px; z-index: 100000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.gt-toast { pointer-events: auto; min-width: 240px; max-width: 360px; padding: 12px 16px 12px 40px; border-radius: 12px; background: rgba(17, 24, 39, .92); color: #fff; font: 500 14px/1.4 var(--gt-font); box-shadow: 0 16px 40px rgba(0, 0, 0, .3); backdrop-filter: blur(10px); position: relative; animation: pIn .35s cubic-bezier(.2, .9, .3, 1.2); }
.gt-toast::before { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.gt-toast-ok::before { content: "✓"; background: #16A34A; }
.gt-toast-warn::before { content: "!"; background: #D97706; }
.gt-toast-err::before { content: "✕"; background: #DC2626; }
.gt-toast.out { opacity: 0; transform: translateX(24px); transition: opacity .3s, transform .3s; }
@keyframes pIn { from { opacity: 0; transform: translateX(32px); } }
.nws-toast { display: none !important; }

/* ---------------------------------------------------------------- wizard (glass) */
.nws-modal { background: rgba(255, 255, 255, .82) !important; backdrop-filter: blur(22px) saturate(160%); border: 1px solid rgba(255, 255, 255, .6) !important; box-shadow: 0 30px 80px rgba(16, 24, 40, .35) !important; }
.nws-modal[open] { animation: pPop .28s cubic-bezier(.2, .9, .3, 1.15); }
.nws-modal::backdrop { background: rgba(8, 10, 22, .5) !important; backdrop-filter: blur(6px) !important; }
html[data-theme="dark"] .nws-modal { background: rgba(14, 18, 34, .82) !important; border-color: rgba(130, 150, 255, .18) !important; }
@keyframes pPop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.nws-step:not([hidden]) { animation: pStep .25s ease; }
@keyframes pStep { from { opacity: 0; transform: translateX(10px); } }
.nws-steps li { transition: color .2s; }
.nws-steps li::before { transition: background .25s, border-color .25s; }
.nws-type span { transition: border-color .2s, box-shadow .2s, background .2s, transform .15s; background: rgba(255, 255, 255, .5); }
.nws-type:hover span { transform: translateY(-1px); }
html[data-theme="dark"] .nws-type span, html[data-theme="dark"] .nws-row, html[data-theme="dark"] .nws-check { background: rgba(255, 255, 255, .03); border-color: rgba(130, 150, 255, .14); }
.nws-in-anim { animation: pRow .3s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes pRow { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.nws-mark.ok::after { display: inline-block; animation: pTick .35s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pTick { from { transform: scale(0) rotate(-30deg); opacity: 0; } }
.nws-tip { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 4px; border-radius: 50%; background: rgba(97, 114, 243, .15); color: var(--p-acc); font: 700 10px/1 var(--gt-font); font-style: normal; cursor: help; position: relative; vertical-align: 1px; }
.nws-tip:hover::after, .nws-tip:focus::after { content: attr(data-tip); position: absolute; bottom: 140%; left: 50%; transform: translateX(-50%); width: 220px; padding: 8px 10px; border-radius: 8px; background: #111827; color: #fff; font: 500 12px/1.4 var(--gt-font); z-index: 5; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
/* review card */
.nws-summary { padding: 0 !important; background: transparent !important; }
.nws-sc-h { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px 14px 0 0; background: linear-gradient(135deg, rgba(53, 56, 205, .1), rgba(14, 165, 233, .08)); border: 1px solid var(--p-line); border-bottom: 0; }
.nws-sc-h .nws-avatar { width: 40px; height: 40px; font-size: 14px; }
.nws-sc-h b { display: block; font-size: 16px; margin-bottom: 3px; }
.nws-sr { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--p-line); border-top: 0; font-size: 13px; }
.nws-sr span { color: var(--p-mute); }
.nws-sr b { text-align: right; word-break: break-word; }
.nws-sr:last-child { border-radius: 0 0 14px 14px; }

/* ---------------------------------------------------------------- KYC pipeline + kanban */
.nws-pipe { display: flex; list-style: none; margin: 10px 0; padding: 0; counter-reset: k; }
.nws-pipe li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--p-mute); text-align: center; }
.nws-pipe li::before { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: var(--p-line); z-index: 0; }
.nws-pipe li:first-child::before { display: none; }
.nws-pipe li.done::before, .nws-pipe li.now::before, .nws-pipe li.bad::before { background: linear-gradient(90deg, #16A34A, #6172F3); }
.nws-pipe li span { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 700 12px/1 var(--gt-font); background: var(--p-card); border: 2px solid var(--p-line); color: var(--p-mute); }
.nws-pipe li.done { color: var(--p-ok); }
.nws-pipe li.done span { background: #16A34A; border-color: #16A34A; color: #fff; }
.nws-pipe li.now { color: var(--p-acc); font-weight: 600; }
.nws-pipe li.now span { border-color: var(--p-acc2); color: var(--p-acc); animation: pPulse 1.6s infinite; }
.nws-pipe li.bad { color: var(--p-bad); font-weight: 600; }
.nws-pipe li.bad span { background: var(--p-bad); border-color: var(--p-bad); color: #fff; }
.nws-prof-kyc { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--p-line); }
.nws-prof-kyc .nws-pipe { flex: 1 1 320px; }
.nws-imp { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 10px; font-weight: 700; font-size: 13px; text-decoration: none; color: #fff !important; background: linear-gradient(135deg, #0F172A, #3538CD); box-shadow: 0 6px 16px rgba(15, 23, 42, .25); transition: box-shadow .2s, transform .15s; }
.nws-imp:hover { transform: translateY(-1px); box-shadow: var(--p-glow); }
.nws-kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.nws-col { background: var(--p-card); border: 1px solid var(--p-line); border-radius: 16px; padding: 12px; min-height: 120px; }
.nws-col header { display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 10px; font-size: 13px; }
.nws-col header span { min-width: 24px; padding: 2px 8px; border-radius: 999px; text-align: center; background: rgba(97, 114, 243, .12); color: var(--p-acc); font: 700 12px/1.4 var(--p-mono); }
.nws-col-pending_vendor header b::before { content: "● "; color: var(--p-warn); }
.nws-col-pending_admin header b::before { content: "● "; color: var(--p-acc2); }
.nws-col-done header b::before { content: "● "; color: var(--p-ok); }
.nws-kcard { background: var(--p-bg); border: 1px solid var(--p-line); border-radius: 12px; padding: 12px; margin-bottom: 10px; box-shadow: var(--p-shadow); transition: transform .2s, opacity .3s; }
.nws-kcard:hover { transform: translateY(-2px); }
.nws-kcard.moved { opacity: .6; }
.nws-kcard-h { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.nws-kact { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.nws-knote { flex: 1 1 100%; min-height: 34px; border: 1px solid var(--p-line); border-radius: 8px; padding: 0 10px; background: transparent; color: inherit; font: inherit; font-size: 13px; }
.nws-knote.bad { border-color: var(--p-bad); box-shadow: 0 0 0 3px rgba(220, 38, 38, .15); }
.nws-kempty { color: var(--p-mute); font-size: 13px; text-align: center; padding: 16px 0; margin: 0; }

/* ---------------------------------------------------------------- inline edit */
.nws-ie { cursor: text; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; transition: background .15s, box-shadow .15s; }
.nws-ie:hover, .nws-ie:focus { background: rgba(97, 114, 243, .1); outline: 0; box-shadow: inset 0 -1px 0 var(--p-acc2); }
.nws-ie.ok { background: rgba(22, 163, 74, .14); }
.nws-ie.bad { background: rgba(220, 38, 38, .14); }
.nws-ie-in { width: 100%; min-width: 140px; height: 32px; border: 1px solid var(--p-acc2); border-radius: 8px; padding: 0 8px; font: inherit; background: var(--p-card); color: inherit; box-shadow: 0 0 0 3px rgba(97, 114, 243, .18); }

/* ---------------------------------------------------------------- impersonation */
.gt-imp-bar { position: sticky; top: 0; z-index: 9999; display: flex; justify-content: center; align-items: center; gap: 10px; padding: 8px 16px; background: linear-gradient(90deg, #B45309, #D97706); color: #fff; font: 600 13px/1.3 var(--gt-font); text-align: center; flex-wrap: wrap; }
.gt-imp-bar a { color: #fff; text-decoration: underline; font-weight: 700; }
.gt-imp-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pPulse 1.4s infinite; }
.gt-switch select { height: 36px; max-width: 220px; border-radius: 10px; border: 1px solid var(--p-line); background: var(--p-card); color: var(--p-text); font: 500 13px var(--gt-font); padding: 0 10px; cursor: pointer; }

/* ---------------------------------------------------------------- report filters */
.gt-app .ncl-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 12px; border: 1px solid var(--p-line); border-radius: 14px; background: var(--p-card); box-shadow: var(--p-shadow); }
.gt-app .ncl-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--p-mute); }
.gt-app .ncl-filters input, .gt-app .ncl-filters select { height: 36px; border-radius: 9px; border: 1px solid var(--p-line); background: transparent; color: var(--p-text); padding: 0 10px; }

@media (max-width: 900px) {
	.nws-kanban { grid-template-columns: 1fr; }
	.gt-switch select { max-width: 150px; }
}
@media (max-width: 600px) {
	.gt-toasts { left: 12px; right: 12px; top: 12px; }
	.gt-toast { max-width: none; }
	.nws-pipe li { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
	.nws-modal[open], .nws-step, .nws-in-anim, .gt-toast, .nws-mark.ok::after, .nws-pipe li.now span, .gt-imp-dot, .ncw-loading::before { animation: none !important; }
}
.nws-hbtns { display: inline-flex; gap: 8px; flex-wrap: wrap; align-items: center; }
