/* ═══════════════════════════════════════════════════════════
   AICEX Marketplace — Financial Exchange Design System
   Fonts: Syne · Outfit · JetBrains Mono
   Palette: #080B14 base · #0E1220 surface · #6366F1 accent
═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-base:       #080B14;
  --bg-surface:    #0E1220;
  --bg-card:       #0F1623;
  --bg-elevated:   #131929;
  --bg-row:        #0C1420;
  --bg-row-hover:  #111d2e;

  --border:        rgba(255,255,255,0.06);
  --border-subtle: rgba(255,255,255,0.04);
  --border-active: rgba(99,102,241,0.35);

  --accent:        #6366F1;
  --accent-dim:    rgba(99,102,241,0.12);
  --accent-bright: #818CF8;

  --green:         #10B981;
  --green-dim:     rgba(16,185,129,0.1);
  --green-bright:  #34D399;
  --amber:         #F59E0B;
  --amber-dim:     rgba(245,158,11,0.1);
  --red:           #EF4444;
  --red-dim:       rgba(239,68,68,0.1);
  --purple:        #A855F7;
  --cyan:          #06B6D4;

  --text-primary:  #E2E8F0;
  --text-secondary:#94A3B8;
  --text-muted:    #475569;
  --text-code:     #CBD5E1;

  --font-display:  'Syne', sans-serif;
  --font-body:     'Outfit', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     14px;
  --radius-xl:     18px;
  --nav-h:         56px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.5;
}

/* ─── Background ─────────────────────────────────────────── */
.bg-atmosphere {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.bg-orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.05;
}
.bg-orb-1 { width: 700px; height: 700px; background: var(--accent); top: -200px; left: -150px; }
.bg-orb-2 { width: 400px; height: 400px; background: var(--green); bottom: 0; right: -100px; opacity: 0.04; }
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* ─── Navigation ─────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(8,11,20,0.94);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1600px; margin: 0 auto;
  padding: 0 24px; height: 100%;
  display: flex; align-items: center; gap: 28px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-logo {
  width: 32px; height: 32px;
  background: var(--accent-dim);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.nav-wordmark { font-family: var(--font-display); font-weight: 800; font-size: 16px; letter-spacing: 0.08em; }
.nav-divider { width: 1px; height: 16px; background: var(--border); }
.nav-page-label { font-family: var(--font-mono); font-size: 11px; color: var(--green); letter-spacing: 0.05em; }
.nav-tabs { display: flex; gap: 2px; flex: 1; }
.nav-tab {
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  text-decoration: none; transition: all 0.15s; border: none; background: none; cursor: pointer;
}
.nav-tab:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.nav-tab.active { color: var(--green); background: var(--green-dim); border: 1px solid rgba(16,185,129,0.25); }
.nav-right { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.nav-ticker { display: flex; align-items: center; gap: 6px; }
.ticker-label { font-size: 11px; color: var(--text-muted); }
.ticker-value { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--text-primary); }
.ticker-change { font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.ticker-change.up { color: var(--green); }
.ticker-change.down { color: var(--red); }
.nav-acu { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.acu-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.acu-value { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--accent-bright); }
.nav-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: white; cursor: pointer;
}

/* ─── Hero Banner ────────────────────────────────────────── */
.hero-banner {
  position: relative; z-index: 1;
  background: linear-gradient(180deg, rgba(16,185,129,0.04) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
}
.hero-inner {
  max-width: 1600px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.hero-left { flex: 1; max-width: 520px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 12px;
  background: var(--green-dim);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 20px;
  font-size: 12px; font-weight: 500; color: var(--green);
  margin-bottom: 14px;
}
.eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:0.4} }

.hero-headline {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 800;
  line-height: 1.15; letter-spacing: -0.03em;
  color: var(--text-primary); margin-bottom: 12px;
}
.hero-highlight {
  background: linear-gradient(135deg, var(--green), var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 20px; }
.hero-actions { display: flex; align-items: center; gap: 12px; }

.btn-sell-hero {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  background: linear-gradient(135deg, var(--green), #059669);
  border: none; border-radius: var(--radius-md);
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  color: white; cursor: pointer; transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(16,185,129,0.3);
}
.btn-sell-hero:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(16,185,129,0.4); }

.btn-learn {
  display: flex; align-items: center; gap: 6px;
  padding: 11px 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; transition: all 0.15s; font-family: var(--font-body);
}
.btn-learn:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.12); }

