.account-hero {
  position: relative;
  padding: var(--space-10);
  background: linear-gradient(135deg, rgba(214,178,92,.08), var(--bg-2));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-8);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-6);
  align-items: center;
}
.account-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle 400px at 100% 0%, var(--gold-glow), transparent 70%);
  pointer-events: none;
  border-radius: var(--radius-xl);
}
.account-avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  font-weight: 800;
  color: #1a1408;
  border: 3px solid var(--border-gold-strong);
  position: relative;
}
.account-hero__info { position: relative; }
.account-hero__name { font-size: 22px; font-weight: 700; margin-bottom: var(--space-1); }
.account-hero__email { color: var(--text-secondary); font-size: 14px; }
.account-hero__balance {
  text-align: right;
  position: relative;
}
.account-hero__amount {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -.03em;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.account-hero__label {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-2);
  transition: all var(--t-normal) var(--ease);
}
.stat-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
}
.stat-card__icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--gold-glow);
  border: 1px solid var(--border-gold);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-3);
}
.stat-card__icon svg { width: 18px; height: 18px; stroke: var(--gold-light); fill: none; stroke-width: 1.7; }
.stat-card__value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.stat-card__label { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .1em; }

.history {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-8);
}
.history__head {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.history__head h2 { font-size: 18px; font-weight: 700; }
.history__table {
  width: 100%;
  border-collapse: collapse;
}
.history__table th {
  text-align: left;
  padding: var(--space-3) var(--space-6);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
}
.history__table td {
  padding: var(--space-4) var(--space-6);
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.history__table tr:last-child td { border-bottom: 0; }
.history__table tr:hover { background: rgba(214,178,92,.03); }
.history__amount--out { color: #ff7a7a; font-weight: 600; }
.history__amount--in { color: #7aff95; font-weight: 600; }
.history-empty {
  padding: var(--space-10);
  text-align: center;
  color: var(--text-muted);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: var(--space-4);
}
@media (max-width: 900px) {
  .account-hero { grid-template-columns: 1fr; text-align: center; }
  .account-hero__balance { text-align: center; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .history__table { display: block; }
  .history__table thead { display: none; }
  .history__table tbody { display: block; }
  .history__table tr {
    display: flex; flex-direction: column;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
    gap: var(--space-1);
  }
  .history__table td { padding: 0; border: 0; font-size: 13px; }
  .history__table td::before { content: attr(data-label); display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 2px; }
}

/* ====== ПУБЛИЧНЫЙ ПРОФИЛЬ ====== */
.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  padding: var(--space-4);
  background: var(--surface-2);
  border-radius: var(--radius-lg);
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--surface-1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  font-size: 28px;
  font-weight: 700;
  flex-shrink: 0;
  object-fit: cover;
}

.profile-avatar__name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 2px;
}

.profile-avatar__contact {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.profile-avatar__provider {
  font-size: 12px;
  color: var(--gold-light);
}

.profile-link-card {
  padding: var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.profile-link-card__label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}

.profile-link-card__url {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--surface-1);
  border-radius: var(--radius-md);
}

.profile-link-card__url b {
  flex: 1;
  color: var(--gold-light);
  font-weight: 600;
  word-break: break-all;
  font-size: 13px;
}

@media (max-width: 640px) {
  .profile-avatar-row {
    flex-direction: column;
    text-align: center;
  }
  .profile-link-card__url {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ====== HERO-АВАТАР: HOVER + ЗАГРУЗКА ====== */
.account-avatar {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.account-avatar:hover {
  transform: scale(1.05);
}

.account-avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: inherit;
  pointer-events: none;
}

.account-avatar:hover::after {
  opacity: 1;
}

.account-avatar::before {
  content: '📷';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1;
  pointer-events: none;
}

.account-avatar:hover::before {
  opacity: 1;
}

.account-avatar--photo {
  object-fit: cover;
  background: var(--surface-1);
}
