/* ============================================================
   若依风格：深色侧边栏 + 白顶栏 + 灰底卡片内容区
   注意 Element Plus 的默认主色是 #409EFF，正好和若依一致，
   所以这里只调整布局层面的视觉，不再二次覆盖组件色。
   ============================================================ */

:root {
  --ry-sidebar: #304156;
  --ry-sidebar-sub: #1f2d3d;
  --ry-sidebar-active: #263445;
  --ry-header-h: 50px;
  --ry-navbar-h: 42px;
  --ry-sidebar-w: 210px;
  --ry-sidebar-w-min: 64px;
  --ry-bg: #f0f2f5;
  --ry-text: #303133;
  --ry-primary: #409EFF;
  --ry-success: #67C23A;
  --ry-danger: #F56C6C;
  --ry-warning: #E6A23C;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body, #app {
  height: 100%;
  font-family: "Helvetica Neue", Helvetica, "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  color: var(--ry-text);
  background: var(--ry-bg);
  -webkit-font-smoothing: antialiased;
}

.boot-mask {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100%; background: var(--ry-bg);
}
.boot-title { font-size: 22px; font-weight: 600; color: #304156; }
.boot-sub { margin-top: 10px; color: #909399; font-size: 13px; }
.login-tip {
  margin-top: 14px; padding: 8px 12px;
  background: #f4f4f5; border-radius: 4px;
  font-size: 12px; color: #909399; line-height: 1.7;
}
.login-btn { width: 100%; margin-top: 6px; }
.tag-close { opacity: .6; font-size: 12px; margin-left: 2px; }

/* ---- 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.stat-card {
  background: #fff; border-radius: 4px; padding: 16px 18px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
.stat-icon {
  width: 48px; height: 48px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; flex-shrink: 0;
}
.stat-body { min-width: 0; }
.stat-label { font-size: 12px; color: #909399; margin-bottom: 4px; }
.stat-value { font-size: 20px; font-weight: 600; color: #303133; line-height: 1.2; }
.stat-extra { font-size: 11px; color: #c0c4cc; margin-top: 2px; }

/* ---- 数值着色：涨红跌绿（中国习惯） */
.up { color: #f5222d; }
.down { color: #52c41a; }
.flat { color: #606266; }

.badge-pos { color: #f5222d; font-weight: 600; }
.badge-neg { color: #52c41a; font-weight: 600; }

/* ---- 表格内的小强调 */
.mono { font-family: Consolas, Monaco, monospace; font-size: 12px; }

/* ---- 参数网格表单 */
.param-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 12px; }

/* ---- 详情抽屉里的指标块 */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.metric-box {
  border: 1px solid #ebeef5; border-radius: 4px; padding: 10px 12px;
  background: #fafafa;
}
.metric-box .mb-label { font-size: 12px; color: #909399; }
.metric-box .mb-value { font-size: 17px; font-weight: 600; margin-top: 3px; }

/* ---- 进度条行 */
.task-progress { min-width: 120px; }

/* ---- ECharts 容器 */
.chart-box { width: 100%; height: 320px; }
.chart-box.tall { height: 420px; }
.chart-box.short { height: 240px; }

/* ---- 通用 flex 行 */
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row-start { display: flex; align-items: center; gap: 8px; }
.wrap-any { flex-wrap: wrap; }

/* ---- 表格 Tooltip 宽表格滚动 */
.el-table .cell { word-break: break-word; }

/* ---- 抽屉 */
.el-drawer__body { padding: 16px 20px; }

/* ---- 滚动条美化 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c4c8ce; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8adb5; }
::-webkit-scrollbar-track { background: transparent; }

/* ---- 小屏适配：内容太挤时放宽 */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ============================================================ 实际组件所用类（qz-* 等） */
.qz-root { height: 100%; }

/* 登录 */
.login-page {
  height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2d3a4b 0%, #1f2d3d 100%);
}
.login-card {
  width: 400px; padding: 30px 34px 26px; background: #fff; border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.login-brand { text-align: center; margin-bottom: 18px; }
.login-logo {
  width: 48px; height: 48px; margin: 0 auto 10px; border-radius: 8px;
  background: var(--ry-primary); color: #fff; font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.login-brand h2 { font-size: 19px; color: #303133; margin-bottom: 4px; }
.login-brand p { color: #909399; font-size: 12px; }
.login-tip { margin-top: 12px; font-size: 12px; color: #909399; text-align: center; }
.login-btn { width: 100%; margin-top: 6px; }
.captcha-row { display: flex; gap: 8px; align-items: center; }
/* 验证码容器：固定 118x40 居中，让 SVG 按 viewBox 等比铺满，不再被裁切 */
.captcha-img {
  flex: 0 0 118px; width: 118px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; background: #f5f8fc;
  border: 1px solid #dcdfe6; border-radius: 4px; overflow: hidden;
}
.captcha-img svg { display: block; width: 100%; height: 100%; }

/* 主框架 */
.main-layout { height: 100%; }
.qz-aside {
  background: #304156; display: flex; flex-direction: column; overflow: hidden;
  transition: width .25s ease;
}
.logo-bar {
  height: 50px; display: flex; align-items: center; padding: 0 16px;
  background: #2b3649; color: #fff; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden;
}
.logo-mark {
  width: 26px; height: 26px; flex-shrink: 0; margin-right: 9px; border-radius: 5px;
  background: var(--ry-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.qz-aside .el-menu { border-right: none; }
.qz-aside .el-menu-item, .qz-aside .el-sub-menu__title { color: #bfcbd9; }
.qz-aside .el-menu-item:hover, .qz-aside .el-sub-menu__title:hover { background: #263445 !important; color: #fff; }
.qz-aside .el-menu-item.is-active { color: #fff; background: var(--ry-primary) !important; }
.qz-aside .el-sub-menu .el-menu { background: #1f2d3d; }
.qz-aside .el-sub-menu .el-menu-item { background: #1f2d3d; }
.qz-aside .el-sub-menu .el-menu-item.is-active { background: var(--ry-primary) !important; }

.qz-header {
  height: 50px; background: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; box-shadow: 0 1px 4px rgba(0,21,41,.08); z-index: 10;
}
.header-left { display: flex; align-items: center; gap: 8px; }
.collapse-btn { font-size: 20px; cursor: pointer; color: #5a5e66; }
.collapse-btn:hover { background: #f2f6fc; border-radius: 4px; }
.header-right { display: flex; align-items: center; gap: 14px; }
/* 顶栏常驻图标（说明书入口） */
.head-icon { font-size: 19px; cursor: pointer; color: #5a5e66; }
.head-icon:hover { color: var(--el-color-primary); }
.user-chip { display: flex; align-items: center; gap: 6px; cursor: pointer; outline: none; }
.user-name { font-size: 13px; color: #303133; }
.qz-main { background: var(--ry-bg); padding: 12px; overflow: auto; }

/* 内容视图通用 */
.view { min-height: 100%; }
.toolbar { margin-bottom: 12px; }
.pager { margin-top: 12px; justify-content: flex-end; }
.muted { color: #909399; font-size: 13px; }
.desc { color: #606266; line-height: 1.7; margin: 0 0 12px; }
.detail-head { display: flex; align-items: center; gap: 10px; }
.detail-head .muted { margin-left: auto; }
.stat-row { margin-bottom: 12px; }
.stat-card { margin-bottom: 0; }
.detail-card, .list-card, .chart-card { margin-bottom: 12px; }

/* 回测指标块 */
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 12px; }
.metric { border: 1px solid #ebeef5; border-radius: 4px; padding: 10px 12px; background: #fafafa; }
.m-label { font-size: 12px; color: #909399; }
.m-value { font-size: 17px; font-weight: 600; margin-top: 3px; }
.m-value.up { color: #f5222d; }
.m-value.down { color: #52c41a; }

/* 参数网格表单 */
.param-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; }
.param-item { display: inline-flex; align-items: center; gap: 6px; }
.param-label { font-size: 12px; color: #606266; min-width: 64px; display: inline-block; }

/* 标签 */
.reason-tag { margin: 0 6px 6px 0; }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }

/* 卡片头标题 */
.el-card__header { font-weight: 600; }

/* 抽屉表单底部 */
.el-drawer__footer { text-align: right; }

/* ---------------------------------------------------------------- 参数说明 */
.ph-wrap { display: inline-flex; align-items: center; vertical-align: middle; }
.ph-key {
  font-family: Consolas, Menlo, monospace; font-size: 12px; color: #909399;
  background: #f4f4f5; border-radius: 3px; padding: 1px 5px; margin-right: 8px;
}
.ph-label { font-weight: 600; color: #303133; }
.ph-best { margin-left: 8px; font-weight: 400; }
.ph-body { padding: 2px 4px 6px; }
.ph-row { display: flex; gap: 10px; line-height: 1.8; font-size: 13px; color: #303133; }
.ph-t { flex: 0 0 84px; color: #909399; }
.ph-t.up { color: #f5222d; }
.ph-t.down { color: #52c41a; }
.ph-safe { color: #e6a23c; }
.ph-sample { margin-top: 14px; border: 1px solid #ebeef5; border-radius: 4px; background: #fafafa; }
.ph-sample-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-bottom: 1px solid #ebeef5; font-size: 13px; color: #606266;
}
.ph-code {
  margin: 0; padding: 10px; font-family: Consolas, Menlo, monospace; font-size: 12px;
  color: #303133; white-space: pre-wrap; word-break: break-all; line-height: 1.7;
}

/* 参数输入框旁的「字段说明」虚线标签 */
.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px 12px; width: 100%; margin-bottom: 4px; flex-wrap: wrap;
}
.sec-head > span:first-child { flex: 1 1 180px; min-width: 0; }
.sec-btns { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.plabel { font-size: 12px; color: #606266; display: inline-flex; align-items: center; gap: 3px; }
.plabel .q { color: #c0c4cc; font-size: 12px; }
.plabel:hover { color: var(--el-color-primary); }
.plabel:hover .q { color: var(--el-color-primary); }
/* 输入框后面的独立问号图标 */
.field-q { color: #c0c4cc; margin-left: 6px; cursor: help; vertical-align: middle; }
.field-q:hover { color: var(--el-color-primary); }

/* ------------------------------------------------------------ 操作说明书 */
.manual-wrap { display: flex; gap: 14px; align-items: flex-start; }
.manual-side { flex: 0 0 190px; position: sticky; top: 4px; }
.manual-body { flex: 1; min-width: 0; }
.manual-side .el-menu { border-right: none; }
.md h2 {
  font-size: 17px; margin: 0 0 14px; padding-bottom: 8px;
  border-bottom: 1px solid #ebeef5; color: #303133;
}
.md h2 .anchor { color: var(--el-color-primary); margin-right: 6px; font-weight: 400; }
.md h3 { font-size: 14px; margin: 18px 0 8px; color: #303133; }
.md p { line-height: 1.85; color: #40454d; margin: 0 0 10px; font-size: 13px; }
.md ul { padding-left: 20px; margin: 0 0 10px; }
.md li { line-height: 1.85; color: #40454d; font-size: 13px; }
.md code {
  font-family: Consolas, Menlo, monospace; background: #f4f4f5; color: #d4380d;
  padding: 1px 5px; border-radius: 3px; font-size: 12px;
}
.md table { width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: 13px; }
.md th, .md td { border: 1px solid #ebeef5; padding: 7px 10px; text-align: left; line-height: 1.7; }
.md th { background: #fafafa; color: #303133; font-weight: 600; }
.md td.k { font-family: Consolas, Menlo, monospace; color: #909399; white-space: nowrap; }
/* 擂台：各目标最优参数行 */
.best-row {
  display: flex; align-items: center; gap: 10px; padding: 5px 0;
  border-bottom: 1px dashed #ebeef5; font-size: 13px;
}
.best-name { flex: 0 0 130px; font-weight: 600; color: #303133; }
.best-params { flex: 1; color: #606266; }
/* 机器人 JSON 参数框下的实时校验提示 */
.param-hint {
  display: flex; align-items: center; gap: 6px; margin-top: 6px;
  font-size: 12px; color: #909399; line-height: 1.6;
}
.param-hint.is-error { color: #f56c6c; }
.sec-title { font-size: 13px; color: #303133; margin: 0 0 8px; font-weight: 600; }
/* 策略库详情里的「参数一览」区块 */
.sec { margin-bottom: 12px; }
.md .sec { margin-bottom: 8px; }

/* ================= 安全设置页 ================= */
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.chk-item {
  display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px;
  border: 1px solid #ebeef5; border-radius: 6px; background: #fafafa;
}
.chk-item .el-icon { font-size: 17px; margin-top: 1px; }
.chk-item.is-ok { background: #f0f9eb; border-color: #e1f3d8; }
.chk-item.is-ok .el-icon { color: #67c23a; }
.chk-item.is-bad { background: #fef0f0; border-color: #fde2e2; }
.chk-item.is-bad .el-icon { color: #f56c6c; }
.chk-item .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chk-item .txt b { font-size: 13px; color: #303133; }
.chk-item .txt span { font-size: 12px; color: #909399; line-height: 1.5; }

.muted-inline { margin-left: 10px; color: #909399; font-size: 12px; line-height: 1.6; }
.para-help { margin-top: 6px; font-size: 12px; color: #909399; line-height: 1.7; }
.para-help code {
  font-family: Consolas, Menlo, monospace; background: #f4f4f5;
  color: #d4380d; padding: 1px 4px; border-radius: 3px;
}
.rule-bad { margin-top: 8px; font-size: 12px; color: #f56c6c; }
.rule-bad .el-tag { margin-left: 5px; }

.probe-box {
  width: 100%; padding: 12px 14px; background: #f8fafc;
  border: 1px dashed #d4dae3; border-radius: 6px;
}
.probe-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.probe-out { margin-top: 10px; padding: 8px 12px; border-radius: 5px; font-size: 13px; }
.probe-out.ok { background: #f0f9eb; color: #529b2e; }
.probe-out.no { background: #fef0f0; color: #e34d4d; }

/* ================= 被 IP 拦截时的全屏卡片 ================= */
.qz-blocked {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .45); padding: 20px;
}
.qz-blocked-card {
  background: #fff; border-radius: 12px; padding: 32px 38px; text-align: center;
  max-width: 460px; box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
}
.qz-blocked-card .ico {
  width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 50%;
  background: #fef0f0; color: #f56c6c; font-size: 24px; line-height: 48px;
}
.qz-blocked-card h3 { margin: 0 0 10px; font-size: 18px; color: #303133; }
.qz-blocked-card p { margin: 6px 0; font-size: 13px; color: #606266; line-height: 1.7; }
.qz-blocked-card p.sub { font-size: 12px; color: #909399; }
.qz-blocked-card .btns { margin-top: 18px; }
.qz-blocked-card button {
  border: none; background: #409eff; color: #fff; padding: 8px 26px;
  border-radius: 5px; cursor: pointer; font-size: 13px;
}
.qz-blocked-card button:hover { background: #66b1ff; }

/* ================= 页面越权提示 ================= */
.no-perm { padding: 24px 0; }

/* ================= 空闲超时倒计时 ================= */
.idle-box {
  position: fixed; right: 24px; bottom: 24px; z-index: 9000;
  background: #fff; border-radius: 8px; padding: 16px 20px; min-width: 260px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, .16); border-left: 4px solid #e6a23c;
}
.idle-box h4 { margin: 0 0 6px; font-size: 14px; color: #303133; }
.idle-box p { margin: 0 0 10px; font-size: 12px; color: #909399; line-height: 1.6; }
.idle-btns { display: flex; gap: 8px; }
.idle-btns button {
  border: 1px solid #dcdfe6; background: #fff; color: #606266; padding: 5px 14px;
  border-radius: 4px; cursor: pointer; font-size: 12px;
}
.idle-btns button.pri { background: #409eff; border-color: #409eff; color: #fff; }

/* 失败详情：保留换行与缩进的等宽错误块 */
.err-box {
  white-space: pre-wrap; word-break: break-all;
  background: #fef0f0; color: #c45656; border: 1px solid #fde2e2;
  border-radius: 4px; padding: 10px 12px; margin: 0 0 10px;
  font-size: 12px; line-height: 1.7; max-height: 320px; overflow: auto;
  font-family: Consolas, Menlo, "Courier New", monospace;
}

/* ==================================================================
   现代化视觉升级 + 新增模块（聊天室 / 个人中心 / K线指标）
   ================================================================== */
:root {
  --qz-radius: 10px;
  --qz-shadow: 0 1px 3px rgba(0, 0, 0, .05), 0 1px 2px rgba(0, 0, 0, .04);
  --qz-shadow-lg: 0 8px 24px rgba(0, 0, 0, .1);
  --qz-line: #ebeef5;
  --qz-bg-soft: #f5f7fa;
}

/* 通用省略号 */
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 全局：卡片统一圆角与阴影 ---- */
.el-card {
  border-radius: var(--qz-radius) !important;
  border: 1px solid var(--qz-line) !important;
  box-shadow: var(--qz-shadow) !important;
  transition: box-shadow .2s ease;
}
.el-card:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .07) !important; }
.el-card__header {
  font-weight: 600; padding: 14px 16px;
  border-bottom: 1px solid var(--qz-line) !important;
}

/* ---- 侧边栏：渐变 + 选中态左侧亮条 ---- */
.qz-aside {
  background: linear-gradient(180deg, #2f4257 0%, #22303f 100%) !important;
}
.logo-bar {
  height: 54px !important;
  background: rgba(0, 0, 0, .16) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  letter-spacing: .5px;
}
.logo-mark {
  border-radius: 8px !important;
  background: linear-gradient(135deg, #4facfe 0%, #409eff 100%) !important;
  box-shadow: 0 2px 8px rgba(64, 158, 255, .4);
}
.qz-aside .el-menu { background: transparent !important; }
.qz-aside .el-menu-item,
.qz-aside .el-sub-menu__title {
  height: 44px !important; line-height: 44px !important;
  border-radius: 6px; margin: 2px 8px;
  transition: all .18s ease;
}
.qz-aside .el-menu-item:hover,
.qz-aside .el-sub-menu__title:hover {
  background: rgba(255, 255, 255, .08) !important;
  color: #fff !important;
}
.qz-aside .el-menu-item.is-active {
  background: linear-gradient(90deg, rgba(64, 158, 255, .28) 0%, rgba(64, 158, 255, .06) 100%) !important;
  color: #fff !important;
  box-shadow: inset 3px 0 0 #409eff;
  font-weight: 500;
}
.qz-aside .el-sub-menu .el-menu { background: rgba(0, 0, 0, .18) !important; }
.qz-aside .el-sub-menu .el-menu-item { background: transparent !important; }

/* ---- 顶栏：略高 + 分隔感 ---- */
.qz-header {
  height: 54px !important;
  background: rgba(255, 255, 255, .95) !important;
  backdrop-filter: saturate(180%) blur(8px);
  box-shadow: 0 1px 4px rgba(0, 21, 41, .06) !important;
}
.collapse-btn, .head-icon {
  width: 32px; height: 32px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: all .18s ease;
}
.collapse-btn:hover, .head-icon:hover { background: var(--qz-bg-soft); color: #409eff; }
.user-chip {
  padding: 4px 8px; border-radius: 20px;
  transition: background .18s ease;
}
.user-chip:hover { background: var(--qz-bg-soft); }
.user-name { font-weight: 500; }

/* ---- 主内容区 ---- */
.qz-main { background: var(--qz-bg-soft) !important; padding: 14px !important; }

/* ---- 表格：条纹柔化 + 悬浮抬升 ---- */
.el-table {
  border-radius: 8px; overflow: hidden;
  font-size: 13px;
}
.el-table th.el-table__cell {
  background: #fafbfc !important;
  color: #4a5361 !important; font-weight: 600 !important;
}
.el-table td.el-table__cell { padding: 9px 0 !important; }
.el-table__row:hover > td { background: #f5f9ff !important; }

/* ---- 登录页：卡片加质感 ---- */
.login-page {
  background: radial-gradient(1200px 600px at 20% 10%, #35506b 0%, #1f2d3d 55%, #16202b 100%);
}
.login-card {
  border-radius: 14px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45) !important;
  padding: 32px 34px 26px !important;
  width: 410px;
}
.login-logo {
  border-radius: 12px !important;
  background: linear-gradient(135deg, #4facfe 0%, #0064d2 100%) !important;
  box-shadow: 0 8px 20px rgba(64, 158, 255, .35);
  font-size: 22px;
}
.login-brand h2 { font-size: 20px; letter-spacing: .5px; }
.login-btn { height: 40px; font-size: 15px; letter-spacing: 2px; border-radius: 8px; }
.login-tabs .el-tabs__nav-wrap::after { height: 1px; }
/* 登录失败常驻提示：比 toast 更显眼，且不会自动消失 */
.login-err { margin: 6px 0 2px; }
.login-err .el-alert__description { font-size: 12px; line-height: 1.7; }
.login-err .el-alert__title { font-size: 13px; font-weight: 600; }

/* ==================================================================
   K线页：技术指标配置面板
   ================================================================== */
.ind-panel {
  border-bottom: 1px dashed var(--qz-line);
  padding-bottom: 10px; margin-bottom: 10px;
}
.ind-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.ind-label { font-size: 13px; color: #5b6472; font-weight: 600; }
.ind-detail {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 10px; padding: 10px 12px;
  background: #fafbfc; border: 1px solid var(--qz-line); border-radius: 8px;
}
.ind-block {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 3px 0;
}
.ind-sub {
  flex: 0 0 92px; font-size: 12.5px; color: #4a5361; font-weight: 600;
}
.ind-param { font-size: 12px; color: #909399; }
.ind-note { font-size: 11.5px; color: #b0b6bf; }
.ind-tip {
  margin-top: 8px; font-size: 12px; color: #909399;
}

/* ==================================================================
   聊天室
   ================================================================== */
.chat-page { padding: 0; }
.chat-wrap {
  display: flex; height: calc(100vh - 54px - 28px); min-height: 520px;
  background: #fff; border-radius: var(--qz-radius);
  border: 1px solid var(--qz-line); overflow: hidden;
  box-shadow: var(--qz-shadow);
}

/* 左侧房间列表 */
.chat-side {
  flex: 0 0 268px; display: flex; flex-direction: column;
  border-right: 1px solid var(--qz-line); background: #fafbfc;
}
.chat-side-head {
  height: 54px; padding: 0 12px; display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--qz-line); flex-shrink: 0;
}
.chat-title { font-size: 15px; font-weight: 600; color: #303133; }
.chat-unread-all {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #f56c6c; color: #fff; font-size: 11px; line-height: 18px;
  text-align: center;
}
.chat-side-ops { margin-left: auto; display: flex; gap: 4px; }
.chat-side-body { flex: 1; overflow: hidden; }
.room-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; cursor: pointer;
  border-left: 3px solid transparent;
  transition: background .16s ease;
}
.room-item:hover { background: #f0f4f9; }
.room-item.active {
  background: #eaf3ff; border-left-color: #409eff;
}
.room-avatar { flex-shrink: 0; background: #409eff; color: #fff; font-size: 15px; }
.room-main { flex: 1; min-width: 0; }
.room-row1 { display: flex; align-items: baseline; gap: 6px; }
.room-name { flex: 1; font-size: 13.5px; color: #303133; font-weight: 500; }
.room-time { font-size: 11px; color: #b0b6bf; flex-shrink: 0; }
.room-row2 { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.room-last { flex: 1; font-size: 12px; color: #909399; }
.room-badge { margin-right: 3px; transform: scale(.85); }
.room-unread {
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px;
  background: #f56c6c; color: #fff; font-size: 11px; line-height: 17px;
  text-align: center; flex-shrink: 0;
}
.chat-empty-side { padding: 40px 16px; text-align: center; color: #b0b6bf; font-size: 13px; }

/* 中间消息区 */
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-head {
  height: 54px; padding: 0 16px; display: flex; align-items: center;
  border-bottom: 1px solid var(--qz-line); flex-shrink: 0;
}
.chat-head-info { display: flex; align-items: center; gap: 8px; }
.chat-head-name { font-size: 15px; font-weight: 600; color: #303133; }
.chat-head-sub { font-size: 12px; color: #909399; }
.chat-head-ops { margin-left: auto; display: flex; gap: 8px; }

.chat-body { flex: 1; background: #f7f9fc; padding: 14px 16px; }
.msg-row {
  display: flex; gap: 10px; margin-bottom: 16px; align-items: flex-start;
}
.msg-row.sys { justify-content: center; }
.msg-system {
  font-size: 12px; color: #a8abb2; background: rgba(0, 0, 0, .04);
  padding: 3px 12px; border-radius: 10px;
}
.msg-row.mine { flex-direction: row-reverse; }
.msg-col { max-width: 62%; min-width: 0; }
.msg-meta {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px;
  font-size: 12px; color: #909399;
}
.msg-row.mine .msg-meta { flex-direction: row-reverse; }
.msg-name { font-weight: 500; color: #606266; }
.msg-time { font-size: 11px; color: #b8bcc4; }
.msg-bubble {
  display: inline-block; padding: 9px 13px; border-radius: 10px;
  background: #fff; border: 1px solid var(--qz-line);
  font-size: 13.5px; line-height: 1.65; color: #303133;
  word-break: break-word; white-space: pre-wrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.msg-row.mine .msg-bubble {
  background: linear-gradient(135deg, #409eff 0%, #2f8ce0 100%);
  border-color: transparent; color: #fff;
}
.msg-recalled { color: #b0b6bf; font-size: 12.5px; font-style: italic; }
.msg-row.mine .msg-recalled { color: rgba(255, 255, 255, .75); }
.msg-ops { margin-top: 2px; }
.msg-row.mine .msg-ops { text-align: right; }
.msg-ops .el-button { font-size: 11.5px; opacity: 0; transition: opacity .15s; }
.msg-row:hover .msg-ops .el-button { opacity: 1; }
.chat-empty-msg { text-align: center; color: #b0b6bf; padding: 40px 0; font-size: 13px; }
.chat-more { text-align: center; margin-bottom: 10px; }

.chat-input {
  border-top: 1px solid var(--qz-line); padding: 8px 14px 10px; flex-shrink: 0;
  background: #fff;
}
.chat-input-ops { display: flex; gap: 10px; margin-bottom: 4px; }
.emoji-btn { font-size: 19px; color: #909399; cursor: pointer; }
.emoji-btn:hover { color: #409eff; }
.chat-input .el-textarea__inner {
  border: none; box-shadow: none; padding: 4px 0; font-size: 13.5px;
}
.chat-send-row {
  display: flex; align-items: center; justify-content: space-between; margin-top: 4px;
}
.chat-tip { font-size: 11.5px; color: #b8bcc4; }
.chat-blank { flex: 1; display: flex; align-items: center; justify-content: center; }

/* 右侧成员 */
.chat-members {
  flex: 0 0 190px; border-left: 1px solid var(--qz-line);
  display: flex; flex-direction: column; background: #fafbfc;
}
.mem-head {
  height: 54px; display: flex; align-items: center; padding: 0 14px;
  border-bottom: 1px solid var(--qz-line); font-size: 13px;
  color: #4a5361; font-weight: 600; flex-shrink: 0;
}
.mem-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px;
}
.mem-item:hover { background: #f0f4f9; }
.mem-name { flex: 1; font-size: 13px; color: #303133; }
.mem-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #dcdfe6; flex-shrink: 0;
}
.mem-dot.on { background: #67c23a; box-shadow: 0 0 0 2px rgba(103, 194, 58, .18); }
.mem-more { color: #b0b6bf; cursor: pointer; font-size: 15px; }
.mem-more:hover { color: #409eff; }

/* 弹窗里的列表 */
.discover-list, .invite-list { margin-top: 12px; max-height: 320px; overflow: auto; }
.discover-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 4px;
  border-bottom: 1px solid var(--qz-line);
}
.discover-main { flex: 1; min-width: 0; }
.discover-name { font-size: 13.5px; color: #303133; font-weight: 500; }
.discover-desc { font-size: 12px; color: #909399; margin-top: 2px; }
.discover-empty { padding: 30px; text-align: center; color: #b0b6bf; font-size: 13px; }
.invite-item { padding: 5px 4px; }
.emoji-box { display: flex; flex-wrap: wrap; gap: 2px; }
.emoji-item {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  font-size: 19px; cursor: pointer; border-radius: 5px;
}
.emoji-item:hover { background: #f0f4f9; }

/* ==================================================================
   个人中心
   ================================================================== */
.profile-page { padding: 0; }
.pf-banner {
  height: 128px; border-radius: var(--qz-radius) var(--qz-radius) 0 0;
  background: linear-gradient(120deg, #4facfe 0%, #409eff 45%, #2b6cb8 100%);
  position: relative; overflow: hidden;
}
.pf-banner::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(600px 200px at 85% 20%, rgba(255, 255, 255, .22), transparent);
}
.pf-body {
  display: grid; grid-template-columns: 300px 1fr; gap: 14px;
  margin-top: -46px; padding: 0 4px 4px; align-items: start;
  /* 必须显式定位并抬高层级：banner 是 position:relative，
     默认会盖住后面静态定位的内容，头像/Tab 会被横幅切掉半截 */
  position: relative; z-index: 1;
}
.pf-card {
  text-align: center; padding: 0 0 16px;
  /* Element Plus 的 .el-card 自带 overflow:hidden，会把负 margin 上浮的头像
     从卡片顶端切掉。这里必须放开，头像才能「坐」在横幅上。 */
  overflow: visible !important;
}
.pf-avatar-wrap {
  position: relative; width: 110px; height: 110px;
  /* 用 block + auto 外边距居中：inline-block 配 auto 是不生效的，
     会因父级里有空白文本节点而出现几个像素的偏移 */
  margin: -70px auto 12px; display: block;
}
.pf-avatar {
  border: 4px solid #fff !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18) !important;
  background: linear-gradient(135deg, #4facfe, #409eff);
  font-size: 40px; font-weight: 600; color: #fff;
}
.pf-avatar-text { font-size: 38px; }
.pf-avatar-mask {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 34px; border-radius: 0 0 60px 60px;
  background: rgba(0, 0, 0, .55); color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 11.5px; cursor: pointer; opacity: .8;
  transition: opacity .2s ease;
}
.pf-avatar-wrap:hover .pf-avatar-mask { opacity: 1; }
.pf-name { font-size: 17px; color: #303133; margin-bottom: 2px; }
.pf-account { font-size: 12.5px; color: #909399; margin-bottom: 8px; }
.pf-roles { display: flex; gap: 4px; justify-content: center; margin-bottom: 10px; }
.pf-signature {
  font-size: 12.5px; color: #6b7280; line-height: 1.7; padding: 0 16px;
  min-height: 34px;
}
.pf-progress {
  display: flex; align-items: center; gap: 8px; padding: 0 18px; margin-top: 12px;
}
.pf-progress .el-progress { flex: 1; }
.pf-progress-label { font-size: 12px; color: #909399; white-space: nowrap; }
.pf-progress-num { font-size: 12px; color: #409eff; font-weight: 600; }
.pf-meta { padding: 0 18px; }
.pf-meta-row {
  display: flex; align-items: center; gap: 8px; padding: 5px 0;
  font-size: 12.5px; color: #606266;
}
.pf-meta-row .el-icon { color: #b0b6bf; font-size: 15px; flex-shrink: 0; }
.pf-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 14px;
}
.pf-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 2px; border-radius: 8px; background: #fafbfc;
}
.pf-stat b { font-size: 15px; color: #303133; line-height: 1.2; word-break: break-all; }
.pf-stat span { font-size: 11px; color: #909399; }
.pf-join { font-size: 11.5px; color: #b8bcc4; margin-top: 12px; }
.pf-panel { padding: 4px 6px; }
.pf-form { padding-top: 10px; }
.pf-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding-top: 14px; margin-top: 6px; border-top: 1px solid var(--qz-line);
}

@media (max-width: 1100px) {
  .pf-body { grid-template-columns: 1fr; }
  .chat-members { display: none; }
}

/* ============================================================ 版本更新 */
.ver-body { display: grid; grid-template-columns: 300px 1fr; gap: 12px; margin-top: 12px; align-items: start; }
.ver-list { max-height: 640px; overflow: auto; }
.ver-item { padding: 10px 12px; border: 1px solid var(--qz-line, #ebeef5); border-radius: 8px;
  margin-bottom: 8px; cursor: pointer; transition: all .18s; background: #fff; }
.ver-item:hover { border-color: #409eff; box-shadow: 0 2px 8px rgba(64,158,255,.12); }
.ver-item.active { border-color: #409eff; background: #f0f7ff; }
.ver-item-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ver-item-title { font-size: 13px; margin-top: 6px; color: #303133; }
.ver-item-sum { font-size: 12px; margin-top: 4px; line-height: 1.5; }
.ver-item-time { font-size: 11px; margin-top: 6px; }
.ver-detail { min-height: 400px; }
.ver-md { line-height: 1.85; font-size: 13px; color: #303133; max-height: 520px; overflow: auto; }
.ver-md h1, .ver-md h2 { font-size: 16px; margin: 14px 0 8px; padding-left: 9px; border-left: 3px solid #409eff; }
.ver-md h3, .ver-md h4 { font-size: 14px; margin: 12px 0 6px; color: #409eff; }
.ver-md p { margin: 6px 0; }
.ver-md ul { margin: 6px 0; padding-left: 20px; }
.ver-md li { margin: 3px 0; }

/* ============================================================ 币圈新闻 */
.news-stat { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.news-stat-item .n { font-size: 22px; font-weight: 600; color: #303133; line-height: 1.2; }
.news-stat-item .n.small { font-size: 13px; font-weight: 500; }
.news-stat-item .l { font-size: 12px; color: #909399; margin-top: 2px; }
.news-stat-item.hot .n { color: #f56c6c; }
.news-stat-item.grow { flex: 1; min-width: 220px; }
.news-stat-btns { margin-left: auto; display: flex; gap: 8px; }
.tiny { font-size: 11px; }
.news-body { display: grid; grid-template-columns: 240px 1fr; gap: 12px; margin-top: 12px; align-items: start; }
.news-side { position: sticky; top: 12px; }
.news-cat { padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 13px;
  margin-bottom: 6px; transition: all .18s; border: 1px solid transparent; }
.news-cat:hover { background: #f5f7fa; }
.news-cat.on { background: #ecf5ff; color: #409eff; font-weight: 600; border-color: #b3d8ff; }
.news-cat.hot.on { background: #fef0f0; color: #f56c6c; border-color: #fbc4c4; }
.news-main { max-height: 780px; overflow: auto; }
.news-item { padding: 12px 0; border-bottom: 1px solid #f2f4f7; }
.news-item:last-child { border-bottom: none; }
.news-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.news-src { font-size: 12px; color: #606266; }
.news-ops { margin-left: auto; }
.news-title { font-size: 14px; font-weight: 600; margin: 6px 0 4px; line-height: 1.5; }
.news-title a { color: #303133; text-decoration: none; }
.news-title a:hover { color: #409eff; text-decoration: underline; }
.news-sum { font-size: 12px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.news-tags { margin-top: 6px; display: flex; gap: 4px; flex-wrap: wrap; }

/* ============================================================ 系统监测 */
.met-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.met-card { background: #fff; border: 1px solid var(--qz-line, #ebeef5); border-radius: 10px;
  padding: 14px 16px; transition: all .18s; }
.met-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.met-card.warn { border-color: #f0c78a; background: #fdf6ec; }
.met-card.crit { border-color: #f9b3b3; background: #fef0f0; }
.met-card-t { font-size: 12px; color: #909399; }
.met-card-v { font-size: 24px; font-weight: 600; margin: 6px 0 4px; color: #303133; }
.met-card-s { font-size: 11px; }

@media (max-width: 1300px) { .met-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1100px) {
  .ver-body, .news-body { grid-template-columns: 1fr; }
  .news-side { position: static; }
}
