/* =====================================================================
   Stock Portal UI Kit — visual layer.
   Uses tokens from ../../colors_and_type.css.
   All class names are prefixed `sp-` to avoid collisions.
   ===================================================================== */

@import url('./colors_and_type.css');

/* Material Symbols (Google Fonts ships only @font-face; rules below are required) */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  user-select: none;
}

html, body { height: 100%; }
body { background: var(--bg-page); }

a { color: var(--link-2); }
button { font-family: inherit; }

/* ---------------- Shell ---------------- */
.sp-shell { display: flex; min-height: 100vh; }
.sp-main  { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sp-content {
  flex: 1; padding: 24px 28px 48px;
  max-width: 1320px; width: 100%;
}

/* sidebar */
.sp-aside {
  width: 232px; flex-shrink: 0;
  background: var(--surface-1);
  border-right: 1px solid var(--line-1);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sp-brand { padding: 20px 22px 14px; border-bottom: 1px solid var(--line-1); }
.sp-brand h1 {
  font-size: 16px; font-weight: 800; letter-spacing: -0.025em;
  color: var(--up-1); display: flex; align-items: center; gap: 7px;
}
.sp-brand span {
  display: block; margin-top: 2px;
  font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-4); font-weight: 700;
}
.sp-nav { padding: 8px 0; flex: 1; overflow-y: auto; }
.sp-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 22px;
  font-size: 13px; font-weight: 500; color: var(--ink-3);
  text-decoration: none; cursor: pointer;
  border-left: 2px solid transparent;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.sp-nav-item:hover { background: var(--surface-2); color: var(--ink-1); }
.sp-nav-item.is-active {
  background: var(--up-tint);
  color: var(--up-1);
  border-left-color: var(--up-1);
  font-weight: 600;
}
.sp-nav-divider { height: 1px; background: var(--line-1); margin: 8px 16px; }

/* 사이드바: 버튼 형태 네비 행(링크와 동일 레이아웃) */
button.sp-nav-item {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}
/* TOP500 팝업: 모바일 가로 스크롤 */
.universe-top500-scroll {
  max-width: 100%;
  scrollbar-width: thin;
  scrollbar-color: #98a2b3 #f1f4f8;
}
.universe-top500-scroll::-webkit-scrollbar {
  height: 6px;
}
.universe-top500-scroll::-webkit-scrollbar-thumb {
  background: #c5cdd8;
  border-radius: 999px;
}
.universe-top500-table th,
.universe-top500-table td {
  vertical-align: middle;
}

/* TOP500: 가로 margin + width 100% 동시 적용 시 우측 잘림 방지 */
button.sp-nav-item.sp-nav-item--top500 {
  width: calc(100% - 28px);
  margin: 6px 14px 10px;
}
/* TOP500 등: 기존 상단 보조 버튼과 동일 톤 */
.sp-nav-item--top500 {
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--up-line) !important;
  border-left: 1px solid var(--up-line) !important;
  background: var(--up-tint) !important;
  color: var(--up-1) !important;
  font-weight: 600;
}
.sp-nav-item--top500:hover {
  background: color-mix(in srgb, var(--up-tint) 85%, var(--up-1) 15%) !important;
  color: var(--up-1) !important;
}

.sp-aside-foot {
  padding: 12px 16px; border-top: 1px solid var(--line-1);
  display: flex; align-items: center; gap: 8px;
}
.sp-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.sp-avatar {
  width: 32px; height: 32px; border-radius: 999px;
  background: var(--up-1); color: #fff;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
}
.sp-user-name { font-size: 13px; font-weight: 600; color: var(--ink-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-user-meta { font-size: 10.5px; color: var(--ink-4); font-family: var(--font-mono); }

.sp-icon-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-1);
  background: var(--surface-1); color: var(--ink-3); cursor: pointer;
  display: grid; place-items: center;
}
.sp-icon-btn:hover { color: var(--ink-1); border-color: var(--line-3); }

/* top bar */
.sp-top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 28px; height: 56px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line-1);
}
[data-theme="dark"] .sp-top { background: rgba(22, 25, 34, 0.86); }
.sp-top-title { display: flex; align-items: baseline; gap: 10px; }
.sp-top-title h2 { font-size: 15px; font-weight: 700; color: var(--ink-1); margin: 0; }
.sp-top-sub { font-size: 12px; color: var(--ink-4); }
.sp-top-right { display: flex; align-items: center; gap: 8px; }

