/* ═══════════════════════════════════════════════════════
   DASHBOARD.CSS — redesign 2026-06-03
   Light theme: white cards, purple accent, bottom mobile nav
   ═══════════════════════════════════════════════════════ */

:root {
  --primary: #6059E8;
  --primary-hover: #4F48D1;
  --primary-gradient: linear-gradient(135deg, #6059E8 0%, #9B7AF7 100%);
  --primary-bg: rgba(96, 89, 232, 0.08);
  --primary-border: rgba(96, 89, 232, 0.2);

  --bg-page: #F4F5F8;
  --bg-card: #FFFFFF;
  --bg-card2: #F8F9FC;
  --border: rgba(0, 0, 0, 0.07);
  --border-strong: rgba(0, 0, 0, 0.11);
  --shadow-sm: 0 1px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 36px rgba(0,0,0,0.10);

  --text-1: #111827;
  --text-2: #4B5563;
  --text-3: #9CA3AF;

  --success: #10B981;
  --success-bg: rgba(16,185,129,0.1);
  --success-border: rgba(16,185,129,0.2);
  --danger: #EF4444;
  --danger-bg: rgba(239,68,68,0.1);
  --danger-border: rgba(239,68,68,0.2);
  --warning: #F59E0B;

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;

  /* Dark modals */
  --modal-bg: rgba(10,10,20,0.97);
  --modal-border: rgba(255,255,255,0.10);
  --modal-text: #f0f4ff;
  --modal-muted: rgba(255,255,255,0.55);
}

/* ─── RESET ─── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-width: 320px;
  font-family: 'Inter', sans-serif;
  color: var(--text-1);
  background: var(--bg-page);
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; border: 0; }
.hidden { display: none !important; }

/* ─── SHARED DROPDOWN UTILS ─── */
.dropdown-toggle { display: flex; align-items: center; justify-content: space-between; }
.dropdown-chevron { font-size: 14px; opacity: 0.6; transition: transform 0.22s; }
.dropdown-toggle.open .dropdown-chevron { transform: rotate(180deg); }
.language-submenu {
  max-height: 0; overflow: hidden; opacity: 0; transform: translateY(-6px);
  pointer-events: none; transition: max-height 0.28s, opacity 0.22s, transform 0.22s;
}
.language-submenu.active {
  max-height: 160px; opacity: 1; transform: translateY(0);
  pointer-events: auto; overflow-y: auto; margin-top: 6px;
}
.language-option {
  width: 100%; display: block; padding: 10px 14px; border: 0;
  border-radius: 10px; background: transparent; color: var(--text-1);
  font-size: 14px; text-align: left; cursor: pointer;
  transition: background 0.15s;
}
.language-option:hover { background: var(--bg-page); }
.language-option.active { background: var(--primary-bg); color: var(--primary); }

/* ══════════════════════════════════════════
   HEADER — layout owned by auth-header.css
══════════════════════════════════════════ */

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 1.3rem; font-weight: 800; color: #fff;
  background: var(--primary-gradient);
  box-shadow: 0 4px 12px rgba(96,89,232,0.28);
}
.brand-name { font-size: 1.1rem; font-weight: 700; color: var(--text-1); }

/* Nav */
.dashboard-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px;
  color: var(--text-2); font-size: 14px; font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--primary); background: var(--primary-bg); }
.nav-link.active { color: var(--primary); background: var(--primary-bg); font-weight: 600; }
.nav-icon { width: 18px; height: 18px; display: inline-flex; flex-shrink: 0; }
.nav-icon svg { width: 100%; height: 100%; }

/* Header right controls */
.download-button {
  height: 44px; padding: 0 18px; border-radius: 12px;
  background: var(--bg-page); color: var(--text-2);
  border: 1px solid var(--border); display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}
.download-button:hover { background: var(--primary-bg); border-color: var(--primary-border); color: var(--primary); }
.download-button svg { width: 18px; height: 18px; }

/* Profile trigger */
.profile-wrapper { position: relative; display: flex; align-items: center; }
.profile-trigger {
  height: 44px; min-width: 220px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg-page); color: var(--text-1);
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer; justify-content: space-between;
  transition: background 0.2s, border-color 0.2s;
}
.profile-trigger:hover { background: var(--primary-bg); border-color: var(--primary-border); }
.profile-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-gradient); color: #fff;
  font-size: 13px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.02em; flex-shrink: 0; text-align: center; line-height: 1;
}
.profile-email { flex: 1; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-1); }
.profile-chevron, .profile-arrow { font-size: 14px; opacity: 0.5; transition: transform 0.22s; }
.profile-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 220px; padding: 8px; border-radius: 16px;
  border: 1px solid var(--border); background: #FFFFFF;
  box-shadow: var(--shadow-lg); z-index: 200;
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(0.98);
  pointer-events: none; transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.profile-dropdown.active { opacity: 1; visibility: visible; transform: translateY(0) scale(1); pointer-events: auto; }
.dropdown-item {
  width: 100%; display: block; padding: 10px 14px; border: 0;
  border-radius: 10px; background: transparent; color: var(--text-1);
  font-size: 14px; text-align: left; cursor: pointer;
  transition: background 0.15s;
}
.dropdown-item:hover { background: var(--bg-page); }
a.dropdown-item { text-decoration: none !important; }
.dropdown-item.logout { color: var(--danger); }
.dropdown-item.logout:hover { background: var(--danger-bg); }

/* Notification bell (now a flow button, not absolute badge) */
.notification-counter { border: none; background: none; cursor: pointer; }
.notif-bell { /* base handled in auth-header.css */ }
@keyframes notifPulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.18); filter: brightness(1.25); }
}

/* ══════════════════════════════════════════
   OVERFLOW FIX
══════════════════════════════════════════ */
html { overflow-x: hidden; }
body { overflow-x: hidden; max-width: 100vw; }

