/* Import JetBrains Mono font */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: normal;
}

body {
  background-color: white;
  color: black;
  line-height: 1.6;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  margin-bottom: 20px;
  font-size: 12px;
  text-align: left;
}

h1 {
  margin-top: 0;
}

h2 {
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
  margin-top: 30px;
}

/* Layout */
.container {
  width: 100%;
  margin: 0 auto;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.header-left {
  text-align: left;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

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

.metric-card {
  border: 1px solid #ddd;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metric-label {
  font-weight: bold;
  margin-bottom: 5px;
}

.metric-value {
  font-size: 14px;
}

.positive {
  color: green;
}

.negative {
  color: red;
}

/* Tables */
.table-container {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 30px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
}

th, td {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid #ddd;
  overflow: hidden;
  text-overflow: ellipsis;
}

th {
  background-color: #f4f4f4;
  font-weight: bold;
}

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

tr:hover {
  background-color: #f1f1f1;
}

/* System status */
.system-status {
  margin-top: 30px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.status-item {
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
}

/* Market status */
.market-info {
  text-align: left;
  margin: 15px 0;
  font-weight: bold;
}

.market-open {
  color: green;
}

.market-closed {
  color: red;
}

/* Buttons */
.button {
  background-color: black;
  color: white;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  margin-right: 10px;
}

.button:hover {
  opacity: 0.8;
}

.button-container {
  margin: 20px 0;
  display: flex;
  justify-content: space-between;
  max-width: 100%;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
}

.pagination-button {
  min-width: 100px;
}

#page-info {
  font-size: 12px;
}

/* Chart styles */
.chart-container {
  width: 100%;
  height: 300px;
  margin-bottom: 30px;
}

/* Messages */
.message {
  padding: 15px;
  margin: 20px 0;
  border-radius: 4px;
  text-align: center;
}

.info-message {
  background-color: #e8f4f8;
  color: #0c5460;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
}

.hidden {
  display: none;
}

/* Footer */
footer {
  margin-top: 40px;
  padding-top: 10px;
  border-top: 1px solid #ddd;
  font-size: 10px;
}

.footer-content {
  margin-bottom: 5px;
}

.footer-left {
  text-align: left;
}

.strategy-explanation {
  margin: 20px 0;
  text-align: left;
  line-height: 1.5;
}

/* Collapsible sections */
.collapsible-section {
  margin-bottom: 20px;
}

.collapsible-header {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-bottom: 5px;
  border-bottom: 1px solid #ddd;
}

.collapsible-header:after {
  content: '';
  display: block;
  clear: both;
}

.toggle-icon {
  font-size: 10px;
  transition: transform 0.3s;
  margin-left: 10px;
  position: absolute;
  right: 0;
  top: 0;
}

.collapsible-section.collapsed .toggle-icon {
  transform: rotate(180deg);
}

.collapsible-content {
  display: block;
  transition: max-height 0.3s ease-out;
  overflow: hidden;
}

.collapsible-section.collapsed .collapsible-content {
  display: none;
}

.disclaimer {
  font-size: 9px;
  color: #999;
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
  text-transform: uppercase;
}