/* ---------------- Page wrapper ---------------- */
.sp-page { display: flex; flex-direction: column; gap: 16px; }
.sp-page-narrow { max-width: 880px; margin: 0 auto; width: 100%; }

/* ---------------- Card ---------------- */
.sp-card {
  background: var(--surface-1);
  border: 1px solid var(--line-1);
  border-radius: 12px;
  padding: 22px;
}
.sp-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 14px;
}
.sp-card-head h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink-1); }
.sp-card-hint { margin: 4px 0 0; font-size: 12px; color: var(--ink-4); line-height: 1.5; }

.sp-divider { height: 1px; background: var(--line-1); }
.sp-eyebrow {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--ink-4);
}
.sp-mute { color: var(--ink-4); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------------- Buttons ---------------- */
.sp-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer;
  line-height: 1; transition: all var(--dur-base) var(--ease-out);
  white-space: nowrap;
}
.sp-btn-sm { height: 30px; padding: 0 11px; font-size: 12px; border-radius: 7px; }
.sp-btn-lg { height: 44px; padding: 0 18px; font-size: 14px; border-radius: 10px; }
.sp-btn-primary { background: var(--up-2); color: #fff; border-color: var(--up-2); }
.sp-btn-primary:hover { background: var(--up-1); border-color: var(--up-1); }
.sp-btn-secondary { background: var(--surface-1); color: var(--ink-2); border-color: var(--line-2); }
.sp-btn-secondary:hover { background: var(--surface-2); border-color: var(--line-3); color: var(--ink-1); }
.sp-btn-danger { background: var(--surface-1); color: var(--down-1); border-color: var(--down-line); }
.sp-btn-danger:hover { background: var(--down-tint); border-color: var(--down-2); }
.sp-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------------- Inputs ---------------- */
.sp-input {
  width: 100%;
  height: 38px;
  background: var(--surface-1);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 0 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.sp-input:hover { border-color: var(--line-3); }
.sp-input:focus { border-color: var(--link-2); box-shadow: 0 0 0 3px var(--focus-ring); }
.sp-input::placeholder { color: var(--ink-5); }
.sp-input-lg { height: 44px; font-size: 14px; font-weight: 600; letter-spacing: 0.08em; }
.sp-input-sm { height: 32px; font-size: 12px; }
.sp-input.num { text-align: right; }

.sp-field { display: flex; flex-direction: column; gap: 5px; }
.sp-field label { font-size: 11px; font-weight: 600; color: var(--ink-3); }

.sp-search-row { display: flex; gap: 8px; align-items: stretch; }
.sp-search-row .sp-input { flex: 1; }

.sp-hint { margin: 10px 0 0; font-size: 12px; color: var(--ink-4); }
.sp-quick-links { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-4); }
.sp-quick-links a { color: var(--link-2); font-weight: 600; border-bottom: 1px dashed var(--link-line); }
.sp-sep { color: var(--ink-5); }

/* ---------------- Loading ---------------- */
.sp-loading { display: flex; gap: 14px; padding: 6px 0; }
.sp-spinner {
  width: 22px; height: 22px;
  border: 2px solid var(--line-1);
  border-top-color: var(--up-2);
  border-radius: 50%;
  animation: sp-spin .7s linear infinite;
  flex-shrink: 0; margin-top: 2px;
}
@keyframes sp-spin { to { transform: rotate(360deg); } }
.sp-loading-title { font-size: 13px; font-weight: 600; color: var(--ink-1); margin-bottom: 4px; }
.sp-loading-detail { font-size: 12px; color: var(--ink-4); line-height: 1.55; max-width: 44ch; }
.sp-loading-elapsed { margin-top: 6px; font-size: 12px; color: var(--up-1); font-family: var(--font-mono); }

/* ---------------- Snapshot ---------------- */
.sp-snap {
  display: flex; flex-wrap: wrap; gap: 18px;
  align-items: center; justify-content: space-between;
}
.sp-snap-lead { display: flex; flex-direction: column; gap: 10px; }
.sp-snap-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sp-snap-title h2 {
  font-size: 22px; font-weight: 800;
  color: var(--ink-1); letter-spacing: -0.02em; margin: 0;
}
.sp-snap-code { font-family: var(--font-mono); font-size: 13px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.sp-snap-row { display: flex; gap: 24px; align-items: flex-end; }
.sp-snap-price { display: flex; flex-direction: column; gap: 4px; }
.sp-snap-price strong {
  font-size: 32px; font-weight: 800; letter-spacing: -0.025em; color: var(--ink-1);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.sp-snap-change { display: flex; flex-direction: column; gap: 4px; padding-bottom: 2px; }
.sp-snap-change strong {
  font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.sp-snap-change .up { color: var(--up-1); }
.sp-snap-change .down { color: var(--down-1); }
.sp-snap-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ---------------- Chips ---------------- */
.sp-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  border: 1px solid transparent;
  font-variant-numeric: tabular-nums;
}
.sp-chip-up    { background: var(--up-tint);    border-color: var(--up-line);    color: var(--up-1); }
.sp-chip-down  { background: var(--down-tint);  border-color: var(--down-line);  color: var(--down-1); }
.sp-chip-link  { background: var(--link-tint);  border-color: var(--link-line);  color: var(--link-1); }
.sp-chip-warn  { background: #fef3e6; border-color: #fad8a3; color: var(--warn-1); }
.sp-chip-mute  { background: var(--surface-3); border-color: var(--line-1); color: var(--ink-3); font-weight: 500; }

.sp-tag {
  display: inline-flex; align-items: center;
  padding: 2px 7px; border-radius: 4px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
}
.sp-tag-link { background: var(--link-tint); color: var(--link-1); }
.sp-tag-up   { background: var(--up-tint);   color: var(--up-1); }
.sp-tag-down { background: var(--down-tint); color: var(--down-1); }

/* ---------------- Section title (inside cards) ---------------- */
.sp-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-3); margin: 0 0 4px;
}
.sp-section-hint { font-size: 12px; color: var(--ink-4); margin: 0 0 12px; line-height: 1.55; }
.sp-section-hint code.mono { background: var(--surface-3); padding: 1px 5px; border-radius: 4px; font-size: 11px; color: var(--ink-2); }

/* ---------------- AI summary box ---------------- */
.sp-ai-summary {
  background: linear-gradient(180deg, var(--up-tint) 0%, var(--surface-1) 80%);
  border: 1px solid var(--up-line);
  border-radius: 10px;
  padding: 14px 16px;
}
.sp-ai-summary p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.8; color: var(--ink-2); word-break: keep-all; }
.sp-ai-summary p:last-of-type { margin-bottom: 0; }
.sp-ai-meta {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--up-line);
  display: flex; gap: 10px; align-items: center;
  font-size: 11px; color: var(--ink-4);
}
.sp-ai-meta span:last-child { margin-left: auto; }

