/* Arfi App — wallet dashboard. Requires ../tokens.css + ../kit.css */

[hidden] { display: none !important; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i--xs { width: 12px; height: 12px; }
.i--warn { color: var(--warn); }
.i--down { color: var(--down); }
.inline { display: inline-block; vertical-align: -1px; }
.small { font-size: var(--fs-sm); }
.tiny { font-size: var(--fs-xs); margin-top: .5rem; }
.mb { margin-bottom: 1.25rem; }
.center { text-align: center; }
.h3 { font-size: 1rem; margin-bottom: .6rem; }
.gold-text { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { display: block; font-size: var(--fs-xs); color: var(--muted); font-weight: 400; margin-top: .1rem; }
.tok > span { display: block; line-height: 1.25; }
.tok__ico--w { background: #2b3440; color: var(--gold-300); }
.tok__ico--v { background: #1f3a4d; color: #8cc8ef; }
.tok__ico--o { background: #3a2b4d; color: #c3a6ef; }
.tok__ico--x { background: var(--down-soft); color: var(--down); }
.ibtn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; }
.ibtn:hover { background: var(--card-hover); color: var(--gold-400); }
.ibtn .i { width: 15px; height: 15px; }
.vchk { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--up-soft); color: var(--up); vertical-align: -3px; }
.vchk .i { width: 11px; height: 11px; stroke-width: 2.6; }
.link.small, a.small { font-size: var(--fs-sm); font-weight: 700; }

/* Header account */
.acct { display: inline-flex; align-items: center; gap: .5rem; height: 36px; padding: 0 .75rem 0 .4rem; border-radius: var(--r-sm); background: var(--card); border: 1px solid var(--line); font-size: var(--fs-xs); font-weight: 700; cursor: pointer; }
.acct[hidden], .btn[hidden] { display: none; }
.acct__av { width: 24px; height: 24px; border-radius: 50%; background: conic-gradient(from 40deg, #e9b949, #1f3a4d, #b5841c, #3a2b4d, #e9b949); flex: none; display: inline-block; }
.acct__av--lg { width: 48px; height: 48px; }

/* ---------- Connect state ---------- */
.connect { padding: 4rem 0 3rem; background: radial-gradient(900px 420px at 80% 0%, rgba(233,185,73,.09), transparent 70%); }
.connect[hidden] { display: none; }
.connect__in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3.5rem; align-items: center; }
.connect__copy h1 { font-size: clamp(2.1rem, 4.2vw, 3.3rem); line-height: 1.1; margin: .8rem 0 1.1rem; letter-spacing: -.01em; }
.connect__lead { color: var(--text-2); font-size: var(--fs-lead); max-width: 560px; }
.ticks { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: .7rem; }
.ticks li { display: flex; gap: .65rem; align-items: center; color: var(--text-2); font-size: var(--fs-sm); }
.ticks .i { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--up-soft); color: var(--up); stroke-width: 2.4; }
.connect__box { box-shadow: var(--shadow-card); }
.wallets { display: grid; gap: .6rem; }
.wallet { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line-soft); transition: border-color .15s, background .15s; }
.wallet:hover { border-color: var(--gold-600); background: var(--card-hover); }
.wallet > span { flex: 1; display: grid; line-height: 1.3; }
.wallet small { color: var(--muted); font-size: var(--fs-xs); }
.wallet > .i { color: var(--faint); }
.wico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-weight: 800; flex: none; }
.wico--a { background: #3b2a14; color: #f4a347; }
.wico--b { background: #1d2550; color: #8fa2ff; }
.wico--c { background: #15304d; color: #6cb4ff; }
.wico--d { background: var(--card-hover); color: var(--text-2); }
.connect__warn { margin-top: 1rem; }
.feats { margin-top: 3.5rem; }
.feat { padding: 1.25rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-soft); }
.feat b { display: block; margin: .9rem 0 .3rem; }
.feat p { color: var(--muted); font-size: var(--fs-sm); }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 220px 1fr; gap: 1.75rem; padding: 1.75rem 0 2rem; align-items: start; }
.shell[hidden] { display: none; }
.side { position: sticky; top: 84px; display: grid; gap: .15rem; padding: .5rem; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg); }
.side > button { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .7rem .8rem; border: 0; border-radius: var(--r-md); background: none; color: var(--text-2); font-size: var(--fs-sm); font-weight: 700; text-align: left; cursor: pointer; }
.side > button:hover { background: var(--card); color: var(--text); }
.side > button.is-on { background: var(--card-hover); color: var(--text); box-shadow: inset 3px 0 0 var(--gold-400); }
.side > button.is-on .i { color: var(--gold-400); }
.side__tag { margin-left: auto; font-style: normal; font-size: 10px; font-weight: 800; padding: .1rem .45rem; border-radius: 5px; background: var(--card-hover); color: var(--muted); }
.side__tag--warn { background: var(--down-soft); color: var(--down); }
.side__foot { display: grid; gap: .15rem; margin-top: .5rem; padding: .9rem .8rem .5rem; border-top: 1px solid var(--line-soft); font-size: var(--fs-xs); }
.panes { min-width: 0; }

/* Portfolio header */
.pf { padding: 1.5rem; margin-bottom: 1.25rem; background: linear-gradient(135deg, rgba(233,185,73,.08), transparent 55%), var(--surface); }
.pf__main { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.pf__who { display: flex; gap: .9rem; align-items: center; }
.pf__addr { display: flex; align-items: center; gap: .2rem; font-weight: 700; }
.pf__net { font-size: var(--fs-xs); }
.pf__bal { text-align: right; }
.pf__label { font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.pf__big { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; line-height: 1.15; margin: .2rem 0 .5rem; }
.pf__big small { font-size: .5em; color: var(--muted); font-weight: 700; }
.pf__sub { display: flex; gap: .75rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; font-size: var(--fs-xs); }
.pf__acts { display: flex; gap: .75rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line-soft); }
.act { display: inline-flex; align-items: center; gap: .6rem; padding: .45rem 1rem .45rem .45rem; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line-soft); font-size: var(--fs-sm); font-weight: 700; color: var(--text); cursor: pointer; }
.act:hover { border-color: var(--gold-600); }
.act > span { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-400); }

