/* Strategy Controls Styling */
.strategy-controls-shell {
  max-width: 1400px;
  margin: 0 auto 32px auto;
  padding: 0 20px;
}

.strategy-controls-card {
  background: var(--panel);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
}

.strategy-header {
  margin-bottom: 24px;
}

.strategy-header h3 {
  margin: 0 0 8px 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.strategy-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.strategy-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
}

.form-control {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--background);
  color: var(--text);
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control:disabled {
  background: var(--panel-strong);
  color: var(--muted);
  cursor: not-allowed;
}

.strategy-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--panel-strong);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--border);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary.active {
  background: var(--accent-2);
  color: white;
  border-color: var(--accent-2);
}

.btn-secondary.active:hover {
  background: #5558d9;
  border-color: #5558d9;
}

.btn-icon {
  font-size: 1.1em;
}

/* Loading State */
.btn-primary.loading {
  position: relative;
  color: transparent;
}

.btn-primary.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spinner 0.6s linear infinite;
}

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

/* Results Section */
.strategy-results {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 2px solid var(--border);
}

.results-header {
  margin-bottom: 20px;
}

.results-header h4 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.result-card {
  background: var(--background);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: transform 0.2s ease;
}

.result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.result-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.result-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.result-value.positive {
  color: #10b981;
}

.result-value.negative {
  color: #ef4444;
}

/* Strategy Details Section - Below Chart */
.strategy-details-shell {
  max-width: 1400px;
  margin: 32px auto;
  padding: 0 20px;
}

.strategy-details-card {
  background: var(--panel);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
}

.strategy-details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.strategy-details-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.signals-section h3,
.profit-summary h3,
.analysis-section h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--text);
  font-size: 1.2rem;
}

.strategy-analysis {
  background: var(--background);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  line-height: 1.6;
  color: var(--text);
}

.strategy-analysis h5 {
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.strategy-analysis p {
  margin: 0;
  color: var(--muted);
}

/* Responsive Design */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .strategy-actions {
    flex-direction: column;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  
  .results-grid {
    grid-template-columns: 1fr;
  }
}
