/* 股票研究工作台：宽屏双栏，沿用 common.css 配色 */
#app { max-width: 1360px; }
#view { max-width: none; padding: 16px 20px 48px; }
.topbar { position: sticky; top: 0; z-index: 20; }

.rs-hero { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #4338ca, #7c3aed); color: #fff; border-radius: 14px; padding: 15px 18px; line-height: 1.7; font-size: 13px; margin-bottom: 14px; }
.rs-hero b { font-size: 16px; }
.rs-disc { margin-left: auto; font-size: 12px; background: rgba(255,255,255,.2); padding: 5px 12px; border-radius: 12px; white-space: nowrap; }

.rs-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 14px; align-items: start; }
.rs-side { margin: 0; position: sticky; top: 66px; }
.rs-count { font-size: 11px; color: #64748b; font-weight: 400; }
.rs-add { display: flex; gap: 6px; }
.rs-add input { flex: 1; min-width: 0; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; font-size: 12px; outline: none; }
.rs-add input:focus { border-color: #6366f1; }
.rs-suggest { border: 1px solid #e2e8f0; border-radius: 9px; margin-top: 6px; overflow: hidden; }
.rs-suggest:empty { display: none; }
.rs-suggest div { padding: 8px 10px; font-size: 12px; cursor: pointer; border-bottom: 1px solid #f1f5f9; }
.rs-suggest div:last-child { border-bottom: none; }
.rs-suggest div:hover { background: #eef2ff; }
.rs-suggest span { color: #94a3b8; margin-left: 6px; font-size: 11px; }
.rs-watchlist { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; }
.rs-watch { border: 1px solid #eef2f7; border-radius: 10px; padding: 10px 11px; cursor: pointer; }
.rs-watch.on { border-color: #4f46e5; background: #f5f5ff; }
.rs-watch .nm { font-size: 13px; font-weight: 700; display: flex; justify-content: space-between; gap: 6px; }
.rs-watch .nm em { font-style: normal; font-size: 11px; color: #94a3b8; font-weight: 400; }
.rs-watch .meta { font-size: 11px; color: #64748b; margin-top: 5px; display: flex; justify-content: space-between; gap: 6px; }
.rs-up { color: #dc2626; } .rs-down { color: #059669; }
.rs-side-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.rs-side-actions .btn-mini { padding: 6px 10px; font-size: 12px; }
.rs-side .foot-tip { font-size: 11px; margin-top: 10px; }

.rs-main { min-width: 0; }
.rs-panel { background: #fff; border: 1px solid #eef2f7; border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.rs-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rs-head h2 { font-size: 19px; margin: 0; }
.rs-head .code { font-size: 12px; color: #94a3b8; }
.rs-head .grow { flex: 1; }
.rs-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.rs-tag { font-size: 11px; background: #f1f5f9; color: #475569; padding: 3px 9px; border-radius: 10px; }
.rs-tag.hl { background: #eef2ff; color: #4f46e5; }
.rs-quote { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 10px; margin-top: 12px; }
.rs-quote div { background: #f8fafc; border-radius: 10px; padding: 10px 12px; }
.rs-quote .k { font-size: 11px; color: #64748b; }
.rs-quote .v { font-size: 17px; font-weight: 700; margin-top: 4px; }

.rs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rs-card { background: #fff; border: 1px solid #eef2f7; border-radius: 14px; padding: 15px; min-width: 0; }
.rs-card h3 { font-size: 14px; margin: 0 0 4px; display: flex; align-items: center; gap: 6px; }
.rs-card h3 i { font-style: normal; font-size: 10px; font-weight: 400; color: #4f46e5; background: #eef2ff; padding: 2px 7px; border-radius: 8px; }
.rs-card .hint { font-size: 11px; color: #94a3b8; line-height: 1.6; margin-bottom: 10px; }
.rs-fld { display: flex; flex-direction: column; gap: 5px; margin-bottom: 9px; }
.rs-fld label { font-size: 11px; color: #64748b; }
.rs-fld input, .rs-fld select, .rs-fld textarea { border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; font-size: 12px; outline: none; background: #fff; color: #1e293b; font-family: inherit; }
.rs-fld input:focus, .rs-fld textarea:focus, .rs-fld select:focus { border-color: #6366f1; }
.rs-fld textarea { resize: vertical; min-height: 62px; line-height: 1.6; }
.rs-row { display: flex; gap: 8px; align-items: center; }
.rs-row > * { flex: 1; min-width: 0; }
.rs-range { display: flex; align-items: center; gap: 8px; }
.rs-range input[type=range] { flex: 1; padding: 0; border: none; }
.rs-range b { font-size: 12px; color: #4f46e5; min-width: 58px; text-align: right; }

.rs-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rs-table th { text-align: right; background: #f8fafc; color: #64748b; font-weight: 600; font-size: 11px; padding: 7px 8px; white-space: nowrap; }
.rs-table th:first-child, .rs-table td:first-child { text-align: left; }
.rs-table td { text-align: right; padding: 7px 8px; border-bottom: 1px solid #f1f5f9; font-variant-numeric: tabular-nums; }
.rs-table tbody tr:hover { background: #fafbff; }
.rs-pos { color: #dc2626; } .rs-neg { color: #059669; }
.rs-scroll { max-height: 230px; overflow: auto; }
.rs-empty { text-align: center; color: #94a3b8; padding: 22px 0; font-size: 12px; }

.rs-events { display: flex; flex-direction: column; gap: 7px; max-height: 210px; overflow-y: auto; }
.rs-event { border: 1px solid #eef2f7; border-radius: 9px; padding: 8px 10px; font-size: 12px; }
.rs-event .t { display: flex; gap: 6px; align-items: center; color: #64748b; font-size: 11px; }
.rs-event .t b { color: #1e293b; font-size: 12px; }
.rs-event .t .grow { flex: 1; }
.rs-event p { margin: 5px 0 0; line-height: 1.55; }
.rs-badge { font-size: 10px; padding: 2px 7px; border-radius: 8px; background: #f1f5f9; color: #64748b; }
.rs-badge.up { background: #fef2f2; color: #dc2626; }
.rs-badge.down { background: #ecfdf5; color: #059669; }
.rs-link { color: #4f46e5; cursor: pointer; }

.rs-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 12px; }
.rs-run { background: #4f46e5; color: #fff; border: none; border-radius: 10px; padding: 11px 20px; font-size: 14px; cursor: pointer; }
.rs-run:hover { background: #4338ca; }
.rs-run:disabled { opacity: .5; cursor: not-allowed; }
.rs-note { font-size: 11px; color: #94a3b8; }

.rs-score { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #64748b; margin-bottom: 10px; }
.rs-score .bar { flex: 1; height: 7px; background: #eef2ff; border-radius: 6px; overflow: hidden; }
.rs-score .bar i { display: block; height: 100%; background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.rs-summary { background: #f8fafc; border-left: 3px solid #4f46e5; border-radius: 8px; padding: 12px 14px; font-size: 13px; line-height: 1.8; margin-bottom: 12px; }

.rs-scenarios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rs-sc { border: 1px solid #eef2f7; border-radius: 12px; padding: 12px; }
.rs-sc.neutral { border-color: #c7d2fe; background: #fafaff; }
.rs-sc h4 { font-size: 13px; margin: 0 0 3px; }
.rs-sc .g { font-size: 11px; color: #94a3b8; margin-bottom: 8px; }
.rs-sc .rs-table th, .rs-sc .rs-table td { padding: 5px 4px; font-size: 11px; }
.rs-sc .big { font-size: 18px; font-weight: 700; margin-top: 8px; }
.rs-sc .sub { font-size: 11px; color: #64748b; margin-top: 3px; }

.rs-chart { display: flex; align-items: flex-end; gap: 12px; height: 140px; padding: 8px 4px 0; border-bottom: 1px solid #e2e8f0; }
.rs-chart .group { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 5px; height: 100%; }
.rs-chart .col { width: 30px; border-radius: 5px 5px 0 0; min-height: 2px; position: relative; }
.rs-chart .col.net { background: linear-gradient(180deg, #818cf8, #4f46e5); }
.rs-chart .col.div { background: linear-gradient(180deg, #6ee7b7, #059669); }
.rs-chart .col span { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); font-size: 10px; color: #64748b; white-space: nowrap; }
.rs-xaxis { display: flex; gap: 12px; padding: 6px 4px 0; }
.rs-xaxis div { flex: 1; text-align: center; font-size: 11px; color: #94a3b8; }
.rs-legend { display: flex; gap: 14px; font-size: 11px; color: #64748b; margin-top: 8px; }
.rs-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.rs-legend .a { background: #4f46e5; } .rs-legend .b { background: #059669; }

.rs-pricebar { margin-top: 10px; }
.rs-pricebar .line { height: 12px; background: linear-gradient(90deg, #a7f3d0, #e0e7ff, #fecaca); border-radius: 8px; position: relative; }
.rs-pricebar .mark { position: absolute; top: -5px; width: 3px; height: 22px; background: #1e293b; border-radius: 2px; }
.rs-pricebar .lbls { display: flex; justify-content: space-between; font-size: 11px; color: #64748b; margin-top: 7px; }

.rs-assump { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.rs-assump div { background: #f8fafc; border-radius: 9px; padding: 9px 11px; font-size: 11px; color: #64748b; }
.rs-assump b { display: block; color: #1e293b; font-size: 13px; margin-top: 3px; }
.rs-formula { font-size: 11px; color: #64748b; line-height: 1.9; margin-top: 10px; }
.rs-risk { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 10px; padding: 12px 14px; font-size: 12px; line-height: 1.8; margin-top: 12px; }
.rs-disclaimer { font-size: 11px; color: #94a3b8; line-height: 1.7; margin-top: 10px; }

/* ===== 联网资料：同行对比 / 股东机构持仓 / 资讯 ===== */
.rs-sub { font-size: 12px; font-weight: 700; color: #334155; margin: 14px 0 7px; display: flex; align-items: center; gap: 6px; }
.rs-sub::before { content: ''; width: 3px; height: 12px; background: #6366f1; border-radius: 2px; }
.rs-note-block { background: #f8fafc; border-left: 3px solid #cbd5e1; border-radius: 8px; padding: 9px 12px; font-size: 11px; color: #64748b; line-height: 1.8; margin-top: 9px; }
.rs-note-block b { color: #1e293b; }
.rs-note-block.warn { background: #fffbeb; border-left-color: #f59e0b; color: #92400e; }
.rs-source { display: block; margin-top: 8px; font-size: 11px; }
.rs-scroll.small { max-height: 180px; }
.rs-card .rs-table td:first-child { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-table tr.me { background: #f5f5ff; }
.rs-table tr.me td { font-weight: 700; }
.rs-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.rs-kpi { background: #f8fafc; border: 1px solid #eef2f7; border-radius: 9px; padding: 9px 11px; }
.rs-kpi span { display: block; font-size: 11px; color: #64748b; }
.rs-kpi b { display: block; font-size: 14px; margin-top: 4px; color: #1e293b; }
.rs-news { display: flex; flex-direction: column; gap: 7px; max-height: 270px; overflow-y: auto; }
.rs-news-item { border: 1px solid #eef2f7; border-radius: 9px; padding: 9px 11px; }
.rs-news-item .t { font-size: 12px; line-height: 1.6; }
.rs-news-item .t a { color: #1e293b; text-decoration: none; }
.rs-news-item .t a:hover { color: #4f46e5; text-decoration: underline; }
.rs-news-item .m { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #94a3b8; margin-top: 5px; }
.rs-news-item .m .grow { flex: 1; }

@media (max-width: 1000px) {
  .rs-layout { grid-template-columns: 1fr; }
  .rs-side { position: static; }
  .rs-grid, .rs-scenarios { grid-template-columns: 1fr; }
  .rs-watchlist { max-height: none; }
  .rs-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  #view { padding: 12px 10px 40px; }
  .rs-hero { flex-direction: column; align-items: flex-start; }
  .rs-disc { margin-left: 0; }
}
