* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #0f172a; color: #e2e8f0; line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }
header { text-align: center; margin-bottom: 30px; padding: 20px; }
header h1 { font-size: 2em; margin-bottom: 5px; }
header h1 a { color: #e2e8f0; text-decoration: none; }
header .meta { color: #94a3b8; font-size: 0.9em; }
header .meta a { color: #60a5fa; }
.summary-bar { text-align: center; padding: 8px; background: #1e293b; border-radius: 8px; margin-bottom: 20px; color: #94a3b8; font-size: 0.85em; }

.category-card { background: #1e293b; border-radius: 12px; padding: 20px; margin-bottom: 20px; border-left: 4px solid #334155; }
.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.card-header .icon { font-size: 1.8em; }
.card-header h2 { flex: 1; font-size: 1.3em; }
.card-header h2 a { color: #e2e8f0; text-decoration: none; }
.card-header .date { color: #64748b; font-size: 0.85em; }

.results-table { width: 100%; border-collapse: collapse; font-size: 0.9em; }
.results-table th { text-align: left; padding: 8px; border-bottom: 1px solid #334155; color: #94a3b8; font-weight: 500; }
.results-table td { padding: 8px; border-bottom: 1px solid #1e293b; vertical-align: top; }
.results-table .name { font-weight: 600; }
.results-table .name small { color: #64748b; font-weight: 400; }
.results-table .thesis { color: #94a3b8; font-size: 0.85em; max-width: 400px; }
.results-table .buy { color: #22c55e; font-weight: 600; }
.results-table .sell { color: #f97316; font-weight: 600; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 6px; color: white; font-weight: 600; font-size: 0.85em; }
.badge.large { padding: 5px 14px; font-size: 1em; }

.card-footer { margin-top: 10px; display: flex; gap: 15px; }
.signal { font-weight: 600; font-size: 0.9em; }
.signal.buy { color: #22c55e; }
.signal.hold { color: #eab308; }
.signal.sell { color: #f97316; }

.detail-date { text-align: center; padding: 10px; background: #334155; border-radius: 8px; margin-bottom: 20px; }
.detail-card { background: #1e293b; border-radius: 12px; padding: 20px; margin-bottom: 15px; border: 1px solid #334155; }
.detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.detail-header h3 { font-size: 1.1em; }
.detail-section { margin: 12px 0; }
.detail-section h4 { color: #60a5fa; margin-bottom: 5px; font-size: 0.95em; }
.detail-meta { text-align: right; color: #64748b; font-size: 0.8em; margin-top: 8px; }
.thesis-text { white-space: pre-wrap; font-size: 0.9em; color: #cbd5e1; }
.report-text { white-space: pre-wrap; font-size: 0.85em; color: #94a3b8; max-height: 300px; overflow-y: auto; }

details { margin: 8px 0; }
details summary { cursor: pointer; padding: 8px; background: #0f172a; border-radius: 6px; font-size: 0.9em; color: #60a5fa; }
details[open] summary { border-radius: 6px 6px 0 0; }

.history { margin-top: 30px; }
.history h2 { margin-bottom: 10px; color: #60a5fa; }

.empty { text-align: center; padding: 30px; color: #64748b; }
.empty a { color: #60a5fa; }
.error { text-align: center; padding: 20px; color: #f87171; }

.btn { display: inline-block; padding: 8px 16px; background: #2563eb; color: white; border-radius: 8px; text-decoration: none; font-weight: 500; margin: 5px; }
.btn:hover { background: #1d4ed8; }

footer { text-align: center; margin-top: 30px; padding: 20px; color: #475569; font-size: 0.85em; }
footer p { margin-top: 8px; }

@media (max-width: 768px) {
  .container { padding: 10px; }
  .results-table { font-size: 0.8em; }
  .results-table .thesis { display: none; }
}

/* Category tabs navigation */
.cat-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #334155;
}
.cat-tabs .tab {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
  background: #1e293b;
  color: #94a3b8;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9em;
  transition: background 0.15s, color 0.15s;
}
.cat-tabs .tab + .tab {
  border-left: 1px solid #334155;
}
.cat-tabs .tab:hover {
  background: #334155;
  color: #e2e8f0;
}
.cat-tabs .tab.active {
  background: #2563eb;
  color: white;
}

/* Detail button in card header */
.btn-detail {
  padding: 4px 14px;
  background: #334155;
  color: #94a3b8;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.8em;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.btn-detail:hover {
  background: #2563eb;
  color: white;
}