/* Hero Stats Grid */
.hero-right { flex-shrink: 0; }
.hero-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.hero-stat-card {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 180px;
  transition: border-color 0.2s;
  animation: cardIn 0.4s ease forwards; opacity: 0;
}
.hero-stat-card:nth-child(1){animation-delay:0.05s}
.hero-stat-card:nth-child(2){animation-delay:0.10s}
.hero-stat-card:nth-child(3){animation-delay:0.15s}
.hero-stat-card:nth-child(4){animation-delay:0.20s}
@keyframes cardIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

.hero-stat-card:hover { border-color: rgba(255,255,255,0.1); }
.hero-stat-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hero-stat-icon.green  { background: var(--green-dim); border: 1px solid rgba(16,185,129,0.2); }
.hero-stat-icon.blue   { background: var(--accent-dim); border: 1px solid var(--border-active); }
.hero-stat-icon.amber  { background: var(--amber-dim); border: 1px solid rgba(245,158,11,0.2); }
.hero-stat-icon.purple { background: rgba(168,85,247,0.1); border: 1px solid rgba(168,85,247,0.2); }

.hero-stat-body { flex: 1; }
.hero-stat-value {
  font-family: var(--font-mono); font-size: 18px; font-weight: 700;
  color: var(--text-primary); line-height: 1;
}
.hero-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.hero-stat-suffix { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.hero-stat-change { font-family: var(--font-mono); font-size: 10px; font-weight: 600; color: var(--green); white-space: nowrap; }

/* ─── Main Layout ────────────────────────────────────────── */
.market-main {
  position: relative; z-index: 1;
  max-width: 1600px; margin: 0 auto;
  padding: 20px 24px 48px;
}
.market-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

/* ─── Table Controls ─────────────────────────────────────── */
.table-controls {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 12px; flex-wrap: wrap;
}
.table-controls-left { display: flex; align-items: center; gap: 10px; }
.section-title {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  color: var(--text-primary); letter-spacing: -0.02em;
}
.listing-count {
  padding: 3px 9px;
  background: var(--accent-dim); border: 1px solid var(--border-active);
  border-radius: 20px; font-size: 11px; font-weight: 600;
  color: var(--accent-bright); font-family: var(--font-mono);
}
.table-controls-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.filter-tabs { display: flex; gap: 2px; }
.filter-tab {
  padding: 5px 12px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  border: none; background: none; cursor: pointer; transition: all 0.15s;
  font-family: var(--font-body);
}
.filter-tab:hover { color: var(--text-secondary); background: rgba(255,255,255,0.04); }
.filter-tab.active {
  color: var(--text-primary); background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
}

.sort-wrapper { position: relative; }
.sort-select {
  appearance: none; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 6px 28px 6px 10px;
  font-family: var(--font-body); font-size: 12px; color: var(--text-secondary);
  outline: none; cursor: pointer; transition: border-color 0.15s;
}
.sort-select:focus { border-color: var(--border-active); }
.sort-arrow {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}

/* ─── Listings Table ─────────────────────────────────────── */
.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  overflow-x: auto;
}

.listings-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}

.listings-table thead tr {
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--border);
}

.listings-table th {
  padding: 11px 14px;
  text-align: left;
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.07em;
  white-space: nowrap; user-select: none;
}

.listings-table th.sortable { cursor: pointer; transition: color 0.15s; }
.listings-table th.sortable:hover { color: var(--text-secondary); }
.listings-table th.sort-active { color: var(--accent-bright); }

.sort-icon { opacity: 0.4; font-size: 10px; margin-left: 3px; }
th.sort-active .sort-icon { opacity: 1; }

