/* =============================================
   HOPE Dashboard — TradingView-inspired dark theme
   Mobile-first, 모바일 전용 설계
   ============================================= */

:root {
  --bg-primary: #131722;
  --bg-secondary: #1e222d;
  --bg-tertiary: #2a2e39;
  --bg-card: #1e222d;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text-primary: #d1d4dc;
  --text-secondary: #787b86;
  --text-muted: #555;
  --green: #26a69a;
  --green-bg: rgba(38,166,154,0.12);
  --red: #ef5350;
  --red-bg: rgba(239,83,80,0.12);
  --blue: #2196f3;
  --blue-bg: rgba(33,150,243,0.12);
  --amber: #ffb74d;
  --amber-bg: rgba(255,183,77,0.12);
  --neon-green: #00e676;
  --hot-pink: #ff5282;
  --radius: 8px;
  --radius-lg: 12px;
  --font: -apple-system, BlinkMacSystemFont, 'Trebuchet MS', 'Segoe UI', Roboto, sans-serif;
  --mono: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: var(--font);
  font-size: 14px;
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100dvh;
}

/* ── 앱 구조 ── */
body {
  padding-bottom: calc(56px + var(--safe-bottom));
}

/* ── 풀투리프레시 ── */
.ptr-indicator {
  position: fixed;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: top 0.2s, opacity 0.2s;
  opacity: 0;
}
.ptr-indicator.pulling {
  opacity: 1;
}
.ptr-indicator.refreshing {
  top: 12px;
  opacity: 1;
}
.ptr-indicator svg {
  width: 16px; height: 16px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 2;
  transition: transform 0.15s;
}
.ptr-indicator.refreshing svg {
  animation: spin 0.8s linear infinite;
}

/* ── 헤더 (sticky) ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(19,23,34,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.header-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px currentColor; }
  50% { opacity: 0.6; box-shadow: 0 0 12px currentColor; }
}
.header-dot.warn { background: var(--amber); color: var(--amber); box-shadow: 0 0 6px var(--amber); }
.header-dot.risk { background: var(--red); color: var(--red); box-shadow: 0 0 6px var(--red); animation-name: pulse-dot-fast; }
@keyframes pulse-dot-fast {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px currentColor; }
  50% { opacity: 0.4; box-shadow: 0 0 16px currentColor; }
}
.header-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
}
.header-refresh {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
}
.header-refresh:active { background: var(--bg-tertiary); transform: scale(0.95); }
.header-refresh.spinning svg { animation: spin 0.6s linear; }

/* ── 바텀 네비게이션 ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(19,23,34,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 4px 8px calc(4px + var(--safe-bottom)) 8px;
}
.nav-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 6px 4px 4px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
}
.nav-btn .nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-btn .nav-icon svg {
  width: 20px; height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-btn.active {
  color: var(--blue);
  background: var(--blue-bg);
}
.nav-btn.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: var(--blue);
  border-radius: 0 0 2px 2px;
}
.nav-btn:active { transform: scale(0.92); }

/* ── 경고 배너 ── */
.alert-banner {
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: slideDown 0.2s ease-out;
}
.alert-banner svg.alert-icon {
  width: 14px; height: 14px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; } }
.alert-banner.error { background: var(--red-bg); color: var(--red); border-bottom: 1px solid rgba(239,83,80,0.15); }
.alert-banner.warn { background: var(--amber-bg); color: var(--amber); border-bottom: 1px solid rgba(255,183,77,0.15); }
.alert-banner.muted { background: var(--bg-secondary); color: var(--text-secondary); border-bottom: 1px solid var(--border); }

/* ── 페이지 컨테이너 ── */
.page-container {
  position: relative;
  touch-action: pan-y;
}
.page {
  display: none;
  padding: 12px 14px;
  animation: fadeUp 0.2s ease-out;
}
.page.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── 섹션 ── */
.section {
  margin-bottom: 16px;
}
.section-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