/* Overview grid */
.ov { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
.ov__main, .ov__side { min-width: 0; }
.head-tools { display: flex; gap: 1rem; flex-wrap: wrap; }
.head-tools .check { font-size: var(--fs-xs); }
.row-acts { display: inline-flex; gap: .35rem; }
.assets td:first-child { min-width: 170px; }
.assets th, .assets td { padding-left: 1rem; padding-right: 1rem; }
.assets .row-acts .ibtn { background: var(--card); border: 1px solid var(--line-soft); }
.card__note { padding: .8rem 1.25rem; border-top: 1px solid var(--line-soft); font-size: var(--fs-xs); color: var(--faint); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1rem; }

/* Quick swap */
.swapbox { padding: .8rem .9rem; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line-soft); }
.swapbox__row { display: flex; justify-content: space-between; font-size: var(--fs-xs); }
.swapbox__in { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .35rem; }
.swapbox__amt { font-size: 1.35rem; font-weight: 700; background: none; border: 0; outline: 0; width: 100%; min-width: 0; padding: 0; }
.swapbox__flip { width: 34px; height: 34px; margin: -10px auto; position: relative; z-index: 1; display: grid; place-items: center; border-radius: 10px; background: var(--card-hover); border: 3px solid var(--surface); color: var(--gold-400); }
.swapbox__flip .i { transform: rotate(90deg); width: 15px; height: 15px; }
.small-rows { margin: .75rem 0 1rem; }
.small-rows > div { font-size: var(--fs-xs); padding: .2rem 0; }

.lpmini > div { display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center; padding: .85rem 1.25rem; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm); }
.lpmini > div:last-child { border-bottom: 0; }
.pair, .tok > .pair { display: inline-flex; }
.pair .tok__ico { width: 24px; height: 24px; border: 2px solid var(--surface); }
.pair .tok__ico + .tok__ico { margin-left: -8px; }
.ov__side .bar { margin-top: .9rem; }

