/* SONARA — Producer Wallet */

/* ─────── TOP LAYOUT ─────── */
.wal-top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
@media (max-width: 980px) {
  .wal-top { grid-template-columns: 1fr; }
}

.wal-balance-card {
  border-radius: 20px;
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 50% at 0% 100%, rgba(123,85,208,0.20), transparent 60%),
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(217,119,87,0.10), transparent 60%),
    linear-gradient(135deg, rgba(123,85,208,0.10) 0%, rgba(65,34,142,0.04) 60%, transparent 100%),
    var(--card);
  padding: 24px 24px 0;
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.wal-balance-card::before {
  content: '';
  position: absolute;
  width: 240px; height: 240px;
  right: -80px; top: -80px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(123,85,208,0.22) 0%, transparent 70%);
  pointer-events: none;
}
.wal-balance-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
  font-weight: 500;
  margin-bottom: 8px;
  position: relative;
}
.wal-balance {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--foreground);
  display: inline-flex; align-items: baseline; gap: 2px;
  line-height: 1;
  margin-bottom: 12px;
  position: relative;
}
.wal-balance .ccy { font-size: 28px; color: var(--muted-foreground); font-weight: 500; }
.wal-balance .num { font-size: 56px; }
.wal-balance .cents { font-size: 26px; color: var(--muted-foreground); font-weight: 500; }
.wal-balance-sub {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-bottom: 18px;
  position: relative;
}
.wal-balance-sub strong { color: var(--foreground); font-weight: 600; }
.wal-balance-acts {
  display: inline-flex; gap: 8px;
  margin-bottom: 24px;
  position: relative;
}
.wal-chart {
  width: 100%;
  height: 56px;
  display: block;
  margin: 0 -24px;
  width: calc(100% + 48px);
  position: relative;
}

.wal-side { display: flex; flex-direction: column; gap: 12px; }
.wal-mini-card {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 6px;
}
.wal-mini-card.escrow { border-left: 3px solid #f59e0b; }
.wal-mini-card.clearance { border-left: 3px solid var(--violet); }
.wal-mini-card.lifetime { border-left: 3px solid #16a34a; }

.wal-mini-l {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
}
.wal-mini-dot {
  width: 8px; height: 8px;
  border-radius: 3px;
}
.wal-mini-dot.esc { background: #f59e0b; }
.wal-mini-dot.clr { background: var(--violet); }
.wal-mini-dot.lif { background: #16a34a; }
.wal-mini-v {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--foreground);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.wal-mini-v strong { font-weight: 700; }
.wal-mini-s {
  font-size: 11.5px;
  color: var(--muted-foreground);
}

/* ─────── SECTION ─────── */
.wal-section {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 22px;
  margin-bottom: 18px;
}
.wal-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 8px;
}
.wal-section-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--foreground);
}
.wal-section-stats {
  font-size: 12.5px;
  color: var(--muted-foreground);
  display: inline-flex; align-items: center; gap: 12px;
}
.wal-section-stats strong { color: var(--foreground); font-weight: 600; }
.wal-section-stats .up { color: #22c55e; display: inline-flex; align-items: center; gap: 3px; }
.wal-section-foot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--muted-foreground);
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.wal-section-foot strong { color: var(--foreground); font-weight: 600; }
.wal-section-foot .sep { color: color-mix(in oklab, var(--muted-foreground) 50%, transparent); }

/* ─────── BAR CHART ─────── */
.wal-bars {
  display: flex; align-items: flex-end;
  gap: 3px;
  height: 140px;
  padding-bottom: 24px;
  position: relative;
}
.wal-bar-col {
  flex: 1;
  height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  position: relative;
}
.wal-bar {
  background: linear-gradient(180deg, var(--violet-bright, #7b55d0) 0%, var(--violet) 100%);
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  opacity: 0.85;
  transition: opacity 120ms;
}
.wal-bar-col:hover .wal-bar { opacity: 1; }
.wal-bar-lbl {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}

/* ─────── SOURCE BREAKDOWN ─────── */
.wal-source { display: flex; flex-direction: column; gap: 12px; }
.wal-source-row {
  display: grid;
  grid-template-columns: 240px 1fr 80px;
  gap: 14px;
  align-items: center;
}
@media (max-width: 720px) {
  .wal-source-row { grid-template-columns: 100px 1fr 60px; }
}
.wal-source-bar {
  position: relative;
  height: 22px;
  background: var(--background);
  border-radius: 6px;
  overflow: hidden;
  width: 100%;
}
.wal-source-bar::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--p, 0%);
  background: var(--c, var(--violet));
  border-radius: 6px 0 0 6px;
}
.wal-source-meta { min-width: 0; }
.wal-source-meta .t {
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
}
.wal-source-meta .s {
  font-size: 11.5px;
  color: var(--muted-foreground);
  margin-top: 2px;
}
.wal-source-v {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--foreground);
  letter-spacing: -0.01em;
  text-align: right;
}

