/* Activity View */
.activity-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Sort Controls Bar */
.activity-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.activity-toolbar label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
}

.activity-sort-select {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.activity-sort-select:focus {
  outline: none;
  border-color: var(--accent);
}

.activity-filter-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text2);
  cursor: pointer;
  user-select: none;
}

.activity-filter-toggle input[type="checkbox"] {
  accent-color: var(--accent);
}

.activity-stats {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}

/* Scrollable Sector Cards Container */
.activity-sectors {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Sector Card */
.sector-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 0;
}

.sector-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.sector-header:hover {
  background: var(--surface2);
}

.sector-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sector-name {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
}

.sector-count {
  font-size: 11px;
  color: var(--muted);
}

.sector-unusual-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--pink);
  background: rgba(247, 37, 133, 0.12);
  padding: 2px 7px;
  border-radius: 10px;
}

.sector-chevron {
  color: var(--muted);
  font-size: 10px;
  transition: transform 0.2s;
  transform: rotate(0deg);
}

.sector-card.collapsed .sector-chevron {
  transform: rotate(-90deg);
}

.sector-card.collapsed .sector-body {
  display: none;
}

/* Collapsed header stays fully visible */
.sector-card.collapsed .sector-header {
  border-bottom: none;
}

/* Stock Table inside Sector Card */
.sector-body {
  border-top: 1px solid var(--border);
}

.activity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.activity-table thead th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.activity-table thead th:hover {
  color: var(--text2);
}

.activity-table thead th.sort-active {
  color: var(--accent);
}

.activity-table tbody tr {
  cursor: pointer;
  transition: background 0.12s;
}

.activity-table tbody tr:hover {
  background: var(--surface2);
}

.activity-table tbody td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

/* Right-align numeric columns */
.activity-table td:nth-child(n+2),
.activity-table th:nth-child(n+2) {
  text-align: right;
}

/* Ticker cell */
.activity-table .stock-ticker {
  font-weight: 600;
  color: var(--text);
}

.activity-table .stock-name {
  font-size: 10px;
  color: var(--muted);
  margin-left: 6px;
}

/* Highlighted unusual row */
.activity-table tbody tr.unusual-row {
  background: rgba(247, 37, 133, 0.06);
}

.activity-table tbody tr.unusual-row:hover {
  background: rgba(247, 37, 133, 0.12);
}

.unusual-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pink);
  margin-right: 4px;
  vertical-align: middle;
}

/* IV color coding */
.iv-high { color: var(--red2); }
.iv-medium { color: var(--yellow); }
.iv-low { color: var(--green2); }

/* P/C Ratio coloring */
.pcr-bearish { color: var(--red2); }
.pcr-bullish { color: var(--green); }
.pcr-neutral { color: var(--text2); }

/* Empty state */
.activity-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 13px;
}

/* Loading state */
.activity-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.activity-loading .spinner {
  width: 24px;
  height: 24px;
}