/* ── KPI 그리드 ── */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  transition: border-color 0.15s;
  position: relative;
  overflow: hidden;
}
.kpi-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.2s;
}
.kpi-card.glow-up::after { background: linear-gradient(90deg, transparent, var(--red), transparent); }
.kpi-card.glow-down::after { background: linear-gradient(90deg, transparent, var(--blue), transparent); }
.kpi-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.kpi-value {
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}
.kpi-value.positive { color: var(--red); }
.kpi-value.negative { color: var(--blue); }
.kpi-sub {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.kpi-trend {
  font-size: 0.65rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}
.kpi-trend.up { color: var(--red); }
.kpi-trend.down { color: var(--blue); }
.kpi-trend svg {
  width: 10px; height: 10px;
  fill: currentColor;
  stroke: none;
}

/* ── 상태 라인 ── */
.status-line {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  padding: 6px 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  transition: all 0.15s;
}
.status-pill .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  display: inline-block;
}
.status-pill .dot.green { background: var(--green); box-shadow: 0 0 4px var(--green); }
.status-pill .dot.red { background: var(--red); box-shadow: 0 0 4px var(--red); }
.status-pill .dot.gray { background: #555; }
.status-pill.ok { color: var(--green); }
.status-pill.warn { color: var(--amber); }
.status-pill.risk { color: var(--red); }

/* 시장 레짐 색상 (5단계) */
.status-pill.regime-trend, .regime-label.regime-trend { color: var(--neon-green); }
.status-pill.regime-wtrend, .regime-label.regime-wtrend { color: var(--green); }
.status-pill.regime-range, .regime-label.regime-range { color: var(--amber); }
.status-pill.regime-wbear, .regime-label.regime-wbear { color: var(--hot-pink); }
.status-pill.regime-bear, .regime-label.regime-bear { color: var(--red); }
.regime-label { font-weight: 600; }

/* ── 포지션 카드 (Watchlist 스타일) ── */
.pos-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.pos-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-card);
  transition: background 0.1s;
}
.pos-item:active { background: var(--bg-tertiary); }
.pos-left {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pos-name {
  font-weight: 700;
  font-size: 0.88rem;
}
.pos-detail {
  font-size: 0.72rem;
  color: var(--text-secondary);
}
.pos-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

/* ── 전략 뱃지 ── */
.strat-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 4px;
}
.strat-breakout { background: var(--amber-bg); color: var(--amber); }
.strat-pullback { background: var(--green-bg); color: var(--neon-green); }
.strat-inverse { background: var(--red-bg); color: var(--hot-pink); }

/* ── 거래 리스트 ── */
.trade-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.trade-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: var(--bg-card);
  transition: background 0.1s;
  cursor: pointer;
}
.trade-item:active { background: var(--bg-tertiary); }
.trade-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.trade-sym {
  font-weight: 600;
  font-size: 0.85rem;
}
.trade-meta {
  font-size: 0.68rem;
  color: var(--text-secondary);
}
.trade-pnl {
  font-weight: 700;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.trade-pnl.positive { color: var(--red); }
.trade-pnl.negative { color: var(--blue); }

/* ── 체결 결과 (누적 손익) ── */
.trade-reason {
  font-size: 0.78rem;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 500;
}
.trade-pnl-col {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 60px;
}
.trade-pnl-col .trade-pnl {
  font-size: 0.82rem;
}
.trade-cum {
  font-size: 0.62rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  opacity: 0.7;
}
.trade-cum.positive { color: var(--red); opacity: 0.8; }
.trade-cum.negative { color: var(--blue); opacity: 0.8; }

/* ── 거래 상세 모달 (슬라이드업) ── */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 200;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.modal-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 201;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  padding: 0 16px calc(16px + var(--safe-bottom));
  max-height: 70vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1);
  -webkit-overflow-scrolling: touch;
}
.modal-overlay.show + .modal-sheet,
.modal-sheet.show {
  transform: translateY(0);
}
.modal-handle {
  width: 32px; height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  margin: 8px auto 12px;
}
.modal-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}
.modal-stat {
  background: var(--bg-primary);
  border-radius: 6px;
  padding: 8px 10px;
}
.modal-stat-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.modal-stat-value {
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ── 진입 파이프라인 ── */
.pipe-summary {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.pipe-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  margin: 14px 0 6px;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}
.pipe-section-title.shared { background: rgba(33,150,243,0.12); color: var(--blue); }
.pipe-section-title.breakout { background: rgba(255,183,77,0.12); color: var(--amber); }
.pipe-section-title.pullback { background: rgba(38,166,154,0.12); color: var(--green); }
.pipe-section-title.inverse { background: var(--red-bg); color: var(--hot-pink); }
.pipe-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 5px;
  gap: 8px;
}
.pipe-id {
  flex: 0 0 26px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: right;
  padding-top: 1px;
  font-variant-numeric: tabular-nums;
}
.pipe-body {
  flex: 1;
  min-width: 0;
}
.pipe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}
.pipe-name {
  font-size: 0.74rem;
  color: var(--text-primary);
}
.pipe-count {
  font-size: 0.68rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}
