/* ========================================================
   ApexCoin Platform - Binance Pro Aesthetic & Responsive Design
   Auto-Adapts to PC Desktop & Mobile Phone Screens
   Supports Binance Dark Theme & Crisp Modern Light Theme
   ======================================================== */

:root {
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Binance Pro Dark Mode (Default) */
  --bg-primary: #0b0e11;
  --bg-secondary: #181a20;
  --bg-card: #1e2329;
  --bg-hover: #2b313a;
  --border-color: #2b313a;
  --text-primary: #eaecef;
  --text-secondary: #848e9c;
  --text-muted: #5e6673;

  /* Trading Colors */
  --trade-green: #0ecb81;
  --trade-green-hover: #0bb573;
  --trade-red: #f6465d;
  --trade-red-hover: #e03248;
  --brand-gold: #f0b90b;
  --brand-cyan: #00f0ff;
  --brand-blue: #38bdf8;

  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.4);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

/* Crisp Modern Light Theme */
body.theme-light {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  --border-color: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s, color 0.2s;
  overflow-x: hidden;
}

/* Desktop App Container (Pro Workstation Full Width) */
.app-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Navbar */
.app-header {
  height: 64px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(56, 189, 248, 0.45));
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--brand-gold), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.theme-light .brand-title {
  background: linear-gradient(135deg, #0284c7, #0f172a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Desktop Navigation Links */
.desktop-nav {
  display: flex;
  gap: 8px;
}

.nav-link-desktop {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-link-desktop:hover {
  color: var(--text-primary);
  background-color: var(--bg-hover);
}

.nav-link-desktop.active {
  color: var(--brand-gold);
  background-color: rgba(240, 185, 11, 0.1);
}

body.theme-light .nav-link-desktop.active {
  color: #0284c7;
  background-color: rgba(2, 132, 199, 0.1);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--bg-card);
}

.balance-pill {
  background: rgba(14, 203, 129, 0.1);
  border: 1px solid rgba(14, 203, 129, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--trade-green);
}

/* Live Ticker Marquee Ribbon */
.ticker-ribbon {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 16px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.ticker-inner {
  display: inline-flex;
  gap: 28px;
  white-space: nowrap;
  animation: ticker-marquee 28s linear infinite;
  will-change: transform;
}

.ticker-ribbon:hover .ticker-inner {
  animation-play-state: paused;
}

@keyframes ticker-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s, transform 0.15s;
}

.ticker-item:hover {
  background-color: var(--bg-hover);
  transform: translateY(-1px);
}

.ticker-symbol { font-weight: 700; color: var(--text-primary); }
.ticker-price { font-weight: 600; font-family: monospace; }
.ticker-change.pos { color: var(--trade-green); font-weight: 700; }
.ticker-change.neg { color: var(--trade-red); font-weight: 700; }


/* Main Content Area */
.app-main {
  flex: 1;
  padding: 24px;
  padding-bottom: 90px; /* Space for mobile nav */
}

/* Views (SPA Tabs) */
.view-panel {
  display: none;
}
.view-panel.active {
  display: block;
}

/* Instant Zero-Flicker View Restoration on Page Refresh */
html.preload-tab-my #view-trade { display: none !important; }
html.preload-tab-my #view-my { display: block !important; }
html.preload-tab-order #view-trade { display: none !important; }
html.preload-tab-order #view-order { display: block !important; }
html.preload-tab-asset #view-trade { display: none !important; }
html.preload-tab-asset #view-asset { display: block !important; }
html.preload-tab-market #view-trade { display: none !important; }
html.preload-tab-market #view-market { display: block !important; }

html.preload-tab-my [data-tab="trade"],
html.preload-tab-order [data-tab="trade"],
html.preload-tab-asset [data-tab="trade"],
html.preload-tab-market [data-tab="trade"] {
  color: var(--text-secondary) !important;
  border-color: transparent !important;
}
html.preload-tab-my [data-tab="my"] {
  color: var(--brand-blue) !important;
  border-color: var(--brand-blue) !important;
}
html.preload-tab-order [data-tab="order"] {
  color: var(--brand-blue) !important;
  border-color: var(--brand-blue) !important;
}
html.preload-tab-asset [data-tab="asset"] {
  color: var(--brand-blue) !important;
  border-color: var(--brand-blue) !important;
}
html.preload-tab-market [data-tab="market"] {
  color: var(--brand-blue) !important;
  border-color: var(--brand-blue) !important;
}

/* Trading Screen Grid (Binance Pro Style: 3-Column on Desktop) */
.trade-grid {
  display: grid;
  grid-template-columns: 1fr 280px 340px;
  gap: 16px;
  align-items: stretch;
}

/* Chart Card */
.chart-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

/* Detailed Chart Header & 24H Stats (Matches Reference Screenshot) */
.chart-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.chart-pair-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-pair-heading .icon-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #848e9c;
  cursor: pointer;
  transition: color 0.2s;
}
.chart-pair-heading .icon-home:hover {
  color: #38bdf8;
}

.chart-quick-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #848e9c;
  cursor: pointer;
  transition: color 0.2s;
}
.chart-quick-link:hover {
  color: #38bdf8;
}
.chart-quick-link .arrow {
  font-size: 15px;
  transition: transform 0.2s;
}
.chart-quick-link:hover .arrow {
  transform: translateX(3px);
}

