/**
 * DWG ALGO™ — Institutional Investor Dashboard Stylesheet
 * Ultra-Realistic High-Frequency Quant Trading & Daily Return Engine Interface
 */

:root {
  --bg-dark: #070a13;
  --bg-surface: #0d1322;
  --bg-card: #12192c;
  --bg-card-glass: rgba(18, 25, 44, 0.75);
  --bg-card-hover: #17213b;
  --bg-accent: #19243f;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(16, 185, 129, 0.4);
  --border-cyan: rgba(6, 182, 212, 0.4);

  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.25);
  --amber: #f59e0b;
  --rose: #f43f5e;

  --text-main: #f8fafc;
  --text-dim: #94a3b8;
  --text-muted: #64748b;

  --font-heading: 'Sora', -apple-system, sans-serif;
  --font-ui: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.2);
}

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

body {
  font-family: var(--font-ui);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient glow container */
.ambient-glows {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.15;
}
.glow-1 {
  width: 500px;
  height: 500px;
  top: -100px;
  right: -100px;
  background: radial-gradient(circle, var(--emerald) 0%, transparent 70%);
}
.glow-2 {
  width: 600px;
  height: 600px;
  bottom: 10%;
  left: -150px;
  background: radial-gradient(circle, var(--cyan) 0%, transparent 70%);
}

/* Container */
.dash-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.25rem;
  position: relative;
  z-index: 1;
}

/* Top Navigation Bar */
.dash-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 10, 19, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 0;
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}
.brand-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
}
.brand-sub {
  display: flex;
  flex-direction: column;
}
.brand-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--emerald);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulseGlow 2s infinite;
}
@keyframes pulseGlow {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px var(--emerald); }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.system-status-chip {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--emerald);
}
@media (min-width: 900px) {
  .system-status-chip {
    display: flex;
  }
}

.nav-user-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.investor-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
}
.investor-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: #000;
}
.investor-name {
  font-size: 0.85rem;
  font-weight: 600;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-icon-nav {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}
.nav-logout-text {
  display: none;
}
@media (min-width: 600px) {
  .nav-logout-text {
    display: inline;
    font-size: 0.8rem;
  }
}
.btn-icon-nav:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: var(--rose);
  color: var(--rose);
}

