/* Wallet / funding UI only. Uses the tokens from style.css; nothing here touches the mascot or landing styles. */

/* ---------- portfolio header ---------- */
.tab-wallet { display: grid; gap: 16px; }
.pf-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; }
.pf-value { font-size: clamp(36px, 6vw, 56px); font-weight: 600; letter-spacing: -.04em; line-height: 1.05; margin-top: 4px; }
.pf-delta { margin-top: 6px; min-height: 20px; }
.pf-actions { display: grid; gap: 8px; justify-items: end; }
.pf-btns { margin-top: 0; }
.pf-note { max-width: 300px; text-align: right; }
.pf-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pf-tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 6px; min-width: 0; }
.pf-tile b { font-size: 20px; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- chart ---------- */
.pf-chart { padding: 16px 18px 12px; display: grid; gap: 10px; }
.pf-chart-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-seg { padding: 5px 12px; font-size: 13px; }
.pf-chart-stage { position: relative; padding: 6px 4px 26px 62px; touch-action: pan-y; }
.pf-plot { position: relative; height: 150px; }
.pf-svg { width: 100%; height: 150px; display: block; overflow: visible; }
.pf-grid { stroke: #ffffff14; stroke-width: 1; }
.pf-ylabel { position: absolute; right: 100%; margin-right: 10px; transform: translateY(-50%); font-size: 11.5px; color: var(--muted); white-space: nowrap; pointer-events: none; }
.pf-xlabel { position: absolute; top: 100%; margin-top: 8px; font-size: 11.5px; color: var(--muted); white-space: nowrap; pointer-events: none; }
.pf-dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; box-shadow: 0 0 0 3px rgba(4,6,12,.8); }
.pf-tip { position: absolute; top: 0; transform: translateX(-50%); background: #0B1418; border: 1px solid #2B4249; border-radius: 10px; padding: 4px 10px; font-family: var(--mono); font-size: 12px; white-space: nowrap; pointer-events: none; }

/* ---------- tabs + tables ---------- */
.pf-card { padding: 8px 0 0; overflow: hidden; }
.pf-tabs { display: flex; gap: 2px; overflow-x: auto; padding: 0 12px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.pf-tabs::-webkit-scrollbar { display: none; }
.pf-tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px 12px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.pf-tab:hover { color: var(--text); }
.pf-tab.on { color: var(--bright); border-bottom-color: var(--accent); }
.pf-count { margin-left: 6px; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; }
.pf-table-host { min-height: 120px; }
.pf-scroll { overflow: auto; max-height: 440px; -webkit-overflow-scrolling: touch; }
.pf-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.pf-table th { position: sticky; top: 0; z-index: 1; background: var(--card); text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.pf-table td { padding: 11px 14px; border-bottom: 1px solid #172429; white-space: nowrap; vertical-align: middle; }
.pf-table tbody tr:last-child td { border-bottom: 0; }
.pf-table .num { text-align: right; }
.pf-table td.num { font-size: 13px; }
.pf-mkt { display: inline-flex; align-items: center; gap: 8px; }
.pf-tag { display: inline-block; margin-left: 6px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; }
.pf-empty { padding: 28px 18px; text-align: center; }
.pf-skel { display: grid; gap: 12px; padding: 18px; }
.pf-skel-row { height: 14px; border-radius: 7px; background: linear-gradient(90deg, #121e24, #1a2a31, #121e24); background-size: 200% 100%; animation: pf-shimmer 1.4s linear infinite; }
@keyframes pf-shimmer { to { background-position: -200% 0; } }

/* ---------- advanced ---------- */
.pf-adv { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 20px; }
.pf-adv > summary { cursor: pointer; }
.pf-adv-block { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.pf-adv-block h4 { margin: 0; font-size: 15px; }
.model-details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; margin-bottom: 14px; }
.model-details > summary { cursor: pointer; }

/* ---------- funding panel ---------- */
.fund { display: grid; gap: 16px; }
.fund h3 { font-size: 18px; }
.fund-addr { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.fund-addr-main { display: grid; gap: 10px; min-width: 0; flex: 1 1 260px; }
.fund-chips { display: flex; gap: 6px; }
.fund-chip { font-family: var(--mono); font-size: 11.5px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--bright); background: rgba(80,210,193,.08); }
.fund-lead { font-size: 15px; }
.fund-addr-row { display: flex; align-items: center; gap: 8px; background: #0B1418; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; min-width: 0; }
.fund-addr-row code { font-size: 12.5px; overflow-wrap: anywhere; min-width: 0; }
.fund-qr { background: #fff; border-radius: 12px; padding: 6px; line-height: 0; flex: 0 0 auto; }
.fund-qr svg { display: block; width: 132px; height: 132px; }
.fund-details summary { cursor: pointer; }
.fund-details .kv { margin-top: 10px; }
.fund-big { font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.fund-big span { font-size: 15px; color: var(--muted); font-weight: 400; }
.fund-recv, .fund-wait { display: grid; gap: 8px; background: rgba(80,210,193,.06); border: 1px solid rgba(80,210,193,.25); border-radius: 16px; padding: 16px 18px; }
.fund-wait { background: #0B1418; border-color: var(--line); }
.fund-go { margin-top: 4px; }
.fund-amt { max-width: 180px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; }
.link-btn:hover { color: var(--text); }
.fund-warn { color: #FFD27A; background: rgba(255,210,122,.08); border: 1px solid rgba(255,210,122,.35); border-radius: 12px; padding: 10px 14px; }
.fund-run { display: grid; gap: 12px; }
.fund-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.st { display: flex; gap: 12px; align-items: flex-start; }
.st-dot { flex: 0 0 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; border: 1px solid var(--line); color: var(--muted); }
.st-body { display: grid; gap: 2px; min-width: 0; }
.st-error { overflow-wrap: anywhere; }
.st-active .st-dot { border-color: var(--accent); color: var(--bright); animation: pf-pulse 1.2s ease-in-out infinite; }
.st-ok .st-dot, .st-skipped .st-dot { background: rgba(80,210,193,.14); border-color: rgba(80,210,193,.5); color: var(--bright); }
.st-failed .st-dot { background: rgba(237,112,136,.14); border-color: rgba(237,112,136,.5); color: var(--red); }
.st-pending .st-label { color: var(--muted); }
@keyframes pf-pulse { 50% { opacity: .45; } }

/* ---------- drawer ---------- */
.drawer-scrim { position: fixed; inset: 0; z-index: 100; background: rgba(2,4,8,.72); backdrop-filter: blur(4px); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 101; width: min(480px, 100%); background: var(--bg2); border-left: 1px solid #2B4249; padding: 20px; overflow-y: auto; display: grid; align-content: start; gap: 16px; box-shadow: -30px 0 80px rgba(0,0,0,.6); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-head h3 { font-size: 20px; }
.drawer .card.fund { border: 0; padding: 0; background: none; }
.funds-host:empty { display: none; }

@media (max-width: 760px) {
  .pf-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-actions { justify-items: start; width: 100%; }
  .pf-note { text-align: left; }
  .pf-table { min-width: 560px; }
  .fund-qr svg { width: 112px; height: 112px; }
}
