/* ============================================================
   Sparrow Vault v2 — Real non-custodial wallets
   Sidebar list + main panel. Midnight Indigo · Sora/Manrope.
   ============================================================ */

.vv-shell{
  --vv-bg: rgba(10,10,26,.55);
  --vv-panel: rgba(20,20,50,.55);
  --vv-panel-2: rgba(30,30,80,.35);
  --vv-border: rgba(120,130,220,.18);
  --vv-border-strong: rgba(140,150,240,.35);
  --vv-accent: #6366f1;
  --vv-accent-2: #818cf8;
  --vv-accent-soft: rgba(99,102,241,.18);
  --vv-text: #e6e8f2;
  --vv-text-dim: #9aa3c7;
  --vv-danger: #ef4444;
  --vv-success: #10b981;
  --vv-warn: #f59e0b;
  color: var(--vv-text);
  font-family: 'Manrope', system-ui, sans-serif;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  min-height: calc(100vh - 140px);
}

.vv-shell h1,.vv-shell h2,.vv-shell h3,.vv-shell h4{ font-family:'Sora',sans-serif; font-weight:600; letter-spacing:-.01em; }

.vv-shell *{ box-sizing:border-box; }

/* ---------- Sidebar ---------- */
.vv-sidebar{
  background: linear-gradient(180deg, rgba(30,30,90,.35), rgba(10,10,30,.55));
  border:1px solid var(--vv-border);
  border-radius:18px;
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:12px;
  backdrop-filter: blur(24px);
  position:sticky; top:12px; align-self:flex-start;
  max-height: calc(100vh - 160px);
}
.vv-sidebar-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:4px; }
.vv-sidebar-head h2{ margin:0; font-size:18px; }
.vv-sidebar-head .vv-net-pill{
  font-size:10px; padding:4px 8px; border-radius:999px;
  background: rgba(16,185,129,.15); color:#34d399; border:1px solid rgba(16,185,129,.3);
  font-weight:600; letter-spacing:.04em; text-transform:uppercase;
}

.vv-portfolio-card{
  background: linear-gradient(135deg, rgba(99,102,241,.22), rgba(139,92,246,.12));
  border:1px solid var(--vv-border-strong);
  border-radius:14px; padding:14px;
}
.vv-portfolio-card .lbl{ font-size:11px; color:var(--vv-text-dim); text-transform:uppercase; letter-spacing:.06em; }
.vv-portfolio-card .val{ font-family:'Sora',sans-serif; font-size:26px; font-weight:700; margin-top:2px; }
.vv-portfolio-card .sub{ font-size:12px; color:var(--vv-text-dim); margin-top:4px; }

.vv-asset-list{ display:flex; flex-direction:column; gap:6px; overflow-y:auto; padding-right:4px; }
.vv-asset-list::-webkit-scrollbar{ width:6px; }
.vv-asset-list::-webkit-scrollbar-thumb{ background:rgba(120,130,220,.25); border-radius:6px; }