/* ══════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════ */
.app-shell { min-height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.dashboard-main { flex: 1; padding: 16px 14px 76px; display: flex; flex-direction: column; gap: 14px; overflow-x: hidden; }
.dfb-left-col { display: flex; flex-direction: column; gap: 14px; }

/* ══ DESKTOP LAYOUT ≥ 769px ══ */
@media (min-width: 769px) {
  .dashboard-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(260px, 28vw, 340px);
    gap: 12px;
    padding: 24px 28px 40px;
    max-width: 1440px;
    margin: 0 auto;
    align-items: start;
  }
  .dfb-overview-card { grid-column: 1; grid-row: 1; }
  .dfb-action-grid {
    grid-column: 2; grid-row: 1;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-top: 0 !important;
  }
  .dfb-history-section { grid-column: 1 / -1; grid-row: 2; }
  .dfb-htab-pane { min-height: 300px; max-height: 340px; overflow-y: auto !important; scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.12) transparent; }
  .dfb-htab-pane::-webkit-scrollbar { width: 5px; }
  .dfb-htab-pane::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.13); border-radius: 999px; }
  .dfb-htab-pane .trade-row { max-width: 900px; }
  .dfb-htab-pane .trade-card { max-width: 900px; }
  .trade-row { padding: 14px 20px !important; }
  .dfb-history-section .dfb-htab-bar { padding: 0 20px; }
  .dfb-history-section .dfb-htab-pane { padding: 8px 20px 20px; }

  /* Action cards — horizontal row layout in sidebar */
  .dfb-action-card {
    flex-direction: row !important;
    align-items: center !important;
    padding: 14px 16px !important;
    gap: 14px !important;
  }
  .dfb-action-text { flex: 1 !important; }
  .dfb-action-arrow { margin-top: 0 !important; }

  /* Slightly taller chart */
  .chart-stage { min-height: 260px !important; }
  .chart-box { min-height: 280px !important; }
}

/* ══ WIDE LAYOUT ≥ 1100px — история справа рядом с блоками ══ */
@media (min-width: 1100px) {
  /* Двухколоночный layout — обе колонки одной высоты */
  .dashboard-main {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr);
    gap: 22px;
    align-items: stretch;
  }
  /* Левая колонка: портфель + кнопки */
  .dfb-left-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .dfb-overview-card { grid-column: unset; grid-row: unset; flex: 1; }
  .dfb-action-grid {
    grid-column: unset; grid-row: unset;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
    margin-top: 0 !important;
    flex-shrink: 0;
  }
  .dfb-action-card {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 16px !important;
    gap: 8px !important;
  }
  .dfb-action-arrow { margin-top: auto !important; }
  /* История — правая колонка, высота = высоте левой колонки */
  .dfb-history-section {
    grid-column: 2;
    grid-row: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  /* Контейнер pane — относительный для crossfade */
  .dfb-history-section .dfb-htab-pane-wrap {
    position: relative;
    flex: 1;
    overflow: hidden;
  }
  /* Контент вкладок — абсолютные, накладываются для crossfade */
  .dfb-history-section .dfb-htab-pane {
    max-height: none !important;
    position: absolute;
    inset: 0;
    overflow-y: auto;
    opacity: 1;
    transition: opacity 0.22s ease;
  }
  .dfb-history-section .dfb-htab-pane.hidden { display: none; }
  .dfb-history-section .dfb-htab-pane.tab-leaving {
    opacity: 0;
    pointer-events: none;
  }
  .dfb-history-section .dfb-htab-pane.tab-entering {
    animation: tab-pane-in 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

/* ══ HERO / GREETING CARD ══ */
.dfb-hero-card {
  border-radius: var(--radius-xl); margin-bottom: 24px; overflow: hidden;
  background: var(--primary-gradient);
  padding: 32px 36px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  box-shadow: 0 8px 32px rgba(96,89,232,0.22);
  position: relative;
}
.dfb-hero-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 50%, rgba(255,255,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.dfb-hero-content { position: relative; z-index: 1; }
.dfb-spark { font-size: 22px; margin-bottom: 8px; display: block; }
.dfb-hero-content h1 { color: #fff; font-size: 1.6rem; font-weight: 800; line-height: 1.2; margin-bottom: 4px; }
.dfb-hero-content p { color: rgba(255,255,255,0.72); font-size: 15px; }

.dfb-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.dfb-pill-button {
  height: 46px; padding: 0 22px; border-radius: 14px; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.dfb-pill-button.primary-button {
  background: #FFFFFF; color: var(--primary);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.dfb-pill-button.primary-button:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
.dfb-pill-button.ghost-button {
  background: rgba(255,255,255,0.12); color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}
.dfb-pill-button.ghost-button:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }

.dfb-wallet-3d { position: relative; width: 120px; height: 120px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.dfb-wallet-face {
  width: 90px; height: 72px; border-radius: 18px;
  background: rgba(255,255,255,0.15); border: 2px solid rgba(255,255,255,0.25);
  position: absolute;
}
.dfb-chart-stroke { position: absolute; width: 60px; height: 30px; bottom: 18px; right: 18px; }
.coin { position: absolute; font-size: 22px; font-weight: 700; color: rgba(255,255,255,0.9); }
.coin-btc { top: 10px; right: 12px; }
.coin-usd { bottom: 12px; left: 12px; }

/* ══ DASHBOARD LAYOUT ══ */
.dfb-dashboard-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr); gap: 24px; }

/* ══ CARD BASE ══ */
.card {
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  background: var(--bg-card); box-shadow: var(--shadow-md);
}

/* ══ OVERVIEW / PORTFOLIO CARD ══ */
.dfb-overview-card { }
.card-chart { padding: 28px 28px 22px; }
.card-header { display: flex; justify-content: space-between; gap: 16px; }
.card-header-lg { align-items: flex-start; margin-bottom: 16px; }
.card-label { margin: 0 0 8px; color: var(--text-3); font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }

.dfb-wallet-line { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.wallet-summary-copy { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.wallet-summary-copy strong { font-size: 13px; font-weight: 600; color: var(--text-2); }
.compact-wallet-copy .card-label { margin: 0; }
.portfolio-value { margin: 0; font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1; color: var(--text-1); letter-spacing: -0.03em; }
.bonus-balance-line { margin: 4px 0 0; font-size: 13px; color: var(--text-3); }
.dfb-equity-tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--primary-bg); color: var(--primary); border: 1px solid var(--primary-border); margin-top: 6px; }

.portfolio-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 16px; }
.dfb-growth-row { margin-bottom: 0; }
.portfolio-growth { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; padding: 5px 10px; border-radius: 999px; }
.portfolio-growth.positive { color: var(--success); background: var(--success-bg); }
.portfolio-growth.negative { color: var(--danger); background: var(--danger-bg); }
.growth-arrow { font-size: 16px; }
.positive { color: var(--success); }
.negative { color: var(--danger); }

/* Chart */
.chart-box { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: stretch; min-height: 380px; margin-top: 20px; }
.chart-y-axis { display: flex; flex-direction: column; justify-content: space-between; padding-top: 14px; padding-bottom: 38px; color: var(--text-3); font-size: 12px; }
.chart-stage { position: relative; min-height: 340px; border-radius: 18px; overflow: hidden; background: var(--bg-card2); }
.grid-lines {
  position: absolute; inset: 14px 0 38px;
  background-image:
    linear-gradient(to bottom, transparent calc(25% - 1px), var(--border) calc(25% - 1px), var(--border) 25%, transparent 25%),
    linear-gradient(to bottom, transparent calc(50% - 1px), var(--border) calc(50% - 1px), var(--border) 50%, transparent 50%),
    linear-gradient(to bottom, transparent calc(75% - 1px), var(--border) calc(75% - 1px), var(--border) 75%, transparent 75%);
}
.chart-svg { position: absolute; inset: 14px 0 38px; width: 100%; height: calc(100% - 52px); }
.chart-area { fill: rgba(96,89,232,0.08); }
.chart-line { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; }
.chart-x-axis { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 0 6px; color: var(--text-3); font-size: 11px; }

/* Range switcher */
.range-switcher { display: flex; flex-wrap: wrap; gap: 4px; }
.dfb-range { margin-top: 8px; justify-content: flex-start; }
.range-chip {
  min-width: 48px; height: 36px; padding: 0 12px;
  border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--text-3); font-size: 13px; font-weight: 600;
  transition: all 0.18s;
}
.range-chip:hover { background: var(--bg-page); color: var(--text-2); }
.range-chip.active { background: var(--primary-bg); color: var(--primary); border-color: var(--primary-border); }

/* ══ SIDE STACK ══ */
.side-stack { display: grid; gap: 20px; }
.info-card { padding: 24px; }
.info-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.info-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; flex-shrink: 0;
}
.info-icon svg { width: 24px; height: 24px; }
.info-icon.blue { background: var(--primary-bg); color: var(--primary); }
.info-icon.green { background: var(--success-bg); color: var(--success); }
.info-value { margin: 4px 0 0; font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.card-caption { margin: 0; color: var(--text-2); font-size: 14px; }
.blue-glow { background: linear-gradient(135deg, var(--primary-bg), var(--bg-card)); }
.green-glow { background: linear-gradient(135deg, var(--success-bg), var(--bg-card)); }

.two-col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

/* ══ ACTION GRID ══ */
.dfb-action-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
  margin-top: 22px;
}
.dfb-action-card {
  border-radius: var(--radius-lg); padding: 18px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  cursor: pointer; text-align: center; font-size: 13px; font-weight: 600; color: var(--text-2);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
}
.dfb-action-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--primary-border); color: var(--primary); }
.dfb-action-card:active { transform: translateY(0) scale(0.97); }
.dfb-action-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; background: var(--primary-bg);
  color: var(--primary); font-size: 20px;
}
.dfb-action-card span { font-size: 13px; font-weight: 600; line-height: 1.2; }