/* ---------------- Insight cards ---------------- */
.sp-insight-stack { display: flex; flex-direction: column; gap: 8px; }
.sp-insight {
  background: var(--surface-1);
  border: 1px solid var(--line-1);
  border-left: 3px solid var(--up-1);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.sp-insight-l { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.sp-insight-t { font-size: 13px; line-height: 1.6; color: var(--ink-2); word-break: keep-all; }

/* ---------------- Metric grid ---------------- */
.sp-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 720px) { .sp-grid-4 { grid-template-columns: repeat(2, 1fr); } }
.sp-metric {
  background: var(--surface-1);
  border: 1px solid var(--line-1);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 3px;
}
.sp-metric-l { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-4); }
.sp-metric-v { font-size: 18px; font-weight: 700; color: var(--ink-1); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.sp-metric-d { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sp-metric-hint { font-size: 11px; color: var(--ink-4); }

/* ---------------- Report ---------------- */
.sp-report { border: 1px solid var(--line-1); border-radius: 10px; overflow: hidden; }
.sp-report-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: var(--surface-3); border-bottom: 1px solid var(--line-1);
}
.sp-report-body { padding: 14px 16px; background: var(--surface-2); font-size: 13px; line-height: 1.75; color: var(--ink-2); }
.sp-report-h { font-size: 12px; font-weight: 700; color: var(--ink-1); margin: 10px 0 4px; }
.sp-report-h:first-child { margin-top: 0; }
.sp-report-body p { margin: 0 0 6px; }
.sp-link-tiny { font-size: 11px; color: var(--link-2); font-weight: 600; }

/* ---------------- Strategy tabs (masters) ---------------- */
.sp-strategy-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-tab {
  height: 30px; padding: 0 12px;
  background: var(--surface-1);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 11.5px; font-weight: 700;
  font-family: var(--font-mono); letter-spacing: 0.02em;
  color: var(--ink-3); cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.sp-tab:hover { border-color: var(--line-3); color: var(--ink-1); }
.sp-tab.is-active { color: var(--up-1); border-color: var(--up-line); background: var(--up-tint); }

.sp-strategy-meta {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line-1);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
}
.sp-strategy-blurb { font-size: 12.5px; color: var(--ink-3); font-family: var(--font-mono); line-height: 1.5; }

/* ---------------- Callout / details ---------------- */
.sp-callout { font-size: 12px; color: var(--ink-3); }
.sp-callout summary { cursor: pointer; font-weight: 700; color: var(--ink-2); list-style: none; padding: 4px 0; }
.sp-callout summary::-webkit-details-marker { display: none; }
.sp-callout summary::before { content: '▸ '; color: var(--ink-4); }
.sp-callout[open] summary::before { content: '▾ '; }
.sp-callout ul { margin: 8px 0 4px 18px; padding: 0; }
.sp-callout li { margin: 3px 0; line-height: 1.55; }

/* ---------------- Tables ---------------- */
.sp-table-wrap { overflow-x: auto; }
.sp-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 12.5px;
}
.sp-table thead th {
  position: sticky; top: 0;
  background: var(--surface-3);
  color: var(--ink-3);
  font-weight: 700; font-size: 10px;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 9px 12px;
  text-align: right;
  border-bottom: 1px solid var(--line-2);
}
.sp-table thead th:first-child, .sp-table thead th:nth-child(2),
.sp-table thead th[style*="left"] { text-align: left; }
.sp-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-1);
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--ink-2);
  vertical-align: middle;
}
.sp-table tbody td:first-child, .sp-table tbody td:nth-child(2),
.sp-table tbody td[style*="left"] { text-align: left; }
.sp-table tbody tr.alt td { background: var(--surface-2); }
.sp-table tbody tr:hover td { background: var(--surface-3); cursor: pointer; }
.sp-table tbody tr.sel td { background: var(--link-tint); }
.sp-table .rank { font-family: var(--font-mono); color: var(--ink-4); }
.sp-table .code { font-family: var(--font-mono); color: var(--ink-3); font-size: 11.5px; }
.sp-table .num  { font-variant-numeric: tabular-nums; }
.sp-table .num.up   { color: var(--up-1);   font-weight: 600; }
.sp-table .num.down { color: var(--down-1); font-weight: 600; }
.sp-table .muted    { color: var(--ink-4); font-size: 11.5px; }
.sp-link-strong { color: var(--ink-1); font-weight: 600; border-bottom: 1px dashed var(--up-line); }
.sp-link-strong:hover { color: var(--up-1); }

