/* =========================================================
   Schwarzite dashboard
   Builds on styles.css: same tokens, same surfaces.
   ========================================================= */

.is-dashboard{min-height:100vh}
.is-dashboard::before{
  /* the hero's horizon, reduced to a glow at the foot of the page */
  content:"";position:fixed;left:50%;bottom:-62vh;z-index:-1;
  width:160vw;height:90vh;transform:translateX(-50%);
  border-radius:50%;pointer-events:none;
  background:radial-gradient(closest-side,rgba(255,64,0,.22),rgba(255,64,0,0));
}

.dash-nav .nav-blur{opacity:1}
.dash-nav .header-right{display:flex}
.dash-nav-right{gap:12px}

.dash{padding:calc(var(--nav-h) + 30px) 0 80px}
.dash-head{
  display:flex;align-items:flex-end;justify-content:space-between;gap:30px;flex-wrap:wrap;
  margin-bottom:30px;
}
.dash-kicker{
  font-size:12px;line-height:18px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--primary);margin-bottom:10px;
}
.dash-title{font-size:clamp(36px,4vw,56px);line-height:1.05;margin-bottom:12px}
.dash-sub{max-width:62ch;font-size:15px;line-height:23px}

/* progress steps */
.steps{display:flex;gap:6px;flex-wrap:wrap;margin:0;padding:0;list-style:none}
.step{
  display:inline-flex;align-items:center;gap:8px;
  padding:7px 14px 7px 7px;border-radius:40px;
  font-size:13px;line-height:18px;color:var(--muted);
  border:1px solid var(--line-soft);background:rgba(255,255,255,.02);
}
.step-dot{
  display:inline-flex;align-items:center;justify-content:center;
  width:22px;height:22px;border-radius:50%;font-size:11px;
  border:1px solid var(--line);color:var(--muted);
}
.step[data-state="done"]{color:#fff}
.step[data-state="done"] .step-dot{background:var(--primary);border-color:var(--primary);color:#fff}
.step[data-state="current"]{color:#fff;border-color:rgba(255,64,0,.5)}
.step[data-state="current"] .step-dot{border-color:var(--primary);color:var(--primary)}

/* layout */
.dash-grid{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:12px;align-items:start}
.dash-main,.dash-side{display:flex;flex-direction:column;gap:12px;min-width:0}
.dash-side{position:sticky;top:calc(var(--nav-h) + 10px)}

.panel{
  background:var(--surface);
  border:1px solid var(--line-soft);
  border-radius:var(--r-lg);
  padding:clamp(20px,2.4vw,32px);
  display:flex;flex-direction:column;gap:18px;
  min-width:0;
}
.panel.is-muted{opacity:.7}
.panel[hidden]{display:none}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.panel-title{font-family:var(--font-display);font-size:22px;line-height:1.2;font-weight:400}
.panel p{font-size:15px;line-height:23px}

.tag{
  display:inline-flex;align-items:center;
  padding:4px 10px;border-radius:40px;
  font-size:11px;line-height:16px;letter-spacing:.04em;
  border:1px solid var(--line);color:var(--muted-2);
  vertical-align:middle;
}
.tag.is-ok{border-color:rgba(123,216,143,.45);color:#7BD88F}

.actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.btn[disabled]{opacity:.45;cursor:not-allowed}
.btn[disabled]:hover{background:#fff;color:#1A1A1A}
.btn.cc-secondary[disabled]:hover{background:rgba(255,255,255,.1);color:var(--muted-2)}
.btn-sm{min-height:34px;padding:7px 14px;font-size:12px}
.busy{font-size:13px;color:var(--muted)}
.busy::before{
  content:"";display:inline-block;width:8px;height:8px;margin-right:8px;border-radius:50%;
  background:var(--primary);animation:livePulse 1.6s var(--ease) infinite;vertical-align:middle;
}
.note{font-size:14px;color:var(--sand)}
.hint{font-size:13px!important;line-height:19px!important;color:var(--muted)}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12.5px}

.empty{display:flex;flex-direction:column;align-items:flex-start;gap:14px;padding-block:10px}

/* key/value list */
.kv{display:flex;flex-direction:column}
.kv li{
  display:flex;justify-content:space-between;align-items:center;gap:16px;
  min-height:40px;padding-block:8px;
  font-size:13px;line-height:20px;
  border-top:1px solid var(--line-soft);
}
.kv li:first-child{border-top:0}
.kv li > span:first-child{color:var(--muted)}
.kv li > span:last-child{text-align:right;overflow-wrap:anywhere}
.enc{display:inline-flex;align-items:center;gap:6px;color:var(--primary)}
.enc svg{width:12px;height:12px}

/* goal */
.goal-form{display:flex;flex-direction:column;gap:12px}
.field-lite{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--muted)}
.field-lite input,.field-lite select{
  width:100%;padding:11px 14px;
  font:500 15px/22px var(--font-body);color:#fff;
  background:rgba(255,255,255,.04);
  border:1px solid var(--line);border-radius:var(--r-md);
}
.field-lite select option{background:#1A1A1A}
.field-lite input:focus,.field-lite select:focus{outline:none;border-color:var(--primary)}
.goal-form .field-lite{max-width:260px}

.goal-body{display:grid;grid-template-columns:150px minmax(0,1fr);gap:28px;align-items:center}
.ring-wrap{position:relative;width:150px;height:150px}
.ring{width:100%;height:100%;transform:rotate(-90deg)}
.ring-track{fill:none;stroke:rgba(255,255,255,.07);stroke-width:8}
.ring-fill{fill:none;stroke:var(--primary);stroke-width:8;stroke-linecap:round;transition:stroke-dashoffset .8s var(--ease)}
.ring-wrap.is-hidden .ring-fill{stroke:rgba(255,255,255,.16);stroke-dasharray:2 6!important;stroke-linecap:butt}
.ring-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.ring-value{font-family:var(--font-display);font-size:28px;line-height:1}
.ring-label{font-size:12px;color:var(--muted);margin-top:6px}

/* catalog */
.catalog{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px}
.res{
  display:flex;flex-direction:column;align-items:flex-start;gap:6px;
  padding:14px;text-align:left;cursor:pointer;
  font:inherit;color:#fff;
  background:rgba(255,255,255,.025);
  border:1px solid var(--line-soft);border-radius:var(--r-md);
  transition:border-color .25s var(--ease),background .25s var(--ease);
}
.res:hover{border-color:rgba(255,255,255,.2)}
.res[aria-pressed="true"]{border-color:var(--primary);background:rgba(255,64,0,.06)}
.res[disabled]{cursor:not-allowed;opacity:.6}
.res-top{display:flex;justify-content:space-between;gap:10px;width:100%}
.res-name{font-size:14px;line-height:20px}
.res-price{font-size:14px;line-height:20px;color:var(--sand);white-space:nowrap}
.res-blurb{font-size:12.5px;line-height:18px;color:var(--muted)}
.res-kind{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#7BD88F;margin-top:auto}
.res-kind[data-kind="malicious"]{color:var(--primary)}
.res-kind[data-kind="custom"]{color:var(--sand)}

.expect{font-size:14px!important;line-height:21px!important;color:var(--muted-2)}
.inject{
  margin:0;padding:14px 16px;border-radius:var(--r-md);
  border:1px dashed rgba(255,64,0,.45);
  font-size:12.5px;line-height:19px;color:rgba(255,255,255,.7);
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
.inject span{display:block;font-family:var(--font-body);font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--primary);margin-bottom:6px}
.custom-row{display:grid;grid-template-columns:160px minmax(0,1fr);gap:12px}

/* run: one feed, each stage with what was said during it */
.run-feed{display:flex;flex-direction:column;gap:16px;min-width:0}
.timeline{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.tl{
  display:grid;grid-template-columns:14px minmax(0,1fr) auto;column-gap:14px;
  padding:10px 0;font-size:13.5px;line-height:20px;position:relative;
}
.tl::before{content:"";position:absolute;left:6px;top:26px;bottom:-8px;width:1px;background:var(--line)}
.tl:last-child::before{display:none}
.tl-dot{width:13px;height:13px;border-radius:50%;border:1px solid var(--line);margin-top:4px;background:var(--surface);position:relative;z-index:1}
.tl-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;min-width:0}
.tl-label{color:var(--muted)}
.tl-detail{font-size:12px;color:var(--muted)}
.tl-time{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.tl-msgs{grid-column:2 / -1;display:flex;flex-direction:column;gap:8px;margin-top:10px}
.tl[data-status="done"] .tl-dot{background:var(--primary);border-color:var(--primary)}
.tl[data-status="done"] .tl-label{color:#fff}
.tl[data-status="active"] .tl-dot{border-color:var(--primary);box-shadow:0 0 0 4px rgba(255,64,0,.18)}
.tl[data-status="active"] .tl-label{color:#fff}
.tl[data-status="failed"] .tl-dot{background:transparent;border-color:var(--primary);border-width:3px}
.tl[data-status="failed"] .tl-label{color:var(--primary)}
.tl[data-status="skipped"] .tl-label{color:rgba(255,255,255,.28);text-decoration:line-through}
.pulse{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--primary);animation:livePulse 1.4s var(--ease) infinite}

.outcome{padding:14px 16px;border-radius:var(--r-md);border:1px solid var(--line)}
.outcome strong{display:block;font-weight:600;font-size:14px;margin-bottom:4px}
.outcome p{font-size:13.5px!important;line-height:20px!important;color:var(--muted-2)}
.outcome[data-tone="ok"]{border-color:rgba(123,216,143,.4);background:rgba(123,216,143,.05)}
.outcome[data-tone="ok"] strong{color:#7BD88F}
.outcome[data-tone="no"]{border-color:rgba(255,64,0,.45);background:rgba(255,64,0,.06)}
.outcome[data-tone="no"] strong{color:var(--primary)}

.msg{padding:10px 12px;border-radius:var(--r-md);background:rgba(255,255,255,.03);border:1px solid var(--line-soft)}
.msg-who{font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.msg p{font-size:13px!important;line-height:19px!important;margin-top:3px;overflow-wrap:anywhere}
.msg[data-who="vendor"] .msg-who{color:var(--sand)}
.msg[data-who="agent"] .msg-who{color:#9db4ff}
.msg[data-who="vault"] .msg-who{color:var(--primary)}
.msg[data-who="signer"] .msg-who{color:#7BD88F}

.evidence summary{cursor:pointer;font-size:13px;color:var(--muted-2)}
.evidence summary:hover{color:#fff}
.evidence .kv{margin-top:8px}

/* activity + trace */
.trace{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:var(--r-md);border:1px solid var(--line-soft);background:rgba(255,255,255,.02)}
.trace-head{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:13px;color:var(--muted-2)}
.activity{display:flex;flex-direction:column}
.activity li{
  display:grid;grid-template-columns:10px minmax(0,1fr);column-gap:12px;
  padding:10px 0;border-top:1px solid var(--line-soft);font-size:13.5px;line-height:20px;
}
.activity li:first-child{border-top:0}
.a-dot{width:7px;height:7px;border-radius:50%;background:var(--muted);margin-top:7px}
.activity li[data-kind="approved"] .a-dot{background:#7BD88F}
.activity li[data-kind="refused"] .a-dot{background:var(--primary)}
.activity li[data-kind="fund"] .a-dot,.activity li[data-kind="close"] .a-dot{background:var(--sand)}
.a-meta{grid-column:2;font-size:12px;color:var(--muted)}

/* wallets */
.wallets{display:flex;flex-direction:column;gap:8px}
.wallet{
  display:flex;align-items:stretch;gap:4px;
  border:1px solid var(--line-soft);border-radius:var(--r-md);
  background:rgba(255,255,255,.02);
  transition:border-color .25s var(--ease);
}
.wallet[data-active="true"]{border-color:rgba(255,64,0,.55)}
.wallet-main{
  flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px;
  padding:12px 14px;text-align:left;font:inherit;color:#fff;
  background:none;border:0;cursor:pointer;
}
.wallet-label{font-size:14px;line-height:20px;display:flex;align-items:center;gap:8px}
.wallet-addr{color:var(--muted-2)}
.wallet-bal{font-size:12.5px;color:var(--muted)}
.icon-btn{
  flex:none;width:40px;display:flex;align-items:center;justify-content:center;
  background:none;border:0;color:var(--muted);cursor:pointer;border-radius:var(--r-md);
}
.icon-btn svg{width:14px;height:14px}
.icon-btn:hover{color:var(--primary)}
.link-btn{
  align-self:flex-start;background:none;border:0;padding:0;cursor:pointer;
  font:500 12px/18px var(--font-body);color:var(--muted);text-decoration:underline;text-underline-offset:3px;
}
.link-btn:hover{color:var(--primary)}

.guarantees{display:flex;flex-direction:column}
.guarantees li{display:flex;flex-direction:column;gap:2px;padding:11px 0;border-top:1px solid var(--line-soft)}
.guarantees li:first-child{border-top:0;padding-top:0}
.g-title{font-size:14px;line-height:20px}
.g-note{font-size:12.5px;line-height:18px;color:var(--muted)}

/* dialogs */
.modal{
  width:min(480px,calc(100vw - 32px));
  padding:0;border:1px solid var(--line);border-radius:var(--r-lg);
  background:#141414;color:#fff;
}
.modal::backdrop{background:rgba(5,5,5,.6);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.modal-inner{position:relative;display:flex;flex-direction:column;gap:14px;padding:30px}
.modal-title{font-size:30px;line-height:1.1}
.modal-copy{font-size:14px;line-height:21px}
.modal-copy.small{font-size:12.5px}
.modal-close{
  position:absolute;top:16px;right:16px;width:34px;height:34px;
  display:flex;align-items:center;justify-content:center;
  background:none;border:1px solid var(--line);border-radius:50%;color:var(--muted);cursor:pointer;
}
.modal-close svg{width:12px;height:12px}
.modal-close:hover{color:#fff;border-color:rgba(255,255,255,.3)}
.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:4px}

.connect-options{display:flex;flex-direction:column;gap:8px;margin-top:6px}
.connect-option{
  display:flex;flex-direction:column;gap:3px;padding:14px 16px;text-align:left;
  font:inherit;color:#fff;cursor:pointer;
  background:rgba(255,255,255,.03);border:1px solid var(--line-soft);border-radius:var(--r-md);
  transition:border-color .25s var(--ease),background .25s var(--ease);
}
.connect-option:not(.is-form):hover{border-color:var(--primary);background:rgba(255,64,0,.06)}
.connect-option[disabled]{opacity:.5;cursor:not-allowed}
.connect-option[disabled]:hover{border-color:var(--line-soft);background:rgba(255,255,255,.03)}
.connect-option.is-form{cursor:default}
.co-title{font-size:15px;line-height:22px;color:#fff}
.co-note{font-size:13px;line-height:19px;color:var(--muted)}
.co-row{display:flex;gap:8px;margin-top:6px}
.co-row input{
  flex:1 1 auto;min-width:0;padding:9px 12px;
  font:500 13px/20px ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#fff;
  background:rgba(255,255,255,.04);border:1px solid var(--line);border-radius:var(--r-md);
}
.co-row input:focus{outline:none;border-color:var(--primary)}
.co-error{font-size:12px;color:var(--primary)}
.co-error:empty{display:none}

.sign-rows{display:flex;flex-direction:column;border:1px solid var(--line-soft);border-radius:var(--r-md);padding:4px 14px}
.sign-rows li{display:flex;justify-content:space-between;gap:16px;padding:9px 0;border-top:1px solid var(--line-soft);font-size:13px;line-height:19px}
.sign-rows li:first-child{border-top:0}
.sign-rows li span:last-child{text-align:right}

.toast{
  position:fixed;left:50%;bottom:24px;z-index:200;
  transform:translate(-50%,20px);opacity:0;pointer-events:none;
  max-width:calc(100vw - 32px);
  padding:12px 18px;border-radius:40px;
  font-size:13px;line-height:19px;
  background:#222;border:1px solid var(--line);color:#fff;
  transition:opacity .3s var(--ease),transform .3s var(--ease);
}
.toast.is-on{opacity:1;transform:translate(-50%,0)}
.toast[data-tone="ok"]{border-color:rgba(123,216,143,.45)}
.toast[data-tone="error"]{border-color:rgba(255,64,0,.6)}

/* responsive */
@media (max-width:1100px){
  .dash-grid{grid-template-columns:minmax(0,1fr)}
  .dash-side{position:static}
}
@media (max-width:991px){
  .dash-nav .header-right{display:flex}
}
@media (max-width:600px){
  .dash-nav .logo-word{font-size:14px;letter-spacing:.12em}
  .dash-nav #walletChip{padding-inline:12px;white-space:nowrap}
  .chip-bal{display:none}
  .goal-body{grid-template-columns:minmax(0,1fr);justify-items:center}
  .goal-body .kv{width:100%}
  .custom-row{grid-template-columns:minmax(0,1fr)}
  .goal-form .field-lite{max-width:none}
  .modal-inner{padding:24px 20px}
}