/* ─────── TX LIST ─────── */
.wal-tx-list {
  display: flex; flex-direction: column;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  overflow: hidden;
}
.wal-tx {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px;
  padding: 14px 18px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  transition: background 120ms;
}
.wal-tx:last-child { border-bottom: 0; }
.wal-tx:hover { background: var(--muted); }
.wal-tx-ic {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
}
.wal-tx.credit .wal-tx-ic {
  background: rgba(34,197,94,0.14);
  color: #16a34a;
  border: 1px solid rgba(34,197,94,0.28);
}
.wal-tx.payout .wal-tx-ic {
  background: rgba(123,85,208,0.14);
  color: var(--violet-bright, #7b55d0);
  border: 1px solid rgba(123,85,208,0.28);
}
.wal-tx.fee .wal-tx-ic {
  background: rgba(245,158,11,0.14);
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.28);
}
.wal-tx-body { min-width: 0; }
.wal-tx-row1 {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.wal-tx-label {
  font-size: 13.5px;
  color: var(--foreground);
  font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wal-tx-amt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.015em;
  white-space: nowrap;
}
.wal-tx-amt.pos { color: #16a34a; }
.wal-tx-amt.neg { color: var(--foreground); }
.wal-tx-row2 {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px;
  color: var(--muted-foreground);
  flex-wrap: wrap;
}
.wal-tx-row2 .sep { color: color-mix(in oklab, var(--muted-foreground) 50%, transparent); }
.wal-tx-id {
  font-family: var(--font-mono);
  font-size: 11px;
}
.wal-tx-who {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--foreground);
  font-weight: 500;
}

/* ─────── SETTINGS / KYC ─────── */
.wal-settings {
  display: flex; flex-direction: column;
  gap: 18px;
}

.wal-kyc-flow { display: flex; flex-direction: column; }
.wal-kyc-step {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 14px;
  padding: 14px 22px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.wal-kyc-step:last-child { border-bottom: 0; }
.wal-kyc-num {
  width: 28px; height: 28px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
}
.wal-kyc-step.done .wal-kyc-num {
  background: rgba(34,197,94,0.14);
  color: #16a34a;
  border: 1px solid rgba(34,197,94,0.28);
}
.wal-kyc-meta .l {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
  font-weight: 500;
  margin-bottom: 2px;
}
.wal-kyc-meta .v {
  font-size: 13.5px;
  color: var(--foreground);
  font-weight: 500;
}

/* ─────── PREFS ─────── */
.wal-prefs { padding: 6px 0; }
.wal-pref-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
}
.wal-pref-row:last-child { border-bottom: 0; }
.wal-pref-row .meta { min-width: 0; flex: 1; }
.wal-pref-row .meta .t {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 2px;
}
.wal-pref-row .meta .s {
  font-size: 12px;
  color: var(--muted-foreground);
  line-height: 1.4;
}

/* ─────── FISCAL ─────── */
.wal-fiscal {
  padding: 14px 22px 22px;
  display: flex; flex-direction: column;
}
.wal-fiscal-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.wal-fiscal-row:last-of-type { border-bottom: 0; }
.wal-fiscal-row .l {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
  font-weight: 500;
}
.wal-fiscal-row .v {
  font-size: 13.5px;
  color: var(--foreground);
  font-weight: 500;
  font-family: var(--font-mono);
}
.wal-fiscal-row:nth-child(1) .v,
.wal-fiscal-row:nth-child(2) .v,
.wal-fiscal-row:last-of-type .v { font-family: var(--font-sans); }

.wal-fiscal-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(123,85,208,0.07);
  border: 1px solid rgba(123,85,208,0.25);
  font-size: 12.5px;
  color: var(--foreground);
  display: flex; align-items: flex-start; gap: 8px;
  line-height: 1.5;
}
.wal-fiscal-note svg { color: var(--violet-bright, #7b55d0); flex-shrink: 0; margin-top: 2px; }

/* ─────── IBAN ─────── */
.wal-iban { padding: 18px 22px 22px; }
.wal-iban-card {
  padding: 18px 20px;
  border-radius: 14px;
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(123,85,208,0.18), transparent 60%),
    var(--background);
  border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
}
.wal-iban-bank {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
  font-weight: 500;
}
.wal-iban-num {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--foreground);
}
.wal-iban-meta {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 4px;
}
.wal-iban-acts { display: inline-flex; gap: 8px; margin-top: 6px; }