.chart-stats-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 16px;
}

.stat-main-price {
  display: flex;
  flex-direction: column;
}

.stat-big-val {
  font-size: 30px;
  font-weight: 800;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Roboto', monospace;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #0ecb81;
}

.stat-change-val {
  font-size: 14px;
  font-weight: 700;
  margin-top: 4px;
}
.stat-change-val.pos { color: #0ecb81; }
.stat-change-val.neg { color: #f6465d; }

.stat-24h-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 32px;
  row-gap: 8px;
  text-align: left;
}

.stat-item .stat-label {
  font-size: 11px;
  font-weight: 500;
  color: #848e9c;
  margin-bottom: 2px;
}

.stat-item .stat-value {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, monospace;
}

/* Timeframe Bar with Clean Underline (Matches 1M, 5M, 30M, 1H, 4H, 1D in Screenshot) */
.chart-timeframe-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
  padding-bottom: 4px;
}

.timeframe-tabs {
  display: flex;
  gap: 16px;
  align-items: center;
}

.btn-timeframe {
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 700;
  color: #848e9c;
  padding: 6px 4px 8px 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}
.btn-timeframe:hover {
  color: #ffffff;
}
.btn-timeframe.active {
  color: #38bdf8;
}
.btn-timeframe.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: #38bdf8;
  border-radius: 2px;
}

.chart-profit-tag {
  background: rgba(14, 203, 129, 0.12);
  color: var(--trade-green);
  border: 1px solid rgba(14, 203, 129, 0.3);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* TradingView Real-Time Chart Container */
.chart-display-container {
  height: 460px;
  width: 100%;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #131722;
  color-scheme: dark;
}

.tradingview-container {
  width: 100%;
  height: 100%;
  background: #131722;
  color-scheme: dark;
}

.tradingview-container iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  background-color: #131722 !important;
  color-scheme: dark !important;
}

