:root {
  /* palet yang sama dengan landing (style.css) */
  --bg: #ececf2;
  --ink: #23260f;
  --panel: linear-gradient(160deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .4));
  --panel2: rgba(255, 255, 255, .62);
  --line: rgba(35, 38, 15, .1);
  --line2: rgba(35, 38, 15, .22);
  --glass: inset 0 0 0 1px rgba(255, 255, 255, .85), 0 14px 30px -22px rgba(35, 38, 15, .35);
  --text: #17180f;
  --dim: rgba(23, 24, 15, .56);
  --gold: #8a6420;
  --gold2: #c9a46a;
  --goldfill: #e2c58e;
  --up: #2e7d43;
  --down: #c0442f;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  color: var(--text);
  background:
    radial-gradient(60% 70% at 30% 20%, #f3f3f8 0%, transparent 70%),
    linear-gradient(180deg, #eeeef4 0%, #e7e7ee 100%);
  font-family: 'Inter Tight', system-ui, sans-serif; font-size: 14px;
  display: flex; flex-direction: column; overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2 { margin: 0; }

/* ---------- top bar ---------- */
.top {
  display: flex; align-items: center; gap: 22px; padding: 0 20px; height: 52px; flex: none;
  border-bottom: 1px solid var(--line); background: rgba(243, 243, 248, .6); backdrop-filter: blur(12px);
  font-family: var(--mono); font-size: 12px;
}
.brand { display: flex; align-items: center; gap: 8px; font-family: 'Inter Tight', sans-serif; font-weight: 800; font-size: 17px; letter-spacing: .04em; color: var(--ink); text-decoration: none; }
.brand span { font-family: 'Inter Tight', sans-serif; font-weight: 600; font-size: 12px; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }
.burst { width: 22px; height: 22px; color: var(--ink); flex: none; }
.status { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: #f7f7fa; box-shadow: inset 0 0 0 1px #8b8b96; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.status.open i { background: var(--up); box-shadow: 0 0 8px var(--up); }
.status.closed i { background: var(--gold2); box-shadow: 0 0 8px var(--gold2); }
.clock { color: var(--dim); }
.src { margin-left: auto; color: var(--dim); }

/* ---------- grid ---------- */
.grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(300px, 340px) 1fr minmax(300px, 360px); }
.panel { min-height: 0; overflow: auto; border-right: 1px solid var(--line); }
.panel:last-child { border-right: 0; }
.phead { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 18px 10px; position: sticky; top: 0; background: rgba(236, 236, 242, .88); backdrop-filter: blur(10px); z-index: 1; }
.phead h2 { font-family: 'Inter Tight', sans-serif; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.hint { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }

/* ---------- watchlist ---------- */
.watch { list-style: none; margin: 0; padding: 0 10px 8px; }
.watch li {
  display: grid; grid-template-columns: 62px 1fr 76px 64px; align-items: center; gap: 8px;
  padding: 9px 8px; border-radius: 10px; cursor: pointer; font-family: var(--mono); font-size: 12.5px;
}
.watch li:hover { background: var(--panel2); box-shadow: var(--glass); }
.watch .sym { font-weight: 600; display: flex; flex-direction: column; gap: 2px; }
.watch .sym small { font-size: 9.5px; font-weight: 500; letter-spacing: .08em; color: var(--dim); }
.watch .sym small.stk { color: var(--gold); }
.watch svg { width: 100%; height: 26px; display: block; }
.watch .px { text-align: right; }
.watch .ch { text-align: right; font-weight: 600; }
.up { color: var(--up); }
.down { color: var(--down); }
.skel { color: var(--dim); padding: 10px 18px; font-family: var(--mono); font-size: 12px; }

/* ---------- matrix ---------- */
.matrix { padding: 0 18px 22px; }
.matrix table { border-collapse: separate; border-spacing: 2px; width: 100%; font-family: var(--mono); font-size: 9.5px; table-layout: fixed; }
.matrix th { color: var(--dim); font-weight: 500; padding: 2px 0; text-align: center; overflow: hidden; }
.matrix th.r { text-align: right; padding-right: 4px; width: 46px; }
.matrix td { height: 24px; border-radius: 4px; text-align: center; color: rgba(23, 24, 15, .8); font-weight: 600; cursor: pointer; }
.matrix td.hi { color: #f5f0e2; }
.matrix td.self { background: var(--ink) !important; opacity: .12; color: transparent; cursor: default; }

/* ---------- feed ---------- */
.center { display: flex; flex-direction: column; overflow: hidden; }
.feed { flex: 1; min-height: 0; overflow: auto; padding: 26px clamp(18px, 4vw, 56px) 16px; display: flex; flex-direction: column; gap: 18px; }
.hello { margin: auto 0; max-width: 680px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: clamp(15px, 1.5vw, 22px); font-weight: 600; text-transform: uppercase; color: var(--ink); }
.eyebrow .burst { width: 28px; height: 28px; }
.hello h1 { font-family: 'Archivo', sans-serif; font-weight: 900; font-stretch: 91%; font-size: clamp(48px, 7vw, 112px); line-height: .88; letter-spacing: -.03em; text-transform: uppercase; color: var(--ink); }
.hello p { color: var(--dim); font-size: 15px; line-height: 1.5; max-width: 560px; margin: 16px 0 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  text-align: left; padding: 10px 16px; border-radius: 20px; background: #f7f7fa; box-shadow: inset 0 0 0 1px #8b8b96;
  font-size: 13.5px; font-weight: 500; line-height: 1.35; max-width: 100%; transition: background-color .2s, color .2s;
}
.chips button:hover { background: var(--ink); color: #f5f5f0; }

.msg { max-width: 760px; line-height: 1.55; font-size: 14.5px; }
.msg.user { align-self: flex-end; background: var(--ink); color: #f5f5f0; padding: 10px 16px; border-radius: 18px 18px 4px 18px; }
.msg.agent p { margin: 0 0 10px; }
.msg.agent p:last-child { margin-bottom: 0; }
.msg.agent ul, .msg.agent ol { margin: 0 0 10px; padding-left: 20px; }
.msg.agent code { font-family: var(--mono); font-size: .9em; background: var(--panel2); padding: 1px 5px; border-radius: 4px; }
.msg.agent strong { color: var(--ink); }
.md-t { border-collapse: collapse; margin: 4px 0 12px; font-family: var(--mono); font-size: 12.5px; }
.md-t th, .md-t td { padding: 6px 12px 6px 0; text-align: left; border-bottom: 1px solid var(--line); }
.md-t th { color: var(--gold); font-weight: 600; }
.msg.notice { color: var(--gold); font-family: var(--mono); font-size: 12.5px; }
.msg.error { color: var(--down); font-family: var(--mono); font-size: 12.5px; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { opacity: .25; } }

/* tool call */
.tool { max-width: 760px; border-radius: 14px; background: var(--panel); box-shadow: var(--glass); font-family: var(--mono); font-size: 12px; }
.tool-h { display: flex; align-items: center; gap: 10px; padding: 9px 12px; }
.tool-h .g { padding: 2px 8px; border-radius: 99px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; background: rgba(201, 164, 106, .22); color: var(--gold); }
.tool-h .n { font-weight: 600; }
.tool-h .a { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.tool-h .s { margin-left: auto; }
.tool.run .s::after { content: '…'; color: var(--gold); }
.tool.ok .s::after { content: '✓'; color: var(--up); }
.tool.fail .s::after { content: '✕'; color: var(--down); }
.tool-b { padding: 0 12px 12px; }
.lagchart { display: flex; align-items: flex-end; gap: 2px; height: 70px; margin-top: 4px; }
.lagchart i { flex: 1; background: rgba(35, 38, 15, .14); border-radius: 2px 2px 0 0; min-height: 1px; }
.lagchart i.best { background: linear-gradient(180deg, var(--goldfill), var(--gold)); }
.lagchart i.neg { background: rgba(192, 68, 47, .3); }
.lagaxis { display: flex; justify-content: space-between; color: var(--dim); font-size: 10px; margin-top: 4px; }
.kv { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; }
.kv b { color: var(--gold); font-weight: 600; }

/* ---------- input ---------- */
.ask { display: flex; gap: 10px; align-items: flex-end; margin: 0 clamp(18px, 4vw, 56px); padding: 10px; border-radius: 99px; background: var(--panel); box-shadow: var(--glass), inset 0 0 0 1px #8b8b96; padding-left: 18px; }
.ask:focus-within { box-shadow: var(--glass), inset 0 0 0 1px var(--ink); }
.ask textarea { flex: 1; resize: none; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 15px; line-height: 1.45; max-height: 160px; padding: 6px 6px; }
.send { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #f5f5f0; display: grid; place-items: center; flex: none; }
.send svg { width: 20px; height: 20px; }
.send:disabled { opacity: .4; cursor: default; }
.foot { display: flex; justify-content: space-between; padding: 10px clamp(18px, 4vw, 56px) 14px; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.foot button { color: var(--dim); text-decoration: underline; text-underline-offset: 3px; }
.foot button:hover { color: var(--text); }

/* ---------- basket ---------- */
.basket, .shield { margin: 0 18px 8px; padding: 16px; border-radius: 18px; background: var(--panel); box-shadow: var(--glass); backdrop-filter: blur(14px); }
.empty { margin: 0; color: var(--dim); font-size: 13px; line-height: 1.5; }
.bk-amt { font-family: 'Archivo', sans-serif; font-weight: 900; font-stretch: 85%; font-size: 34px; line-height: 1; color: var(--ink); }
.bk-amt small { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--dim); margin-left: 6px; }
.bk-cond { margin: 10px 0 0; font-size: 12.5px; color: var(--dim); line-height: 1.45; }
.bk-cond b { color: var(--gold); font-weight: 600; }
.legs { display: grid; gap: 10px; margin: 16px 0; }
.leg { display: grid; grid-template-columns: 56px 1fr 44px; gap: 10px; align-items: center; font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
.leg .bar { height: 8px; border-radius: 99px; background: rgba(35, 38, 15, .08); overflow: hidden; }
.leg .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--goldfill), var(--gold)); border-radius: inherit; }
.leg em { font-style: normal; text-align: right; }
.leg small { grid-column: 2 / 4; font-weight: 400; color: var(--dim); font-size: 11px; margin-top: -6px; }
.route { list-style: none; margin: 0 0 14px; padding: 0; font-family: var(--mono); font-size: 11.5px; color: var(--dim); display: grid; gap: 6px; counter-reset: r; }
.route li { counter-increment: r; display: flex; gap: 8px; }
.route li::before { content: counter(r); color: var(--gold); }
.approve { width: 100%; padding: 13px; border-radius: 99px; background: var(--ink); color: #f5f5f0; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; transition: transform .2s; }
.approve:hover:not(:disabled) { transform: translateY(-1px); }
.approve:disabled { background: rgba(35, 38, 15, .08); color: var(--dim); cursor: not-allowed; }
.bk-note { margin: 8px 0 0; font-family: var(--mono); font-size: 10.5px; color: var(--dim); text-align: center; }

/* ---------- shield ---------- */
.sh-state { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.sh-state i { width: 10px; height: 10px; border-radius: 50%; background: var(--up); }
.shield.alert .sh-state i { background: var(--down); box-shadow: 0 0 10px var(--down); }
.sh-rows { display: grid; gap: 6px; margin-top: 12px; font-family: var(--mono); font-size: 12px; }
.sh-rows div { display: flex; justify-content: space-between; }
.sh-ask { margin-top: 12px; font-size: 12.5px; color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- mcp ---------- */
.mcp { list-style: none; margin: 0 18px 24px; padding: 0; display: grid; gap: 8px; }
.mcp li { display: grid; grid-template-columns: 10px 1fr auto; gap: 2px 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--panel); box-shadow: var(--glass); transition: box-shadow .3s; }
.mcp li i { width: 8px; height: 8px; border-radius: 50%; background: var(--up); grid-row: span 2; }
.mcp li b { font-size: 13px; }
.mcp li span { grid-column: 2; font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.mcp li em { grid-row: 1 / 3; grid-column: 3; font-style: normal; font-family: var(--mono); color: var(--dim); }
.mcp li.busy { box-shadow: inset 0 0 0 1px var(--gold2), 0 0 18px rgba(201, 164, 106, .35); }
.mcp li.busy i { background: var(--gold2); animation: dot .5s infinite; }

/* ---------- wallet & execution ---------- */
.wallet { height: 38px; padding: 0 20px; border-radius: 99px; background: var(--ink); color: #f5f5f0; font-family: 'Inter Tight', sans-serif; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .01em; transition: transform .2s; }
.wallet:hover:not(:disabled) { transform: translateY(-1px); }
.wallet.on { background: #f7f7fa; color: var(--ink); box-shadow: inset 0 0 0 1px #8b8b96; font-family: var(--mono); font-weight: 500; text-transform: none; }
.wallet:disabled { background: #f7f7fa; color: var(--dim); box-shadow: inset 0 0 0 1px var(--line2); cursor: default; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 10; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: min(560px, 92vw); padding: 12px 18px; border-radius: 99px; background: var(--ink); color: #f5f5f0;
  box-shadow: 0 18px 40px -16px rgba(35, 38, 15, .55); font-size: 13.5px; transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { box-shadow: 0 18px 40px -16px rgba(35, 38, 15, .55), inset 0 0 0 2px rgba(110, 200, 130, .7); }
.toast.error { box-shadow: 0 18px 40px -16px rgba(35, 38, 15, .55), inset 0 0 0 2px rgba(240, 120, 100, .8); }
.card { margin: 0 18px 8px; padding: 16px; border-radius: 18px; background: var(--panel); box-shadow: var(--glass); backdrop-filter: blur(14px); display: grid; gap: 12px; }
.pf-total { font-family: 'Archivo', sans-serif; font-weight: 900; font-stretch: 85%; font-size: 30px; line-height: 1; color: var(--ink); display: flex; align-items: baseline; justify-content: space-between; }
.pf-total small { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--dim); }
.pf-rows { display: grid; gap: 6px; font-family: var(--mono); font-size: 12px; }
.pf-rows div { display: grid; grid-template-columns: 58px 1fr 84px 50px; gap: 8px; }
.pf-rows div span:nth-child(n+2) { text-align: right; }
.pf-rows .w { color: var(--gold); }
.ghostbtn { padding: 10px 14px; border-radius: 99px; background: #f7f7fa; box-shadow: inset 0 0 0 1px #8b8b96; font-size: 13px; font-weight: 600; transition: background-color .2s, color .2s; }
.ghostbtn:hover:not(:disabled) { background: var(--ink); color: #f5f5f0; }
.ghostbtn:disabled { opacity: .5; cursor: default; }
.ghostbtn.danger { color: var(--down); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > * { flex: 1; }
.link { color: var(--dim); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--down); }
.perm { display: grid; gap: 8px; }
.perm > div:first-child { display: flex; align-items: center; gap: 8px; }
.perm i { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); }
.perm.on i { background: var(--up); box-shadow: 0 0 8px var(--up); }
.perm-kv { display: flex; flex-wrap: wrap; gap: 4px 14px; font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.perm-kv b { color: var(--text); font-weight: 600; }
.perm small, .rule small { color: var(--dim); font-size: 11.5px; line-height: 1.4; }
.draft { padding: 14px; border-radius: 14px; background: rgba(226, 197, 142, .18); box-shadow: inset 0 0 0 1px rgba(138, 100, 32, .35); display: grid; gap: 8px; }
.draft b { color: var(--gold); }
.draft p, .rule p { margin: 0; font-size: 13px; line-height: 1.45; }
.draft .approve { padding: 10px; }
.rule { padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.rule > div { display: flex; justify-content: space-between; align-items: baseline; }
.activity { list-style: none; margin: 0 18px 8px; padding: 0; display: grid; gap: 8px; }
.activity li { padding: 12px; border-radius: 14px; background: var(--panel); box-shadow: var(--glass); font-size: 12.5px; display: grid; gap: 4px; }
.activity li.empty { color: var(--dim); }
.activity li.executed { box-shadow: inset 3px 0 0 var(--up), inset 0 0 0 1px rgba(255,255,255,.85); }
.activity li.partial { box-shadow: inset 3px 0 0 var(--gold2), inset 0 0 0 1px rgba(255,255,255,.85); }
.activity li.blocked { box-shadow: inset 3px 0 0 var(--down), inset 0 0 0 1px rgba(255,255,255,.85); }
.activity li > div { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.activity li > div b { color: var(--gold); text-transform: uppercase; letter-spacing: .06em; }
.activity p { margin: 0; line-height: 1.4; }
.activity .tr { font-family: var(--mono); font-size: 11px; }
.activity .tr.ok { color: var(--up); }
.activity .tr.no { color: var(--down); }
.activity a, .bk-note a { color: var(--gold); }

/* ---------- small screens ---------- */
@media (max-width: 1100px) {
  .grid { grid-template-columns: 300px 1fr; }
  .right { display: none; }
}
@media (max-width: 760px) {
  body { overflow: auto; height: auto; }
  .top { gap: 12px; padding: 0 14px; }
  .clock, .src { display: none; }
  .grid { display: flex; flex-direction: column; }
  .panel { overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .center { order: -1; min-height: 88svh; }
  .right { display: block; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* logo koin */
.brand .mark { width: 28px; height: 28px; flex: none; }
