/**
 * R2R FinTech Layout Styles
 * Fully Responsive for Desktop, Tablet, and Mobile Smartphones
 */

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* --- HEADER --- */
.top-nav {
  display: flex;
  flex-direction: column;
  padding: 8px 20px;
  background: rgba(8, 12, 22, 0.92);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1000;
  gap: 8px;
}

.top-nav-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

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

.brand-logo-img {
  height: 34px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.4));
  transition: transform 0.25s ease;
}

.brand-logo-img:hover {
  transform: scale(1.03);
}

.brand-tagline-wrap {
  display: flex;
  flex-direction: column;
}

.brand-tagline {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: var(--gradient-r2r);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.network-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 7px;
  border-radius: var(--pill-radius);
  border: 1px solid var(--border-subtle);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--trade-profit);
  box-shadow: 0 0 8px var(--trade-profit);
  animation: liveDotGlow 2s infinite ease-in-out;
}

/* Header Controls Right */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mode-badge {
  padding: 5px 10px;
  border-radius: var(--pill-radius);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--r2r-cyan);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mode-badge:hover {
  background: rgba(0, 240, 255, 0.15);
}

/* Big Hero Auto Trade Button */
.btn-auto-trade {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--pill-radius);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.25s ease;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  white-space: nowrap;
}

.btn-auto-trade.active {
  background: var(--gradient-button-auto);
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite, pulseGlow 2.5s infinite;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.5), 0 0 35px rgba(247, 37, 133, 0.4);
  border-color: rgba(255, 255, 255, 0.5);
}

.auto-status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
  transition: background 0.3s;
}

.btn-auto-trade.active .auto-status-indicator {
  background: #fff;
  box-shadow: 0 0 8px #fff;
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.icon-btn:hover {
  color: var(--r2r-cyan);
  border-color: var(--border-glow);
  background: rgba(0, 240, 255, 0.08);
}

.lang-btn {
  font-size: 11px;
  font-weight: 700;
  width: auto;
  padding: 0 8px;
}

/* Sub-row Stats Summary Strip */
.header-stats {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(14, 20, 34, 0.6);
  padding: 5px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  width: 100%;
  gap: 12px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-value.profit {
  color: var(--trade-profit);
  text-shadow: 0 0 8px var(--trade-profit-glow);
}

.stat-value.loss {
  color: var(--trade-loss);
  text-shadow: 0 0 8px var(--trade-loss-glow);
}

.stat-value.cyan {
  color: var(--r2r-cyan);
}

.header-divider {
  width: 1px;
  height: 16px;
  background: var(--border-subtle);
}

/* --- MAIN WORKSTATION GRID --- */
.workstation-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 14px;
  padding: 14px 18px;
  flex: 1;
}

.chart-workstation {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.intel-workstation {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* Bottom Terminal */
.bottom-dock {
  background: rgba(7, 10, 18, 0.95);
  border-top: 1px solid var(--border-subtle);
  backdrop-filter: var(--glass-blur);
  z-index: 100;
}

/* =========================================
   RESPONSIVE DESIGN BREAKPOINTS (MOBILE & TABLET)
   ========================================= */

@media (max-width: 1080px) {
  .workstation-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }
}

@media (max-width: 768px) {
  .top-nav {
    padding: 8px 10px;
    gap: 6px;
  }

  .brand-logo-img {
    height: 26px;
  }

  .brand-tagline {
    font-size: 8.5px;
    letter-spacing: 1px;
  }

  .network-badge {
    display: none; /* Keep top row clean and uncluttered on mobile */
  }

  .mode-badge {
    font-size: 9px;
    padding: 4px 7px;
  }

  .btn-auto-trade {
    padding: 5px 9px;
    font-size: 10px;
    gap: 4px;
  }

  .icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
  }

  .header-stats {
    padding: 4px 8px;
    gap: 6px;
  }

  .stat-item {
    gap: 4px;
  }

  .stat-label {
    font-size: 8.5px;
  }

  .stat-value {
    font-size: 11px;
  }

  .workstation-grid {
    padding: 8px;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .brand-tagline-wrap {
    display: none; /* Ultra-compact: Just logo on very narrow phones */
  }

  .mode-badge {
    display: none; /* Save space on small phones */
  }
}