/* Light Theme Adaptations */
body.theme-light .chart-pair-heading .current-pair-title { color: #0f172a; }
body.theme-light .stat-item .stat-value { color: #1e293b; }
body.theme-light .btn-timeframe { color: #64748b; }
body.theme-light .btn-timeframe:hover { color: #0f172a; }
body.theme-light .btn-timeframe.active { color: #0284c7; }
body.theme-light .btn-timeframe.active::after { background: #0284c7; }
body.theme-light .chart-timeframe-bar { border-bottom-color: rgba(0, 0, 0, 0.08); }
body.theme-light .chart-display-container,
body.theme-light .tradingview-container {
  background: #f8fafc;
  color-scheme: light;
}
body.theme-light .tradingview-container iframe {
  background-color: #f8fafc !important;
  color-scheme: light !important;
}

@media (max-width: 768px) {
  .chart-display-container {
    height: 380px;
  }
  .stat-24h-grid {
    column-gap: 16px;
  }
}

/* Mini Order Book Column */
.order-book-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.order-book-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
}

.order-book-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
  font-family: monospace;
  font-size: 12px;
}

.ob-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 6px;
  border-radius: 4px;
  position: relative;
}

.ob-row.bid { color: var(--trade-green); }
.ob-row.ask { color: var(--trade-red); }

.ob-bar {
  position: absolute;
  top: 0; bottom: 0; right: 0;
  opacity: 0.12;
  border-radius: 4px;
}
.ob-row.bid .ob-bar { background-color: var(--trade-green); }
.ob-row.ask .ob-bar { background-color: var(--trade-red); }

/* Order Execution Box */
.order-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Social Proof Floating Toast */
#social-toast {
  position: fixed;
  bottom: 80px;
  left: 20px;
  background: rgba(24, 26, 32, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(14, 203, 129, 0.4);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 999;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  font-size: 12px;
  color: var(--text-primary);
  transform: translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

body.theme-light #social-toast {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(14, 203, 129, 0.6);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

#social-toast.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.social-toast-dot {
  width: 8px;
  height: 8px;
  background-color: var(--trade-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--trade-green);
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.order-box-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.duration-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.btn-duration {
  padding: 10px 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-duration:hover {
  border-color: #f0b90b;
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-duration.active {
  background: linear-gradient(135deg, var(--brand-gold), #fcd535);
  color: #000000;
  border-color: var(--brand-gold);
  box-shadow: 0 4px 12px rgba(240, 185, 11, 0.35);
}

body.theme-light .btn-duration.active {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.trade-field-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.trade-amount-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trade-amount-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.expected-payout-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
}
.payout-lbl { color: var(--text-secondary); }
.payout-val { color: var(--trade-green); font-weight: 800; }

.amount-input-control-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.amount-stepper-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
  flex: 1;
  min-width: 140px;
  transition: border-color 0.2s;
}
.amount-stepper-wrap:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}

.btn-step {
  width: 34px;
  height: 38px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.btn-step:hover {
  background: var(--bg-hover);
  color: #38bdf8;
}

.form-control-amount {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  outline: none;
  padding: 0 4px;
  font-family: inherit;
  width: 60px;
}
.form-control-amount::-webkit-inner-spin-button,
.form-control-amount::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Amount Chips */
.amount-chips {
  display: flex;
  gap: 6px;
}

.btn-chip {
  padding: 8px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-chip:hover {
  background: var(--bg-hover);
  border-color: #38bdf8;
  color: var(--text-primary);
}

/* Premium Big Action Buttons (Buy Up / Buy Down) */
.trade-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.btn-trade {
  padding: 16px 12px;
  min-height: 68px;
  border-radius: 12px;
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.btn-trade:active {
  transform: scale(0.96);
}

.btn-trade-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.btn-trade-icon {
  font-size: 15px;
  display: inline-block;
}

.btn-trade-sub {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0.95;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.22);
  padding: 2px 10px;
  border-radius: 10px;
}

.btn-buy-up {
  background: linear-gradient(135deg, #0ecb81 0%, #059669 100%);
  box-shadow: 0 6px 20px rgba(14, 203, 129, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-buy-up:hover {
  background: linear-gradient(135deg, #10e08f 0%, #047857 100%);
  box-shadow: 0 8px 26px rgba(14, 203, 129, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.38);
  transform: translateY(-2px);
}

.btn-buy-down {
  background: linear-gradient(135deg, #f6465d 0%, #dc2626 100%);
  box-shadow: 0 6px 20px rgba(246, 70, 93, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-buy-down:hover {
  background: linear-gradient(135deg, #ff5a72 0%, #b91c1c 100%);
  box-shadow: 0 8px 26px rgba(246, 70, 93, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.38);
  transform: translateY(-2px);
}

/* Active Countdown Floating Pill (Compact, Sleek Glassmorphism) */
.countdown-overlay {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(15, 23, 42, 0.92));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 10px 14px;
  display: none;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  gap: 12px;
}

.countdown-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.countdown-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.countdown-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0ecb81;
  box-shadow: 0 0 0 rgba(14, 203, 129, 0.6);
  animation: livePulseDot 1.4s infinite;
}

@keyframes livePulseDot {
  0% { box-shadow: 0 0 0 0 rgba(14, 203, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(14, 203, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 203, 129, 0); }
}

.countdown-sub-title {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.countdown-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.countdown-timer-circle {
  min-width: 64px;
  height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(240, 185, 11, 0.12);
  border: 1px solid rgba(240, 185, 11, 0.4);
  border-radius: 8px;
  font-size: 17px;
  font-weight: 800;
  color: #f0b90b;
  font-family: 'SF Mono', 'Roboto Mono', Monaco, monospace;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.countdown-timer-circle.settling {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
}

.settle-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(56, 189, 248, 0.25);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/* Light Theme Adaptations for countdown overlay */
body.theme-light .countdown-overlay {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
body.theme-light .countdown-title {
  color: #0f172a;
}
body.theme-light .countdown-sub-title {
  color: #64748b;
}

/* Profile "My" Screen (Matches User's Reference Screenshot!) */
.profile-container {
  max-width: 500px;
  margin: 0 auto;
}

.profile-header-card {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.profile-avatar {
  width: 64px;
  height: 64px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  font-size: 28px;
  font-weight: 800;
}

.profile-details {
  flex: 1;
}

.profile-email {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

.profile-uid {
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 4px;
}

.profile-credit-score {
  font-size: 12px;
  font-weight: 700;
  color: #fde047;
}

.profile-balance-text {
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
}

/* Action Menu Cards (Exact from Screenshot) */
.menu-card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-card-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--text-primary);
}

.menu-card-item:hover {
  background: var(--bg-hover);
  transform: translateX(4px);
}

.menu-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
  font-weight: 600;
}

.menu-card-left svg {
  width: 22px;
  height: 22px;
}

.badge-msg-count {
  background-color: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

/* Mobile Bottom Navigation (Ultra-Compact Low Profile) */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 42px;
  background-color: rgba(11, 15, 23, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 100;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #718096;
  font-size: 9.5px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  flex: 1;
  height: 100%;
  transition: color 0.15s ease;
}

.mobile-nav-item svg {
  width: 15px;
  height: 15px;
  transition: transform 0.15s ease;
}

.mobile-nav-item.active {
  color: #38bdf8;
}

.mobile-nav-item.active svg {
  transform: translateY(-1px);
}

.mobile-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 14px);
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .mobile-nav { display: flex !important; height: 42px !important; }
  .mobile-nav-item { gap: 1px; font-size: 9.5px; }
  .mobile-nav-item svg { width: 15px; height: 15px; }
  .ticker-ribbon { display: none; } /* Maximize screen space on mobile trade screen */
  .app-header { height: 40px; padding: 0 8px; }
  .app-main { padding: 4px 6px; padding-bottom: 46px !important; }
  .trade-grid { grid-template-columns: 1fr; gap: 4px; }
  .order-book-card { display: none; } /* Focus on recent trades table + chart buttons on mobile */
  
  /* Chart Card: Compact App Layout */
  .chart-card {
    padding: 6px 8px;
    border-radius: var(--radius-md);
    gap: 0;
  }
  .chart-top-bar {
    margin-bottom: 2px;
  }
  .chart-stats-section {
    margin-bottom: 3px;
    gap: 4px;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
  }
  .stat-main-price {
    flex-direction: row;
    align-items: baseline;
    gap: 5px;
  }
  .stat-big-val {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
  }
  .stat-change-val {
    font-size: 11px;
    margin: 0;
  }
  .stat-24h-grid {
    display: flex;
    gap: 6px;
    align-items: center;
  }
  .stat-item:nth-child(2),
  .stat-item:nth-child(4) {
    display: none; /* Hide 24h vol & turnover on mobile; high and low are visible */
  }
  .stat-item .stat-label {
    font-size: 8px;
    margin-bottom: 0px;
  }
  .stat-item .stat-value {
    font-size: 10px;
  }
  .chart-timeframe-bar {
    margin-bottom: 3px;
    padding-bottom: 2px;
  }
  .timeframe-tabs {
    gap: 6px;
  }
  .btn-timeframe {
    font-size: 11px;
    padding: 2px 2px 3px 2px;
  }
  .chart-profit-tag {
    font-size: 10px;
    padding: 2px 6px;
  }
  .chart-display-container {
    height: 180px; /* Precise height to ensure chart + trade buttons fit on 1 screen */
    border-radius: 6px;
  }

  /* Order Execution Console: Compact App Console */
  .order-card {
    padding: 6px 8px;
    gap: 6px;
    border-radius: var(--radius-md);
    margin-top: 0;
  }
  .order-box-title {
    display: none; /* Remove redundant desktop title on mobile */
  }
  .trade-field-label {
    font-size: 9px;
    margin-bottom: 2px;
  }
  .duration-selector {
    gap: 4px;
  }
  .btn-duration {
    padding: 6px 2px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 6px;
  }
  .trade-amount-section {
    gap: 3px;
  }
  .amount-input-control-row {
    gap: 4px;
  }
  .amount-stepper-wrap {
    height: 32px;
    min-width: 110px;
  }
  .btn-step {
    width: 26px;
    height: 32px;
    font-size: 15px;
  }
  .form-control-amount {
    font-size: 13px;
  }
  .amount-chips {
    gap: 3px;
  }
  .btn-chip {
    padding: 5px 6px;
    font-size: 10px;
    border-radius: 4px;
  }
  .expected-payout-pill {
    padding: 2px 6px;
    font-size: 10px;
  }
  .payout-val {
    font-size: 11px;
  }
  .trade-actions {
    margin-top: 4px;
    gap: 6px;
  }
  .btn-trade {
    min-height: 44px;
    padding: 6px 4px;
    border-radius: 8px;
    gap: 2px;
  }
  .btn-trade-main {
    font-size: 15px;
    font-weight: 900;
    gap: 5px;
  }
  .btn-trade-icon {
    font-size: 13px;
  }
  .btn-trade-sub {
    font-size: 8px;
    padding: 1px 5px;
  }
  #social-toast { bottom: 58px; left: 8px; right: 8px; }
}

@media (max-width: 480px) {
  .app-header { padding: 0 8px; height: 42px; }
  .brand-logo { width: 24px; height: 24px; }
  .brand-title { font-size: 13px; }
  .balance-pill { font-size: 10px; padding: 2px 5px; gap: 3px; }
  .btn-icon { width: 26px; height: 26px; font-size: 11px; }
  .chart-card { padding: 5px 6px; }
  .chart-display-container { height: 175px; }
  .order-card { padding: 5px 6px; gap: 4px; }
  .btn-trade { min-height: 42px; }
  .btn-trade-main { font-size: 14px; }
  .btn-trade-icon { font-size: 12px; }
  .btn-trade-sub { font-size: 8px; padding: 1px 4px; }
}

@media (min-width: 769px) {
  .mobile-nav { display: none !important; }
}

/* ========================================================
   Trading Modals & Input Controls (Native Binance Theme)
   ======================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 16px;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  padding: 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-primary);
}

.modal-overlay.open .modal-content {
  transform: scale(1);
}

.modal-header {
  margin-bottom: 20px;
  text-align: left;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-header .subtext {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 2px rgba(240, 185, 11, 0.2);
}

body.theme-light .form-control:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-gold), #fcd535);
  color: #000000;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
  text-align: center;
}

body.theme-light .btn-primary {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
}

.btn-primary:hover {
  opacity: 0.95;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-cancel {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  transition: color 0.2s;
}

.btn-cancel:hover {
  color: var(--text-primary);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-success {
  background: rgba(14, 203, 129, 0.15);
  color: var(--trade-green);
}

.badge-danger {
  background: rgba(246, 70, 93, 0.15);
  color: var(--trade-red);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.badge-info {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

/* Market & Menu Cards List */
.menu-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 680px;
  margin: 0 auto;
}

.menu-card-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-card-item:hover {
  background: var(--bg-hover);
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.menu-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 14px;
}

.menu-card-left svg {
  width: 20px;
  height: 20px;
}

/* ======================================================== */
/* BESTCOIN PRO TRADING CONSOLE (EXACT MATCH TO REFERENCE)  */
/* ======================================================== */
.trade-meta-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.meta-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.meta-label {
  font-size: 12px;
  color: #848e9c;
  font-weight: 500;
}
.product-name-display {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}
.direction-display {
  font-size: 18px;
  font-weight: 800;
}
.direction-buy-up {
  color: #0ecb81;
}
.direction-buy-down {
  color: #f6465d;
}

/* Direction Selector Toggles */
.direction-toggle-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.btn-dir-select {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  background: #181f2c;
  border: 1.5px solid #283548;
  border-radius: 10px;
  color: #848e9c;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-dir-select:hover {
  background: #1f293b;
  color: #ffffff;
}
.btn-dir-select .dir-icon {
  font-size: 15px;
  margin-bottom: 2px;
}
.btn-dir-select .dir-text {
  font-size: 14px;
  font-weight: 800;
}
.btn-dir-select .dir-sub {
  font-size: 10px;
  opacity: 0.8;
  margin-top: 1px;
}
.btn-dir-select.active-up {
  background: rgba(14, 203, 129, 0.15);
  border-color: #0ecb81;
  color: #0ecb81;
  box-shadow: 0 0 15px rgba(14, 203, 129, 0.25);
}
.btn-dir-select.active-down {
  background: rgba(246, 70, 93, 0.15);
  border-color: #f6465d;
  color: #f6465d;
  box-shadow: 0 0 15px rgba(246, 70, 93, 0.25);
}

/* Current Price Row */
.current-price-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 16px;
}
.current-price-label {
  font-size: 12px;
  color: #848e9c;
  font-weight: 500;
}
.current-price-val {
  font-size: 24px;
  font-weight: 900;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace;
  color: #ffffff;
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
}

/* Trading Time (Matching Image 3) */
.trading-time-section {
  margin-bottom: 16px;
}
.trading-time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.time-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #151d2a;
  border: 1.5px solid #233042;
  border-radius: 10px;
  padding: 10px 4px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.time-card:hover {
  border-color: #38bdf8;
  transform: translateY(-2px);
}
.time-card-lbl {
  font-size: 11px;
  color: #848e9c;
  margin-bottom: 3px;
  font-weight: 500;
}
.time-card-sec {
  font-size: 15px;
  font-weight: 800;
  color: #38bdf8;
  margin-bottom: 4px;
}
.time-card-profit {
  font-size: 10px;
  font-weight: 700;
  color: #0ecb81;
  white-space: nowrap;
}
/* Active Card with Blue Highlight Matching Reference Image 3 (120S Card) */
.time-card.active {
  background: linear-gradient(180deg, #1e40af 0%, #1d4ed8 100%);
  border-color: #3b82f6;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45);
}
.time-card.active .time-card-lbl {
  color: #bfdbfe;
}
.time-card.active .time-card-sec {
  color: #ffffff;
}
.time-card.active .time-card-profit {
  color: #34d399;
}

/* Balance & Winnings Row */
.balance-winnings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #848e9c;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 6px;
}
.avail-bal-item .val {
  color: #0ecb81;
  font-weight: 700;
}
.total-win-item .val {
  color: #ffffff;
  font-weight: 700;
}

/* Profit Breakdown Card (Exact Match to Reference Image 3) */
.profit-breakdown-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.breakdown-title {
  font-size: 13px;
  font-weight: 700;
  color: #0ecb81;
  margin-bottom: 8px;
}
.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.breakdown-col {
  display: flex;
  gap: 6px;
  align-items: center;
}
.breakdown-lbl {
  color: #848e9c;
}
.breakdown-val {
  font-weight: 700;
  color: #e2e8f0;
}
.val-green {
  color: #0ecb81 !important;
}
.val-red {
  color: #f6465d !important;
}
.val-blue {
  color: #38bdf8 !important;
}
.val-yellow {
  color: #f0b90b !important;
}
.val-muted {
  color: #848e9c !important;
}

/* Amount Control & Submit Order Button */
.trade-amount-control-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.submit-order-wrap {
  width: 100%;
}
.btn-submit-order {
  width: 100%;
  padding: 16px;
  border-radius: 9999px;
  border: none;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}
.btn-submit-order:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}
.btn-submit-order:active {
  transform: translateY(0);
}
.btn-submit-up {
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #047857 100%);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}
.btn-submit-down {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #b91c1c 100%);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

/* ======================================================== */
/* ORDER HISTORY PRO SCREEN (FULL INFO & STATS)             */
/* ======================================================== */
.order-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.btn-refresh-orders {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}
.btn-refresh-orders:hover {
  border-color: #38bdf8;
  color: #38bdf8;
}

.orders-stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.stat-pill {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}
.stat-pill-label {
  font-size: 11px;
  color: var(--text-secondary);
}
.stat-pill-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

/* ── Position / Closing Orders Segment Tabs ── */
.orders-segment-wrap {
  display: flex;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--bg-secondary);
}
.orders-segment-btn {
  flex: 1;
  padding: 11px 14px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.18s ease;
  border-right: 1px solid var(--border-color);
}
.orders-segment-btn:last-child { border-right: none; }
.orders-segment-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.orders-segment-btn.active {
  background: var(--bg-card, #1e2433);
  color: var(--text-primary);
  box-shadow: inset 0 -2px 0 #38bdf8;
}
.seg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f0b90b;
  color: #000;
  font-size: 10px;
  font-weight: 800;
  border-radius: 9999px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
}
.seg-badge-done {
  background: rgba(255,255,255,0.12);
  color: var(--text-secondary);
}

.btn-filter-tab {
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.btn-filter-tab:hover {
  color: var(--text-primary);
  border-color: #38bdf8;
}
.btn-filter-tab.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35);
}

/* Orders Cards Container & Pro Card */
.orders-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.order-pro-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.order-pro-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.order-pro-card.card-win {
  border-left: 4px solid #0ecb81;
}
.order-pro-card.card-loss {
  border-left: 4px solid #f6465d;
}
.order-pro-card.card-active {
  border-left: 4px solid #f0b90b;
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.order-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.order-asset-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}
.order-dir-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
}
.order-dir-pill.dir-up {
  background: rgba(14, 203, 129, 0.15);
  color: #0ecb81;
}
.order-dir-pill.dir-down {
  background: rgba(246, 70, 93, 0.15);
  color: #f6465d;
}

.order-status-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}
.badge-won {
  background: rgba(14, 203, 129, 0.2);
  color: #0ecb81;
  border: 1px solid rgba(14, 203, 129, 0.4);
}
.badge-lost {
  background: rgba(246, 70, 93, 0.15);
  color: #f6465d;
  border: 1px solid rgba(246, 70, 93, 0.3);
}
.badge-running {
  background: rgba(240, 185, 11, 0.2);
  color: #f0b90b;
  border: 1px solid rgba(240, 185, 11, 0.4);
  display: flex;
  align-items: center;
  gap: 5px;
}
.pulse-dot {
  width: 6px;
  height: 6px;
  background: #f0b90b;
  border-radius: 50%;
  animation: pulse 1s infinite;
}

/* Order Specs Grid (6 cells) */
.order-specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 8px;
  background: rgba(0, 0, 0, 0.18);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.spec-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.spec-label {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.spec-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.order-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-secondary);
  padding-top: 4px;
}

/* Empty State */
.orders-empty-state {
  text-align: center;
  padding: 48px 20px;
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  margin-top: 10px;
}
.orders-empty-state .empty-icon {
  font-size: 42px;
  margin-bottom: 12px;
}
.orders-empty-state .empty-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.orders-empty-state .empty-desc {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ======================================================== */
/* WIN/LOSS SETTLEMENT PRO MODAL                            */
/* ======================================================== */
.modal-settle-card {
  max-width: 420px;
  padding: 28px 24px;
  text-align: center;
  background: linear-gradient(180deg, #182232 0%, #0f172a 100%);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
}
.modal-close-icon {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
}
.modal-close-icon:hover {
  color: #ffffff;
}

.settle-status-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 12px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  position: relative;
}
.settle-status-avatar.avatar-win {
  background: radial-gradient(circle, rgba(14, 203, 129, 0.3) 0%, rgba(14, 203, 129, 0.05) 70%);
  border: 2px solid #0ecb81;
  box-shadow: 0 0 30px rgba(14, 203, 129, 0.4);
}
.settle-status-avatar.avatar-loss {
  background: radial-gradient(circle, rgba(246, 70, 93, 0.3) 0%, rgba(246, 70, 93, 0.05) 70%);
  border: 2px solid #f6465d;
  box-shadow: 0 0 30px rgba(246, 70, 93, 0.3);
}

.settle-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.settle-badge.badge-win {
  background: rgba(14, 203, 129, 0.2);
  color: #0ecb81;
}
.settle-badge.badge-loss {
  background: rgba(246, 70, 93, 0.2);
  color: #f6465d;
}

.settle-main-title {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.settle-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.4;
}

.settle-hero-payout {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.settle-payout-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
}
.settle-payout-val {
  font-size: 32px;
  font-weight: 900;
  font-family: -apple-system, BlinkMacSystemFont, monospace;
  margin: 4px 0;
}
.settle-return-note {
  font-size: 12px;
  font-weight: 700;
}

.settle-receipt-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.receipt-key {
  color: var(--text-secondary);
}
.receipt-val {
  color: var(--text-primary);
}
.border-top-dash {
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 8px;
  margin-top: 2px;
}

.settle-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.btn-settle-continue {
  padding: 13px;
  font-size: 13px;
  font-weight: 800;
  border-radius: 10px;
}
.btn-settle-orders {
  padding: 13px;
  font-size: 13px;
  font-weight: 700;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-settle-orders:hover {
  background: var(--bg-hover);
  border-color: #38bdf8;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ======================================================== */
/* 1. COMPACT ALLOCATION SLIDER (Below Trading Chart)       */
/* ======================================================== */
.chart-amount-slider-panel.compact {
  background: rgba(18, 24, 34, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 8px 12px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.slider-compact-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.slider-compact-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.slider-compact-left .slider-icon {
  font-size: 13px;
}

.slider-compact-left .slider-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
}

.slider-pct-pill {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 7px;
}

.slider-amount-pill {
  background: rgba(240, 185, 11, 0.15);
  color: #f0b90b;
  border: 1px solid rgba(240, 185, 11, 0.3);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  font-family: monospace;
  padding: 1px 8px;
}

.slider-preset-chips {
  display: flex;
  gap: 4px;
}

.btn-preset-chip {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-preset-chip:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #fff;
  border-color: #38bdf8;
}

.btn-preset-chip.chip-max {
  background: rgba(240, 185, 11, 0.12);
  color: #f0b90b;
  border-color: rgba(240, 185, 11, 0.3);
}

.slider-track-container.compact {
  position: relative;
  width: 100%;
  height: 12px;
  display: flex;
  align-items: center;
}

.slider-track-container.compact .chart-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  position: relative;
  z-index: 2;
  cursor: pointer;
  margin: 0;
}

.slider-track-container.compact .chart-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #38bdf8;
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
  cursor: grab;
}

.slider-track-container.compact .chart-range-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #38bdf8;
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
  cursor: grab;
}

.slider-track-container.compact .slider-fill-glow {
  position: absolute;
  top: 4px;
  left: 0;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 100%);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
  pointer-events: none;
  z-index: 1;
}

/* ======================================================== */
/* 2. RECENT TRADES TABLE (Matching Reference Image 3)      */
/* ======================================================== */
.recent-trades-container {
  background: #0d1219;
  border: 1px solid #1a2536;
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trades-header-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr 1fr;
  font-size: 11px;
  color: #848e9c;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-weight: 600;
}

.trades-rows-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 130px;
  overflow: hidden;
}

.trade-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr 1fr;
  font-size: 11px;
  color: #e2e8f0;
  align-items: center;
  line-height: 1.4;
}

.trade-dir.buy {
  color: #00c076;
  font-weight: 700;
}

.trade-dir.sell {
  color: #ff3b57;
  font-weight: 700;
}

.trade-qty {
  color: #848e9c;
}

/* ======================================================== */
/* 3. BIG BUY UP / BUY DOWN BUTTONS (Exact Match Image 3)   */
/* ======================================================== */
.chart-dual-action-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 8px;
}

.btn-chart-buy-up {
  height: 48px;
  background: #00c076;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 192, 118, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-chart-buy-up:hover {
  background: #05d684;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 192, 118, 0.5);
}

.btn-chart-buy-up.active {
  box-shadow: 0 0 20px rgba(0, 192, 118, 0.75), inset 0 0 10px rgba(255, 255, 255, 0.35) !important;
  outline: 2px solid #ffffff !important;
  outline-offset: -2px;
}

.btn-chart-buy-down {
  height: 48px;
  background: #ff3b57;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(255, 59, 87, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-chart-buy-down:hover {
  background: #ff526c;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 59, 87, 0.5);
}

.btn-chart-buy-down:active {
  transform: translateY(0);
}

.btn-chart-buy-down.active {
  box-shadow: 0 0 20px rgba(255, 59, 87, 0.75), inset 0 0 10px rgba(255, 255, 255, 0.35) !important;
  outline: 2px solid #ffffff !important;
  outline-offset: -2px;
}

/* ======================================================== */
/* 4. BESTCOIN TRADING CONSOLE — TRUE APP LAYOUT            */
/* ======================================================== */
.bestcoin-styled-console {
  background: #0b0f17;
  border: 1px solid #1a2230;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ── Row 1: Product Name + Direction ── */
.bestcoin-styled-console .trade-meta-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1px;
}

.bestcoin-styled-console .meta-label {
  font-size: 9px;
  color: #5a6475;
  margin-bottom: 0;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bestcoin-styled-console .product-name-display {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.bestcoin-styled-console .direction-display {
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1.2;
}

.bestcoin-styled-console .direction-buy-up  { color: #00c076; }
.bestcoin-styled-console .direction-buy-down { color: #ff3b57; }

/* ── Row 2: Price inline with label ── */
.bestcoin-styled-console .current-price-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  padding: 4px 8px;
}

.bestcoin-styled-console .current-price-label {
  font-size: 9px;
  color: #5a6475;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bestcoin-styled-console .current-price-val {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-family: 'Courier New', monospace;
}

/* ── Row 3: Time Cards as horizontal chips ── */
.bestcoin-styled-console .trading-time-section {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bestcoin-styled-console .trade-field-label {
  font-size: 9px;
  color: #5a6475;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1px;
}

.bestcoin-styled-console .trading-time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.bestcoin-styled-console .time-card {
  padding: 4px 2px;
  border-radius: 6px;
}

.bestcoin-styled-console .time-card-lbl {
  font-size: 8px;
  margin-bottom: 1px;
  color: #5a6475;
}

.bestcoin-styled-console .time-card-sec {
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 1px;
  color: #e2e8f0;
}

.bestcoin-styled-console .time-card-profit {
  font-size: 8px;
  font-weight: 700;
  color: #0ecb81;
}

.bestcoin-styled-console .time-card.active {
  background: linear-gradient(160deg, #1d4ed8 0%, #2563eb 100%) !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.5) !important;
}

.bestcoin-styled-console .time-card.active .time-card-lbl { color: #bfdbfe; }
.bestcoin-styled-console .time-card.active .time-card-sec { color: #ffffff; }
.bestcoin-styled-console .time-card.active .time-card-profit { color: #34d399; }

/* ── Row 4: Balance + Winnings single line ── */
.bestcoin-styled-console .balance-winnings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  background: rgba(255,255,255,0.02);
  border-radius: 5px;
  padding: 3px 6px;
}

.bestcoin-styled-console .avail-bal-item,
.bestcoin-styled-console .total-win-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bestcoin-styled-console .balance-winnings-row .lbl {
  color: #5a6475;
  font-size: 9px;
}

.bestcoin-styled-console .balance-winnings-row .val {
  font-weight: 700;
  font-size: 10px;
}

.bestcoin-styled-console .avail-bal-item .val { color: #00c076; }

/* ── Row 5: Profit Breakdown as single dense row ── */
.bestcoin-styled-console .profit-breakdown-card {
  background: #0d1520;
  border: 1px solid #1a2636;
  border-radius: 6px;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bestcoin-styled-console .breakdown-title {
  font-size: 9px;
  font-weight: 700;
  color: #00c076;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bestcoin-styled-console .breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bestcoin-styled-console .breakdown-lbl {
  font-size: 9px;
  color: #5a6475;
}

.bestcoin-styled-console .breakdown-val {
  font-size: 10px;
  font-weight: 700;
  color: #e2e8f0;
}

.bestcoin-styled-console .breakdown-divider {
  border-top: 1px solid rgba(255,255,255,0.05);
  margin: 2px 0;
}

/* ── Row 6: Pill Amount Input ── */
.bestcoin-input-wrapper { width: 100%; }

.bestcoin-pill-input {
  width: 100%;
  height: 34px;
  background: #111a26;
  border: 1.5px solid #233042;
  border-radius: 9999px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}

.bestcoin-pill-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

/* ── Row 7: Allocation Slider ── */
.bestcoin-styled-console .chart-amount-slider-panel.compact {
  padding: 4px 7px;
  gap: 3px;
  margin-top: 0;
  border-radius: 6px;
}

.bestcoin-styled-console .slider-compact-top {
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
}

.bestcoin-styled-console .slider-compact-left { gap: 3px; align-items: center; }
.bestcoin-styled-console .slider-icon { font-size: 10px; }
.bestcoin-styled-console .slider-title { font-size: 9px; }
.bestcoin-styled-console .slider-pct-pill { font-size: 8px; padding: 0 4px; border-radius: 8px; }
.bestcoin-styled-console .slider-amount-pill { font-size: 9px; padding: 0 5px; border-radius: 8px; }
.bestcoin-styled-console .slider-preset-chips { gap: 2px; }
.bestcoin-styled-console .btn-preset-chip { padding: 1px 4px; font-size: 8px; border-radius: 4px; }
.bestcoin-styled-console .slider-track-container.compact { height: 8px; }

/* ── Row 8: Submit Button ── */
.bestcoin-styled-console .btn-submit-order {
  height: 36px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bestcoin-styled-console .btn-submit-up {
  background: linear-gradient(135deg, #059669 0%, #10b981 60%, #047857 100%);
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.35);
}

.bestcoin-styled-console .btn-submit-up:hover {
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

.bestcoin-styled-console .btn-submit-down {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 60%, #b91c1c 100%);
  box-shadow: 0 3px 12px rgba(239, 68, 68, 0.35);
}

.bestcoin-styled-console .btn-submit-down:hover {
  box-shadow: 0 4px 18px rgba(239, 68, 68, 0.5);
  transform: translateY(-1px);
}

/* ======================================================== */
/* ORDER DETAILS MODAL (FULL REAL INFORMATION)             */
/* ======================================================== */
.modal-order-detail-card {
  max-width: 480px;
  width: 92%;
  padding: 24px;
  background: linear-gradient(180deg, #18202c 0%, #0d121a 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
  position: relative;
  overflow: hidden;
}

.order-detail-header {
  text-align: center;
  margin-bottom: 16px;
}

.order-detail-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.order-detail-badge.badge-win {
  background: rgba(14, 203, 129, 0.2);
  color: #0ecb81;
  border: 1px solid rgba(14, 203, 129, 0.4);
}

.order-detail-badge.badge-loss {
  background: rgba(246, 70, 93, 0.2);
  color: #f6465d;
  border: 1px solid rgba(246, 70, 93, 0.4);
}

.order-detail-badge.badge-running {
  background: rgba(240, 185, 11, 0.2);
  color: #f0b90b;
  border: 1px solid rgba(240, 185, 11, 0.4);
}

.order-detail-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.order-detail-id {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: monospace;
}

.order-detail-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.order-detail-hero .hero-lbl {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.order-detail-hero .hero-amt {
  font-size: 24px;
  font-weight: 900;
  font-family: -apple-system, BlinkMacSystemFont, monospace;
}

.order-detail-hero .hero-return {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, monospace;
}

.order-detail-specs-table {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
}

.detail-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.detail-spec-row .k {
  color: var(--text-secondary);
  font-size: 11px;
}

.detail-spec-row .v {
  color: var(--text-primary);
  font-weight: 600;
}

.detail-spec-row.highlight-row {
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 6px;
  border-radius: 6px;
}

.order-click-hint {
  color: #38bdf8;
  font-weight: 700;
  font-size: 11px;
  transition: transform 0.2s;
}

.order-pro-card:hover .order-click-hint {
  transform: translateX(3px);
  color: #7dd3fc;
}

.val-green {
  color: #0ecb81 !important;
}

.val-red {
  color: #f6465d !important;
}

.val-yellow {
  color: #f0b90b !important;
}

.val-blue {
  color: #38bdf8 !important;
}

.val-muted {
  color: var(--text-secondary) !important;
}

/* ── New Position / Closing Order Card Styles ── */
.pos-order-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  background: rgba(0,0,0,0.15);
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.04);
}
.pos-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pos-lbl {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pos-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.order-dur-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}
.order-result-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
}
.order-closed-at {
  font-size: 11px;
  color: var(--text-secondary);
  padding: 2px 2px 0;
}

/* Modal live-price row for active orders */
.modal-live-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 14px;
  animation: pulse-border 2s ease-in-out infinite;
}
.live-price-lbl {
  font-size: 12px;
  color: #38bdf8;
  font-weight: 700;
}
.live-price-val {
  font-size: 15px;
  font-weight: 800;
  color: #0ecb81;
  font-family: 'Courier New', monospace;
}
@keyframes pulse-border {
  0%, 100% { border-color: rgba(56, 189, 248, 0.25); }
  50%       { border-color: rgba(56, 189, 248, 0.7); }
}