/* Table Rows */
.listings-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.12s;
  cursor: pointer;
}
.listings-table tbody tr:last-child { border-bottom: none; }
.listings-table tbody tr:hover { background: var(--bg-row-hover); }
.listings-table tbody tr.row-new {
  animation: rowFlash 0.6s ease;
}
@keyframes rowFlash {
  0%   { background: rgba(16,185,129,0.08); }
  100% { background: transparent; }
}

.listings-table td {
  padding: 13px 14px;
  vertical-align: middle;
  white-space: nowrap;
}

/* Provider Cell */
.provider-cell { display: flex; align-items: center; gap: 9px; }
.provider-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.provider-name { font-weight: 600; color: var(--text-primary); }
.provider-model { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* Credits Cell */
.credits-val {
  font-family: var(--font-mono); font-weight: 600; color: var(--text-primary);
}

/* Price Cell */
.price-val {
  font-family: var(--font-mono); font-weight: 700; color: var(--text-primary);
}
.price-unit { font-size: 10px; color: var(--text-muted); margin-left: 2px; }

/* Face Value */
.face-val {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-muted); text-decoration: line-through;
}

/* Discount Cell */
.discount-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 20px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
}
.discount-badge.high {
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.25);
  color: var(--green-bright);
}
.discount-badge.mid {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.2);
  color: var(--amber);
}
.discount-badge.low {
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  color: var(--accent-bright);
}

/* Seller Cell */
.seller-cell { display: flex; align-items: center; gap: 6px; }
.seller-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: white; flex-shrink: 0;
}
.seller-name { font-size: 12px; color: var(--text-secondary); }
.seller-rating { font-size: 10px; color: var(--amber); margin-left: 2px; }

/* Expires Cell */
.expires-val { font-size: 12px; color: var(--text-muted); }
.expires-soon { color: var(--amber); }

/* Buy Button */
.btn-buy {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px;
  background: var(--accent-dim);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; color: var(--accent-bright);
  cursor: pointer; transition: all 0.15s; font-family: var(--font-body);
  white-space: nowrap;
}
.btn-buy:hover {
  background: rgba(99,102,241,0.22);
  box-shadow: 0 0 12px rgba(99,102,241,0.2);
  transform: translateY(-1px);
}
.btn-buy:active { transform: translateY(0); }

/* Table Footer */
.table-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.1);
  flex-wrap: wrap; gap: 10px;
}
.table-footer-text { font-size: 12px; color: var(--text-muted); }
.pagination { display: flex; gap: 4px; }
.page-btn {
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  border: 1px solid var(--border); background: none; cursor: pointer;
  transition: all 0.15s; font-family: var(--font-mono);
}
.page-btn:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.12); }
.page-btn.active { color: var(--accent-bright); background: var(--accent-dim); border-color: var(--border-active); }
.page-ellipsis { display: flex; align-items: center; color: var(--text-muted); font-size: 12px; padding: 0 4px; }

/* ─── Recent Trades ──────────────────────────────────────── */
.recent-trades {
  margin-top: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.recent-trades-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.recent-trades-title {
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
}
.live-badge {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 600; color: var(--green);
  font-family: var(--font-mono); letter-spacing: 0.05em;
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}
.trades-list { padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; }
.trade-row {
  display: grid; grid-template-columns: auto 1fr auto auto auto;
  align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: var(--radius-sm);
  transition: background 0.12s;
  animation: tradeIn 0.4s ease forwards; opacity: 0;
}
@keyframes tradeIn { from{opacity:0;transform:translateX(-8px)} to{opacity:1;transform:translateX(0)} }
.trade-row:hover { background: rgba(255,255,255,0.03); }
.trade-type {
  padding: 2px 6px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  letter-spacing: 0.05em;
}
.trade-type.buy  { background: var(--green-dim); color: var(--green); }
.trade-type.sell { background: var(--red-dim); color: var(--red); }
.trade-provider { font-size: 12px; color: var(--text-secondary); }
.trade-amount { font-family: var(--font-mono); font-size: 12px; color: var(--text-primary); }
.trade-price { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
.trade-time { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }

/* ─── Sell Panel ─────────────────────────────────────────── */
.sell-panel { display: flex; flex-direction: column; gap: 14px; }

.sell-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: cardIn 0.4s ease 0.1s forwards; opacity: 0;
}
.sell-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  background: rgba(16,185,129,0.03);
}
.sell-card-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.sell-card-badge {
  padding: 2px 8px; border-radius: 20px;
  background: var(--green-dim); border: 1px solid rgba(16,185,129,0.2);
  font-size: 10px; font-weight: 600; color: var(--green);
}