/* ---------------- EODHD table ---------------- */
.sp-eod-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.sp-eod-table thead th {
  background: var(--surface-3); color: var(--ink-3);
  font-weight: 700; font-size: 10px;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 9px 12px; border-bottom: 1px solid var(--line-2);
  text-align: right;
}
.sp-eod-table thead th:first-child { text-align: left; }
.sp-eod-table tbody td {
  padding: 10px 12px; border-bottom: 1px solid var(--line-1);
  text-align: right; vertical-align: top;
  font-variant-numeric: tabular-nums; color: var(--ink-2);
}
.sp-eod-table tbody td:first-child { text-align: left; color: var(--ink-1); font-weight: 600; }
.sp-eod-sub { font-size: 11px; color: var(--ink-4); font-weight: 400; margin-top: 2px; }
.sp-eod-table .muted { color: var(--ink-4); font-weight: 500; }

/* ---------------- News ---------------- */
.sp-news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .sp-news-grid { grid-template-columns: 1fr; } }
.sp-news-list { max-height: 70vh; overflow-y: auto; }
.sp-news-row {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-1);
  display: flex; gap: 12px; align-items: flex-start;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.sp-news-row:hover { background: var(--surface-2); }
.sp-news-row:last-child { border-bottom: 0; }
.sp-news-time { font-size: 11px; color: var(--ink-4); font-family: var(--font-mono); width: 56px; flex-shrink: 0; padding-top: 2px; }
.sp-news-body { flex: 1; min-width: 0; }
.sp-src-tag { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-right: 8px; }
.sp-src-news { background: var(--link-tint); color: var(--link-1); }
.sp-src-mkt  { background: #fef3e6; color: var(--warn-1); }
.sp-src-dart { background: var(--up-tint); color: var(--up-1); }
.sp-news-title { font-size: 13px; font-weight: 600; color: var(--ink-1); line-height: 1.45; }
.sp-news-sub { display: flex; justify-content: space-between; gap: 12px; margin-top: 3px; font-size: 11px; color: var(--ink-4); }
.sp-news-tag { font-family: var(--font-mono); color: var(--ink-4); }

.sp-status-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; font-size: 12px; }

