/**
 * Ferom — кошелёк (банковский UI, рубины)
 */

.wallet-page {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 24px;
}

.wallet-hero {
  margin: 8px 16px 20px;
  padding: 22px 20px 24px;
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(255, 255, 255, 0.18) 0%, transparent 55%),
    linear-gradient(145deg, #5b21b6 0%, #7c3aed 38%, #a855f7 72%, #c084fc 100%);
  color: #fff;
  box-shadow:
    0 16px 40px color-mix(in srgb, #7c3aed 35%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.wallet-hero::after {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  top: -60px;
  right: -40px;
  pointer-events: none;
}

.wallet-hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.wallet-hero__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  opacity: 0.92;
}

.wallet-hero__brand .material-symbols-rounded {
  font-size: 18px;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20;
}

.wallet-hero__history-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wallet-hero__history-btn:active {
  background: rgba(255, 255, 255, 0.24);
}

.wallet-hero__balance {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.wallet-hero__ruby {
  font-size: 28px !important;
  color: #ffc8e8;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
  align-self: center;
}

.wallet-hero__amount {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.wallet-hero__currency {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.85;
  align-self: flex-end;
  margin-bottom: 6px;
}

.wallet-hero__meta {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.wallet-hero__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.75rem;
  font-weight: 500;
}

.wallet-hero__chip .material-symbols-rounded {
  font-size: 16px;
}

.wallet-hero__chip--premium {
  background: rgba(255, 200, 232, 0.22);
  color: #ffe4f3;
}

.wallet-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 16px 20px;
}

.wallet-quick__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  border-radius: var(--md-sys-shape-corner-large);
  background: color-mix(in srgb, var(--md-sys-color-surface-container-high) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 30%, transparent);
  color: var(--md-sys-color-on-surface);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 500;
}

.wallet-quick__btn:active {
  transform: scale(0.96);
  background: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
}

.wallet-quick__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px !important;
}

