body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    margin: 0;
    padding: 0;
}

.dashboard {
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
}

.equity-curve img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 30px;
}

.table-container {
    overflow-x: auto;
    /* allow horizontal scroll when needed */
    -webkit-overflow-scrolling: touch;
    /* smooth scrolling on iOS */
}

.table {
    min-width: 600px;
    /* natural width of the table */
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    border: 1px solid #ddd;
    padding: 8px;
}

table th {
    background-color: #f2f2f2;
    text-align: left;
}

.table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.charts-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;            /* space between charts */
  margin-bottom: 2rem;
}

.chart-item {
  flex: 1 1 400px;      /* grow, shrink, base width */
  min-width: 300px;     /* prevent them from getting too narrow */
  position: relative;   /* for Chart.js responsive sizing */
  height: 300px;        /* or whatever height you prefer */
}

.legend-table {
  width: 100%;
  border-collapse: collapse;
}

.legend-table th,
.legend-table td {
  padding: 0.25em 0.5em;
  text-align: left;
}

.legend-table th {
  border-bottom: 1px solid #ccc;
  font-weight: 600;
}

.histogram-legend {
  /* override the fixed height so the table can size itself */
  height: auto;
  overflow: visible;
}
