/* Wallet Layout */
.wallet-layout {
  max-width: 800px;
  margin: 0 auto;
}

/* Balance Header Card */
.wallet-header-card {
  background: var(--gradient-primary);
  color: var(--text-inverse);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xl);
}

.balance-label {
  font-size: 14px;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.balance-amount {
  font-size: 48px;
  font-weight: 800;
  margin: 8px 0 24px 0;
  letter-spacing: -1px;
}

.wallet-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
}

/* Circular light buttons on the gradient card */
.icon-btn-light {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.icon-btn-light:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

.icon-btn-light img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

/* Transfer dropdown */
.wallet-transfer-wrap {
  position: relative;
}

.wallet-filter-wrap {
  position: relative;
}

.wallet-transfer-menu {
  display: none;
  position: absolute;
  top: 115%;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  min-width: 215px;
  z-index: 1000;
  overflow: hidden;
  text-align: left;
}

.wallet-transfer-menu.active {
  display: block;
}

.wallet-transfer-item {
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.wallet-transfer-item:last-child {
  border-bottom: none;
}

.wallet-transfer-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* In-page view filter (Summary / Trxn / Subscription) */
.billing-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.billing-filter-wrap {
  position: relative;
}

.billing-filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.billing-filter-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.billing-filter-menu {
  display: none;
  position: absolute;
  top: 120%;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: 1000;
  overflow: hidden;
}

.billing-filter-menu.active {
  display: block;
}

.billing-filter-item {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease, color 0.2s ease;
}

.billing-filter-item:last-child {
  border-bottom: none;
}

.billing-filter-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.billing-filter-item.active {
  color: var(--brand-primary);
  background: var(--brand-primary-light);
  font-weight: 600;
}

/* Activity Summary Cards */
.stat-card {
  padding: 24px;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bg-brand { background: var(--brand-primary-light); color: var(--brand-primary); }
.bg-gold { background: var(--gold-light); color: #F59E0B; }
.bg-error { background: var(--error-light); color: var(--error); }
.bg-success { background: var(--success-light); color: var(--success); }
.bg-muted { background: var(--bg-tertiary); color: var(--text-muted); }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
}

/* Transactions List */
.txn-list {
  display: flex;
  flex-direction: column;
}

.txn-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.txn-item:last-child {
  border-bottom: none;
}

.txn-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* GP earnings: the Gliimu logo, greyed out */
.txn-gp-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  filter: grayscale(100%);
  opacity: 0.45;
}

.txn-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.txn-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.txn-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.txn-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.txn-amount {
  font-size: 16px;
  font-weight: 700;
}

.txn-points {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold, #F59E0B);
}

.amount-positive { color: var(--success); }
.amount-negative { color: var(--error); }

.txn-status {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 12px;
}

.txn-status.pending {
  background: var(--warning-light);
  color: var(--warning);
}

/* Subscription Card */
.sub-card {
  padding: 32px;
}

.sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.sub-header h3 {
  font-size: 20px;
  font-weight: 700;
}

.sub-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.sub-badge.active {
  background: var(--success-light);
  color: var(--success);
}

.sub-badge.inactive {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

.sub-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sub-row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
}

.sub-row span {
  color: var(--text-muted);
}

.sub-row strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Plan upgrade hint */
.plan-upgrade-hint {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin: 16px 0 0 0;
  padding: 12px 16px;
  background: var(--brand-primary-light);
  border-radius: 12px;
}

.plan-upgrade-hint a {
  color: var(--brand-primary);
  font-weight: 700;
  text-decoration: none;
}

.plan-upgrade-hint a:hover {
  text-decoration: underline;
}

.plan-upgrade-congrats {
  background: var(--success-light);
  color: var(--success);
  font-weight: 600;
}

/* Subscription Plans */
.plan-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.plan-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--brand-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-price {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1px;
  margin-top: 8px;
}

.plan-price-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.plan-feature {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.plan-feature svg {
  color: var(--success);
  flex-shrink: 0;
  margin-top: 2px;
}

.plan-buy {
  width: 100%;
  margin-top: 20px;
}

.plan-buy.active-plan {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: default;
  box-shadow: none;
}

/* Transfer Modal */
.transfer-results {
  display: none;
  margin-top: 8px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.transfer-results.active {
  display: block;
}

.transfer-empty {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.transfer-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.transfer-result:last-child {
  border-bottom: none;
}

.transfer-result:hover {
  background: var(--bg-tertiary);
}

.transfer-result-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  object-fit: cover;
}

.transfer-result-info {
  display: flex;
  flex-direction: column;
}

.transfer-result-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.transfer-result-gp {
  font-size: 12px;
  color: var(--text-muted);
}

.transfer-selected {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--brand-primary-light);
  border-radius: 12px;
  margin-top: 8px;
}

.transfer-selected.active {
  display: flex;
}

.transfer-selected-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-primary);
}

.transfer-selected-x {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.transfer-selected-x:hover {
  background: var(--error-light);
  color: var(--error);
}

/* Top Up Modal */
.bank-details-box {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 20px;
}

.bd-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 15px;
}

.bd-row:last-child {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 16px;
}

.bd-row.highlight strong {
  color: var(--brand-primary);
}

/* Fund Wallet Modal */
.fund-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.pay-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: var(--space-4);
}

.pay-method {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.pay-method:hover {
  border-color: var(--brand-primary);
  background: var(--brand-primary-light);
}

.pay-method-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pay-method-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pay-method-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.pay-method-note {
  font-size: 12.5px;
  color: var(--text-muted);
}

.pay-method-chevron {
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
}

.fund-back {
  background: none;
  border: none;
  color: var(--brand-primary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0 0 12px 0;
}

/* Responsive */
@media (max-width: 768px) {
  .wallet-header-card {
    padding: 24px;
  }
  .balance-amount {
    font-size: 36px;
  }
  .plan-list {
    grid-template-columns: 1fr;
  }
  .wallet-transfer-menu {
    min-width: 190px;
  }
}