.wallet-quick__icon--blue {
  background: color-mix(in srgb, #3b82f6 18%, transparent);
  color: #3b82f6;
}

.wallet-quick__icon--purple {
  background: color-mix(in srgb, #8b5cf6 18%, transparent);
  color: #8b5cf6;
}

.wallet-quick__icon--teal {
  background: color-mix(in srgb, #14b8a6 18%, transparent);
  color: #14b8a6;
}

.wallet-section {
  padding: 0 16px 20px;
}

.wallet-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.wallet-section__title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

.wallet-section__link {
  border: none;
  background: transparent;
  color: var(--md-sys-color-primary);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 4px 8px;
}

.wallet-premium-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: var(--md-sys-shape-corner-extra-large);
  background: linear-gradient(135deg,
    color-mix(in srgb, #be185d 12%, var(--md-sys-color-surface-container-high)) 0%,
    color-mix(in srgb, #7c3aed 10%, var(--md-sys-color-surface-container-high)) 100%);
  border: 1px solid color-mix(in srgb, #ec4899 25%, transparent);
  align-items: center;
}

.wallet-premium-card--owned {
  border-color: color-mix(in srgb, #ec4899 40%, transparent);
}

.wallet-premium-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #ec4899, #a855f7);
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 16px color-mix(in srgb, #ec4899 35%, transparent);
}

.wallet-premium-card__icon .material-symbols-rounded {
  font-size: 28px;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.wallet-premium-card__body { flex: 1; min-width: 0; }

.wallet-premium-card__title {
  font-size: 1rem;
  font-weight: 600;
}

.wallet-premium-card__desc {
  font-size: 0.8125rem;
  color: var(--md-sys-color-on-surface-variant);
  margin-top: 4px;
  line-height: 1.35;
}

.wallet-premium-card__price {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #db2777;
}

.wallet-premium-card__price .material-symbols-rounded {
  font-size: 16px;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20;
}

.wallet-premium-card__action {
  flex-shrink: 0;
  padding: 10px 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #ec4899, #a855f7);
  color: #fff;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
}

.wallet-premium-card__action:disabled { opacity: 0.55; }

.wallet-premium-card__badge-owned {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, #ec4899 15%, transparent);
  color: #db2777;
  font-size: 0.8125rem;
  font-weight: 600;
  flex-shrink: 0;
}

.wallet-shop { display: grid; gap: 10px; }

.wallet-shop-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--md-sys-shape-corner-large);
  background: color-mix(in srgb, var(--md-sys-color-surface-container-high) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 28%, transparent);
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
}

.wallet-shop-card:active:not(:disabled) {
  background: color-mix(in srgb, var(--md-sys-color-primary) 6%, transparent);
}

.wallet-shop-card:disabled { opacity: 0.6; }

.wallet-shop-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wallet-shop-card__icon--purple { background: color-mix(in srgb, #8b5cf6 18%, transparent); color: #8b5cf6; }
.wallet-shop-card__icon--teal { background: color-mix(in srgb, #14b8a6 18%, transparent); color: #14b8a6; }
.wallet-shop-card__icon--orange { background: color-mix(in srgb, #f97316 18%, transparent); color: #f97316; }
.wallet-shop-card__icon--ruby { background: color-mix(in srgb, #ec4899 18%, transparent); color: #ec4899; }

.wallet-shop-card__body { flex: 1; min-width: 0; }
.wallet-shop-card__title { font-size: 0.9375rem; font-weight: 600; }
.wallet-shop-card__desc { font-size: 0.75rem; color: var(--md-sys-color-on-surface-variant); margin-top: 2px; }

.wallet-shop-card__price {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.875rem;
  font-weight: 600;
  flex-shrink: 0;
}

.wallet-shop-card__price .material-symbols-rounded {
  font-size: 15px;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20;
  color: #db2777;
}

.wallet-shop-card__owned {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--md-sys-color-primary);
  flex-shrink: 0;
}

.wallet-tx-list {
  display: flex;
  flex-direction: column;
  border-radius: var(--md-sys-shape-corner-large);
  overflow: hidden;
  background: color-mix(in srgb, var(--md-sys-color-surface-container-high) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 28%, transparent);
}

.wallet-tx {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.wallet-tx + .wallet-tx {
  border-top: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 25%, transparent);
}

.wallet-tx__icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--md-sys-color-surface-container-highest) 90%, transparent);
  color: var(--md-sys-color-on-surface-variant);
}

.wallet-tx__icon--credit { background: color-mix(in srgb, #22c55e 14%, transparent); color: #16a34a; }
.wallet-tx__icon--debit { background: color-mix(in srgb, #ef4444 12%, transparent); color: #dc2626; }
.wallet-tx__icon--premium { background: color-mix(in srgb, #ec4899 14%, transparent); color: #db2777; }

.wallet-tx__body { flex: 1; min-width: 0; }
.wallet-tx__title { font-size: 0.9375rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wallet-tx__sub { font-size: 0.75rem; color: var(--md-sys-color-on-surface-variant); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wallet-tx__right { text-align: right; flex-shrink: 0; }

.wallet-tx__amount {
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.wallet-tx__amount--credit { color: #16a34a; }
.wallet-tx__amount .material-symbols-rounded {
  font-size: 14px;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20;
  color: #db2777;
}

.wallet-tx__date { font-size: 0.6875rem; color: var(--md-sys-color-on-surface-variant); margin-top: 2px; }

.wallet-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.875rem;
}

.wallet-empty .material-symbols-rounded {
  font-size: 40px;
  opacity: 0.4;
  display: block;
  margin: 0 auto 8px;
}

.wallet-history-page {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 16px 24px;
}

.wallet-sheet-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.wallet-sheet-preset {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 30%, transparent);
  background: var(--md-sys-color-surface-container);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--md-sys-color-on-surface);
}

.wallet-sheet-preset.selected {
  border-color: var(--md-sys-color-primary);
  background: color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent);
  color: var(--md-sys-color-primary);
}

.wallet-sheet-preset .material-symbols-rounded {
  font-size: 14px;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20;
  color: #db2777;
}

.wallet-sheet-field { margin-bottom: 12px; }

.wallet-sheet-field__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 6px;
}

.wallet-sheet-field__input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--md-sys-shape-corner-medium);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 30%, transparent);
  background: var(--md-sys-color-surface-container);
  font: inherit;
  font-size: 1rem;
  color: var(--md-sys-color-on-surface);
  outline: none;
}

.wallet-sheet-field__input:focus { border-color: var(--md-sys-color-primary); }

.wallet-sheet-submit { width: 100%; margin-top: 8px; }

.action-sheet__panel .wallet-sheet-submit {
  margin-top: 12px;
}

.action-sheet__panel .text-muted {
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface-variant);
}

.premium-ruby {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 4px;
  flex-shrink: 0;
}

.premium-ruby--btn {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  font: inherit;
}

.premium-ruby .material-symbols-rounded {
  font-size: 1em;
  line-height: 1;
  color: #ec4899;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20;
  filter: drop-shadow(0 1px 2px color-mix(in srgb, #ec4899 30%, transparent));
}

/* Шапка чата — отдельный размер, как был раньше */
.premium-ruby--header {
  margin-left: 5px;
}

.premium-ruby--header .material-symbols-rounded {
  font-size: 1.125rem;
  width: 1.125rem;
  height: 1.125rem;
}

.verified-badge--header {
  margin-left: 3px;
}

.verified-badge--header .material-symbols-rounded {
  font-size: 1.0625rem;
  width: 1.0625rem;
  height: 1.0625rem;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 2px;
  flex-shrink: 0;
}

.verified-badge--btn {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  font: inherit;
}

.verified-badge .material-symbols-rounded {
  font-size: 1em;
  line-height: 1;
  color: #1d9bf0;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20;
}

.display-name-row {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  gap: 0;
}

.display-name-row__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-hero__name .premium-ruby .material-symbols-rounded,
.profile-hero__name .verified-badge .material-symbols-rounded,
.tg-profile-header__name .premium-ruby .material-symbols-rounded,
.tg-profile-header__name .verified-badge .material-symbols-rounded { font-size: 0.85em; }

.premium-sheet-card__icon {
  margin-bottom: 8px;
}

.premium-sheet-card__icon .material-symbols-rounded {
  font-size: 2.75rem;
  color: #fda4af;
  font-variation-settings: 'FILL' 1;
  filter: drop-shadow(0 4px 14px color-mix(in srgb, #ec4899 45%, transparent));
}

.premium-sheet-card__desc {
  margin: 0 0 14px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--md-sys-color-on-surface-variant);
}

.premium-sheet-card__status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, #ec4899 10%, var(--md-sys-color-surface-container));
  border: 1px solid color-mix(in srgb, #ec4899 22%, transparent);
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--md-sys-color-on-surface);
  margin-bottom: 12px;
}

.premium-sheet-card__status .material-symbols-rounded {
  font-size: 18px;
  color: #ec4899;
  font-variation-settings: 'FILL' 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.verified-sheet-card__hero {
  background: linear-gradient(160deg, #0c1929, #0369a1 55%, #1d9bf0);
}

.verified-sheet-card__icon {
  margin-bottom: 8px;
}

.verified-sheet-card__icon .material-symbols-rounded {
  font-size: 2.75rem;
  color: #7dd3fc;
  font-variation-settings: 'FILL' 1;
  filter: drop-shadow(0 4px 14px color-mix(in srgb, #1d9bf0 45%, transparent));
}

.verified-sheet-card__badge {
  background: color-mix(in srgb, #fff 14%, transparent);
  color: #e0f2fe;
}
