* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  background: #0f172a;
  color: #e2e8f0;
}

.layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.card,
.panel {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

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

.hidden {
  display: none;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

input,
select,
button {
  border-radius: 10px;
  border: 1px solid #334155;
  padding: 12px;
  background: #020617;
  color: #f8fafc;
}

button {
  cursor: pointer;
  background: #2563eb;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.is-loading {
  opacity: 0.8;
}

button.secondary {
  background: #334155;
}

button.danger {
  background: #b91c1c;
}

.headerRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.fullSpan {
  grid-column: 1 / -1;
}

.strategyGroup {
  display: contents;
}

.rangeMeta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #94a3b8;
  font-size: 0.9rem;
}

input[type='range'] {
  padding: 0;
  accent-color: #22c55e;
}

.checkbox {
  flex-direction: row;
  align-items: center;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  padding: 12px;
  border-radius: 12px;
  background: #020617;
  border: 1px solid #1e293b;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-top: 6px;
}

.status-running {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.45);
}

.status-paused {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.status-stopped,
.status-emergency_stop {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

.stat-positive {
  color: #4ade80;
  font-weight: 700;
}

.stat-negative {
  color: #f87171;
  font-weight: 700;
}

.muted,
.listItem small {
  color: #94a3b8;
}

.listItem {
  padding: 10px 0;
  border-bottom: 1px solid #1e293b;
}

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

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