/* ORBWRIGHT base: struktur komponen bersama. Warna & font diatur tiap desain lewat variabel. */
:root {
  --bg: #0b0b10; --fg: #f3f1ff; --muted: #9a97ad; --line: rgba(255,255,255,.1); --card: rgba(255,255,255,.04);
  --accent: #ff6a2b; --accent2: #8b5cff; --ok: #3ee59a; --radius: 14px;
  --font-display: 'Space Grotesk', system-ui, sans-serif; --font-body: 'Inter', system-ui, sans-serif; --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
code, pre { font-family: var(--font-mono); }
img, canvas { display: block; }
.mono { font-family: var(--font-mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* reveal */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- floor rows ---------- */
.nx-row { display: grid; grid-template-columns: 34px 40px minmax(0, 1fr) 92px 92px 70px auto; gap: 14px; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--line); position: relative; transition: background .3s; }
.nx-row:hover { background: var(--card); }
.nx-rank { font-family: var(--font-mono); color: var(--muted); font-size: 12px; }
.nx-avatar { width: 40px; height: 40px; border-radius: 10px; position: relative; overflow: hidden;
  background: conic-gradient(from 200deg, hsl(var(--h) 90% 60%), hsl(calc(var(--h) + 60) 90% 55%), hsl(var(--h) 90% 60%)); }
.nx-avatar span { position: absolute; inset: 9px 8px 13px; border-radius: 6px; background: rgba(0,0,0,.55); }
.nx-avatar span::before, .nx-avatar span::after { content: ''; position: absolute; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px #fff; }
.nx-avatar span::before { left: 5px; } .nx-avatar span::after { right: 5px; }
.nx-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-tag { font-style: normal; font-size: 10px; letter-spacing: .1em; padding: 2px 6px; border-radius: 4px; background: var(--accent); color: #000; vertical-align: 2px; margin-left: 6px; }
.nx-sub { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.nx-num { text-align: right; font-family: var(--font-mono); font-size: 14px; }
.nx-num small { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.nx-profit { color: var(--ok); }
.nx-heat { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.nx-heat i { display: block; height: 100%; width: calc(var(--heat) * 100%); background: linear-gradient(90deg, var(--accent2), var(--accent)); border-radius: inherit; transition: width .8s; }
.nx-hire { border: 1px solid var(--line); background: transparent; padding: 8px 12px; border-radius: 999px; cursor: pointer; font-size: 13px; white-space: nowrap; transition: .2s; }
.nx-hire:hover { background: var(--fg); color: var(--bg); }
.nx-row.flash { animation: rowflash 1.4s ease-out; }
@keyframes rowflash { 0% { background: color-mix(in srgb, var(--accent) 28%, transparent); } 100% { background: transparent; } }
@media (max-width: 720px) {
  .nx-row { grid-template-columns: 28px 36px minmax(0,1fr) auto; }
  .nx-num:not(.nx-profit), .nx-heat { display: none; }
  .nx-hire { grid-column: 3 / -1; justify-self: start; }
}

/* ---------- ticker ---------- */
[data-ticker] { list-style: none; margin: 0; padding: 0; font-family: var(--font-mono); font-size: 12px; }
[data-ticker] li { padding: 7px 0; border-bottom: 1px dashed var(--line); color: var(--muted); animation: tick .5s ease-out; }
[data-ticker] li:first-child { color: var(--fg); }
[data-ticker] time { opacity: .55; margin-right: 10px; }
@keyframes tick { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- till ---------- */
.nx-till-ctl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 22px; }
.nx-till-ctl label { display: flex; flex-direction: column; gap: 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nx-till-ctl output { color: var(--fg); font-family: var(--font-mono); font-size: 16px; letter-spacing: 0; text-transform: none; }
.nx-till-ctl select { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-transform: none; letter-spacing: 0; }
.nx-till-ctl select option { background: #111; color: #fff; }
input[type=range] { accent-color: var(--accent); width: 100%; }
.nx-till-bar { display: flex; height: 54px; border-radius: 12px; overflow: hidden; gap: 3px; }
.nx-till-bar i { flex-basis: 0; transition: flex-grow .5s cubic-bezier(.2,.7,.2,1); min-width: 3px; }
.nx-till-bar [data-b=run], .nx-till-legend [data-l=run] span { background: #5b6bff; }
.nx-till-bar [data-b=fee], .nx-till-legend [data-l=fee] span { background: var(--accent2); }
.nx-till-bar [data-b=pledge], .nx-till-legend [data-l=pledge] span { background: #ffc53d; }
.nx-till-bar [data-b=owner], .nx-till-legend [data-l=owner] span { background: var(--ok); }
.nx-till-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 16px; }
.nx-till-legend div { display: grid; grid-template-columns: 12px 1fr auto; gap: 2px 8px; align-items: center; font-size: 13px; }
.nx-till-legend span { width: 12px; height: 12px; border-radius: 3px; }
.nx-till-legend b { font-family: var(--font-mono); }
.nx-till-legend small { grid-column: 2 / -1; color: var(--muted); font-size: 11px; }
@media (max-width: 720px) { .nx-till-ctl, .nx-till-legend { grid-template-columns: 1fr 1fr; } }

/* ---------- modal ---------- */
.nx-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.nx-modal-bg { position: absolute; inset: 0; background: rgba(5,5,10,.6); backdrop-filter: blur(8px); opacity: 0; transition: opacity .3s; }
.nx-modal-card { position: relative; width: min(620px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 30px;
  background: var(--modal-bg, #121219); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px);
  box-shadow: 0 40px 120px rgba(0,0,0,.5); transform: translateY(20px) scale(.98); opacity: 0; transition: .35s cubic-bezier(.2,.7,.2,1); }
.nx-modal.open .nx-modal-bg { opacity: 1; }
.nx-modal.open .nx-modal-card { transform: none; opacity: 1; }
.nx-x { position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 20px; line-height: 1; }
.nx-modal h3 { font-family: var(--font-display); font-size: 28px; margin: 6px 0 8px; letter-spacing: -.02em; }
.nx-eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.nx-muted { color: var(--muted); margin: 0 0 16px; }
.nx-quote { font-style: italic; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 12px; margin: 0 0 18px; }
.nx-steps { list-style: none; padding: 0; margin: 16px 0; font-size: 14px; }
.nx-steps li { display: flex; align-items: center; gap: 10px; padding: 6px 0; animation: tick .3s; }
.nx-steps code { font-size: 12px; background: var(--card); padding: 1px 6px; border-radius: 4px; }
.nx-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .7s linear infinite; flex: none; }
.nx-steps li.done .nx-dot { animation: none; border-color: var(--ok); background: var(--ok); box-shadow: 0 0 10px var(--ok); }
@keyframes spin { to { transform: rotate(360deg); } }
.nx-draft-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nx-draft label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.nx-draft input, .nx-draft select, .nx-modal textarea { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; outline: none; }
.nx-draft select option { background: #111; color: #fff; }
.nx-draft input:focus, .nx-modal textarea:focus { border-color: var(--accent); }
.nx-draft details { margin: 14px 0; font-size: 13px; color: var(--muted); }
.nx-draft pre, .nx-result pre { white-space: pre-wrap; font-size: 12.5px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 8px 0 0; color: var(--fg); }
.nx-limits { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.nx-limits span, .nx-receipt span, .nx-books span { font-size: 11px; font-family: var(--font-mono); padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.nx-books { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.nx-books b { color: var(--fg); }
.nx-receipt { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.nx-sign { display: flex; gap: 14px; align-items: center; justify-content: space-between; margin-top: 12px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; font-size: 12px; color: var(--muted); }
.nx-sign small { display: block; text-transform: uppercase; letter-spacing: .12em; font-size: 10px; color: var(--accent); }
.nx-cta { border: 0; cursor: pointer; padding: 13px 20px; border-radius: 999px; font-weight: 600; white-space: nowrap;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 40%, transparent); transition: transform .2s, box-shadow .2s; }
.nx-cta:hover { transform: translateY(-2px); }
.nx-cta:disabled { opacity: .6; cursor: default; transform: none; }
.nx-ok { text-align: center; padding: 10px 0; }
.nx-ok-badge { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; background: var(--ok); color: #000; box-shadow: 0 0 40px var(--ok); animation: pop .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { from { transform: scale(0); } }
.nx-ok h4 { font-family: var(--font-display); font-size: 22px; margin: 6px 0 12px; }
.nx-ok dl { display: grid; grid-template-columns: auto auto; justify-content: center; gap: 4px 14px; font-size: 13px; margin: 0 0 18px; }
.nx-ok dt { color: var(--muted); text-align: right; } .nx-ok dd { margin: 0; text-align: left; }
@media (max-width: 560px) { .nx-draft-grid { grid-template-columns: 1fr; } .nx-sign { flex-direction: column; align-items: stretch; } }

/* demo note */
.nx-demo { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; color: var(--muted); }

/* tautan nama agen & label status */
.nx-name a { color: inherit; text-decoration: none; }
.nx-name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.nx-tag.nx-feat { background: linear-gradient(90deg, #ffd25a, #ff8a3d); color: #1a0d00; }
.nx-tag.nx-paused { background: var(--muted); color: #000; }
.nx-ok-actions { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.nx-ok-actions .nx-cta { text-decoration: none; }

/* wallet & jaringan (mode chain) */
.nx-net { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.nx-net i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.nx-wallet { font-size: 12px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.04); cursor: pointer; white-space: nowrap; }
.nx-wallet.on { border-color: var(--accent); color: var(--accent); }
.nx-dev { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.nx-dev label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--muted); flex: 1; }
.nx-dev select { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; color: var(--fg); }
.nx-dev select option { background: #111; }
.nx-receipt a { color: var(--accent); }
@media (max-width: 1100px) { .nx-net { display: none; } }
@media (max-width: 560px) { .nx-wallet { font-size: 0; padding: 8px 12px; } .nx-wallet::after { content: 'Wallet'; font-size: 12px; } }