.sell-form { padding: 16px; display: flex; flex-direction: column; gap: 14px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.07em;
  display: flex; align-items: center; justify-content: space-between;
}
.form-label-hint { font-size: 10px; color: var(--green); font-weight: 500; text-transform: none; letter-spacing: 0; }

.form-select-wrapper { position: relative; }
.form-select {
  width: 100%; appearance: none;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 28px 9px 11px;
  font-family: var(--font-body); font-size: 13px; color: var(--text-primary);
  outline: none; cursor: pointer; transition: border-color 0.15s;
}
.form-select:focus { border-color: var(--border-active); }
.form-select-arrow {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}

.form-input-wrapper { position: relative; }
.form-input {
  width: 100%; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 50px 9px 11px;
  font-family: var(--font-mono); font-size: 13px; color: var(--text-primary);
  outline: none; transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--border-active); }
.form-input::placeholder { color: var(--text-muted); font-family: var(--font-body); }
.form-input-suffix {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--text-muted); pointer-events: none;
}

/* Price Suggestion */
.price-suggestion {
  background: rgba(16,185,129,0.05);
  border: 1px solid rgba(16,185,129,0.15);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 5px;
}
.suggestion-row { display: flex; justify-content: space-between; align-items: center; }
.suggestion-label { font-size: 11px; color: var(--text-muted); }
.suggestion-val { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
.suggestion-green { color: var(--green); font-weight: 600; }

/* Fee Breakdown */
.fee-breakdown {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 5px;
}
.fee-row { display: flex; justify-content: space-between; align-items: center; }
.fee-label { font-size: 11px; color: var(--text-muted); }
.fee-val { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
.fee-deduct { color: var(--red); }
.fee-divider { height: 1px; background: var(--border); margin: 3px 0; }
.fee-total-row .fee-label { color: var(--text-secondary); font-weight: 600; font-size: 12px; }
.fee-total { color: var(--green); font-weight: 700; font-size: 13px; }

.btn-list {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px;
  background: linear-gradient(135deg, var(--green), #059669);
  border: none; border-radius: var(--radius-md);
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  color: white; cursor: pointer; transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(16,185,129,0.25);
}
.btn-list:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(16,185,129,0.35); }
.btn-list:active { transform: translateY(0); }

/* ─── Market Depth Card ──────────────────────────────────── */
.depth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: cardIn 0.4s ease 0.15s forwards; opacity: 0;
}
.depth-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.depth-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.07em;
}
.depth-select {
  appearance: none; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 4px 10px; font-size: 11px; color: var(--text-secondary);
  outline: none; cursor: pointer; font-family: var(--font-body);
}
.depth-chart { padding: 14px; }
.depth-bars { display: flex; flex-direction: column; gap: 4px; }
.depth-bar-row { display: flex; align-items: center; gap: 8px; }
.depth-bar-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); width: 40px; text-align: right; flex-shrink: 0; }
.depth-bar-track { flex: 1; height: 6px; background: rgba(255,255,255,0.04); border-radius: 3px; overflow: hidden; }
.depth-bar-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.depth-bar-fill.bid { background: linear-gradient(90deg, var(--green), rgba(16,185,129,0.4)); }
.depth-bar-fill.ask { background: linear-gradient(90deg, rgba(239,68,68,0.4), var(--red)); }
.depth-bar-vol { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); width: 36px; flex-shrink: 0; }
.depth-legend { display: flex; gap: 16px; padding: 0 14px 12px; }
.depth-legend-item { font-size: 11px; font-weight: 500; }
.depth-legend-item.buy { color: var(--green); }
.depth-legend-item.sell { color: var(--red); }

