/* QualityRex Analytics - Modern Trading Bot UI (TradeBotX Inspired) */

:root {
  /* Color Palette */
  --primary-blue: #3b82f6;
  --primary-purple: #9333ea;
  --primary-magenta: #d946ef;
  --primary-orange: #f97316;
  --primary-green: #10b981;
  --gradient-from: #3b82f6;
  --gradient-to: #9333ea;
  --gradient-purple-pink: linear-gradient(135deg, #a855f7, #ec4899);

  /* Background Colors */
  --bg-dark: #030712;
  --bg-gray-950: #0a0d14;
  --bg-gray-900: #111827;
  --bg-gray-800: #1f2937;
  --bg-gray-700: #374151;

  /* Border Colors */
  --border-gray-800: #1f2937;
  --border-gray-700: #374151;
  --border-gray-600: #4b5563;

  /* Text Colors */
  --text-white: #ffffff;
  --text-gray-100: #f3f4f6;
  --text-gray-200: #e5e7eb;
  --text-gray-300: #d1d5db;
  --text-gray-400: #9ca3af;
  --text-gray-500: #6b7280;

  /* Status Colors */
  --success: #10b981;
  --success-light: #34d399;
  --danger: #ef4444;
  --danger-light: #f87171;
  --warning: #f59e0b;
  --warning-light: #fbbf24;
  --info: #3b82f6;

  /* Opacity Values */
  --bg-blue-20: rgba(59, 130, 246, 0.2);
  --bg-blue-10: rgba(59, 130, 246, 0.1);
  --bg-purple-20: rgba(147, 51, 234, 0.2);
  --bg-magenta-20: rgba(217, 70, 239, 0.2);
  --bg-orange-20: rgba(249, 115, 22, 0.2);
  --bg-green-20: rgba(16, 185, 129, 0.2);
  --bg-red-20: rgba(239, 68, 68, 0.2);
  --bg-yellow-20: rgba(245, 158, 11, 0.2);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: var(--bg-gray-950);
  color: var(--text-white);
  line-height: 1.6;
  min-height: 100vh;
}

/* Navbar Styles */
.navbar {
  background: var(--bg-gray-900);
  border-bottom: 1px solid var(--border-gray-800);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-white);
  font-size: 1.25rem;
  font-weight: 700;
  transition: opacity 0.3s;
}

.navbar-logo:hover {
  opacity: 0.9;
}

.navbar-logo-subtitle {
  font-size: 0.75rem;
  color: var(--text-gray-400);
  font-weight: 400;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.navbar-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.navbar-menu a {
  color: var(--text-gray-400);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s;
  font-weight: 500;
  padding: 0.5rem 0;
}

.navbar-menu a:hover {
  color: var(--text-white);
}

.navbar-menu a.active {
  color: var(--text-white);
  font-weight: 600;
}

/* Dropdown Menu */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  /* Glassmorphism Effect */
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  /* Premium Border with Gradient */
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  padding: 0.75rem;
  list-style: none;
  min-width: 240px;
  /* Animation States */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* Premium Shadow */
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 1000;
  margin-top: 0.75rem;
  /* Subtle Inner Glow */
  position: relative;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
  border-radius: 16px 16px 0 0;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-menu li {
  margin: 0;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  color: var(--text-gray-300) !important;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.dropdown-menu a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
  opacity: 0;
  transition: opacity 0.2s;
  z-index: -1;
}

.dropdown-menu a:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(147, 51, 234, 0.15));
  color: var(--text-white) !important;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.dropdown-menu a:hover::before {
  opacity: 1;
}

/* Add subtle animation to icons in dropdown */
.dropdown-menu a:hover svg,
.dropdown-menu a:hover span:first-child {
  transform: scale(1.1);
  transition: transform 0.2s;
}

.navbar-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Button Styles */
.btn {
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
  color: white;
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: var(--bg-gray-700);
  color: white;
  border: 1px solid var(--border-gray-600);
}

.btn-secondary:hover {
  background: var(--bg-gray-600);
  border-color: var(--border-gray-500);
}

.btn-outline {
  background: transparent;
  color: var(--text-white);
  border: 2px solid var(--border-gray-700);
}

