/* ═══════════════════════════════════════════════════════
   ELINOM BITCOIN — CSS
   Modern crypto trading platform styles
   ═══════════════════════════════════════════════════════ */

:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --btc-orange: #f7931a;
  --btc-orange-hover: #e8860f;
  --bg-dark: #0b0e17;
  --bg-card: #111827;
  --bg-card-hover: #1a2234;
  --bg-surface: #151c2c;
  --bg-input: #1a2236;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: rgba(255,255,255,0.06);
  --border-light: rgba(255,255,255,0.1);
  --green: #10b981;
  --green-bg: rgba(16,185,129,0.12);
  --red: #ef4444;
  --red-bg: rgba(239,68,68,0.12);
  --blue: #38bdf8;
  --gold: #f59e0b;
  --header-h: 64px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.25);
  --shadow-glow: 0 0 40px rgba(99,102,241,0.15);
  --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

*,*::before,*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── HEADER ─────────────────────────────── */
.btc-header {
  height: var(--header-h);
  background: rgba(11,14,23,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left { display: flex; align-items: center; gap: 1.5rem; }

.brand-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.brand-logo i {
  color: var(--btc-orange);
  font-size: 1.4rem;
  filter: drop-shadow(0 0 8px rgba(247,147,26,0.5));
}

.brand-gradient {
  background: linear-gradient(90deg, #38bdf8, #6366f1, #f472b6, #f59e0b, #38bdf8);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
  animation: brandGradientShift 4s ease-in-out infinite;
}

@keyframes brandGradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.brand-suffix {
  font-weight: 400;
  opacity: 0.6;
  font-size: 1.1rem;
}

/* Header Nav */
.header-nav {
  display: flex;
  gap: 0.25rem;
  background: rgba(255,255,255,0.04);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.nav-link {
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.nav-link.active { color: #fff; background: var(--primary); box-shadow: 0 2px 12px rgba(99,102,241,0.35); }

/* Header Right */
.header-right { display: flex; align-items: center; gap: 0.75rem; }

.live-price-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
}

.btc-icon i { color: var(--btc-orange); font-size: 1rem; }
.price-value { color: var(--text-primary); letter-spacing: -0.3px; }
.price-change { font-size: 0.75rem; font-weight: 700; }
.price-change.positive { color: var(--green); }
.price-change.negative { color: var(--red); }

.action-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  font-size: 0.9rem;
}

.action-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); border-color: var(--border-light); }

.notif-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 100px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.user-profile:hover { background: rgba(255,255,255,0.08); }

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--btc-orange));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── HERO SECTION ───────────────────────── */
.hero-section {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 2.5rem 3rem;
  background: linear-gradient(165deg, #0b0e17 0%, #111827 40%, #0f172a 100%);
  border-bottom: 1px solid var(--border-color);
}

.hero-bg-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.hero-orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--btc-orange), transparent 70%);
  top: -100px;
  right: 15%;
  animation: orbFloat 8s ease-in-out infinite;
}

.hero-orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--primary), transparent 70%);
  bottom: -80px;
  left: 10%;
  animation: orbFloat 10s ease-in-out infinite reverse;
}

.hero-orb-3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--blue), transparent 70%);
  top: 40%;
  left: 45%;
  animation: orbFloat 12s ease-in-out infinite 2s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-text-col { display: flex; flex-direction: column; gap: 1.25rem; }

.licence-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(16,185,129,0.05));
  border: 1px solid rgba(16,185,129,0.3);
  color: var(--green);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  width: fit-content;
  animation: badgeGlow 3s ease-in-out infinite;
}

@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(16,185,129,0.1); }
  50% { box-shadow: 0 0 25px rgba(16,185,129,0.2); }
}

.hero-title {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: #fff;
}

.hero-highlight {
  background: linear-gradient(135deg, var(--btc-orange), #fbbf24, var(--btc-orange));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: brandGradientShift 3s ease-in-out infinite;
}

.hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 560px;
}

.hero-subtitle strong {
  color: var(--green);
  font-weight: 700;
}

.hero-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-light);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
}

.trust-chip i { color: var(--primary); font-size: 0.82rem; }
.trust-chip:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); }

.hero-cta-row { display: flex; gap: 12px; margin-top: 8px; }

.btn-hero-primary {
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--btc-orange), #fbbf24);
  color: #0b0e17;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(247,147,26,0.3);
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(247,147,26,0.4);
}

.btn-hero-secondary {
  padding: 14px 32px;
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-hero-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.hero-licence-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 560px;
}