/* ─── Trust Card ─────────────────────────────────────────── */
.trust-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  animation: cardIn 0.4s ease 0.2s forwards; opacity: 0;
}
.trust-item { display: flex; align-items: center; gap: 10px; }
.trust-item span { font-size: 12px; color: var(--text-secondary); }

/* ─── BUY MODAL ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease;
  padding: 20px;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 460px;
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes slideUp { from{transform:translateY(24px);opacity:0} to{transform:translateY(0);opacity:1} }

.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }

.modal-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.modal-provider-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
  margin-bottom: 12px;
}
.modal-title {
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 4px;
}
.modal-subtitle { font-size: 13px; color: var(--text-secondary); }

.modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }

.modal-detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.modal-detail {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}
.modal-detail-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; }
.modal-detail-value { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--text-primary); }
.modal-strikethrough { text-decoration: line-through; color: var(--text-muted); }
.modal-discount { color: var(--green); }
.modal-seller { color: var(--accent-bright); }

.modal-price-box {
  background: rgba(99,102,241,0.06);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.modal-price-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.modal-price-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.modal-price-right { display: flex; align-items: baseline; gap: 8px; }
.modal-price-original { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); text-decoration: line-through; }
.modal-price-final { font-family: var(--font-mono); font-size: 22px; font-weight: 800; color: var(--text-primary); }
.modal-savings-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--green); font-weight: 500;
}

.modal-balance-check {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex; flex-direction: column; gap: 5px;
}
.balance-row { display: flex; justify-content: space-between; }
.balance-label { font-size: 12px; color: var(--text-muted); }
.balance-val { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
.balance-after { color: var(--green); }

.modal-footer {
  display: flex; gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
}
.btn-modal-cancel {
  flex: 1; padding: 11px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; color: var(--text-secondary);
  cursor: pointer; transition: all 0.15s; font-family: var(--font-body);
}
.btn-modal-cancel:hover { background: rgba(255,255,255,0.07); }
.btn-modal-confirm {
  flex: 2; padding: 11px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(135deg, var(--accent), #4F46E5);
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  color: white; cursor: pointer; transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}
.btn-modal-confirm:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(99,102,241,0.4); }

/* ─── Success Modal ──────────────────────────────────────── */
.success-modal {
  max-width: 380px;
  padding: 32px 28px;
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; text-align: center;
}
.success-icon { animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes popIn { from{transform:scale(0.5);opacity:0} to{transform:scale(1);opacity:1} }
.success-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--text-primary); }
.success-body { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.success-detail {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 16px;
  width: 100%; text-align: left;
  display: flex; flex-direction: column; gap: 5px;
}
.success-row { display: flex; justify-content: space-between; }
.success-row-label { font-size: 11px; color: var(--text-muted); }
.success-row-val { font-family: var(--font-mono); font-size: 12px; color: var(--text-primary); }
.btn-success-close {
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, var(--green), #059669);
  border: none; border-radius: var(--radius-md);
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  color: white; cursor: pointer; transition: all 0.2s;
  margin-top: 4px;
}
.btn-success-close:hover { transform: translateY(-1px); }

/* ─── Toast ──────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  font-size: 13px; color: var(--text-primary);
  z-index: 1000;
  transform: translateY(80px); opacity: 0;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none; max-width: 300px;
}
.toast.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.toast.toast-success { border-color: rgba(16,185,129,0.3); }
.toast.toast-error   { border-color: rgba(239,68,68,0.3); }
.toast-icon { font-size: 15px; flex-shrink: 0; }

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .market-layout { grid-template-columns: 1fr; }
  .sell-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .trust-card { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .hero-inner { flex-direction: column; }
  .hero-stats-grid { grid-template-columns: 1fr 1fr; }
  .sell-panel { grid-template-columns: 1fr; }
  .nav-tabs { display: none; }
  .nav-ticker { display: none; }
  .table-controls { flex-direction: column; align-items: flex-start; }
}