/* NEZI · aplikasi (/app). Rel bernomor di kiri, panel bergaris rambut, aksen hemat. */

body.app { min-height: 100vh; background: var(--g0); }

/* ── bilah atas ─────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  height: 58px; padding: 0 var(--gut);
  background: rgba(5, 5, 6, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 0.14em; font-size: 15px; }
.brand img { border-radius: 6px; }
.top-sep { width: 1px; height: 18px; background: var(--line-2); }
.top-chain { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.top-chain .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(65, 207, 214, 0.16); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ca-chip { font-family: var(--mono); font-size: 12px; color: var(--g8); padding: 6px 10px; border: 1px dashed rgba(255, 255, 255, 0.16); border-radius: 6px; white-space: nowrap; cursor: default; }
.ca-chip.live { border-style: solid; border-color: rgba(65, 207, 214, 0.45); color: var(--g10); cursor: pointer; }
#walletBtn.on { border-color: rgba(65, 207, 214, 0.45); font-family: var(--mono); font-weight: 500; }

/* ── kerangka: rel + panggung ───────────────────────────── */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100vh - 58px); }
.rail { position: sticky; top: 58px; align-self: start; height: calc(100vh - 58px); padding: 26px 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.rail > a { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; column-gap: 8px; padding: 11px 12px; border-radius: 10px; color: var(--g8); transition: background 0.2s, color 0.2s; }
.rail > a b { grid-row: span 2; font-family: var(--mono); font-weight: 500; font-size: 11px; color: var(--faint); padding-top: 3px; }
.rail > a span { font-weight: 600; font-size: 14.5px; }
.rail > a em { font-style: normal; font-size: 12px; color: var(--faint); }
.rail > a:hover { background: rgba(255, 255, 255, 0.03); color: var(--g10); }
.rail > a.on { background: var(--g2); color: var(--g10); box-shadow: inset 2px 0 0 var(--accent); }
.rail > a.on b { color: var(--accent); }
.rail-foot { margin-top: auto; display: grid; gap: 8px; padding: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.rail-foot a:hover { color: var(--g10); }

.stage { min-width: 0; padding: 34px clamp(16px, 4vw, 56px) 80px; }
.panel { max-width: 1040px; animation: panel-in 0.45s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }

/* ── kepala panel ───────────────────────────────────────── */
.ph { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.ph h1 { margin: 6px 0 0; font-size: clamp(26px, 3.2vw, 36px); line-height: 1.08; font-weight: 600; letter-spacing: -0.025em; }
.ph h1 .dim { color: var(--g6); }
.ph p { margin: 10px 0 0; color: var(--muted); max-width: 60ch; }
.ph .side { display: flex; gap: 8px; flex-wrap: wrap; }

/* blok bergaris rambut */
.blk { border: 1px solid var(--line); border-radius: var(--r3); background: var(--g1); }
.blk + .blk { margin-top: 14px; }
.blk-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.blk-h h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.blk-h .src { font-size: 11.5px; color: var(--faint); }
.blk-b { padding: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid2 > .blk + .blk, .grid3 > .blk + .blk { margin-top: 0; }

/* ── masukan Trace (bilah perintah) ─────────────────────── */
.cmd { display: flex; gap: 8px; align-items: center; padding: 6px; border-radius: 14px; background: var(--g2); border: 1px solid var(--line-2); }
.cmd:focus-within { border-color: rgba(65, 207, 214, 0.5); }
.cmd .k { font-family: var(--mono); font-size: 12px; color: var(--faint); padding: 0 6px 0 10px; }
.cmd input { flex: 1; min-width: 0; height: 42px; border: 0; outline: 0; background: transparent; font-family: var(--mono); font-size: 14px; }
.cmd input::placeholder { color: var(--faint); }
.cmd .btn { border-radius: 10px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.quick button { background: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; cursor: pointer; color: var(--g8); font-size: 12.5px; }
.quick button:hover { color: var(--g10); border-color: rgba(255, 255, 255, 0.28); }

.progress { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; padding: 18px 2px; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--g5); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── hasil Trace ────────────────────────────────────────── */
.verdict { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0; }
.dial { position: relative; padding: 22px; border-right: 1px solid var(--line); display: grid; place-items: center; }
.dial svg { width: 168px; height: 168px; }
.dial .n { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dial .n b { font-size: 46px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.dial .n span { font-size: 11px; color: var(--faint); letter-spacing: 0.12em; text-transform: uppercase; margin-top: 6px; }
.v-body { padding: 22px 24px; }
.v-tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; padding: 5px 11px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); }
.v-tag.open { background: rgba(238, 107, 92, 0.14); color: #ffb3a9; }
.v-tag.traceable { background: rgba(231, 178, 76, 0.13); color: #f3cf8c; }
.v-tag.quiet { background: var(--accent-soft); color: var(--accent); }
.v-body h2 { margin: 12px 0 6px; font-size: 22px; letter-spacing: -0.02em; font-weight: 600; }
.v-addr { font-family: var(--mono); font-size: 12.5px; color: var(--muted); word-break: break-all; }
.v-meta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 16px; font-size: 12.5px; color: var(--faint); }
.v-actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }

.reasons { list-style: none; margin: 0; padding: 0; }
.reasons li { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.reasons li:last-child { border-bottom: 0; }
.reasons .pts { font-family: var(--mono); font-size: 13px; color: var(--g8); text-align: right; }
.reasons .pts.neg { color: var(--accent); }
.reasons b { display: block; font-weight: 600; font-size: 14px; }
.reasons p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.reasons .fix { margin-top: 6px; font-size: 12.5px; color: var(--accent); }

/* rantai pendana */
.chain { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding-bottom: 4px; }
.node { min-width: 150px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--g2); }
.node.you { border-color: rgba(65, 207, 214, 0.5); }
.node small { display: block; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.node code { font-family: var(--mono); font-size: 12.5px; }
.node em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 3px; }
.link { flex: 0 0 74px; display: grid; place-items: center; color: var(--g6); font-size: 11px; white-space: nowrap; position: relative; }
.link span { position: absolute; top: calc(50% - 18px); background: var(--g1); padding: 0 4px; }
.link::before { content: ''; width: 100%; height: 1px; background: linear-gradient(90deg, var(--g5), var(--g6)); }

/* jam: 24 sel nada abu */
.hours { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; }
.hours i { display: block; height: 34px; border-radius: 3px; background: var(--g3); position: relative; }
.hours i.peak { outline: 1px solid var(--accent); outline-offset: 1px; }
.hours-x { display: flex; justify-content: space-between; margin-top: 6px; font-family: var(--mono); font-size: 10.5px; color: var(--faint); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.rcpts { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.rcpt { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--g8); }
.rcpt b { font-family: var(--mono); font-weight: 500; color: var(--accent); }
a.rcpt:hover { color: var(--g10); border-color: rgba(255, 255, 255, 0.28); }

.empty { color: var(--faint); font-size: 13px; }
.err { color: #ffb3a9; font-size: 13.5px; padding: 14px 16px; border: 1px solid rgba(238, 107, 92, 0.35); border-radius: 10px; background: rgba(238, 107, 92, 0.06); }

/* ── Desk ───────────────────────────────────────────────── */
.price { width: 100%; border-collapse: collapse; }
.price td, .price th { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 13.5px; }
.price th { font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.price tr:last-child td { border-bottom: 0; }
.price code { font-family: var(--mono); font-size: 12.5px; color: var(--g10); }
.price .p { font-family: var(--mono); white-space: nowrap; text-align: right; }
.price .off { color: var(--faint); }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.flow > div { padding: 14px 16px; border-right: 1px solid var(--line); font-size: 13px; color: var(--faint); transition: color 0.25s, background 0.25s; }
.flow > div:last-child { border-right: 0; }
.flow > div b { display: block; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; margin-bottom: 4px; }
.flow > div.on { color: var(--g10); background: var(--accent-soft); }
.flow > div.done { color: var(--g8); }
.flow > div.done b { color: var(--accent); }
pre.code { margin: 0; padding: 16px 18px; overflow-x: auto; background: var(--g0); border-radius: 10px; border: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: var(--g8); white-space: pre; }
pre.code .c { color: var(--g6); }
.tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--g2); border: 1px solid var(--line); }
.tabs button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--g4); color: var(--g10); }
.form-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sel, .inp { height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--g2); padding: 0 12px; font-size: 13.5px; outline: 0; }
.inp { font-family: var(--mono); min-width: 0; flex: 1; }
.sel:focus, .inp:focus { border-color: rgba(65, 207, 214, 0.5); }

/* ── Ask Nezi ───────────────────────────────────────────── */
.chat { display: flex; flex-direction: column; min-height: 460px; }
.msgs { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 22px; }
.msg { max-width: 760px; }
.msg.me { align-self: flex-end; background: var(--g3); padding: 11px 15px; border-radius: 14px 14px 4px 14px; font-size: 14px; }
.msg.nz { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
.msg.nz .av { width: 30px; height: 30px; border-radius: 8px; background: var(--g3) url(/brand/favicon.svg) center / 26px no-repeat; }
.msg.nz .txt { font-size: 14.5px; line-height: 1.65; white-space: pre-wrap; }
.msg.nz .txt .ref { display: inline-block; font-family: var(--mono); font-size: 11px; padding: 0 5px; margin: 0 1px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); cursor: pointer; text-decoration: none; vertical-align: 1px; }
.msg.nz .txt .ref:hover { background: rgba(65, 207, 214, 0.22); }
.msg .chk { margin-top: 10px; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.msg .chk.bad { color: #f3cf8c; }
.msg .rcpts { margin-top: 10px; }
.composer { border-top: 1px solid var(--line); padding: 14px; display: grid; gap: 10px; }
.composer textarea { width: 100%; min-height: 58px; max-height: 180px; resize: vertical; border: 1px solid var(--line-2); border-radius: 12px; background: var(--g2); padding: 12px 14px; outline: 0; font-size: 14px; }
.composer textarea:focus { border-color: rgba(65, 207, 214, 0.5); }
.composer .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.composer label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px 18px; }
.suggest button { background: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 13px; font-size: 12.5px; color: var(--g8); cursor: pointer; text-align: left; }
.suggest button:hover { color: var(--g10); border-color: rgba(255, 255, 255, 0.28); }
.meter { display: inline-flex; align-items: center; gap: 8px; }
.meter i { display: inline-block; width: 70px; height: 4px; border-radius: 2px; background: var(--g4); overflow: hidden; }
.meter i::after { content: ''; display: block; height: 100%; width: var(--w, 100%); background: var(--accent); }

/* ── dialog dompet ──────────────────────────────────────── */
.sheet { border: 1px solid var(--line-2); border-radius: 16px; background: var(--g2); color: var(--text); padding: 0; width: min(92vw, 400px); }
.sheet::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sheet .x { background: none; border: 0; font-size: 22px; color: var(--muted); cursor: pointer; line-height: 1; }
.sheet-body { padding: 10px; display: grid; gap: 6px; }
.sheet-body button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--g1); cursor: pointer; font-weight: 600; text-align: left; }
.sheet-body button:hover { border-color: rgba(65, 207, 214, 0.45); }
.sheet-body img { width: 26px; height: 26px; border-radius: 6px; }
.sheet-note { margin: 0; padding: 0 18px 16px; font-size: 12px; color: var(--faint); }

/* ── HP ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: sticky; top: 58px; z-index: 20; height: auto; flex-direction: row; overflow-x: auto; padding: 8px var(--gut); gap: 4px; border-right: 0; border-bottom: 1px solid var(--line); background: rgba(5, 5, 6, 0.92); backdrop-filter: blur(12px); scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail > a { grid-template-columns: auto; padding: 8px 12px; white-space: nowrap; }
  .rail > a b, .rail > a em { display: none; }
  .rail > a.on { box-shadow: inset 0 -2px 0 var(--accent); }
  .rail-foot { display: none; }
  .stage { padding: 22px var(--gut) 70px; }
  .verdict { grid-template-columns: minmax(0, 1fr); }
  .dial { border-right: 0; border-bottom: 1px solid var(--line); }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow > div:nth-child(2) { border-right: 0; }
  .flow > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .top-chain, .top-sep { display: none; }
  .ca-chip { display: none; }
  .price .what { display: none; }
}
@media (max-width: 480px) {
  .brand span { display: none; }
  .msgs { padding: 16px 12px; }
}
