/* wallet.css — NovaSounds Wallet Page (v3 — complete) */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700;800&display=swap');

/* ============================================================
   WALLET HEADER
   ============================================================ */
.wallet-header {
  margin-bottom: 16px;
}

.wallet-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.wallet-desc {
  font-size: 13px;
  color: var(--ink3);
}

/* ============================================================
   BALANCE CARD
   ============================================================ */
.wallet-balance-card {
  background: var(--card);
  border: 1.5px solid var(--border2);
  border-radius: 20px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: stretch;
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
}

/* gold→teal top accent */
.wallet-balance-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--teal));
  border-radius: 20px 20px 0 0;
}

.balance-info {
  padding: 22px 28px;
  border-right: 1px solid var(--border);
}

.wallet-balance-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--ink3);
  margin-bottom: 10px;
}

.wallet-balance-amt {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 3rem;
  color: var(--gold);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.wallet-balance-amt .currency-sym {
  font-size: 1.6rem;
  vertical-align: super;
  margin-right: 2px;
  font-weight: 500;
  opacity: 0.8;
}

.balance-stats {
  display: flex;
}

.balance-stat {
  padding: 22px 22px;
  border-right: 1px solid var(--border);
  text-align: center;
  min-width: 110px;
}

.balance-stat-label {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ink3);
  margin-bottom: 8px;
}

.balance-stat-val {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.5rem;
  color: var(--ink);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.balance-stat-val.positive {
  color: var(--green);
}

.balance-action {
  padding: 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-width: 160px;
}

.wallet-balance-note {
  font-size: 11px;
  color: var(--ink3);
  text-align: center;
  line-height: 1.4;
}

/* ============================================================
   MAIN TABS
   ============================================================ */
.wallet-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  border-bottom: 1.5px solid var(--border);
  overflow-x: auto;
}

.wtab-btn {
  padding: 12px 24px;
  border: none;
  background: transparent;
  color: var(--ink3);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  transition: all var(--transition);
  margin-bottom: -1.5px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wtab-btn:hover { color: var(--ink); }

.wtab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.wtab-count {
  font-family: var(--mono);
  font-size: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 7px;
  color: var(--ink3);
  font-weight: 500;
}

.wtab-btn.active .wtab-count {
  background: var(--gold-subtle);
  border-color: var(--gold);
  color: var(--gold);
}

/* ============================================================
   SECTION LABEL ROW
   ============================================================ */
.section-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.content-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.content-total {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.01em;
}

/* ============================================================
   NOVEL / AUDIOBOOK PICKER TABS
   ============================================================ */
.novel-pick-tabs,
.audio-pick-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.npick-btn,
.apick-btn {
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--ink3);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 20px;
  transition: all var(--transition);
  white-space: nowrap;
}

.npick-btn:hover,
.apick-btn:hover {
  color: var(--ink);
  border-color: var(--border2);
}

.npick-btn.active,
.apick-btn.active {
  color: var(--teal);
  border-color: var(--teal);
  background: rgba(46, 184, 164, 0.08);
  font-weight: 600;
}

/* ============================================================
   EARNINGS LISTS
   ============================================================ */
.novel-earnings-list,
.audio-earnings-list,
.contest-earnings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================================
   EARN ROW
   ============================================================ */
.earn-row {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  transition: all var(--transition);
}

.earn-row:hover {
  border-color: var(--border2);
  border-left-color: var(--border2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.earn-row.new         { border-left-color: var(--teal); }
.earn-row.contest-win { border-left-color: var(--gold); }
.earn-row.contest-cert{ border-left-color: var(--teal); }

.earn-icon {
  font-size: 1.4rem;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-shrink: 0;
}

.earn-detail {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--ink2);
}

.earn-detail strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 3px;
  font-size: 13px;
}

.earn-meta {
  font-size: 11px;
  color: var(--ink3);
  margin-top: 3px;
}

.contest-book-name {
  font-size: 11px;
  color: var(--gold);
  font-weight: 500;
  margin-top: 4px;
}

.cert-note {
  font-size: 11px;
  color: var(--teal);
  margin-top: 4px;
}

.earn-amt {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--green);
  background: rgba(78, 203, 113, 0.1);
  border: 1px solid rgba(78, 203, 113, 0.2);
  border-radius: 8px;
  padding: 6px 14px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.earn-amt.contest-won {
  color: var(--gold);
  background: rgba(212, 168, 67, 0.1);
  border-color: rgba(212, 168, 67, 0.2);
}