/* ══ WALLETS GRID ══ */
.wallets-grid { margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.wallet-card { padding: 24px; }
.wallet-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.wallet-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center; flex-shrink: 0;
}
.wallet-icon svg { width: 22px; height: 22px; }
.wallet-icon.money, .wallet-icon.trend { background: var(--primary-bg); color: var(--primary); }
.wallet-name { margin: 0 0 8px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.wallet-balance { margin: 0 0 18px; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; line-height: 1; color: var(--text-1); }
.wallet-change { font-size: 13px; font-weight: 700; }
.wallet-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.small-chip {
  min-height: 38px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-page);
  color: var(--text-2); font-size: 13px; font-weight: 600;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.small-chip:hover { background: var(--primary-bg); color: var(--primary); border-color: var(--primary-border); }

/* ══ TRADES LIST ══ */
.trades-card { margin-top: 28px; padding: 28px 28px; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.section-header h2 { margin: 0; font-size: clamp(1.4rem, 2.5vw, 1.9rem); font-weight: 800; color: var(--text-1); }
.text-link { color: var(--primary); background: transparent; font-size: 14px; font-weight: 600; border: none; cursor: pointer; transition: opacity 0.18s; }
.text-link:hover { opacity: 0.75; }
.trade-list { display: grid; gap: 12px; }
.trade-row {
  padding: 20px 20px; border: 1px solid var(--border); border-radius: 16px;
  background: var(--bg-card2); display: flex; align-items: center; gap: 14px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.trade-row:hover { border-color: var(--primary-border); box-shadow: var(--shadow-sm); }
.trade-side {
  min-width: 64px; height: 44px; padding: 0 14px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.trade-side.buy { color: var(--success); background: var(--success-bg); }
.trade-side.sell { color: var(--danger); background: var(--danger-bg); }
.trade-main { flex: 1; }
.trade-main h3 { margin: 0 0 3px; font-size: 15px; font-weight: 700; color: var(--text-1); }
.trade-main p, .trade-time { margin: 0; color: var(--text-3); font-size: 13px; }
.trade-result { min-width: 110px; text-align: right; }
.trade-result strong { margin: 0 0 2px; font-size: 15px; display: block; }
.trade-result span { font-size: 12px; color: var(--text-3); }
.trade-time { min-width: 64px; text-align: right; }

/* ══ DEPOSIT TABS & FORMS ══ */
.deposit-tabs {
  display: inline-grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  padding: 5px; border-radius: 16px; background: var(--bg-page); margin-bottom: 16px;
}
.deposit-tab {
  min-width: 110px; min-height: 44px; border-radius: 12px;
  background: transparent; color: var(--text-3); font-size: 14px; font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.18s;
}
.deposit-tab:hover:not(.active) { color: var(--text-2); background: var(--bg-card); }
.deposit-tab.active { color: var(--primary); background: var(--bg-card); border-color: var(--primary-border); box-shadow: var(--shadow-sm); }

.deposit-chip-row { display: flex; gap: 10px; margin-bottom: 18px; }
.deposit-chip {
  min-height: 44px; padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--bg-page);
  color: var(--text-1); font-weight: 700; font-size: 14px;
  transition: all 0.18s;
}
.deposit-chip.active { background: var(--primary-bg); border-color: var(--primary-border); color: var(--primary); }
.deposit-chip[disabled] { opacity: 0.55; cursor: default; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 16px; }
.field { display: grid; gap: 8px; }
.field span { color: var(--text-2); font-size: 13px; font-weight: 500; }
.field-input, .field input, .field select {
  appearance: none; -webkit-appearance: none;
  width: 100%; min-height: 52px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--bg-page);
  color: var(--text-1); padding: 0 16px; outline: none; font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus, .field-input:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg);
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% - 3px), calc(100% - 14px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 40px;
}
.full-span { grid-column: 1 / -1; }

.deposit-address-card {
  display: flex; align-items: stretch; justify-content: space-between; gap: 14px;
  padding: 18px; border-radius: 16px; border: 1px solid var(--border);
  background: var(--bg-page); margin-bottom: 12px;
}
.deposit-address-copy { flex: 1; min-width: 0; }
.deposit-address-card code { display: block; margin-top: 8px; font-family: inherit; font-size: 14px; font-weight: 700; word-break: break-all; color: var(--text-1); }
.deposit-note { margin: 0 0 16px; color: var(--text-2); font-size: 14px; }
.deposit-address-card .ghost-button { min-height: 52px; justify-content: center; border-radius: 14px; font-weight: 700; }

.deposit-badge {
  min-height: 40px; padding: 0 16px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  background: var(--primary-bg); border: 1px solid var(--primary-border); color: var(--primary);
}
.deposit-badge.soft { background: var(--bg-page); border-color: var(--border); color: var(--text-2); }

/* ══ BUTTONS ══ */
.primary-button {
  min-height: 52px; padding: 0 24px; border-radius: 14px;
  background: var(--primary); color: #fff; border: 0;
  font-size: 15px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(96,89,232,0.22);
  transition: background 0.2s, transform 0.22s, box-shadow 0.22s;
  position: relative; overflow: hidden; isolation: isolate;
}
.primary-button:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(96,89,232,0.3); }
.primary-button:active { transform: translateY(0) scale(0.97); }
.primary-button::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 25%, rgba(255,255,255,0.22) 50%, transparent 75%);
  transform: translateX(-150%); pointer-events: none; z-index: 1; transition: transform 0s;
}
.primary-button:hover::after { transform: translateX(150%); transition: transform 0.6s; }