/* Institutional Live Ticker Streamer */
.ticker-strip {
  background: #0a0e1a;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  overflow: hidden;
}
.ticker-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.ticker-feed {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.ticker-feed::-webkit-scrollbar {
  display: none;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.ticker-item strong {
  color: var(--text-main);
}
.text-profit {
  color: var(--emerald);
  font-weight: 600;
}
.text-cyan {
  color: var(--cyan);
}
.text-amber {
  color: var(--amber);
}

/* Hero Financial Header / Controls */
.dash-hero {
  padding: 2rem 0 1.5rem;
}
.hero-header-row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}
@media (min-width: 768px) {
  .hero-header-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.hero-title-group h1 {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}
.hero-title-group p {
  color: var(--text-dim);
  font-size: 0.9rem;
}
.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Primary / Secondary Buttons */
.btn-dash {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
  text-decoration: none;
}
.btn-emerald {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #03140d;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.btn-emerald:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}
.btn-glass {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}
.btn-glass:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* KPI Summary Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
@media (min-width: 600px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.kpi-card {
  background: var(--bg-card-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}
.kpi-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--emerald), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.kpi-card:hover::before {
  opacity: 1;
}
.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.kpi-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kpi-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.icon-emerald { background: rgba(16, 185, 129, 0.15); color: var(--emerald); }
.icon-cyan { background: rgba(6, 182, 212, 0.15); color: var(--cyan); }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: var(--amber); }
.icon-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

.kpi-value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}
.kpi-currency {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}
.kpi-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.badge-pill-growth {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
}

/* Two-Column Analytics Layout */
.dash-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
@media (min-width: 1024px) {
  .dash-main-grid {
    grid-template-columns: 2fr 1fr;
  }
}

/* Content Box Cards */
.dash-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.box-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.box-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.box-title-group i {
  color: var(--emerald);
  font-size: 1.05rem;
}
.box-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
}
.box-body {
  padding: 1.25rem;
}

/* Live Algo Terminal Stream */
.algo-terminal {
  background: #05070e;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  overflow: hidden;
}
.terminal-bar {
  background: #090d19;
  padding: 0.5rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  color: var(--text-muted);
}
.terminal-dots {
  display: flex;
  gap: 5px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-stream {
  max-height: 280px;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.trade-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.3s ease;
}
.trade-row:hover {
  background: rgba(16, 185, 129, 0.08);
}
.trade-row.new-flash {
  animation: flashGreen 1.2s ease-out;
}
@keyframes flashGreen {
  0% { background: rgba(16, 185, 129, 0.35); }
  100% { background: rgba(255, 255, 255, 0.02); }
}
.trade-time { color: var(--text-muted); font-size: 0.72rem; }
.trade-pair { color: var(--text-main); font-weight: 600; }
.trade-action-buy { color: var(--emerald); font-weight: 700; }
.trade-action-sell { color: var(--rose); font-weight: 700; }
.trade-pips { color: var(--cyan); }
.trade-profit { color: var(--emerald); font-weight: 700; }

/* Active Robot Card List */
.robot-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.robot-card {
  background: #090e1c;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
  position: relative;
  transition: all 0.2s ease;
}
.nav-logout-text {
  display: none;
}
@media (min-width: 600px) {
  .nav-logout-text {
    display: inline;
    font-size: 0.8rem;
  }
}
.robot-card:hover {
  border-color: var(--border-cyan);
}
.robot-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.robot-name-wrap h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.robot-license-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.robot-status-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 4px;
}
.robot-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.robot-metric-item {
  font-size: 0.75rem;
}
.robot-metric-label {
  color: var(--text-muted);
  display: block;
  font-size: 0.68rem;
}
.robot-metric-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-main);
}

/* History Data Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.dash-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}
.dash-table th {
  background: #090e1c;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.dash-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  white-space: nowrap;
}
.dash-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.dash-table .mono {
  font-family: var(--font-mono);
}
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-status.credited { background: rgba(16, 185, 129, 0.15); color: var(--emerald); }
.badge-status.pending { background: rgba(245, 158, 11, 0.15); color: var(--amber); }
.badge-status.approved { background: rgba(6, 182, 212, 0.15); color: var(--cyan); }
.badge-status.rejected { background: rgba(244, 63, 94, 0.15); color: var(--rose); }
.badge-status.loss, .badge-status.drawdown { 
  background: rgba(244, 63, 94, 0.15); 
  color: var(--rose); 
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.text-rose {
  color: var(--rose) !important;
}

.badge-pill-growth.negative {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose);
}

.trade-loss {
  color: var(--rose) !important;
  font-weight: 700;
}

.trade-action-sl {
  color: var(--rose) !important;
  font-weight: 700;
}

.trade-row.loss-flash {
  animation: flashRed 1.2s ease-out;
}
@keyframes flashRed {
  0% { background: rgba(244, 63, 94, 0.35); }
  100% { background: rgba(255, 255, 255, 0.02); }
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.modal-overlay.active {
  display: flex;
  opacity: 1;
}
.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  position: relative;
}
.modal-head {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-head h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s;
}
.modal-close:hover {
  color: var(--text-main);
}
.modal-body {
  padding: 1.5rem;
}
.form-group-dash {
  margin-bottom: 1.25rem;
}
.form-group-dash label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 0.45rem;
}
.form-input-dash, .form-select-dash {
  width: 100%;
  background: #080c18;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
}
.form-input-dash:focus, .form-select-dash:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Quick deposit presets */
.capital-presets {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.preset-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.preset-btn:hover, .preset-btn.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--emerald);
  color: var(--emerald);
}

/* ==========================================================================
   ENHANCED CHOOSE TRADING ROBOT PLAN & ACTIVATE POPUP
   ========================================================================== */