.cert-status {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal);
  background: rgba(46, 184, 164, 0.1);
  border: 1px solid rgba(46, 184, 164, 0.2);
  border-radius: 8px;
  padding: 6px 14px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================================
   WITHDRAWAL TAB — TRIGGER BAR
   ============================================================ */
.withdraw-new-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: var(--card);
  border: 1.5px solid var(--border2);
  border-radius: 14px;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.withdraw-trigger-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.withdraw-trigger-sub {
  font-size: 12px;
  color: var(--ink3);
  line-height: 1.5;
}

.withdraw-trigger-sub strong { color: var(--gold); }

/* ============================================================
   WITHDRAWAL REQUEST ROWS
   ============================================================ */
.withdraw-requests-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.withdraw-requests-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.withdraw-req-row {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  transition: all var(--transition);
}

.withdraw-req-row:hover {
  border-color: var(--border2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.withdraw-req-row.approved { border-left-color: var(--green); }
.withdraw-req-row.pending  { border-left-color: var(--gold); }
.withdraw-req-row.rejected { border-left-color: var(--crimson); }

.withdraw-req-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.withdraw-req-detail {
  flex: 1;
  min-width: 0;
}

.withdraw-req-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
}

.withdraw-req-meta {
  font-size: 11px;
  color: var(--ink3);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.withdraw-req-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
  min-width: 140px;
}

.withdraw-req-amt {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.withdraw-req-amt-sub {
  font-size: 10px;
  color: var(--ink3);
  text-align: right;
  line-height: 1.4;
}

.req-status-badge {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}

.req-status-badge.approved {
  color: var(--green);
  background: rgba(78, 203, 113, 0.12);
  border: 1px solid rgba(78, 203, 113, 0.25);
}

.req-status-badge.pending {
  color: var(--gold);
  background: rgba(212, 168, 67, 0.12);
  border: 1px solid rgba(212, 168, 67, 0.25);
}

.req-status-badge.rejected {
  color: var(--crimson);
  background: rgba(192, 74, 94, 0.12);
  border: 1px solid rgba(192, 74, 94, 0.25);
}

.withdraw-processing-note {
  font-size: 10px;
  color: var(--ink3);
  margin-top: 2px;
}

/* ============================================================
   WITHDRAWAL MODAL — OVERLAY
   ============================================================ */
.withdraw-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.withdraw-modal-overlay.open {
  display: flex;
  animation: overlayIn 0.2s ease;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   WITHDRAWAL MODAL — BOX
   ============================================================ */
.withdraw-modal {
  background: var(--card);
  border: 1.5px solid var(--border2);
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.withdraw-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  border-radius: 20px 20px 0 0;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.withdraw-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 28px 28px 0;
  gap: 12px;
}

.withdraw-modal-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.withdraw-modal-sub {
  font-size: 12px;
  color: var(--ink3);
  line-height: 1.5;
}

.withdraw-modal-close {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink2);
  font-size: 14px;
  flex-shrink: 0;
  transition: all var(--transition);
  margin-top: 2px;
}

.withdraw-modal-close:hover {
  background: var(--border2);
  color: var(--ink);
}

.withdraw-modal-body {
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.withdraw-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 28px 24px;
}

/* ============================================================
   AMOUNT INPUT WITH ₹ PREFIX
   ============================================================ */
.withdraw-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.withdraw-form-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.withdraw-form-input,
.withdraw-form-select {
  padding: 10px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  transition: border-color var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  box-sizing: border-box;
}

.withdraw-form-input:focus,
.withdraw-form-select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46, 184, 164, 0.1);
}

.withdraw-form-input::placeholder { color: var(--ink3); }

.withdraw-amt-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.withdraw-amt-sym {
  position: absolute;
  left: 14px;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink2);
  pointer-events: none;
}

.withdraw-amt-input {
  padding-left: 36px !important;
  font-family: 'Space Grotesk', 'Inter', sans-serif !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
}

.withdraw-bal-hint {
  font-size: 11px;
  color: var(--ink3);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.withdraw-max-btn {
  background: none;
  border: none;
  color: var(--teal);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.withdraw-max-btn:hover { color: var(--gold); }

/* ============================================================
   FEE BREAKDOWN BOX
   ============================================================ */
.withdraw-fee-box {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  opacity: 0.45;
  transition: opacity 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.withdraw-fee-box.active {
  opacity: 1;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46, 184, 164, 0.08);
}

.fee-box-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
}

.fee-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
}