.ghost-button {
  min-height: 52px; padding: 0 24px; border-radius: 14px;
  background: var(--bg-page); color: var(--text-1); border: 1px solid var(--border);
  font-size: 15px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.ghost-button:hover { background: var(--primary-bg); border-color: var(--primary-border); color: var(--primary); transform: translateY(-1px); }
.ghost-button:active { transform: scale(0.97); }

.icon-button {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg-page); color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center; font-size: 20px;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.icon-button:hover { background: var(--primary-bg); color: var(--primary); border-color: var(--primary-border); }
.icon-only-button { background: none; border: none; cursor: pointer; }
.block { width: 100%; }

/* ══ PLACEHOLDER CARD ══ */
.placeholder-card { padding: 14px 0; border-radius: 0; border: none; background: none; }
.placeholder-card h3 { margin: 0 0 10px; font-size: 16px; font-weight: 700; color: var(--text-1); }
.placeholder-card p { margin: 0; color: var(--text-2); line-height: 1.6; font-size: 14px; }

/* ══ WALLET SELECTOR / PICK ══ */
.wallet-summary-card { min-height: 200px; }
.wallet-summary-top { align-items: flex-start; justify-content: space-between; gap: 16px; }
.wallet-select-trigger {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px;
  border: 1px solid var(--border); background: var(--bg-page);
  color: var(--text-1); border-radius: 14px; padding: 12px 14px; min-width: 180px;
  transition: border-color 0.2s, background 0.2s;
}
.wallet-select-trigger:hover { border-color: var(--primary-border); background: var(--primary-bg); }
.wallet-select-trigger strong { font-size: 14px; font-weight: 700; }
.wallet-summary-actions { grid-template-columns: repeat(3, 1fr) !important; }
.wallet-picker-modal { max-height: 85vh; display: flex; flex-direction: column; }
.modal-backdrop .wallet-picker-modal { overflow: hidden; }
.wallet-picker-modal .wallet-selector-list { flex: 1; min-height: 0; }
.wallet-selector-list { display: grid; grid-template-columns: 1fr; gap: 10px; max-height: 48vh; overflow: auto; margin: 8px 0 16px; }
.wallet-selector-item {
  width: 100%; min-width: 0; text-align: left; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--bg-page); color: var(--text-1);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  overflow: hidden;
  transition: border-color 0.18s, background 0.18s;
}
.wallet-selector-item:hover { border-color: var(--primary-border); background: var(--primary-bg); }
.wallet-selector-item div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wallet-selector-copy { flex: 1; overflow: hidden; }
.wallet-selector-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-selector-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-selector-meta { flex-shrink: 0; text-align: right; }
.wallet-selector-item span { font-size: 12px; color: var(--text-3); }
.wallet-selector-item small { color: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.wallet-selector-item.active { border-color: var(--primary); background: var(--primary-bg); box-shadow: 0 0 0 1px var(--primary-border); }

/* ══ LOAD MORE ══ */
.load-more-trades-btn {
  display: block; width: 100%; margin-top: 12px; padding: 12px;
  background: var(--bg-page); border: 1px solid var(--border); border-radius: 12px;
  color: var(--primary); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.load-more-trades-btn:hover { background: var(--primary-bg); border-color: var(--primary-border); }

/* ══ MISC ══ */
.spinner {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(96,89,232,0.2); border-top-color: var(--primary);
  animation: spin 0.8s linear infinite; vertical-align: middle; margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

select, .field select {
  appearance: none; -webkit-appearance: none; color-scheme: light;
}

/* ══ STATUS / INFO BOXES inside modals ══ */
#withdrawStatusBox { margin-top: 12px; padding: 14px 16px; border-radius: 14px; background: #F4F5F8; border: 1px solid rgba(0,0,0,0.07); color: #374151; line-height: 1.5; font-size: 14px; }
#fiatTicketState, #verificationStatusBox { background: none !important; border: none !important; color: #6B7280 !important; font-size: 13px !important; padding: 8px 0 !important; }
#fiatRequisitesBox { background: #F8F9FC !important; border: 1px solid rgba(0,0,0,0.07) !important; box-shadow: none !important; }

/* Install copy */
.install-copy { margin: 10px 0 18px !important; color: var(--text-2) !important; line-height: 1.6 !important; }
.install-actions { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.install-actions .primary-button, .install-actions .ghost-button { width: 100%; min-height: 52px; border-radius: 14px; }


/* Notifications detail / history modals */
.notifications-list-box, .notifications-detail-box { max-height: 60vh; overflow-y: auto; }
.notif-detail-text { color: #374151; font-size: 15px; line-height: 1.65; }
.notification-modal-text { color: #374151; font-size: 15px; line-height: 1.65; overflow-y: auto; flex: 1; min-height: 0; }
.notif-back-btn { margin-right: auto; }
.dfb-modal-history-list { max-height: 62vh; overflow-y: auto; }
.dfb-history-modal-card { max-height: 85vh; overflow: hidden; display: flex; flex-direction: column; }
.notifications-list-modal-card { width: min(660px, 100%); }
.notification-modal-card { width: min(560px, 100%); }
#notificationModal .modal-card { max-height: min(85vh, 700px) !important; overflow: hidden !important; display: flex !important; flex-direction: column !important; }
#notificationsListModal .modal-card { max-height: min(85vh, 800px) !important; overflow: hidden !important; display: flex !important; flex-direction: column !important; }

/* ══ VERIFICATION BANNER ══ */
.verif-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: 16px; margin-bottom: 14px;
  background: linear-gradient(135deg, #FFF7ED 0%, #FEF3C7 100%);
  border: 1.5px solid #F59E0B;
  box-shadow: 0 2px 12px rgba(245,158,11,0.12);
}
.verif-banner.hidden { display: none !important; }
.verif-banner-icon {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px;
  background: rgba(245,158,11,0.15); display: flex; align-items: center; justify-content: center;
  color: #D97706;
}
.verif-banner-body { flex: 1; min-width: 0; }
.verif-banner-body strong { display: block; font-size: 14px; font-weight: 700; color: #92400E; margin-bottom: 2px; }
.verif-banner-body span { font-size: 13px; color: #B45309; line-height: 1.4; }
.verif-banner-btn {
  flex-shrink: 0; padding: 8px 16px; border-radius: 10px;
  background: #F59E0B; color: #FFFFFF; font-size: 13px; font-weight: 700;
  border: none; cursor: pointer; white-space: nowrap;
  transition: background 0.18s;
}
.verif-banner-btn:hover { background: #D97706; }
@media (max-width: 520px) {
  .verif-banner { flex-wrap: wrap; }
  .verif-banner-btn { width: 100%; text-align: center; padding: 10px; }
}

/* ══════════════════════════════════════════
   OVERVIEW CARD
══════════════════════════════════════════ */
.dfb-overview-card {
  padding: 22px 20px 10px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
}
.dfb-overview-top { margin-bottom: 16px; }
.dfb-greeting-row { display: flex; align-items: center; gap: 7px; margin-bottom: 14px; }
.dfb-greeting-text { font-size: 1.05rem; font-weight: 700; color: var(--text-1); }
.dfb-greeting-wave { font-size: 1.2rem; }

.dfb-balance-label { margin: 0 0 6px; font-size: 12px; font-weight: 500; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; }
.dfb-balance-row { display: flex; align-items: center; gap: 10px; }
.portfolio-value {
  margin: 0; font-size: clamp(2rem, 8vw, 2.8rem); font-weight: 800; line-height: 1;
  letter-spacing: -0.03em; color: var(--text-1);
  transition: filter 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s;
}
.portfolio-value.balance-hidden { filter: blur(10px); opacity: 0.6; user-select: none; }
.dfb-eye-btn {
  background: none; border: none; cursor: pointer; padding: 4px;
  color: var(--text-3); display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; transition: color 0.18s, background 0.18s;
}
.dfb-eye-btn:hover { color: var(--primary); background: var(--primary-bg); }

/* Fiat amount field with inline currency symbol */
.fiat-amount-field { position: relative; display: block; }
.fiat-amount-field .fiat-input-sym { padding-right: 2rem; }
.currency-suffix {
  position: absolute; top: 50%; transform: translateY(-50%);
  pointer-events: none; color: var(--text-1); font-size: 15px;
  font-weight: 400; white-space: nowrap; left: 16px;
  transition: left 0.05s linear; opacity: 0;
}
.currency-suffix.visible { opacity: 1; }
.fiat-amount-mirror {
  position: absolute; visibility: hidden; pointer-events: none;
  white-space: pre; font-size: 15px; font-family: inherit;
  top: 0; left: 0; height: 0; overflow: hidden;
}

.dfb-wallet-name-badge { font-size: 12px; font-weight: 600; color: var(--text-2); }

.dfb-change-chip-row { margin-top: 10px; }
.dfb-change-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--success-bg); color: var(--success);
}
.dfb-change-chip.negative { background: var(--danger-bg); color: var(--danger); }
.dfb-change-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

.chart-box { min-height: 220px; margin-top: 0; display: block; }
.chart-stage {
  position: relative; min-height: 200px; border-radius: 16px;
  overflow: hidden; background: var(--bg-card2);
}
.chart-svg { position: absolute; inset: 14px 0 34px; width: 100%; height: calc(100% - 48px); }
.chart-area { fill: url(#portfolioGradient); }
.chart-line { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linecap: round; }
.grid-lines {
  position: absolute; inset: 14px 0 34px;
  background-image:
    linear-gradient(to bottom, transparent calc(33% - 1px), var(--border) calc(33% - 1px), var(--border) 33%, transparent 33%),
    linear-gradient(to bottom, transparent calc(66% - 1px), var(--border) calc(66% - 1px), var(--border) 66%, transparent 66%);
}
.chart-x-axis { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 0 8px 6px; color: var(--text-3); font-size: 10px; }

.range-switcher { display: flex; gap: 2px; margin-top: 12px; }
.dfb-range { justify-content: space-between; }
.range-chip {
  flex: 1; height: 34px; padding: 0 4px;
  border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--text-3); font-size: 12px; font-weight: 600;
  transition: all 0.18s;
}
.range-chip:hover { background: var(--bg-page); color: var(--text-2); }
.range-chip.active { background: var(--primary-bg); color: var(--primary); border-color: var(--primary-border); }

/* ══════════════════════════════════════════
   ACTION GRID (3 cards — vertical layout)
══════════════════════════════════════════ */
.dfb-action-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 0;
}
.dfb-action-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px 12px 14px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  cursor: pointer; box-shadow: var(--shadow-sm); text-align: left;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.dfb-action-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--primary-border); }
.dfb-action-card:active { transform: translateY(0) scale(0.97); }

.dfb-action-icon {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center; flex-shrink: 0;
}
.dfb-icon-green { background: rgba(16,185,129,0.12); color: #10B981; }
.dfb-icon-blue  { background: rgba(59,130,246,0.10); color: #3B82F6; }
.dfb-icon-purple { background: var(--primary-bg); color: var(--primary); }

.dfb-action-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.dfb-action-text strong { font-size: 13px; font-weight: 700; color: var(--text-1); line-height: 1.2; }
.dfb-action-text small  { font-size: 11px; color: var(--text-3); line-height: 1.3; }
.dfb-action-arrow { font-size: 16px; color: var(--text-3); margin-top: auto; }

/* ══════════════════════════════════════════
   ASSETS SECTION
══════════════════════════════════════════ */
.dfb-assets-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); overflow: hidden;
}
.dfb-assets-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px;
}
.dfb-assets-title { margin: 0; font-size: 16px; font-weight: 700; color: var(--text-1); }
.dfb-assets-view-all-link {
  color: var(--primary); font-size: 13px; font-weight: 600; text-decoration: none;
  display: inline-flex; align-items: center; gap: 3px;
  transition: opacity 0.18s;
}
.dfb-assets-view-all-link:hover { opacity: 0.75; }
.dfb-assets-list { display: flex; flex-direction: column; }
.dfb-asset-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 20px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s;
}
.dfb-asset-row:last-child { border-bottom: none; }
.dfb-asset-row:hover { background: var(--bg-card2); }
.dfb-asset-coin-icon {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  font-size: 19px; font-weight: 700;
}
.dfb-asset-info { flex: 1; min-width: 0; }
.dfb-asset-name   { font-size: 14px; font-weight: 700; color: var(--text-1); margin: 0 0 2px; }
.dfb-asset-symbol { font-size: 12px; color: var(--text-3); margin: 0; }
.dfb-asset-sparkline { width: 64px; height: 32px; flex-shrink: 0; }
.dfb-asset-price-col { text-align: right; flex-shrink: 0; }
.dfb-asset-price  { font-size: 14px; font-weight: 700; color: var(--text-1); display: block; margin-bottom: 2px; }
.dfb-asset-change { font-size: 12px; font-weight: 600; display: block; }
.dfb-asset-change.positive { color: var(--success); }
.dfb-asset-change.negative { color: var(--danger); }

/* ══════════════════════════════════════════
   HISTORY / TRADES INLINE TAB SECTION
══════════════════════════════════════════ */
.dfb-history-section { overflow: hidden; padding: 0; }
.dfb-htab-bar {
  display: flex; border-bottom: 1px solid var(--border);
}
.dfb-htab {
  flex: 1; height: 48px; background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: var(--text-3); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: color 0.18s, border-color 0.18s;
}
.dfb-htab:hover { color: var(--text-2); }
.dfb-htab.active { color: var(--primary); border-bottom-color: var(--primary); }
.dfb-htab-pane { padding: 4px 0; min-height: 300px; max-height: 56vh; overflow-y: auto; }
.dfb-htab-pane .trade-row { border-radius: 0; border-left: none; border-right: none; border-top: none; }
.dfb-htab-pane .trade-row:first-child { border-top: none; }
.dfb-htab-pane .trade-card { border-radius: 0; border-left: none; border-right: none; border-bottom: 1px solid var(--border); }
.dfb-htab-pane .trade-card:last-child { border-bottom: none; }

/* Upgrade card */
.dfb-upgrade-card {
  display: flex; align-items: center; gap: 14px;
  margin: 0 14px 14px; padding: 16px;
  background: #0C0C1E; border-radius: var(--radius-lg);
  overflow: hidden; position: relative;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
}
.dfb-upgrade-card:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(0,0,0,0.25); }
.dfb-upgrade-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 80px;
  background: linear-gradient(135deg, rgba(96,89,232,0.3), transparent); pointer-events: none;
}
.dfb-upgrade-card-img {
  width: 56px; height: 38px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, #1a1a3e, #2a1a5e);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center; position: relative; z-index: 1;
}
.dfb-upgrade-card-img svg { width: 22px; height: 22px; color: rgba(255,255,255,0.6); }
.dfb-upgrade-text { flex: 1; min-width: 0; position: relative; z-index: 1; }
.dfb-upgrade-text strong { display: block; font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 3px; }
.dfb-upgrade-text span   { font-size: 11px; color: rgba(255,255,255,0.55); line-height: 1.4; display: block; }
.dfb-upgrade-btn {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8); font-size: 16px;
  display: grid; place-items: center; position: relative; z-index: 1;
  cursor: pointer; transition: background 0.2s;
}
.dfb-upgrade-btn:hover { background: rgba(255,255,255,0.18); }

