* { box-sizing: border-box; }
body {
  font-family: -apple-system, Segoe UI, Roboto, sans-serif;
  background: #0f1115;
  color: #e6e6e6;
  margin: 0;
  padding: 0 1rem 3rem;
}
header { padding: 1.5rem 0; display: flex; align-items: center; justify-content: space-between; }
h1 { margin: 0; font-size: 1.4rem; }
nav a {
  color: #93c5fd;
  text-decoration: none;
  border: 1px solid #2a2e38;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
}
nav a:hover { background: #1a1d24; }

.long-cell { color: #4ade80; font-weight: 600; }
.short-cell { color: #f87171; font-weight: 600; }
.sl-line { color: #9aa0aa; font-size: 0.8rem; margin-top: 0.1rem; }

.trend-bullish { color: #4ade80; font-weight: 700; }
.trend-bearish { color: #f87171; font-weight: 700; }
.trend-consolidating { color: #facc15; font-weight: 700; }

details.panel summary {
  list-style: none;
}
details.panel summary::-webkit-details-marker { display: none; }
details.panel summary::before {
  content: "▶ ";
  color: #9aa0aa;
  font-size: 0.8rem;
}
details.panel[open] summary::before {
  content: "▼ ";
}

.rsi-overbought { color: #f87171; font-weight: 700; }
.rsi-oversold { color: #4ade80; font-weight: 700; }

.score-badge.score-normal {
  background: #2a2e38;
  color: #d1d5db;
  font-size: 0.85rem;
  padding: 0.15rem 0.5rem;
}
.score-badge.score-high {
  background: #7c2d12;
  color: #fdba74;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  box-shadow: 0 0 8px rgba(253, 186, 116, 0.35);
}
.score-badge.score-extreme {
  background: #7f1d1d;
  color: #fecaca;
  font-size: 1.4rem;
  font-weight: 800;
  padding: 0.25rem 0.8rem;
  box-shadow: 0 0 14px rgba(248, 113, 113, 0.6);
  animation: pulse-score 1.6s infinite;
}
@keyframes pulse-score {
  0%, 100% { box-shadow: 0 0 14px rgba(248, 113, 113, 0.6); }
  50% { box-shadow: 0 0 22px rgba(248, 113, 113, 0.9); }
}
.score-badge {
  display: inline-block;
  background: #2a2e38;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.8rem;
}
.dropzone {
  border: 2px dashed #2a2e38;
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  color: #9aa0aa;
  cursor: pointer;
}
.dropzone.dragover { border-color: #3b82f6; color: #e6e6e6; }
.file-list { font-size: 0.85rem; color: #9aa0aa; margin-top: 0.5rem; }
.strategy-tag {
  display: inline-block;
  background: #0f1115;
  border: 1px solid #2a2e38;
  border-radius: 6px;
  padding: 0.1rem 0.4rem;
  margin: 0.1rem;
  font-size: 0.75rem;
}

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-panel { width: 100%; max-width: 360px; }
.login-panel form { flex-direction: column; }
.login-panel input { flex-basis: 100%; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: #1a1d24;
  border: 1px solid #2a2e38;
  border-radius: 10px;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.stat-card span { font-size: 0.75rem; color: #9aa0aa; }
.stat-card strong { font-size: 1.3rem; }

.panel {
  background: #1a1d24;
  border: 1px solid #2a2e38;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}
.panel h2 { margin-top: 0; font-size: 1.05rem; }

form { display: flex; flex-wrap: wrap; gap: 0.5rem; }
form input, form select, form textarea {
  background: #0f1115;
  border: 1px solid #2a2e38;
  color: #e6e6e6;
  padding: 0.5rem;
  border-radius: 6px;
  flex: 1 1 160px;
}
form textarea { flex-basis: 100%; min-height: 60px; }
button {
  background: #3b82f6;
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}
button:hover { background: #2563eb; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.5rem; border-bottom: 1px solid #2a2e38; }
th { color: #9aa0aa; font-weight: 500; }
th.sortable:hover { color: #e6e6e6; }
.sort-arrow { font-size: 0.7rem; color: #3b82f6; }

.error { color: #f87171; }