/* Activity rows */
.acts { list-style: none; margin: 0; padding: 0; }
.act-row { display: grid; grid-template-columns: 36px minmax(160px, 1.4fr) minmax(130px, 1fr) 90px 100px 120px; gap: .9rem; align-items: center; padding: .8rem 1.25rem; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm); }
.act-row:last-child { border-bottom: 0; }
.act-row[hidden] { display: none; }
.act-row__ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--card-hover); color: var(--text-2); }
.act-row__ico .i { width: 16px; height: 16px; }
.act-row__ico--recv { background: var(--up-soft); color: var(--up); }
.act-row__ico--send { background: var(--warn-soft); color: var(--warn); }
.act-row__ico--swap { background: var(--gold-soft); color: var(--gold-400); }
.act-row__what { display: grid; line-height: 1.3; min-width: 0; }
.act-row__what small { color: var(--muted); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-row__amt { font-weight: 700; text-align: right; }
.act-row__when { font-size: var(--fs-xs); text-align: right; }
.act-row__tx { display: inline-flex; align-items: center; gap: .3rem; justify-content: flex-end; font-size: var(--fs-xs); }
.ov .act-row { grid-template-columns: 36px minmax(140px, 1.4fr) minmax(120px, 1fr) 84px 96px 110px; }

/* Stake */
.stk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.amt { display: flex; align-items: center; gap: .6rem; padding-right: .4rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.amt:focus-within { border-color: var(--gold-500); }
.amt .input { border: 0; background: none; font-size: 1.15rem; font-weight: 700; min-width: 0; }
.amt .tok { font-size: var(--fs-sm); }
.mini-stats { gap: 1rem; }
.qs { margin: 0; padding-left: 1.1rem; color: var(--text-2); font-size: var(--fs-sm); display: grid; gap: .35rem; }

/* Vesting */
.vb { display: flex; align-items: center; gap: .6rem; min-width: 150px; }
.vb .bar { flex: 1; }
.tl { width: 100%; height: 200px; }
.tl__grid path { stroke: var(--line-soft); stroke-width: 1; }
.tl__area { fill: var(--gold-soft); }
.tl__line { fill: none; stroke: var(--gold-400); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.tl__now { stroke: var(--up); stroke-width: 1.5; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.tl__x { position: relative; height: 1.2rem; font-size: var(--fs-xs); color: var(--faint); margin-top: .5rem; }
.tl__x span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.tl__x span:first-child { transform: none; }
.tl__x span:last-child { transform: translateX(-100%); }
.tl__today { color: var(--up); font-weight: 700; }

/* Security */
.t tr.risk td { background: rgba(234,57,67,.04); }
.sites > div { display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center; padding: .9rem 1.25rem; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm); }
.sites > div:last-child { border-bottom: 0; }

/* Settings switches */
.sw-list { display: grid; }
.sw { display: flex; align-items: center; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; font-size: var(--fs-sm); }
.sw:last-child { border-bottom: 0; }
.sw > span { flex: 1; }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw i { width: 40px; height: 22px; border-radius: 11px; background: var(--card-hover); border: 1px solid var(--line); position: relative; flex: none; transition: background .15s; }
.sw i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.sw input:checked + i { background: var(--gold-soft); border-color: var(--gold-600); }
.sw input:checked + i::after { transform: translateX(18px); background: var(--gold-400); }
.sw input:focus-visible + i { outline: 2px solid var(--gold-400); outline-offset: 2px; }

/* Modals */
.modal .card__head h3 { font-size: 1.05rem; }
.qr { width: 180px; height: 180px; margin: 0 auto; border-radius: var(--r-md); background:
  repeating-linear-gradient(90deg, var(--text) 0 8px, transparent 8px 16px),
  repeating-linear-gradient(0deg, var(--text) 0 8px, transparent 8px 20px);
  background-blend-mode: difference; border: 12px solid var(--text); opacity: .9; }
.addr-full { font-size: var(--fs-xs); word-break: break-all; color: var(--text-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .ov { grid-template-columns: 1fr; }
  .ov__side { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .ov__side > * + * { margin-top: 0; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; gap: 1rem; padding-top: 1rem; }
  .side { position: static; display: flex; overflow-x: auto; padding: .35rem; border-radius: var(--r-md); }
  .side > button { width: auto; white-space: nowrap; padding: .55rem .8rem; }
  .side > button.is-on { box-shadow: inset 0 -2px 0 var(--gold-400); }
  .side__foot { display: none; }
  .connect__in { grid-template-columns: 1fr; gap: 2rem; }
  .stk { grid-template-columns: minmax(0, 1fr); }
  .stk > * { min-width: 0; }
}
@media (max-width: 640px) {
  .connect { padding-top: 2rem; }
  .top__right .chip-net { display: none; }
  .ov__side { grid-template-columns: 1fr; }
  .pf { padding: 1.1rem; }
  .pf__bal { text-align: left; }
  .pf__sub { justify-content: flex-start; }
  .pf__acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
  .act { flex-direction: column; padding: .6rem .2rem; gap: .35rem; font-size: var(--fs-xs); }
  .acts .act-row, .ov .act-row { grid-template-columns: 36px 1fr auto; row-gap: .2rem; }
  .act-row__when { display: none; }
  .act-row__tx { grid-column: 2; grid-row: 2; justify-content: flex-start; }
  .act-row__st { grid-column: 3; grid-row: 2; justify-self: end; }
  .act-row__ico { grid-row: 1 / 3; }
  .card__head { flex-wrap: wrap; }
  .phead__right { width: 100%; overflow-x: auto; }
  .sites > div { grid-template-columns: 1fr auto; }
  .sites .btn { grid-column: 1 / -1; }
  .mini-stats { grid-template-columns: 1fr; }
}