/* ══════════════════════════════════════════
   BOTTOM TAB NAV
══════════════════════════════════════════ */
.bottom-tab-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 64px; z-index: 100;
  background: #FFFFFF; border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.07);
  display: flex; align-items: stretch; gap: 0; padding: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  padding: 8px 4px;
  color: var(--text-3); font-size: 10px; font-weight: 600; line-height: 1;
  background: none; border: none; border-top: 2px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.tab-item:hover  { color: var(--primary); background: var(--primary-bg); border-top-color: var(--primary); }
.tab-item.active { color: var(--primary); border-top-color: var(--primary); }
.tab-icon { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tab-icon svg { width: 100%; height: 100%; }
.tab-label { font-size: 10px; font-weight: 600; white-space: nowrap; }

/* Special center trade button */
.tab-item-trade { position: relative; }
.tab-item-trade .tab-icon {
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--primary-gradient); color: #fff;
  box-shadow: 0 4px 16px rgba(96,89,232,0.32);
  margin-top: -12px;
}
.tab-item-trade { border-top-color: transparent !important; }
.tab-item-trade:hover { background: transparent !important; }

/* ══════════════════════════════════════════
   CHART LOADER SPINNER
══════════════════════════════════════════ */
.chart-loader {
  position: absolute; inset: 0; z-index: 5; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(248,249,252,0.80); backdrop-filter: blur(1px);
}
.chart-loader.hidden { display: none !important; }
.chart-loader-spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(96,89,232,0.18);
  border-top-color: var(--primary);
  animation: spin 0.72s linear infinite;
}

