/* Import modern Google Font */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;700&display=swap');

/* =========================================================
   DESIGN SYSTEM VARIABLES
   ========================================================= */
:root {
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Color Palette (HSL Tailored Colors) */
  --bg-main: #06080e;
  --bg-card: #0b0e17;
  --bg-card-border: rgba(255, 255, 255, 0.05);
  --bg-input: #111422;
  
  --primary: #5f5af6;       /* Vibrant Purple/Indigo */
  --primary-hover: #4b44e0;
  --primary-glow: rgba(95, 90, 246, 0.25);
  --secondary: #00cbd6;     /* Cyan Accent */
  --secondary-glow: rgba(0, 203, 214, 0.15);
  
  --success: #00e575;       /* Emerald Buy */
  --success-glow: rgba(0, 229, 117, 0.12);
  
  --danger: #ff3366;        /* Neon Rose Sell */
  --danger-glow: rgba(255, 51, 102, 0.12);
  
  --warning: #ffb800;       /* Amber Warning */
  
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #64748b;
}

/* =========================================================
   BASE RESET & UTILITIES
   ========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background-color: var(--bg-main) !important;
  min-height: 100vh;
}

body {
  background-color: transparent !important;
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: rgba(8, 12, 24, 0.4);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* =========================================================
   LAYOUT & CONTAINERS
   ========================================================= */
.app-container {
  max-width: 1680px;
  margin: 0 auto;
}

header {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--bg-card-border);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-glow {
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  box-shadow: 0 0 12px var(--secondary);
  animation: pulse-glow 2s infinite;
}

.badge-sync {
  background: rgba(0, 203, 214, 0.07);
  border: 1px solid rgba(0, 203, 214, 0.2);
  color: var(--secondary);
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Grid System */
.dashboard-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.25rem;
  align-items: start;
}

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

/* =========================================================
   COMPONENTS
   ========================================================= */

/* Glassmorphism Cards */
.card-glass {
  background: var(--bg-card) !important;
  border: 1px solid var(--bg-card-border) !important;
  border-radius: 12px !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  padding: 1.25rem !important;
  box-shadow: 0 15px 35px 0 rgba(0, 0, 0, 0.6) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.card-glass:hover {
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 20px 45px 0 rgba(0, 0, 0, 0.7) !important;
}

/* Inputs & Form Styling */
.form-group {
  margin-bottom: 0.75rem;
  flex: 1;
}

.form-group label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.input-glow {
  width: 100% !important;
  background-color: var(--bg-input) !important;
  border: 1px solid var(--bg-card-border) !important;
  border-radius: 8px !important;
  padding: 0.6rem 0.8rem !important;
  color: var(--text-primary) !important;
  font-family: var(--font-sans) !important;
  font-size: 0.875rem;
  outline: none !important;
  transition: all 0.2s ease !important;
  box-shadow: none !important;
}

.input-glow:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px var(--primary-glow) !important;
}

/* Form Layout Helpers */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
}

/* Switch Styles */
.switch-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--bg-card-border);
  transition: all 0.2s ease;
}

.switch-container:hover {
  background: rgba(255, 255, 255, 0.04);
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.08);
  transition: .3s ease;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: #f1f5f9;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

input:checked + .slider {
  background-color: var(--secondary) !important;
  border-color: rgba(0, 203, 214, 0.3) !important;
}

input:checked + .slider:before {
  transform: translateX(18px);
  background-color: white;
}

/* Buttons */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  border: none;
  border-radius: 8px;
  color: white;
  padding: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px var(--primary-glow);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(95, 90, 246, 0.45);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-card-border);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-export {
  background: rgba(0, 203, 214, 0.08);
  border: 1px solid rgba(0, 203, 214, 0.25);
  color: var(--secondary);
  border-radius: 6px;
  padding: 0.5rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.btn-export:hover {
  background: var(--secondary);
  color: var(--bg-main);
  box-shadow: 0 0 10px rgba(0, 203, 214, 0.3);
}

/* Metrics Summary Cards */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.metric-card {
  padding: 1rem 0.85rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--text-dark);
}

.metric-card.profit::before { background: var(--success); }
.metric-card.loss::before { background: var(--danger); }
.metric-card.winrate::before { background: var(--secondary); }
.metric-card.roi::before { background: var(--primary); }
.metric-card.pf::before { background: var(--warning); }

