/* imbalance.css — page-specific styles for imbalance.html */

/* Two-column layout */
#main { flex: 1; display: flex; overflow: hidden; }
#chart-area { flex: 1; overflow-y: auto; padding: 20px 24px; }
#side-panel {
  width: 300px; flex-shrink: 0;
  overflow-y: auto; padding: 20px 16px;
  border-left: 1px solid #243040;
  font-size: 14px;
}

/* Chart sections */
.chart-section { margin-bottom: 28px; }
.chart-section h2 {
  font-size: 14px; font-weight: 700; color: #7a90a8;
  text-transform: uppercase; letter-spacing: 0.4px;
  margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px solid #243040;
}
.chart-pair {
  background: #111820; border: 1px solid #243040;
  border-radius: 6px; padding: 14px 16px 10px;
}
.chart-pair svg { display: block; }

/* Context panel */
.ctx-title {
  font-size: 13px; font-weight: 700; color: #7a90a8;
  text-transform: uppercase; letter-spacing: 0.4px;
  margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px solid #243040;
}
.ctx-group { margin-bottom: 16px; }
.ctx-group h3 { font-size: 12px; font-weight: 600; color: #5a7890; margin-bottom: 6px; }
.ctx-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13px; }
.ctx-key { color: #8fa4b8; }
.ctx-val { color: #e0eaf4; font-variant-numeric: tabular-nums; font-weight: 500; }
.ctx-val.positive { color: #e07050; }
.ctx-val.negative { color: #5090e0; }
.ctx-note {
  font-size: 12px; color: #5a7890; line-height: 1.5;
  margin-top: 12px; padding: 10px 12px;
  background: #111820; border-radius: 6px;
  border-left: 3px solid #4a6080;
}
.ctx-period { font-size: 13px; color: #e0eaf4; font-weight: 600; margin-bottom: 12px; }
.ctx-latest-btn {
  float: right; font-size: 11px; color: #7a90a8;
  background: #1a2838; border: 1px solid #3a5060;
  border-radius: 4px; padding: 2px 10px;
  cursor: pointer; transition: all 0.12s;
}
.ctx-latest-btn:hover { color: #e0eaf4; border-color: #5090e0; }
.ctx-latest-btn:focus-visible { outline: 2px solid #5090e0; outline-offset: 2px; }

/* Annual summary box */
.annual-summary {
  background: #111820; border: 1px solid #243040;
  border-radius: 6px; padding: 14px 18px; margin-bottom: 20px;
}
.summary-title { font-size: 14px; font-weight: 700; color: #e0eaf4; margin-bottom: 4px; }
.summary-caveat { font-weight: 400; font-size: 12px; color: #c0901a; }
.summary-period { font-size: 12px; color: #5a7890; margin-bottom: 10px; }
.summary-grid { display: flex; gap: 24px; flex-wrap: wrap; }
.summary-item { display: flex; flex-direction: column; gap: 2px; }
.summary-label {
  font-size: 11px; font-weight: 600; color: #5a7890;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.summary-value {
  font-size: 16px; font-weight: 600; color: #e0eaf4;
  font-variant-numeric: tabular-nums;
}

/* Loading overlay — smaller spinner than global pages */
#loading {
  position: fixed; inset: 0; background: rgba(13,17,24,0.85);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 10px;
  font-size: 15px; color: #8fa4b8; z-index: 10;
}
#loading.hidden { display: none; }
#loading .spinner { width: 28px; height: 28px; border-width: 3px; }

/* Chart legend */
.legend { display: flex; gap: 16px; margin-bottom: 8px; font-size: 12px; color: #8fa4b8; }
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-swatch { width: 20px; height: 3px; border-radius: 2px; }