/* ══════════════════════════════════════════
   TRADE & TRANSACTION CARDS
══════════════════════════════════════════ */
.trade-card {
  padding: 14px 16px;
  background: var(--bg-card);
}

/* Inside inline tab pane */
.dfb-htab-pane .trade-card,
.dfb-htab-pane .trade-card-flat {
  border: none; border-radius: 0;
  border-bottom: 1px solid var(--border);
}
.dfb-htab-pane .trade-card:last-of-type,
.dfb-htab-pane .trade-card-flat:last-of-type { border-bottom: none; }

.trade-row-head {
  display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px;
}
.trade-head-left  { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; flex-wrap: wrap; }
.trade-head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }

/* Side chips (buy/sell, crypto/fiat/withdraw) */
.side-chip {
  display: inline-flex; align-items: center; justify-content: center;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em; flex-shrink: 0;
  text-transform: uppercase;
}
.side-chip.long  { background: var(--success-bg); color: var(--success); }
.side-chip.short { background: var(--danger-bg);  color: var(--danger);  }

.trade-percent { font-size: 12px; font-weight: 700; }
.trade-percent.positive { color: var(--success); }
.trade-percent.negative { color: var(--danger);  }

.trade-symbol { font-size: 15px; font-weight: 800; color: var(--text-1); }
.trade-profit-inline { font-size: 13px; font-weight: 700; }
.trade-profit-inline.positive { color: var(--success); }
.trade-profit-inline.negative { color: var(--danger);  }