.metric-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}

.metric-value {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Active Signal Badges */
.badge-signal {
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-signal.buy {
  background-color: var(--success-glow);
  color: var(--success);
  border: 1px solid rgba(0, 229, 117, 0.25);
}

.badge-signal.sell {
  background-color: var(--danger-glow);
  color: var(--danger);
  border: 1px solid rgba(255, 51, 102, 0.25);
}

/* Tabs */
.tabs-container {
  display: flex;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.25rem;
  border-radius: 10px;
  border: 1px solid var(--bg-card-border);
}

.tab-btn {
  flex: 1;
  padding: 0.6rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* Custom Table Design */
.table-wrapper {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--bg-card-border);
  background: rgba(0, 0, 0, 0.2);
}

.classy-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.classy-table th {
  background: rgba(255, 255, 255, 0.015);
  padding: 0.75rem 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--bg-card-border);
}

.classy-table td {
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  color: #e2e8f0;
}

.classy-table tr:hover td {
  background: rgba(255, 255, 255, 0.012);
}

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

/* Loader Animation */
.loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 9, 19, 0.85);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loader-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(95, 90, 246, 0.08);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s infinite linear;
  margin-bottom: 0.75rem;
}

/* Console Logs Widget styling */
.console-card {
  padding: 0.75rem 1rem !important;
  background: rgba(4, 6, 12, 0.9);
  border-color: rgba(255, 255, 255, 0.05);
}

.console-dot {
  width: 7px;
  height: 7px;
  background-color: var(--secondary);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--secondary);
}

.console-logs {
  max-height: 90px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  scroll-behavior: smooth;
}

.log-line {
  line-height: 1.4;
  word-break: break-all;
}

/* Chart overlay glow */
.chart-glow {
  position: relative;
}

.chart-type-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chart-type-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 6px var(--primary-glow);
}

/* Strategy Dynamic Form display */
.strategy-inputs-group {
  transition: all 0.2s ease;
}

.strategy-inputs-group.hidden {
  display: none !important;
}

/* =========================================================
   KEYFRAME ANIMATIONS
   ========================================================= */
@keyframes pulse-glow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 8px var(--secondary);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 16px var(--secondary);
    opacity: 0.75;
  }
}

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

/* =========================================================
   SAVED RUNS SIDEBAR LAYOUT
   ========================================================= */
.backtest-layout-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 1200px) {
  .backtest-layout-grid {
    grid-template-columns: 1fr;
  }
}

.saved-runs-sidebar {
  max-height: 650px;
  position: sticky;
  top: 1.5rem;
}

.saved-runs-list {
  scrollbar-width: thin;
}

.saved-run-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.saved-run-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(95, 90, 246, 0.3);
  transform: translateY(-1px);
}

.saved-run-item.active {
  background: rgba(95, 90, 246, 0.1);
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(95, 90, 246, 0.2);
}

.saved-run-item .run-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.saved-run-item .run-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.saved-run-item .run-strategy {
  font-size: 0.7rem;
  color: var(--secondary);
  font-weight: 600;
  text-transform: uppercase;
}

.saved-run-item .run-date {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.saved-run-item .run-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 0.35rem;
}

.saved-run-item .run-profit {
  font-weight: 700;
}

.saved-run-item .run-profit.positive { color: var(--success); }
.saved-run-item .run-profit.negative { color: var(--danger); }

.saved-run-item .btn-delete-run {
  background: transparent;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

.saved-run-item .btn-delete-run:hover {
  color: var(--danger);
  background: rgba(255, 51, 102, 0.1);
}

/* Custom styling for calendar pickers */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) sepia(1) saturate(5) hue-rotate(175deg);
  cursor: pointer;
}

/* Custom Checkbox Multi-Select Dropdown styling */
#stocks-dropdown-container {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
  border-radius: 12px;
  background: rgba(10, 16, 32, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#stocks-checkbox-list {
  scrollbar-width: thin;
}

.stock-checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.stock-checkbox-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.stock-checkbox-item input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
}

