/* ValueLens 界面样式。配色：墨绿侧栏 + 暖白底；涨红跌绿（国内习惯）。 */
:root {
  --ink: #1d2a26; --ink-2: #51605b; --ink-3: #8a9792; --line: #e4e8e3; --bg: #f5f6f2; --card: #fff;
  --brand: #17483c; --brand-2: #1f6a57; --accent: #c8a45a;
  --up: #d0403a; --down: #1f9d6b; --warn: #e08a1e; --bad: #c0392b; --good: #1f9d6b;
}
* { box-sizing: border-box; }
[v-cloak] { display: none; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.6 "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif; }
a { color: var(--brand-2); text-decoration: none; }
h1 { font-size: 22px; margin: 0 0 4px; font-weight: 600; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 600; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 600; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; font-family: "SF Mono", "DIN Alternate", Consolas, "PingFang SC", monospace; }
.up { color: var(--up); } .down { color: var(--down); }
.good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); }

/* 外壳 */
.shell { display: flex; min-height: 100vh; }
.side { width: 208px; flex: none; background: var(--brand); color: #dfe9e5; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { font-size: 18px; font-weight: 600; padding: 22px 20px 18px; color: #fff; letter-spacing: .5px; display: flex; align-items: center; gap: 10px; }
.brand.big { font-size: 24px; padding: 0 0 6px; color: var(--brand); justify-content: center; }
.brand small { font-size: 13px; font-weight: 400; opacity: .7; }
.logo { display: inline-flex; width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: var(--brand); align-items: center; justify-content: center; font-weight: 700; font-family: Georgia, serif; }
.side nav { flex: 1; padding: 6px 10px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: #cfe0da; margin-bottom: 2px; }
.side nav a:hover { background: rgba(255, 255, 255, .07); }
.side nav a.on { background: rgba(255, 255, 255, .14); color: #fff; font-weight: 600; }
.side nav i { font-size: 16px; }
.side-foot { font-size: 11px; line-height: 1.5; padding: 10px 18px 18px; color: #8fb0a6; }
.side-user { padding: 10px 18px 0; }
.side-user .who { color: #e6f1ed; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.side-user .who small { font-size: 11px; color: #c8a45a; border: 1px solid rgba(200,164,90,.5); border-radius: 3px; padding: 0 4px; }
.login-tabs { display: flex; margin: 4px 0 14px; border-bottom: 1px solid var(--line); }
.login-tabs span { flex: 1; padding: 8px 0; cursor: pointer; color: #8a958f; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.login-tabs span.on { color: var(--brand, #1f6f5c); border-bottom-color: var(--brand, #1f6f5c); font-weight: 600; }
.stale-bar { background: #fff6e0; border: 1px solid #f0d9a0; color: #8a6200; border-radius: 8px; padding: 8px 14px; margin: 0 0 14px; font-size: 13px; }
.tag.st.dim { background: #f0f1ee; color: #9aa5a0; }
.score.dim .num { color: #a9b3ae !important; } .score.dim .bar i { background: #cfd6d2 !important; }
.pill.dim { background: #eef0ec !important; color: #8a958f !important; }
/* 个股对比 */
.cmp-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cmp td, .cmp th { width: 37%; }
.cmp tr.cmp-group td { background: #f4f5f1; font-weight: 600; font-size: 12px; color: var(--ink-2); padding-top: 6px; padding-bottom: 6px; }
.cmp td.cmp-win { color: var(--good); font-weight: 600; background: #f1f8f4; }
/* 卖出信号、财报日历、数据质量 */
.sig { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 3px; line-height: 18px; margin: 1px 3px 1px 0; background: #fdeee0; color: #b85c00; white-space: nowrap; }
.q-ok { color: var(--good); } .q-warn { color: #b7860b; } .q-bad { color: var(--bad); font-weight: 600; }
/* 关键变量：卡片墙 */
.kv-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.kv-card { border: 1px solid var(--line); border-top: 3px solid #ccc; border-radius: 8px; padding: 10px 12px 12px; background: #fff; }
.kv-card.stale { opacity: .7; }
.kv-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-2); }
.kv-state { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 10px; white-space: nowrap; }
.kv-value { font-size: 20px; font-weight: 600; margin: 6px 0 4px; line-height: 1.25; }
.kv-line { font-size: 12px; color: var(--ink-2); }
.kv-watch { font-size: 12px; color: var(--ink-3); margin-top: 6px; line-height: 1.55; }
.kv-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.kv-log { display: flex; gap: 10px; align-items: baseline; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
/* 持有期收益推演：区间条 */
.hz { margin-top: 14px; }
.hz-axis { position: relative; height: 18px; margin: 0 190px 2px 84px; font-size: 11px; color: var(--ink-3); }
.hz-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.hz-axis span.zero { color: var(--ink-2); font-weight: 600; }
.hz-row { display: flex; align-items: center; height: 30px; }
.hz-label { width: 84px; flex: none; line-height: 1.15; }
.hz-label small { display: block; font-size: 11px; color: var(--ink-3); }
.hz-track { position: relative; flex: 1; height: 16px; background: #f4f5f1; border-radius: 3px; }
.hz-zero { position: absolute; top: -7px; bottom: -7px; width: 1px; background: #b9c2bd; }
.hz-bar { position: absolute; top: 2px; bottom: 2px; border-radius: 3px; }
.hz-bar.short { background: #c9cfcb; } .hz-bar.mid { background: #7fb5a3; } .hz-bar.ten { background: #c8a45a; }
.hz-mid { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1px; background: var(--brand); border-radius: 2px; }
.hz-text { width: 190px; flex: none; padding-left: 12px; font-size: 12px; white-space: nowrap; }
.hz-slider { margin-top: 12px; padding: 12px 14px; background: #fbf8ef; border: 1px solid #efe6cc; border-radius: 8px; }
@media (max-width: 760px) { .hz-text { display: none; } .hz-axis { margin-right: 0; } }
.terms h3 { margin: 14px 0 4px; } .terms p { margin: 4px 0; color: var(--ink-2); line-height: 1.7; }
.terms { max-height: 60vh; overflow-y: auto; padding-right: 6px; }
.login-note { text-align: left; line-height: 1.6; margin: 10px 0 0; }
.main { flex: 1; min-width: 0; padding: 22px 28px 60px; }
/* 多标签栏：粘在顶部，开得多了横向滚动 */
.tabs { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; margin: -22px -28px 18px; padding: 8px 28px;
  background: var(--card); border-bottom: 1px solid var(--line); box-shadow: 0 1px 4px rgba(23, 72, 60, .05); }
.tabs-scroll { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px;
  background: #fff; color: var(--ink-2); font-size: 13px; cursor: pointer; white-space: nowrap; max-width: 190px; user-select: none; }
.tab:hover { color: var(--brand-2); border-color: #b9d3ca; }
.tab.on { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.tab .dot { display: none; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.tab.on .dot { display: inline-block; }
.tab .x { font-size: 12px; border-radius: 50%; padding: 1px; opacity: .65; }
.tab .x:hover { opacity: 1; background: rgba(0, 0, 0, .15); }
.tabs-more { flex: none; font-size: 12px; color: var(--ink-3); cursor: pointer; }
.tabs-more:hover { color: var(--brand-2); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head p { margin: 0; color: var(--ink-2); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.sp { flex: 1; }

/* 登录 */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-box { width: 340px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 30px 28px; text-align: center; }

/* 标签 */
.tag { display: inline-block; padding: 0 7px; border-radius: 4px; font-size: 12px; line-height: 20px; background: #eef2ee; color: var(--ink-2); margin: 1px 3px 1px 0; white-space: nowrap; }
.tag.mk-CN { background: #fbe9e7; color: #b23a2e; } .tag.mk-HK { background: #e7f0fb; color: #2b5fa8; } .tag.mk-US { background: #ece9fb; color: #5a45b0; }
.tag.mk-JP { background: #fdeef3; color: #b03a6a; } .tag.mk-KR { background: #e6f4f6; color: #1f7a8c; } .tag.mk-IN { background: #fff1de; color: #b06a12; }
.tag.st { background: #e9f4ef; color: var(--brand-2); cursor: default; }
.tag.flag { background: #fdeceb; color: var(--bad); }
.level { display: inline-block; padding: 2px 10px; border-radius: 20px; color: #fff; font-size: 12px; font-weight: 600; }

/* 风险卡片 */
.risk-card { cursor: pointer; transition: box-shadow .15s; }
.risk-card:hover, .risk-card.on { box-shadow: 0 4px 18px rgba(23, 72, 60, .12); border-color: #c5d3cc; }
.risk-card .big { font-size: 40px; font-weight: 600; line-height: 1.1; }
.meter { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #27ae60 0, #27ae60 28%, #3498db 28%, #3498db 45%, #f1c40f 45%, #f1c40f 60%, #e67e22 60%, #e67e22 75%, #c0392b 75%); position: relative; margin: 10px 0 6px; opacity: .85; }
.meter i { position: absolute; top: -4px; width: 4px; height: 16px; background: var(--ink); border-radius: 2px; transform: translateX(-2px); }
.kv { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; color: var(--ink-2); }
.kv b { color: var(--ink); font-weight: 500; }

/* 分数 */
.score { display: inline-flex; align-items: center; gap: 6px; min-width: 76px; }
.score .bar { flex: 1; height: 6px; background: #e9ece7; border-radius: 3px; overflow: hidden; min-width: 36px; }
.score .bar i { display: block; height: 100%; border-radius: 3px; }
.dim { display: inline-block; width: 30px; text-align: right; }
.s-hi { color: #1a7f5a; } .s-mid { color: #8a7a2b; } .s-lo { color: #b5524a; }

/* 表格 */
.el-table { font-size: 13px; color: var(--ink); }
.el-table th { background: #fafbf8 !important; color: var(--ink-2); font-weight: 500; }
.el-table td, .el-table th { padding: 7px 0; }
.el-table .cell { padding: 0 8px; }
.el-table__row { cursor: pointer; }
.plain-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.plain-table th { text-align: left; font-weight: 500; color: var(--ink-2); background: #fafbf8; }
.plain-table th, .plain-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); }
.plain-table td.r, .plain-table th.r { text-align: right; }
.plain-table tr.hl td { background: #fff8e6; }
.scroll-x { overflow-x: auto; }

/* 规则清单 */
.rule { display: flex; gap: 8px; padding: 4px 0; font-size: 13px; align-items: baseline; }
.rule .ico { width: 18px; flex: none; text-align: center; font-weight: 700; }
.rule .val { margin-left: auto; color: var(--ink-3); white-space: nowrap; }
.strat { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.strat.hit { border-color: #9fd0bd; background: #f6fbf8; }
.strat-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.pill { font-size: 12px; padding: 1px 8px; border-radius: 10px; background: #eef2ee; color: var(--ink-2); }
.pill.hit { background: var(--good); color: #fff; }
.note { background: #f7f8f4; border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 0 6px 6px 0; color: var(--ink-2); font-size: 13px; margin: 8px 0; }
.warnbox { background: #fff6ec; border-left: 3px solid var(--warn); padding: 8px 12px; border-radius: 0 6px 6px 0; font-size: 13px; margin: 6px 0; }
.flagbox { background: #fdf0ef; border-left: 3px solid var(--bad); padding: 8px 12px; border-radius: 0 6px 6px 0; font-size: 13px; margin: 6px 0; }
.stat { text-align: center; }
.stat .v { font-size: 26px; font-weight: 600; line-height: 1.2; }
.stat .k { font-size: 12px; color: var(--ink-3); }
.filters .el-select, .filters .el-input { width: auto; }
.prose { max-width: 880px; }
.prose p, .prose li { color: var(--ink-2); }
.prose h2 { margin-top: 26px; }

@media (max-width: 1100px) { .g3 { grid-template-columns: 1fr; } .g2 { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .side { width: auto; height: auto; position: static; }
  .side nav { display: flex; overflow-x: auto; padding: 0 8px 8px; }
  .side nav a { white-space: nowrap; }
  .side-foot { display: none; }
  .brand { padding: 12px 16px 8px; }
  .main { padding: 16px 12px 40px; }
  .tabs { margin: -16px -12px 14px; padding: 6px 12px; }
}

/* Element UI 主色改成品牌墨绿 */
.el-button--primary { background: var(--brand-2); border-color: var(--brand-2); }
.el-button--primary:hover, .el-button--primary:focus { background: #2a7d68; border-color: #2a7d68; }
.el-button--primary.is-plain { color: var(--brand-2); background: #eaf4f0; border-color: #a9d0c3; }
.el-button--primary.is-plain:hover, .el-button--primary.is-plain:focus { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.el-button--text { color: var(--brand-2); }
.el-radio-button__orig-radio:checked + .el-radio-button__inner,
.el-checkbox-button.is-checked .el-checkbox-button__inner { background: var(--brand-2); border-color: var(--brand-2); box-shadow: -1px 0 0 0 var(--brand-2); color: #fff; }
.el-radio-button__inner:hover, .el-checkbox-button__inner:hover { color: var(--brand-2); }
.el-tabs__item.is-active, .el-tabs__item:hover { color: var(--brand-2); }
.el-tabs__active-bar { background: var(--brand-2); }
.el-pager li.active, .el-pager li:hover, .el-select-dropdown__item.selected { color: var(--brand-2); }
.el-input__inner:focus, .el-textarea__inner:focus { border-color: var(--brand-2); }
.el-checkbox-button__inner { margin-bottom: 6px; border-left: 1px solid #dcdfe6; border-radius: 4px !important; margin-right: 6px; }