.btn-outline:hover {
  background: var(--bg-gray-800);
  border-color: var(--border-gray-600);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  opacity: 0.9;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  opacity: 0.9;
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

/* Hero Section */
.hero {
  max-width: 1400px;
  margin: 0 auto;
  padding: 5rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-gray-300);
  max-width: 700px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Features Section */
.features {
  max-width: 1400px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  background: var(--bg-gray-800);
  border: 1px solid var(--border-gray-700);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gray-600);
  box-shadow: var(--shadow-xl);
  background: var(--bg-gray-700);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.feature-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  color: var(--text-white);
  font-weight: 600;
}

.feature-card p {
  color: var(--text-gray-400);
  line-height: 1.6;
  font-size: 0.9375rem;
}

/* Stats Section */
.stats {
  max-width: 1400px;
  margin: 6rem auto;
  padding: 0 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.stat-card {
  background: var(--bg-gray-800);
  border: 1px solid var(--border-gray-700);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gradient-from);
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: var(--text-gray-400);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Auth Forms */
.auth-container {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  background: var(--bg-gray-800);
  border: 1px solid var(--border-gray-700);
  border-radius: 20px;
  padding: 3rem;
  width: 100%;
  max-width: 450px;
  box-shadow: var(--shadow-xl);
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-white);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-gray-300);
  font-weight: 500;
  font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-gray-900);
  border: 1px solid var(--border-gray-600);
  border-radius: 8px;
  color: var(--text-white);
  font-size: 0.9375rem;
  transition: all 0.2s;
}

/* Custom Select Styling */
.form-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  cursor: pointer;
}

.form-group select:hover {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%233B82F6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Select Options Styling (limited browser support but helps where available) */
.form-group select option {
  background: var(--bg-gray-800);
  color: var(--text-white);
  padding: 0.5rem;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: var(--text-gray-400);
  box-shadow: 0 0 0 1px rgba(156, 163, 175, 0.1);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gradient-from);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background: rgba(17, 24, 39, 0.8);
}

.form-group input::placeholder {
  color: var(--text-gray-500);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.btn-full {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  margin-top: 1rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-gray-400);
  font-size: 0.9375rem;
}

.auth-footer a {
  color: var(--gradient-from);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.auth-footer a:hover {
  opacity: 0.8;
}

/* Dashboard */
.dashboard {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.dashboard-header {
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.dashboard-card {
  background: var(--bg-gray-800);
  border: 1px solid var(--border-gray-700);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s;
}

.dashboard-card:hover {
  box-shadow: var(--shadow-md);
}

.dashboard-card h3 {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-white);
}

/* Alert Messages */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  border-left: 4px solid;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: var(--bg-green-20);
  border-color: var(--success);
  color: var(--success-light);
}

.alert-error {
  background: var(--bg-red-20);
  border-color: var(--danger);
  color: var(--danger-light);
}

.alert-warning {
  background: var(--bg-yellow-20);
  border-color: var(--warning);
  color: var(--warning-light);
}

.alert-info {
  background: var(--bg-blue-20);
  border-color: var(--info);
  color: var(--info);
}

/* Responsive */
/* Dashboard Sidebar */
.dashboard-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.dashboard-sidebar {
  background: var(--bg-gray-800);
  border: 1px solid var(--border-gray-700);
  border-radius: 16px;
  padding: 1.25rem;
  height: fit-content;
  position: sticky;
  top: 80px;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: 0.5rem;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-gray-400);
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 0.9375rem;
}

.sidebar-menu a:hover {
  background: var(--bg-gray-700);
  color: var(--text-white);
}

.sidebar-menu a.active {
  background: var(--bg-blue-20);
  color: var(--gradient-from);
  font-weight: 600;
}

.sidebar-menu-icon {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
}

.dashboard-content {
  min-width: 0;
}

@media (max-width: 768px) {
  .navbar-menu {
    display: none;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .features-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 2rem;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: static;
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border-color);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Bot Card Styles */
.bot-card {
  background: var(--bg-gray-800);
  border: 1px solid var(--border-gray-700);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.bot-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gradient-from), var(--gradient-to));
  opacity: 0;
  transition: opacity 0.3s;
}

.bot-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-gray-600);
}

.bot-card:hover::before {
  opacity: 1;
}

.bot-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.bot-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 0.25rem;
}

.bot-card-pair {
  font-size: 0.875rem;
  color: var(--text-gray-400);
}

.bot-status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.bot-status.running {
  background: var(--bg-green-20);
  color: var(--success);
}