.pipe-count.blocked { color: var(--hot-pink); }
.pipe-count.passed { color: var(--neon-green); }
.pipe-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--bg-tertiary);
  overflow: hidden;
}
.pipe-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.22,1,0.36,1);
}
.pipe-fill.high { background: linear-gradient(90deg, var(--hot-pink), #ff7eb3); }
.pipe-fill.mid { background: linear-gradient(90deg, var(--amber), #ffd54f); }
.pipe-fill.low { background: linear-gradient(90deg, var(--green), #69f0ae); }
.pipe-fill.pass { background: linear-gradient(90deg, rgba(38,166,154,0.2), rgba(38,166,154,0.08)); }
.pipe-desc {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 1px;
}
.pipe-result {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed var(--border);
}
.pipe-result .pipe-id { color: var(--neon-green); }

/* ── 차트 컨테이너 ── */
.chart-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  margin-bottom: 12px;
  position: relative;
}
.chart-wrap canvas {
  width: 100% !important;
  max-height: 220px;
}
.chart-crosshair-label {
  position: absolute;
  top: 6px; right: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  pointer-events: none;
  transition: color 0.1s;
}
.chart-crosshair-label.positive { color: var(--red); }
.chart-crosshair-label.negative { color: var(--blue); }

/* ── 성과 요약 카드 ── */
.perf-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}
.perf-row:last-child { border-bottom: none; }
.perf-label { color: var(--text-secondary); font-weight: 500; }
.perf-value { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── 로그 뷰어 ── */
.log-viewer {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  max-height: 400px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--text-secondary);
  -webkit-overflow-scrolling: touch;
}
.log-line {
  border-bottom: 1px solid var(--border);
  padding: 3px 0;
  word-break: break-all;
}
.log-line:last-child { border-bottom: none; }

/* ── Expander ── */
.expander {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}
.expander-header {
  padding: 10px 12px;
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.1s;
}
.expander-header:active { background: var(--bg-tertiary); }
.expander-arrow {
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1);
  font-size: 0.7rem;
  color: var(--text-secondary);
}
.expander.open .expander-arrow { transform: rotate(90deg); }
.expander-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.22,1,0.36,1);
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
}
.expander.open .expander-body {
  max-height: 500px;
}
.expander-body-inner {
  padding: 10px 12px;
}

/* ── 탭 전환 (운영/분석 서브) ── */
.tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 3px;
}
.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.tab-btn.active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.tab-btn:active { transform: scale(0.97); }

/* ── 스켈레톤 로딩 ── */
.skeleton {
  background: var(--bg-tertiary);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.skeleton::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; right: -100%; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  animation: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.skeleton-kpi {
  height: 66px;
  border-radius: var(--radius);
}
.skeleton-row {
  height: 44px;
  border-radius: var(--radius);
  margin-bottom: 2px;
}
.skeleton-chart {
  height: 180px;
  border-radius: var(--radius);
}

/* ── 로딩 스피너 ── */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top: 2px solid var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 반응형 ── */
@media (min-width: 640px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .page { padding: 16px 24px; }
}

/* ── empty state ── */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.empty-state svg {
  width: 48px; height: 48px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 1.2;
  margin-bottom: 8px;
  opacity: 0.5;
}
.empty-state p {
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ── 연결 끊김 오버레이 ── */
.offline-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--red-bg);
  color: var(--red);
  text-align: center;
  padding: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  animation: slideDown 0.2s ease-out;
  display: none;
}
.offline-bar.show { display: block; }

/* ── 유니버스 테이블 ── */
.univ-summary {
  color: var(--text-secondary);
  font-size: 12px;
  margin-bottom: 10px;
  padding: 6px 10px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
}
.univ-table { display: flex; flex-direction: column; gap: 1px; }
.univ-header {
  display: none; /* 모바일에서 숨김 — 카드형 레이아웃 */
}
.univ-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  padding: 8px 10px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border-left: 3px solid transparent;
  margin-bottom: 2px;
}
.univ-row.traded {
  border-left-color: var(--neon-green);
}
.univ-col-rank {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text-secondary);
  text-align: center;
}
.univ-col-sym {
  grid-column: 2;
  grid-row: 1;
}
.univ-name {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}
.univ-meta {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 1px;
}
.univ-col-s2 {
  grid-column: 3;
  grid-row: 1;
  text-align: right;
  min-width: 48px;
}
.univ-s2-val {
  font-size: 14px;
  font-family: var(--mono);
  font-weight: 600;
}
.univ-s2-bar {
  height: 3px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  margin-top: 3px;
  overflow: hidden;
}
.univ-s2-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s;
}
.univ-col-detail {
  grid-column: 2;
  grid-row: 2;
  font-size: 10px;
  font-family: var(--mono);
  color: var(--text-secondary);
}
.univ-col-result {
  grid-column: 3;
  grid-row: 2;
  font-size: 11px;
  text-align: right;
  color: var(--text-secondary);
}
.univ-fold-toggle {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 10px 10px;
  text-align: center;
  cursor: pointer;
  border-top: 1px solid var(--border);
  margin-top: 6px;
}
.univ-fold-toggle:active { opacity: 0.7; }
.univ-fold-arrow {
  display: inline-block;
  font-size: 10px;
  transition: transform 0.2s;
  margin-left: 4px;
}
.univ-fold-toggle.open .univ-fold-arrow { transform: rotate(180deg); }
.univ-fold-body {
  display: none;
  margin-top: 2px;
}
.univ-fold-body.show { display: block; }

/* ── 전략 미활동 표시 ── */
.strat-inactive {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding: 8px 10px;
}
.strat-inactive-item {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── 스크롤바 ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 2px; }
