/* ===== DASHBOARD ===== */

/* Balance Hero */
.balance-hero {
  position: relative;
  background: linear-gradient(160deg, #0D0D0D 0%, #1A1A2E 50%, #0D0D0D 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-2xl);
  padding: 36px 28px 32px;
  margin: 24px 0 16px;
  overflow: hidden;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 24px 64px rgba(0,0,0,0.40);
}

/* Glow orb — тепліший відтінок */
.balance-bg-orb {
  position: absolute;
  width: 560px; height: 340px;
  background: radial-gradient(ellipse, rgba(80,60,200,0.32) 0%, transparent 72%);
  border-radius: 50%;
  top: -160px; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

/* Тонка сітка-текстура */
.balance-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.balance-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 80px;
  background: linear-gradient(to top, rgba(13,13,13,0.6), transparent);
  pointer-events: none;
}

/* ── Всі тексти всередині карти — БІЛІ (важливо!) ── */
.balance-greeting {
  font-size: 13px;
  color: rgba(255,255,255,0.45) !important;
  margin-bottom: 20px;
  position: relative;
}

.balance-label {
  font-size: 10px;
  color: rgba(255,255,255,0.35) !important;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
}

.balance-amount {
  font-size: 52px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #FFFFFF !important;
  line-height: 1;
  margin-bottom: 8px;
  position: relative;
  text-shadow: 0 2px 20px rgba(255,255,255,0.10);
}
@media (min-width: 768px) { .balance-amount { font-size: 72px; } }

.balance-pending {
  font-size: 13px;
  color: rgba(255,255,255,0.40) !important;
  margin-bottom: 28px;
  position: relative;
}
.balance-pending strong {
  color: #4ADE80 !important;
  font-weight: 700;
}

.balance-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  position: relative;
}

/* Кнопки всередині карти */
.balance-hero .btn-gold {
  background: #FFFFFF !important;
  color: #0D0D0D !important;
  font-weight: 800;
  box-shadow: 0 4px 20px rgba(0,0,0,0.30);
}
.balance-hero .btn-gold:hover { background: #F0F0FF !important; }
.balance-hero .btn-gold::after { display: none; }

.balance-hero .btn-outline {
  border-color: rgba(255,255,255,0.18) !important;
  color: rgba(255,255,255,0.70) !important;
  background: rgba(255,255,255,0.06) !important;
}
.balance-hero .btn-outline:hover {
  background: rgba(255,255,255,0.12) !important;
  border-color: rgba(255,255,255,0.35) !important;
  color: #FFFFFF !important;
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-mini {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.stat-mini-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-mini-icon.green { background: var(--green-dim); color: var(--green); }
.stat-mini-icon.gold  { background: var(--gold-dim);  color: var(--gold); }

.stat-mini-val {
  font-size: 16px; font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.stat-mini-label {
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* Section blocks */
.section-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.block-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}

.block-title {
  font-size: 16px; font-weight: 700;
}

.block-link {
  font-size: 13px; color: var(--gold);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.block-link:hover { color: var(--gold-light); }

/* Chart */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 80px;
  margin-bottom: 6px;
}

.chart-bar {
  flex: 1;
  background: var(--bg-elevated);
  border-radius: 4px 4px 0 0;
  position: relative;
  overflow: hidden;
  min-height: 8px;
  transition: height 0.8s cubic-bezier(0.4,0,0.2,1);
}
.chart-bar-fill {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, #D5D9EA, #EAECF4);
  border-radius: 4px 4px 0 0;
  transition: height 1s cubic-bezier(0.4,0,0.2,1);
}
.chart-bar.active .chart-bar-fill {
  background: linear-gradient(180deg, #3A5CC5, #5A7AE5);
  box-shadow: 0 0 12px rgba(58,92,197,0.25);
}

.chart-labels {
  display: flex;
  gap: 6px;
}
.chart-label {
  flex: 1;
  text-align: center;
  font-size: 9px; color: var(--text-muted);
  text-transform: uppercase;
}

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

.tx-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.tx-item:last-child { border-bottom: none; padding-bottom: 0; }
.tx-item:first-child { padding-top: 0; }

.tx-logo {
  width: 42px; height: 42px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
  flex-shrink: 0;
}

.tx-info { flex: 1; min-width: 0; }

.tx-store {
  font-size: 14px; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.tx-meta {
  display: flex; align-items: center; gap: 8px; margin-top: 2px;
}

.tx-date { font-size: 12px; color: var(--text-muted); }

.tx-right { text-align: right; flex-shrink: 0; }

.tx-amount {
  font-size: 16px; font-weight: 800;
  color: var(--green);
  letter-spacing: -0.02em;
}
.tx-amount.pending { color: var(--text-muted); }

.tx-order {
  font-size: 11px; color: var(--text-muted);
  margin-top: 2px;
}

/* Profile */
.profile-card {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 62px; height: 62px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.20);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.04);
  flex-shrink: 0;
  background: var(--bg-elevated);
}
.profile-avatar img {
  width: 100%; height: 100%;
  display: block;
  border-radius: 50%;
}

.profile-name {
  font-size: 17px; font-weight: 700;
  margin-bottom: 2px;
}
.profile-email {
  font-size: 13px; color: var(--text-secondary);
  margin-bottom: 4px;
}
.profile-since {
  font-size: 11px; color: var(--text-muted);
}

.profile-actions {
  display: flex; flex-direction: column; gap: 2px;
}

.profile-action-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 4px;
  font-size: 15px; font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}
.profile-action-btn:last-child { border-bottom: none; }
.profile-action-btn:hover { color: var(--gold); }
.profile-action-btn.danger { color: var(--text-secondary); }
.profile-action-btn.danger:hover { color: var(--red); }
.profile-action-btn svg { color: inherit; flex-shrink: 0; }