.fee-label {
  font-size: 12px;
  color: var(--ink2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.fee-percent-tag {
  font-family: var(--mono);
  font-size: 9px;
  padding: 2px 7px;
  background: rgba(212, 168, 67, 0.12);
  color: var(--gold);
  border-radius: 10px;
  font-weight: 700;
}

.fee-val {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.fee-val.fee-red { color: var(--crimson); }

.fee-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 0;
}

.fee-label-final {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.fee-val-final {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.02em;
}

.fee-note {
  font-size: 11px;
  color: var(--ink3);
  line-height: 1.6;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   POLICY NOTE
   ============================================================ */
.withdraw-policy-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  color: var(--ink3);
  line-height: 1.6;
}

.withdraw-policy-note strong { color: var(--ink2); }

/* ============================================================
   LIGHT THEME
   ============================================================ */
html.light-theme .wallet-balance-card { background: #fff; }
html.light-theme .earn-row            { background: #fff; }
html.light-theme .earn-row:hover      { background: #faf8f5; }
html.light-theme .withdraw-req-row    { background: #fff; }
html.light-theme .withdraw-new-trigger{ background: #fff; }
html.light-theme .withdraw-modal      { background: #fff; }
html.light-theme .withdraw-modal-overlay { background: rgba(0,0,0,0.4); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .wallet-balance-card {
    grid-template-columns: 1fr;
  }

  .balance-info {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 24px;
  }

  .balance-stats {
    border-bottom: 1px solid var(--border);
  }

  .balance-stat {
    flex: 1;
    padding: 20px 16px;
  }

  .balance-action {
    padding: 20px 24px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
  }

  .wallet-balance-amt { font-size: 2.4rem; }
}

@media (max-width: 768px) {
  .wallet-title       { font-size: 1.5rem; }
  .wallet-balance-amt { font-size: 2rem; }

  .wtab-btn {
    padding: 10px 16px;
    font-size: 12px;
  }

  .earn-row         { flex-wrap: wrap; }
  .balance-stat-val { font-size: 1.2rem; }

  .withdraw-req-row { flex-wrap: wrap; }

  .withdraw-req-right {
    align-items: flex-start;
    min-width: 0;
    width: 100%;
  }

  .withdraw-req-amt-sub { text-align: left; }
}

@media (max-width: 600px) {
  .balance-stat     { padding: 16px 12px; }
  .balance-stat-val { font-size: 1rem; }

  .balance-stats { flex-direction: column; }

  .earn-icon,
  .withdraw-req-icon {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }

  .earn-detail,
  .withdraw-req-detail { font-size: 12px; }

  .wallet-balance-amt { font-size: 1.7rem; }

  .withdraw-modal {
    border-radius: 16px;
    max-height: 95vh;
  }

  .withdraw-modal-header {
    padding: 20px 20px 0;
  }

  .withdraw-modal-body {
    padding: 16px 20px;
  }

  .withdraw-modal-footer {
    padding: 0 20px 20px;
    flex-direction: column-reverse;
  }

  .withdraw-modal-footer .btn {
    width: 100%;
    justify-content: center;
  }
}
/* ============================================================
   v4 — WALLET LAYOUT (sidebar + content)
   ============================================================ */

/* Remove old top-level tab margin since tabs are gone */
.wallet-tabs { display: none; }

.wallet-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}

/* ============================================================
   SIDEBAR NAV
   ============================================================ */
.wallet-sidenav {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 12px 8px;
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wsn-group-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ink3);
  padding: 8px 10px 4px;
}

.wsn-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 4px;
}

.wsn-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  background: transparent;
  color: var(--ink3);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.16s ease;
  text-align: left;
}

.wsn-btn:hover {
  background: var(--surface);
  color: var(--ink);
}

.wsn-btn.active {
  background: var(--gold-subtle, rgba(212, 168, 67, 0.1));
  color: var(--gold);
  font-weight: 600;
}

.wsn-icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.wsn-text {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wsn-count {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink3);
  flex-shrink: 0;
}

.wsn-count--gold {
  background: rgba(212, 168, 67, 0.1);
  border-color: rgba(212, 168, 67, 0.25);
  color: var(--gold);
}

.wsn-btn.active .wsn-count {
  background: rgba(212, 168, 67, 0.15);
  border-color: var(--gold);
  color: var(--gold);
}

/* ============================================================
   CONTENT AREA + PANELS
   ============================================================ */
.wallet-content-area {
  min-width: 0;
}

.wallet-panel {
  /* panels shown/hidden via display:none / display:'' */
}

/* ============================================================
   FILTER BAR (inside each panel)
   ============================================================ */
.wfilter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.wfilter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.wfilter-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ink3);
  margin-right: 2px;
  flex-shrink: 0;
}

.wfpill {
  padding: 5px 13px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--ink3);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 20px;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.wfpill:hover {
  color: var(--ink);
  border-color: var(--border2);
}

.wfpill.active {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(212, 168, 67, 0.08);
  font-weight: 600;
}

.wfilter-select {
  padding: 6px 30px 6px 11px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  transition: border-color 0.16s;
  max-width: 220px;
  flex-shrink: 0;
}

.wfilter-select:focus { border-color: var(--gold); }

/* ============================================================
   EARN LIST (transaction rows container)
   ============================================================ */
.earn-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ============================================================
   EARN ROW — NEW PER-TRANSACTION DESIGN
   ============================================================ */
.earn-row {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  transition: all 0.16s ease;
  position: relative;
  overflow: hidden;
}

.earn-row:hover {
  border-color: var(--border2);
  box-shadow: 0 4px 14px rgba(0,0,0,0.07);
}

/* Left colour stripe via typedot (replaces border-left hack) */
.earn-typedot {
  width: 3px;
  height: 36px;
  border-radius: 3px;
  flex-shrink: 0;
  background: var(--border2);
}
.earn-typedot--unlock { background: var(--teal); }
.earn-typedot--sub    { background: #9b6dff; }
.earn-typedot--payout { background: var(--gold); }
.earn-typedot--collab { background: #ff8f5a; }
.earn-typedot--prize  { background: var(--gold); }
.earn-typedot--cert   { background: var(--teal); }

/* Icon box */
.earn-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.earn-icon-box--sub    { background: rgba(155,109,255,0.08); border-color: rgba(155,109,255,0.2); }
.earn-icon-box--payout { background: rgba(212,168,67,0.08);  border-color: rgba(212,168,67,0.2);  }
.earn-icon-box--collab { background: rgba(255,143,90,0.08);  border-color: rgba(255,143,90,0.2);  }
.earn-icon-box--prize  { background: rgba(212,168,67,0.1);   border-color: rgba(212,168,67,0.25); }
.earn-icon-box--cert   { background: rgba(46,184,164,0.08);  border-color: rgba(46,184,164,0.2);  }

/* Detail */
.earn-detail {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--ink2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.earn-detail strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
}

/* Reader / subscriber name badge */
.earn-reader {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: var(--teal);
  background: rgba(46,184,164,0.08);
  border: 1px solid rgba(46,184,164,0.2);
  border-radius: 20px;
  padding: 1px 9px;
  width: fit-content;
}

.earn-reader--sub {
  color: #9b6dff;
  background: rgba(155,109,255,0.08);
  border-color: rgba(155,109,255,0.2);
}

.earn-reader--collab {
  color: #ff8f5a;
  background: rgba(255,143,90,0.08);
  border-color: rgba(255,143,90,0.2);
}

.earn-meta {
  font-size: 11px;
  color: var(--ink3);
  line-height: 1.4;
}

.earn-meta strong { color: var(--ink2); font-weight: 600; }

/* Payout breakdown pills inside earn-detail */
.earn-payout-split {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 5px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}

.eps {
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 10px;
  color: var(--ink3);
  background: var(--surface);
  border: 1px solid var(--border);
}

.eps--unlock { color: var(--teal);  background: rgba(46,184,164,0.06);  border-color: rgba(46,184,164,0.15); }
.eps--sub    { color: #9b6dff;      background: rgba(155,109,255,0.06); border-color: rgba(155,109,255,0.15); }

/* Right: amount + type tag */
.earn-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
  min-width: 96px;
}

/* earn-amt overrides for different types */
.earn-amt {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.01em;
}
.earn-amt--sub    { color: #9b6dff; }
.earn-amt--payout { color: var(--gold); }
.earn-amt--collab { color: #ff8f5a; }
.earn-amt--prize  { color: var(--gold); }

/* Type tag */
.earn-tag {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  color: var(--ink3);
  background: var(--surface);
  border: 1px solid var(--border);
}
.earn-tag--unlock { color: var(--teal);  background: rgba(46,184,164,0.08);  border-color: rgba(46,184,164,0.2);  }
.earn-tag--sub    { color: #9b6dff;      background: rgba(155,109,255,0.08); border-color: rgba(155,109,255,0.2); }
.earn-tag--payout { color: var(--gold);  background: rgba(212,168,67,0.08);  border-color: rgba(212,168,67,0.2);  }
.earn-tag--collab { color: #ff8f5a;      background: rgba(255,143,90,0.08);  border-color: rgba(255,143,90,0.2);  }
.earn-tag--prize  { color: var(--gold);  background: rgba(212,168,67,0.08);  border-color: rgba(212,168,67,0.2);  }

/* NEW glow on very new rows */
.earn-row.is-new { border-color: rgba(46,184,164,0.25); }

/* ============================================================
   COLLABORATION BANNER
   ============================================================ */
.collab-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(255,143,90,0.05), rgba(46,184,164,0.04));
  border: 1.5px solid rgba(255,143,90,0.22);
  border-radius: 10px;
  margin-bottom: 4px;
}

.collab-banner-icon { font-size: 1.4rem; flex-shrink: 0; }

.collab-banner-body { flex: 1; min-width: 0; }

.collab-banner-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.collab-banner-meta {
  font-size: 11px;
  color: var(--ink3);
  line-height: 1.5;
}

.collab-banner-status {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 20px;
  color: var(--teal);
  background: rgba(46,184,164,0.1);
  border: 1px solid rgba(46,184,164,0.25);
  flex-shrink: 0;
}

/* ============================================================
   LIGHT THEME ADDITIONS
   ============================================================ */
html.light-theme .wallet-sidenav { background: #fff; }
html.light-theme .wfilter-bar    { background: #fff; }
html.light-theme .earn-row       { background: #fff; }
html.light-theme .earn-row:hover { background: #faf8f5; }
html.light-theme .wfilter-select { background: #f5f3ee; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .wallet-layout {
    grid-template-columns: 190px 1fr;
    gap: 18px;
  }
}

@media (max-width: 860px) {
  .wallet-layout {
    grid-template-columns: 1fr;
  }

  .wallet-sidenav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    padding: 10px;
  }

  .wsn-group-label { display: none; }
  .wsn-divider     { display: none; }

  .wsn-btn {
    flex: 0 1 auto;
    padding: 7px 12px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
  }

  .wsn-btn.active {
    border-color: var(--gold);
  }

  .wsn-icon { width: auto; }

  .wfilter-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .wfilter-select {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .earn-row { flex-wrap: wrap; }
  .earn-right {
    align-items: flex-start;
    min-width: 0;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* ============================================================
   COLLAB LUMP-SUM REDESIGN (v4.1)
   ============================================================ */

/* Explainer notice at top of collab panel */
.collab-explainer {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(255,143,90,.06), rgba(46,184,164,.04));
  border: 1.5px solid rgba(255,143,90,.2);
  border-radius: 12px;
  margin-bottom: 18px;
}

.collab-exp-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 2px; }

.collab-exp-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.collab-exp-desc {
  font-size: 12px;
  color: var(--ink3);
  line-height: 1.6;
}

/* Contract summary card (per collab list) */
.collab-contract-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--card);
  border: 1.5px solid rgba(255,143,90,.22);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 4px;
}

.ccc-left {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.ccc-icon { font-size: 1.4rem; flex-shrink: 0; }

.ccc-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.ccc-type {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(46,184,164,.1);
  color: var(--teal);
  border: 1px solid rgba(46,184,164,.25);
}

.ccc-type--show {
  background: rgba(155,109,255,.1);
  color: #9b6dff;
  border-color: rgba(155,109,255,.25);
}

.ccc-meta {
  font-size: 11.5px;
  color: var(--ink3);
  margin-bottom: 7px;
}

.ccc-role-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ccc-role-badge,
.ccc-share-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 10px;
}

.ccc-role-badge {
  background: rgba(212,168,67,.1);
  border: 1px solid rgba(212,168,67,.25);
  color: var(--gold);
}

.ccc-share-badge {
  background: rgba(255,143,90,.08);
  border: 1px solid rgba(255,143,90,.2);
  color: #ff8f5a;
}

/* Lump-sum breakdown mini pills inside earn-detail */
.collab-push-note {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}

.cpn-item {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink3);
}

/* Pending collab row */
.collab-row--pending {
  opacity: .72;
  background: repeating-linear-gradient(
    135deg,
    transparent,
    transparent 6px,
    rgba(255,143,90,.03) 6px,
    rgba(255,143,90,.03) 12px
  );
}

.collab-pending-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255,193,7,.1);
  border: 1px solid rgba(255,193,7,.3);
  color: #c9a800;
  margin-left: 6px;
  vertical-align: middle;
}

/* Pending type dot + icon */
.earn-typedot--pending { background: #c9a800; opacity: .6; }
.earn-icon-box--pending {
  background: rgba(201,168,0,.06);
  border-color: rgba(201,168,0,.18);
}

.earn-amt--pending { color: var(--ink3); font-size: .9rem; }
.earn-tag--pending {
  background: rgba(201,168,0,.08);
  border-color: rgba(201,168,0,.2);
  color: #c9a800;
}

/* Collab filter bar variant (pending/received pills) */
.wfilter-bar--collab { margin-bottom: 12px; }