.modal-card-premium {
  background: radial-gradient(circle at top center, rgba(16, 185, 129, 0.12) 0%, rgba(13, 19, 34, 0.98) 65%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(16, 185, 129, 0.15);
  border-radius: var(--radius-lg);
  max-width: 600px;
}

.modal-head-glow {
  background: rgba(10, 15, 27, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 1.15rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-head-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.modal-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(6, 182, 212, 0.15) 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.modal-main-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 3px 0;
  letter-spacing: -0.01em;
}

.modal-sub-title {
  font-size: 0.78rem;
  color: var(--emerald);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.modal-body-styled {
  padding: 1.35rem 1.4rem;
}

.modal-step-section {
  margin-bottom: 1.15rem;
}

.modal-step-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.step-badge-pill {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.step-title-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Modal Plan Cards */
.modal-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 10px;
}

.modal-plan-card {
  background: linear-gradient(180deg, rgba(18, 25, 44, 0.9) 0%, rgba(13, 19, 34, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 10px 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-plan-card:hover {
  border-color: rgba(16, 185, 129, 0.5);
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(13, 19, 34, 0.95) 100%);
}

.modal-plan-card.active {
  border-color: var(--emerald);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.16) 0%, rgba(13, 19, 34, 0.98) 100%);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3), inset 0 0 15px rgba(16, 185, 129, 0.1);
}

.modal-plan-header-icon {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  transition: color 0.2s;
}

.modal-plan-card.active .modal-plan-header-icon {
  color: var(--emerald);
}

.modal-plan-card .modal-plan-check {
  display: none;
  font-size: 0.85rem;
  color: var(--emerald);
  margin-top: 4px;
}

.modal-plan-card.active .modal-plan-check {
  display: block;
}

.modal-plan-title {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 2px;
}

.modal-plan-price {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--emerald);
  margin-bottom: 2px;
  line-height: 1.1;
}

.modal-plan-yield {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

.modal-plan-card.active .modal-plan-yield {
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.1);
}

.modal-plan-badge {
  position: absolute;
  top: -9px;
  right: 6px;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.badge-popular {
  background: #f59e0b;
  color: #030712;
}

.badge-best {
  background: var(--cyan);
  color: #030712;
}

/* Capital Input & Presets */
.capital-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 0.65rem;
}

.capital-currency-symbol {
  position: absolute;
  left: 14px;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--emerald);
  pointer-events: none;
}

.modal-capital-input {
  padding-left: 32px !important;
  padding-right: 65px !important;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  background: #080c18;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.modal-capital-input:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
}

.capital-currency-tag {
  position: absolute;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cyan);
  pointer-events: none;
}

.capital-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-btn:hover, .preset-btn.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald);
  color: var(--emerald);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

/* Order Summary Box */
.modal-order-summary-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 182, 212, 0.05) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 1.15rem;
}

.summary-card-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--emerald);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.summary-rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
}

.summary-label {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.summary-val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.summary-card-footer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  font-size: 0.73rem;
  color: #fbbf24;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.4;
}

/* Wallet Box */
.wallet-box-dash {
  background: #060914;
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.qr-preview-wrapper {
  background: #ffffff;
  padding: 6px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.qr-preview-dash {
  width: 100px;
  height: 100px;
  display: block;
  object-fit: contain;
}

.wallet-address-detail {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
  min-width: 0;
}

.wallet-dest-label {
  font-size: 0.74rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.address-text-dash {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan);
  word-break: break-all;
  background: rgba(6, 182, 212, 0.08);
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.btn-copy-styled {
  align-self: flex-start;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
}

.btn-copy-styled:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald);
  color: var(--emerald);
}

/* WhatsApp Primary CTA */
.modal-wa-cta-box {
  margin-top: 1.15rem;
}

.btn-deposit-wa {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.15rem;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.45);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-deposit-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.6);
}

.wa-btn-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.25);
}

.wa-btn-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-align: left;
}