.stock-checkbox-item span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* =========================================================
   PREMIUM SIDEBAR NAVIGATION
   ========================================================= */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 3rem);
  position: sticky;
  top: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 14px;
  padding: 1.25rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--bg-card-border);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

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

.brand-subtitle {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1rem;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  position: relative;
  outline: none;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
  background: rgba(95, 90, 246, 0.08);
  color: var(--text-primary);
  border-left: 3px solid var(--primary);
  padding-left: calc(1rem - 3px);
}

.nav-item i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  color: var(--text-dark);
}

.nav-item.active i {
  color: var(--secondary);
}

.badge-count {
  position: absolute;
  right: 1rem;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 12px;
  box-shadow: 0 2px 6px var(--primary-glow);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--bg-card-border);
}

/* =========================================================
   HISTORY GRID CARD VIEW
   ========================================================= */
.history-card-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-card-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(95, 90, 246, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.history-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.history-card-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.history-card-strategy {
  font-size: 0.65rem;
  color: var(--secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.history-card-timestamp {
  font-size: 0.65rem;
  color: var(--text-dark);
  white-space: nowrap;
}

.history-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.25);
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.02);
  line-height: 1.4;
}

.history-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.history-stat-box {
  background: rgba(8, 12, 24, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.history-stat-label {
  font-size: 0.55rem;
  color: var(--text-dark);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 0.1rem;
}

.history-stat-value {
  font-size: 0.75rem;
  font-weight: 700;
}

.history-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.btn-load-run {
  width: 100%;
  background: var(--primary);
  border: none;
  border-radius: 6px;
  color: white;
  padding: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
}

.btn-load-run:hover {
  background: var(--primary-hover);
  box-shadow: 0 0 10px rgba(95, 90, 246, 0.3);
}

.btn-delete-run-card {
  background: transparent;
  border: 1px solid rgba(255, 51, 102, 0.2);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-delete-run-card:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(255, 51, 102, 0.05);
}

/* =========================================================
   MOCKUP ALIGNED FRONTEND COMPONENT STYLES
   ========================================================= */

/* Table Action Buttons */
.btn-view-run-action {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  border: none;
  border-radius: 6px;
  color: white;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px var(--primary-glow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-view-run-action:hover {
  box-shadow: 0 4px 12px rgba(95, 90, 246, 0.4);
  transform: translateY(-1px);
}

.btn-delete-run-action {
  background: transparent;
  border: 1px solid rgba(255, 51, 102, 0.25);
  color: var(--danger);
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.50rem;
}

.btn-delete-run-action:hover {
  background: rgba(255, 51, 102, 0.1);
  border-color: var(--danger);
  color: var(--danger);
  box-shadow: 0 0 10px rgba(255, 51, 102, 0.2);
}

/* Strategy Badge / Tags in Table */
.strategy-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

.tag-rsi_2 {
  background: rgba(0, 203, 214, 0.1);
  color: #00cbd6;
  border: 1px solid rgba(0, 203, 214, 0.2);
}

.tag-ma_crossover {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.tag-bollinger_bands {
  background: rgba(95, 90, 246, 0.1);
  color: #5f5af6;
  border: 1px solid rgba(95, 90, 246, 0.2);
}

.tag-macd {
  background: rgba(255, 184, 0, 0.1);
  color: #ffb800;
  border: 1px solid rgba(255, 184, 0, 0.2);
}

/* Row active highlighted state */
.classy-table tr.active td {
  background: rgba(95, 90, 246, 0.12) !important;
  border-left: 2px solid var(--primary);
}

/* Pagination Buttons styling */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
}

.pagination-btn {
  background: rgba(8, 12, 24, 0.6);
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.pagination-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 2px 6px var(--primary-glow);
}

/* Sidebar Custom Alignments */
.sidebar-nav {
  background: var(--bg-card) !important;
  border: 1px solid var(--bg-card-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6) !important;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(95, 90, 246, 0.15) 0%, transparent 100%) !important;
  color: var(--text-primary) !important;
  border-left: 3px solid var(--primary) !important;
  padding-left: calc(1rem - 3px) !important;
}

.logo-glow-blue {
  width: 32px;
  height: 32px;
  background: rgba(0, 203, 214, 0.1);
  border: 1px solid rgba(0, 203, 214, 0.25);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(0, 203, 214, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-glow 2s infinite;
}

.status-card {
  background: rgba(8, 12, 24, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.04) !important;
  border-radius: 10px !important;
}

.status-dot-green {
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
}

.btn-sync-now {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: var(--text-primary) !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
  cursor: pointer;
}

.btn-sync-now:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Premium Gradient Buttons */
.btn-primary-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%) !important;
  border: none !important;
  color: white !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 4px 14px var(--primary-glow) !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center;
}

.btn-primary-gradient:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(95, 90, 246, 0.45) !important;
}

.btn-primary-gradient:active {
  transform: translateY(1px) !important;
}

/* =========================================================
   FLOATING MINIMIZED TASK CARD & TOAST SYSTEM
   ========================================================= */

.minimized-task-card {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: rgba(10, 16, 32, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 203, 214, 0.15);
  z-index: 999;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slide-in-task 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-restore-task {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--secondary);
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-restore-task:hover {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 8px rgba(95, 90, 246, 0.4);
}

.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast-card {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.95);
  border-left: 4px solid var(--primary);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  color: white;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  max-width: 450px;
  transform: translateX(120%);
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-card.show {
  transform: translateX(0);
}

.toast-success {
  border-left-color: var(--success) !important;
}

.toast-error {
  border-left-color: var(--danger) !important;
}

.toast-warning {
  border-left-color: var(--warning) !important;
}

.toast-info {
  border-left-color: var(--secondary) !important;
}

.toast-title {
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 0.1rem;
}

.toast-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
}

@keyframes slide-in-task {
  from {
    transform: translateY(100px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Custom layout and padding adjustments for date range elements */
.date-range-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
  width: 100%;
}

input[type="date"].input-glow {
  padding: 0.6rem 0.5rem !important;
}

/* =========================================================
   STRATEGY DOCUMENTATION STYLING
   ========================================================= */
.doc-tab {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  border: 1px solid var(--bg-card-border);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
}

.doc-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.1);
}

.doc-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.doc-panel {
  animation: fadeInDoc 0.3s ease;
}

@keyframes fadeInDoc {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Top Horizontal Full-Width Ticker Bar */
.maintenance-ticker-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 32px;
  background: rgba(6, 8, 14, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: 10px;
  color: #94a3b8;
  user-select: none;
}

.badge-fast-top, .badge-secure-top, .badge-multi-top {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 16px;
}

.badge-fast-top {
  background: rgba(0, 203, 214, 0.1);
  border: 1px solid rgba(0, 203, 214, 0.35);
  color: #00cbd6;
}

.badge-secure-top {
  background: rgba(0, 229, 117, 0.1);
  border: 1px solid rgba(0, 229, 117, 0.35);
  color: #00e575;
}

.badge-multi-top {
  background: rgba(95, 90, 246, 0.1);
  border: 1px solid rgba(95, 90, 246, 0.35);
  color: #818cf8;
}

.ticker-content-wrapper {
  display: flex;
  width: max-content;
}

.ticker-slide {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee-scroll 45s linear infinite;
}

@keyframes marquee-scroll {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

.maintenance-ticker-bar:hover .ticker-slide {
  animation-play-state: paused;
}

/* =========================================================
   AUTHENTICATION LAYOUT
   ========================================================= */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 6rem);
  padding: 2rem 0;
  width: 100%;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.25s ease;
}

.auth-tab-btn:hover {
  color: white;
}

.auth-tab-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.auth-input {
  background: rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  transition: all 0.2s ease;
}

.auth-input:focus {
  border-color: var(--secondary) !important;
  box-shadow: 0 0 0 2px rgba(0, 242, 254, 0.15) !important;
}

#user-avatar-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.hidden {
  display: none !important;
}

/* =========================================================
   LANDING PAGE STYLES
   ========================================================= */
.landing-wrapper {
  animation: fadeIn 0.5s ease-out;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-section h1 {
  text-shadow: 0 0 40px rgba(95, 90, 246, 0.15);
}

/* Modal Overlay Styling */
.auth-wrapper.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  margin: 0 !important;
}

/* Custom interactive preview style */
#sim-chart {
  width: 100%;
  height: 100%;
}

.bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -10;
  pointer-events: none;
}