.bot-status.paused {
  background: var(--bg-yellow-20);
  color: var(--warning);
}

.bot-status.stopped {
  background: var(--bg-red-20);
  color: var(--danger);
}

.bot-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-white);
  margin: 0;
}

.bot-type {
  font-size: 0.8125rem;
  color: var(--text-gray-400);
  font-weight: 500;
}

.bot-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.bot-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-gray-700);
}

.bot-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.bot-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-gray-700);
}

.status-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge.running {
  background: var(--bg-green-20);
  color: var(--success);
}

.status-badge.paused {
  background: var(--bg-yellow-20);
  color: var(--warning);
}

.status-badge.stopped {
  background: var(--bg-red-20);
  color: var(--danger);
}

.bot-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.bot-card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem;
  background: var(--bg-gray-900);
  border-radius: 12px;
}

.bot-stat-item {
  display: flex;
  flex-direction: column;
}

.bot-stat-label {
  font-size: 0.75rem;
  color: var(--text-gray-400);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.bot-stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-white);
}

.bot-stat-value.positive {
  color: var(--success);
}

.bot-stat-value.negative {
  color: var(--danger);
}

.bot-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-gray-700);
}

.icon-btn {
  padding: 0.5rem;
  background: var(--bg-gray-700);
  border: 1px solid var(--border-gray-600);
  border-radius: 8px;
  color: var(--text-gray-300);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: var(--bg-gray-600);
  color: var(--text-white);
  transform: translateY(-1px);
}

.icon-btn.success:hover {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.icon-btn.danger:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

/* Stats Overview Component - Figma Style */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stats-overview-card {
  background: var(--bg-gray-800);
  border: none;
  border-radius: 14px;
  padding: 1.125rem 1.25rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stats-overview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.15;
  z-index: 0;
}

.stats-overview-card.blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stats-overview-card.purple {
  background: linear-gradient(135deg, #a855f7, #d946ef);
}

.stats-overview-card.orange {
  background: linear-gradient(135deg, #f97316, #fb923c);
}

.stats-overview-card.green {
  background: linear-gradient(135deg, #10b981, #22c55e);
}

.stats-overview-card.red {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.stats-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.stats-overview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.stats-overview-label {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.stats-overview-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  color: white;
}

.stats-overview-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.25rem;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}

.stats-overview-change {
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: rgba(255, 255, 255, 0.75);
  position: relative;
  z-index: 1;
}

.stats-overview-change.positive {
  color: rgba(255, 255, 255, 0.95);
}

.stats-overview-change.negative {
  color: rgba(255, 255, 255, 0.95);
}

/* Performance Chart */
.performance-chart-container {
  background: var(--bg-gray-800);
  border: 1px solid var(--border-gray-700);
  border-radius: 16px;
  padding: 1.5rem;
}

.performance-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.performance-chart-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-white);
}

.chart-legend {
  display: flex;
  gap: 1.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

/* Active Positions Table */
.positions-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.positions-table thead th {
  background: var(--bg-gray-900);
  color: var(--text-gray-400);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  padding: 0.875rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-gray-700);
}

.positions-table thead th:first-child {
  border-top-left-radius: 12px;
}

.positions-table thead th:last-child {
  border-top-right-radius: 12px;
}

.positions-table tbody td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-gray-700);
  color: var(--text-gray-300);
  font-size: 0.9375rem;
}

.positions-table tbody tr:hover {
  background: var(--bg-gray-700);
}

.positions-table tbody tr:last-child td {
  border-bottom: none;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-success {
  background: var(--bg-green-20);
  color: var(--success);
}

.badge-danger {
  background: var(--bg-red-20);
  color: var(--danger);
}

.badge-warning {
  background: var(--bg-yellow-20);
  color: var(--warning);
}

.badge-info {
  background: var(--bg-blue-20);
  color: var(--info);
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

.text-warning {
  color: var(--warning);
}

.text-info {
  color: var(--info);
}

.text-white {
  color: var(--text-white);
}

.text-gray-300 {
  color: var(--text-gray-300);
}

.text-gray-400 {
  color: var(--text-gray-400);
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.font-medium {
  font-weight: 500;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 0.5rem;
}

.gap-2 {
  gap: 1rem;
}

.gap-3 {
  gap: 1.5rem;
}

/* Tooltip Styles */
.tooltip-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tooltip-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-gray-700);
  border: 1px solid var(--border-gray-600);
  color: var(--text-gray-400);
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  margin-left: 0.5rem;
  transition: all 0.2s;
}

.tooltip-icon:hover {
  background: var(--gradient-from);
  border-color: var(--gradient-from);
  color: white;
}

.tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-gray-900);
  border: 1px solid var(--border-gray-600);
  color: var(--text-gray-200);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.5;
  width: 250px;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: all 0.2s;
}

.tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border-gray-600);
}

.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Info Card Styles */
.info-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.info-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.info-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.info-card-title {
  color: var(--text-white);
  font-size: 1.125rem;
  font-weight: 700;
}

.info-card-content {
  color: var(--text-gray-300);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.info-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.info-card-feature {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* Risk Warning Styles */
.risk-warning {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-left: 4px solid var(--danger);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.risk-warning-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.risk-warning-title {
  color: var(--danger);
  font-size: 0.9375rem;
  font-weight: 700;
}

.risk-warning-content {
  color: var(--text-gray-300);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Quick Template Styles */
.quick-templates {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.template-btn {
  flex: 1;
  padding: 0.875rem;
  background: var(--bg-gray-800);
  border: 2px solid var(--border-gray-700);
  border-radius: 12px;
  color: var(--text-gray-300);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.template-btn:hover {
  border-color: var(--gradient-from);
  color: var(--text-white);
  transform: translateY(-2px);
}

.template-btn.conservative {
  border-color: rgba(16, 185, 129, 0.3);
}

.template-btn.conservative:hover {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.1);
}

.template-btn.balanced {
  border-color: rgba(59, 130, 246, 0.3);
}

.template-btn.balanced:hover {
  border-color: var(--gradient-from);
  background: rgba(59, 130, 246, 0.1);
}

.template-btn.aggressive {
  border-color: rgba(239, 68, 68, 0.3);
}

.template-btn.aggressive:hover {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.template-btn-icon {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.template-btn-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-gray-400);
  margin-top: 0.25rem;
}

/* DCA Calculator Table */
.dca-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 1rem;
}

.dca-table th {
  background: var(--bg-gray-900);
  color: var(--text-gray-400);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.75rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border-gray-700);
}

.dca-table td {
  padding: 0.625rem 0.5rem;
  font-size: 0.875rem;
  color: var(--text-gray-300);
  border-bottom: 1px solid var(--border-gray-700);
}

.dca-table tr:last-child td {
  border-bottom: none;
}

.dca-table .level-badge {
  background: var(--bg-blue-20);
  color: var(--gradient-from);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Risk Score Indicator */
.risk-score {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.risk-score-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-gray-900);
  border-radius: 4px;
  overflow: hidden;
}

.risk-score-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s, background 0.3s;
}

.risk-score-label {
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 60px;
  text-align: right;
}

/* Bot Type Specific Styles */
.bot-type-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.bot-type-badge.dca {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.bot-type-badge.dca-delta {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

/* Multi-Coin Config Section */
.multi-coin-section {
  border-radius: 12px;
  padding: 1.5rem;
}

.multi-coin-section.dca {
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.multi-coin-section.dca-delta {
  background: rgba(168, 85, 247, 0.05);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

/* Add Coin Button */
.btn-add-coin {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.btn-add-coin.dca {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.btn-add-coin.dca-delta {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
}

/* Submit Button */
.btn-create-bot {
  flex: 1;
  padding: 1rem;
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-create-bot.dca {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.btn-create-bot.dca-delta {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
}

.btn-create-bot:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Preview Panel Icon */
.preview-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-icon-wrapper.dca {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.preview-icon-wrapper.dca-delta {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
}

/* Info Box */
.info-box {
  padding: 1rem;
  border-radius: 8px;
  border-left: 3px solid;
}

.info-box.dca {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: #3b82f6;
}

.info-box.dca-delta {
  background: rgba(168, 85, 247, 0.1);
  border-left-color: #a855f7;
}

/* DCA Page Layout */
.dca-page-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .dca-page-grid {
    grid-template-columns: 1fr;
  }
}

/* DCA Levels Panel */
.dca-levels-panel {
  background: var(--bg-gray-800);
  border: 1px solid var(--border-gray-700);
  border-radius: 16px;
  padding: 1.5rem;
  position: sticky;
  top: 6rem;
}

.dca-levels-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-gray-700);
}

.dca-levels-title {
  color: var(--text-white);
  font-weight: 700;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dca-levels-summary {
  display: flex;
  gap: 1rem;
}

.dca-summary-item {
  text-align: center;
  padding: 0.5rem 1rem;
  background: var(--bg-gray-900);
  border-radius: 8px;
}

.dca-summary-label {
  font-size: 0.6875rem;
  color: var(--text-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dca-summary-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-white);
}

/* DCA Levels Table - Enhanced */
.dca-levels-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0;
}

.dca-levels-table th {
  background: var(--bg-gray-900);
  color: var(--text-gray-400);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 0.5rem;
  text-align: left;
}

.dca-levels-table th:first-child {
  border-radius: 8px 0 0 8px;
}

.dca-levels-table th:last-child {
  border-radius: 0 8px 8px 0;
}

.dca-levels-table td {
  padding: 0.625rem 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-gray-300);
  border-bottom: 1px solid var(--border-gray-700);
}

.dca-levels-table tr:last-child td {
  border-bottom: none;
}

.dca-levels-table .level-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--bg-blue-20);
  color: var(--gradient-from);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.dca-levels-table .drop-value {
  color: #ef4444;
  font-weight: 600;
}

.dca-levels-table .drop-value.entry {
  color: #10b981;
}

.dca-levels-table .size-value {
  font-weight: 600;
}

.dca-levels-table .cumulative-value {
  color: var(--text-white);
  font-weight: 700;
}

/* DCA Chart Container */
.dca-chart-container {
  background: var(--bg-gray-900);
  border: 1px solid var(--border-gray-700);
  border-radius: 12px;
  padding: 1.25rem;
  margin: 1rem 0;
  position: relative;
}

.dca-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.dca-chart-title {
  color: var(--text-white);
  font-weight: 600;
  font-size: 0.875rem;
}

.dca-chart-legend {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
}

.dca-legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--text-gray-400);
}

.dca-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dca-legend-dot.entry {
  background: #3b82f6;
}

.dca-legend-dot.liq {
  background: #ef4444;
}

.dca-chart-canvas {
  width: 100%;
  height: 200px;
  border-radius: 8px;
}

/* Liquidation Warning */
.liq-warning {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  padding: 0.875rem 1rem;
  margin-top: 1rem;
}

.liq-warning-icon {
  width: 32px;
  height: 32px;
  background: rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  font-size: 1rem;
  flex-shrink: 0;
}

.liq-warning-content {
  flex: 1;
}

.liq-warning-title {
  color: #ef4444;
  font-weight: 700;
  font-size: 0.8125rem;
  margin-bottom: 0.125rem;
}

.liq-warning-text {
  color: var(--text-gray-400);
  font-size: 0.75rem;
  line-height: 1.4;
}

.liq-warning-value {
  color: #ef4444;
  font-weight: 700;
  font-size: 1.125rem;
  text-align: right;
}

/* Input Card */
.input-card {
  background: var(--bg-gray-800);
  border: 1px solid var(--border-gray-700);
  border-radius: 16px;
  padding: 1.5rem;
}

.input-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-gray-700);
}

.input-card-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.input-card-title {
  color: var(--text-white);
  font-weight: 700;
  font-size: 1.125rem;
}

.input-card-subtitle {
  color: var(--text-gray-400);
  font-size: 0.8125rem;
}

/* Input Group Grid */
.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.input-grid.full {
  grid-template-columns: 1fr;
}

/* Compact Input */
.compact-input {
  position: relative;
}

.compact-input label {
  display: block;
  color: var(--text-gray-300);
  font-weight: 600;
  margin-bottom: 0.375rem;
  font-size: 0.8125rem;
}

.compact-input input,
.compact-input select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-gray-900);
  border: 1px solid var(--border-gray-600);
  border-radius: 8px;
  color: var(--text-white);
  font-size: 0.875rem;
  transition: all 0.2s;
}

.compact-input input:focus,
.compact-input select:focus {
  outline: none;
  border-color: var(--gradient-from);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.compact-input .input-suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(25%);
  color: var(--text-gray-500);
  font-size: 0.75rem;
  font-weight: 600;
}

.compact-input small {
  display: block;
  color: var(--text-gray-500);
  font-size: 0.6875rem;
  margin-top: 0.25rem;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-gray-700);
}