.hero-licence-notice i { color: var(--primary); margin-top: 3px; flex-shrink: 0; }

/* Hero Chart Card */
.hero-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.chart-pair {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-timeframes { display: flex; gap: 4px; }

.tf-btn {
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.tf-btn:hover { color: var(--text-primary); border-color: var(--border-light); }
.tf-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.chart-price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.chart-big-price {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.chart-change {
  font-size: 0.85rem;
  font-weight: 600;
}

.chart-change.positive { color: var(--green); }
.chart-change.negative { color: var(--red); }

.hero-canvas {
  width: 100%;
  height: 200px;
  margin-bottom: 16px;
}

.chart-card-footer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.chart-stat { display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; }
.stat-value { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); }

/* ── MARKET STRIP ───────────────────────── */
.market-strip {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0;
  overflow: hidden;
}

.strip-scroll {
  display: flex;
  gap: 0;
  animation: stripScroll 30s linear infinite;
  width: max-content;
}

@keyframes stripScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.strip-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  border-right: 1px solid var(--border-color);
  white-space: nowrap;
  min-width: 200px;
}

.strip-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.strip-name { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); }
.strip-price { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); }
.strip-change { font-size: 0.72rem; font-weight: 700; }
.strip-change.positive { color: var(--green); }
.strip-change.negative { color: var(--red); }

.strip-item:hover { background: rgba(255,255,255,0.03); }

/* ── MAIN CONTENT ───────────────────────── */
.btc-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem;
  width: 100%;
}

.view-panel { display: none; }
.view-panel.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── DASHBOARD CARDS ────────────────────── */
.dash-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.dash-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity 0.3s;
}

.dash-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.dash-card:hover::before { opacity: 1; }

