.wallet-shell {
  min-height: 100vh;
  padding: 24px 0 42px;
}

.wallet-hero {
  margin-top: 22px;
  margin-bottom: 22px;
  padding: 28px;
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.15), transparent 28%),
    linear-gradient(135deg, #14532d, #166534 55%, #15803d);
  color: #fff;
  box-shadow: 0 18px 50px rgba(21, 128, 61, 0.18);
  position: relative;
  overflow: hidden;
}

.wallet-hero::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  left: -50px;
  bottom: -50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  filter: blur(10px);
}

.wallet-hero > * {
  position: relative;
  z-index: 2;
}

.wallet-hero-badge {
  width: fit-content;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.14);
  font-size: 0.84rem;
  font-weight: 800;
  margin-bottom: 18px;
}

.wallet-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
}

.wallet-hero-copy h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  margin-bottom: 12px;
  line-height: 1.15;
}

.wallet-hero-copy p {
  max-width: 700px;
  line-height: 2;
  opacity: 0.95;
}

.wallet-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 900px;
}

.wallet-stat-card {
  min-height: 88px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.14);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wallet-stat-card.featured {
  background: rgba(255,255,255,0.16);
}

.wallet-stat-label {
  font-size: 0.82rem;
  opacity: 0.92;
  margin-bottom: 8px;
}

.wallet-stat-card strong {
  font-size: 1.2rem;
  font-weight: 900;
}

.wallet-panel {
  padding: 24px;
  border-radius: 30px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.wallet-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.wallet-panel-head h2 {
  font-size: 1.26rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.wallet-panel-head p {
  color: var(--text-sec);
  line-height: 1.8;
}

.wallet-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.wallet-filter-select {
  min-width: 220px;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card-bg);
  color: var(--text-main);
  padding: 0 14px;
  outline: none;
  font-size: 0.94rem;
}

.wallet-list-grid {
  display: grid;
  gap: 14px;
}

.wallet-item {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255,255,255,0.68);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .wallet-item {
  background: rgba(255,255,255,0.03);
}

.wallet-item-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 12px;
}

.wallet-item-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.wallet-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.wallet-item-icon.purchase {
  background: rgba(0,122,255,0.12);
  color: var(--primary);
}

.wallet-item-icon.deposit {
  background: rgba(22,163,74,0.12);
  color: #15803d;
}

.wallet-item-icon.admin-add {
  background: rgba(34,197,94,0.12);
  color: #16a34a;
}

.wallet-item-icon.admin-subtract {
  background: rgba(239,68,68,0.12);
  color: #dc2626;
}

.wallet-item-content {
  min-width: 0;
}

.wallet-item-title {
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.wallet-item-description {
  color: var(--text-sec);
  line-height: 1.85;
  font-size: 0.92rem;
  word-break: break-word;
}

.wallet-item-side {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.wallet-chip {
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.wallet-chip.positive {
  background: rgba(22,163,74,0.1);
  color: #15803d;
  border: 1px solid rgba(22,163,74,0.16);
}

.wallet-chip.negative {
  background: rgba(239,68,68,0.1);
  color: #dc2626;
  border: 1px solid rgba(239,68,68,0.16);
}

.wallet-chip.type {
  background: rgba(0,122,255,0.08);
  color: var(--primary);
  border: 1px solid rgba(0,122,255,0.14);
}

.wallet-item-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.wallet-data-box {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--line);
}

[data-theme="dark"] .wallet-data-box {
  background: rgba(255,255,255,0.03);
}

.wallet-data-box span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-sec);
  margin-bottom: 6px;
}

.wallet-data-box strong {
  display: block;
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1.5;
}

.wallet-empty {
  min-height: 180px;
  padding: 24px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--text-sec);
  border: 1px dashed var(--line-strong);
  background: rgba(255,255,255,0.5);
}

[data-theme="dark"] .wallet-empty {
  background: rgba(255,255,255,0.02);
}

.wallet-empty i {
  font-size: 1.7rem;
  color: var(--primary);
  margin-bottom: 10px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-branding {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-branding strong {
  font-weight: 900;
}

.footer-branding span {
  color: var(--text-sec);
  font-size: 0.88rem;
}

.footer-credit {
  color: var(--text-sec);
  line-height: 1.8;
}

.footer-credit a {
  color: var(--primary);
  font-weight: 800;
}

@media (max-width: 900px) {
  .wallet-hero-grid {
    grid-template-columns: 1fr;
  }

  .wallet-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wallet-item-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .wallet-shell {
    padding-top: 14px;
  }

  .wallet-hero,
  .wallet-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .wallet-hero-stats {
    grid-template-columns: 1fr;
  }

  .wallet-toolbar,
  .wallet-toolbar > * {
    width: 100%;
  }

  .wallet-item-top {
    flex-direction: column;
    align-items: stretch;
  }

  .wallet-item-side {
    width: 100%;
  }

  .wallet-item-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}