.vv-asset-item{
  display:grid; grid-template-columns:32px 1fr auto; gap:10px; align-items:center;
  padding:10px 12px; border-radius:12px; cursor:pointer;
  background: transparent; border:1px solid transparent;
  transition: all .16s ease; text-align:left; width:100%; color:inherit; font:inherit;
}
.vv-asset-item:hover{ background: rgba(99,102,241,.08); border-color:var(--vv-border); }
.vv-asset-item.active{ background: var(--vv-accent-soft); border-color:var(--vv-border-strong); box-shadow: 0 0 0 1px var(--vv-border-strong) inset; }
.vv-asset-item .vv-ico{ width:32px; height:32px; border-radius:50%; overflow:hidden; background:#151530; display:flex; align-items:center; justify-content:center; }
.vv-asset-item .vv-ico img{ width:100%; height:100%; }
.vv-asset-item .vv-meta{ min-width:0; }
.vv-asset-item .vv-meta b{ display:block; font-size:13px; font-weight:600; }
.vv-asset-item .vv-meta small{ display:block; font-size:11px; color:var(--vv-text-dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.vv-asset-item .vv-val{ text-align:right; }
.vv-asset-item .vv-val b{ display:block; font-size:13px; font-weight:600; font-family:'Sora',sans-serif; }
.vv-asset-item .vv-val small{ display:block; font-size:10px; color:var(--vv-text-dim); }

.vv-sidebar-actions{ display:flex; gap:8px; margin-top:auto; padding-top:12px; border-top:1px solid var(--vv-border); }
.vv-sidebar-actions button{ flex:1; }

/* ---------- Main panel ---------- */
.vv-main{
  display:flex; flex-direction:column; gap:16px;
}

.vv-empty-state{
  background: var(--vv-panel);
  border:1px solid var(--vv-border);
  border-radius:20px;
  padding:48px 32px;
  text-align:center;
  backdrop-filter: blur(24px);
}
.vv-empty-state .vv-empty-icon{
  width:72px; height:72px; margin:0 auto 20px;
  border-radius:20px;
  background: linear-gradient(135deg, var(--vv-accent), #a78bfa);
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 12px 40px -12px rgba(99,102,241,.5);
}
.vv-empty-state h2{ margin:0 0 8px; font-size:24px; }
.vv-empty-state p{ margin:0 auto 24px; max-width:520px; color:var(--vv-text-dim); font-size:14px; line-height:1.55; }
.vv-empty-state .vv-empty-cta{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }

/* Wallet header (top of main when unlocked) */
.vv-wallet-head{
  display:grid; grid-template-columns: 56px 1fr auto; gap:14px; align-items:center;
  padding:16px 20px;
  background: var(--vv-panel); border:1px solid var(--vv-border); border-radius:16px;
  backdrop-filter: blur(24px);
}
.vv-wallet-head .vv-chain-ico{ width:56px; height:56px; border-radius:16px; overflow:hidden; background:#151530; display:flex; align-items:center; justify-content:center; }
.vv-wallet-head .vv-chain-ico img{ width:100%; height:100%; }
.vv-wallet-head h2{ margin:0; font-size:20px; }
.vv-wallet-head .vv-bal{ font-family:'Sora',sans-serif; font-size:14px; color:var(--vv-text-dim); }
.vv-wallet-head .vv-bal b{ color:var(--vv-text); font-weight:600; }
.vv-wallet-head .vv-head-usd{ text-align:right; }
.vv-wallet-head .vv-head-usd b{ font-family:'Sora',sans-serif; font-size:24px; font-weight:700; }
.vv-wallet-head .vv-head-usd small{ display:block; font-size:11px; color:var(--vv-text-dim); text-transform:uppercase; letter-spacing:.05em; }

/* Tabs */
.vv-tabs{ display:flex; gap:4px; background:var(--vv-panel-2); padding:4px; border-radius:12px; border:1px solid var(--vv-border); width:fit-content; }
.vv-tabs button{
  background:transparent; border:none; color:var(--vv-text-dim);
  padding:8px 18px; font:600 13px 'Manrope',sans-serif; border-radius:8px; cursor:pointer;
  transition:all .16s ease;
}
.vv-tabs button:hover{ color:var(--vv-text); }
.vv-tabs button.active{ background: var(--vv-accent); color:white; box-shadow: 0 6px 20px -6px rgba(99,102,241,.6); }

.vv-tab-panel{
  background: var(--vv-panel); border:1px solid var(--vv-border); border-radius:16px;
  padding:24px; backdrop-filter: blur(24px);
}

/* Receive */
.vv-receive{ display:grid; grid-template-columns: 220px 1fr; gap:28px; align-items:center; }
.vv-qr-box{ background:white; padding:14px; border-radius:14px; width:220px; height:220px; display:flex; align-items:center; justify-content:center; }
.vv-qr-box canvas,.vv-qr-box img,.vv-qr-box svg{ width:100%; height:100%; display:block; }
.vv-receive-info h3{ margin:0 0 6px; font-size:16px; }
.vv-receive-info p{ margin:0 0 14px; color:var(--vv-text-dim); font-size:13px; line-height:1.5; }
.vv-address-box{
  background: rgba(0,0,0,.35); border:1px solid var(--vv-border);
  border-radius:10px; padding:12px 14px;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size:12px; word-break:break-all;
  margin-bottom:12px;
}
.vv-copy-row{ display:flex; gap:8px; flex-wrap:wrap; }

/* Send */
.vv-send{ display:flex; flex-direction:column; gap:14px; max-width:600px; }
.vv-send label{ display:block; font-size:11px; font-weight:600; color:var(--vv-text-dim); text-transform:uppercase; letter-spacing:.06em; margin-bottom:6px; }
.vv-send input, .vv-send select, .vv-send textarea{
  width:100%; background: rgba(0,0,0,.3); border:1px solid var(--vv-border); border-radius:10px;
  padding:11px 14px; color:var(--vv-text); font:500 14px 'Manrope',sans-serif; transition: border-color .16s;
}
.vv-send input:focus, .vv-send select:focus, .vv-send textarea:focus{ outline:none; border-color: var(--vv-accent-2); box-shadow: 0 0 0 3px rgba(99,102,241,.18); }
.vv-send-row{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
.vv-token-select{ display:flex; gap:6px; flex-wrap:wrap; margin-bottom:8px; }
.vv-token-select button{
  padding:6px 12px; border-radius:999px; background:var(--vv-panel-2); border:1px solid var(--vv-border);
  color:var(--vv-text-dim); font:600 12px 'Manrope',sans-serif; cursor:pointer; transition:all .16s;
}
.vv-token-select button.active{ background:var(--vv-accent); color:white; border-color:transparent; }
.vv-percent-row{ display:flex; gap:6px; }
.vv-percent-row button{
  flex:1; padding:8px; background:var(--vv-panel-2); border:1px solid var(--vv-border); color:var(--vv-text-dim);
  border-radius:8px; font:600 11px 'Manrope',sans-serif; cursor:pointer; transition:all .16s;
}
.vv-percent-row button:hover{ color:var(--vv-text); border-color:var(--vv-border-strong); }
.vv-fee-row{
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 14px; background:var(--vv-panel-2); border:1px solid var(--vv-border); border-radius:10px;
  font-size:12px;
}
.vv-fee-row .lbl{ color:var(--vv-text-dim); }
.vv-fee-row b{ font-family:'Sora',sans-serif; font-weight:600; }

.vv-btn{
  border:none; cursor:pointer; padding:11px 18px; border-radius:10px;
  font:600 13px 'Manrope',sans-serif; letter-spacing:.01em;
  transition:all .16s ease; display:inline-flex; align-items:center; gap:8px; justify-content:center;
}
.vv-btn:disabled{ opacity:.5; cursor:not-allowed; }
.vv-btn.primary{ background: linear-gradient(135deg, var(--vv-accent), var(--vv-accent-2)); color:white; box-shadow: 0 8px 24px -8px rgba(99,102,241,.5); }
.vv-btn.primary:hover:not(:disabled){ transform: translateY(-1px); box-shadow: 0 12px 32px -8px rgba(99,102,241,.7); }
.vv-btn.ghost{ background: var(--vv-panel-2); color:var(--vv-text); border:1px solid var(--vv-border); }
.vv-btn.ghost:hover:not(:disabled){ border-color: var(--vv-border-strong); background: rgba(99,102,241,.1); }
.vv-btn.danger{ background: rgba(239,68,68,.15); color:#f87171; border:1px solid rgba(239,68,68,.35); }
.vv-btn.danger:hover:not(:disabled){ background: rgba(239,68,68,.25); }
.vv-btn.sm{ padding:7px 12px; font-size:12px; }

.vv-msg{ padding:10px 14px; border-radius:10px; font-size:13px; margin-top:6px; display:none; }
.vv-msg.show{ display:block; }
.vv-msg.success{ background: rgba(16,185,129,.12); color:#34d399; border:1px solid rgba(16,185,129,.28); }
.vv-msg.error{ background: rgba(239,68,68,.12); color:#f87171; border:1px solid rgba(239,68,68,.28); }
.vv-msg.info{ background: var(--vv-accent-soft); color:var(--vv-accent-2); border:1px solid var(--vv-border-strong); }

/* History */
.vv-history{ display:flex; flex-direction:column; gap:8px; max-height:420px; overflow-y:auto; padding-right:4px; }
.vv-history-item{
  display:grid; grid-template-columns:36px 1fr auto; gap:12px; align-items:center;
  padding:12px 14px; background:var(--vv-panel-2); border:1px solid var(--vv-border); border-radius:12px;
}
.vv-history-item .dir{ width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:14px; font-weight:700; }
.vv-history-item .dir.out{ background: rgba(239,68,68,.15); color:#f87171; }
.vv-history-item .dir.in{ background: rgba(16,185,129,.15); color:#34d399; }
.vv-history-item .m b{ display:block; font-size:13px; font-weight:600; }
.vv-history-item .m small{ display:block; font-size:11px; color:var(--vv-text-dim); word-break:break-all; }
.vv-history-item .m a{ color:var(--vv-accent-2); text-decoration:none; font-size:11px; }
.vv-history-item .m a:hover{ text-decoration:underline; }
.vv-history-item .amt{ text-align:right; font-family:'Sora',sans-serif; font-weight:600; font-size:13px; }
.vv-history-empty{ text-align:center; color:var(--vv-text-dim); padding:30px; font-size:13px; }

/* ---------- Modals (Seed + Send confirm + Restore) ---------- */
.vv-modal{
  position:fixed; inset:0; background: rgba(5,5,15,.7); backdrop-filter: blur(8px);
  display:none; align-items:center; justify-content:center; z-index:1000; padding:20px;
}
.vv-modal:not(.show){ display:none !important; pointer-events:none !important; }
.vv-modal.show{ display:flex !important; pointer-events:auto !important; }
.vv-modal-card{
  background: linear-gradient(160deg, rgba(30,30,80,.9), rgba(10,10,30,.95));
  border:1px solid var(--vv-border-strong); border-radius:20px;
  max-width:560px; width:100%; padding:28px; color:var(--vv-text);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.6);
  max-height: 90vh; overflow-y: auto;
}
.vv-modal-card h2{ margin:0 0 8px; font-size:22px; }
.vv-modal-card .sub{ margin:0 0 18px; color:var(--vv-text-dim); font-size:13px; line-height:1.5; }

.vv-warn-box{
  background: rgba(239,68,68,.12); border:1px solid rgba(239,68,68,.3); border-radius:12px;
  padding:14px 16px; margin-bottom:18px;
}
.vv-warn-box b{ color:#f87171; display:block; margin-bottom:6px; font-size:13px; }
.vv-warn-box ul{ margin:0; padding-left:18px; color:var(--vv-text-dim); font-size:12px; line-height:1.6; }

.vv-seed-grid{
  display:grid; grid-template-columns:repeat(4, 1fr); gap:8px;
  padding:14px; background:rgba(0,0,0,.35); border-radius:12px; border:1px solid var(--vv-border); margin-bottom:16px;
}
.vv-seed-word{
  display:flex; align-items:center; gap:6px; padding:8px 10px;
  background:var(--vv-panel-2); border-radius:8px; border:1px solid var(--vv-border);
}
.vv-seed-word .n{ font-size:10px; color:var(--vv-text-dim); font-weight:700; min-width:14px; }
.vv-seed-word .w{ font-family:'JetBrains Mono',ui-monospace,monospace; font-size:12px; font-weight:600; }

.vv-modal-actions{ display:flex; gap:10px; justify-content:flex-end; margin-top:20px; flex-wrap:wrap; }
.vv-modal-actions .vv-btn{ min-width:110px; }

.vv-check{ display:flex; gap:10px; align-items:flex-start; padding:12px 14px; background:var(--vv-panel-2); border:1px solid var(--vv-border); border-radius:10px; margin-bottom:14px; cursor:pointer; }
.vv-check input{ margin-top:2px; }
.vv-check span{ font-size:12px; line-height:1.5; color:var(--vv-text); }

.vv-copy-hint{ font-size:11px; color:var(--vv-text-dim); margin-top:-8px; margin-bottom:14px; }

.vv-confirm-row{ display:grid; grid-template-columns: auto 1fr; gap:14px; padding:10px 0; border-bottom:1px dashed var(--vv-border); }
.vv-confirm-row:last-child{ border-bottom:none; }
.vv-confirm-row .k{ color:var(--vv-text-dim); font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.04em; }
.vv-confirm-row .v{ font-size:13px; text-align:right; word-break:break-all; font-family:'JetBrains Mono',ui-monospace,monospace; }
.vv-confirm-row .v.big{ font-family:'Sora',sans-serif; font-size:18px; font-weight:700; }

/* Restore textarea */
#vvRestoreSeed{ width:100%; min-height:100px; background:rgba(0,0,0,.35); border:1px solid var(--vv-border); border-radius:10px; padding:12px 14px; color:var(--vv-text); font:500 13px 'JetBrains Mono',ui-monospace,monospace; margin-bottom:14px; resize:vertical; }
#vvRestoreSeed:focus{ outline:none; border-color:var(--vv-accent-2); }

/* Coming soon badge */
.vv-soon{ display:inline-block; padding:2px 6px; border-radius:6px; background: rgba(245,158,11,.15); color:#fbbf24; border:1px solid rgba(245,158,11,.3); font-size:10px; font-weight:600; letter-spacing:.03em; margin-left:6px; }

/* Responsive */
@media (max-width: 1000px){
  .vv-shell{ grid-template-columns: 1fr; }
  .vv-sidebar{ position:relative; top:0; max-height:none; }
  .vv-receive{ grid-template-columns: 1fr; }
  .vv-qr-box{ margin:0 auto; }
  .vv-seed-grid{ grid-template-columns: repeat(2, 1fr); }
}

/* Password inputs + radio groups used in restore / import-privkey / set-password modals */
.vv-pass-input{
  width:100%; background: rgba(0,0,0,.35); border:1px solid var(--vv-border); border-radius:10px;
  padding:11px 14px; color:var(--vv-text); font:500 14px 'Manrope',sans-serif; margin-bottom:10px;
}
.vv-pass-input:focus{ outline:none; border-color: var(--vv-accent-2); box-shadow: 0 0 0 3px rgba(99,102,241,.18); }

.vv-radio-group{ display:flex; flex-direction:column; gap:8px; margin-bottom:6px; }
.vv-radio{
  display:flex; align-items:flex-start; gap:10px; padding:10px 12px; cursor:pointer;
  background:var(--vv-panel-2); border:1px solid var(--vv-border); border-radius:10px;
  transition: all .16s ease;
}
.vv-radio:hover{ border-color: var(--vv-border-strong); background: rgba(99,102,241,.08); }
.vv-radio input{ margin-top:3px; accent-color: var(--vv-accent); }
.vv-radio input:checked + span{ color: var(--vv-text); }
.vv-radio span{ display:flex; flex-direction:column; gap:2px; color: var(--vv-text); font-size:13px; }
.vv-radio span b{ font-weight:600; font-size:13px; }
.vv-radio span small{ color: var(--vv-text-dim); font-size:11px; line-height:1.4; }
.vv-radio:has(input:checked){ border-color: var(--vv-border-strong); background: var(--vv-accent-soft); }

.vv-reveal-box{
  background: var(--vv-panel-2); border:1px solid var(--vv-border); border-radius:10px;
  padding:10px 12px; margin-bottom:8px;
}
.vv-reveal-box h4{
  margin:0 0 6px; font:600 12px 'Manrope',sans-serif; display:flex; align-items:center; gap:6px;
}
.vv-reveal-box .val{ font-family:'JetBrains Mono',ui-monospace,monospace; font-size:11px; word-break:break-all; }
.copy-mini{
  margin-left:auto; padding:3px 8px; font-size:10px; font-weight:600;
  background:var(--vv-accent-soft); color:var(--vv-accent-2);
  border:1px solid var(--vv-border-strong); border-radius:6px; cursor:pointer;
}
.copy-mini:hover{ background: rgba(99,102,241,.28); }
