* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  color: #1a1a1a;
  height: 100vh;
  overflow: hidden;
}

.app-container {
  display: flex;
  height: 100vh;
}

/* Left data panel */
.data-panel {
  flex: 0 0 65%;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid #ddd;
}

.panel-header {
  padding: 12px 16px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}

.panel-header h1 {
  font-size: 18px;
  font-weight: 600;
}

.table-wrapper {
  flex: 1;
  overflow: auto;
}

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

.data-table th,
.data-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.data-table th {
  background: #f0f0f0;
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table th.sortable {
  cursor: pointer;
}

.data-table th.sortable span {
  opacity: 0.5;
  font-size: 10px;
}

.data-table tbody tr:hover {
  background: #f5f8fa;
}

.data-table tbody tr.selected {
  background: #e3f2fd;
}

.data-table .positive {
  color: #1b5e20;
}

.data-table .negative {
  color: #c62828;
}

.data-table .chart-link {
  color: #1565c0;
  text-decoration: underline;
  cursor: pointer;
}

.data-table .chart-link:hover {
  color: #0d47a1;
}

.data-table input[type="checkbox"] {
  cursor: pointer;
}

/* Right chart panel */
.chart-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #2e7d32;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.15);
  color: white;
}

.chart-header #current-symbol {
  font-weight: 600;
  font-size: 16px;
}

.chart-header a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 12px;
}

.chart-header a:hover {
  text-decoration: underline;
}

.chart-display {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 12px;
}

#chart-container {
  flex: 1;
  min-height: 200px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

#chart-container iframe {
  width: 100%;
  height: 100%;
  min-height: 200px;
  border: none;
}

.chart-hint {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
}

.chart-hint a {
  color: #90caf9;
  text-decoration: underline;
}
