/* ============================================
   📊 Demo Trading Page – Balance, Controls, Tables
   ============================================ */

.demo-main {
  padding: 0.5rem 0;
}
.demo-balance {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Controls */
.demo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  background: var(--bg-card);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.demo-controls select,
.demo-controls input {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 6px;
}
.demo-controls select {
  min-width: 120px;
}
.demo-controls input {
  width: 120px;
}

/* Positions & History */
.demo-positions,
.demo-history {
  margin-top: 2rem;
}
.demo-positions table,
.demo-history table {
  width: 100%;
  border-collapse: collapse;
}
.demo-positions th,
.demo-positions td,
.demo-history th,
.demo-history td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.demo-positions th,
.demo-history th {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .demo-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .demo-controls select,
  .demo-controls input,
  .demo-controls .btn {
    width: 100%;
  }
  .demo-balance {
    font-size: 1.4rem;
  }
  .demo-positions th,
  .demo-positions td,
  .demo-history th,
  .demo-history td {
    font-size: 0.85rem;
    padding: 0.3rem;
  }
}

@media (max-width: 480px) {
  .demo-balance {
    font-size: 1.2rem;
  }
  .demo-positions th,
  .demo-positions td,
  .demo-history th,
  .demo-history td {
    font-size: 0.75rem;
    padding: 0.2rem;
  }
}