.wa-btn-title {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.wa-btn-desc {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
}

.wa-btn-arrow {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  transition: transform 0.2s ease;
}

.btn-deposit-wa:hover .wa-btn-arrow {
  transform: translateX(4px);
}

/* Secondary TxID Accordion */
.modal-txid-accordion {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-block-submit {
  width: 100%;
  justify-content: center;
  padding: 0.65rem;
  font-size: 0.82rem;
  border-radius: 8px;
}
.qr-preview-dash {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 6px;
  object-fit: contain;
}
.address-text-dash {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan);
  word-break: break-all;
  background: rgba(6, 182, 212, 0.08);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  border: 1px solid rgba(6, 182, 212, 0.2);
  width: 100%;
}

/* Toast */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #0d1322;
  border: 1px solid var(--emerald);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  font-size: 0.88rem;
  color: var(--text-main);
  z-index: 2000;
  display: none;
  align-items: center;
  gap: 0.65rem;
  animation: slideInUp 0.3s ease;
}
.toast-notice.show {
  display: flex;
}
@keyframes slideInUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   MOBILE SCREEN COMPACT & FULL RESPONSIVE OVERRIDES (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .dash-container {
    padding: 0 0.85rem;
  }
  .dash-navbar {
    padding: 0.45rem 0;
  }
  .nav-wrap {
    gap: 0.45rem;
    justify-content: space-between;
  }
  .brand-link {
    gap: 0.45rem;
    min-width: 0;
    flex-shrink: 1;
  }
  .brand-logo-img {
    height: 28px;
    flex-shrink: 0;
  }
  .brand-title {
    font-size: 0.92rem;
    white-space: nowrap;
  }
  .brand-sub .brand-badge {
    display: none;
  }
  .nav-user-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
  }
  .investor-pill {
    padding: 0.2rem 0.45rem;
    gap: 0.3rem;
  }
  .investor-avatar {
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
  }
  .investor-name {
    font-size: 0.75rem;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .btn-icon-nav {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  /* Hero header */
  .dash-hero {
    padding: 1.25rem 0 1rem;
  }
  .hero-header-row {
    gap: 0.85rem;
    margin-bottom: 1.15rem;
  }
  .hero-title-group h1 {
    font-size: 1.35rem;
    line-height: 1.25;
  }
  .hero-title-group p {
    font-size: 0.82rem;
    line-height: 1.45;
  }
  .hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    width: 100%;
  }
  .hero-cta-group #btnOpenDepositModal {
    width: 100%;
    justify-content: center;
    padding: 0.7rem 0.85rem;
    font-size: 0.85rem;
  }
  .hero-cta-group #btnOpenWithdrawModal,
  .hero-cta-group #supportDeskBtn {
    flex: 1 1 calc(50% - 0.25rem);
    justify-content: center;
    padding: 0.55rem 0.65rem;
    font-size: 0.78rem;
  }

  /* 4 KPI Cards: Compact 2x2 Grid */
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem;
  }
  .kpi-card {
    padding: 0.75rem 0.65rem;
    border-radius: var(--radius-sm);
  }
  .kpi-header {
    margin-bottom: 0.4rem;
  }
  .kpi-label {
    font-size: 0.68rem;
    letter-spacing: 0.02em;
  }
  .kpi-icon-wrap {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }
  .kpi-value {
    font-size: 1.22rem;
    margin-bottom: 0.25rem;
    line-height: 1.15;
  }
  .kpi-currency {
    font-size: 0.65rem;
  }
  .kpi-sub {
    font-size: 0.65rem;
    gap: 3px;
    flex-direction: column;
    align-items: flex-start;
  }
  .badge-pill-growth {
    font-size: 0.62rem;
    padding: 1px 5px;
  }

  /* Main Grid Boxes */
  .dash-main-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
  }
  .dash-box {
    border-radius: var(--radius-sm);
    margin-bottom: 0.85rem !important;
  }
  .box-header {
    padding: 0.75rem 0.85rem;
  }
  .box-title {
    font-size: 0.92rem;
  }
  .box-body {
    padding: 0.75rem 0.85rem;
  }

  /* Algo Execution Stream */
  .algo-terminal {
    font-size: 0.72rem;
  }
  .terminal-bar {
    font-size: 0.62rem;
    padding: 0.35rem 0.55rem;
    gap: 0.35rem;
    flex-wrap: wrap;
  }
  .terminal-stream {
    max-height: 180px;
    padding: 0.45rem;
  }
  .trade-row {
    padding: 0.3rem 0.45rem;
    font-size: 0.72rem;
    gap: 0.35rem;
  }

  /* Active Robot Allocations */
  .robot-card {
    padding: 0.75rem;
  }
  .robot-name-wrap h4 {
    font-size: 0.88rem;
  }
  .robot-license-badge {
    font-size: 0.68rem;
  }
  .robot-status-pill {
    font-size: 0.62rem;
    padding: 1px 5px;
  }
  .robot-metrics-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
  }
  .robot-metric-label {
    font-size: 0.62rem;
  }
  .robot-metric-val {
    font-size: 0.78rem;
  }

  /* Tables: Horizontal Touch Scroll & Compact Cells */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }
  .dash-table {
    font-size: 0.78rem;
    min-width: 520px;
  }
  .dash-table th {
    padding: 0.55rem 0.65rem;
    font-size: 0.68rem;
  }
  .dash-table td {
    padding: 0.55rem 0.65rem;
    font-size: 0.75rem;
  }
  .badge-status {
    font-size: 0.65rem;
    padding: 1px 5px;
  }

  /* Modals: Compact Touch Fit */
  .modal-overlay {
    padding: 0.5rem;
    align-items: flex-end;
  }
  @media (min-height: 600px) {
    .modal-overlay {
      align-items: center;
    }
  }
  .modal-card {
    max-height: 92vh;
    border-radius: var(--radius-md);
  }
  .modal-head {
    padding: 0.85rem 1rem;
  }
  .modal-head h3 {
    font-size: 0.98rem;
  }
  .modal-body {
    padding: 0.85rem 1rem;
  }
  .form-group-dash {
    margin-bottom: 0.85rem;
  }
  .form-group-dash label {
    font-size: 0.78rem;
    margin-bottom: 0.35rem;
  }
  .form-input-dash, .form-select-dash {
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
  }

  /* Modal Plans Grid: Compact 3-Column on Mobile */
  .modal-plans-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px;
    margin-bottom: 0.85rem;
  }
  .modal-plan-card {
    padding: 8px 4px;
    border-radius: 6px;
  }
  .modal-plan-badge {
    top: -7px;
    right: 2px;
    font-size: 0.52rem;
    padding: 1px 5px;
    background: #f59e0b;
    color: #030712;
    font-weight: 800;
  }
  .modal-plan-title {
    font-size: 0.72rem;
    margin-bottom: 2px;
  }
  .modal-plan-price {
    font-size: 0.95rem;
    margin-bottom: 1px;
  }
  .modal-plan-yield {
    font-size: 0.6rem;
  }

  /* Presets */
  .capital-presets {
    gap: 0.3rem;
  }
  .preset-btn {
    padding: 0.25rem 0.45rem;
    font-size: 0.72rem;
    flex: 1 1 calc(33.333% - 0.3rem);
    min-width: 60px;
    text-align: center;
  }

  /* Wallet Address Box */
  .wallet-box-dash {
    padding: 0.75rem;
    gap: 0.5rem;
  }
  .qr-preview-dash {
    width: 110px;
    height: 110px;
    padding: 4px;
  }
  .address-text-dash {
    font-size: 0.72rem;
    padding: 0.4rem 0.6rem;
  }

  /* Toast Notification */
  .toast-notice {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    justify-content: center;
    padding: 0.65rem 1rem;
    font-size: 0.8rem;
  }
}

/* Extra Small Screens (max-width: 380px) */
@media (max-width: 380px) {
  .dash-container {
    padding: 0 0.65rem;
  }
  .hero-title-group h1 {
    font-size: 1.2rem;
  }
  .kpi-value {
    font-size: 1.1rem;
  }
  .modal-plan-price {
    font-size: 0.85rem;
  }
  .preset-btn {
    font-size: 0.68rem;
    padding: 0.2rem 0.35rem;
  }
}