/* ---------------- Holdings ---------------- */
.sp-grid-3-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 720px) { .sp-grid-3-summary { grid-template-columns: 1fr; } }
.sp-stat {
  margin-top: 4px;
  font-size: 22px; font-weight: 800;
  color: var(--ink-1); font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.sp-stat small { font-size: 11px; font-weight: 600; color: var(--ink-4); margin-left: 4px; }
.sp-stat.up { color: var(--up-1); }
.sp-stat.down { color: var(--down-1); }
.sp-form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px; }
@media (max-width: 720px) { .sp-form-grid { grid-template-columns: repeat(2, 1fr); } .sp-form-grid > * { grid-column: span 2 !important; } }
.sp-form-actions { display: flex; gap: 8px; margin-top: 12px; align-items: center; }

/* ---------------- Disclaimer ---------------- */
.sp-disclaimer {
  margin-top: 8px;
  padding: 14px 18px;
  background: var(--surface-2);
  border: 1px solid var(--line-1);
  border-radius: 10px;
  font-size: 11.5px; color: var(--ink-4); line-height: 1.65;
  text-align: center;
}
.sp-disclaimer strong { color: var(--ink-2); font-weight: 700; }

/* ---------------- Placeholder ---------------- */
.sp-placeholder-icon {
  width: 56px; height: 56px; border-radius: 12px;
  background: var(--up-tint); color: var(--up-1);
  display: grid; place-items: center; flex-shrink: 0;
}

/* ---------------- Login ---------------- */
.sp-login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 20%, rgba(15,155,110,0.05), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(31,111,235,0.05), transparent 40%),
    var(--bg-page);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px;
}
.sp-login-shell {
  display: grid; grid-template-columns: 1.1fr 1fr;
  width: 100%; max-width: 920px;
  background: var(--surface-1);
  border: 1px solid var(--line-1);
  border-radius: 16px; overflow: hidden;
}
@media (max-width: 800px) { .sp-login-shell { grid-template-columns: 1fr; max-width: 460px; } }
.sp-login-hero { padding: 32px 32px; border-right: 1px solid var(--line-1); background: linear-gradient(160deg, var(--up-tint) 0%, var(--surface-1) 60%); }
.sp-login-hero h1 { font-size: 22px; line-height: 1.3; color: var(--ink-1); margin: 0 0 10px; letter-spacing: -0.02em; }
.sp-login-hero p { font-size: 13.5px; color: var(--ink-3); line-height: 1.7; word-break: keep-all; margin: 0; }
.sp-login-feats { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sp-login-feats > div { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.sp-login-feats .material-symbols-outlined { font-size: 18px; color: var(--up-1); }
.sp-login-panel { padding: 36px 32px; display: flex; flex-direction: column; justify-content: center; }
.sp-login-panel h2 { font-size: 18px; margin: 0 0 4px; }
.sp-login-actions { margin-top: 14px; font-size: 12px; display: flex; gap: 8px; align-items: center; }
.sp-login-foot { margin-top: 18px; font-size: 11.5px; color: var(--ink-4); }
.sp-login-foot strong { color: var(--ink-2); }

/* ---------------- Up / down generic ---------------- */
.up { color: var(--up-1); }
.down { color: var(--down-1); }
