.sm-page { padding-bottom: 40px; }
.sm-views {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}
.sm-view {
  padding: 8px 4px;
  margin-bottom: -1px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: #6b7280;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.sm-view.is-active {
  color: #111827;
  border-bottom-color: #111827;
}
.sm-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.sm-tab {
  flex: 1;
  max-width: 180px;
  padding: 10px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.sm-tab.is-active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}
.sm-today {
  background: #fff;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.sm-today-label {
  font-size: 12px;
  font-weight: 600;
  color: #4f46e5;
  margin-bottom: 4px;
}
.sm-today-name {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}
.sm-today-sector {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sm-today-dir {
  font-size: 13px;
  font-weight: 700;
}
.sm-today-dir.in { color: #c62828; }
.sm-today-dir.out { color: #2e7d32; }
.sm-list {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
.sm-list-row {
  display: grid;
  grid-template-columns: 7.2em minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
}
.sm-list-row:last-child { border-bottom: none; }
.sm-date {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}
.sm-meta { font-size: 12px; font-weight: 400; color: #6b7280; }
.sm-chips-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.sm-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  flex: 1;
  flex-wrap: nowrap;
}
.sm-chip {
  flex-shrink: 0;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}
.sm-chip.in { color: #c62828; background: #fef2f2; border-color: #fecaca; }
.sm-chip.out { color: #2e7d32; background: #f0fdf4; border-color: #bbf7d0; }
.sm-more-link {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #4f46e5;
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 2px;
}
.sm-more-link:hover { text-decoration: underline; }
.empty-state { padding: 32px; text-align: center; color: #6b7280; }
.sm-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.sm-modal[hidden] { display: none; }
.sm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
}
.sm-modal-box {
  position: relative;
  width: min(720px, 100%);
  max-height: min(80vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}
.sm-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  background: #fff;
}
.sm-modal-head h3 { margin: 0; font-size: 16px; }
.sm-modal-close {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
}
.sm-modal-body { padding: 16px; }
.sm-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.sm-col-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f3f4f6;
}
.sm-col-title.in { color: #c62828; }
.sm-col-title.out { color: #2e7d32; }
.sm-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid #f9fafb;
}
.sm-detail-row.in .sm-amt { color: #c62828; font-weight: 600; }
.sm-detail-row.out .sm-amt { color: #2e7d32; font-weight: 600; }
.sm-empty { color: #9ca3af; font-size: 13px; padding: 8px 0; }
.sm-bt-note { font-size: 13px; color: #6b7280; margin: 0 0 14px; line-height: 1.5; }
.sm-bt-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.sm-bt-card {
  position: relative;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
}
.sm-bt-card.is-best {
  border-color: #4f46e5;
  box-shadow: 0 0 0 1px #4f46e5;
}
.sm-bt-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #4f46e5;
  padding: 2px 8px;
  border-radius: 999px;
}
.sm-bt-name { font-size: 14px; font-weight: 600; color: #111827; margin-bottom: 10px; }
.sm-bt-score {
  font-size: 26px;
  font-weight: 700;
  color: #4f46e5;
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}
.sm-bt-score span { font-size: 12px; font-weight: 400; color: #6b7280; }
.sm-bt-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 8px;
}
.sm-bt-metrics div { display: flex; flex-direction: column; }
.sm-bt-metrics b { font-size: 15px; color: #111827; }
.sm-bt-metrics span { font-size: 11px; color: #9ca3af; }
.sm-bt-detail {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.sm-bt-detail-title { font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 8px; }
.sm-bt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sm-bt-table th {
  text-align: left;
  color: #6b7280;
  font-weight: 600;
  padding: 6px 8px;
  border-bottom: 1px solid #e5e7eb;
}
.sm-bt-table td { padding: 6px 8px; border-bottom: 1px solid #f3f4f6; color: #111827; }
.sm-bt-table td.sm-hit { color: #c62828; font-weight: 600; }
@media (max-width: 900px) {
  .sm-chip:nth-child(n+5) { display: none; }
}
@media (max-width: 640px) {
  .sm-tab { max-width: none; }
  .sm-list-row { grid-template-columns: 5.6em minmax(0, 1fr); padding: 10px 12px; }
  .sm-chip:nth-child(n+3) { display: none; }
  .sm-cols { grid-template-columns: 1fr; }
  .sm-bt-cards { grid-template-columns: 1fr; }
}