/* Metrics grid */
.trade-metric-row {
  display: grid; gap: 8px;
  padding-top: 10px; border-top: 1px solid var(--border);
}
.trade-metric-row-six   { grid-template-columns: repeat(3, 1fr); }
.trade-metric-row-three { grid-template-columns: repeat(3, 1fr); }

.trade-metric { display: flex; flex-direction: column; gap: 2px; }
.trade-metric b    { font-size: 10px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.trade-metric span { font-size: 12px; font-weight: 600; color: var(--text-1); }

/* Transaction-specific */
.transaction-status-text { font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }
.transaction-status-text.is-success { color: var(--success); }
.transaction-status-text.is-danger  { color: var(--danger); }
.transaction-status-text.is-warning { color: var(--warning); }

.tx-center-label {
  font-size: 12px; font-weight: 500; color: var(--text-2);
  flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 6px;
}
.transaction-line-amount { font-size: 16px; font-weight: 800; line-height: 1; }
.transaction-line-amount.positive { color: var(--success); }
.transaction-line-amount.negative { color: var(--danger);  }
.transaction-line-amount.pending  { color: var(--warning); }

/* "See all" button at bottom of trade list */
.see-all-trades-btn, .see-all-trades-btn-bottom {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 46px;
  background: var(--bg-card2); border: none; border-top: 1px solid var(--border);
  color: var(--primary); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background 0.18s;
}
.see-all-trades-btn:hover { background: var(--primary-bg); }

/* Empty state row inside pane */
.dfb-htab-pane .trade-row {
  border: none; border-radius: 0; background: transparent;
  border-bottom: 1px solid var(--border);
}

/* Legacy modal list rows */
.trade-list { display: flex; flex-direction: column; gap: 8px; }
.trade-row {
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--bg-card2); display: flex; align-items: center; gap: 12px;
  transition: border-color 0.18s, background 0.18s;
}
.trade-row:hover { border-color: var(--primary-border); background: #FAFBFF; }
.trade-side {
  min-width: 52px; height: 36px; padding: 0 10px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.trade-side.buy  { color: var(--success); background: var(--success-bg); }
.trade-side.sell { color: var(--danger);  background: var(--danger-bg);  }
.trade-main { flex: 1; min-width: 0; }
.trade-main h3 { margin: 0 0 2px; font-size: 14px; font-weight: 700; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trade-main p, .trade-time { margin: 0; color: var(--text-3); font-size: 12px; }
.trade-result { flex-shrink: 0; text-align: right; }
.trade-result strong { display: block; font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.trade-result span { font-size: 11px; color: var(--text-3); }

/* ══════════════════════════════════════════
   MODAL ADJUSTMENTS
══════════════════════════════════════════ */
.dfb-modal-history-list { max-height: 60vh; overflow-y: auto; }
.dfb-history-modal-card { max-height: 88vh; overflow: hidden; display: flex; flex-direction: column; }

/* ══════════════════════════════════════════
   FORMS & DEPOSITS (kept from original)
══════════════════════════════════════════ */
.two-col, .form-grid { grid-template-columns: 1fr; }
@media (min-width: 480px) { .form-grid { grid-template-columns: repeat(2,1fr); } }
.deposit-tabs { width: 100%; }
.deposit-tab { min-width: 0; }
.deposit-address-card { flex-direction: column; }
@media (min-width: 480px) { .deposit-address-card { flex-direction: row; } }

/* ══════════════════════════════════════════
   REQUISITE LINES (fiat deposit bank details)
══════════════════════════════════════════ */
.requisites-clean { width: 100%; }
.requisite-line {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 6px; border-bottom: 1px solid var(--border);
  gap: 12px; border-radius: 8px; margin: 0 -6px;
  transition: background 0.15s;
}
.requisite-line[data-copy] { cursor: pointer; }
.requisite-line[data-copy]:hover { background: var(--primary-bg, rgba(96,89,232,0.07)); }
.requisite-line[data-copy]:active { background: var(--primary-bg, rgba(96,89,232,0.12)); }
.requisite-line:last-child { border-bottom: none; }
.requisite-line span {
  font-size: 13px; color: var(--text-3); font-weight: 500;
  flex-shrink: 0;
}
.requisite-line strong {
  font-size: 14px; color: var(--text-1); font-weight: 700;
  text-align: right; word-break: break-all;
}

/* ══════════════════════════════════════════
   CUSTOM FILE INPUT (fiat receipt upload)
══════════════════════════════════════════ */
.custom-file-wrap {
  display: flex; align-items: center; gap: 10px;
  width: 100%; margin-top: 6px;
}
.custom-file-wrap input[type="file"] {
  position: absolute !important; width: 1px !important; height: 1px !important;
  opacity: 0 !important; pointer-events: none !important;
}
.custom-file-btn {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card2);
  color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background 0.15s, border-color 0.15s; white-space: nowrap;
}
.custom-file-btn:hover { background: var(--bg-page); border-color: var(--border-strong); }
.custom-file-label {
  flex: 1; font-size: 13px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.custom-file-wrap.has-file .custom-file-label { color: #10B981; }
.custom-file-wrap.has-file .custom-file-btn { border-color: rgba(16,185,129,0.35); background: rgba(16,185,129,0.06); }

/* ═══════════════════════════════════════════════════════
   TRADE & TRANSACTION ANIMATIONS  2026-06-04
   ═══════════════════════════════════════════════════════ */

/* ── Entry: slide-up + fade ── */
@keyframes card-enter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── New-item highlight flash (пурпурный) ── */
@keyframes card-flash-new {
  0%   { box-shadow: 0 0 0 2px rgba(96,89,232,0.5), 0 4px 18px rgba(96,89,232,0.15); background: rgba(96,89,232,0.06); }
  100% { box-shadow: none; background: transparent; }
}

/* ── Chip pop (spring) ── */
@keyframes chip-pop {
  0%   { transform: scale(0.6); opacity: 0; }
  65%  { transform: scale(1.12); }
  100% { transform: scale(1);   opacity: 1; }
}

/* ── Tab pane slide-in ── */
@keyframes tab-pane-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── .trade-card — staggered entry ─── */
.dfb-htab-pane .trade-card,
.dfb-htab-pane .trade-card-flat {
  animation: card-enter 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 0.2s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.2s ease,
              background 0.15s ease;
  will-change: transform;
}
.dfb-htab-pane .trade-card:nth-child(1),
.dfb-htab-pane .trade-card-flat:nth-child(1)  { animation-delay: 0ms; }
.dfb-htab-pane .trade-card:nth-child(2),
.dfb-htab-pane .trade-card-flat:nth-child(2)  { animation-delay: 40ms; }
.dfb-htab-pane .trade-card:nth-child(3),
.dfb-htab-pane .trade-card-flat:nth-child(3)  { animation-delay: 80ms; }
.dfb-htab-pane .trade-card:nth-child(4),
.dfb-htab-pane .trade-card-flat:nth-child(4)  { animation-delay: 120ms; }
.dfb-htab-pane .trade-card:nth-child(5),
.dfb-htab-pane .trade-card-flat:nth-child(5)  { animation-delay: 160ms; }
.dfb-htab-pane .trade-card:nth-child(6),
.dfb-htab-pane .trade-card-flat:nth-child(6)  { animation-delay: 200ms; }
.dfb-htab-pane .trade-card:nth-child(7),
.dfb-htab-pane .trade-card-flat:nth-child(7)  { animation-delay: 230ms; }
.dfb-htab-pane .trade-card:nth-child(n+8),
.dfb-htab-pane .trade-card-flat:nth-child(n+8) { animation-delay: 260ms; }

.dfb-htab-pane .trade-card:hover,
.dfb-htab-pane .trade-card-flat:hover {
  transform: translateY(-2px);
  background: rgba(96,89,232,0.03);
  box-shadow: 0 4px 18px rgba(96,89,232,0.09);
  z-index: 1; position: relative;
}

/* ─── .trade-card новый элемент ─── */
.dfb-htab-pane .trade-card.is-new,
.dfb-htab-pane .trade-card-flat.is-new {
  animation: card-flash-new 1.6s cubic-bezier(0.22,1,0.36,1) both;
}

/* ─── .trade-row (открытые позиции в основной секции) ─── */
.trade-list .trade-row {
  animation: card-enter 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 0.2s cubic-bezier(0.22,1,0.36,1),
              border-color 0.18s, box-shadow 0.18s;
}
.trade-list .trade-row:nth-child(1) { animation-delay: 0ms; }
.trade-list .trade-row:nth-child(2) { animation-delay: 55ms; }
.trade-list .trade-row:nth-child(3) { animation-delay: 110ms; }
.trade-list .trade-row:nth-child(4) { animation-delay: 165ms; }
.trade-list .trade-row:nth-child(n+5) { animation-delay: 220ms; }

.trade-list .trade-row:hover {
  transform: translateY(-2px);
  border-color: var(--primary-border);
  box-shadow: 0 4px 18px rgba(96,89,232,0.10);
}

/* ─── Side chips ─── */
.side-chip {
  animation: chip-pop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.trade-card:nth-child(1)  .side-chip { animation-delay: 80ms; }
.trade-card:nth-child(2)  .side-chip { animation-delay: 120ms; }
.trade-card:nth-child(3)  .side-chip { animation-delay: 160ms; }
.trade-card:nth-child(4)  .side-chip { animation-delay: 200ms; }
.trade-card:nth-child(n+5) .side-chip { animation-delay: 240ms; }

/* ─── Tab pane при переключении ─── */
.dfb-htab-pane.pane-animating {
  animation: tab-pane-in 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ─── Таб кнопки — spring при hover ─── */
.dfb-htab {
  transition: color 0.15s, border-color 0.15s, transform 0.15s cubic-bezier(0.34,1.56,0.64,1);
}
.dfb-htab:hover { transform: translateY(-1px); }
.dfb-htab.active { transform: none; }

/* ─── Модальное окно со всеми сделками ─── */
.all-trades-list .trade-card,
.all-trades-list .trade-card-flat {
  animation: card-enter 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 0.18s cubic-bezier(0.22,1,0.36,1), box-shadow 0.18s;
}
.all-trades-list .trade-card:nth-child(1)  { animation-delay: 0ms; }
.all-trades-list .trade-card:nth-child(2)  { animation-delay: 35ms; }
.all-trades-list .trade-card:nth-child(3)  { animation-delay: 70ms; }
.all-trades-list .trade-card:nth-child(4)  { animation-delay: 105ms; }
.all-trades-list .trade-card:nth-child(5)  { animation-delay: 140ms; }
.all-trades-list .trade-card:nth-child(n+6) { animation-delay: 175ms; }
.all-trades-list .trade-card:hover,
.all-trades-list .trade-card-flat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(96,89,232,0.09);
}

/* Animated tab indicator */
.dfb-htab-bar { position: relative; }
.dfb-tab-line {
  position: absolute; bottom: -1px; left: 0;
  height: 2px; border-radius: 999px; background: var(--primary);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1), width 0.28s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none; will-change: transform, width;
}
.dfb-htab.active { border-bottom-color: transparent; }
