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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0f1117;
  color: #e1e4e8;
  padding: 24px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  border-bottom: 1px solid #2d333b;
  padding-bottom: 16px;
}

h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #f0f3f6;
}

#header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

#refresh-btn {
  background: #161b22;
  color: #e1e4e8;
  border: 1px solid #2d333b;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.8rem;
  cursor: pointer;
}

#refresh-btn:hover {
  border-color: #58a6ff;
}

#last-updated {
  font-size: 0.8rem;
  color: #7a828e;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 32px 0;
  padding: 12px 0;
  border-top: 1px solid #2d333b;
  border-bottom: 1px solid #2d333b;
}

.divider-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f0f3f6;
}

#fund-select-inline {
  background: #161b22;
  color: #e1e4e8;
  border: 1px solid #2d333b;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
}

#fund-select-inline:focus {
  outline: none;
  border-color: #58a6ff;
}

.fund-section {
  margin-bottom: 40px;
}

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

.table-header h2 {
  font-size: 1.1rem;
  font-weight: 500;
  color: #c9d1d9;
  margin-bottom: 0;
}

.table-controls {
  display: flex;
  gap: 8px;
}

.table-btn {
  background: #161b22;
  color: #e1e4e8;
  border: 1px solid #2d333b;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.78rem;
  cursor: pointer;
}

.table-btn:hover {
  border-color: #58a6ff;
}

.table-btn.active {
  background: #1f6feb;
  border-color: #58a6ff;
}

.book-section {
  margin-bottom: 24px;
}

.book-section h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  padding-left: 2px;
}

.empty {
  color: #7a828e;
  font-style: italic;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  table-layout: auto;
}

thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

th {
  background: #161b22;
  color: #8b949e;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  text-align: right;
  border-bottom: 2px solid #2d333b;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

th:hover {
  color: #e1e4e8;
}

th:nth-child(1) {
  text-align: left;
}

td {
  padding: 8px 12px;
  text-align: right;
  border-bottom: 1px solid #1c2128;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

td:nth-child(1) {
  text-align: left;
  color: #c9d1d9;
}

tbody tr:hover {
  background: #1c2128;
}

.positive {
  color: #3fb950;
}

.negative {
  color: #f85149;
}