.card-portfolio::before { background: linear-gradient(90deg, var(--primary), var(--blue)); }
.card-btc::before { background: linear-gradient(90deg, var(--btc-orange), #fbbf24); }
.card-pnl::before { background: linear-gradient(90deg, var(--green), #34d399); }
.card-trades::before { background: linear-gradient(90deg, var(--gold), #fbbf24); }

.dc-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.card-portfolio .dc-icon { background: rgba(99,102,241,0.12); color: var(--primary); }
.card-btc .dc-icon { background: rgba(247,147,26,0.12); color: var(--btc-orange); }
.card-pnl .dc-icon { background: var(--green-bg); color: var(--green); }
.card-trades .dc-icon { background: rgba(245,158,11,0.12); color: var(--gold); }

.dc-body { flex: 1; min-width: 0; }
.dc-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; margin-bottom: 6px; }
.dc-value { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.5px; }
.dc-value.positive { color: var(--green); }
.dc-value.negative { color: var(--red); }
.dc-change { font-size: 0.78rem; font-weight: 600; margin-top: 4px; }
.dc-change.positive { color: var(--green); }
.dc-change.negative { color: var(--red); }
.dc-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

/* ── DASHBOARD GRID ────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dash-chart-panel, .dash-orderbook, .dash-recent-trades, .dash-watchlist {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.panel-header h3 {
  font-size: 0.92rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-controls { display: flex; gap: 4px; }

.dash-canvas, .trade-canvas {
  width: 100%;
  height: 350px;
  padding: 1rem;
}

/* Order Book */
.ob-toggle { display: flex; gap: 4px; }

.ob-btn {
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.ob-btn:hover { color: var(--text-primary); }
.ob-btn.active { background: rgba(255,255,255,0.08); color: var(--text-primary); border-color: var(--border-light); }

.ob-header-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 8px 16px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

.ob-asks, .ob-bids {
  max-height: 180px;
  overflow-y: auto;
}

.ob-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 4px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}

.ob-row:hover { background: rgba(255,255,255,0.03); }

.ob-row .ob-bar {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  opacity: 0.08;
}

.ob-row.ask .ob-price { color: var(--red); }
.ob-row.ask .ob-bar { background: var(--red); }
.ob-row.bid .ob-price { color: var(--green); }
.ob-row.bid .ob-bar { background: var(--green); }

.ob-spread {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.02);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.spread-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }

/* ── BOTTOM GRID: RECENT TRADES + WATCHLIST ── */
.dash-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1rem;
}

.view-all-link {
  font-size: 0.8rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.view-all-link:hover { text-decoration: underline; }

/* Tables */
.trades-table-wrap { overflow-x: auto; }

.trades-table {
  width: 100%;
  border-collapse: collapse;
}

.trades-table th {
  padding: 10px 16px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border-color);
}

.trades-table td {
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}

.trades-table tr:hover td { background: rgba(255,255,255,0.02); }

.trade-type-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.trade-type-badge.buy { background: var(--green-bg); color: var(--green); }
.trade-type-badge.sell { background: var(--red-bg); color: var(--red); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
}

.status-badge.completed { background: var(--green-bg); color: var(--green); }
.status-badge.pending { background: rgba(245,158,11,0.12); color: var(--gold); }
.status-badge.cancelled { background: var(--red-bg); color: var(--red); }

/* Watchlist */
.watchlist-list { padding: 0; }

.watchlist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.watchlist-item:hover { background: rgba(255,255,255,0.03); }

.wl-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
}

.wl-info { flex: 1; min-width: 0; }
.wl-name { font-size: 0.85rem; font-weight: 700; }
.wl-pair { font-size: 0.72rem; color: var(--text-muted); }
.wl-price-col { text-align: right; }
.wl-price { font-size: 0.85rem; font-weight: 700; }
.wl-change { font-size: 0.72rem; font-weight: 700; }
.wl-change.positive { color: var(--green); }
.wl-change.negative { color: var(--red); }

/* ── TRADE VIEW ─────────────────────────── */
.trade-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.trade-chart-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.trade-order-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.order-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.order-tab {
  padding: 14px;
  font-size: 0.88rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.order-tab.buy { background: rgba(16,185,129,0.06); color: var(--text-muted); }
.order-tab.sell { background: rgba(239,68,68,0.06); color: var(--text-muted); }
.order-tab.buy.active { background: var(--green); color: #fff; }
.order-tab.sell.active { background: var(--red); color: #fff; }

.order-type-row {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.type-btn {
  flex: 1;
  padding: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.type-btn:hover { color: var(--text-primary); }
.type-btn.active { background: rgba(255,255,255,0.08); color: var(--text-primary); border-color: var(--border-light); }

.order-form {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-field label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.order-input-wrap {
  display: flex;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.order-input-wrap:focus-within { border-color: var(--primary); }

.order-input-wrap input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-input);
  border: none;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
}

.input-step {
  width: 36px;
  background: rgba(255,255,255,0.04);
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
}

.input-step:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }

.max-btn {
  padding: 0 14px;
  background: rgba(99,102,241,0.15);
  border: none;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.max-btn:hover { background: rgba(99,102,241,0.25); }

.order-slider { width: 100%; accent-color: var(--primary); }

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}

.slider-labels span {
  font-size: 0.68rem;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 500;
}

.slider-labels span:hover { color: var(--primary); }

.order-total-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
}

.order-fee {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 4px 0;
}

.order-submit-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.buy-btn { background: var(--green); color: #fff; }
.buy-btn:hover { background: #059669; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(16,185,129,0.3); }
.sell-btn { background: var(--red); color: #fff; }
.sell-btn:hover { background: #dc2626; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(239,68,68,0.3); }

.order-balance-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  background: rgba(255,255,255,0.02);
}

.order-balance-row span:last-child { font-weight: 700; color: var(--text-primary); }

/* Open Orders */
.open-orders-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.cancel-all-btn {
  padding: 6px 14px;
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.cancel-all-btn:hover { background: rgba(239,68,68,0.2); }

.cancel-order-btn {
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.cancel-order-btn:hover { background: var(--red-bg); }

.empty-state {
  text-align: center;
  padding: 2.5rem;
  color: var(--text-muted);
}

.empty-state i { font-size: 2rem; margin-bottom: 10px; display: block; opacity: 0.4; }
.empty-state p { font-size: 0.85rem; }

/* ── WALLET VIEW ────────────────────────── */
.wallet-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.wallet-total-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  flex: 1;
  position: relative;
  overflow: hidden;
}

.wallet-total-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--btc-orange), var(--primary), var(--blue));
}

.wtc-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.wtc-value { font-size: 2.2rem; font-weight: 900; letter-spacing: -1px; }
.wtc-btc { font-size: 0.9rem; color: var(--text-muted); margin-top: 4px; }

.wallet-actions { display: flex; gap: 10px; align-self: flex-end; }

.wallet-action-btn {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
}

.wallet-action-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.wallet-action-btn.deposit { background: var(--green); color: #fff; border-color: var(--green); }
.wallet-action-btn.deposit:hover { background: #059669; }
.wallet-action-btn.withdraw { background: var(--bg-card); border-color: var(--border-light); }

.wallet-assets-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.wallet-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0 12px;
}

.wallet-search i { color: var(--text-muted); font-size: 0.8rem; }

.wallet-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.82rem;
  padding: 8px 0;
  width: 180px;
}

.wallet-table .asset-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.asset-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.asset-name { font-weight: 700; }
.asset-symbol { font-size: 0.72rem; color: var(--text-muted); }

.wallet-action-sm {
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--primary);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  margin-right: 6px;
}

.wallet-action-sm:hover { background: rgba(99,102,241,0.1); border-color: var(--primary); }

/* ── HISTORY VIEW ───────────────────────── */
.history-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 12px;
}

.history-tabs { display: flex; gap: 4px; }

.history-tab {
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.history-tab:hover { color: var(--text-primary); }
.history-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.history-filters {
  display: flex;
  gap: 8px;
  align-items: center;
}

.history-filters select, .history-filters input {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.82rem;
  outline: none;
}

.filter-apply-btn {
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-apply-btn:hover { background: var(--primary-hover); }

.pagination-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 1.5rem 0 0.5rem;
}

.page-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.page-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

#historyPageInfo { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; }

/* ── MODALS ─────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-card);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-top h3 { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover { background: var(--red-bg); color: var(--red); border-color: rgba(239,68,68,0.2); }

.modal-body { padding: 1.5rem; }

.deposit-qr { text-align: center; margin-bottom: 1.5rem; }

.qr-placeholder {
  width: 180px;
  height: 180px;
  background: #fff;
  border-radius: 12px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--bg-dark);
}

.address-copy-row {
  display: flex;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
}

.address-copy-row input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-input);
  border: none;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 500;
  outline: none;
  font-family: 'Courier New', monospace;
}

.copy-btn {
  width: 42px;
  background: rgba(99,102,241,0.12);
  border: none;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
}

.copy-btn:hover { background: rgba(99,102,241,0.25); }

.deposit-warning {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 1rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--gold);
}

.deposit-warning i { margin-top: 2px; flex-shrink: 0; }

.field-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; }

/* ── NOTIFICATION PANEL ─────────────────── */
.notif-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
}

.notif-overlay.open { display: block; }

.notif-panel {
  position: fixed;
  top: var(--header-h);
  right: -380px;
  width: 360px;
  height: calc(100vh - var(--header-h));
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  z-index: 160;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0,0,0,0.3);
}

.notif-panel.open { right: 0; }

.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.notif-header h3 { font-size: 0.92rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }

.notif-clear {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.notif-list { flex: 1; overflow-y: auto; }

.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.notif-item:hover { background: rgba(255,255,255,0.03); }
.notif-item.unread { background: rgba(99,102,241,0.05); }

.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.notif-icon.trade { background: var(--green-bg); color: var(--green); }
.notif-icon.alert { background: rgba(245,158,11,0.12); color: var(--gold); }
.notif-icon.system { background: rgba(99,102,241,0.12); color: var(--primary); }

.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 0.82rem; font-weight: 600; margin-bottom: 3px; }
.notif-desc { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }
.notif-time { font-size: 0.68rem; color: var(--text-muted); margin-top: 4px; }

/* ── RESPONSIVE ─────────────────────────── */
@media (max-width: 1200px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-bottom-grid { grid-template-columns: 1fr; }
  .trade-layout { grid-template-columns: 1fr; }
  .hero-content { grid-template-columns: 1fr; }
  .hero-chart-col { order: -1; }
}

@media (max-width: 900px) {
  .dash-cards { grid-template-columns: repeat(2, 1fr); }
  .btc-header { padding: 0 1rem; }
  .header-nav { display: none; }
  .hero-section { padding: 2rem 1.25rem; }
  .hero-title { font-size: 2.2rem; }
  .wallet-header-row { flex-direction: column; align-items: stretch; }
  .wallet-actions { justify-content: stretch; }
  .wallet-action-btn { flex: 1; justify-content: center; }
}

@media (max-width: 600px) {
  .dash-cards { grid-template-columns: 1fr; }
  .header-right .live-price-pill { display: none; }
  .hero-trust-row { flex-direction: column; }
  .hero-cta-row { flex-direction: column; }
  .hero-cta-row button { width: 100%; justify-content: center; }
  .history-controls { flex-direction: column; }
  .history-filters { flex-wrap: wrap; }
  .wallet-actions { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.6rem; }
  .hero-section { padding: 1.5rem 1rem; }
  .dash-card { padding: 0.75rem; }
  .btc-header { padding: 0 0.75rem; }
}

/* ═══ MOBILE OVERRIDES — Bitcoin-specific ═══ */
@media (max-width: 600px) {
  .chart-card-footer {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
